/* Block Runner full-screen game style (Marlon 02.12.): every window is a full screen sheet on phones (no small card with an
   inner scroll bar), one invisible scroll area per window, head on top, buttons at the bottom; long help texts sit behind a
   round (i) (js/vollbild.js). Loaded last. */

/* ---- one scroll area per window, never a visible scroll bar ---- */
.win-body, .res-grid, .sheet > div, .st-lobby, .st-result, .w-pane, .rk-main, .g-grid, .gg-pane { scrollbar-width: none; -ms-overflow-style: none; }
.win-body::-webkit-scrollbar, .res-grid::-webkit-scrollbar, .sheet > div::-webkit-scrollbar, .st-lobby::-webkit-scrollbar, .st-result::-webkit-scrollbar,
.w-pane::-webkit-scrollbar, .rk-main::-webkit-scrollbar, .g-grid::-webkit-scrollbar, .gg-pane::-webkit-scrollbar { display: none; }

/* ---- windows: same full height everywhere, a sensible width on big screens ---- */
.win-box { width: min(720px, 100%); height: min(860px, 100%); max-height: 100%; grid-template-rows: auto minmax(0, 1fr); }
.win-box.gbox, .win-box.rbox { width: min(980px, 100%); }
.win-box.wbox { width: min(720px, 100%); height: min(860px, 100%); }
.win-body { min-height: 0; }
.win-head h2 { min-width: 0; overflow-wrap: anywhere; }
#win-runner .win-body, #win-friends .win-body { display: flex; flex-direction: column; }
#win-runner .critters { max-width: none; }
.wbox .win-body { overflow: auto; display: flex; flex-direction: column; }
.wbox .wv-solo { margin: auto 0; }

/* phones upright and sideways: the window is the screen */
@media (max-width: 640px), (max-height: 520px) and (orientation: landscape) {
  .win { padding: 0; place-items: stretch; background: rgba(5,7,10,.7); }
  .win-box, .win-box.gbox, .win-box.rbox, .win-box.wbox { width: 100%; height: 100%; max-height: none; border-radius: 0; border-width: 0; }
  .win-head { padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); }
  .win-body { padding-bottom: calc(14px + env(safe-area-inset-bottom)); padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }
}

/* ---- round info button + bubble (replaces help paragraphs in menus) ---- */
.vb-hid { display: none !important; }
.vb-i { position: relative; flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; margin-left: 6px; border-radius: 50%; vertical-align: middle;
  border: 1px solid var(--line-2); background: radial-gradient(circle at 35% 30%, rgba(111,231,255,.28), rgba(5,7,10,.55) 70%); color: var(--cyan);
  font: 800 14px/1 Georgia, "Times New Roman", serif; font-style: italic; text-transform: none; letter-spacing: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 10px rgba(0,0,0,.35); }
.vb-i::after { content: ""; position: absolute; inset: -7px; } /* 44 px hit area */
.vb-i[aria-expanded="true"] { border-color: var(--cyan); box-shadow: 0 0 14px rgba(111,231,255,.45); }
.chips > .vb-i { align-self: center; width: 40px; height: 40px; font-size: 18px; margin: 0; }
.vb-pop { position: fixed; z-index: 2147483300; max-width: min(300px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 16px; font: 500 13px/1.45 var(--body); color: var(--silver);
  border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(28,38,52,.97), rgba(12,17,24,.97)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 16px 40px rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: vbPop .14s ease-out; }
@keyframes vbPop { from { opacity: 0; transform: translateY(4px) scale(.97); } }
.vb-next { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; color: var(--silver); }

/* ---- home: compact player card, no help line under RACE ---- */
.me-card small { display: flex; align-items: center; gap: 6px; font-size: 0; white-space: nowrap; }
.me-card small #lgNext { display: none; }
.me-card small b#seasonLeft { font: 700 12px var(--disp); letter-spacing: .04em; color: var(--white); display: inline-flex; align-items: center; gap: 5px; }
.me-card small b#seasonLeft::before { content: ""; width: 14px; height: 14px; flex: none; opacity: .8;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M12 7v5.5l3.5 2' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M12 7v5.5l3.5 2' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.lg-line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 0; }
.me-txt > b { overflow: visible; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }

/* ---- race screen: hint as icons, not a sentence ---- */
.st-hint.vb-ic { display: flex; align-items: center; gap: 14px; white-space: nowrap; width: auto; max-width: none; padding: 6px 14px; font: 700 11px var(--disp); letter-spacing: .06em; text-transform: uppercase; color: var(--silver); }
.st-hint.vb-ic span { display: inline-flex; align-items: center; gap: 6px; }
.st-hint.vb-ic svg { width: 18px; height: 18px; color: var(--cyan); }
@media (orientation: landscape) { .st-hint.vb-ic .vb-rot { display: none; } }

/* ---- game over: full screen on phones, names never cut, buttons always fit ---- */
.places li { grid-template-columns: 26px 34px minmax(0, 1fr) auto auto; column-gap: 8px; }
.places .pn { display: grid; overflow: visible; white-space: normal; text-overflow: clip; line-height: 1.15; }
.places .pn b { overflow-wrap: anywhere; }
.places .pn .muted.small { font-size: 11.5px; white-space: nowrap; }
.places .pz { min-width: 0; }
.places .pz small { white-space: nowrap; }
.res-btns .play-again { min-width: 0; overflow: hidden; }
.res-btns .play-again .pa-t { display: grid; justify-items: start; gap: 2px; min-width: 0; line-height: 1.05; }
.res-btns .play-again .pa-t > span { white-space: nowrap; }
.res-btns .play-again small { white-space: nowrap; font-size: 11px; }
.res-win { flex-wrap: nowrap; }
.res-win .rw-s { min-width: 0; }
.res-win .rw-s.vb-short { display: inline-flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.res-win .rw-s.vb-short .vb-i { margin-left: 2px; }
@media (max-width: 420px) { .res-win .btn-primary { padding: 0 14px; font-size: 12px; letter-spacing: .03em; } }
.res-win .btn-primary { flex: none; white-space: nowrap; }

@media (max-width: 640px), (orientation: portrait) and (max-width: 1024px) {
  .st-result { inset: 0; left: 0; top: 0; transform: none; width: 100%; height: 100%; max-height: none; border-radius: 0; border-width: 0;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .st-result .res-grid { align-content: safe center; padding: 14px 14px 8px; gap: 8px; }
  .res-main, .res-side { gap: 8px; }
  .res-main .promo { padding: 6px 10px; font-size: 13px; }
  .res-main .res-pts { padding: 6px 10px; }
  .res-xp { margin-top: 0; } .res-xp .lg-bar { margin: 4px 0 2px; }
  .res-main .drop-card { padding: 6px 10px; gap: 10px; } .res-main .drop-card img { width: 40px; height: 40px; }
  .res-main > p.muted.small { margin: 0; font-size: 11.5px; line-height: 1.35; }
  .res-head { gap: 12px; }
  .res-head h2 { font-size: clamp(24px, 8.4vw, 34px); }
  .places li { padding: 3px 8px; min-height: 44px; }
  .res-btns { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
  .res-btns .play-again { font-size: clamp(12px, 3.6vw, 14px); letter-spacing: .03em; padding: 0 12px; gap: 8px; flex: 1 1 0; }
  .res-ic, .res-ic.sq { width: 50px; min-width: 50px; min-height: 52px; padding: 0; flex: none; }
}
@media (max-width: 380px) {
  .res-btns .play-again > i[data-ic] { display: none; }
  .res-ic, .res-ic.sq { width: 46px; min-width: 46px; }
  .places li { column-gap: 6px; padding: 4px 6px; } .places img { width: 28px; height: 28px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .st-result { inset: 0; left: 0; top: 0; transform: none; width: 100%; height: 100%; max-height: none; border-radius: 0; border-width: 0;
    padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
@media (min-width: 641px) and (min-height: 521px) and (orientation: landscape) {
  .st-result { max-height: min(820px, calc(100dvh - 24px)); }
}

/* lobby + wait strip: full width on phones */
@media (max-width: 640px) {
  .st-lobby { width: calc(100% - 20px); }
}

/* ---- toast/sheet: short, bottom, never covering the menu for long ---- */
.sheet > div { overflow-wrap: anywhere; }
@media (max-width: 640px) and (max-height: 780px) { .res-main .drop-card .muted, .res-main .drop-card br:first-of-type { display: none; } .res-head .medal { width: 50px; height: 50px; } }
@media (max-height: 520px) and (orientation: landscape) {
  .res-main .promo { padding: 3px 10px; font-size: 12px; }
  .res-xp > .muted.small { display: none; }
  .res-main > p.muted.small { margin: 0; font-size: 11px; line-height: 1.3; }
  .res-main .drop-card img { width: 34px; height: 34px; }
}
/* tablets upright: the game over fills the screen, bigger type */
@media (orientation: portrait) and (min-width: 641px) and (max-width: 1024px) {
  .st-result .res-grid { grid-template-columns: 1fr; width: min(640px, 100%); margin: 0 auto; padding: 28px 24px 12px; gap: 14px; }
  .res-btns { padding: 14px max(24px, calc((100% - 640px) / 2)) calc(18px + env(safe-area-inset-bottom)); }
  .places li { min-height: 54px; } .places img { width: 40px; height: 40px; }
  .res-ic { width: auto; min-width: 56px; min-height: 56px; padding: 0 18px; } .res-ic.sq { width: 56px; padding: 0; } .res-ic span { display: inline; }
  .res-btns .play-again { min-height: 56px; font-size: 16px; }
}

/* today's goals: full words, never «Overtake 5 tim…» */
.goal .gt b { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@media (min-width: 641px) { .me-card, .goals { width: min(560px, 100%); } }
/* the bubble closes with its own ×; rich bubbles (Credits: where an entry goes) show mini bars */
.vb-pop { padding-right: 42px; }
.vb-x { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(5,7,10,.55); color: var(--silver); font: 600 18px/1 var(--body); cursor: pointer; }
.vb-x::after { content: ""; position: absolute; inset: -8px; }
.vb-rich { width: min(372px, calc(100vw - 24px)); padding: 10px 12px 10px; }
.vb-rich .sp-h { display: block; margin: 4px 36px 8px 2px; font: 700 11px var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--white); }
.sp-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sp-h + .sp-g::before { content: none; }
.sp-r { min-width: 0; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; grid-template-areas: "i l v" "e e e"; align-items: center; column-gap: 6px; row-gap: 4px; padding: 6px 8px 7px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.sp-r i { grid-area: i; width: 14px; height: 14px; color: var(--cyan); } .sp-r i svg { width: 100%; height: 100%; display: block; }
.sp-r span { grid-area: l; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 11.5px var(--body); color: var(--white); }
.sp-r small { margin-left: 5px; font-size: 10px; color: var(--muted); }
.sp-r em { grid-area: e; position: relative; height: 5px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.08); }
.sp-r em::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1.25%); border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--cyan)); }
.sp-r > b { grid-area: v; font: 800 11px var(--disp); color: var(--white); text-align: right; white-space: nowrap; }
.sp-r:first-child { grid-column: 1 / -1; } .sp-r:first-child i, .sp-r:first-child > b { color: #ffc94a; } .sp-r:first-child em::before { background: linear-gradient(90deg, #e3a336, #ffd36a); }
