/* Shared look for Guessroo estimation games (Weighroo, Farroo, Speedroo); copied from Sizeroo.
   World: the scale of things. Every power of ten is a step on a long ruler, grouped into six realms
   from Tiny to Planet. Same dark rock and mineral colours as Yearline, but here the layers are sizes, not centuries. */
:root {
  --rock: #0f1217;
  --rock-2: #171c24;
  --chalk: #eef1f5;
  --dust: #a3adbc;
  --seam: #2a313d;
  --core: #f5f7fa;
  --truth: #ffd04a;
  --r0: #7a2e2b; --r1: #b0772c; --r2: #707a34; --r3: #2f7069; --r4: #415f93; --r5: #74508f;
  --display: "Inter", system-ui, sans-serif;
  --body: "Schibsted Grotesk", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--rock); scrollbar-color: var(--seam) var(--rock); }
body { margin: 0; background: var(--rock); color: var(--chalk); font: 400 17px/1.5 var(--body); -webkit-font-smoothing: antialiased; caret-color: var(--truth); }
::selection { background: var(--truth); color: var(--rock); }
a { color: var(--chalk); text-decoration-color: var(--dust); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--truth); }
:focus-visible { outline: 2px solid var(--truth); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 640px; margin: 0 auto; padding-block: 18px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 28px; }

header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.mark img { flex: none; align-self: center; border-radius: 7px; box-shadow: 0 4px 18px rgba(255, 208, 74, .4); }
.mark b { font: 900 1.6rem/1 var(--display); font-stretch: 140%; letter-spacing: -.01em; color: var(--chalk); }
.mark span { font-size: .85rem; color: var(--dust); white-space: nowrap; }
.issue { font-size: .85rem; color: var(--dust); font-variant-numeric: tabular-nums; white-space: nowrap; }

.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.progress i { height: 4px; border-radius: 2px; background: var(--seam); transition: background .4s var(--ease-out); }
.progress i.done { background: var(--dust); }
.progress i.now { background: var(--chalk); }

.question { display: flex; flex-direction: column; gap: 4px; }
.question p { margin: 0; color: var(--dust); font-size: .95rem; }
.question h1 { margin: 0; font: 700 clamp(1.45rem, 5.2vw, 1.9rem)/1.2 var(--body); letter-spacing: -.015em; text-wrap: balance; }

/* The stage: the thing itself, and what your guess is as big as. On reveal it becomes a to-scale lineup. */
.stage { position: relative; height: 168px; border-radius: 14px; background: var(--rock-2); display: flex; align-items: flex-end; justify-content: center; gap: 28px; padding: 0 16px 14px; overflow: hidden; }
.stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 1px; background: var(--seam); }
.fig { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 110px; position: relative; z-index: 1; }
.fig i { font-style: normal; line-height: 1; display: block; transform-origin: bottom center; transition: font-size .6s var(--ease-out); }
.fig span { font-size: .78rem; color: var(--dust); white-space: nowrap; position: absolute; top: 100%; margin-top: 2px; }
.stage.lineup { height: 196px; padding-bottom: 32px; }
.stage.lineup::after { bottom: 32px; }
.like { position: absolute; left: 14px; top: 12px; right: 14px; font-size: .9rem; color: var(--dust); }
.like b { color: var(--chalk); font-weight: 700; }
.size { font: 900 clamp(3.6rem, 18vw, 5.4rem)/.9 var(--display); font-stretch: 125%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 0; white-space: nowrap; }
.size em { font-style: normal; font-size: .5em; letter-spacing: -.01em; margin-left: .12em; }
.size small { display: block; font: 500 .9rem/1.4 var(--body); letter-spacing: 0; color: var(--dust); margin-top: 8px; white-space: normal; }

/* The scale: one band per realm, thin rungs at every power of ten */
.scale { position: relative; height: 150px; padding-top: 38px; touch-action: none; }
.realms { position: absolute; left: 0; right: 0; top: 38px; bottom: 0; display: flex; border-radius: 10px; overflow: hidden; }
.realm { position: relative; height: 100%; transition: filter .3s var(--ease-out); filter: saturate(.75) brightness(.8); }
.realm.on { filter: none; }
.realm + .realm { box-shadow: inset 1px 0 0 rgba(0,0,0,.35); }
.rung { position: absolute; top: 0; width: 1px; height: 16%; background: rgba(255,255,255,.28); pointer-events: none; }
.needle { position: absolute; top: 0; bottom: -6px; width: 0; pointer-events: none; }
.needle::after { content: ""; position: absolute; left: -1.5px; top: 30px; bottom: 0; width: 3px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.needle b { position: absolute; top: 0; transform: translateX(-50%); padding: 3px 8px 4px; border-radius: 6px; font: 800 .85rem/1.2 var(--display); font-stretch: 110%; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--rock); background: var(--ink); }
.needle.guess { --ink: var(--core); }
.needle.truth { --ink: var(--truth); z-index: 1; }
.needle.truth.drop { animation: drop .7s var(--ease-out) both; }
@keyframes drop { from { transform: translateY(-46px); opacity: 0; } to { transform: none; opacity: 1; } }
.gap { position: absolute; bottom: 14px; height: 10px; border: 2px solid var(--truth); border-top: 0; border-radius: 0 0 4px 4px; pointer-events: none; transform-origin: left; animation: span .5s .45s var(--ease-out) both; }
@keyframes span { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.scrub { position: absolute; left: 0; right: 0; top: 38px; bottom: 0; width: 100%; height: auto; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.scrub:disabled { cursor: default; }
.scale:has(.scrub:focus-visible) .realms { outline: 2px solid var(--truth); outline-offset: 3px; }
.ticks { position: relative; height: 1.2em; color: var(--dust); font-size: .78rem; margin-top: -18px; font-variant-numeric: tabular-nums; }
.ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ticks span:first-child { transform: none; }
.ticks span:last-child { transform: translateX(-100%); }

.controls { display: grid; grid-template-columns: repeat(4, 1fr) 2.2fr; gap: 8px; }
button { font: 700 1rem/1 var(--body); border-radius: 12px; padding: 15px 8px; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .1s; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .4; cursor: default; }
.nudge { background: transparent; color: var(--chalk); border: 1px solid var(--seam); font-variant-numeric: tabular-nums; }
.nudge:hover:not(:disabled) { border-color: var(--dust); }
.go { background: var(--chalk); color: var(--rock); border: 0; }
.go:hover { background: var(--truth); }

/* Reveal: the slab takes the colour of the true realm */
.verdict { border-radius: 14px; padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: baseline; background: var(--band, var(--rock-2)); }
.verdict .pts { grid-row: span 2; font: 900 2.6rem/1 var(--display); font-stretch: 120%; color: var(--chalk); }
.verdict strong { font-size: 1.05rem; }
.verdict p { margin: 0; color: rgba(238,241,245,.86); }
.verdict .fact { grid-column: 1 / -1; margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); }
.verdict .roo { grid-column: 1 / -1; margin-top: 2px; }

/* End of day */
.summary { display: flex; flex-direction: column; gap: 22px; }
.summary h1 { margin: 0; font: 900 clamp(3rem, 15vw, 5rem)/.95 var(--display); font-stretch: 125%; letter-spacing: -.03em; }
.summary h1 span { color: var(--dust); font-weight: 600; font-size: .45em; letter-spacing: 0; }
.summary .line { margin: 0; color: var(--dust); }
.summary .line b { color: var(--chalk); }
.recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.recap li { display: grid; gap: 6px; }
.recap .row { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.recap .row span:last-child { color: var(--dust); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini { position: relative; height: 10px; border-radius: 3px; overflow: hidden; display: flex; }
.mini i { height: 100%; filter: saturate(.7) brightness(.75); }
.mini u { position: absolute; top: -2px; bottom: -2px; width: 2px; }
.share { display: grid; gap: 8px; }
.toast { min-height: 1.4em; color: var(--truth); font-size: .95rem; margin: 0; }

.info { color: var(--dust); font-size: .95rem; max-width: 62ch; border-top: 1px solid var(--seam); padding-top: 20px; }
.info h2 { font: 800 1.35rem/1.1 var(--display); font-stretch: 115%; color: var(--chalk); margin: 24px 0 8px; }
.info h2:first-child { margin-top: 0; }
.info h3 { font: 700 1rem var(--body); color: var(--chalk); margin: 16px 0 4px; }
.info p { margin: 0 0 10px; }
.info strong { color: var(--chalk); }
.ad { border: 1px dashed var(--seam); border-radius: 12px; color: var(--dust); text-align: center; padding: 22px 10px; font-size: .8rem; }
@media (max-width: 420px) { .mark span { display: none; } }
footer { display: flex; flex-wrap: wrap; gap: 16px; font-size: .9rem; color: var(--dust); }

@media (prefers-reduced-motion: reduce) {
  .needle.truth.drop, .gap { animation: none; }
  .progress i, .realm, button { transition: none; }
}

/* Farroo: the map stage */
.stage.map { padding: 0; height: 230px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
.stage.map svg { flex: 1; min-height: 0; width: 100%; display: block; }
.stage.map::after { display: none; }
.stage.map .like { position: static; flex: 0 0 auto; display: block; min-height: 38px; padding: 10px 14px; margin: 0; line-height: 1.35; }
