/* El Impostor — game styles (mobile first; uses the tokens from /css/common.css).
   A night-time look: indigo → violet hero, a dark "secret card" you hold to read, cream/white surfaces elsewhere. */
:root {
  --imp-hero: linear-gradient(145deg, #4F46E5 0%, #9333EA 100%);
  --imp-night: radial-gradient(circle at 30% 12%, #3B3486 0%, #1E1B4B 70%);
  --imp-brand: #5B4BEA;
  --imp-ink: #4338CA;                /* indigo that reads on white */
  --imp-red: #DC2626;
  --imp-ok: #15803D;
  --imp-edge: rgba(43, 45, 66, .08);
  --imp-lift: 0 14px 26px -20px rgba(43, 45, 66, .55), 0 3px 8px -4px rgba(43, 45, 66, .16);
  --imp-hi: inset 0 1px 0 rgba(255, 255, 255, .85);
  --imp-glow: 0 18px 30px -14px rgba(79, 70, 229, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --imp-ink: #A5B4FC; --imp-red: #F87171; --imp-ok: #4ADE80; --imp-edge: rgba(255, 255, 255, .1); --imp-lift: 0 14px 26px -18px rgba(0, 0, 0, .75); --imp-hi: inset 0 1px 0 rgba(255, 255, 255, .06); }
}
:root[data-theme="dark"] { --imp-ink: #A5B4FC; --imp-red: #F87171; --imp-ok: #4ADE80; --imp-edge: rgba(255, 255, 255, .1); --imp-lift: 0 14px 26px -18px rgba(0, 0, 0, .75); --imp-hi: inset 0 1px 0 rgba(255, 255, 255, .06); }

.imp-ic { width: 22px; height: 22px; flex: none; }
.imp-app .ndj-avatar--xs { width: 22px; height: 22px; font-size: .68rem; }

/* ------------------------------------------------------------ topbar extras */
.imp-tb { display: inline-flex; gap: 6px; flex: none; }
.imp-tb .ndj-topbar__btn { flex: none; }
.imp-invite-btn { gap: 6px; }
.imp-invite-btn .ndj-ic, .imp-help-btn .imp-ic { width: 20px; height: 20px; }
@media (max-width: 520px) { .imp-invite-btn__txt { display: none; } }

.imp-connecting { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 12vh; }

/* ------------------------------------------------------------ lobby */
.imp-settings .ndj-section-title { margin-bottom: 14px; }
.imp-setting { display: grid; gap: 8px; }
.imp-setting + .imp-setting { margin-top: 16px; }
.imp-setting__label { font: 600 .98rem var(--font-display); color: var(--fg-2); }
.imp-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.imp-seg--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.imp-seg--cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.imp-seg__opt {
  min-height: 48px; padding: 6px 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--card-2); cursor: pointer;
  font: 600 .98rem/1.15 var(--font-display); color: var(--fg); text-align: center; overflow-wrap: anywhere;
  transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
}
.imp-seg__opt:active:not(:disabled) { transform: scale(.97); }
.imp-seg__opt.is-on { background: var(--imp-hero); border-color: transparent; color: #fff; text-shadow: 0 1px 2px rgba(30, 20, 90, .35); box-shadow: 0 8px 16px -8px rgba(79, 70, 229, .65), inset 0 1px 0 rgba(255, 255, 255, .35); }
.imp-seg__opt:disabled { cursor: default; }
.imp-seg__opt:disabled:not(.is-on) { opacity: .6; }
.imp-setting__note { margin-top: 12px; color: var(--fg-2); font-size: .92rem; line-height: 1.35; }
.imp-setting__host { margin-top: 6px; color: var(--fg-2); font-size: .88rem; font-style: italic; }
.imp-setting__host[hidden] { display: none; }
.imp-start { font-size: 1.2rem; min-height: 60px; }
.imp-howbtn { min-height: 54px; font-size: 1.05rem; }
.imp-howbtn .imp-ic { color: var(--imp-ink); }
.imp-lobby__cta.is-sticky {
  position: sticky; z-index: 6; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding: 8px; margin: 0 -8px; border-radius: 24px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.imp-alone { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px;
  background: color-mix(in srgb, var(--imp-brand) 9%, var(--card)); border: 1.5px dashed color-mix(in srgb, var(--imp-brand) 55%, transparent); }
.imp-alone strong { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; }
.imp-alone p { color: var(--fg-2); font-size: .94rem; margin-top: 2px; line-height: 1.35; }
.imp-alone__art { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--imp-hero); color: #fff; box-shadow: var(--imp-glow); }
.imp-alone__art .imp-ic { width: 30px; height: 30px; }

/* ------------------------------------------------------------ help panel + first-time guide */
.imp-modal__box { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 26px; }
.imp-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.imp-modal__head .ndj-modal__title { margin: 0; }
.imp-modal__x { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--imp-edge); background: var(--card-2); color: var(--fg); cursor: pointer; flex: none; }
.imp-modal__x .imp-ic { width: 18px; height: 18px; }
.imp-modal__actions { margin-top: 16px; }
.imp-guide__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.imp-guide__step { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--imp-edge); }
.imp-guide__n { position: absolute; left: -4px; top: -4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--imp-brand); font: 800 .8rem var(--font-display); box-shadow: 0 2px 5px rgba(0, 0, 0, .25); }
.imp-guide__ic { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: #fff; background: var(--imp-hero); box-shadow: var(--imp-glow); }
.imp-guide__ic .imp-ic { width: 28px; height: 28px; }
.imp-guide__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.imp-guide__txt strong { font: 700 1.08rem/1.15 var(--font-display); }
.imp-guide__txt span { font-size: .93rem; line-height: 1.3; color: var(--fg-2); }
.imp-guide__ok { width: 100%; }

/* ------------------------------------------------------------ game: header, timer, score chips */
.imp-game { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin: 0 auto; width: 100%; }
.imp-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 20px; color: #fff; background: var(--imp-hero); box-shadow: var(--imp-glow); }
.imp-head__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.imp-head__round { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.imp-head__cat { font: 700 1.15rem/1.2 var(--font-display); overflow-wrap: anywhere; }
.imp-timer { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 54px; }
.imp-timer[hidden] { display: none; }
.imp-timer__num { font: 700 1.5rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.imp-timer__bar { display: block; width: 54px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.imp-timer__bar i { display: block; height: 100%; background: #fff; transform-origin: left center; transition: transform .25s linear; }
.imp-timer.is-low .imp-timer__num { color: #FFE066; animation: imp-pulse 1s ease-in-out infinite; }
.imp-timer.is-low .imp-timer__bar i { background: #FFE066; }
.imp-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.imp-title { font: 700 clamp(1.45rem, 6.4vw, 1.9rem)/1.12 var(--font-display); text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.imp-lead { text-align: center; color: var(--fg-2); font-size: 1rem; line-height: 1.4; text-wrap: balance; }
.imp-sub { font: 700 1.05rem var(--font-display); color: var(--fg-2); margin-top: 4px; }
.imp-foot { text-align: center; color: var(--fg-2); font-size: .9rem; }
.imp-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--imp-brand) 10%, var(--card)); color: var(--fg); font-size: .95rem; line-height: 1.35; }
.imp-note .imp-ic { color: var(--imp-ink); }
.imp-scores { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.imp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--card); border: 1px solid var(--imp-edge); font-size: .85rem; max-width: 100%; }
.imp-chip.is-me { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--imp-brand) 55%, transparent); }
.imp-chip.is-out { opacity: .5; }
.imp-chip__name { font-weight: 700; max-width: 9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-chip__pts { font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--imp-ink); }

/* ------------------------------------------------------------ the secret card */
.imp-peek {
  position: relative; display: grid; place-items: center; width: 100%; min-height: 230px; padding: 22px 18px; border: 0; border-radius: 26px; cursor: pointer;
  color: #fff; background: var(--imp-night); box-shadow: 0 22px 34px -22px rgba(30, 27, 75, .9), inset 0 1px 0 rgba(255, 255, 255, .12);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; -webkit-tap-highlight-color: transparent;
  transition: transform .15s, background .2s;
}
.imp-peek::before { content: ""; position: absolute; inset: 10px; border-radius: 18px; border: 2px dashed rgba(255, 255, 255, .22); pointer-events: none; }
.imp-peek:active { transform: scale(.985); }
.imp-peek:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.imp-peek__face { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 100%; min-width: 0; }
.imp-peek__icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.imp-peek__icon .imp-ic { width: 32px; height: 32px; }
.imp-peek__title { font: 700 1.25rem/1.2 var(--font-display); text-wrap: balance; }
.imp-peek__hint { font-size: .9rem; color: rgba(255, 255, 255, .78); }
.imp-peek__label { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.imp-peek__word { font: 700 clamp(1.8rem, 9vw, 2.6rem)/1.08 var(--font-display); letter-spacing: .02em; overflow-wrap: anywhere; text-wrap: balance; }
.imp-peek__word--imp { color: #FFD1D1; }
.imp-peek__cat { padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .16); font-weight: 800; font-size: .9rem; }
.imp-peek.is-open { background: radial-gradient(circle at 50% 0%, #6D5BFF 0%, #3B2FB0 75%); }
.imp-peek.is-open.is-imp { background: radial-gradient(circle at 50% 0%, #E0475B 0%, #7A1730 78%); }
.imp-peek--small { min-height: 0; padding: 12px 16px; border-radius: 18px; }
.imp-peek--small::before { inset: 5px; border-radius: 13px; }
.imp-peek--small .imp-peek__face { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
.imp-peek--small .imp-peek__word { font-size: 1.35rem; }
.imp-peek--small .imp-peek__label { display: none; }
.imp-peek--small .imp-peek__icon { width: 34px; height: 34px; }
.imp-peek--small .imp-peek__icon .imp-ic { width: 20px; height: 20px; }
.imp-peek--small .imp-peek__hint { color: #fff; font-weight: 700; font-size: .95rem; }
.imp-ready { min-height: 58px; font-size: 1.1rem; }
.imp-ready__note { text-align: center; font-weight: 800; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.imp-faces { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.imp-face { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--card); border: 1px solid var(--imp-edge); font-size: .86rem; font-weight: 700; opacity: .6; transition: opacity .2s; max-width: 100%; }
.imp-face.is-on { opacity: 1; }
.imp-face__name { max-width: 8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-face__ok { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--imp-ok); color: #fff; }
.imp-face__ok .ndj-ic { width: 12px; height: 12px; }

/* ------------------------------------------------------------ clues */
.imp-peekrow { display: flex; }
.imp-turn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--imp-edge); box-shadow: var(--imp-lift), var(--imp-hi); }
.imp-turn:empty { display: none; }
.imp-turn.is-mine { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; border: 2px solid color-mix(in srgb, var(--imp-brand) 55%, transparent); }
.imp-turn__title { font: 700 1.25rem/1.15 var(--font-display); color: var(--imp-ink); text-align: center; }
.imp-turn__hint { text-align: center; color: var(--fg-2); font-size: .92rem; line-height: 1.35; }
.imp-turn__txt { min-width: 0; font-size: 1rem; line-height: 1.3; }
.imp-clue-form { display: flex; gap: 8px; }
.imp-clue-input { flex: 1; min-width: 0; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card-2); color: var(--fg); font: 700 1.08rem var(--font-body); }
.imp-clue-input:focus { outline: none; border-color: var(--imp-brand); box-shadow: 0 0 0 4px var(--ring); }
.imp-clue-send { flex: none; min-height: 52px; gap: 6px; }
.imp-clue-send .imp-ic { width: 18px; height: 18px; }
@media (max-width: 360px) { .imp-clue-send { padding-inline: 12px; } .imp-clue-send .imp-ic { display: none; } }
.imp-clue-voice { min-height: 50px; }
.imp-clues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.imp-clue { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--imp-edge); }
.imp-clue.is-next { opacity: .55; }
.imp-clue.is-now { border: 2px solid color-mix(in srgb, var(--imp-brand) 60%, transparent); box-shadow: var(--imp-lift); }
.imp-clue.is-me .imp-clue__name::after { content: " ★"; color: var(--imp-ink); }
.imp-clue__main { display: flex; flex-direction: column; min-width: 0; }
.imp-clue__name { font-weight: 800; font-size: .86rem; color: var(--fg-2); }
.imp-clue__text { font: 600 1.12rem/1.2 var(--font-display); overflow-wrap: anywhere; }
.imp-clue__said, .imp-clue__skip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; }
.imp-clue__said { color: var(--imp-ink); }
.imp-clue__skip { color: var(--fg-2); }
.imp-clue__said .imp-ic, .imp-clue__skip .imp-ic { width: 18px; height: 18px; }
.imp-clue__wait { color: var(--fg-2); font-weight: 700; font-size: .92rem; }
.imp-clues__lap { text-align: center; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); padding-top: 6px; }

/* ------------------------------------------------------------ vote */
.imp-vote { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.imp-cand { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-radius: 18px; border: 2px solid var(--imp-edge); background: var(--card); color: var(--fg); text-align: left; cursor: pointer; box-shadow: var(--imp-lift), var(--imp-hi); transition: transform .12s, border-color .15s, background .15s; }
.imp-cand:active:not(:disabled) { transform: scale(.98); }
.imp-cand:disabled { cursor: default; }
.imp-cand.is-self { opacity: .55; box-shadow: none; }
.imp-cand.is-on { border-color: var(--imp-red); background: color-mix(in srgb, var(--imp-red) 9%, var(--card)); }
.imp-cand__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imp-cand__name { display: flex; align-items: center; gap: 6px; font: 600 1.08rem var(--font-display); overflow-wrap: anywhere; }
.imp-cand__said { font-size: .88rem; color: var(--fg-2); overflow-wrap: anywhere; }
.imp-cand__mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--imp-red); color: #fff; animation: imp-pop .25s ease both; }
.imp-cand__mark .imp-ic { width: 20px; height: 20px; }

/* ------------------------------------------------------------ guess */
.imp-caught { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 14px; border-radius: 24px; background: var(--card); box-shadow: var(--imp-lift), var(--imp-hi); }
.imp-caught__ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(145deg, #E0475B, #9F1239); color: #fff; }
.imp-caught__ic .imp-ic { width: 34px; height: 34px; }
.imp-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.imp-opt { min-height: 58px; padding: 8px 10px; border-radius: 16px; border: 2px solid var(--imp-edge); background: var(--card); color: var(--fg); font: 600 1rem/1.15 var(--font-display); overflow-wrap: anywhere; cursor: pointer; box-shadow: var(--imp-lift); }
.imp-opt:active:not(:disabled) { transform: scale(.97); }
.imp-opt.is-on { border-color: var(--imp-brand); background: var(--imp-hero); color: #fff; }
.imp-opt:disabled:not(.is-on) { opacity: .55; }

/* ------------------------------------------------------------ result */
.imp-suspense { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 16px; border-radius: 26px; color: #fff; background: var(--imp-night); text-align: center; font: 700 1.5rem/1.2 var(--font-display); }
.imp-suspense__ic { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(255, 255, 255, .12); animation: imp-wobble .6s ease-in-out infinite alternate; }
.imp-suspense__ic .imp-ic { width: 46px; height: 46px; }
.imp-verdict { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px; border-radius: 26px; color: #fff; text-align: center; background: var(--imp-hero); box-shadow: var(--imp-glow); animation: imp-rise .45s ease both; }
.imp-verdict.is-imp { background: linear-gradient(145deg, #C2334A 0%, #6D28D9 100%); }
.imp-verdict__who { display: flex; gap: 10px; }
.imp-verdict__who .ndj-avatar { box-shadow: 0 0 0 3px #fff, 0 10px 18px -8px rgba(0, 0, 0, .5); }
.imp-verdict__k { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .9; margin-top: 4px; }
.imp-verdict__name { font: 700 1.5rem/1.1 var(--font-display); overflow-wrap: anywhere; }
.imp-verdict__title { font: 700 clamp(1.5rem, 7vw, 2rem)/1.1 var(--font-display); margin-top: 8px; text-wrap: balance; }
.imp-verdict__why { font-size: .98rem; line-height: 1.35; opacity: .95; text-wrap: balance; }
.imp-verdict__why:empty { display: none; }
.imp-verdict__guess { padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .18); font-weight: 800; font-size: .9rem; }
.imp-word { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--imp-edge); box-shadow: var(--imp-lift), var(--imp-hi); }
.imp-word span { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.imp-word strong { font: 700 1.6rem/1.15 var(--font-display); color: var(--imp-ink); overflow-wrap: anywhere; text-align: center; }
.imp-votes__list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.imp-votes__row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--imp-edge); }
.imp-votes__row.is-imp { border-color: color-mix(in srgb, var(--imp-red) 55%, transparent); }
.imp-votes__name { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 800; overflow-wrap: anywhere; }
.imp-votes__by { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; max-width: 45%; }
.imp-votes__n { flex: none; min-width: 22px; text-align: right; font: 700 1.15rem var(--font-display); font-variant-numeric: tabular-nums; }
.imp-tag { padding: 1px 8px; border-radius: 99px; background: var(--imp-red); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.imp-gains { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.imp-gain { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 99px; background: color-mix(in srgb, var(--imp-ok) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--imp-ok) 35%, transparent); font-weight: 800; animation: imp-pop .3s ease both; }
.imp-gain.is-me { box-shadow: inset 0 0 0 1.5px var(--imp-ok); }
.imp-gain__name { max-width: 8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-gain__pts { color: var(--imp-ok); font-family: var(--font-display); }
.imp-next { display: flex; flex-direction: column; gap: 10px; }
.imp-next__row { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--fg-2); font-weight: 800; }
.imp-next__bar { display: block; width: 90px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.imp-next__bar i { display: block; height: 100%; background: var(--imp-brand); transform-origin: left center; transition: transform .25s linear; }
.imp-next__btn { min-height: 56px; }

/* ------------------------------------------------------------ end screen */
.imp-end__hero { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 14px 0; color: #fff; text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, 0) 55%), var(--imp-hero); box-shadow: var(--imp-glow); }
.imp-end__head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.imp-end__trophy { width: 88px; height: 88px; filter: drop-shadow(0 12px 14px rgba(30, 20, 90, .45)); animation: imp-pop .8s cubic-bezier(.2, 1.5, .4, 1) both; }
.imp-end__title { font-size: clamp(1.9rem, 8.4vw, 2.6rem); font-weight: 700; line-height: 1.05; overflow-wrap: anywhere; text-shadow: 0 2px 3px rgba(30, 20, 90, .4); }
.imp-end__sub { padding: 3px 14px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #2B2D42; font-weight: 800; font-size: .92rem; }
.imp-end__sub:empty { display: none; }
.imp-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; max-width: 460px; width: 100%; margin: 26px auto 0; }
.imp-podium__slot { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; animation: imp-rise .5s ease both; }
.imp-podium__slot.is-p1 { animation-delay: .25s; }
.imp-podium__slot.is-p2 { animation-delay: .1s; }
.imp-podium__slot.is-p3 { animation-delay: .4s; }
.imp-podium__slot .ndj-avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 10px 18px -8px rgba(30, 20, 90, .6); }
.imp-podium__slot.is-p1 .ndj-avatar { width: 66px; height: 66px; font-size: 1.7rem; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #FFD43B; }
.imp-podium__name { max-width: 100%; padding: 2px 10px; border-radius: 999px; background: #fff; color: #2B2D42; font-weight: 800; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-podium__step { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 8px; border-radius: 16px 16px 0 0; color: #3B2200; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }
.imp-podium__rank { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1; }
.imp-podium__pts { font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.is-p1 .imp-podium__step { height: 112px; background: linear-gradient(180deg, #FFE066, #FFC21A); }
.is-p2 .imp-podium__step { height: 86px; background: linear-gradient(180deg, #F1F4FA, #C5CEDD); color: #2B2D42; }
.is-p3 .imp-podium__step { height: 68px; background: linear-gradient(180deg, #FFC08E, #E8985F); color: #3A1B06; }
.imp-podium__slot.is-empty { visibility: hidden; }
.imp-podium__slot.is-me .imp-podium__name::after { content: " ★"; color: var(--imp-brand); }
.imp-end__card .ndj-section-title { margin-bottom: 12px; }
.imp-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.imp-rank__row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--imp-edge); }
.imp-rank__row.is-first { background: color-mix(in srgb, var(--gold) 16%, var(--card)); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.imp-rank__row.is-me { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--imp-brand) 45%, transparent); }
.imp-rank__row.is-away { opacity: .6; }
.imp-rank__n { flex: none; width: 28px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--fg-2); }
.imp-rank__name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 800; overflow-wrap: anywhere; }
.imp-rank__gone { font-size: .75rem; font-weight: 800; color: var(--fg-2); text-transform: uppercase; letter-spacing: .06em; }
.imp-rank__pts { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.imp-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.imp-awards[hidden], .imp-fam[hidden] { display: none; }
.imp-award { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--imp-edge); box-shadow: var(--imp-lift), var(--imp-hi); }
.imp-award > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.imp-award small { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.imp-award strong { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; overflow-wrap: anywhere; }
.imp-award em { font-style: normal; font-size: .84rem; font-weight: 700; color: var(--fg-2); }
.imp-award__ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.imp-award.is-sly .imp-award__ic { background: linear-gradient(145deg, #E0475B, #9F1239); }
.imp-award.is-eye .imp-award__ic { background: var(--imp-hero); }

/* dark: the hero panels become night blue */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .imp-end__hero { background: radial-gradient(circle at 50% 0%, rgba(147, 51, 234, .25) 0%, rgba(147, 51, 234, 0) 60%), var(--imp-night); box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1); }
  :root:not([data-theme="light"]) .imp-end__title { color: #FFE66D; }
  :root:not([data-theme="light"]) .imp-peek { box-shadow: 0 22px 34px -22px #000, inset 0 0 0 1px rgba(255, 255, 255, .1); }
}
:root[data-theme="dark"] .imp-end__hero { background: radial-gradient(circle at 50% 0%, rgba(147, 51, 234, .25) 0%, rgba(147, 51, 234, 0) 60%), var(--imp-night); box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .imp-end__title { color: #FFE66D; }
:root[data-theme="dark"] .imp-peek { box-shadow: 0 22px 34px -22px #000, inset 0 0 0 1px rgba(255, 255, 255, .1); }

@media (min-width: 700px) {
  .imp-seg--cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .imp-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .imp-peek { min-height: 270px; }
}

@keyframes imp-pulse { 50% { transform: scale(1.12); } }
@keyframes imp-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes imp-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes imp-wobble { from { transform: rotate(-8deg) scale(.96); } to { transform: rotate(8deg) scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  .imp-timer.is-low .imp-timer__num, .imp-cand__mark, .imp-verdict, .imp-gain, .imp-end__trophy, .imp-podium__slot, .imp-suspense__ic { animation: none; }
  .imp-peek, .imp-cand, .imp-timer__bar i, .imp-next__bar i { transition: none; }
}
.imp-scores[hidden] { display: none; }
.imp-seg__seal { margin-left: 6px; font-size: .68rem; padding: 2px 6px; vertical-align: middle; }
