/* An early-2000s college-site look: Verdana, a solid bar, 1px boxes, bevelled buttons.
   The two cards on the vote page are the point of the site, so they are big.
   Feedback on a pick is arcade-flavoured and never blocks: see FEEL.md. */
@font-face { font-family: "Press Start 2P"; src: url("/fonts/press-start-2p.woff2") format("woff2"); font-display: swap; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* No double-tap zoom on anything tappable: a fast second tap is a second pick, not a zoom. */
a, button, summary, label { touch-action: manipulation; }
body { margin: 0; background: #fff; color: #222; font: 12px/1.45 Verdana, Tahoma, "Lucida Grande", Arial, sans-serif; }
a { color: #2a5a8c; text-decoration: underline; }
@media (hover: hover) { a:hover { background: #2a5a8c; color: #fff; } }
p { margin: 6px 0; }
[hidden] { display: none !important; }
[inert] { opacity: 0.5; }
.px { font-family: "Press Start 2P", "Courier New", monospace; }

/* The bar and its two tabs */
#top { background: #2a5a8c; border-bottom: 1px solid #173a5e; }
.bar { width: 960px; max-width: 100%; margin: 0 auto; padding: 8px 8px 0; display: flex; align-items: flex-end; justify-content: space-between; }
.mark { display: flex; align-items: center; gap: 8px; padding-bottom: 9px; font: bold 26px/1 Tahoma, Verdana, sans-serif; letter-spacing: -1px; color: #fff; text-decoration: none; }
.mark img { display: block; }
.mark:hover { background: none; color: #dbe7f3; }
.tabs { display: flex; gap: 4px; }
.tab { display: block; padding: 7px 16px 8px; border: 1px solid #173a5e; border-bottom: 0; background: #4a78a8; color: #fff; font: bold 14px Tahoma, Verdana, sans-serif; text-decoration: none; }
.tab.on { background: #fff; color: #173a5e; }
@media (hover: hover) { .tab:hover { background: #dbe7f3; color: #173a5e; } }

/* Page frame */
#page { width: 960px; max-width: 100%; margin: 10px auto; padding: 0 8px; display: flex; gap: 10px; align-items: flex-start; }
#main { flex: 1; min-width: 0; }
#side { width: 180px; flex: none; }
#side:empty { display: none; }
.box { border: 1px solid #9db3c9; background: #fff; margin-bottom: 10px; padding: 0 10px 10px; }
.box > :first-child:not(.boxhead) { margin-top: 10px; }
.boxhead { margin: 0 -10px 10px; padding: 4px 10px 5px; background: #d5e0ec; border-bottom: 1px solid #9db3c9; color: #173a5e; font-size: 12px; font-weight: bold; }
.hint, .note, .more, .tag, .src { color: #666; }
.tag { font-size: 11px; }
.note { margin-top: 8px; }
.under { text-align: center; }
/* Skip: a real button under the two cards, plainly smaller than the pick buttons. */
.skip { min-width: 120px; padding: 6px 16px 7px; font: bold 13px Tahoma, Verdana, sans-serif; }
.skip kbd { margin-left: 4px; border-color: #777; color: #333; font-size: 11px; }
@media (hover: hover) { .skip:hover kbd { border-color: #173a5e; color: #173a5e; } }
#arena.skipped .pair { animation: slide 0.16s ease-out; }
@keyframes slide { from { transform: translateX(12px); opacity: 0.5; } to { transform: none; opacity: 1; } }
#foot { width: 960px; max-width: 100%; margin: 0 auto 20px; padding: 6px 8px; border-top: 1px solid #ccc; color: #666; font-size: 10px; text-align: center; }
#foot a { color: #666; }

/* Buttons */
.btn { display: inline-block; padding: 4px 12px 5px; border: 1px solid; border-color: #e6e6e6 #777 #777 #e6e6e6; background: #dcdcdc; color: #222; font: 12px Verdana, Tahoma, sans-serif; text-decoration: none; cursor: pointer; }
@media (hover: hover) { .btn:hover { background: #2a5a8c; border-color: #7f9db9 #173a5e #173a5e #7f9db9; color: #fff; } }
.btn:active { border-color: #777 #e6e6e6 #e6e6e6 #777; }
.link { border: 0; background: none; padding: 4px 6px; margin-left: 8px; color: #666; font: 11px Verdana, Tahoma, sans-serif; text-decoration: underline; cursor: pointer; }
.link kbd { font-size: 9px; border-color: #999; color: #555; }
.big { display: block; margin: 12px auto 6px; padding: 10px 12px 11px; max-width: 340px; border: 2px solid; border-color: #7f9db9 #173a5e #173a5e #7f9db9; background: #2a5a8c; color: #fff; font: bold 15px Tahoma, Verdana, sans-serif; text-align: center; text-decoration: none; }
@media (hover: hover) { .big:hover { background: #3d6fa3; color: #fff; } }
.big:active { border-color: #173a5e #7f9db9 #7f9db9 #173a5e; }
kbd { display: inline-block; min-width: 1.5em; padding: 0 4px; border: 1px solid #173a5e; border-bottom-width: 2px; background: #fff; color: #173a5e; font: bold 0.9em Tahoma, Verdana, sans-serif; text-align: center; }

/* Pills: a thinking level or a class year */
.pill { display: inline-block; padding: 0 6px 1px; border: 1px solid; border-radius: 2px; font-size: 10px; white-space: nowrap; }
.pill b { font: bold 12px Tahoma, Verdana, sans-serif; }
/* Thinking levels on a heat scale: the more thinking, the hotter. A speed variant is electric cyan.
   A year is a different kind of label, so it is a neutral tan. scripts/og-tiles.py reads these lines
   for the share cards: keep each rule on one line starting ".pill.". */
.pill.lvl { background: #e3e9f0; border-color: #8fa3b8; color: #2c3e50; }
.pill.l-low { background: #e3e9f0; border-color: #8fa3b8; color: #2c3e50; }
.pill.l-medium { background: #dcf0dc; border-color: #4f9a55; color: #14532d; }
.pill.l-high { background: #fff1b8; border-color: #d4a017; color: #5c4300; }
.pill.l-xhigh { background: #ffdcb8; border-color: #e07b1a; color: #6b2f00; }
.pill.l-max { background: #ffd0cc; border-color: #d23b2e; color: #7a1410; }
.pill.l-fast { background: #c8f4fb; border-color: #12a5c2; color: #05495a; }
.pill.yr { background: #efe6d6; border-color: #b39b78; color: #4a3a22; }
.key { margin: 0 0 8px; color: #555; font-size: 11px; line-height: 1.9; }
.key .pill { font-size: 10px; padding: 0 5px; }
.key .pill b { font-size: 11px; }
.keygap { margin-left: 12px; }

/* The vote page */
.hero .boxhead { font-size: 15px; padding: 6px 10px 7px; }
.hero .boxhead span { font-weight: normal; }
/* What the crowd did, for a second, over the gap above the cards. No room taken, nothing covered but that gap. */
.said { position: fixed; z-index: 21; padding: 2px 10px 3px; border: 1px solid #9db3c9; background: #fff; color: #333; font: bold 12px Tahoma, Verdana, sans-serif; white-space: nowrap; pointer-events: none; transform: translate(-50%, 2px); animation: said 1.3s ease-out forwards; }
.said.agree { color: #1a7f37; border-color: #1a7f37; }
.said.upset { color: #b42318; border-color: #b42318; }
@keyframes said { 0% { transform: translate(-50%, 10px) scale(0.9); opacity: 0; } 10% { transform: translate(-50%, 2px) scale(1.06); opacity: 1; } 16% { transform: translate(-50%, 2px) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, 2px); opacity: 0; } }
/* The small grey line for the rare thing that needs saying: a pick that isn't saving. */
.quiet { margin: 3px 0 0; color: #888; font-size: 10px; text-align: center; }
/* The bar towards the next rank; its label is the page's one status line. */
.xp { position: relative; height: 15px; margin-top: 0; border: 1px solid #9db3c9; background: #fff; overflow: hidden; }
.xpfill { position: absolute; inset: 0; background: #d5e0ec; transform: scaleX(0.02); transform-origin: left; transition: transform 0.25s ease-out; }
.xplab { position: relative; display: block; text-align: center; font-size: 9px; line-height: 13px; color: #173a5e; }
.kind { margin: 10px 0 0; text-align: center; color: #666; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.kind.day { color: #173a5e; font-weight: bold; }
/* Two cards, each: name and pill on top, the logo, the button. Shared rows keep the two aligned when a name wraps. */
.pair { display: grid; grid-template-columns: minmax(0, 430px) 40px minmax(0, 430px); grid-template-rows: auto auto auto auto; justify-content: center; margin: 6px 0 4px; animation: snap 0.14s ease-out; }
@keyframes snap { from { transform: translateY(7px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.or { grid-row: 1 / span 4; align-self: center; text-align: center; font: bold 18px Tahoma, Verdana, sans-serif; color: #666; }
.pick { grid-row: 1 / span 4; display: grid; grid-template-rows: subgrid; justify-items: center; align-items: center; row-gap: 6px; min-width: 0; padding: 14px 10px 14px; border: 2px solid #c9c9c9; background: #f4f4f4; font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pick:focus-visible { background: #e8eef5; border-color: #2a5a8c; outline: none; }
/* Not while picking by arrow key: a card under a resting mouse would look chosen already. */
@media (hover: hover) { #arena:not(.keys) .pick:hover { background: #e8eef5; border-color: #2a5a8c; } }
.pick:active { background: #d5e0ec; border-color: #173a5e; }
.name { font: bold 24px/1.15 Tahoma, Verdana, sans-serif; color: #173a5e; text-align: center; }
.meta { display: block; min-height: 26px; text-align: center; }
.meta .pill { font-size: 12px; padding: 1px 8px 2px; }
.meta .pill b { font-size: 15px; }
/* The logo grows with the window's height, so the two cards fill the first screen without pushing the buttons off it. */
.frame { --side: clamp(200px, calc(100vh - 500px), 360px); display: flex; align-items: center; justify-content: center; width: var(--side); height: var(--side); max-width: 100%; margin: 4px 0 8px; background: #fff; border: 1px solid #888; padding: 8px; box-shadow: 3px 3px 0 #c9c9c9; }
/* A mark that isn't square (Bing's is tall) is fitted whole inside the frame, never stretched or cut. */
.frame img { display: block; max-width: 100%; max-height: 100%; height: auto; object-fit: contain; }
.go { display: block; width: 100%; max-width: 260px; padding: 10px 8px 11px; border: 2px solid; border-color: #7f9db9 #173a5e #173a5e #7f9db9; background: #2a5a8c; color: #fff; font: bold 17px Tahoma, Verdana, sans-serif; text-align: center; }
@media (hover: hover) { #arena:not(.keys) .pick:hover .go { background: #3d6fa3; } }
/* Pressed: the bevel turns inside out and the button sinks a pixel. */
.pick:active .go { border-color: #173a5e #7f9db9 #7f9db9 #173a5e; background: #234c77; transform: translateY(1px); }
/* The picked card, lifted off over the new pair, and its "+1". Neither can be clicked. */
.ghost { position: fixed; z-index: 20; margin: 0; pointer-events: none; border-color: #e2c822; background: #fff9d7; animation: lift 0.3s ease-out forwards; }
@keyframes lift { 0% { transform: scale(1); opacity: 0.95; } 35% { transform: scale(1.06); opacity: 0.9; } 100% { transform: translateY(-48px) scale(0.97); opacity: 0; } }
.plus { position: fixed; z-index: 21; pointer-events: none; font-size: 26px; color: #1a7f37; text-shadow: 2px 2px 0 #fff; animation: rise 0.42s ease-out forwards; }
@keyframes rise { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -80px); opacity: 0; } }
.confetti { position: fixed; z-index: 22; pointer-events: none; }
.confetti i { position: absolute; width: 8px; height: 8px; animation: burst 0.65s ease-out forwards; }
@keyframes burst { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
/* A switch control nobody sees: flipping it makes iOS tick (see FEEL.md). */
.haptic { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
/* The row of main actions under the cards: undo (small, once there is a pick), skip, and the leaderboard. */
/* Three buttons of one size, centred as a row: Undo (greyed until there is a pick), Skip, Leaderboard. */
.controls { display: grid; grid-template-columns: repeat(3, 176px); justify-content: center; align-items: stretch; gap: 12px; margin: 10px auto 0; }
.controls .cl, .controls .cr { display: contents; }
.controls .btn { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-width: 0; min-height: 34px; padding: 0 8px; font: bold 13px Tahoma, Verdana, sans-serif; white-space: nowrap; }
.controls kbd { border-color: #777; color: #333; font-size: 11px; }
@media (hover: hover) { .controls .btn:hover kbd { border-color: #173a5e; color: #173a5e; } }
.raq { display: none; }
/* The undo shortcut: Cmd+Z on Apple devices, Ctrl+Z elsewhere. Both keys work either way. */
.k-apple, .apple .k-other { display: none; }
.apple .k-apple { display: inline; }
.k-apple kbd + kbd { margin-left: 2px; }
.btn.small { padding: 4px 10px 5px; font-size: 11px; }
/* Until there is a pick to take back, Undo keeps its place and stays out of sight (on a phone it shows, greyed). */
#undo:disabled { color: #a0a0a0; cursor: default; }
@media (hover: hover) { #undo:disabled:hover { background: #dcdcdc; border-color: #e6e6e6 #777 #777 #e6e6e6; color: #a0a0a0; } }
.lb { font: bold 13px Tahoma, Verdana, sans-serif; white-space: nowrap; }
/* The vote box fills the first screen, so everything secondary starts below the fold. */
.hero { display: flex; flex-direction: column; min-height: calc(100vh - 58px); min-height: calc(100svh - 58px); }
.below { margin: auto auto 0; padding: 14px 8px 0; color: #888; font-size: 10px; text-decoration: none; }
@media (hover: hover) { .below:hover { background: none; color: #2a5a8c; text-decoration: underline; } }
/* Below the fold: your picks and sharing, unlocks and badges, the top five and the quotes. */
.more3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.more3 .box { margin-bottom: 10px; }
.more3 .col .box:last-child { margin-bottom: 10px; }
.sharerow { margin: 8px 0; }
.more3 .mine3 { margin: 8px 0; padding: 8px; text-align: left; }
.more3 .mine3 ol { display: block; margin: 4px 0 6px; }
.more3 .mine3 li { display: block; margin: 0; }
.more3 .whys { display: block; margin: 0; }
.more3 .why { max-width: none; margin-bottom: 6px; font-size: 11px; color: #555; }
.more3 .why summary { text-align: left; color: #2a5a8c; }
a.toast { display: block; pointer-events: auto; text-decoration: none; }
/* What people said: folded away, below the main actions */
.whys { display: flex; gap: 56px; justify-content: center; align-items: flex-start; margin: 2px 0 8px; }
.why { flex: 1; max-width: 340px; min-width: 0; color: #777; font-size: 10px; }
.why summary { cursor: pointer; color: #888; text-align: center; list-style: none; text-decoration: underline; }
.why summary::-webkit-details-marker { display: none; }
.why p { margin: 4px 0; }
.why .src { color: #888; white-space: nowrap; }
.mine3 { margin: 8px auto; padding: 8px 10px; max-width: 736px; border: 1px solid #9db3c9; background: #f2f6fa; text-align: center; }
.mine3 ol { display: inline; margin: 0; padding: 0; list-style: none; }
.mine3 li { display: inline; margin-right: 10px; }
.mine3 li b { color: #173a5e; }
.sharebtn { margin-top: 4px; }
.count b { font: bold 22px Tahoma, Verdana, sans-serif; color: #173a5e; }

/* Tables */
table { border-collapse: collapse; width: 100%; }
.mini td { padding: 1px 0; vertical-align: top; }
.mini .n { padding-right: 4px; color: #666; }
.n { text-align: right; white-space: nowrap; width: 1%; }
.board th { text-align: left; background: #ececec; border: 1px solid #ccc; padding: 3px 6px; font-size: 11px; }
.board td { border: 1px solid #ddd; padding: 4px 6px; }
.board tbody tr:nth-child(even) { background: #f2f6fa; }
.board .who img { vertical-align: -3px; }
.board .pill { font-size: 10px; padding: 0 5px; }
.board .pill b { font-size: 11px; }

/* A model's own page */
.who-link, .who a { color: inherit; text-decoration: none; }
.who a b { color: #2a5a8c; text-decoration: underline; }
.modelhead { display: flex; align-items: center; gap: 16px; margin: 4px 0 10px; }
.modelhead .frame { --side: 132px; flex: none; margin: 0; }
.modelhead .name { margin: 0 0 4px; text-align: left; }
.modelhead .meta { margin: 0; text-align: left; }
.standing { margin: 8px 0 0; font-size: 14px; }
.standing b { font: bold 30px Tahoma, Verdana, sans-serif; color: #173a5e; }
.stats { margin: 0 0 4px; }
.stats th { text-align: left; background: #ececec; border: 1px solid #ccc; padding: 3px 6px; font-size: 11px; }
.stats td { border: 1px solid #ddd; padding: 5px 6px; font: bold 15px Tahoma, Verdana, sans-serif; color: #173a5e; }
.sub { margin: 14px -10px 8px; padding: 3px 10px 4px; background: #ececec; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; font-size: 12px; color: #333; }
.model .lead { margin-top: 14px; justify-content: center; }
.model .lead .big { min-width: 220px; }

/* The leaderboard's head */
.lead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lead .big { margin: 0; min-width: 260px; }
.total { margin: 0; font-size: 13px; }
.total b { font: bold 28px Tahoma, Verdana, sans-serif; color: #173a5e; }
.movers { margin: 8px 0 0; padding: 4px 8px; border: 1px solid #ddd; background: #f8f8f8; }
.up { color: #1a7f37; font-weight: bold; }
.down { color: #b42318; font-weight: bold; }

/* The chart. By default (phones, and any window under 1400 px): one row per model, a bar running right. */
.chart { border: 1px solid #9db3c9; background: #f8f8f8; margin: 0 0 10px; }
.charthead { padding: 5px 10px 6px; background: #d5e0ec; border-bottom: 1px solid #9db3c9; color: #173a5e; font-size: 13px; font-weight: bold; }
.charthead .tag { font-weight: normal; }
.plot { position: relative; padding: 6px 10px; }
.plot ol { list-style: none; margin: 0; padding: 0; }
.plot li { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid #e6e6e6; }
.plot li:last-child { border-bottom: 0; }
.lab { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; font-size: 12px; color: #222; }
.lab img { flex: none; }
.lab .pill { font-size: 9px; padding: 0 4px; }
.lab .pill b { font-size: 10px; }
.lab .nm { font-weight: bold; }
.track { position: relative; height: 18px; margin-right: 40px; background: linear-gradient(to right, transparent calc(50% - 1px), #aaa calc(50% - 1px), #aaa 50%, transparent 50%) #ececec; }
.col { display: block; height: 100%; width: var(--v); }
.val { position: absolute; top: 0; left: var(--v); margin-left: 5px; font: bold 10px/18px Tahoma, Verdana, sans-serif; color: #333; }
.gridbox { display: none; }
@media (hover: hover) { .plot li:hover .col { box-shadow: 0 0 0 2px #e2a822; } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0; padding: 6px 10px 8px; border-top: 1px solid #ddd; font-size: 11px; color: #333; }
.legend li { white-space: nowrap; }
.sw { display: inline-block; width: 11px; height: 11px; margin-right: 4px; vertical-align: -1px; }

/* Wide windows: the chart leaves the page column and runs nearly edge to edge, bars standing,
   each label (logo, name, pill) hanging from its bar at 30 degrees. Bars are spaced so that
   neighbouring labels clear each other: 30 px a bar gives 15 px between label lines. */
@media (min-width: 1400px) {
  .chart { width: min(1600px, 96vw); margin-left: 50%; transform: translateX(-50%); }
  .plot { padding: 30px 24px 118px 170px; }
  .plot ol { display: flex; height: 440px; }
  .plot li { flex: 1; display: flex; justify-content: center; position: relative; padding: 0; border: 0; gap: 0; }
  .track { width: 62%; height: 100%; margin: 0; background: none; display: flex; align-items: flex-end; }
  .col { width: 100%; height: var(--v); }
  .val { top: auto; left: 50%; bottom: var(--v); margin: 0 0 3px; transform: translateX(-50%); line-height: 1; }
  .lab { position: absolute; top: 100%; right: 50%; margin-top: 6px; flex-wrap: nowrap; gap: 5px; white-space: nowrap; font-size: 12px; line-height: 14px; transform-origin: right top; transform: rotate(-30deg); }
  .lab img { width: 14px; height: 14px; }
  .lab .pill { padding: 0 4px; line-height: 12px; }
  .lab .pill b { font-size: 10px; }
  .gridbox { display: block; position: absolute; left: 170px; right: 24px; top: 30px; height: 440px; }
  .grid { position: absolute; left: 0; right: 0; border-top: 1px solid #ddd; height: 0; }
  .grid.mid { border-top-style: dashed; border-top-color: #aaa; }
  .grid i { position: absolute; left: -44px; top: -8px; width: 38px; text-align: right; font-style: normal; font-size: 11px; color: #666; }
  .plot ol { position: relative; }
}

/* Phones: the same look; both cards and their buttons fit the first screen; the sidebar drops below. */
@media (max-width: 640px) {
  body { font-size: 13px; }
  #page { flex-direction: column; align-items: stretch; margin-top: 8px; }
  #side { width: 100%; }
  .mark { font-size: 19px; padding-bottom: 11px; gap: 6px; }
  .mark img { width: 20px; height: 20px; }
  .tab { padding: 9px 10px 10px; font-size: 13px; }
  .box { padding: 0 8px 8px; }
  .boxhead { margin: 0 -8px 8px; padding-left: 8px; padding-right: 8px; }
  .hero .boxhead { font-size: 14px; }
  .kind { margin-top: 8px; }
  .pair { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); }
  .or { font-size: 14px; }
  .pick { padding: 10px 4px 10px; row-gap: 4px; }
  .name { font-size: 17px; }
  .meta .pill { font-size: 11px; padding: 0 6px 1px; }
  .meta .pill b { font-size: 13px; }
  .frame { --side: min(38vw, clamp(128px, calc(100svh - 470px), 190px)); padding: 6px; margin: 2px 0 6px; }
  .go { padding: 12px 2px 13px; font-size: 16px; }
  .go kbd, .link kbd { display: none; }
  .banner { top: 52px; font-size: 10px; padding: 8px 10px; }
  .banner.big { font-size: 11px; }
  .shelf .locked span { display: inline; padding-left: 4px; }
  .whys { gap: 22px; }
  .why { font-size: 11px; }
  .why summary { padding: 6px 0; }
  .btn { font-size: 13px; padding: 9px 12px 10px; }
  .link { font-size: 12px; padding: 10px 6px; }
  .skip { min-width: 120px; min-height: 44px; font-size: 15px; }
  .controls { gap: 6px; margin-top: 8px; }
  .btn.small { min-height: 44px; font-size: 13px; padding: 9px 10px 10px; }
  .lb { display: inline-block; padding: 12px 2px; font-size: 14px; }
  .more3 { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: calc(100vh - 56px); min-height: calc(100svh - 56px); }
  .below { font-size: 11px; }
  .xp { height: 18px; }
  .xplab { font-size: 10px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .said { font-size: 12px; max-width: calc(100vw - 20px); overflow: hidden; text-overflow: ellipsis; }
  .quiet { font-size: 11px; }
  .skip kbd, .keyhint, .lb kbd { display: none; }
  .raq { display: inline; }
  .big { font-size: 16px; padding: 13px 12px 14px; max-width: none; }
  .under a, #foot a { display: inline-block; }
  #foot a { padding: 8px 4px; }
  .lead .big { width: 100%; }
  .modelhead .frame { --side: 96px; width: 96px; height: 96px; }
  .stats th { font-size: 10px; padding: 3px 4px; }
  .stats td { font-size: 14px; padding: 5px 4px; }
  .stats th:nth-child(5), .stats td:nth-child(5) { display: none; }
  .sub { margin-left: -8px; margin-right: -8px; }
  .plot li { grid-template-columns: minmax(0, 46%) 1fr; gap: 8px; }
  .track { margin-right: 34px; }
  .board .pill { display: inline-block; margin-top: 2px; }
  .board .who b { display: inline-block; margin-right: 4px; }
  .board td, .board th { padding: 5px 4px; }
  .board th:nth-child(5), .board td:nth-child(5) { display: none; }
}
/* ---- The game layer (src/game.ts, FEEL.md). Everything here is laid over the page and can't be clicked. */
.pts { margin-left: 8px; white-space: nowrap; }
.pts b { font-size: 12px; color: #1a7f37; }
.rankline { margin: 2px 0 6px; }
.rankline b { color: #173a5e; }
#agree:empty { display: none; }
.shelf ul { list-style: none; margin: 0 0 6px; padding: 0; }
.shelf li { padding: 1px 0; font-size: 11px; }
.shelf .locked { color: #999; }
.shelf .locked span { display: block; padding-left: 16px; font-size: 9px; }
.shelf .got { color: #173a5e; font-weight: bold; }
.shelfhead { margin: 6px -10px 4px; padding: 2px 10px; background: #ececec; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; font-size: 10px; font-weight: bold; color: #555; }
.sw-toggle { margin: 0; padding: 2px 0; font-size: 11px; color: #2a5a8c; text-decoration: none; }
.sparks { position: fixed; z-index: 22; pointer-events: none; }
.sparks i { position: absolute; width: 6px; height: 6px; animation: burst 0.4s ease-out forwards; }
.plus.t1 { color: #1a7f37; }
.plus.t2 { color: #d9620a; }
.plus.t3 { color: #b42318; text-shadow: 2px 2px 0 #ffe26b; }
.banner { position: fixed; z-index: 23; left: 50%; top: 58px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 16px; border: 2px solid #173a5e; background: #fff9d7; color: #173a5e; box-shadow: 4px 4px 0 rgba(23, 58, 94, 0.35); pointer-events: none; white-space: nowrap; font-size: 12px; transform: translateX(-50%); animation: banner 1.3s ease-out forwards; }
.banner span { font-size: 8px; color: #555; }
.banner.big { font-size: 16px; border-color: #e2c822; background: #173a5e; color: #ffe26b; animation-duration: 2.2s; }
.banner.big span { color: #dbe7f3; font-size: 9px; }
@keyframes banner { 0% { transform: translate(-50%, -24px) scale(0.8); opacity: 0; } 10% { transform: translate(-50%, 0) scale(1.08); opacity: 1; } 16% { transform: translate(-50%, 0) scale(1); } 82% { transform: translate(-50%, 0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -14px) scale(1); opacity: 0; } }
#toasts { position: fixed; z-index: 23; left: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; max-width: min(340px, calc(100vw - 20px)); pointer-events: none; }
.toast { padding: 6px 10px; border: 1px solid #173a5e; background: #fff; box-shadow: 3px 3px 0 rgba(23, 58, 94, 0.3); color: #222; animation: toast 3.6s ease-out forwards; }
.toast b { color: #173a5e; }
@keyframes toast { 0% { transform: translateY(12px); opacity: 0; } 6% { transform: none; opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
.trail { position: fixed; inset: 0; z-index: 19; pointer-events: none; }
/* Combo tiers warm the page up: the bar, then the line, then a glow round the screen. */
html[data-tier="1"] .xpfill { background: #cfe8d2; }
html[data-tier="2"] .xpfill, html[data-tier="3"] .xpfill { background: #ffd9a8; }
html[data-tier="3"] body::after { content: ""; position: fixed; inset: 0; z-index: 18; pointer-events: none; box-shadow: inset 0 0 0 4px #e2c822, inset 0 0 46px rgba(226, 200, 34, 0.55); animation: glow 1.2s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: 0.45; } to { opacity: 1; } }
/* A golden pair: double points. */
#arena.golden .pick { border-color: #e2c822; background: #fffbe6; }
#arena.golden .kind { color: #8a6a00; font-size: 9px; letter-spacing: 0; }
#arena.golden .pair { position: relative; }
#arena.golden .pair::after { content: ""; position: absolute; inset: -4px; border: 2px dashed #e2c822; pointer-events: none; animation: glow 0.7s ease-in-out infinite alternate; }
/* Unlocked button skins */
.skin-chrome .go { background: linear-gradient(#ffffff, #c4ccd4 46%, #8f9aa5 54%, #e3e8ec); border-color: #fff #5b6570 #5b6570 #fff; color: #173a5e; text-shadow: 0 1px 0 #fff; }
.skin-chrome .go kbd { border-color: #5b6570; }
.skin-gold .go { background: linear-gradient(#fff6c2, #f2c632 46%, #c8990f 54%, #ffe680); border-color: #fff3a8 #8a6a00 #8a6a00 #fff3a8; color: #4d3800; text-shadow: 0 1px 0 #fff3a8; }
.skin-gold .go kbd { border-color: #8a6a00; color: #4d3800; }
@media (hover: hover) { .skin-chrome #arena:not(.keys) .pick:hover .go { background: linear-gradient(#ffffff, #d6dde3 46%, #a3adb7 54%, #eef1f4); } .skin-gold #arena:not(.keys) .pick:hover .go { background: linear-gradient(#fffbe0, #f7d75c 46%, #d9ab22 54%, #fff0a6); } }
/* Geocities mode: a starfield behind everything, and a little glitter. */
html.geo body { background: #000014 radial-gradient(#fff 1px, transparent 1.5px) 0 0 / 90px 90px, #000014; background-image: radial-gradient(#fff 1px, transparent 1.5px), radial-gradient(#9db3c9 1px, transparent 1.5px), radial-gradient(#ffe26b 1.5px, transparent 2px); background-size: 90px 90px, 130px 130px, 210px 210px; background-position: 0 0, 40px 60px, 110px 20px; background-color: #000014; }
html.geo #foot { color: #dbe7f3; border-top: 3px dashed #e2c822; }
html.geo #foot a { color: #ffe26b; }
html.geo .mark { text-shadow: 2px 2px 0 #e2c822; }

/* Mouse and keyboard only: the keycaps inside the buttons mean something there. */
@media (hover: none) { .go kbd, .link kbd, .skip kbd, .keyhint, .lb kbd { display: none; } .raq { display: inline; } }
/* Asked for less motion: no animation at all. The next pair still appears at once. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* With motion off, banners and toasts still show, as plain text that comes and goes. */
@media (prefers-reduced-motion: reduce) { html[data-tier="3"] body::after, #arena.golden .pair::after { opacity: 0.8; } }
/* Phones: a note lies over the vote box's heading bar, the one strip there that holds no control, and is
   exactly its size. It scrolls with the page, so it can never sit on a button. One line; the detail is dropped. */
.hero { position: relative; }
@media (max-width: 640px) {
  #toasts { position: absolute; left: 0; right: 0; top: 0; bottom: auto; max-width: none; display: block; }
  .toast { position: absolute; left: 0; right: 0; top: 0; padding: 6px 8px 7px; border: 0; border-bottom: 1px solid #173a5e; box-shadow: none; background: #173a5e; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation-duration: 2.2s; }
  .toast b { color: #ffe26b; }
  .toast .more { display: none; }
}

/* ---- Phones: the vote box is exactly the visible screen under the header, and shares that space out.
   The cards stretch to fill it, so there is no dead band; the three actions sit in one even row at the bottom.
   Height: 100dvh, with 100svh and 100vh behind it for older browsers, and --vvh (set in the page's head) where
   the visible height differs. In-app browsers draw a toolbar over the bottom, so there the box keeps clear of it. */
@media (max-width: 640px) {
  #page { margin-top: 6px; }
  .hero { height: calc(100vh - 58px); height: calc(100svh - 58px); height: calc(var(--vvh, 100dvh) - 58px); min-height: 440px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  .inapp .hero { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .hero .boxhead { margin-bottom: 6px; }
  #arena { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .kind { display: none; }
  #arena.golden .kind, .kind.day { display: block; margin: 6px 0 0; }
  .pair { flex: 1; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr) auto; margin: 10px 0 0; }
  .pick { padding: 14px 6px 10px; row-gap: 8px; }
  .name { font-size: clamp(19px, 2.9vh, 25px); }
  .meta { min-height: 24px; }
  .meta .pill { font-size: clamp(11px, 1.6vh, 13px); padding: 1px 7px 2px; }
  .meta .pill b { font-size: clamp(13px, 2vh, 16px); }
  .pick { padding-top: clamp(12px, 2.2vh, 22px); row-gap: clamp(6px, 1.2vh, 12px); }
  /* The logo's frame takes all the height that is left, like a tall photo; the logo sits whole inside it.
     On taller phones the name and pill grow a little too. */
  .frame { --side: auto; width: 100%; height: 100%; min-height: 80px; margin: 2px 0 4px; }
  .frame img { width: 100%; height: 100%; object-fit: contain; }
  .go { padding: 14px 2px 15px; font-size: 17px; }
  .controls { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: none; margin: 14px 0 0; }
  .controls .cl, .controls .cr { display: contents; }
  .controls .btn, .controls .lb { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 48px; padding: 0 4px; border: 1px solid; border-color: #e6e6e6 #777 #777 #e6e6e6; background: #dcdcdc; color: #222; font: bold 14px Tahoma, Verdana, sans-serif; text-decoration: none; white-space: nowrap; }
  .controls .btn:active, .controls .lb:active { border-color: #777 #e6e6e6 #e6e6e6 #777; }
  .below { margin: auto auto 0; padding: 16px 8px 4px; }
}
