:root {
    --bg: #07111f;
    --bg-soft: #0d1b2f;
    --bg-deep: #040b14;
    --panel: rgba(12, 24, 42, 0.76);
    --panel-strong: rgba(14, 29, 52, 0.92);
    --card: rgba(16, 33, 58, 0.84);
    --stroke: rgba(138, 173, 255, 0.16);
    --primary: #2f6bff;
    --primary-soft: #7ba5ff;
    --accent: #ff8a2a;
    --accent-soft: rgba(255, 138, 42, 0.14);
    --success: #29cb7a;
    --danger: #ff667c;
    --text: #f3f7ff;
    --muted: #9db0d1;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    --radius-xl: 32px;
    --radius-lg: 26px;
    --radius-md: 20px;
    --radius-sm: 16px;
    --container: 1480px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at 14% 18%, rgba(47, 107, 255, 0.26), transparent 24%),
        radial-gradient(circle at 84% 10%, rgba(255, 138, 42, 0.15), transparent 20%),
        radial-gradient(circle at 85% 72%, rgba(47, 107, 255, 0.16), transparent 26%),
        linear-gradient(180deg, #040b14 0%, #07111f 50%, #081321 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.session-radio {
    width: 24px;
    height: 24px;
    accent-color: var(--primary);
    cursor: pointer;
    flex: 0 0 auto;
}

.app-shell {
    max-width: var(--container);
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 24px;
}

.sidebar,
.panel,
.hero-panel,
.surface,
.form-shell,
.consent-bar {
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(13, 27, 47, 0.94), rgba(8, 18, 31, 0.88));
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.sidebar {
    position: sticky;
    top: 24px;
    min-height: auto;
    height: fit-content;
    border-radius: var(--radius-xl);
    padding: 20px 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
    padding: 0;
    width: 100%;
}

.brand-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: stretch;
    width: 100%;
}

.brand-logo img {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: 120px;
    object-fit: contain;
    display: block;
}

.nav {
    display: grid;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    color: var(--muted);
    border-radius: 18px;
    border: 1px solid transparent;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text);
    background: rgba(47, 107, 255, 0.14);
    border-color: rgba(123, 165, 255, 0.18);
    transform: translateY(-1px);
}

.nav-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
}

.small-label {
    color: #cad8f1;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.sidebar-footnote strong {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.sidebar-footnote p {
    color: var(--muted);
    margin: 0;
    line-height: 1.65;
    font-size: 0.92rem;
}

.wide-btn {
    width: 100%;
}

.logout-form {
    margin-top: 4px;
}

.main-content {
    display: grid;
    gap: 24px;
}

.topbar,
.hero-panel,
.surface,
.form-shell,
.consent-bar {
    border-radius: var(--radius-xl);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    background: rgba(10, 22, 38, 0.7);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.compact-topbar {
    padding: 16px 22px;
}

.compact-topbar .headline {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.compact-topbar .subline {
    margin-top: 6px;
    max-width: 820px;
}

.headline {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.subline,
.muted,
.section-copy,
.card-copy,
.meta-text,
.form-note,
.session-meta,
.agreement-text,
.empty-state {
    color: var(--muted);
}

.subline,
.section-copy,
.card-copy,
.form-note,
.agreement-text,
.empty-state {
    line-height: 1.7;
}

.badge-row,
.inline-actions,
.stat-row,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge,
.pill,
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: #d6e4fb;
    font-size: 0.82rem;
    font-weight: 700;
}

.tag.success {
    background: rgba(41, 203, 122, 0.14);
    color: #96f1bc;
}

.tag.warning {
    background: rgba(255, 138, 42, 0.14);
    color: #ffc48f;
}

.tag.danger {
    background: rgba(255, 102, 124, 0.14);
    color: #ffb0be;
}

.btn {
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), #4f8dff);
    box-shadow: 0 18px 34px rgba(47, 107, 255, 0.32);
}

.btn-accent {
    color: #1d1308;
    background: linear-gradient(135deg, #ff9c45, var(--accent));
    box-shadow: 0 18px 34px rgba(255, 138, 42, 0.28);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 38px;
    min-height: 280px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

.home-hero {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 28px 0 0;
    min-height: calc(100vh - 120px);
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 460px);
    align-items: center;
    gap: 56px;
}

.home-hero::after {
    display: none;
}

.home-copy {
    max-width: 760px;
    display: grid;
    gap: 28px;
    align-content: center;
}

.home-copy .hero-title {
    margin: 0;
}

.home-copy .inline-actions {
    margin-top: 4px;
}

.home-preview {
    justify-content: center;
}

.home-preview-card {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
}

.home-preview-card .wave {
    margin-top: 8px;
}

.hero-panel::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    top: -120px;
    right: -90px;
    background: radial-gradient(circle, rgba(255, 138, 42, 0.22), transparent 70%);
}

.eyebrow {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #cbd9ef;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy p {
    max-width: 720px;
}

.hero-title {
    margin: 18px 0 16px;
    font-size: clamp(2.8rem, 5vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-title span {
    color: #8cb3ff;
}

.hero-preview {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.preview-card,
.glass-card,
.metric-card,
.list-card,
.agreement-card,
.record-visual,
.score-card {
    background: rgba(9, 18, 33, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
}

.preview-card,
.glass-card,
.agreement-card,
.record-visual,
.score-card {
    border-radius: 28px;
}

.preview-card,
.record-visual,
.score-card {
    padding: 24px;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.surface {
    padding: 26px;
    overflow: hidden;
}

.compact-dashboard-surface {
    padding: 20px;
}

.section-title {
    margin: 0 0 8px;
    font-size: 1.45rem;
}

.section-head {
    margin-bottom: 22px;
}

.panel-grid,
.stats-grid,
.training-grid,
.twister-grid,
.profile-grid,
.agreement-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-stats-grid {
    gap: 14px;
}

.metric-card {
    padding: 22px;
    border-radius: 24px;
}

.compact-metric-card {
    padding: 18px 20px;
}

.compact-metric-card strong {
    font-size: 1.8rem;
}

.metric-card span,
.metric-card strong {
    display: block;
}

.metric-card span {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.metric-card strong {
    font-size: 2.2rem;
}

.list-stack,
.feature-list,
.session-list,
.training-grid,
.twister-grid,
.agreement-grid {
    display: grid;
    gap: 16px;
}

.compact-step-stack {
    gap: 12px;
}

.glass-card {
    padding: 22px;
}

.session-item,
.training-item,
.twister-item,
.agreement-card,
.info-row,
.result-row {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-step-card {
    padding: 16px 18px;
}

.training-item p,
.twister-item p {
    color: var(--text);
}

.session-item:hover,
.training-item:hover,
.twister-item:hover {
    border-color: rgba(123, 165, 255, 0.2);
    background: rgba(47, 107, 255, 0.08);
}

.session-item,
.training-item,
.twister-item,
.agreement-card,
.metric-card,
.surface,
.preview-card,
.record-visual,
.score-card {
    min-width: 0;
}

.session-top,
.result-row,
.info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.session-title,
.training-item h3,
.twister-item h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.session-meta,
.meta-text {
    font-size: 0.92rem;
    line-height: 1.6;
}

.record-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    align-items: start;
}

.record-zone {
    padding: 26px;
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02)),
        rgba(5, 12, 21, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.phrase-box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.phrase-text {
    margin: 0;
    font-size: 1.58rem;
    line-height: 1.45;
    max-width: 100%;
}

.record-action {
    width: 92px;
    height: 92px;
    min-width: 92px;
    border-radius: 28px;
}

.record-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.record-primary::before {
    font-size: 2rem;
    line-height: 1;
}

.record-primary.icon-play::before {
    content: "▶";
    margin-left: 6px;
}

.record-primary.icon-stop::before {
    content: "■";
}

.wave {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 88px;
    margin: 22px 0 18px;
}

.wave span {
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(180deg, #91b7ff, #2f6bff);
    animation: pulse 1.6s ease-in-out infinite;
}

.wave span:nth-child(1) { height: 28px; animation-delay: 0s; }
.wave span:nth-child(2) { height: 62px; animation-delay: 0.12s; }
.wave span:nth-child(3) { height: 44px; animation-delay: 0.24s; }
.wave span:nth-child(4) { height: 74px; animation-delay: 0.36s; }
.wave span:nth-child(5) { height: 35px; animation-delay: 0.48s; }
.wave span:nth-child(6) { height: 66px; animation-delay: 0.6s; }
.wave span:nth-child(7) { height: 48px; animation-delay: 0.72s; }
.wave span:nth-child(8) { height: 58px; animation-delay: 0.84s; }

@keyframes pulse {
    0%, 100% { transform: scaleY(1); opacity: 0.82; }
    50% { transform: scaleY(1.16); opacity: 1; }
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.stat-tile {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-tile span,
.stat-tile strong {
    display: block;
}

.stat-tile span {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.stat-tile strong {
    font-size: 1.42rem;
}

.score-ring {
    --score: 0;
    width: 180px;
    height: 180px;
    margin: 6px auto 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(9, 18, 33, 1) 55%, transparent 56%),
        conic-gradient(
            var(--primary) 0 calc(var(--score) * 1%),
            rgba(255, 255, 255, 0.08) calc(var(--score) * 1%) 100%
        );
    box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.03);
}

.score-ring strong {
    font-size: 2.4rem;
}

.result-list {
    display: grid;
    gap: 12px;
}

.result-row strong {
    font-size: 0.95rem;
}

.form-shell {
    max-width: 560px;
    padding: 30px;
}

.form-shell.large {
    max-width: 720px;
    width: 100%;
}

.form-shell form,
.stack {
    display: grid;
    gap: 16px;
}

.input-grid {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #dce8fb;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 15px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.error {
    color: #ff9aa9;
    font-weight: 700;
}

.success-note {
    color: #9af0bf;
    font-weight: 700;
}

.helper-text {
    font-size: 0.88rem;
    color: var(--muted);
}

.hidden-file-input {
    display: none;
}

.simple-list {
    display: grid;
    gap: 12px;
}

.simple-list li {
    color: var(--muted);
    line-height: 1.6;
}

.compact-grid {
    display: grid;
    gap: 16px;
}

.consent-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 18px 22px;
    flex-direction: column;
    text-align: center;
}

.consent-bar p {
    margin: 0;
    max-width: 760px;
    line-height: 1.75;
    color: #d6e3f6;
    font-size: 1.18rem;
}

.inline-link {
    color: #a9c4ff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
}

.profile-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
}

.focus-card {
    min-height: 56vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
}

.focus-card .session-top {
    margin-bottom: 18px;
}

.focus-card h3 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 10px;
    color: var(--text);
}

.focus-card .session-meta {
    color: #cddcf5;
    font-size: 1rem;
}

.focus-card .agreement-text {
    color: var(--text);
    font-size: clamp(1.35rem, 2.3vw, 1.8rem);
    line-height: 1.7;
    font-weight: 600;
    max-width: 980px;
}

.consent-bar .inline-actions {
    justify-content: center;
    width: 100%;
}

.consent-bar .btn {
    min-width: 220px;
}

.download-wrap {
    margin-top: 18px;
}

.profile-hero {
    padding: 26px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(47, 107, 255, 0.18), rgba(255, 138, 42, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-hero h2 {
    margin: 0 0 12px;
    font-size: 1.8rem;
}

.profile-topbar {
    padding: 18px 22px;
}

.profile-topbar .headline {
    margin-bottom: 0;
    font-size: 2rem;
}

.profile-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 220px));
    justify-content: start;
    align-items: stretch;
}

.profile-main-grid {
    gap: 16px;
    align-items: stretch;
}

.profile-main-surface,
.profile-side-surface {
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.compact-profile-hero {
    padding: 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.compact-profile-hero h2 {
    margin-bottom: 10px;
    font-size: 1.65rem;
}

.compact-profile-hero .agreement-text {
    font-size: 1rem;
    line-height: 1.65;
}

.compact-section-head {
    margin-bottom: 10px;
}

.compact-result-list {
    gap: 10px;
}

.compact-result-row {
    padding: 14px 16px;
}

.profile-level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-level-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
}

.profile-level-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.profile-level-head em {
    color: var(--muted);
    font-style: normal;
    font-size: 1rem;
    font-weight: 700;
}

.compact-reward-track {
    gap: 8px;
}

.profile-stat {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-stat span,
.profile-stat strong {
    display: block;
}

.profile-stat span {
    margin-bottom: 10px;
    color: var(--muted);
}

.profile-stat strong {
    font-size: 2rem;
}

.agreement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agreement-card h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
}

.preformatted {
    white-space: pre-wrap;
}

.play-sidebar-card,
.game-card,
.game-finish-card {
    position: relative;
    overflow: hidden;
}

.play-sidebar-card {
    display: grid;
    gap: 18px;
    min-height: 100%;
}

.play-avatar {
    width: 84px;
    height: 84px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.glow-blue {
    box-shadow: 0 0 0 1px rgba(123, 165, 255, 0.15), 0 18px 40px rgba(47, 107, 255, 0.22);
}

.glow-orange {
    box-shadow: 0 0 0 1px rgba(255, 156, 69, 0.16), 0 18px 40px rgba(255, 138, 42, 0.2);
}

.play-copy h3,
.game-copy h2 {
    margin: 6px 0 10px;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.play-copy p,
.game-description {
    margin: 0;
    color: #c8d6ef;
    line-height: 1.7;
    font-size: 1rem;
}

.small-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #d9e5f8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.reward-track {
    display: grid;
    gap: 10px;
}

.reward-progress {
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.reward-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #81aaff, #2f6bff);
    box-shadow: 0 0 18px rgba(47, 107, 255, 0.32);
}

.orange-track span {
    background: linear-gradient(90deg, #ffb163, #ff8a2a);
    box-shadow: 0 0 18px rgba(255, 138, 42, 0.3);
}

.reward-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--muted);
    font-size: 0.95rem;
}

.reward-meta strong {
    color: var(--text);
    font-size: 1.2rem;
}

.achievement-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.achievement-badge {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 1.55rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    opacity: 0.45;
    transform: scale(0.96);
}

.achievement-badge.earned {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(47, 107, 255, 0.16));
    box-shadow: 0 14px 28px rgba(47, 107, 255, 0.18);
}

.game-card {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 42, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(15, 30, 52, 0.95), rgba(8, 18, 31, 0.92));
}

.twister-game-card {
    background:
        radial-gradient(circle at top right, rgba(255, 138, 42, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(18, 31, 52, 0.95), rgba(9, 18, 31, 0.92));
}

.game-card-top,
.game-chip-row,
.task-cards {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.game-card-top {
    justify-content: space-between;
}

.game-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-chip.blue {
    background: rgba(47, 107, 255, 0.16);
    color: #dbe7ff;
}

.game-chip.orange {
    background: rgba(255, 138, 42, 0.16);
    color: #ffd3a8;
}

.game-mascot {
    width: 84px;
    height: 84px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 2rem;
}

.orb-float {
    animation: floaty 4s ease-in-out infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.game-copy {
    display: grid;
    gap: 16px;
}

.speech-banner {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 16px;
    align-items: start;
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.accent-banner {
    background: linear-gradient(135deg, rgba(255, 138, 42, 0.1), rgba(47, 107, 255, 0.08));
}

.speech-banner-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.5rem;
}

.speech-banner p {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.35rem, 2.5vw, 1.95rem);
    line-height: 1.6;
    font-weight: 700;
}

.task-cards {
    align-items: stretch;
}

.mini-game-card {
    flex: 1 1 240px;
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-game-card strong {
    font-size: 1rem;
}

.mini-game-card span {
    color: #c9d7f1;
    line-height: 1.6;
}

.game-finish-card {
    display: grid;
    gap: 18px;
    place-items: start;
}

.unlock-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 138, 42, 0.18), rgba(47, 107, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #eef4ff;
    font-weight: 700;
    align-self: flex-start;
}

.unlock-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
}

.mission-bar {
    padding: 18px 22px;
}

.mission-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.mission-bar-copy {
    display: grid;
    gap: 8px;
    max-width: 720px;
}

.mission-bar-copy strong {
    font-size: 1.15rem;
}

.mission-bar-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.mission-bar-stats {
    display: grid;
    gap: 12px;
    min-width: min(100%, 360px);
}

.compact-track .reward-meta strong {
    font-size: 1.05rem;
}

.compact-achievements .achievement-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 1.35rem;
}

.aligned-game-card {
    min-height: auto;
    gap: 26px;
}

.aligned-game-card .game-card-top {
    align-items: center;
}

.aligned-game-card .game-copy {
    max-width: 1080px;
}

.aligned-game-card .task-cards {
    width: 100%;
}

.aligned-game-card .mini-game-card {
    min-height: 142px;
    align-content: start;
}

.compact-game-card {
    gap: 18px;
    padding: 24px 28px;
}

.compact-game-top {
    margin-bottom: 0;
}

.compact-game-copy {
    gap: 12px;
}

.compact-speech-banner {
    padding: 18px 20px;
    gap: 14px;
}

.compact-speech-banner p {
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    line-height: 1.55;
}

.compact-task-cards {
    gap: 10px;
}

.compact-mini-card {
    min-height: 104px;
    padding: 16px 18px;
}

@media (max-width: 1220px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
        min-height: auto;
        height: auto;
    }

    .hero-panel,
    .record-layout,
    .profile-grid,
    .agreement-grid,
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .home-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 12px;
    }

    .home-copy {
        max-width: none;
    }

    .home-preview-card {
        max-width: 520px;
        margin: 0;
    }

    .span-8,
    .span-7,
    .span-6,
    .span-5,
    .span-4 {
        grid-column: span 12;
    }
}

@media (max-width: 780px) {
    .app-shell {
        padding: 14px;
    }

    .topbar,
    .hero-panel,
    .surface,
    .form-shell,
    .consent-bar {
        padding: 20px;
    }

    .topbar,
    .hero-panel,
    .record-layout,
    .stats-grid,
    .profile-grid,
    .agreement-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        gap: 20px;
        padding-top: 0;
    }

    .home-copy {
        gap: 20px;
    }

    .phrase-box {
        flex-direction: column;
    }

    .phrase-text {
        max-width: 100%;
        font-size: 1.24rem;
    }

    .stat-strip {
        grid-template-columns: 1fr;
    }

    .speech-banner {
        grid-template-columns: 1fr;
    }

    .mission-bar-inner {
        align-items: stretch;
    }

    .consent-bar {
        flex-direction: column;
        align-items: stretch;
    }
}
