.nutrihero-game,
.nutrihero-standalone-leaderboard,
.nutrihero-game *,
.nutrihero-standalone-leaderboard * {
    box-sizing: border-box;
}

.nutrihero-game,
.nutrihero-standalone-leaderboard {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #78350f;
}

.nutrihero-wrap {
    width: 100%;
    max-width: 920px;
    margin: 28px auto;
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(120, 53, 15, 0.16);
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.nutrihero-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px;
    color: #fff;
    background: linear-gradient(90deg, #d97706 0%, #ea580c 100%);
}

.nutrihero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.nutrihero-logo {
    font-size: 42px;
    line-height: 1;
    flex: 0 0 auto;
}

.nutrihero-brand h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    color: #fff;
}

.nutrihero-brand p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #fde68a;
}

.nutrihero-score {
    flex: 0 0 auto;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    color: #fff;
}

.nutrihero-content {
    padding: 30px;
}

.nutrihero-start,
.nutrihero-end {
    text-align: center;
    padding: clamp(36px, 7vw, 76px) 18px;
}

.nutrihero-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(112px, 24vw, 148px);
    height: clamp(112px, 24vw, 148px);
    margin: 0 auto 28px;
    border-radius: 30px;
    background: #fef3c7;
    font-size: clamp(70px, 15vw, 96px);
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.1);
}

.nutrihero-start h2,
.nutrihero-end h2 {
    max-width: 680px;
    margin: 0 auto 16px;
    font-size: clamp(34px, 7vw, 58px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    color: #92400e;
}

.nutrihero-start p {
    margin: 0 auto 34px;
    max-width: 460px;
    font-size: clamp(18px, 3vw, 22px);
    color: #b45309;
}

.nutrihero-primary-button,
.nutrihero-secondary-button,
.nutrihero-text-button,
.nutrihero-option {
    appearance: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.nutrihero-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, 340px);
    min-height: 72px;
    padding: 18px 24px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(90deg, #d97706 0%, #ea580c 100%);
    box-shadow: 0 16px 32px rgba(217, 119, 6, 0.24);
    font-size: clamp(20px, 4vw, 25px);
    font-weight: 800;
}

.nutrihero-primary-button:hover,
.nutrihero-secondary-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.nutrihero-primary-button:active,
.nutrihero-secondary-button:active,
.nutrihero-option:active {
    transform: scale(0.98);
}

.nutrihero-question-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    color: #b45309;
    font-weight: 700;
}

.nutrihero-progress {
    height: 9px;
    margin-bottom: 28px;
    background: #fef3c7;
    border-radius: 999px;
    overflow: hidden;
}

.nutrihero-progress div {
    height: 100%;
    background: #d97706;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.nutrihero-card,
.nutrihero-feedback-card,
.nutrihero-result-box,
.nutrihero-save-form,
.nutrihero-leaderboard-panel {
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.08);
}

.nutrihero-card {
    padding: clamp(24px, 5vw, 42px);
}

.nutrihero-question {
    margin: 0 0 28px;
    font-size: clamp(22px, 4.2vw, 34px);
    line-height: 1.18;
    font-weight: 800;
    color: #78350f;
}

.nutrihero-options {
    display: grid;
    gap: 14px;
}

.nutrihero-option {
    width: 100%;
    padding: 20px 22px;
    border: 2px solid #fef3c7;
    border-radius: 24px;
    background: #fff;
    color: #78350f;
    text-align: left;
    font-size: clamp(17px, 3vw, 21px);
    line-height: 1.28;
    font-weight: 650;
}

.nutrihero-option:hover:not(:disabled) {
    border-color: #f59e0b;
    background: #fffbeb;
}

.nutrihero-option:disabled {
    cursor: default;
}

.nutrihero-option.is-correct {
    border-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
}

.nutrihero-option.is-wrong {
    border-color: #f87171;
    background: #fef2f2;
    color: #991b1b;
}

.nutrihero-feedback {
    margin-top: 26px;
}

.nutrihero-feedback.is-hidden {
    display: none;
}

.nutrihero-feedback-card {
    border: 1px solid rgba(251, 191, 36, 0.45);
    padding: clamp(22px, 4vw, 32px);
}

.nutrihero-feedback-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.nutrihero-feedback-icon {
    font-size: 48px;
    line-height: 1;
}

.nutrihero-feedback h3 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #92400e;
}

.nutrihero-feedback p {
    margin: 0;
    font-size: 18px;
    line-height: 1.58;
    color: #b45309;
}

.nutrihero-next-button {
    width: 100%;
    margin-top: 26px;
}

.nutrihero-end-icon {
    font-size: clamp(70px, 16vw, 96px);
    line-height: 1;
    margin-bottom: 18px;
}

.nutrihero-result-box {
    display: inline-block;
    margin: 28px auto 26px;
    padding: 30px 48px;
}

.nutrihero-result-score {
    font-size: clamp(54px, 13vw, 82px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.06em;
    color: #b45309;
}

.nutrihero-result-score span {
    font-size: 0.52em;
    color: #f59e0b;
}

.nutrihero-result-percent {
    margin-top: 8px;
    font-size: clamp(28px, 7vw, 42px);
    font-weight: 800;
    color: #d97706;
}

.nutrihero-save-form {
    max-width: 640px;
    margin: 0 auto 22px;
    padding: 22px;
    text-align: left;
    border: 1px solid rgba(251, 191, 36, 0.45);
}

.nutrihero-save-form label {
    display: block;
    margin-bottom: 10px;
    color: #92400e;
    font-size: 18px;
    font-weight: 800;
}

.nutrihero-save-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.nutrihero-save-form input {
    width: 100%;
    min-height: 56px;
    padding: 12px 16px;
    border: 2px solid #fde68a;
    border-radius: 18px;
    color: #78350f;
    background: #fffbeb;
    font: inherit;
    font-size: 17px;
    outline: none;
}

.nutrihero-save-form input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.nutrihero-secondary-button {
    min-height: 56px;
    padding: 12px 18px;
    border-radius: 18px;
    color: #fff;
    background: #92400e;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.nutrihero-secondary-button:disabled {
    opacity: 0.75;
    cursor: default;
}

.nutrihero-text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 16px;
    color: #b45309;
    background: transparent;
    font-size: 17px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nutrihero-form-message {
    min-height: 22px;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 700;
}

.nutrihero-form-message.is-success {
    color: #047857;
}

.nutrihero-form-message.is-error,
.nutrihero-error {
    color: #b91c1c;
}

.nutrihero-leaderboard-panel {
    margin: 0 30px 30px;
    padding: clamp(20px, 4vw, 28px);
    border: 1px solid rgba(251, 191, 36, 0.45);
}

.nutrihero-leaderboard-only .nutrihero-leaderboard-panel {
    margin: 0;
}

.nutrihero-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.nutrihero-section-title span {
    font-size: 30px;
    line-height: 1;
}

.nutrihero-section-title h2 {
    margin: 0;
    color: #92400e;
    font-size: clamp(24px, 4vw, 32px);
    letter-spacing: -0.035em;
}

.nutrihero-leaderboard-table {
    display: grid;
    gap: 10px;
}

.nutrihero-leaderboard-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #fef3c7;
    border-radius: 18px;
    background: #fffbeb;
}

.nutrihero-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 900;
}

.nutrihero-player {
    min-width: 0;
}

.nutrihero-player strong,
.nutrihero-player span,
.nutrihero-points strong,
.nutrihero-points span {
    display: block;
}

.nutrihero-player strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #78350f;
    font-size: 17px;
}

.nutrihero-player span,
.nutrihero-points span {
    margin-top: 3px;
    color: #b45309;
    font-size: 13px;
}

.nutrihero-points {
    text-align: right;
}

.nutrihero-points strong {
    color: #92400e;
    font-size: 18px;
}

.nutrihero-loading,
.nutrihero-empty,
.nutrihero-error {
    padding: 16px;
    border-radius: 18px;
    background: #fffbeb;
    font-weight: 700;
}

.nutrihero-confetti {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
}

@media (max-width: 700px) {
    .nutrihero-wrap {
        margin: 0 auto 22px;
        border-radius: 0 0 28px 28px;
    }

    .nutrihero-header {
        padding: 18px 18px;
    }

    .nutrihero-logo {
        font-size: 36px;
    }

    .nutrihero-content {
        padding: 22px 16px;
    }

    .nutrihero-save-row {
        grid-template-columns: 1fr;
    }

    .nutrihero-secondary-button {
        width: 100%;
    }

    .nutrihero-leaderboard-panel {
        margin: 0 16px 20px;
    }

    .nutrihero-leaderboard-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .nutrihero-points {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 420px) {
    .nutrihero-brand {
        gap: 8px;
    }

    .nutrihero-brand p {
        display: none;
    }

    .nutrihero-score {
        font-size: 22px;
    }

    .nutrihero-feedback-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }
}
