/* DailyPlay system layer (design pass, docs/specs/design-pass-plan.md §4–§5).
   Loaded after game-system.css on every page. Every rule is scoped under body.site-v2, which src/render.js adds on every
   path except /krillion/* (until Wave 2). Each wave has its own extra body class so it can ship or roll back alone:
     body.site-v2            tokens only (no visible change on their own)
     body.site-v2.v2-type    Wave 1a  tokens, type roles, links, text >= 12, legacy navy removal (findings 1,2,5-7,13,17,18)
     body.site-v2.v2-layout  Wave 1b  composition, header rhythm, alignment (findings 8,11,12,15,16)
     body.site-v2.v2-ui      Wave 1c  components, touch targets, states (findings 3,4,9,10,14)
   Out of scope (left alone): arena interiors (.arcade-board), the focus routes (body.focus-layout main), the Rarebit roll hero
   (.rarebit). Main-content rules therefore start with ":not(.focus-layout) main" and skip .arcade-board / .hub-feature. */

/* ───────────────────────── Tokens ───────────────────────── */
body.site-v2{
 --ink:#171819;--muted:#60616b;--line:#dedee3;--tint:#f0f3f1;--link:#087d36;--action:#19d365;--focus:#087d36;
 --field-line:#898991;--error:#b42318;--blue:var(--link);--scrim:rgba(23,24,25,.44);--grabber:#c4c5ca;
 --t-page:50px;--t-game:40px;--t-section:28px;--t-sub:20px;--t-lead:18px;
 --gap-section:56px;--edge:80px}
@media (max-width:700px){body.site-v2{--t-page:34px;--t-game:28px;--t-section:24px;--t-sub:18px;--t-lead:16px;--gap-section:40px;--edge:20px}}

/* ═════════════════════ Wave 1a · type, links, small text, legacy colour (body.v2-type) ═════════════════════ */

/* Page title (H1): platform, reading and tool pages. */
body.site-v2.v2-type:not(.focus-layout) main h1:where(:not(.arcade-board h1)){font-family:system-ui,sans-serif;font-size:var(--t-page);line-height:1.15;font-weight:700;letter-spacing:-.035em;text-wrap:balance}
/* Game title (H1): game stage pages, kept smaller so Start stays in the first viewport. */
body.site-v2.v2-type:not(.focus-layout) main :is(.game-heading,.stage-head) h1{font-size:var(--t-game);line-height:1.15}
body.site-v2.v2-type:not(.focus-layout) main .page-intro h1>span{font-size:var(--t-lead);line-height:1.6;letter-spacing:0;font-weight:400}

/* Section (H2) and sub (H3). On phone game pages the H2 drops to 22 so it stays below the 28 px H1. */
body.site-v2.v2-type:not(.focus-layout) main h2:where(:not(.arcade-board h2,.rarebit h2)){font-size:var(--t-section);line-height:1.3;font-weight:700;letter-spacing:-.02em;text-wrap:balance}
body.site-v2.v2-type:not(.focus-layout) main h3:where(:not(.arcade-board h3,.rarebit h3)){font-size:var(--t-sub);line-height:1.4;font-weight:700;letter-spacing:-.01em}
/* Card titles use the sub role, not the section role. */
body.site-v2.v2-type:not(.focus-layout) main :is(.guide-index,.archive-list,.room-lobby,.plan-options,.check-result) h2,
body.site-v2.v2-type:not(.focus-layout) main .game-directory h3{font-size:var(--t-sub);line-height:1.4;letter-spacing:-.01em}
@media (max-width:700px){body.site-v2.v2-type:not(.focus-layout) main .page-wrap:has(>.stage-head) h2:where(:not(.arcade-board h2,.rarebit h2)){font-size:22px}}

/* Lead: the line under the H1. */
body.site-v2.v2-type:not(.focus-layout) main :is(.page-intro>p,.game-heading p,.daily-heading p:not(.hub-date)){font-size:var(--t-lead);line-height:1.6;color:var(--muted)}

/* Body: all prose is 16/1.65 ink. */
body.site-v2.v2-type:not(.focus-layout) main :is(.editorial,.article-bottom,.game-help,.hub-help,.faq-list) :is(p,li,dd):where(:not(.arcade-board *,.rarebit *,.hub-feature *)),
body.site-v2.v2-type:not(.focus-layout) main .page-wrap>p{font-size:16px;line-height:1.65;color:var(--ink)}
body.site-v2.v2-type:not(.focus-layout) main .game-help{line-height:1.65}
/* Prose that sat in the meta/small look outside any card (fine-print paragraphs on the page, in help sections and in
   card-less tool forms) is body copy too. Inside a visible card, paragraphs take the card-text role (small, muted allowed). */
body.site-v2.v2-type:not(.focus-layout) main :is(.page-wrap,.game-help,.checker-form)>p.fineprint:where(:not(.arcade-board *,.rarebit *)),
body.site-v2.v2-type:not(.focus-layout) main #poople-solver-note{font-size:16px;line-height:1.65;color:var(--ink)}
body.site-v2.v2-type:not(.focus-layout) main .rarebit-best .rb-best-empty{font-size:14px;line-height:1.5}

/* FAQ rows: the question is body size at 650 (below the 28 px section H2), in a 56 px row; the answer is body copy. */
body.site-v2.v2-type:not(.focus-layout) main .faq-list summary{font-size:16px;line-height:1.5;font-weight:650;color:var(--ink);min-height:44px;padding:16px 0}
@media (hover:hover){body.site-v2.v2-type:not(.focus-layout) main .faq-list summary:hover{color:var(--link)}}

/* Small: supporting text on cards, help text, captions. */
body.site-v2.v2-type:not(.focus-layout) main :is(.game-directory p,.guide-index p,.guide-groups li p,.archive-list p,.section-heading p,.room-lobby small,figcaption,caption,.field-help){font-size:14px;line-height:1.5;color:var(--muted)}
body.site-v2.v2-type:not(.focus-layout) main table:where(:not(.arcade-board table)){font-size:14px}

/* Meta: breadcrumbs, provenance/source lines, dates, footer fine print. Nothing smaller than 12. */
body.site-v2.v2-type .breadcrumbs,
body.site-v2.v2-type:not(.focus-layout) main :is(.fineprint,.source-line,.editorial-source,.guide-index span,.directory-category,.archive-list time,.archive-list>a>span,.hub-date,.prompt-meta):where(:not(.arcade-board *,.rarebit *)),
body.site-v2.v2-type footer :is(.fineprint,.footer-top p,.text-button){font-size:13px;line-height:1.5;color:var(--muted)}
body.site-v2.v2-type:not(.focus-layout) main .subnav{font-size:14px}
body.site-v2.v2-type footer .footer-links{font-size:13px}

/* Links. Inline (classless a in prose): link green, underlined. Standalone link rows read as links too. */
body.site-v2.v2-type:not(.focus-layout) main :is(p,li,td,th,dd,figcaption,.editorial-source) a:is(:not([class]),[class=""]):where(:not(.arcade-board *,.hub-feature *,.rarebit *)),
body.site-v2.v2-type:not(.focus-layout) main :is(.related-game-links,.quick-links,.story-links,.link-list,.related) a:not(.button),
body.site-v2.v2-type footer .fineprint a{color:var(--link);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
@media (hover:hover){body.site-v2.v2-type:not(.focus-layout) main :is(p,li,td,th,dd,figcaption,.editorial-source) a:is(:not([class]),[class=""]):where(:not(.arcade-board *,.hub-feature *,.rarebit *)):hover,
body.site-v2.v2-type:not(.focus-layout) main :is(.related-game-links,.quick-links,.story-links,.link-list,.related) a:not(.button):hover,
body.site-v2.v2-type footer .fineprint a:hover{color:var(--link);text-decoration-thickness:2px}}
/* A link that is a heading's whole text (game names on /games-like-krillion/) keeps the heading's ink and shows an underline. */
body.site-v2.v2-type:not(.focus-layout) main :is(h2,h3)>a:is(:not([class]),[class=""]):only-child:where(:not(.arcade-board *,.hub-feature *,.rarebit *)){color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
@media (hover:hover){body.site-v2.v2-type:not(.focus-layout) main :is(h2,h3)>a:is(:not([class]),[class=""]):only-child:where(:not(.arcade-board *,.hub-feature *,.rarebit *)):hover{color:var(--link);text-decoration-thickness:2px}}

/* Legacy navy (#172643, #506079, #536079, #93a5bd, #cbd5e4, #d9dfeb, #bcc9dd) → ink / muted / line. */
body.site-v2.v2-type:not(.focus-layout) main :is(.game-directory a,.archive-list strong,.room-list-item,.room-scores li,.room-scores li strong):where(:not(.arcade-board *)){color:var(--ink)}
body.site-v2.v2-type:not(.focus-layout) main :is(.game-directory a,.archive-list a,.faq-list details,.room-list-item):where(:not(.arcade-board *)){border-color:var(--line)}
body.site-v2.v2-type:not(.focus-layout) main :is(.hub-daily-row,.hub-weekly,.room-lobby form,.auth-panel,th,td):where(:not(.arcade-board *)){border-color:var(--line)}
body.site-v2.v2-type:not(.focus-layout) main .directory-preview{border-color:var(--line)}
body.site-v2.v2-type:not(.focus-layout) main .arcade-board:not([data-palette]){border-color:var(--line)}

/* ═════════════════════ Wave 1b · composition, header rhythm, alignment (body.v2-layout) ═════════════════════ */

/* Page: the 1120 envelope; breadcrumb, H1, lead and every block share one left edge. */
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap{margin-top:24px}
body.site-v2.v2-layout:not(.focus-layout) main .breadcrumbs{margin:0 0 24px}
body.site-v2.v2-layout:not(.focus-layout) main .page-intro{padding:0 0 32px;max-width:850px}
/* Header rhythm: breadcrumb → 24 → (subnav → 24 →) H1 → 12 → lead → 32 → first block. A page without a breadcrumb keeps its
   slot (one 20 px meta line + 24) so the H1 lands at the same height on every page type. */
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>:is(.page-intro,h1,.daily-heading):first-child,
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>.stage-head:first-child>.page-intro:first-child{padding-top:44px}
body.site-v2.v2-layout:not(.focus-layout) main .subnav{margin:0 0 24px}
/* Ad boxes on page (non-stage) layouts sit on the H1's left edge (One Edge Rule); src/ads.js centres them in a 970 px box,
   which put them 75 px right of the text on desktop (G4a, Nov 12). Game-stage ad boxes stay centred on the column. */
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>:is(.ad-slot-top,.ad-slot-end),
body.site-v2.v2-layout:not(.focus-layout) main .editorial>.ad-slot{margin-left:0;margin-right:0;padding-left:0;padding-right:0}
body.site-v2.v2-layout:not(.focus-layout) main :is(.page-intro,.game-heading,.daily-heading) h1,
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>h1{margin:0 0 12px}
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>h1{margin-bottom:32px}
body.site-v2.v2-layout:not(.focus-layout) main :is(.page-intro,.game-heading)>p{margin:0;max-width:68ch}
body.site-v2.v2-layout:not(.focus-layout) main .hub-home .daily-heading{padding-bottom:32px}
body.site-v2.v2-layout:not(.focus-layout) main .daily-heading p+p{margin-top:24px}
body.site-v2.v2-layout:not(.focus-layout) main .daily-heading p+.hub-date{margin-top:12px}
/* Action rows start on the block's left edge, like the heading and text above them. */
body.site-v2.v2-layout:not(.focus-layout) main .daily-actions{justify-content:flex-start}

/* Reading pages (stories, /about/, /contact/, legal) move from the centred column to the page edge; prose ≤ 68ch. */
body.site-v2.v2-layout:not(.focus-layout) main .editorial{max-width:none;margin:0}
body.site-v2.v2-layout:not(.focus-layout) main .editorial .page-intro{padding-bottom:32px}
body.site-v2.v2-layout:not(.focus-layout) main .editorial>:not(.page-intro),
body.site-v2.v2-layout:not(.focus-layout) main .article-bottom{max-width:68ch}
/* General sibling (~): a hidden ad slot between two sections (Pro, or an unfilled unit) must not drop the gap (UX M3). */
body.site-v2.v2-layout:not(.focus-layout) main .editorial section~section{margin-top:var(--gap-section)}
body.site-v2.v2-layout:not(.focus-layout) main .editorial section h2{margin:0 0 12px}
body.site-v2.v2-layout:not(.focus-layout) main .editorial section p+p{margin-top:16px}
/* Sub-headings (H3) in prose: more room above than below, so each one leads its own paragraphs (32 above, 8 below). */
body.site-v2.v2-layout:not(.focus-layout) main :is(.editorial,.article-bottom,.game-help) :is(p,ul,ol,table,.table-scroll)+h3{margin-top:32px}
body.site-v2.v2-layout:not(.focus-layout) main :is(.editorial,.article-bottom,.game-help) h3{margin-bottom:8px}

/* Help/guide blocks: left on the page edge (not centred inside a left-aligned page), prose ≤ 68ch. */
body.site-v2.v2-layout:not(.focus-layout) main .game-help{max-width:none;margin:var(--gap-section) 0 0}
body.site-v2.v2-layout:not(.focus-layout) main .game-help>:is(p,ul,ol,.faq-list,h2,h3){max-width:68ch}
body.site-v2.v2-layout:not(.focus-layout) main .game-help h2{margin:var(--gap-section) 0 12px}
body.site-v2.v2-layout:not(.focus-layout) main :is(.game-help,.article-bottom,.hub-help)>h2:first-child{margin-top:0}
body.site-v2.v2-layout:not(.focus-layout) main :is(.article-bottom,.hub-help)>h2:not(:first-child){margin-top:var(--gap-section)}
/* FAQ list: rows separated by 1 px line, no padding on the row itself (the summary carries it). */
body.site-v2.v2-layout:not(.focus-layout) main .faq-list{margin:24px 0}
body.site-v2.v2-layout:not(.focus-layout) main .faq-list details{padding:0}
body.site-v2.v2-layout:not(.focus-layout) main .faq-list details[open]>summary{margin-bottom:0}
body.site-v2.v2-layout:not(.focus-layout) main .faq-list details>:not(summary){margin:0 0 16px}
body.site-v2.v2-layout:not(.focus-layout) main .game-help+.game-help{margin-top:var(--gap-section)}

/* Sections are 56 apart on desktop, 40 on phone. */
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>:is(section,.discovery,.daily-archive,.plan-options,.guide-groups,.guide-index,form,.room-lobby,article.article-bottom)+:is(section,div,form,article,p){margin-top:var(--gap-section)}
body.site-v2.v2-layout:not(.focus-layout) main :is(.discovery,.daily-archive){margin-bottom:0}
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>.page-intro+*{margin-top:0}
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap{margin-bottom:var(--gap-section)}

/* Stage: game pages, /play/today/, /gauntlet/. One centred 900 column; breadcrumb, H1 and meta sit on the board's left edge. */
body.site-v2.v2-layout:not(.focus-layout) main .stage-head{max-width:900px;margin:0 auto;padding-top:0}
body.site-v2.v2-layout:not(.focus-layout) main .stage-head .game-heading{padding:0 0 32px}
body.site-v2.v2-layout:not(.focus-layout) main .stage-head .page-intro{padding-bottom:32px}
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head)>:not(.stage-head,script){max-width:900px;margin-left:auto;margin-right:auto}
body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head)>.arcade-board{margin-top:0}
body.site-v2.v2-layout:not(.focus-layout) main .arcade-wrap{margin-top:24px;padding-top:0}
@media (max-width:700px){
 body.site-v2.v2-layout:not(.focus-layout) main .stage-head .breadcrumbs{margin-bottom:16px}
 body.site-v2.v2-layout:not(.focus-layout) main .stage-head .game-heading{padding-bottom:20px}
 body.site-v2.v2-layout:not(.focus-layout) main .stage-head .game-heading p{margin:0}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap,body.site-v2.v2-layout:not(.focus-layout) main .arcade-wrap{margin-top:16px}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>:is(.page-intro,h1,.daily-heading):first-child,
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap>.stage-head:first-child>.page-intro:first-child{padding-top:36px}
}

/* Rarebit: the roll hero stays centred (exception). The two cards under it (best ranked roll, next game) fill the 900 stage
   column: side by side in equal halves from 701 px up, stacked full width on phone. The best-roll card keeps its 124 px
   reserve as a minimum (no shift when the roll loads, no clipping when the badge wraps); both cards centre their content
   vertically so the shorter one has no dead band at the bottom. The grid uses dense packing so the next-game card takes the
   free right-hand cell beside the best roll even when the roll history (full width) appears between them in the markup. */
body.site-v2.v2-layout:not(.focus-layout) main .rarebit :is(.rarebit-best,.rarebit-next){box-sizing:border-box;width:100%;max-width:none;height:auto;margin:0;padding:16px 20px}
body.site-v2.v2-layout:not(.focus-layout) main .rarebit .rarebit-best{min-height:124px;display:flex;flex-direction:column;justify-content:center}
body.site-v2.v2-layout:not(.focus-layout) main .rarebit .rarebit-next{align-content:center}
body.site-v2.v2-layout:not(.focus-layout) main .rarebit>:is(.rarebit-best,[data-rarebit-next-game]){margin-top:16px}
@media (min-width:701px){
 body.site-v2.v2-layout:not(.focus-layout) main .rarebit{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:16px;grid-auto-flow:row dense}
 body.site-v2.v2-layout:not(.focus-layout) main .rarebit>*{grid-column:1/-1}
 body.site-v2.v2-layout:not(.focus-layout) main .rarebit>.rarebit-best{grid-column:1}
 body.site-v2.v2-layout:not(.focus-layout) main .rarebit>[data-rarebit-next-game]{grid-column:2;display:flex}
 body.site-v2.v2-layout:not(.focus-layout) main .rarebit>[data-rarebit-next-game]>.rarebit-next{flex:1}
}

/* Directory rows: the text column fills the row so every title starts on the same edge. */
body.site-v2.v2-layout:not(.focus-layout) main .game-directory a>div{flex:1;min-width:0}

/* Tools: a block that is not a visible card gets no padding, so its content stays on the H1's edge. */
body.site-v2.v2-layout:not(.focus-layout) main .checker-form{padding:0;max-width:800px;background:none}
/* Finder → result: the result sits 16 px below its control row (field rhythm). */
body.site-v2.v2-layout:not(.focus-layout) main .rarebit-form{margin:0}
body.site-v2.v2-layout:not(.focus-layout) main .rarebit-form+*{margin-top:16px}
body.site-v2.v2-layout:not(.focus-layout) main .rarebit-form .rarebit-error{margin:8px 0 0}
body.site-v2.v2-layout:not(.focus-layout) main .poople-solver-output{margin-top:16px}

/* ═════════════════════ Wave 1c · components, touch, states (body.v2-ui) ═════════════════════ */

/* Focus: one ring everywhere outside the dark arenas (which keep their white ring). */
body.site-v2.v2-ui :is(a,button,input,select,textarea,summary,[tabindex]):where(:not(.arcade-board *)):focus-visible{outline:3px solid var(--focus);outline-offset:3px}
body.site-v2.v2-ui :is(a,button,input,select,textarea,summary,[tabindex]):where(:not(.arcade-board *)):focus:not(:focus-visible){outline:none}

/* Button: two variants (dark, outline). Radius 10, min-height 48 (44 compact), label 14/650. */
/* Hover colours apply only on devices with a mouse (@media (hover:hover), every hover rule in this file), so a tapped
   button, chip or link never keeps its hover colour on a touch screen. A busy button (aria-busy) is never faded. */
body.site-v2.v2-ui:not(.focus-layout) main .button:where(:not(.arcade-board *,.rarebit *)){border-radius:10px;min-height:48px;font-size:14px;font-weight:650;line-height:1.4;border:0;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out,box-shadow .15s ease-out}
body.site-v2.v2-ui:not(.focus-layout) main .button.dark:where(:not(.arcade-board *,.rarebit *)){background:var(--ink);color:#fff}
body.site-v2.v2-ui:not(.focus-layout) main .button.outline:where(:not(.arcade-board *,.rarebit *)){background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .button.dark:where(:not(.arcade-board *,.rarebit *)):hover{background:var(--link);color:#fff}}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .button.outline:where(:not(.arcade-board *,.rarebit *)):hover{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}}
body.site-v2.v2-ui:not(.focus-layout) main .button:where(:not(.arcade-board *,.rarebit *)):active{transform:translateY(1px)}
body.site-v2.v2-ui:not(.focus-layout) main .button:where(:not(.arcade-board *,.rarebit *)):is(:disabled,[aria-disabled=true]):not([aria-busy=true]){opacity:.6;cursor:not-allowed;transform:none}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .button.dark:where(:not(.arcade-board *,.rarebit *)):is(:disabled,[aria-disabled=true]):hover{background:var(--ink)}}
body.site-v2.v2-ui:not(.focus-layout) main :is(.section-heading,.reading-layout aside) .button{min-height:44px;font-size:14px;padding:10px 16px}
/* Home, Weekly Gauntlet: "View world rankings" is a compact outline button under "Enter the Gauntlet". */
body.site-v2.v2-ui:not(.focus-layout) main .hub-weekly a.underlink{display:flex;width:fit-content;align-items:center;min-height:44px;box-sizing:border-box;margin-top:12px;padding:10px 16px;border-radius:10px;background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line);font-size:14px;font-weight:650;line-height:1.4;text-decoration:none;transition:box-shadow .15s ease-out}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .hub-weekly a.underlink:hover{color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}}
body.site-v2.v2-ui:not(.focus-layout) main .hub-weekly a.underlink:active{transform:translateY(1px)}

/* Chip: category/filter. Compact-button height and radius, line border; selected = ink. */
body.site-v2.v2-ui:not(.focus-layout) main .category-tabs button{min-height:44px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--ink);font-size:14px;font-weight:650;padding:10px 16px;cursor:pointer;transition:border-color .15s ease-out,background-color .15s ease-out}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .category-tabs button:hover{border-color:var(--ink)}}
body.site-v2.v2-ui:not(.focus-layout) main .category-tabs button[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
body.site-v2.v2-ui:not(.focus-layout) main .category-tabs button:active{transform:translateY(1px)}
body.site-v2.v2-ui:not(.focus-layout) main .category-tabs button:disabled{opacity:.45;cursor:not-allowed}

/* Link chips: "Try another kind of challenge", the /rarebit/badges/ family jump links and the in-page sub-navs (Rarebit,
   Songless, the Krillion nav on guides). Compact-button height and radius, line border, ink label; rows wrap with an 8 px gap.
   The sub-nav marks the current page (aria-current) the way a selected chip is marked: ink fill. */
body.site-v2.v2-ui:not(.focus-layout) main :is(.related-game-links,.rarebit-families,.subnav){display:flex;flex-wrap:wrap;gap:8px}
body.site-v2.v2-ui:not(.focus-layout) main .rarebit-families{margin:16px 0 0;overflow:visible;padding:0}
body.site-v2.v2-ui:not(.focus-layout) main .subnav{border-bottom:0;padding:0}
body.site-v2.v2-ui:not(.focus-layout) main :is(.related-game-links a:not(.button),.rarebit-families a,.subnav a){display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box;margin:0;padding:10px 16px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-size:14px;font-weight:650;line-height:1.4;text-decoration:none;white-space:nowrap;transition:border-color .15s ease-out,background-color .15s ease-out}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main :is(.related-game-links a:not(.button),.rarebit-families a,.subnav a):hover{border-color:var(--ink);color:var(--ink);text-decoration:none}}
body.site-v2.v2-ui:not(.focus-layout) main :is(.related-game-links a:not(.button),.rarebit-families a,.subnav a):active{transform:translateY(1px)}
body.site-v2.v2-ui:not(.focus-layout) main .subnav a[aria-current=page]{background:var(--ink);border-color:var(--ink);color:#fff}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .subnav a[aria-current=page]:hover{background:var(--ink);color:#fff}}
/* Phone: the category chip row scrolls sideways; a 72 px trailing fade (wider than the 8 px gap plus half a chip) shows
   there is more, and the row ends in a 56 px spacer so the last chip can scroll fully clear of the fade. */
@media (max-width:700px){
 body.site-v2.v2-ui:not(.focus-layout) main .discovery .category-tabs{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 72px),rgba(0,0,0,.15) calc(100% - 8px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 72px),rgba(0,0,0,.15) calc(100% - 8px),transparent)}
 body.site-v2.v2-ui:not(.focus-layout) main .discovery .category-tabs::after{content:"";flex:0 0 56px}
 /* Sub-nav (Songless, Rarebit, Krillion guides) on phone: compact text links that wrap, every link visible (Nov 12: a
    sideways-scrolling row hid the last links off-screen, and wrapped chips cost 2-3 rows). 44 px rows; current page = 2 px
    underline, as in the header nav. Desktop keeps the chips. */
 body.site-v2.v2-ui:not(.focus-layout) main .subnav{gap:0 20px}
 body.site-v2.v2-ui:not(.focus-layout) main .subnav a,body.site-v2.v2-ui:not(.focus-layout) main .subnav a[aria-current=page]{padding:0;border:0;border-radius:0;background:none;color:var(--ink);white-space:nowrap}
 @media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .subnav a:hover{color:var(--link)}}
 body.site-v2.v2-ui:not(.focus-layout) main .subnav a[aria-current=page]{background:linear-gradient(currentColor,currentColor) no-repeat left bottom 8px/100% 2px}
 @media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .subnav a[aria-current=page]:hover{background:linear-gradient(currentColor,currentColor) no-repeat left bottom 8px/100% 2px}}
 @media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .subnav a[aria-current=page]:hover{color:var(--link)}}
}

/* Field: white, 1 px #898991, radius 12, height 48, 16 px text (no iOS zoom). Every input and select outside the arenas. */
body.site-v2.v2-ui:not(.focus-layout) main :is(.field,input:not([type=checkbox],[type=radio],[type=range],[type=hidden],[type=submit],[type=button],[type=color],[type=file]),select,textarea):where(:not(.arcade-board *,[data-room-body] *,.rarebit *)){box-sizing:border-box;background:#fff;color:var(--ink);border:1px solid var(--field-line);border-radius:12px;min-height:48px;padding:12px 14px;font:inherit;font-size:16px;font-weight:400;line-height:1.4;transition:border-color .15s ease-out}
body.site-v2.v2-ui:not(.focus-layout) main :is(.field,input,select,textarea):where(:not(.arcade-board *,[data-room-body] *,.rarebit *))::placeholder{color:var(--muted);opacity:1}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main :is(.field,input,select,textarea):where(:not([type=checkbox],[type=radio],[type=range],.arcade-board *,[data-room-body] *,.rarebit *)):hover{border-color:var(--ink)}}
body.site-v2.v2-ui:not(.focus-layout) main :is(.field,input,select,textarea):where(:not([type=checkbox],[type=radio],[type=range],.arcade-board *,[data-room-body] *,.rarebit *)):focus-visible{border-color:var(--ink);outline-offset:1px}
body.site-v2.v2-ui:not(.focus-layout) main :is(.field,input,select,textarea):where(:not(.arcade-board *,[data-room-body] *,.rarebit *)):disabled{background:var(--tint);color:var(--muted);cursor:not-allowed}
body.site-v2.v2-ui:not(.focus-layout) main :is(.field,input,select,textarea)[aria-invalid=true]:where(:not(.arcade-board *,[data-room-body] *,.rarebit *)){border-color:var(--error);box-shadow:inset 0 0 0 1px var(--error)}
body.site-v2.v2-ui:not(.focus-layout) main :is(.field-error,.rarebit-form .rarebit-error){color:var(--error);font-size:14px;line-height:1.5;font-weight:650}
body.site-v2.v2-ui:not(.focus-layout) main :is(.checker-form,.room-lobby,.auth-panel,.rarebit-form,.game-search) label{font-size:14px;font-weight:650;line-height:1.5;color:var(--ink)}
body.site-v2.v2-ui:not(.focus-layout) main .rarebit-form label{display:block;margin:0 0 8px}
body.site-v2.v2-ui:not(.focus-layout) main .input-row{gap:12px;align-items:stretch}
body.site-v2.v2-ui:not(.focus-layout) main .input-row :is(input,.field){margin-bottom:0}
body.site-v2.v2-ui:not(.focus-layout) main .rarebit-form :is(input,button){min-height:48px}
body.site-v2.v2-ui:not(.focus-layout) main .game-search input{min-width:250px}
@media (max-width:700px){body.site-v2.v2-ui:not(.focus-layout) main .game-search input{min-width:0}}

/* Card: 1 px line, radius 12, padding 24/20. A visible card or no padding. /guides/ cards are whole-card links. */
body.site-v2.v2-ui:not(.focus-layout) main :is(.room-lobby form,.auth-panel){border:1px solid var(--line);border-radius:12px;padding:24px 20px;box-shadow:none;background:#fff}
body.site-v2.v2-ui:not(.focus-layout) main :is(.room-lobby form,.auth-panel)>:first-child{margin-top:0}
body.site-v2.v2-ui:not(.focus-layout) main .guide-index{gap:16px}
body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;column-gap:16px;border:1px solid var(--line);border-radius:12px;padding:24px 20px;color:var(--ink);transition:border-color .15s ease-out}
body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a>:not(svg){grid-column:1}
body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a>svg{grid-column:2;grid-row:1;align-self:center;color:var(--ink);transition:transform .15s ease-out}
body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a h2{margin:0 0 8px}
body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a p{margin:0}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a:hover{border-color:var(--ink)}}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a:hover h2{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}}
@media (hover:hover){body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a:hover svg{transform:translateX(3px)}}
body.site-v2.v2-ui:not(.focus-layout) main .guide-index>a:active{background:var(--tint)}

/* /plans/ tiers: separated by the card line (1 px --line), not a heavy ink rule. */
body.site-v2.v2-ui:not(.focus-layout) main .plan-options section{border-top:1px solid var(--line)}
/* Per-plan checkout status under its button (UX M1); the owned plan is marked "Your plan" on a tint (UX S2). */
body.site-v2.v2-ui:not(.focus-layout) main .plan-status{margin-top:12px;font-size:14px;line-height:1.5;color:var(--muted)}
body.site-v2.v2-ui:not(.focus-layout) main .plan-status:empty{display:none}
body.site-v2.v2-ui:not(.focus-layout) main .plan-status[data-state=error]{color:var(--error)}
body.site-v2.v2-ui:not(.focus-layout) main .plan-options section.plan-current{background:var(--tint);border-radius:12px;border-top-color:transparent;padding:20px}
body.site-v2.v2-ui:not(.focus-layout) main .plan-badge{margin:0 0 8px;font-size:13px;line-height:1.5;font-weight:650;color:var(--ink)}
body.site-v2.v2-ui:not(.focus-layout) main [data-checkout-status]{margin:0 0 var(--gap-section,40px)}

/* Result box: tint surface, 16 px below its control row; empty, loading and error states. */
body.site-v2.v2-ui:not(.focus-layout) main :is(.poople-solver-output,.check-result:not(:empty)){background:var(--tint);border:0;border-radius:12px;padding:16px 20px}
body.site-v2.v2-ui:not(.focus-layout) main .poople-solver-output p{font-size:14px;line-height:1.5}
body.site-v2.v2-ui:not(.focus-layout) main .poople-solver-output p:last-child{margin-bottom:0}
body.site-v2.v2-ui:not(.focus-layout) main :is(.poople-solver-output,.check-result)[aria-busy=true]{color:var(--muted)}
body.site-v2.v2-ui:not(.focus-layout) main :is(.poople-solver-output,.check-result):is([data-state=error],.is-error){background:#fff;box-shadow:inset 0 0 0 1px var(--error)}

/* Aside: tint, radius 16. */
body.site-v2.v2-ui:not(.focus-layout) main .reading-layout aside{background:var(--tint);border-radius:16px;border:0}

/* Touch (phone): nav, breadcrumb and footer links get a ≥ 44 px hit area through padding plus an equal negative margin,
   so their visual size and position do not change. Inline prose links are exempt. */
@media (max-width:700px){
 body.site-v2.v2-ui .header nav{padding-bottom:8px;margin-bottom:-8px}
 body.site-v2.v2-ui .header nav a{display:inline-block;line-height:20px;padding:12px 0;margin:-8px 0;box-shadow:none}
 body.site-v2.v2-ui .header nav a[aria-current]{background:linear-gradient(currentColor,currentColor) no-repeat left bottom 6px/100% 2px}
 body.site-v2.v2-ui .header .brand{padding:4px 0;margin:-4px 0}
 body.site-v2.v2-ui .breadcrumbs{line-height:20px}
 body.site-v2.v2-ui .breadcrumbs a{display:inline-block;padding:12px 4px;margin:-12px -4px}
 body.site-v2.v2-ui footer .footer-links a{display:inline-block;line-height:20px;padding:12px 0;margin:-12px 0}
 body.site-v2.v2-ui footer .brand{display:inline-block;padding:10px 0;margin:-10px 0}
 body.site-v2.v2-ui footer .text-button{min-height:44px}
 /* Action rows: at 14 px three buttons no longer fit one phone row, so each takes the full width. */
 body.site-v2.v2-ui:not(.focus-layout) main .daily-actions{flex-wrap:wrap}
 body.site-v2.v2-ui:not(.focus-layout) main .daily-actions .button{flex:1 1 100%}
 /* Standalone link rows (flex items): grow the hit area without moving anything. */
 body.site-v2.v2-ui:not(.focus-layout) main .quick-links a:not(.button){padding:10px 0;margin:-10px 0}
 /* Link-list entries that wrap (inline): vertical padding enlarges the hit area and never changes the line box. */
 body.site-v2.v2-ui:not(.focus-layout) main .guide-groups li>a{padding:13px 0}
}
/* Phones (ads spec A5, P0.3 a): the play buttons sit directly under the H1 and the descriptions follow, so they are
   clear of the bottom anchor ad at load. Visual order only (CSS order); DOM, text and links are unchanged.
   Every phone: "Play today's challenge" moves above the intro paragraph. Tall phones (>= 760px of viewport) also lift
   the daily card's "Play casual"/"Play competitive" right under it; on shorter phones they stay below the first screen. */
@media (max-width:680px){
 body.site-v2 main .daily-heading>div{display:flex;flex-direction:column}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap.hub-home>.daily-heading:first-child{padding-top:16px}
 body.site-v2.v2-layout main .daily-heading>div>p:has(>a.button){order:-1;margin:0 0 20px}
 body.site-v2.v2-layout main .daily-heading>div>h1{order:-2}
}
@media (max-width:680px) and (min-height:760px){
 body.site-v2 main .hub-home{display:flex;flex-direction:column}
 body.site-v2 main .hub-home>.daily-heading{display:contents}
 body.site-v2 main .hub-home>.daily-heading>div{display:contents}
 body.site-v2 main .hub-home>.daily-heading h1{order:-3;padding-top:12px}
 body.site-v2 main .hub-home>.daily-heading>div>p:has(>a.button){order:-2;margin:0}
 body.site-v2 main .hub-home>.hub-daily-row{order:-1}
 body.site-v2 main .hub-home .hub-daily{display:flex;flex-direction:column}
 body.site-v2 main .hub-home .hub-daily>h2{order:-2}
 body.site-v2 main .hub-home .hub-daily>.daily-actions{order:-1}
 body.site-v2 main .hub-home>.daily-heading>div>p:not(.hub-date):not(:has(>a.button)){margin-top:28px}
}
/* Game pages on phones (ads spec A5, P0.3 a): the start button sits directly under the H1 and the description follows,
   so it is clear of the bottom anchor ad at load. Visual order only (CSS order); DOM, text and links are unchanged.
   - the page subtitle moves below the board (still above the ad slot, which keeps its 150px top margin);
   - before the game starts, the board's toolbar (name, "Ready to play", Restart) moves below the intro;
   - in the intro the start button comes first, then the heading, description and options. */
@media (max-width:700px){
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board){display:flex;flex-direction:column}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.stage-head,body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.stage-head>:is(.game-heading,.page-intro){display:contents}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.arcade-board{order:-1;width:100%}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.stage-head :is(.breadcrumbs,h1){order:-1}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.stage-head h1{margin:0 0 14px}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.stage-head>.page-intro>h1{padding-top:12px}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.stage-head>:is(.game-heading,.page-intro)>p{margin:0;padding-top:14px}
 body.site-v2.v2-layout:not(.focus-layout) main .arcade-board:has(>.arcade-content>.arena-intro){display:flex;flex-direction:column}
 body.site-v2.v2-layout:not(.focus-layout) main .arcade-board:has(>.arcade-content>.arena-intro)>.arcade-top{order:1;border-bottom:0;border-top:1px solid #303034}
 body.site-v2.v2-layout:not(.focus-layout) main .arena-intro>:is([data-begin],[data-weekly-start]){order:-1;margin:0 0 6px}
 body.site-v2.v2-layout:not(.focus-layout) main .arena-intro>h2{margin-top:14px}
 body.site-v2.v2-layout:not(.focus-layout) main .price-game:has(>.price-screen>.price-welcome){display:flex;flex-direction:column}
 body.site-v2.v2-layout:not(.focus-layout) main .price-game:has(>.price-screen>.price-welcome)>.price-screen{order:-1}
 body.site-v2.v2-layout:not(.focus-layout) main .price-welcome{display:flex;flex-direction:column}
 body.site-v2.v2-layout:not(.focus-layout) main .price-welcome>[data-price-start]{order:-1;margin:0 0 6px}
 body.site-v2.v2-layout:not(.focus-layout) main .price-welcome>h2{margin-top:14px}
}
/* Short phones (iPhone SE class, <= 600px tall): tighter spacing above the start button (A5). */
@media (max-width:700px) and (max-height:600px){
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board){margin-top:4px}
 body.site-v2.v2-layout:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.stage-head .breadcrumbs{margin-bottom:8px}
 body.site-v2.v2-type:not(.focus-layout) main .page-wrap:has(>.stage-head~.arcade-board)>.stage-head h1{font-size:24px;margin-bottom:8px}
 body.site-v2.v2-layout:not(.focus-layout) main .arcade-board:has(>.arcade-content>.arena-intro)>.arcade-content{padding-top:10px}
}
