.game-shell .play:has(.scale-pilot) { background: #f3edf6; color: #30243b; }
.game-shell.wide .play:has(.scale-pilot) {
  max-width: 96rem;
  min-height: calc(100dvh - 56px);
  justify-content: center;
  padding: clamp(.85rem, 2.3vw, 2.8rem);
}
.scale-pilot {
  width: 100%;
  max-width: 77rem;
  min-width: 0;
  margin-inline: auto;
}
.game-shell .play .scale-pilot { text-align: start; }
.game-shell .play .scale-pilot p { max-width: none; margin-inline: 0; color: var(--pilot-muted); }
.game-shell .play .scale-pilot .scale-pilot-head { margin-block-end: clamp(.6rem,1.5vh,1.05rem); }
.game-shell .play .scale-pilot .scale-pilot-head p { color: var(--pilot-accent); font-weight: 720; margin: 0 0 .2rem; }
.game-shell .play .scale-pilot .scale-pilot-head h2 {
  margin: 0;
  color: var(--pilot-ink);
  outline: none;
  font-size: clamp(1.45rem, min(3.8vw,6dvh),3.3rem);
  line-height: 1.12;
  text-wrap: balance;
}
.game-shell .play .scale-pilot form { margin: 0; max-width: none; width: 100%; }
.scale-pilot-anchor-inputs {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .7rem 1.5rem;
}
.game-shell .play .scale-pilot-anchor-inputs label,
.game-shell .play .scale-pilot-hint-edit {
  min-width: 0;
  color: var(--pilot-ink);
}
.scale-pilot-anchor-inputs label strong { display: block; font-size: 1.25rem; }
.scale-pilot-anchor-inputs label span { display: block; font-size: .95rem; color: var(--pilot-muted); }
.scale-pilot-anchor-inputs input, .scale-pilot-hint-edit textarea { width: 100%; min-height: 46px; }
.scale-pilot [data-scale-error] { color: #8b2437; margin-block: .3rem 0; }
.scale-pilot [data-scale-error]:empty { display: none; }
.scale-pilot-board {
  display: grid;
  gap: .35rem;
  margin-block: .55rem;
  padding: clamp(.8rem,2.55vw,1.9rem);
  color: var(--pilot-ink);
  background: linear-gradient(110deg,#fffdf2,#f4e8f2);
  border: 1px solid #d8c8d9;
  border-radius: .8rem;
  min-width: 0;
}
.scale-pilot-endpoints {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .65rem;
  margin: 0;
}
.scale-pilot-endpoints div:last-child { text-align: end; }
.scale-pilot-endpoints dt {
  color: var(--pilot-ink);
  font-weight: 780;
  font-size: clamp(1.02rem,2.3vw,1.85rem);
  overflow-wrap: anywhere;
}
.scale-pilot-endpoints dd {
  color: var(--pilot-muted);
  margin: .1rem 0 0;
  overflow-wrap: anywhere;
}
.scale-pilot-ruler {
  position: relative;
  margin: .45rem .3rem 0;
  height: 2rem;
  border-top: 2px solid #785b89;
  font-variant-numeric: tabular-nums;
}
.scale-pilot-ruler::before {
  content: "";
  display: block;
  height: .49rem;
  background: repeating-linear-gradient(90deg,#765b835f 0 1px,transparent 1px 5%);
}
.scale-pilot-ruler i { position: absolute; top: -.13rem; left: var(--spot); width: 1px; height: .72rem; border-inline-start: 1px solid #785b89; }
.scale-pilot-ruler i span { position: absolute; top: .75rem; transform: translateX(-50%); font-size: .88rem; font-style: normal; color: #654f70; white-space: nowrap; width: max-content; overflow-wrap: normal; }
.scale-pilot-secret {
  justify-self: center;
  min-width: 8rem;
  padding: .38rem .9rem;
  text-align: center;
  color: #fff8ff;
  background: #593a6c;
  border-radius: .45rem;
}
.scale-pilot-secret span { display: block; font-weight: 650; }
.scale-pilot-secret strong {
  display: block;
  font-size: clamp(1.55rem,4.3vw,3.25rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
}
.scale-pilot-hint-edit textarea { resize: vertical; }
.scale-pilot-clue { margin: .4rem 0 .55rem; padding-inline-start: .55rem; border-inline-start: 3px solid #a88bb5; }
.scale-pilot-clue > strong { font-size: .9rem; color: var(--pilot-muted); }
.scale-pilot blockquote { margin: .1rem 0 .35rem; color: var(--pilot-ink); font-size: clamp(1.04rem,2.06vw,1.38rem); overflow-wrap: anywhere; }
.game-shell .play .scale-pilot .scale-pilot-slider {
  display: grid;
  gap: .15rem .55rem;
  grid-template-columns: 1fr auto;
  align-items: center;
  color: var(--pilot-ink);
}
.scale-pilot-slider output { font-weight: 800; font-size: 1.5rem; color: var(--pilot-accent); }
.game-shell .play .scale-pilot-slider input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  accent-color: var(--pilot-accent);
  cursor: ew-resize;
}
.scale-pilot-tune, .scale-pilot-actions, .scale-pilot-archive {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem .5rem;
  align-items: center;
  margin-block: .62rem .2rem;
}
.game-shell .play .scale-pilot button:not([hidden]) { min-height: 44px; }
.game-shell .play .scale-pilot-actions .button.cta {
  color: #fff;
  background: var(--pilot-accent);
  border-color: var(--pilot-accent);
}
.game-shell .play .scale-pilot-actions .button.secondary {
  background: #fefaf8;
  color: var(--pilot-accent);
  border-color: #bdabc6;
}
.scale-pilot-tune button, .scale-pilot-archive button {
  border: 1px solid #c3afce;
  border-radius: .42rem;
  padding: .32rem .64rem;
  min-width: 46px;
  font: inherit;
  font-weight: 690;
  color: var(--pilot-accent);
  background: var(--pilot-paper);
  cursor: pointer;
}
.scale-pilot-archive button[aria-current="true"] { background: #e4d3ee; border-color: #7b5397; }
.scale-pilot :is(button,input,textarea):focus-visible { outline: 3px solid #8b60a4; outline-offset: 2px; }
.scale-pilot-result-ruler { height: 7.5rem; position: relative; isolation: isolate; padding-inline: .45rem; margin: .2rem .15rem 0; }
.scale-pilot-bands { position: absolute; inset: 42% .45rem auto; height: .86rem; border-radius: .3rem; background: #efd5dd; }
.scale-pilot-bands > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--low);
  width: var(--width);
  border-inline: 1px solid #6c477b4a;
}
.scale-pilot-bands [data-scale-band="1"] { background: #eedaa7; }
.scale-pilot-bands [data-scale-band="2"] { background: #c3ded3; }
.scale-pilot-bands [data-scale-band="3"] { background: #91bfaf; }
.scale-pilot-marker {
  position: absolute;
  inset-inline: .45rem;
  top: 1.62rem;
  height: 1rem;
}
.scale-pilot-marker i {
  position: absolute;
  left: var(--spot);
  top: -.12rem;
  min-width: 9px;
  height: 3.44rem;
  transform: translateX(-50%);
  background: #466957;
  clip-path: polygon(35% 0,65% 0,65% 86%,100% 86%,50% 100%,0 86%,35% 86%);
}
.scale-pilot-marker span {
  position: absolute;
  left: clamp(3.25rem,var(--spot),calc(100% - 3.25rem));
  transform: translate(-50%,-90%);
  white-space: nowrap;
  font-size: .89rem;
  font-weight: 720;
  color: #315d48;
}
.scale-pilot-attempt { top: 5.52rem; }
.scale-pilot-attempt i {
  top: auto;
  bottom: -.05rem;
  height: 3.44rem;
  background: #70448b;
  transform: translateX(-50%) rotate(180deg);
}
.scale-pilot-attempt span { transform: translate(-50%,112%); color: #6a427f; }
.scale-pilot-result-metrics { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; margin: .72rem 0; }
.scale-pilot-result-metrics dd { margin: 0; font-size: 1.35rem; font-weight: 780; color: var(--pilot-ink); }
.scale-pilot-result-metrics dt { color: var(--pilot-muted); }
.scale-pilot-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .37rem .83rem;
  margin: 0;
  padding: 0;
  color: var(--pilot-muted);
  font-size: .92rem;
}
.scale-pilot-legend li { margin: 0; padding-inline-start: .38rem; border-inline-start: 3px solid var(--zone, #efd5dd); }
.scale-pilot-legend li:nth-child(1) { --zone: #648f7c; }
.scale-pilot-legend li:nth-child(2) { --zone: #91b3a5; }
.scale-pilot-legend li:nth-child(3) { --zone: #c59440; }
.scale-pilot-total { color: var(--pilot-accent); font-size: clamp(1.6rem,5vw,3.7rem); }
@media (max-width: 600px) {
  .scale-pilot-anchor-inputs { grid-template-columns: minmax(0,1fr); }
  .scale-pilot-legend { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .scale-pilot-marker span { font-size: .82rem; }
}

.page-game .game-shell.theme-scale:not(.theme-wolf) {
  --pilot-ink:#16372e;
  --pilot-muted:#355045;
  --pilot-accent:#185547;
  --pilot-paper:#fff8e6;
  --pilot-border:#91aa93;
  --pilot-guess:#9d460c;
  --pilot-zone-1:#efd078;
  --pilot-zone-2:#bad6a2;
  --pilot-zone-3:#76ad88;
  --pilot-zone-0:#efb6a8;
  --brand:var(--pilot-accent);
  --stage-ink:var(--pilot-ink);
  --soft:#f3f3df;
  --stage:#d0dfc8;
  --line:var(--pilot-border);
  background:
    repeating-linear-gradient(0deg,transparent 0 21px,#62836a16 21px 22px),
    repeating-linear-gradient(90deg,transparent 0 21px,#62836a16 21px 22px),
    radial-gradient(ellipse at 19% 12%,#e5eedc,transparent 64%),#cedec9;
}
.page-game .game-shell.theme-scale .play {background:none;color:var(--pilot-ink)}
.page-game .game-shell.theme-scale .game-toolbar {background:var(--soft)}
.page-game .game-shell.wide.theme-scale .play:has(.scale-pilot) {
  max-width:100rem;
  min-height:0;
  margin:0 auto;
  justify-content:flex-start;
  padding:clamp(.8rem,3vw,2.5rem) clamp(.8rem,4vw,3rem) 1.65rem;
}
.game-shell .play .scale-pilot {max-width:89rem}
.game-shell .play .scale-pilot .scale-pilot-head h2 {
  color:var(--pilot-ink);
  font-size:clamp(1.66rem,min(4.35vw,6.4vh),3.85rem);
  font-weight:850;
  line-height:1.07;
  letter-spacing:-.034em;
}
.game-shell .play .scale-pilot .scale-pilot-head p {
  color:var(--pilot-accent);
  font-size:clamp(.875rem,1.4vw,1.05rem);
  font-weight:800;
}
.game-shell .play .scale-pilot button:not([hidden]),.page-game .theme-scale .game-toolbar .button {
  min-height:46px;
  padding:.48rem .78rem;
  white-space:normal;
}
.page-game .game-shell.theme-scale .play .scale-pilot .button.cta {
  color:#fff9ea;
  background:var(--pilot-accent);
  border-color:var(--pilot-accent);
}
.page-game .game-shell.theme-scale :is(.button.secondary,.game-toolbar .button) {
  color:var(--pilot-ink);
  background:#fff7e4;
  border-color:#789783;
}
.scale-pilot :is(button,input,textarea):focus-visible {outline-color:#80501c}
.scale-pilot-anchor-inputs input,.scale-pilot-hint-edit textarea {
  color:var(--pilot-ink);
  background:#fffaf0;
  border:1px solid #8da592;
  font-size:1rem;
}
.scale-pilot-board {
  --pilot-rim:.52rem;
  background:linear-gradient(140deg,#fffbed,#fbf1d9);
  border-color:#8ea996;
  border-radius:clamp(.5rem,1.4vw,1.1rem);
  box-shadow:0 4px 0 #64837449,0 9px 19px #416a4e1f;
}
.scale-pilot-endpoints dt {font-size:clamp(1rem,2.8vw,2.2rem)}
.scale-pilot-ruler {margin-inline:calc(.15rem + var(--pilot-rim));border-color:#385c51}
.scale-pilot-ruler::before {
  background:repeating-linear-gradient(90deg,#4b6d5f88 0 1px,transparent 1px 5%);
}
.scale-pilot-ruler i {border-inline-start-color:#31574a}
.scale-pilot-ruler i span {color:#35574b;font-weight:700}
.scale-pilot-secret {background:#1c5145;color:#fff9e8}
.scale-pilot-clue {border-inline-start-color:var(--pilot-guess)}
.scale-pilot-slider output {color:var(--pilot-guess)}
.game-shell .play .scale-pilot-slider input {accent-color:var(--pilot-guess)}
.scale-pilot-tune button,.scale-pilot-archive button {
  border-color:#8ba294;
  background:#fff7e3;
  color:var(--pilot-ink);
}
.scale-pilot-tune button:disabled {background:#e1eadb;color:#4d655b;cursor:default}
.scale-pilot-archive button[aria-current=true] {
  color:#fff9e9;
  background:var(--pilot-accent);
  border-color:var(--pilot-accent);
}

.scale-pilot-result-ruler {
  height:clamp(6rem,16vh,8.5rem);
}
.scale-pilot-bands {
  inset:50% var(--pilot-rim) auto;
  height:1rem;
  transform:translateY(-50%);
  border-radius:1rem;
  background:var(--pilot-zone-0);
  overflow:hidden;
}
.scale-pilot-bands > span {border-color:#6a795843}
.scale-pilot-bands [data-scale-band="1"] {background:var(--pilot-zone-1)}
.scale-pilot-bands [data-scale-band="2"] {background:var(--pilot-zone-2)}
.scale-pilot-bands [data-scale-band="3"] {background:var(--pilot-zone-3)}
.scale-pilot-marker,.scale-pilot-marker.scale-pilot-attempt {
  inset:0 var(--pilot-rim);
  height:auto;
  pointer-events:none;
}
.scale-pilot-marker i,.scale-pilot-attempt i {
  inset:auto auto 50% var(--spot);
  width:1.03rem;
  min-width:0;
  height:1.03rem;
  transform:translateX(-50%);
  background:var(--pilot-accent);
  border:2px solid #fff9e7;
  border-radius:50%;
  clip-path:none;
}
.scale-pilot-attempt i {
  inset:50% auto auto var(--spot);
  border:0;
  border-radius:0;
  background:var(--pilot-guess);
  clip-path:polygon(50% 0,100% 100%,0 100%);
}
.scale-pilot-marker span,.scale-pilot-marker.scale-pilot-attempt span {
  inset:auto auto calc(50% + 1.15rem) var(--spot);
  transform:translateX(calc(-1 * var(--spot)));
  width:max-content;
  max-width:100%;
  padding:.18rem .47rem;
  border:1px solid currentColor;
  border-radius:.32rem;
  background:#fff9e9;
  color:var(--pilot-accent);
  white-space:normal;
  line-height:1.25;
  font-size:clamp(.79rem,1.35vw,1.02rem);
}
.scale-pilot-marker.scale-pilot-attempt span {
  inset:calc(50% + 1.15rem) auto auto var(--spot);
  color:var(--pilot-guess);
}
.scale-pilot-result-metrics dd {font-size:clamp(1.45rem,2.25vw,2.25rem)}
.scale-pilot-legend li:nth-child(1) {--zone:var(--pilot-zone-3)}
.scale-pilot-legend li:nth-child(2) {--zone:var(--pilot-zone-2)}
.scale-pilot-legend li:nth-child(3) {--zone:var(--pilot-zone-1)}
.scale-pilot-legend li:nth-child(4) {--zone:var(--pilot-zone-0)}

@media (min-width:1000px) and (max-height:800px) {
  .page-game .game-shell.wide.theme-scale .play:has(.scale-pilot) {padding-block:.85rem 1.1rem}
  .scale-pilot-board {padding-block:.85rem}
}
