/* Cloud Tycoon Live — student pages (index.html + team.html). Builds on core.css tokens. */

.t-page { min-height: 100vh; min-height: 100dvh; background: var(--bg-grad, none), var(--bg); background-attachment: fixed; overflow-x: hidden; }
.t-kicker { font-size: .75em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.t-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.t-sec-head h2 { font-size: 1.15em; }
.t-page h2 { font-size: 1.25em; }

/* ================================================================== JOIN */
.j-main { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px 40px; }
.j-sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.j-sky span { position: absolute; font-size: 90px; opacity: .22; filter: blur(.5px); animation: j-float 28s linear infinite; }
.j-sky span:nth-child(1) { top: 6%; left: -120px; }
.j-sky span:nth-child(2) { top: 46%; left: -160px; font-size: 140px; animation-duration: 40s; animation-delay: -18s; opacity: .14; }
.j-sky span:nth-child(3) { top: 78%; left: -100px; font-size: 70px; animation-duration: 33s; animation-delay: -6s; }
@keyframes j-float { to { transform: translateX(calc(100vw + 260px)); } }

.j-card { position: relative; z-index: 1; width: min(100%, 460px); padding: 28px 22px 22px; text-align: left; overflow: hidden; }
.j-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--accent-brand, var(--accent)), var(--sky, #2f7fd8)); }
@media (min-width: 520px) { .j-card { padding: 34px 32px 28px; } }
.j-logo { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 36px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent-brand, var(--accent)), var(--sky, #2f7fd8));
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent-brand, var(--accent)) 60%, transparent), inset 0 1px 0 rgba(255,255,255,.4); }
.j-card h1 { font-size: clamp(1.7em, 5vw + .6em, 2.2em); margin: 4px 0 8px; }
.j-sub { margin-bottom: 18px; line-height: 1.5; }
.j-flash { margin-bottom: 16px; }
.j-form { gap: 18px; }
.j-field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.j-field > label, .j-field > legend { font-weight: 750; font-size: .92em; color: var(--ink); padding: 0; margin-bottom: 6px; }
.j-field > label { margin-bottom: 0; }
.j-input, .j-code { width: 100%; min-height: 52px; padding: 10px 14px; font: inherit; font-size: 1.05em; color: var(--ink);
  background: var(--surface-2); border: 2px solid var(--line-2, var(--line)); border-radius: 14px; transition: border-color .15s, box-shadow .15s, background .15s; }
.j-input:hover, .j-code:hover { border-color: var(--ink-3); }
.j-input:focus, .j-code:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.j-code { font-family: var(--mono); font-weight: 800; font-size: 2em; letter-spacing: .42em; text-align: center; text-transform: uppercase; padding-left: calc(14px + .42em); min-height: 64px; }
.j-code::placeholder { color: var(--ink-3); opacity: .35; }
.j-hint { font-size: .84em; color: var(--ink-3); min-height: 1.2em; }
.j-hint.is-good { color: var(--good); font-weight: 650; }
.j-hint.is-bad { color: var(--bad); font-weight: 650; }
.j-emoji-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.j-kicker { font-size: .78em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.j-emoji { appearance: none; aspect-ratio: 1; min-height: 44px; min-width: 0; padding: 0; display: grid; place-items: center; font-size: 1.55em; line-height: 1; cursor: pointer;
  background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px; transition: transform .15s var(--spring, ease), border-color .15s, background .15s; -webkit-tap-highlight-color: transparent; position: relative; }
.j-emoji:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.j-emoji[aria-checked="true"] { border-color: var(--accent); background: var(--accent-bg); transform: scale(1.08); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.j-emoji[aria-checked="true"]::after { content: "✓"; position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.j-emoji.is-taken:not([aria-checked="true"]) { opacity: .4; }
.j-submit { margin-top: 4px; font-size: 1.15em; min-height: 56px; }
.j-foot { font-size: .82em; text-align: center; }
.j-resume { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.j-resume-t { font-weight: 700; color: var(--ink-2); }
.j-resume .btn.big { justify-content: flex-start; gap: 12px; min-height: 64px; white-space: normal; text-align: left; }
.j-resume .avatar { --size: 40px; }

/* ================================================================== TEAM: header */
.t-team { padding-bottom: 40px; }
.t-team[data-phase="build"] { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }
.t-top { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "who tools" "stats stats"; gap: 6px 10px; padding: 8px 16px 10px; }
.t-who { grid-area: who; display: flex; align-items: center; gap: 10px; min-width: 0; }
.t-av { --size: 40px; --tc: var(--team, var(--accent)); }
.t-who-txt { display: flex; flex-direction: column; min-width: 0; }
.t-name { font-weight: 800; font-size: 1.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.t-phase { font-size: .74em; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.t-phase.is-build { color: var(--accent); }
.t-phase.is-event { color: var(--bad); }
.t-phase.is-results, .t-phase.is-end { color: var(--info); }
.t-tools { grid-area: tools; display: flex; gap: 6px; align-items: center; }
.t-iconbtn { appearance: none; min-width: 44px; min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 650; font-size: .9em; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.t-iconbtn:hover { color: var(--ink); border-color: var(--ink-3); }
.t-iconbtn > span[aria-hidden] { font-size: 1.15em; }
.t-iconlbl { display: none; }
@media (min-width: 560px) { .t-iconlbl { display: inline; } }
.t-stats { grid-area: stats; display: grid; grid-template-columns: auto auto 1fr; gap: 8px; }
.t-stat { display: flex; flex-direction: column; justify-content: center; padding: 4px 12px; min-height: 44px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.t-stat small { font-size: .66em; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); line-height: 1.1; }
.t-stat b { font-size: 1.08em; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.t-cash { text-align: right; align-items: flex-end; background: var(--accent-bg); border-color: var(--accent-line, var(--line)); }
.t-cash b { font-size: 1.3em; color: var(--accent); }
.t-cash b.is-neg { color: var(--bad); }
.t-cash b.is-bump { animation: t-bump .6s var(--spring, ease); }
@keyframes t-bump { 40% { transform: scale(1.12); } }
.t-timer.is-low { background: var(--warn-bg); border-color: var(--warn); }
.t-timer.is-low b { color: var(--warn); }
.t-timer.is-done { background: var(--bad-bg); border-color: var(--bad); }
.t-timer.is-done b { color: var(--bad); animation: t-blink 1s steps(2) infinite; }
.t-timer.is-paused b { color: var(--ink-3); }
@keyframes t-blink { 50% { opacity: .3; } }
@media (min-width: 900px) {
  .t-top { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "who stats tools"; padding: 10px 24px; }
  .t-stats { grid-template-columns: auto auto auto; }
  .t-cash { min-width: 150px; }
}

.t-main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 16px 16px 24px; }
@media (min-width: 768px) { .t-main { padding: 22px 24px 32px; } }
.t-view { display: flex; flex-direction: column; gap: 16px; animation: t-in .35s var(--ease, ease) both; }
@keyframes t-in { from { opacity: 0; transform: translateY(8px); } }
.t-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 20px; text-align: center; color: var(--ink-2); }
.t-spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--surface-3); border-top-color: var(--accent); animation: t-spin .8s linear infinite; }
@keyframes t-spin { to { transform: rotate(360deg); } }
.t-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.t-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: t-dot 1.2s ease-in-out infinite; }
.t-dots i:nth-child(2) { animation-delay: .15s; } .t-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes t-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ================================================================== LOBBY */
#vLobby { max-width: 720px; margin: 0 auto; width: 100%; }
.l-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 28px; position: relative; overflow: hidden; }
.l-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; background: linear-gradient(180deg, color-mix(in srgb, var(--team, var(--accent)) 18%, transparent), transparent); pointer-events: none; }
.l-av { --size: 104px; --tc: var(--team, var(--accent)); font-size: 56px; margin-bottom: 8px; animation: l-bob 3s ease-in-out infinite; box-shadow: 0 0 0 5px var(--tc), 0 14px 30px -8px color-mix(in srgb, var(--tc) 60%, transparent); }
@keyframes l-bob { 50% { transform: translateY(-6px) rotate(-3deg); } }
.l-title { font-size: clamp(1.8em, 6vw + .5em, 2.6em); }
.l-name { font-size: 1.15em; font-weight: 700; color: var(--ink-2); }
.l-wait { margin-top: 12px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font-weight: 750; }
.l-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 16px; -webkit-overflow-scrolling: touch; }
.l-track::-webkit-scrollbar { display: none; }
.l-slide { flex: 0 0 100%; scroll-snap-align: start; padding: 18px 18px 20px; background: var(--surface-2); border-radius: 16px; display: flex; flex-direction: column; gap: 6px; min-height: 190px; }
.l-slide-ic { font-size: 44px; line-height: 1; margin-bottom: 4px; }
.l-step { font-size: .72em; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.l-slide h3 { font-size: 1.2em; }
.l-slide p:not(.l-step) { color: var(--ink-2); line-height: 1.5; }
.l-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 10px; }
.t-round { appearance: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2, var(--line)); background: var(--surface); font-size: 1.5em; line-height: 1; color: var(--ink); cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; }
.t-round:hover { border-color: var(--ink-3); }
.l-dots { display: flex; gap: 2px; }
.l-dots button { appearance: none; width: 28px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.l-dots button::before { content: ""; width: 9px; height: 9px; border-radius: 99px; background: var(--line-2, var(--line)); transition: width .2s, background .2s; }
.l-dots button[aria-current="true"]::before { width: 22px; background: var(--accent); }
.l-teamlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.l-team { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 650; animation: l-pop .4s var(--spring, ease) both; }
.l-team .avatar { --size: 34px; }
.l-team.is-me { background: var(--accent-bg); border-color: var(--accent); }
.l-team small { color: var(--ink-3); font-weight: 600; }
@keyframes l-pop { from { transform: scale(.6); opacity: 0; } }
.l-leave { text-align: center; }
.l-leave .btn { font-size: .85em; }
.l-confirm { text-align: left; display: flex; flex-direction: column; gap: 10px; }

/* ================================================================== BUILD */
.b-intro h1 { font-size: clamp(1.45em, 3vw + .8em, 2em); }
.b-intro p { margin-top: 6px; max-width: 70ch; }
.b-jump { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.b-jump::-webkit-scrollbar { display: none; }
.b-jump a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9em; box-shadow: var(--shadow-sm); }
.b-jump a span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: .85em; font-weight: 800; }
.b-jump a#jumpQuiz span { background: var(--cat-geld, #b07a00); color: #fff; }
.b-jump a:hover { border-color: var(--accent); color: var(--ink); }
.b-grid { display: flex; flex-direction: column; gap: 16px; }
.b-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.b-steps { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 980px) {
  .b-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 20px; }
  .b-side { position: sticky; top: 84px; }
  .b-jump { margin: 0; padding: 2px 0; }
}
.b-diagram { width: 100%; min-height: 160px; border-radius: 14px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.b-diagram > svg { display: block; width: 100%; height: auto; }
.b-diag-fallback { padding: 30px; text-align: center; font-weight: 700; }
.b-warns { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.b-warns:empty { display: none; }
.b-step { scroll-margin-top: 140px; }
.b-quiz { scroll-margin-top: 140px; }
.b-step-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.b-step-h h2 { font-size: 1.3em; }
.b-step-h p { color: var(--ink-3); font-size: .92em; margin-top: 2px; }
.b-num { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 850; font-size: 1.05em; background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 10px -4px var(--accent); }
.b-sub { font-weight: 750; font-size: .92em; margin: 16px 0 8px; }

.b-n { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.b-n > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.b-n small { font-size: .84em; }
.b-stepper { display: inline-flex; align-items: center; background: var(--surface); border: 1.5px solid var(--line-2, var(--line)); border-radius: 14px; overflow: hidden; }
.b-stepper button { appearance: none; width: 52px; height: 52px; border: 0; background: transparent; font-size: 1.6em; font-weight: 700; color: var(--accent); cursor: pointer; line-height: 1; }
.b-stepper button:hover:not(:disabled) { background: var(--accent-bg); }
.b-stepper button:disabled { color: var(--ink-3); opacity: .4; cursor: not-allowed; }
.b-stepper output { min-width: 48px; text-align: center; font-size: 1.5em; font-weight: 800; }

.b-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2, var(--line)); flex: none; display: grid; place-items: center; transition: all .15s; }
[aria-pressed="true"] > .b-check, [aria-pressed="true"] .b-size-top .b-check { background: var(--accent); border-color: var(--accent); }
[aria-pressed="true"] > .b-check::after, [aria-pressed="true"] .b-size-top .b-check::after { content: "✓"; color: var(--accent-ink); font-size: 13px; font-weight: 900; }

.b-sizes { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .b-sizes { grid-template-columns: repeat(3, 1fr); } }
.b-size, .b-region { appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer; position: relative;
  background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; transition: border-color .15s, background .15s, transform .12s var(--ease, ease), box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.b-size:hover, .b-region:hover { border-color: var(--ink-3); }
.b-size:active, .b-region:active { transform: scale(.985); }
.b-size[aria-pressed="true"], .b-region[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent-bg) 70%, var(--surface)); box-shadow: 0 6px 18px -10px var(--accent); }
.b-size { display: flex; flex-direction: column; gap: 4px; }
.b-size-top { display: flex; align-items: center; justify-content: space-between; }
.b-size-name { font-size: 1.25em; font-weight: 850; letter-spacing: -.02em; }
.b-size-spec { font-size: .8em; color: var(--ink-3); margin-bottom: 4px; }
.b-size-row { display: flex; gap: 8px; align-items: baseline; font-size: .92em; }
.b-size-ic { width: 1.2em; text-align: center; }
.b-size-plain { font-size: .8em; color: var(--ink-3); line-height: 1.4; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
@media (max-width: 559px) {
  .b-size { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "top top top" "spec spec spec" "cap price price" "plain plain plain"; gap: 2px 14px; }
  .b-size-top { grid-area: top; } .b-size-spec { grid-area: spec; }
  .b-size-row:nth-of-type(3) { grid-area: cap; }
  .b-size-row:nth-of-type(4) { grid-area: price; }
  .b-size-plain { grid-area: plain; }
}

.b-regions { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .b-regions { grid-template-columns: 1fr 1fr; } }
.b-region { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; }
.b-flag { font-size: 2em; line-height: 1; min-width: 1.3em; text-align: center; font-weight: 800; color: var(--ink-2); }
.b-region-txt { display: flex; flex-direction: column; min-width: 0; }
.b-region-txt b { font-size: 1.08em; }
.b-region-txt small { color: var(--ink-3); font-size: .8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.b-tag { font-size: .74em; font-weight: 650; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.b-tag.is-down { background: var(--good-bg); color: var(--good); }
.b-tag.is-up { background: var(--bad-bg); color: var(--bad); }
.b-tag.is-warn { background: var(--warn-bg); color: var(--warn); }
.b-region-plain { grid-column: 1 / -1; font-size: .8em; color: var(--ink-3); line-height: 1.4; margin-top: 4px; }
.b-fee-hint { margin-top: 10px; font-size: .85em; color: var(--ink-3); }
.b-fee-hint.is-active { color: var(--warn); background: var(--warn-bg); padding: 8px 12px; border-radius: 12px; font-weight: 600; }

.b-zones { margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.b-zones-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.b-seg { width: 100%; display: flex; }
.b-seg > button { flex: 1 1 0; min-height: 44px; }
.b-seg > button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.b-zones-plain { font-size: .88em; color: var(--ink-2); line-height: 1.5; }
.b-zones-why { font-size: .84em; color: var(--ink-3); line-height: 1.5; }

.b-group + .b-group { margin-top: 18px; }
.b-group-h { font-size: .8em; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.b-opts { display: grid; grid-template-columns: 1fr; gap: 10px; }
.b-opt { position: relative; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .15s, background .15s; }
.b-opt:has(.b-opt-main[aria-pressed="true"]) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-bg) 60%, var(--surface)); }
.b-opt-main { appearance: none; font: inherit; color: inherit; width: 100%; text-align: left; cursor: pointer; background: transparent; border: 0; border-radius: 14px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 56px 12px 12px; min-height: 64px; -webkit-tap-highlight-color: transparent; }
.b-opt-main:active { transform: scale(.99); }
.b-opt-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4em; background: var(--surface-2); }
.b-opt-main[aria-pressed="true"] .b-opt-ic { background: var(--surface); }
.b-opt-txt { display: flex; flex-direction: column; min-width: 0; }
.b-opt-txt b { font-size: 1em; }
.b-opt-txt small { font-size: .82em; color: var(--ink-3); line-height: 1.35; }
.b-opt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.b-opt-price { align-self: flex-start; margin-top: 4px; font-size: .74em; font-weight: 750; color: var(--ink-2); background: var(--surface-3); padding: 2px 8px; border-radius: 99px; }
.b-opt-main[aria-pressed="true"] .b-opt-price { background: var(--surface); color: var(--accent); }
.b-switch { width: 44px; height: 26px; border-radius: 99px; background: var(--line-2, var(--line)); position: relative; transition: background .2s; }
.b-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--spring, ease); }
.b-opt-main[aria-pressed="true"] .b-switch { background: var(--accent); }
.b-opt-main[aria-pressed="true"] .b-switch i { transform: translateX(18px); }
.b-opt-state { font-size: .68em; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.b-opt-main[aria-pressed="true"] .b-opt-state { color: var(--accent); }
.b-opt-info { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); appearance: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--info); font-size: 1.35em; cursor: pointer; display: grid; place-items: center; }
.b-opt.is-open .b-opt-info { top: 10px; transform: none; background: var(--info-bg); }
.b-opt-info:hover { background: var(--info-bg); }
.b-opt-more { padding: 0 14px 14px; font-size: .9em; color: var(--ink-2); line-height: 1.5; display: flex; flex-direction: column; gap: 6px; animation: t-in .25s ease both; }
.b-opt-more p:first-child { padding-top: 10px; border-top: 1px dashed var(--line); }
.b-theory { font-size: .9em; color: var(--info); font-weight: 650; }
/* the switch sits under the absolutely positioned ⓘ: give it its own column */
.b-opt-main { padding-right: 52px; }

/* quiz */
.b-quiz { border: 2px solid color-mix(in srgb, var(--cat-geld, #b07a00) 55%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--cat-geld, #b07a00) 10%, var(--surface)), var(--surface) 60%); }
.b-quiz.is-done { border-color: var(--line); }
.q-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.q-badge { font-weight: 850; font-size: .8em; text-transform: uppercase; letter-spacing: .1em; color: var(--cat-geld, #b07a00); }
.q-prize { font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--good-bg); color: var(--good); font-size: .9em; }
.q-q { font-size: 1.12em; font-weight: 750; line-height: 1.35; margin-bottom: 14px; letter-spacing: -.01em; }
.q-answers { display: grid; grid-template-columns: 1fr; gap: 8px; }
.q-ans { appearance: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 10px 14px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px; font-weight: 600; line-height: 1.3; transition: border-color .15s, background .15s, transform .12s; }
.q-ans:hover:not(:disabled) { border-color: var(--ink-3); }
.q-ans:active:not(:disabled) { transform: scale(.985); }
.q-ans.is-sel { border-color: var(--cat-geld, #b07a00); background: color-mix(in srgb, var(--cat-geld, #b07a00) 12%, var(--surface)); }
.q-ans:disabled { cursor: default; }
.q-ans:disabled:not(.is-sel) { opacity: .5; }
.q-l { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 850; background: var(--surface-3); color: var(--ink-2); font-size: .9em; }
.q-ans.is-sel .q-l { background: var(--cat-geld, #b07a00); color: #fff; }
.q-confirm { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.q-done { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--good-bg); color: var(--good); font-weight: 700; }
.q-tip { margin-top: 10px; font-size: .86em; }

/* sticky bottom bar */
.t-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(15, 27, 45, .25); }
.t-bar-in { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "bill cap" "ready ready"; gap: 8px; }
.t-bar-kpi { appearance: none; font: inherit; color: inherit; text-align: left; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 6px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-height: 44px; }
button.t-bar-kpi { cursor: pointer; }
button.t-bar-kpi:hover { border-color: var(--ink-3); }
#barBill { grid-area: bill; }
.t-bar-cap { grid-area: cap; }
.t-bar-kpi small { font-size: .66em; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.t-bar-kpi small span { color: var(--accent); font-size: 1.3em; }
.t-bar-kpi b { font-size: 1.12em; font-weight: 800; white-space: nowrap; transition: opacity .2s; }
.t-unit { font-size: .7em; font-weight: 650; color: var(--ink-3); margin-left: 2px; }
.t-capline { font-size: .7em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-bar-cap[data-tone="good"] .t-capline { color: var(--good); }
.t-bar-cap[data-tone="warn"] .t-capline { color: var(--warn); }
.t-bar-cap[data-tone="bad"] { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.t-bar-cap[data-tone="bad"] .t-capline, .t-bar-cap[data-tone="bad"] b { color: var(--bad); }
.t-bar.is-syncing .t-bar-kpi b { opacity: .55; }
.t-ready { grid-area: ready; min-height: 52px; flex-direction: column; gap: 0; border-radius: 14px; font-size: 1.05em; line-height: 1.1; }
.t-ready .t-ready-l1 { font-weight: 850; font-size: 1.1em; }
.t-ready .t-ready-l2 { font-size: .68em; font-weight: 600; opacity: .85; }
.t-ready.is-ready { --b-bg: var(--good-bg); --b-ink: var(--good); --b-line: var(--good); background: var(--good-bg); color: var(--good); border: 2px solid var(--good); }
.t-ready.is-ready:hover { background: var(--good-bg); color: var(--good); }
@media (min-width: 720px) {
  .t-bar { padding: 10px 24px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .t-bar-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 1.1fr); grid-template-areas: "bill cap ready"; gap: 10px; }
  .t-team[data-phase="build"] { padding-bottom: 100px; }
}
.t-team[data-phase="build"] .toast-wrap { bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 768px) { .t-team[data-phase="build"] .toast-wrap { bottom: auto; } }

/* ================================================================== EVENT */
#vEvent, #vResults, #vEnd { max-width: 820px; margin: 0 auto; width: 100%; }
.e-kick { text-align: center; }
.e-stage { perspective: 1600px; }
.e-flip { position: relative; transform-style: preserve-3d; }
.e-flip.is-anim { transform: rotateY(180deg); transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.e-flip.is-anim.is-open { transform: rotateY(0deg); }
.e-back, .e-card { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.e-back { position: absolute; inset: 0; transform: rotateY(180deg); border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px), linear-gradient(135deg, var(--accent-brand, #009C82), var(--sky, #2f7fd8)); }
.e-back span { font-size: 80px; }
.e-back b { font-size: 1.4em; letter-spacing: .04em; }
.e-flip:not(.is-anim) .e-back { display: none; }
.e-card { --cc: var(--cat-vraag); border-radius: 24px; overflow: hidden; background: var(--surface); border: 3px solid var(--cc); box-shadow: var(--shadow-lg, var(--shadow)); }
.e-head { background: var(--cc); color: #fff; padding: 20px 20px 18px; display: flex; gap: 16px; align-items: center; }
.e-ic { font-size: 3.2em; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.e-flip.is-open .e-ic { animation: e-pop .6s .7s var(--spring, ease) both; }
@keyframes e-pop { from { transform: scale(.3) rotate(-20deg); } }
.e-cat { font-size: .74em; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; opacity: .9; }
.e-head h2 { color: #fff; font-size: clamp(1.4em, 4vw + .5em, 2em); }
:root[data-theme="dark"] .e-head, :root[data-theme="dark"] .e-head h2 { color: #0a1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .e-head, :root:not([data-theme="light"]) .e-head h2 { color: #0a1220; } }
.e-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.e-flavor { font-size: 1.1em; line-height: 1.5; }
.e-h { font-size: .74em; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-top: 4px; }
.e-effects { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); line-height: 1.45; }
.e-lesson { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--accent-bg); border-left: 5px solid var(--accent); line-height: 1.5; }
.e-lesson b { color: var(--accent); display: block; margin-bottom: 2px; }
.e-slide { display: inline-block; font-size: .82em; color: var(--ink-3); font-weight: 650; }
.e-impact { list-style: none; padding: 0; margin: 12px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.e-imp { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 14px; font-weight: 650; line-height: 1.35; }
.e-imp-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; }
.e-imp.is-ok { background: var(--good-bg); color: var(--good); } .e-imp.is-ok .e-imp-ic { background: var(--good); color: var(--surface); }
.e-imp.is-bad { background: var(--warn-bg); color: var(--warn); } .e-imp.is-bad .e-imp-ic { background: var(--warn); color: var(--surface); }
.e-imp.is-info { background: var(--info-bg); color: var(--info); } .e-imp.is-info .e-imp-ic { background: var(--info); color: var(--surface); }
.e-imp > span:last-child { color: var(--ink); }
.e-small { font-size: .82em; }
.e-lock { text-align: center; color: var(--ink-3); font-weight: 650; padding: 8px 0 16px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.e-you h2, .e-diagcard h2 { font-size: 1.2em; }

/* ================================================================== RESULTS */
.r-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; overflow: hidden; }
.r-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--good); }
.r-hero.is-loss::before { background: var(--bad); }
.r-h { font-size: 1.1em; color: var(--ink-2); font-weight: 750; letter-spacing: 0; margin-top: 4px; }
.r-profit { font-size: clamp(2.6em, 10vw, 4em); font-weight: 800; line-height: 1.05; letter-spacing: -.04em; color: var(--good); }
.r-profit.neg { color: var(--bad); }
.r-hero-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }
.r-hero-row > div { flex: 1 1 0; min-width: 90px; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; }
.r-hero-row small { font-size: .68em; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.r-hero-row b { font-size: 1.25em; font-weight: 800; }
.r-of { font-size: .6em; color: var(--ink-3); font-weight: 650; }
.r-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 640px) { .r-kpis { grid-template-columns: repeat(4, 1fr); } }
.r-kpi { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card .r-kpi { background: var(--surface-2); box-shadow: none; }
.r-kpi small { font-size: .68em; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.r-kpi b { font-size: 1.2em; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-kpi span { font-size: .74em; color: var(--ink-3); }
.r-kpi.pos b { color: var(--good); } .r-kpi.neg b { color: var(--bad); }
.r-lines { list-style: none; padding: 0; margin: 12px 0 0; }
.r-line { padding: 10px 0; border-bottom: 1px solid var(--line); }
.r-line-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 650; }
.r-line-top b { white-space: nowrap; }
.r-why { font-size: .84em; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.r-total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: -1px; }
.r-total .r-line-top { font-size: 1.1em; font-weight: 800; }
.r-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.r-notes .note { padding: 5px 10px 5px 32px; font-size: .84em; border-radius: 999px; border-left-width: 1px; }
.r-notes .note::before { left: 7px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; font-size: 10px; }
.r-sub { font-size: .8em; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 14px 0 8px; }
.r-hhcard h2 + .r-sub { margin-top: 10px; }
.r-hhlist { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.r-hh { padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .92em; }
.r-hh.is-ok { background: var(--good-bg); color: var(--good); }
.r-hh.is-bad { background: var(--warn-bg); color: var(--warn); }
.r-small { font-size: .82em; margin-top: 10px; }
.r-quiz .q-q { margin: 8px 0 12px; }
.r-qa { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.r-qa li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 2px solid transparent; font-weight: 550; }
.r-qa li small { font-weight: 750; color: var(--ink-3); }
.r-qa li.is-correct { border-color: var(--good); background: var(--good-bg); }
.r-qa li.is-correct .q-l { background: var(--good); color: var(--surface); }
.r-qa li.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.r-qa li.is-wrong .q-l { background: var(--bad); color: var(--surface); }
.r-explain { margin-top: 10px; line-height: 1.5; color: var(--ink-2); }
.r-board { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.r-row { display: grid; grid-template-columns: 28px 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 14px; background: var(--surface-2); }
.r-row .avatar { --size: 32px; }
.r-row.is-me { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--accent); }
.r-rk { font-weight: 800; text-align: center; color: var(--ink-3); }
.r-row:nth-child(1) .r-rk { color: var(--cat-geld, #b07a00); }
.r-nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-nm small { color: var(--ink-3); font-weight: 600; }
.r-pf { font-size: .82em; font-weight: 700; }
.r-cs { font-weight: 800; text-align: right; }
@media (max-width: 400px) { .r-row { grid-template-columns: 22px 32px minmax(0, 1fr) auto; } .r-pf { display: none; } }

/* ================================================================== END */
.end-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 28px; }
.end-medal { font-size: 96px; line-height: 1; filter: drop-shadow(0 10px 20px rgba(0,0,0,.2)); animation: end-drop .9s var(--spring, ease) both; }
.end-medal.is-podium { font-size: 120px; }
@keyframes end-drop { from { transform: translateY(-60px) scale(.4) rotate(-30deg); opacity: 0; } }
.end-rank { font-size: clamp(2.2em, 8vw, 3.2em); }
.end-cheer { font-size: 1.15em; font-weight: 700; color: var(--accent); }
.end-cash { display: flex; flex-direction: column; margin-top: 8px; }
.end-cash small { font-size: .7em; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.end-cash b { font-size: 2.2em; font-weight: 800; }
.end-spark { margin: 16px 0 0; }
.end-spark svg { width: 100%; height: 90px; display: block; overflow: visible; }
.end-line { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.end-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.end-zero { stroke: var(--bad); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.end-spark figcaption { font-size: .82em; margin-top: 6px; }
.end-lessons { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }
.end-lesson { display: flex; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.end-lic { font-size: 1.8em; line-height: 1; }
.end-lesson p { color: var(--ink-2); line-height: 1.5; margin: 2px 0 4px; font-size: .94em; }
.end-lesson small { color: var(--ink-3); font-weight: 650; }
#vEnd .card h2, #vResults .card h2 { margin-bottom: 12px; }
@media (max-width: 480px) { .r-nm small { display: none; } }

/* ================================================================== SHEETS */
.t-sheet-bd { z-index: 80; }
.modal.t-sheet { padding: 0; display: flex; flex-direction: column; max-height: min(86vh, 760px); width: min(100%, 560px); overflow: hidden; }
.t-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.t-sheet-head h2 { font-size: 1.2em; margin: 0; }
.t-sheet-body { padding: 16px 20px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .t-sheet-bd.modal-backdrop { align-items: flex-end; padding: 0; }
  .modal.t-sheet { width: 100%; max-width: none; border-radius: 22px 22px 0 0; max-height: 88vh; animation: t-up .28s var(--ease, ease) both; }
}
@keyframes t-up { from { transform: translateY(40px); opacity: 0; } }
body.has-sheet { overflow: hidden; }
.bill { list-style: none; padding: 0; margin: 0; }
.bill li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.bill li b { white-space: nowrap; }
.bill .bill-total { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--ink); font-size: 1.08em; }
.bill .is-fee { color: var(--warn); font-weight: 650; }
.bill-h { font-size: .78em; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 18px 0 2px; }
.bill-small { font-size: .84em; margin-top: 8px; line-height: 1.45; }
.t-sheet-body .note { margin-top: 10px; }
.gl-search input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink); background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px; }
.gl-search input:focus { outline: none; border-color: var(--accent); }
.gl-list { margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.gl-item { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.gl-item dt { font-weight: 800; color: var(--accent); }
.gl-item dd { margin: 2px 0 0; color: var(--ink-2); line-height: 1.45; font-size: .93em; }

.is-offline .t-bar { top: auto; }

@media (prefers-reduced-motion: reduce) {
  .j-sky span, .l-av, .t-dots i, .end-medal, .e-ic, .l-team, .t-view, .t-spinner { animation: none !important; }
  .e-flip.is-anim { transition: none; }
}
.e-outcome { margin-top: 10px; padding: 12px 14px; border-radius: 14px; font-weight: 800; font-size: 1.05em; background: var(--info-bg); color: var(--info); }
.e-outcome.is-good { background: var(--good-bg); color: var(--good); }
.e-outcome.is-warn { background: var(--warn-bg); color: var(--warn); }
.e-outcome.is-bad { background: var(--bad-bg); color: var(--bad); }
.q-confirm .btn { scroll-margin-bottom: 170px; }
