/* Lizarding's own look: the desktop's tote cabinet (betting/play/project/
   cabinet_look.gd) - enamel cards on a night page, brass edges, amber
   figures, neon titles, cream words. gd-chime's look gives the ground and
   the palette (--chime-<name>); every rule here starts at #app to win over
   it. The colours that follow the data - a band of the scale, a runner's
   hue - are a sheet of their own, written by settings.js. Phones first:
   every screen scrolls down, never wider than the window. */

#app { --amber: #ffc752; --neon: #ff80b8; --teal: #47ebc7; --brass: #9a8043; --engraved: #c9b277; --enamel-dark: #120f24; }
html, body { margin: 0; background: #08070f; }
#app .chime-app { max-width: 72rem; padding: 10px 12px 3rem; gap: 10px; overflow-x: hidden; }
#app .chime-screen { gap: 12px; min-width: 0; }
#app .chime-text.Title { color: var(--neon); font-size: 1.6rem; letter-spacing: 0.04em; text-transform: none; }
#app .chime-text.Words { font-size: 1.05rem; }
#app .Small { font-size: 0.85rem; }
#app .Quiet { color: var(--chime-ink-soft); }
#app .Hint { color: var(--chime-ink-soft); font-size: 0.9rem; }
#app .Warn { color: var(--neon); }
#app .Engraving { color: var(--engraved); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
#app .Price { color: var(--amber); font-weight: 700; font-variant-numeric: tabular-nums; }
#app .Price.Losing { color: var(--chime-ink-soft); font-weight: 400; }
#app .Said { color: var(--neon); }
#app .PartHeading { font-size: 1.05rem; font-weight: 700; }
#app .Part { gap: 8px; }
#app .Waiting { padding: 2rem 0; text-align: center; }

/* buttons: the desktop's fruit buttons - an edge in the button's colour, filled faintly */
#app .chime-pressable { border-radius: 8px; border: 2px solid var(--chime-lit); background: rgb(46 42 82 / 0.4); }
#app .chime-pressable:hover { background: rgb(46 42 82 / 0.8); }
#app .chime-pressable.BellButton { border-color: var(--amber); background: rgb(255 199 82 / 0.16); color: var(--amber); font-weight: 700; }
#app .chime-pressable.BellButton:hover { background: rgb(255 199 82 / 0.32); filter: none; }
#app .chime-pressable.BellButton .Reason { color: var(--chime-ink-soft); }
#app .chime-pressable.Danger { border-color: var(--neon); color: var(--neon); }
#app .chime-pressable.chime-current { border-color: var(--teal); background: rgb(71 235 199 / 0.16); }
#app .chime-pressable.Segment { min-height: 36px; padding: 4px 12px; }
#app .chime-pressable.ToggleOn { border-color: var(--teal); background: rgb(71 235 199 / 0.32); color: var(--chime-ink); }
#app .chime-field { background: var(--enamel-dark); border: 1px solid var(--chime-lit); }
#app .Segments { flex-wrap: wrap; gap: 6px; }

/* the door */
#app .Door { max-width: 26rem; margin: 10vh auto 0; gap: 14px; text-align: center; align-items: stretch; }
#app .Wordmark { font-size: 3rem; font-weight: 800; color: var(--neon); text-shadow: 0 0 18px rgb(255 128 184 / 0.5); overflow: visible; }
#app .Naming { gap: 10px; text-align: left; }

/* the nav bar: one line wide, three on an upright phone */
#app .Nav { padding: 6px 8px; background: var(--chime-raised); border: 2px solid var(--brass); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
#app .NavLine { gap: 8px; flex-wrap: nowrap; min-width: 0; }
#app .chime-pressable.NavLink { min-height: 38px; padding: 4px 10px; flex: 0 0 auto; }
#app .BackButton { gap: 4px; }
#app .Arrow { font-size: 1.3rem; line-height: 1; }
/* the stage's name stays whole; the instruction line gives way first */
#app .StageButton { min-width: 0; flex: 0 0 auto !important; }
#app .NavLine .Instruction { flex: 1 1 0; min-width: 0; }
#app .StageName { color: var(--neon); font-weight: 700; }
#app .Instruction { color: var(--chime-ink-soft); min-width: 0; }
#app .Countdown { color: var(--amber); font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
#app .Countdown.Closed { color: var(--neon); }
#app .CreditsLine { gap: 10px; }
#app .NavLine .CreditsLine { flex: 0 0 11rem; gap: 6px; }
#app .chime-surface.CreditsBar { padding: 0; height: 10px; border-radius: 5px; background: var(--enamel-dark); border: 1px solid var(--chime-lit); overflow: hidden; min-width: 4rem; }
#app .chime-surface.Fill { padding: 0; height: 100%; background: linear-gradient(90deg, var(--brass), var(--amber)); }
#app .Credits { color: var(--amber); font-weight: 700; font-variant-numeric: tabular-nums; }
#app .Narrow { display: none !important; }
#app .NavLine .Instruction { flex: 1 1 auto; }
#app .Banner { padding: 8px 12px; border-radius: 8px; background: rgb(255 128 184 / 0.14); color: var(--neon); }
#app .Notices { gap: 6px; }
#app .Toast { padding: 8px 12px; border-radius: 8px; background: var(--chime-lit); color: var(--chime-ink); border-left: 4px solid var(--neon); }
/* an upright phone: back, stage, menu and timer; then the credits; then the instruction */
@media (max-width: 40rem) and (orientation: portrait) {
  #app .Wide { display: none !important; }
  #app .Narrow { display: block !important; }
  #app .chime-pressable.Narrow { display: inline-flex !important; }
  #app .chime-row.Narrow { display: flex !important; }
  #app .BackWords { display: none; }
  #app .NavLine .Countdown { margin-left: auto; }
}
#app .chime-pressable.MenuItem { width: 100%; min-width: 12rem; }
#app .Menu { gap: 8px; }

/* a runner's square, in its hue (settings.js writes Runner1 to Runner10) */
#app .Square { display: inline-grid; place-items: center; flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 6px; font-weight: 800; font-size: 1.2rem; overflow: visible; }
#app .Square.Large { width: 3rem; height: 3rem; font-size: 1.6rem; }
#app .LizardName { font-size: 1.15rem; font-weight: 700; }
#app .LizardNameLarge { font-size: 1.5rem; font-weight: 700; }
#app .chime-pressable.NameLink { background: none; border: none; padding: 0; min-height: 0; color: var(--chime-ink); text-decoration: underline; text-decoration-color: var(--chime-lit); text-underline-offset: 3px; }
#app .chime-pressable.NameLink:hover { text-decoration-color: var(--teal); }

/* the race card: two rows of five, wide; a column, upright */
#app .Runners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 10px; }
/* five across - two rows of five for a full card - on a wide screen or a phone held sideways */
@media (min-width: 60rem), (orientation: landscape) and (min-width: 40rem) { #app .Runners { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (orientation: landscape) and (max-width: 60rem) {
  #app .chime-surface.Runner { padding: 8px; gap: 6px; }
  #app .Runner .LizardName { font-size: 0.95rem; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
  #app .Runner .Who .Small { white-space: normal; line-height: 1.2; }
  #app .Runner .Books { flex-direction: column; align-items: stretch; gap: 4px; }
  #app .Runner .Book .Price { font-size: 1.2rem; }
  #app .Runner .PaysFrom, #app .Runner .Small { font-size: 0.78rem; }
  #app .Runner .Square { width: 1.8rem; height: 1.8rem; font-size: 1rem; }
  #app .Runner .StripCell { height: 1.3rem; font-size: 0.68rem; }
  #app .Runner .Strip { gap: 2px; }
}
#app .chime-surface.Runner { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--chime-raised); border: 2px solid var(--brass); border-radius: 10px; min-width: 0; }
#app .RunnerTop { align-items: flex-start; gap: 10px; }
#app .Who { gap: 2px; min-width: 0; }
#app .Books { gap: 14px; align-items: flex-start; }
#app .Book { gap: 0; min-width: 0; }
#app .Book .Price { font-size: 1.5rem; }
/* a price is never cut short - 5000.00 is the longest the game gives - and the place line takes what is left */
#app .Books .Book:first-child { flex: 0 0 auto; }
#app .Book .Price { overflow: visible; text-overflow: clip; }
#app .PaysFrom { color: var(--amber); font-size: 0.95rem; }
#app .Stakes { color: var(--teal); font-size: 0.9rem; }
/* the form strip: six equal squares sharing the card's width, never wider than it, however narrow the card */
#app .Strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; max-width: 13rem; }
#app .StripCell { min-width: 0; height: 1.6rem; padding: 0; border-radius: 4px; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; overflow: hidden; text-overflow: clip; }
#app .Unshaded { background: var(--chime-lit); color: var(--chime-ink); }
#app .BetButton { justify-content: center; }
/* each card's Bet at its foot, so a row's buttons line up however long its names */
#app .Runner .BetButton { margin-top: auto; }

/* the bet pop-up */
#app .chime-sheet { background: var(--chime-raised); border: 2px solid var(--brass); width: min(100%, 34rem); }
#app .BetSheet { gap: 10px; }
#app .BetTop { gap: 10px; }
#app .BookTabs { gap: 0; border-bottom: 1px solid var(--chime-lit); }
#app .chime-pressable.BookTab { border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; gap: 6px; flex: 1 1 0; justify-content: center; }
#app .chime-pressable.BookTab.chime-current { border-bottom-color: var(--amber); color: var(--amber); background: none; }
#app .TabStake { color: var(--teal); }
#app .Shares { flex-wrap: wrap; gap: 4px; }
#app .chime-pressable.Share { min-height: 32px; padding: 2px 8px; }
#app .Returns { gap: 2px; max-height: 14rem; overflow-y: auto; }
#app .Return { padding: 2px 4px; border-bottom: 1px solid rgb(46 42 82 / 0.6); }
#app .BetActions { gap: 8px; }

/* the lizard screen */
#app .chime-surface.LizardStrip { display: flex; flex-direction: column; gap: 10px; background: var(--chime-raised); border: 2px solid var(--brass); border-radius: 10px; padding: 10px; }
#app .StripTop { gap: 10px; }
#app .chime-pressable.ArrowButton { min-width: 44px; justify-content: center; }
#app .FormTab { color: var(--amber); font-weight: 700; border-bottom: 3px solid var(--amber); align-self: flex-start; padding: 4px 8px; }
#app .Career { color: var(--chime-ink-soft); }
#app .FormTable { gap: 3px; }
#app .FormRows { gap: 3px; }
#app .chime-surface.FormRow { padding: 4px 6px; display: grid; gap: 4px 6px; align-items: center; background: var(--enamel-dark); border-radius: 6px;
  grid-template-columns: 4.2rem minmax(5rem, 1.6fr) 3rem 4.4rem 4.4rem 3.6rem 3.4rem 3.4rem 3.6rem 3.6rem minmax(5rem, 1fr); }
#app .FormRow .chime-surface.Cell { padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#app .FormRow .CellLabel { display: none; color: var(--engraved); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; }
#app .FormRow .CellValue { font-size: 0.85rem; }
#app .FormRow .Shade { min-width: 2.2rem; height: 1.5rem; padding: 0 4px; border-radius: 4px; display: inline-grid; place-items: center; font-weight: 700; align-self: flex-start; }
#app .FormRow .Stage .CellValue { font-weight: 600; }
#app .FormHead { background: none; }
#app .Head { color: var(--engraved); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }
/* narrower: each race is a card - its round and stage, then its figures, each saying what it is, then its sprints */
@media (max-width: 52rem) {
  #app .chime-surface.FormHead { display: none; }
  #app .chime-surface.FormRow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; padding: 8px 10px; }
  #app .FormRow .CellLabel { display: block; }
  #app .FormRow .When { grid-column: 1 / 2; }
  #app .FormRow .Stage { grid-column: 2 / -1; }
  #app .FormRow .Sprints { grid-column: 1 / -1; }
}
#app .chime-surface.Sprints { padding: 0; }
#app .SprintMap { gap: 2px; align-items: flex-end; height: 1.4rem; }
#app .chime-surface.Bar { padding: 0; width: 6px; background: var(--teal); border-radius: 1px; }
#app .Up0 { height: 1px; opacity: 0.4; } #app .Up1 { height: 10%; } #app .Up2 { height: 20%; } #app .Up3 { height: 30%; } #app .Up4 { height: 40%; }
#app .Up5 { height: 50%; } #app .Up6 { height: 60%; } #app .Up7 { height: 70%; } #app .Up8 { height: 80%; } #app .Up9 { height: 90%; } #app .Up10 { height: 100%; }

/* the leagues: the list down the left and the table on the right, wide; the list across the top, upright */
#app .LeaguesBody { align-items: flex-start; gap: 12px; }
#app .LeagueList { flex-direction: column; gap: 6px; flex: 0 0 13rem; }
#app .chime-pressable.LeagueChoice { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
#app .chime-surface.LeagueTable { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; background: var(--chime-raised); border: 2px solid var(--brass); border-radius: 10px; }
#app .TableRows { gap: 2px; }
#app .chime-surface.TableRow { padding: 4px 8px; border-radius: 6px; border: 2px solid transparent; }
#app .chime-surface.TableRow.Own { border-color: var(--chime-ink); background: var(--chime-lit); }
#app .chime-surface.TableRow.Apart { margin-top: 10px; }
#app .TableRow .Place { min-width: 2rem; color: var(--engraved); }
#app .TableRow .Score { color: var(--amber); font-variant-numeric: tabular-nums; }
#app .Code { font-family: ui-monospace, monospace; letter-spacing: 0.15em; color: var(--teal); }
#app .TableActions, #app .CodeRow { gap: 8px; flex-wrap: wrap; }
#app .chime-surface.LeagueForm { display: flex; flex-direction: column; gap: 8px; background: var(--chime-raised); border: 1px solid var(--chime-lit); border-radius: 10px; }
#app .LengthRow { flex-wrap: wrap; align-items: flex-end; }
#app .LengthField { max-width: 7rem; }
@media (max-width: 40rem) and (orientation: portrait) {
  #app .LeaguesBody { flex-direction: column; align-items: stretch; }
  #app .LeagueList { flex-direction: row; flex: 0 0 auto; overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
  #app .chime-pressable.LeagueChoice { width: auto; flex: 0 0 auto; }
}

/* the stage map */
#app .chime-surface.StageMap { padding: 8px; background: var(--enamel-dark); border: 1px solid var(--chime-lit); border-radius: 10px; }
#app .StageMap svg { display: block; width: 100%; height: auto; }
#app .KeyList { flex-wrap: wrap; gap: 14px; }
#app .KeyItem { gap: 6px; }
#app .chime-surface.Key { padding: 0; width: 14px; height: 14px; border-radius: 3px; }
#app .Surface-hard_rock { background: #9EA1B3; } #app .Surface-standard_dirt { background: #BD854D; } #app .Surface-mud { background: #75543A; }
#app .Surface-wood { background: #E0AD5C; } #app .Surface-water { background: #4D9EFF; }

/* settings */
#app .chime-pressable.ScaleChoice { flex-wrap: wrap; }
#app .Samples { gap: 2px; }
#app .chime-surface.Sample { padding: 0; width: 18px; height: 18px; border-radius: 3px; }

/* the race */
#app .RaceTop { gap: 10px; }
#app .chime-surface.RaceView { padding: 0; border: 2px solid var(--brass); border-radius: 10px; overflow: hidden; }
#app .RaceCanvas { display: block; width: 100%; height: min(62vh, max(240px, 50vw)); }

/* the result */
#app .ResultRows { gap: 6px; }
#app .chime-surface.ResultRow { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: var(--chime-raised); border: 1px solid var(--chime-lit); border-radius: 10px; }
#app .chime-surface.ResultRow.Backed { border: 2px solid var(--amber); }
#app .ResultTop { gap: 10px; }
#app .ResultTop .Place { min-width: 2.6rem; color: var(--amber); font-weight: 800; font-size: 1.1rem; }
#app .Times { align-items: flex-end; gap: 0; }
#app .ResultStats { gap: 14px; flex-wrap: wrap; }
#app .ResultBets { gap: 2px; }
#app .Paid { color: var(--teal); }

/* Google's button: its own, drawn in by Google; on a phone, ours that goes to Google and back, drawn as Google's pill */
#app .chime-surface.GoogleButton { padding: 0; min-height: 44px; display: flex; color-scheme: light; }
#app .Door .chime-surface.GoogleButton { justify-content: center; }
#app .GoogleButton .google-redirect { min-height: 44px; padding: 0 1.25rem; border: 1px solid #dadce0; border-radius: 999px; background: #fff; color: #1f1f1f; font: 500 0.95rem/1 system-ui, sans-serif; cursor: pointer; }

/* joining two accounts: the code, large enough to read across a room */
#app .JoinCode { font-family: ui-monospace, monospace; font-size: 2rem; font-weight: 800; letter-spacing: 0.2em; color: var(--amber); overflow: visible; }
#app .CodeShown { gap: 8px; padding: 12px; border: 2px solid var(--amber); border-radius: 10px; background: var(--enamel-dark); }
#app .JoinField { font-family: ui-monospace, monospace; letter-spacing: 0.15em; text-transform: uppercase; }

/* who the race follows: the leader, or a runner; the player's own framed in white */
#app .FollowRow { flex-wrap: wrap; gap: 6px; }
#app .FollowList { flex-wrap: wrap; gap: 4px; }
#app .chime-pressable.FollowRunner { min-height: 40px; padding: 2px; border: 2px solid transparent; background: none; }
#app .chime-pressable.FollowRunner.Backed { border-color: #ffffff; }
#app .chime-pressable.FollowRunner.chime-current { border-color: var(--teal); background: rgb(71 235 199 / 0.16); }
#app .FollowRunner .Square { width: 1.9rem; height: 1.9rem; font-size: 1rem; }

/* how the race plays: slower, pause, faster, and the slider under the picture */
#app .SpeedRow { flex-wrap: wrap; gap: 8px; }
#app .SpeedSaid { min-width: 3rem; }
#app .RaceBar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--enamel-dark); }
#app .RaceSlider { flex: 1 1 auto; min-width: 0; accent-color: var(--amber); height: 28px; }
#app .RaceClock { color: var(--chime-ink-soft); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* the standings, left of the race: position, number and name in race order */
#app .RaceStage { display: flex; align-items: stretch; }
#app .RacePicture { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; position: relative; }
/* what the bets would pay as they run, over the picture's top right */
#app .LiveWinnings { position: absolute; top: 36px; right: 8px; padding: 4px 12px; border-radius: 8px; background: rgb(8 7 15 / 0.85); color: var(--amber); font-weight: 800; font-size: 1.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
#app .LiveWinnings.Up { color: #4ade80; }
#app .LiveWinnings.Down { color: #ff5c5c; }
@media (max-width: 40rem) { #app .LiveWinnings { font-size: 1.15rem; padding: 2px 8px; top: 34px; right: 4px; } }
#app .Standings { list-style: none; margin: 0; padding: 6px; flex: 0 0 11rem; display: flex; flex-direction: column; gap: 3px; background: var(--enamel-dark); border-right: 1px solid var(--chime-lit); overflow: hidden; }
#app .StandingRow { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 6px; padding: 2px 4px; border: 2px solid transparent; border-radius: 6px; cursor: pointer; color: var(--chime-ink); }
#app .StandingRow:focus-visible { outline: 2px solid var(--teal); }
#app .StandingRow.Backed { border-color: #ffffff; }
#app .StandingRow.Followed { background: rgb(71 235 199 / 0.18); }
#app .StandingRow.Out { opacity: 0.45; }
#app .StandingPlace { flex: 0 0 2.2rem; color: var(--amber); font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
#app .StandingRow.Home .StandingPlace::after { content: " ✓"; color: var(--teal); }
#app .StandingRow .Square { width: 1.5rem; height: 1.5rem; font-size: 0.8rem; border-radius: 4px; }
#app .StandingName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
/* on a phone, compact: the position as a plain figure, so most of each name fits */
@media (max-width: 40rem) {
  #app .Standings { flex-basis: 8.6rem; padding: 3px; gap: 2px; }
  #app .StandingRow { gap: 4px; padding: 1px 2px; }
  #app .StandingPlace { flex-basis: 1rem; font-size: 0; }
  #app .StandingPlace::before { content: attr(data-place); font-size: 0.75rem; }
  #app .StandingRow.Home .StandingPlace::after { font-size: 0.7rem; }
  #app .StandingRow .Square { width: 1.2rem; height: 1.2rem; font-size: 0.7rem; }
  #app .StandingName { font-size: 0.72rem; }
}

/* the door's other way in: Google, under choosing a name */
#app .DoorOr { margin-top: 10px; text-align: center; }
#app .Naming .chime-surface.GoogleButton { justify-content: center; }

/* the last race, if it had the player's bets: what they paid, and its result to see */
#app .chime-surface.LastRace { padding: 10px 12px; border: 2px solid var(--chime-lit); border-radius: 10px; background: var(--chime-raised); }
#app .chime-surface.LastRace.Up { border-color: var(--teal); }
#app .LastRaceLine { gap: 10px; flex-wrap: wrap; }

/* the i on every page, and what it opens */
#app .chime-pressable.InfoButton { min-width: 38px; min-height: 38px; padding: 0; justify-content: center; border-radius: 999px; flex: 0 0 auto; }
#app .InfoMark { font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 1.15rem; color: var(--teal); overflow: visible; }
#app .DoorTop { justify-content: flex-end; }
#app .HelpSheet { gap: 10px; max-width: 34rem; }
#app .HelpParts { gap: 10px; }
#app .HelpPart { gap: 2px; }

/* a phone held sideways: little height, so every screen gives its height to what matters - the nav on one
   short line, the race with its controls in view, the bet in two columns */
@media (orientation: landscape) and (max-height: 32rem) {
  #app .chime-app { padding-top: 6px; gap: 6px; }
  #app .chime-screen { gap: 8px; }
  #app .chime-text.Title { font-size: 1.3rem; }
  /* the nav: Back and Home as their arrows alone, no instruction, the credits without their bar */
  #app .Nav { padding: 4px 6px; }
  #app .NavLine { gap: 6px; }
  #app .chime-pressable.NavLink { min-height: 34px; padding: 2px 8px; }
  #app .BackWords { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #app .NavLine .Instruction.Wide { display: none; }
  #app .StageButton { flex: 0 1 auto !important; }
  #app .StageName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #app .NavLine .CreditsLine { flex: 0 0 auto; margin-left: auto; }
  #app .NavLine .CreditsBar { display: none; }
  #app .Countdown { font-size: 1.2rem; min-width: 2.8em; }
  #app .chime-pressable.InfoButton { min-width: 34px; min-height: 34px; }
  /* the door: the wordmark smaller and nearer the top */
  #app .Door { margin-top: 0; gap: 8px; }
  #app .Wordmark { font-size: 2rem; }
  /* the lizard: a shorter head */
  #app .chime-surface.LizardStrip { padding: 8px; gap: 6px; }
  #app .LizardNameLarge { font-size: 1.25rem; }
  #app .Square.Large { width: 2.4rem; height: 2.4rem; font-size: 1.3rem; }
  /* the race: the picture fills what the window has left; the key is in the i, and the standings choose who to follow */
  #app .chime-screen:has(> .RaceTop) { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  #app .chime-screen:has(> .RaceTop) > * { flex: 1 1 100%; }
  #app .chime-screen:has(> .RaceTop) > .SpeedRow, #app .chime-screen:has(> .RaceTop) > .FollowRow { flex: 0 1 auto; flex-wrap: nowrap; gap: 6px; }
  #app .RaceKey, #app .FollowList { display: none; }
  #app .RaceTop .chime-pressable, #app .SpeedRow .chime-pressable, #app .FollowRow .chime-pressable { min-height: 34px; padding: 2px 10px; }
  #app .RaceCanvas { height: max(140px, calc(100dvh - 10rem)); }
  #app .RaceBar { padding: 4px 10px; }
  #app .Standings { flex-basis: 9.5rem; padding: 3px; gap: 1px; overflow-y: auto; }
  #app .StandingRow { gap: 4px; padding: 0 2px; }
  #app .StandingPlace { flex-basis: 1rem; font-size: 0; }
  #app .StandingPlace::before { content: attr(data-place); font-size: 0.75rem; }
  #app .StandingRow.Home .StandingPlace::after { font-size: 0.7rem; }
  #app .StandingRow .Square { width: 1.15rem; height: 1.15rem; font-size: 0.7rem; }
  #app .StandingName { font-size: 0.75rem; }
  #app .LiveWinnings { font-size: 1.3rem; padding: 2px 10px; top: 34px; right: 4px; }
  /* the bet: who and the books across the top; the stake on the left, what it returns on the right */
  #app .chime-sheet { width: min(100%, 46rem); padding: 10px 14px; }
  #app .BetSheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; align-items: start;
    grid-template-areas: "top top" "tabs tabs" "field heading" "shares returns" "said returns" "again returns" "actions returns"; }
  #app .BetSheet > .BetTop { grid-area: top; }
  #app .BetSheet > .BookTabs { grid-area: tabs; }
  #app .BetSheet > .chime-field-holder { grid-area: field; }
  #app .BetSheet > .Shares { grid-area: shares; }
  #app .BetSheet > .Engraving { grid-area: heading; align-self: end; }
  #app .BetSheet > .Returns { grid-area: returns; max-height: calc(100dvh - 11rem); }
  #app .BetSheet > .Said { grid-area: said; }
  #app .BetSheet > .chime-each { grid-area: again; }
  #app .BetSheet > .BetActions { grid-area: actions; }
  #app .chime-pressable.Share { min-height: 30px; padding: 2px 6px; }
  #app .BookTabs .chime-pressable.BookTab { min-height: 36px; }
}

/* the result's head: the title, and Continue beside it */
#app .ResultHead { gap: 10px; align-items: center; flex-wrap: wrap; }

/* selling the full game: its stores over every page but the race, larger than anything else on it */
#app .BuyBar { gap: 8px; align-items: stretch; flex-wrap: wrap; padding: 8px; border-radius: 10px; border: 2px solid var(--neon);
  background: linear-gradient(90deg, rgb(255 128 184 / 0.2), rgb(255 199 82 / 0.2)); box-shadow: 0 0 16px rgb(255 128 184 / 0.25); }
#app .BuyHeading { flex: 1 1 auto; align-self: center; color: var(--neon); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em; text-transform: uppercase; }
#app .Store { flex: 1 1 11rem; display: flex; flex-direction: column; justify-content: center; gap: 0; min-height: 48px; padding: 4px 14px; border-radius: 8px; text-decoration: none; color: #ffffff; }
#app .Store-steam { background: linear-gradient(180deg, #2a475e, #1b2838); border: 2px solid #66c0f4; }
#app .Store-play { background: linear-gradient(180deg, #0f9d58, #01734a); border: 2px solid #5ee0a0; }
#app a.Store:hover { filter: brightness(1.15); }
#app a.Store:focus-visible, #app a.Social:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
#app .StoreCall { color: #ffffff; font-weight: 800; font-size: 1.05rem; white-space: normal; line-height: 1.15; }
#app .StoreSub { white-space: normal; }
#app .StoreSub { color: rgb(255 255 255 / 0.78); font-size: 0.75rem; }
#app .Store.Large { min-height: 64px; }
#app .Store.Large .StoreCall { font-size: 1.25rem; }
@media (max-width: 40rem) and (orientation: portrait) {
  #app .BuyHeading { flex-basis: 100%; text-align: center; font-size: 1rem; }
  #app .Store { flex-basis: 0; padding: 4px 10px; }
  #app .StoreCall { font-size: 0.95rem; }
}

/* the socials: a row of named buttons, under every page but the race */
#app .Socials { flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 10px 0; }
#app .Social { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 8.5rem; box-sizing: border-box; padding: 8px 10px; border-radius: 999px; border: 2px solid var(--teal); background: rgb(71 235 199 / 0.12); color: var(--chime-ink); font-weight: 700; text-decoration: none; }
#app .Social:hover { background: rgb(71 235 199 / 0.28); }
#app .SocialIcon { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; }
#app .AdvertSheet .SocialIcon { width: 1.1rem; height: 1.1rem; }

/* the advert: one side of the game, its clip or picture, the stores, the socials */
#app .AdvertSheet { gap: 10px; }
#app .chime-sheet:has(.AdvertSheet) { width: min(100%, 40rem); border-color: var(--neon); }
#app .chime-surface.AdvertPicture { position: relative; padding: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; border: 2px solid var(--brass); background: var(--enamel-dark); }
#app .AdvertArt { display: block; width: 100%; height: 100%; object-fit: cover; }
#app .ClipSoon { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; background: rgb(8 7 15 / 0.8); color: var(--chime-ink-soft); font-size: 0.75rem; }
#app .AdvertHeading { margin: 0; }
#app .AdvertStores { gap: 8px; flex-wrap: wrap; }
#app .AdvertSheet .Socials { padding: 0; justify-content: flex-start; }
/* five equal tiles in one row, each its logo over its name: on an upright phone, and in the advert */
@media (max-width: 40rem) and (orientation: portrait) {
  #app .Socials { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  #app .Socials > .Engraving { grid-column: 1 / -1; text-align: center; }
}
#app .AdvertSheet .Socials { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 40rem) and (orientation: portrait) { #app .Socials .Social { width: auto; flex-direction: column; gap: 4px; padding: 8px 2px; border-radius: 12px; font-size: 0.78rem; } }
#app .AdvertSheet .Socials .Social { width: auto; flex-direction: column; gap: 3px; padding: 6px 2px; border-radius: 12px; font-size: 0.78rem; }
#app .chime-pressable.AdvertClose { align-self: flex-end; }
@media (orientation: landscape) and (max-height: 32rem) {
  #app .BuyBar { padding: 4px 6px; gap: 6px; flex-wrap: nowrap; }
  #app .BuyHeading { font-size: 0.9rem; }
  #app .Store { min-height: 38px; padding: 2px 10px; }
  #app .StoreCall { font-size: 0.9rem; }
  #app .chime-sheet:has(.AdvertSheet) { width: min(100%, 52rem); padding: 10px 12px; }
  /* the picture down the left, beside everything else (the clip's holder lays nothing out of its own) */
  #app .AdvertSheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 6px 14px; align-items: start;
    grid-template-areas: "picture heading" "picture words" "picture stores" "picture socials" "picture close"; }
  #app .AdvertSheet .AdvertPicture, #app .AdvertSheet .chime-embed { grid-area: picture; align-self: center; }
  #app .AdvertSheet > .AdvertHeading { grid-area: heading; }
  #app .AdvertSheet > .Words { grid-area: words; }
  #app .AdvertSheet > .AdvertStores { grid-area: stores; }
  #app .AdvertSheet > .Socials { grid-area: socials; }
  #app .AdvertSheet > .AdvertClose { grid-area: close; }
  #app .AdvertSheet > .Engraving { display: none; }
  #app .AdvertSheet .Store.Large { min-height: 44px; padding: 3px 10px; }
  #app .AdvertSheet .Store.Large { flex: 1 1 0; min-width: 0; }
  #app .AdvertSheet .Store.Large .StoreCall { font-size: 0.95rem; }
  #app .AdvertSheet .Store.Large .StoreSub { font-size: 0.68rem; }
  #app .AdvertSheet .Words { font-size: 0.85rem; line-height: 1.3; }
  #app .AdvertSheet .chime-pressable.AdvertClose { min-height: 34px; padding: 2px 12px; }
  #app .AdvertSheet .AdvertHeading { font-size: 1.2rem; }
  #app .AdvertStores { flex-wrap: nowrap; }
  #app .AdvertSheet .Socials .Social { padding: 3px 2px; font-size: 0.68rem; border-width: 1px; gap: 2px; }
  #app .AdvertSheet .SocialIcon { width: 1rem; height: 1rem; }
  #app .AdvertSheet .Socials { gap: 5px; }
  #app .Store.Large { min-height: 48px; }
  #app .Store.Large .StoreCall { font-size: 1.05rem; }
}
/* a tile's name fits inside it however narrow the row */
#app .AdvertSheet .Socials .Social, #app .Socials .Social { min-width: 0; overflow: hidden; }
#app .AdvertSheet .Socials .Social .Face { font-size: 0.74rem; }
@media (max-width: 40rem) and (orientation: portrait) { #app .Socials .Social .Face { font-size: 0.74rem; } }
@media (orientation: landscape) and (max-height: 32rem) { #app .AdvertSheet .Socials .Social .Face { font-size: 0.62rem; } }
