@font-face {
  font-family: Atkinson;
  src: url('fonts/atkinson/AtkinsonNext.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --f-display: Atkinson, system-ui, sans-serif;
  --f-num: var(--f-display);
  --f-tiny: var(--f-display);
  --snow: #193e37;
  --mist: #526858;
  --ice: #28634d;
  --ember: #975026;
  --danger: #9b3b31;
  --line: #aebca0;
  --well: #fffdf2;
  --t-common: #56645e;
  --t-uncommon: #386343;
  --t-rare: #335d8a;
  --t-legend: #8e5918;
  --t-mythic: #844b82;
}
html, body { margin: 0; overflow: hidden; }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
canvas { display: block; }
#stage { background: #cddfc9; }
body[data-light=dusk] #stage { background: #b5aab2; }
body { font-family: var(--f-display); font-variant-numeric: lining-nums tabular-nums; }
button,input,select { font-family: inherit; font-variant-numeric: inherit; }
.toast { font-family: var(--f-display); }
.stats strong,.big-alt { font-family: system-ui,sans-serif; font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0; }
#help {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  border: 1px solid #859e86; border-radius: 4px; background: #fbf9e9f2; color: var(--pine);
  min-width: 36px; height: 36px; padding: 0 9px;
  font: 700 15px var(--f-display);
}
#help:hover { background-color: #fffdf0; }
#welcome {
  --cream: #fff4dc;
  --mint: #abd6ac;
  --cut: polygon(0 6px,6px 6px,6px 0,calc(100% - 6px) 0,calc(100% - 6px) 6px,100% 6px,100% calc(100% - 6px),calc(100% - 6px) calc(100% - 6px),calc(100% - 6px) 100%,6px 100%,6px calc(100% - 6px),0 calc(100% - 6px));
  flex: 1; min-height: 0; overflow: auto; background: #a6cfc0;
  color: #153e36; text-align: center;
}
.trailhead {
  position: relative; isolation: isolate; display: grid; min-height: 100%;
  grid-template: "title" auto "island" minmax(160px,1fr) "actions" auto / minmax(0,1fr);
  row-gap: clamp(10px,1.8vh,22px);
  padding: max(34px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(22px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
}
.trailhead > #world { z-index: -1; pointer-events: none; }
.trailhead header { grid-area: title; }
#welcome-view { grid-area: island; min-height: 0; margin-inline: 1.5%; }
#game-title { margin: 0 auto; width: min(78%,340px); line-height: 0; }
#game-title img { width: 100%; height: auto; image-rendering: pixelated; }
.daily-subtitle,.menu-help,.daily-action-copy > span,.practice-action,#welcome-date {
  font: 700 13px/1.3 ui-monospace,'Courier New',monospace;
  letter-spacing: .1em; text-transform: uppercase;
}
.daily-subtitle { display: flex; align-items: center; justify-content: center; gap: clamp(5px,1vw,12px); white-space: nowrap; margin: 12px 0 0; font-size: clamp(13px,2.8vw,17px); letter-spacing: .28em; }
.daily-subtitle::before,.daily-subtitle::after {
  content: ''; width: 24px; height: 2px; background: #648d73;
}
.welcome-rule { margin: 12px 0 0; line-height: 1.4; font-size: clamp(15px,1.65vw,19px); font-weight: 600; }
.menu-actions { grid-area: actions; justify-self: center; width: min(100%,420px); display: grid; text-align: left; gap: 8px; }
.menu-help { justify-self: start; padding: 6px 2px; border: 0; background: transparent; color: inherit; }
.menu-help span { color: #8f4d28; }
.menu-help:hover { text-decoration: underline; text-underline-offset: 4px; }
.daily-action,.practice-action,.menu-sound {
  isolation: isolate; position: relative; clip-path: var(--cut); border: 0; color: var(--cream); background: var(--mint);
}
.daily-action::before,.practice-action::before,.menu-sound::before {
  content: ''; position: absolute; inset: 3px; background: #102936; z-index: -1; clip-path: inherit;
}
.daily-action { display: flex; align-items: center; gap: 20px; text-align: left; width: 100%; padding: 19px 22px; }
.daily-action::before { background: linear-gradient(105deg,#254e40,#143b32 78%); }
.daily-action canvas { width: 60px; height: 30px; flex-shrink: 0; }
.daily-action-copy { flex: 1; display: grid; gap: 3px; }
.daily-action-copy > span { color: #b8dcc2; font-size: 12px; }
.daily-action strong { font: 800 clamp(21px,4.6vw,28px)/1.16 var(--f-display); letter-spacing: -.01em; }
.menu-arrow { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid var(--mint); }
.practice-action { padding: 13px 12px; color: #f4f2dc; background: #8da891; }
.practice-action::before,.menu-sound::before { inset: 2px; background: #284a3e; }
.practice-action span { margin-left: 3px; font: 700 18px/12px var(--f-display); vertical-align: -1px; color: var(--mint); }
#welcome button:focus-visible { outline: 2px solid #ffcc78; outline-offset: 2px; }
#go:is(:hover,:focus-visible),#mPractice:is(:hover,:focus-visible),.menu-sound:is(:hover,:focus-visible) { background: #ffe2a3; color: white; }
#go:is(:hover,:focus-visible)::before,#mPractice:is(:hover,:focus-visible)::before,.menu-sound:is(:hover,:focus-visible)::before { background: #1b4350; }
#welcome-date { margin-top: 4px; display: block; text-align: center; font-size: 12px; }
.menu-sound { position: absolute; top: max(14px,env(safe-area-inset-top)); right: max(14px,env(safe-area-inset-right)); width: 42px; height: 42px; background: #7c999e; font: 700 21px/1 system-ui; }
.menu-sound[aria-pressed=false] { text-decoration: line-through; }
.text-button { border: 0; color: #3f614e; font: 600 14px var(--f-display); text-decoration: underline; text-underline-offset: 3px; background: transparent; padding: 7px 12px; margin-top: 10px; }
@media(min-aspect-ratio: 6/5) and (min-width: 600px) {
  .trailhead {
    grid-template: ". island" 1fr "title island" auto "actions island" auto ". island" 1fr / minmax(0,.87fr) minmax(0,1.13fr);
    padding: 5vh max(5vw,calc((100vw - 1400px)/2)) 5vh;
    gap: clamp(16px,3vh,28px) 4vw;
  }
  .trailhead header { align-self: end; }
  #game-title { width: min(96%,420px); }
  #welcome-view { margin: 3vh 0; }
  .menu-actions { align-self: start; }
}
@media(max-width: 540px) {
  #game-title { width: min(67%,265px); }
  .trailhead { padding-top: max(30px,env(safe-area-inset-top)); }
  .daily-subtitle { margin-top: 5px; }
  .daily-action { gap: 13px; padding-inline: 16px; }
  .daily-action canvas { width: 46px; height: 23px; }
}
@media(max-height: 540px) and (min-aspect-ratio: 6/5) {
  .trailhead { padding-block: 14px; row-gap: 8px; }
  #game-title { width: 224px; }
  .welcome-rule { margin-top: 7px; }
  .menu-actions { gap: 6px; }
  .daily-action { gap: 10px; padding: 10px 14px; }
  .daily-action canvas { width: 44px; height: 22px; }
  .daily-action strong { font-size: 21px; }
}
@media(max-width: 360px) {
  .daily-action { gap: 9px; padding: 12px 14px; }
  .daily-action canvas { width: 36px; height: 18px; }
  .daily-action strong { font-size: 20px; }
}
button:disabled { opacity: .48; cursor: default; }
#stage {
  --side-width: clamp(156px,16vw,224px);
  overflow: visible; display: grid;
  grid-template: ". scene ." var(--panel-top,minmax(54px,.53fr)) "history scene guide" minmax(0,1fr) / var(--side-width) minmax(0,1fr) var(--side-width);
  column-gap: clamp(8px,1.7vw,26px);
  padding-inline: max(12px,4.5vw,env(safe-area-inset-left),env(safe-area-inset-right));
}
#climb-view { grid-area: scene; min-height: 0; pointer-events: none; }
.history-panel { grid-area: history; }
.guide-panel { grid-area: guide; }
.pitch-panel {
  --panel-ink: #183a35; --panel-detail: #304f49;
  --t-common: #415551; --t-uncommon: #315e3c; --t-rare: #26597a; --t-legend: #865322; --t-mythic: #774871;
  z-index: 1; align-self: start; display: flex; flex-direction: column; min-height: 0; max-height: min(100%,380px);
  color: var(--panel-ink); text-shadow: 0 1px #f4f6dc50;
}
body[data-light=dusk] .pitch-panel {
  --panel-ink: #140e19; --panel-detail: #19131e;
  --t-common: #3a3241; --t-uncommon: #234b3c; --t-rare: #263f65; --t-legend: #623716; --t-mythic: #582d56;
  text-shadow: 0 1px #f7dace70;
}
.pitch-panel h2 {
  margin: 0 0 17px; color: var(--panel-detail);
  font: 750 13px/1.25 var(--f-display); letter-spacing: .13em; text-transform: uppercase;
}
.pitch-panel ul,.pitch-panel ol {
  list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #57695a88 transparent;
}
.pitch-panel :focus-visible { outline: 2px dashed currentColor; outline-offset: 2px; }
.pitch-panel li {
  position: relative; overflow-wrap: anywhere; font-size: 16px; line-height: 1.15;
}
.pitch-panel li + li { margin-top: 12px; }
.pitch-panel b { color: var(--panel-ink); font-weight: 680; }
.pitch-panel li > small {
  display: block; color: var(--panel-detail); font-size: 13px; line-height: 1.25;
}
#rope li { padding-left: 19px; }
#rope li::before {
  content: ''; position: absolute; left: 2px; top: 5px; width: 7px; height: 7px;
  transform: rotate(45deg); box-shadow: inset 0 0 0 1.5px currentColor;
}
#rope li:first-child::before { background: currentColor; }
#rope .history-start { color: var(--panel-detail); }
#rope li:not(:last-child)::after {
  content: ''; position: absolute; left: 5px; top: 16px; bottom: -13px; width: 1px;
  background: repeating-linear-gradient(to bottom,var(--panel-detail) 0 2px,transparent 2px 5px); opacity: .55;
}
#rope small { margin-top: 3px; }
.hold {
  display: grid; grid-template-columns: 19px minmax(0,1fr) auto; align-items: baseline; gap: 2px 7px;
}
.hold::before {
  content: ''; width: 16px; height: 14px; align-self: center;
  clip-path: var(--stone-shape);
  background: linear-gradient(145deg,transparent 58%,#172b373e 59%),
    linear-gradient(35deg,transparent 57%,#fff2bf77 58% 75%,transparent 76%),currentColor;
}
.hold.t-common { --stone-shape: polygon(5% 58%,33% 32%,70% 32%,95% 63%,76% 86%,18% 86%); }
.hold.t-uncommon { --stone-shape: polygon(0 65%,24% 22%,66% 15%,100% 58%,84% 85%,20% 92%); }
.hold.t-rare { --stone-shape: polygon(4% 55%,35% 9%,68% 9%,100% 49%,61% 90%,25% 90%); }
.hold.t-legend { --stone-shape: polygon(4% 54%,20% 15%,44% 28%,69% 0,96% 46%,68% 87%,25% 100%); }
.hold.t-mythic { --stone-shape: polygon(0 39%,27% 5%,73% 5%,100% 39%,50% 100%); }
.hold-gain { color: var(--panel-ink); font-size: 14px; font-weight: 650; white-space: nowrap; }
.hold-gain small { font-size: .85em; font-weight: 500; }
.hold-range { grid-column: 2 / -1; }
.hold .unavailable { display: none; }
.hold.off .unavailable { display: inline; }
.hold.off .hold-gain { color: var(--panel-detail); text-decoration: line-through; }
.hold.off::before { opacity: .45; }
body:is([data-phase=countdown],[data-phase=pitchEnd]) .pitch-panel { visibility: hidden; }
body[data-phase=final] .pitch-panel { display: none; }
@media (max-width: 900px) and (max-aspect-ratio: 1/1), (max-width: 759px) and (max-aspect-ratio: 3/2), (max-width: 599px) {
  #stage {
    grid-template: "scene scene" minmax(0,1fr) "history guide" min(220px,34%) / minmax(0,1fr) minmax(0,1fr);
    gap: 6px; padding-inline: max(6px,calc((100% - 550px)/2)); padding-bottom: 6px;
  }
  #climb-view { margin-top: max(48px,calc(env(safe-area-inset-top) + 38px)); }
  .pitch-panel { max-height: 100%; margin-inline: clamp(3px,1.7vw,12px); }
  .pitch-panel h2 { font-size: 11px; margin-bottom: 9px; }
  .pitch-panel li { font-size: 14px; }
  .pitch-panel li + li { margin-top: 6px; }
  .pitch-panel li > small { font-size: 12px; }
  #rope li { padding-left: 14px; }
  #rope li:not(:last-child)::after { bottom: -7px; }
  .hold { gap: 0 5px; }
  .hold-gain { font-size: 13px; }
}
@media (max-height: 500px) {
  #stage { --panel-top: clamp(54px,calc(100% - 180px),34%); }
  .pitch-panel h2 { margin-bottom: 6px; font-size: 11px; }
  .pitch-panel .hold { font-size: 13px; line-height: 1.08; row-gap: 0; }
  .hold .hold-range { font-size: 12px; line-height: 1.12; }
  .pitch-panel .hold + .hold { margin-top: 3px; }
}
.trail-panel {
  --frame-ink: #183d34; --frame-detail: #345147;
  --frame-surface: linear-gradient(120deg,#e4ebd5f5,#d0dfc8f5 72%,#c4d7bff5);
  position: relative; isolation: isolate;
  color: var(--frame-ink); filter: drop-shadow(0 2px 0 #30483952);
}
.trail-panel::before {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: var(--frame-surface); border: 9px solid #63745c;
  border-image: url('copperbell/panel-rim.png') 9 stretch;
  clip-path: polygon(
    5px 0,calc(100% - 5px) 0,calc(100% - 5px) 1px,calc(100% - 1px) 1px,calc(100% - 1px) 5px,100% 5px,
    100% calc(100% - 5px),calc(100% - 1px) calc(100% - 5px),calc(100% - 1px) calc(100% - 1px),
    calc(100% - 5px) calc(100% - 1px),calc(100% - 5px) 100%,5px 100%,5px calc(100% - 1px),
    1px calc(100% - 1px),1px calc(100% - 5px),0 calc(100% - 5px),0 5px,1px 5px,1px 1px,5px 1px
  );
}
body[data-light=dusk] .trail-panel {
  --frame-ink: #261f30; --frame-detail: #3d3041;
  --frame-surface: linear-gradient(120deg,#e4dfd1f5,#d8d5c7f5 72%,#cbcdbff5);
}
#dockCard {
  z-index: 2; flex: none; width: min(680px,calc(100% - 24px));
  margin: 0 auto max(12px,env(safe-area-inset-bottom)); padding: 12px 18px 14px;
}
body[data-phase=countdown] #dockCard,body[data-phase=pitchEnd] #dockCard { visibility: hidden; }
.pitch-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 3px 10px; }
.pitch-meta .pitch-line { color: var(--frame-detail); gap: 10px; }
#pips { position: relative; isolation: isolate; align-items: center; gap: 4px; }
#pips::before { content: ''; position: absolute; z-index: -1; inset-inline: 0; height: 1px; background: #668272; }
.pip { width: 5px; height: 5px; background: #b5c8b5; border: 1px solid #617b6e; transform: rotate(45deg); }
.pip:is(.now,.complete,.fell) { border-color: transparent; }
.pip.now { outline: 1px solid #865329; outline-offset: 1px; }
.pip.complete { background: #326647; }
#dockCard h2 {
  margin: 5px 0 2px; color: var(--frame-ink);
  font: 670 clamp(19px,1.7vw,24px)/1.13 var(--f-display); letter-spacing: -.018em;
  overflow-wrap: anywhere; text-wrap: balance;
}
#ledge { margin: 0; color: var(--frame-detail); font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
#ledge b { color: var(--frame-ink); font-weight: 650; }
.climb-status {
  display: flex; align-items: baseline; gap: 5px; white-space: nowrap;
  color: var(--frame-detail); font: 650 11px/1.3 var(--f-display); text-transform: uppercase; letter-spacing: .09em;
}
.climb-status strong {
  color: var(--frame-ink); font-size: 14px; font-weight: 720; letter-spacing: 0; text-transform: none;
}
#ring {
  flex: none; align-self: center; display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: 3px 5px; padding: 0 9px 0 10px; border-right: 1px solid #afbfaa;
  color: #375446; font: 700 10px/1 var(--f-display); text-transform: uppercase; letter-spacing: .055em;
}
#ring strong { grid-column: 2; grid-row: 1; font-size: 13px; letter-spacing: 0; text-transform: none; color: #193c33; }
.time-track {
  grid-column: 1 / -1; grid-row: 2; width: 100%; height: 7px; background: #78908373;
  mask-image: repeating-linear-gradient(to right,#000 0 5px,transparent 5px 7px);
}
#ringBar { display: block; height: 100%; background: #386849; transform-origin: left; }
#ring.low strong { color: #782d27; }
#ring.low #ringBar { background: #923929; }
#dockCard .inputs { display: flex; align-items: stretch; gap: 4px; margin: 8px 0 0; }
.answer-field {
  display: flex; flex: 1; min-width: 0; align-items: stretch;
  background: #f4f5e4; border: 1px solid #9cab94; border-bottom: 2px solid #657d68;
}
.answer-field:focus-within { background: #fbfaec; border-color: #51785f; border-bottom-color: #235840; }
#answer {
  min-width: 0; min-height: 41px; padding: 8px 10px;
  border: 0; border-radius: 0; background: transparent; color: #193c33; caret-color: #23533e;
  font: 450 17px/1.3 var(--f-display);
}
#answer::placeholder { color: #52665a; opacity: 1; }
#answer:focus-visible { outline: none; box-shadow: inset 0 -1px #235840; }
#climbBtn,.modal .btn {
  gap: 8px; padding: 8px 15px; min-height: 44px;
  border: 0; color: var(--button-ink,#fff6d9); background: var(--button-face,#285444); box-shadow: inset 0 -3px var(--button-edge,#183b30);
  clip-path: polygon(0 4px,4px 4px,4px 0,calc(100% - 4px) 0,calc(100% - 4px) 4px,100% 4px,100% calc(100% - 4px),calc(100% - 4px) calc(100% - 4px),calc(100% - 4px) 100%,4px 100%,4px calc(100% - 4px),0 calc(100% - 4px));
  font: 700 16px/1 var(--f-display);
}
#climbBtn canvas { width: 24px; height: 12px; }
#climbBtn:hover:enabled,.modal .btn:hover:enabled { background: var(--button-hover,#31654f); }
#climbBtn:focus-visible,.modal .btn:focus-visible { outline: 2px solid var(--button-focus,#f5d59a); outline-offset: -5px; }
#climbBtn:active:enabled,.modal .btn:active:enabled { transform: translateY(1px); box-shadow: none; }
@media (forced-colors: active) {
  .trail-panel::before { border: 2px solid CanvasText; border-image: none; background: Canvas; }
  #answer:focus-visible,#climbBtn:focus-visible,.modal .btn:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

.chip { flex: none; padding: 2px 6px; font-size: 12px; color: var(--ice); border: 1px solid currentColor; background: var(--well); }
.chip span { color: var(--mist); margin-left: 5px; }
.chip-start { color: var(--mist); border-style: dashed; }
.chip-fell { color: var(--danger); }
.t-common { color: var(--t-common); }
.t-uncommon { color: var(--t-uncommon); }
.t-rare { color: var(--t-rare); }
.t-legend { color: var(--t-legend); }
.t-mythic { color: var(--t-mythic); }
.chart b::before { content: ''; background: currentColor; display: inline-block; width: 6px; height: 6px; }

.pop { top: max(18px,env(safe-area-inset-top)); left: 50%; width: max-content; max-width: min(480px, 90%); transform: translateX(-50%); text-align: center; pointer-events: none; opacity: 0; }
.pop.show { opacity: 1; }
.pop.hide { opacity: 0; transition: opacity .25s; }
.pop-word { display: inline-block; font: 750 clamp(18px, 2.6vw, 28px)/1.1 var(--f-display); padding: 6px 12px; border-radius: 5px; background: #203c31f0; }
.pop.show .pop-word { animation: arrive .3s steps(7); }
.pop-sub { display: block; border-radius: 3px; font-size: 14px; color: var(--linen); background: var(--pine); padding: 5px 10px; margin: 5px 0; max-width: min(100%, 650px); }
@keyframes arrive { from { transform: translateY(9px) scale(.95); opacity: 0; } }
.flash { inset: 0; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .42s ease-out; }
@keyframes flash { from { opacity: .19; } }
.toast { position: fixed; bottom: var(--dock-h, 165px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border: 1px solid #d9d9b6; }
.toast.bad { border-left: 5px solid #ed9679; }
.toast.warn { border-left: 5px solid #e8be62; }

/* Pitch previews, rules and scorecards */
.veil { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); border: 0; color: var(--ink); background: transparent; overflow-y: auto; }
.veil[open] { display: flex; align-items: safe center; justify-content: center; }
.veil::backdrop { background: #15382f65; }
.veil.clear::backdrop { background: #25463728; }
.modal {
  --mist: var(--frame-detail); --line: #98ae96; --well: #eef3df9c;
  margin: auto; flex: none; width: min(550px, 100%); padding: clamp(20px, 3vw, 29px);
  display: grid; gap: 13px; overflow-wrap: anywhere;
}
.modal.small { width: min(480px, 100%); }
.eyebrow { font: 700 12px/1.35 var(--f-tiny); text-transform: uppercase; letter-spacing: .085em; color: var(--mist); }
.big-q,.result-head { margin: 0; font: 700 clamp(27px, 4.5vw, 40px)/1.05 var(--f-display); text-wrap: balance; }
.preview-ledge { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-left: 3px solid #75997b; padding: 6px 10px; font-size: 16px; background: var(--well); }
.preview-ledge span:first-child { flex-basis: 100%; font: 650 11px/1.3 var(--f-display); text-transform: uppercase; letter-spacing: .07em; color: var(--mist); }
.preview-start { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pitch-watch { position: relative; width: 54px; flex: none; color: var(--pine); }
.pitch-watch svg { display: block; width: 100%; }
.pitch-watch b {
  position: absolute; inset: 9.375% 0 0; display: grid; place-items: center;
  font: 750 22px/1 var(--f-display); font-variant-numeric: tabular-nums;
}
.watch-arc { stroke: #4a8167; animation: watch-drain var(--duration) linear forwards; }
.last-seconds .watch-arc { stroke: #bd8140; }
.watch-hand { transform-origin: 30px 35px; animation: watch-sweep var(--duration) linear forwards; }
@keyframes watch-drain { to { stroke-dashoffset: -100; } }
@keyframes watch-sweep { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .watch-arc { animation: none; stroke-dashoffset: calc(-100 * var(--elapsed,0)); }
  .watch-hand { animation: none; transform: rotate(calc(1turn * var(--elapsed,0))); }
}
.muted,.missed,.fine { margin: 0; line-height: 1.45; }
.muted,.missed { color: var(--mist); font-size: 15px; }
.fine { color: var(--mist); font-size: 13px; }
.modal .btn { padding: 11px 18px; font-size: 17px; }
.modal .btn-quiet { --button-ink: #244b3d; --button-face: #bacfb3; --button-edge: #829a80; --button-hover: #ccdec2; --button-focus: #365d48; }
.rules { padding: 0 0 0 18px; margin: 0; display: grid; gap: 7px; font-size: 15px; }
.rules li::marker { color: var(--ice); }
.rules .warn::marker { color: var(--danger); }
.chart { display: grid; grid-template-columns: repeat(5,1fr); border: 1px solid var(--line); background: var(--well); }
.chart div { display: grid; gap: 4px; padding: 9px 6px; border-left: 1px solid var(--line); }
.chart div:first-child { border-left: 0; }
.chart b { display: flex; align-items: center; gap: 4px; font: 700 16px var(--f-display); }
.chart span { font-size: 12px; color: var(--mist); }
.chart strong { font: 700 20px var(--f-display); }
.rope-wrap,.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.rope-wrap .chip { flex: 0 1 auto; overflow-wrap: anywhere; }
.scorecard { width: min(635px, 100%); }
.scorecard-head,.legs { display: grid; gap: 5px; }
.big-alt { font: 700 clamp(40px, 8vw, 69px)/1 var(--f-display); color: var(--ice); margin: 0; }
.rank { font: 700 20px var(--f-display); margin: 0; }
.legs h3,.answer-review h4 { font: 700 21px var(--f-display); margin: 0; }
.leg { min-width: 0; border: 1px solid var(--line); background: var(--well); }
.leg[open] { border-color: var(--ice); }
.leg summary,.leg-static { list-style: none; display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; padding: 7px 9px; font-size: 15px; }
.leg summary { cursor: pointer; }
.leg summary::-webkit-details-marker { display: none; }
.leg summary:hover,.leg[open] summary { background: #a7bea24d; }
.leg-name { flex: 1 1 145px; font-weight: 600; }
.leg-result { overflow-wrap: anywhere; color: var(--mist); font-size: 13px; }
.leg summary::after { content: '▸'; color: var(--ice); }
.leg[open] summary::after { content: '▾'; }
.answer-review { display: grid; gap: 8px; padding: 10px; }
.answer-controls { display: flex; flex-wrap: wrap; gap: 7px; }
.answer-controls label { flex: 1 1 125px; min-width: 0; display: grid; gap: 3px; font-size: 13px; color: var(--mist); }
.answer-controls input,.answer-controls select { border: 1px solid #91a287; background: #f4f5e4; color: var(--frame-ink); width: 100%; min-width: 0; border-radius: 0; min-height: 35px; padding: 4px 6px; font: 16px var(--f-display); }
.answer-count { margin: 0; font-size: 13px; color: var(--mist); }
.answer-list { max-height: min(300px, 36dvh); overflow: auto; margin: 0; padding: 0; border-block: 1px solid var(--line); }
.answer-list li { display: grid; grid-template-columns: minmax(0,1fr) minmax(0, 8em); align-items: start; gap: 8px; padding: 6px; font-size: 14px; }
.answer-list li:nth-child(odd) { background: #a7bea22e; }
.answer-list li.played { background: #a7bea266; box-shadow: inset 2px 0 var(--ice); }
.answer-name { overflow-wrap: anywhere; }
.answer-status,.answer-measure b { display: block; font-size: 13px; }
.answer-status,.answer-measure { color: var(--mist); }
.answer-status.slipped,.t-short { color: var(--danger); }
.answer-measure { text-align: right; }
.share { background: var(--well); border: 1px dashed #91a287; margin: 0; padding: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.4 var(--f-tiny); }
.btn-row { gap: 9px; }
.btn-row .btn { flex: 1 1 165px; font-size: 17px; }
@media (max-width: 659px) {
  #dockCard { width: calc(100% - 14px); padding: 10px 12px 12px; margin-bottom: max(7px,env(safe-area-inset-bottom)); }
  #answer,#climbBtn { min-height: 44px; }
  #ring { padding-inline: 6px; gap: 3px; }
  #climbBtn { padding-inline: 10px; gap: 5px; }
  #climbBtn canvas { width: 20px; height: 10px; }
}
@media(max-width: 720px) {
  .chart { grid-template-columns: 1fr; }
  .chart div { display: flex; align-items: center; gap: 12px; padding: 4px 8px; border: 0; border-bottom: 1px solid var(--line); }
  .chart div:last-child { border: 0; }
  .chart span { margin-left: auto; }
  .chart strong { min-width: 56px; text-align: right; font-size: 17px; }
}
@media(max-width: 540px) {
  .pitch-meta .pitch-line { gap: 6px; font-size: 10px; }
  .climb-status { font-size: 10px; letter-spacing: .035em; }
  .climb-status strong { font-size: 12px; }
  #pips { gap: 3px; }
  #dockCard h2 { margin-top: 4px; }
  #ledge { font-size: 13px; }
  #ledge .left { display: none; }
  .modal { gap: 10px; }
}
@media(max-height: 460px) {
  #dockCard { margin-bottom: max(5px,env(safe-area-inset-bottom)); padding-block: 8px 10px; }
  #dockCard .inputs { margin-top: 5px; }
  #dockCard h2 { margin-top: 3px; }
}
@media (max-width: 360px) {
  #climbBtn canvas { display: none; }
  .pitch-meta { column-gap: 5px; }
  #pips { gap: 2px; }
  .pip { width: 4px; height: 4px; }
}
@media(prefers-reduced-motion: reduce) {
  .pop.show .pop-word,.flash.go { animation: none; }
}

@media(max-width:720px) { .pop { top: 57px; } .pitch-line { letter-spacing: .035em; } }
