/* connectle v2. Shell rules from the mobile-web-shell skill (svh, safe areas, minmax(0,1fr) tracks,
   touch-action scoped); palette shared with fly-song and the binf games series. */
:root {
  --bg:#0d1117; --panel:#161b22; --edge:#666e7a; --ink:#f0f6fc; --dim:#b1bac4;
  --board:#11161d; --acc:#d2a8ff; --hit:#4ac26b; --near:#e3b341; --far:#8b949e; --stop:#ff7b72;
  --t-num: clamp(1.4rem, 1.2rem + 1vw, 2rem); --t-body: clamp(1.05rem, 1rem + .3vw, 1.25rem);
  --t-lab: clamp(.95rem, .9rem + .25vw, 1.1rem);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sa-t: env(safe-area-inset-top, 0px); --sa-r: env(safe-area-inset-right, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px); --sa-l: env(safe-area-inset-left, 0px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg:#ffffff; --panel:#f6f8fa; --edge:#57606a; --ink:#1f2328; --dim:#424a53;
          --board:#eef1f4; --acc:#6f42c1; --hit:#1a7f37; --near:#9a6700; --far:#6e7781; --stop:#cf222e; color-scheme: light; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body { -webkit-tap-highlight-color: transparent; }
a { color: var(--acc); }

#app { position: fixed; inset: 0; height: 100vh; height: 100svh; max-width: 640px; margin-inline: auto; display: grid;
  /* The map's 150 px floor lives on the TRACK: on the box alone it overflowed a 0-height track and
     covered the first row of choices at 320x568 (every automated probe passed; the screenshot showed it). */
  grid-template-rows: auto auto minmax(150px, 1fr) auto auto auto auto auto;
  grid-template-areas: "hud" "goal" "map" "here" "choices" "legend" "fb" "end";
  gap: .4rem; padding: max(8px, var(--sa-t)) max(12px, var(--sa-r)) max(12px, var(--sa-b)) max(12px, var(--sa-l));
  overflow-y: auto; overscroll-behavior: contain; }
#app.done { grid-template-rows: auto auto minmax(260px, 50svh) auto auto auto auto auto; }

#hud { grid-area: hud; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
#brand { font: 700 var(--t-num)/1 var(--mono); margin: 0; letter-spacing: -.02em; }
#day { color: var(--dim); font: 500 var(--t-lab) var(--mono); }
nav { display: flex; gap: .4rem; }
button { font: inherit; color: var(--ink); background: var(--panel); border: 1.5px solid var(--edge);
  border-radius: 8px; min-width: 44px; min-height: 44px; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
button.icon { font-size: var(--t-body); font-weight: 700; }
/* Ink, not purple: purple is kept for the ring, so it always means "you". */
button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; padding: .5rem 1rem; }

#goal { grid-area: goal; margin: 0; font-size: var(--t-lab); color: var(--dim); font-variant-numeric: tabular-nums; }
#goal > b { color: var(--ink); }
#goal .sub { font-size: .85em; }
#app.done #goal .sub { display: none; }
#left { font-family: var(--mono); color: var(--ink); font-size: 1.15em; }
#goal.low #left, #goal.low #left-word { color: var(--stop); font-weight: 700; }
#goal-part { color: var(--hit) !important; }
#goal .tgt, .tgt { color: var(--hit); font-weight: 700; }
.red, b.red { color: var(--stop); }
button.ghost { background: transparent; font-size: .9rem; padding: 0 .8rem; }
button:disabled { cursor: default; }
/* Dataset IDs are not a first-move clue on a phone. Keep them available, quietly, on wide screens. */
.code { display: none; }
@media (min-width: 700px) and (min-height: 561px) { .code { display: inline; margin-left: .35em; font: 500 .62rem var(--mono); color: var(--dim); white-space: nowrap; } }
#mapbox { grid-area: map; position: relative; min-height: 150px; background: var(--board); border-radius: 6px; overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; cursor: pointer; }
#btn-anatomy { position: absolute; top: .45rem; right: .45rem; min-width: 44px; min-height: 44px; padding: 0 .65rem;
  background: color-mix(in srgb, var(--panel) 86%, transparent); color: var(--dim); border-color: var(--edge); font-size: .78rem; }
/* Onboarding and progress: coach bubble and route trail sit INSIDE the map box (no new grid rows). */
#meter { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: .3rem; }
#meter i { width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--hit); transition: background-color .3s; }
#meter i.on { background: var(--hit); }
/* Coach tips take over the line under the map (never over it): an in-map bubble hid the target or the choices. */
#here { grid-area: here; display: flex; align-items: center; gap: .5rem; }
#here-text { margin: 0; flex: 1; font-size: var(--t-lab); overflow-wrap: anywhere; line-height: 1.3; }
#here.coaching #here-text { background: var(--panel); border-left: 4px solid var(--ink); border-radius: 2px;
  padding: .45rem .7rem; position: relative; }
#here .cx { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); background: none; border: 0;
  font-size: 1.3rem; color: var(--dim); }
#btn-hint { flex: none; }
#app.done #btn-hint { display: none; }
#choices { grid-area: choices; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.choice { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); column-gap: .45rem; align-items: center;
  text-align: left; padding: .3rem .5rem; min-height: 3.3rem; }
.choice .k { grid-row: 1 / 3; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.choice .t { font-weight: 700; font-size: .98rem; line-height: 1.2; overflow-wrap: anywhere; }
.choice .m { font-size: .85rem; line-height: 1.2; color: var(--dim); }
.choice .m .tgt { color: var(--hit); }
.choice.closer { border: 2px solid var(--hit); background: color-mix(in srgb, var(--hit) 10%, var(--panel)); }
.choice.closer .k { background: var(--hit); }
.choice.closer .m { color: var(--ink); }
.choice.s-n, .choice.s-x { opacity: .55; cursor: default; border-style: dashed; }
.choice.s-n .k, .choice.s-x .k { background: transparent; color: var(--far); border: 2px dashed var(--far); }
.choice.s-n, .choice.s-x { border-color: var(--far); }
.choice.stop { border-color: var(--stop); }
.choice.stop .k { background: transparent; color: var(--stop); border: 2.5px solid var(--stop); }
.choice.stop .m { color: var(--stop); font-weight: 700; }
.choice-flight { position: fixed; z-index: 20; margin: 0; pointer-events: none; transform-origin: center;
  transition: transform .34s cubic-bezier(.2,.8,.35,1), opacity .34s ease; }
.choice-flight.flying { transform: translate(var(--flight-x), var(--flight-y)) scale(.34); opacity: .05; }
#legend { grid-area: legend; margin: -.05rem 0 0; display: flex; flex-wrap: wrap; gap: .05rem .55rem;
  color: var(--dim); font-size: .78rem; line-height: 1.25; }
#legend span + span::before { content: "·"; margin-right: .55rem; color: var(--edge); }
#legend .k-you { color: var(--acc); font-weight: 700; }
#legend .k-stop { color: var(--stop); font-weight: 700; }
#app.done #legend { display: none; }
#app.done #fb { display: none; }
#fb { grid-area: fb; margin: 0; min-height: 1.5em; font-size: var(--t-lab); font-weight: 700; text-align: center; }
#fb.r-c { color: var(--hit); }
#fb.r-x { color: var(--stop); }

#end { grid-area: end; background: var(--panel); border-top: 3px solid var(--ink); border-radius: 0; padding: .75rem 1rem; }
#end h2 { margin: 0 0 .3rem; font-size: var(--t-body); }
#end h3 { margin: .8rem 0 .2rem; font-size: var(--t-lab); }
#end h2 { font-size: var(--t-num); line-height: 1.15; }
#end.won h2 { color: var(--hit); }
#end .more { margin: .6rem 0 0; font-size: .95rem; }
#verdict { margin: 0 0 .6rem; font-size: var(--t-body); }
#model-line { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.4; }
#mine, #best { margin: .6rem 0 .2rem; font-size: .95rem; overflow-wrap: anywhere; }
#best { margin-top: .2rem; }
.why summary { color: var(--dim); }
.why p { color: var(--dim); font-size: .95rem; line-height: 1.4; }
#brainbox { margin: .7rem 0 .2rem; }
#brain { display: block; height: min(60svh, 560px); aspect-ratio: 751 / 1016; max-width: 100%; margin: 0 auto;
  background: #0b0f14; border-radius: 12px; }
#brain-cap { text-align: center; margin: .35rem 0 0; }
#best { color: var(--dim); }
.note { margin: 0 0 .5rem; color: var(--dim); font-size: .9rem; }
#bars { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .3rem; }
#bars li { display: grid; grid-template-columns: 11ch minmax(0, 1fr) 5ch; align-items: center; gap: .5rem; font-size: var(--t-lab); }
#bars .bar { height: 1rem; background: var(--board); border-radius: 4px; overflow: hidden; }
#bars .bar i { display: block; height: 100%; background: var(--far); }
#bars li.top .bar i { background: var(--ink); }
#bars li.tgt .bar i { background: var(--hit); }
#bars li.tgt span:first-child { color: var(--hit); font-weight: 700; }
#bars .v { text-align: right; font-family: var(--mono); font-size: .9em; }
#endrow { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
#endrow .ghost { min-height: 44px; }
#next { color: var(--dim); font: 500 .9rem var(--mono); margin: .5rem 0 0; }
#next:empty { display: none; }

dialog { max-width: min(560px, 92vw); background: var(--panel); color: var(--ink); border: 1px solid var(--edge);
  border-radius: 8px; padding: 1rem 1.25rem; font-size: 1.05rem; line-height: 1.45; }
dialog::backdrop { background: rgb(0 0 0 / .6); }
dialog[open] { display: flex; flex-direction: column; gap: .75rem; max-height: min(88svh, 760px); }
.dlg-body { overflow-y: auto; min-height: 0; }
.dlg-body h2 { margin-top: 0; }
dialog form { flex: none; margin: 0; }
dialog form button { width: 100%; }
details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸"; margin-right: .5ch; }
details[open] summary::before { content: "▾"; }
kbd { border: 1px solid var(--edge); border-radius: 4px; padding: 0 .3em; }
#toast { position: fixed; left: 50%; bottom: max(24px, var(--sa-b)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: .5rem 1rem; border-radius: 6px; font-weight: 700; }

/* Narrow phones: drop the class label so each choice keeps two lines. Short phones (568 px tall):
   smaller map floor and tighter rows, so all six choices fit above the fold at the start. */
@media (max-width: 360px) { .choice .code { display: none; } #day { display: none; } #goal .sub { display: none; } }
@media (max-width: 360px) { #budget { min-width: 0; white-space: normal; text-align: right; } #goal { gap: 4px; font-size: .84rem; } }
@media (max-height: 620px) and (max-aspect-ratio: 4 / 3) {
  #app { grid-template-rows: auto auto minmax(120px, 1fr) auto auto auto auto auto; gap: .3rem; }
  #goal br { display: none; }
  #mapbox { min-height: 120px; }
  #choices .choice { min-height: 2.9rem; padding-block: .2rem; }
  #goal, #here { font-size: .9rem; }
  #legend { font-size: .7rem; }
  #brand { font-size: 1.3rem; }
}

/* Short landscape phones: map on the left, play column on the right. */
@media (min-aspect-ratio: 4 / 3) and (max-height: 560px) {
  #app { max-width: 1100px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas: "hud hud" "map goal" "map here" "map choices" "map legend" "map fb" "end end";
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto; }
  /* The cards carry the same words as the key; at 390 px tall the key pushed the last row under it. */
  #legend { display: none; }
  #app.done { grid-template-rows: auto auto auto auto auto auto auto; }
  #app.done #mapbox { min-height: 70svh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Board-first play surface. These rules intentionally sit after the previous shell so old
   shared palette values remain available without carrying its card layout into this game. */
html, body { min-height:100%; height:auto; overflow-x:hidden; overflow-y:auto; }
button { min-width:44px; min-height:44px; }
#app { position:relative; inset:auto; width:min(100%,760px); height:auto; min-height:100svh; margin:auto; padding:8px max(8px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto auto auto auto auto auto; grid-template-areas:none; gap:5px; align-content:start; overflow:visible; }
#hud { grid-area:auto; min-height:44px; display:flex; align-items:center; gap:12px; }
#hud h1 { margin:0; font:700 clamp(1.35rem,4vw,1.75rem)/1 var(--mono); letter-spacing:-.06em; white-space:nowrap; flex:none; }
#brand { display:inline-flex; align-items:center; gap:5px; color:var(--ink); text-decoration:none; flex:none; min-height:44px; }
#brand:focus-visible { outline:3px solid var(--acc); outline-offset:2px; }
#day { color:var(--dim); font:500 .9rem var(--mono); white-space:nowrap; flex:none; }
#goal { grid-area:auto; margin:0; display:flex; align-items:baseline; justify-content:space-between; gap:8px; font-size:.92rem; line-height:1.3; flex-wrap:wrap; }
#story { margin:0; color:var(--ink); font-size:clamp(1rem,2.8vw,1.25rem); line-height:1.2; font-weight:750; letter-spacing:-.015em; }
#ramp { margin:0; color:var(--dim); font-size:.78rem; line-height:1.2; }
#goal strong { color:var(--ink); }
#goal .goal-word { color:var(--hit); }
#goal-part { color:var(--hit); }
#budget { color:var(--dim); white-space:nowrap; font-variant-numeric:tabular-nums; }
#left, #goal-par { color:var(--ink); font-family:var(--mono); font-weight:700; }
#meter { display:inline-flex; gap:3px; vertical-align:-1px; margin:0 5px 0 0; }
#meter i { display:block; width:9px; height:9px; border:1.5px solid var(--ink); border-radius:50%; }
#meter i.on { background:var(--ink); }
#mapbox { grid-area:auto; height:clamp(260px,calc(100svh - 485px),360px); min-height:0; background:var(--board); border-radius:8px; overflow:hidden; }
#map { position:static; display:block; width:100%; height:100%; touch-action:manipulation; cursor:pointer; }
#look { min-height:44px; padding:7px 9px; border-left:3px solid var(--edge); background:var(--panel); border-radius:4px; font-size:.87rem; line-height:1.28; overflow-wrap:anywhere; }
#look p { margin:0; }
#look p + p { margin-top:3px; }
#look .look-shape { color:var(--ink); font-weight:700; }
#look .name-line { display:flex; align-items:center; gap:6px; }
#look .look-actions { display:flex; align-items:stretch; gap:6px; margin-top:5px; }
#look button { min-height:44px; padding:4px 10px; margin:0; font-weight:700; }
#look .look-note { color:var(--dim); font-weight:600; }
#look .cell-details { margin-top:4px; color:var(--dim); font-size:.78rem; }
#look .cell-details summary { min-height:20px; display:flex; align-items:center; cursor:pointer; font-weight:600; }
#look .cell-details p { margin-top:4px; }
#choices { grid-area:auto; display:grid; grid-template-columns:repeat(8,minmax(44px,1fr)); gap:3px; min-width:0; }
.chip { position:relative; min-width:44px; height:60px; padding:1px; display:grid; place-items:center; }
.chip .chip-number { position:absolute; top:2px; left:4px; color:var(--dim); font:700 .7rem var(--mono); }
.chip .chip-word { font-size:.68rem; line-height:1; }
.chip .chip-state { position:absolute; bottom:3px; left:1px; right:1px; color:var(--dim); font-size:.52rem; font-weight:700; line-height:1; text-align:center; text-transform:uppercase; letter-spacing:.01em; }
.chip.has-compass { height:74px; }
.chip.has-compass .chip-state { bottom:34px; }
.chip-compass { position:absolute; left:3px; right:3px; bottom:3px; display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:1px; height:29px; padding:2px; border:1px solid color-mix(in srgb,var(--edge) 55%,transparent); border-radius:50%; background:color-mix(in srgb,var(--board) 75%,transparent); }
.compass-point { display:grid; place-items:center; min-width:0; border-radius:2px; color:var(--far); font:700 .55rem/1 var(--mono); opacity:.65; }
.compass-point.on { color:var(--hit); background:color-mix(in srgb,var(--hit) 23%,transparent); opacity:1; }
.chip-word + .chip-compass { display:none; }
.chip .glyph { transform:translateY(-4px) scale(.9); }
.chip[data-active="true"] { border-color:var(--ink); outline:2px solid color-mix(in srgb,var(--ink) 24%,transparent); }
.chip[data-goal="true"] { border-color:color-mix(in srgb,var(--hit) 65%,var(--edge)); background:color-mix(in srgb,var(--hit) 8%,var(--panel)); }
.chip.dead { border-color:color-mix(in srgb,var(--edge) 80%,var(--board)); }
.chip.first-look { border:2px dashed var(--near); background:color-mix(in srgb,var(--near) 15%,var(--panel)); box-shadow:0 0 0 3px color-mix(in srgb,var(--near) 16%,transparent); }
.chip.first-look .chip-state { color:var(--near); }
.glyph { position:relative; display:inline-block; width:20px; height:20px; color:var(--ink); flex:none; vertical-align:middle; }
.glyph.circle::before { content:""; position:absolute; left:2px; top:2px; width:16px; height:16px; border-radius:50%; background:currentColor; }
.glyph.bar::before { content:""; position:absolute; top:6px; width:20px; height:7px; border-radius:6px; background:currentColor; }
.glyph.diamond::before { content:""; position:absolute; left:3px; top:3px; width:13px; height:13px; transform:rotate(45deg); border:2px solid currentColor; background:var(--panel); }
.glyph.dashed::before { content:""; position:absolute; left:2px; top:2px; width:16px; height:16px; border:2px dashed currentColor; border-radius:50%; }
.glyph.goal::before,.glyph.muscle::before { content:""; position:absolute; left:2px; top:2px; width:16px; height:16px; background:var(--hit); }
.glyph.muscle { color:var(--far); }
.glyph.muscle::before { background:var(--panel); border:2px solid currentColor; }
#key { grid-area:auto; display:flex; flex-wrap:wrap; align-items:center; gap:3px 11px; min-height:18px; margin:0; color:var(--dim); font-size:.72rem; line-height:1.2; white-space:nowrap; }
#key[hidden] { display:none; }
.key-item { display:inline-flex; align-items:center; gap:3px; }
.key-item .glyph { width:16px; height:16px; transform:scale(.75); transform-origin:left center; margin-right:-2px; }
#fb { grid-area:auto; min-height:18px; margin:0; color:var(--dim); text-align:center; font-size:.83rem; line-height:1.25; }
#end { grid-area:auto; border-top:3px solid var(--hit); background:var(--panel); padding:10px; border-radius:5px; }
#end h2 { margin:0 0 4px; color:var(--hit); font-size:1.2rem; }
#end p { margin:0 0 8px; }
#why { color:var(--dim); font-size:.8rem; }
#why summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:700; }
#why p { margin:0 0 8px; line-height:1.4; }
#site-footer { display:flex; }
#site-footer a { min-height:44px; display:inline-flex; align-items:center; font-size:.8rem; }
@media (max-width:359px) { #app { padding-inline:6px; gap:3px; } #story { font-size:.94rem; } #goal { font-size:.84rem; } #day { display:none; } #choices { grid-template-columns:repeat(4,minmax(44px,1fr)); gap:2px; } .chip { min-width:44px; } .chip.has-compass { height:64px; } #key { gap:2px 7px; font-size:.67rem; } }
@media (max-height:700px) and (max-width:700px) { #app { gap:3px; } #hud { min-height:40px; } #mapbox { height:clamp(190px,calc(100svh - 420px),280px); } #look { min-height:40px; padding-block:5px; } #key { min-height:16px; } #fb { min-height:16px; } }
/* Keep the board useful while reading a look. The direct Send button can sit below the fold; a cramped map cannot teach the route. */
@media (min-height:701px) and (max-width:700px) { body[data-looking="true"] #mapbox { height:clamp(300px,calc(100svh - 385px),450px); } }
@media (max-height:700px) and (max-width:700px) { body[data-looking="true"] #mapbox { height:190px; } #look .cell-details { display:none; } }
@media (min-width:800px) { #app { width:min(100%,1000px); padding:12px; } #mapbox { height:clamp(400px,calc(100svh - 250px),620px); } }
@media (max-width:420px) { #hud { gap:6px; } #day { display:none; } #hud nav { gap:3px; } #choices { grid-template-columns:repeat(4,minmax(44px,1fr)); } }

/* Daily controls and results use the same compact board language. */
#hud nav { margin-left:auto; display:flex; gap:5px; }
#hud nav button { width:44px; padding:0; }
#warmup { margin:0; padding:7px 9px; border-left:3px solid var(--hit); background:color-mix(in srgb,var(--hit) 9%,var(--panel)); color:var(--ink); font-size:.88rem; line-height:1.3; }
.chip.hinted, #btn-back.hinted { border:3px solid var(--hit); box-shadow:0 0 0 4px color-mix(in srgb,var(--hit) 34%,transparent); }
#end { margin-top:4px; }
#end-map { display:block; width:100%; height:280px; margin:8px 0 4px; }
#mine, #best { margin:5px 0; font-size:.9rem; line-height:1.35; }
#best:empty { display:none; }
#end-more { margin:7px 0; color:var(--dim); font-size:.82rem; font-weight:600; }
#brainbox { margin:10px 0; }
#brain { display:block; width:100%; height:min(62svh,520px); min-height:280px; background:#0b0f14; border-radius:8px; }
#brain-cap { margin:5px 0 0; color:var(--dim); font-size:.84rem; line-height:1.35; }
#end-why { margin:8px 0; }
#end-why summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:700; }
#end-why p { color:var(--dim); line-height:1.4; }
#endrow { display:flex; flex-wrap:wrap; gap:6px; }
#endrow button { padding-inline:10px; }

/* P3 wording stays in the same compact slot below the map. */
#look .look-tip { color:var(--dim); font-weight:600; }
#look .coach-tip { color:var(--ink); border-left:3px solid var(--acc); padding-left:7px; }
#look .kind-line { color:var(--ink); font-weight:750; }
#look .wires-line { color:var(--dim); }
#look .compass-line { color:var(--dim); }
#look .cell-details { margin-top:3px; color:var(--dim); font-size:.78rem; }
#look .name-line { display:flex; align-items:center; gap:7px; margin-top:4px; color:var(--dim); font:500 .76rem var(--mono); overflow-wrap:anywhere; }
#look .name-button { min-width:52px; min-height:44px; font-size:.76rem; }

#dlg-help { width:min(calc(100vw - 16px), 374px); max-height:calc(100svh - 16px); margin:auto; padding:10px; color:var(--ink); background:var(--panel); border:1px solid var(--edge); border-radius:8px; }
#dlg-help::backdrop { background:rgb(0 0 0 / .5); }
#dlg-help section { display:grid; gap:7px; }
#dlg-help p { margin:0; font-size:.79rem; line-height:1.28; }
#dlg-help .help-key { display:grid; grid-template-columns:1fr 1fr; gap:4px 7px; color:var(--dim); }
#dlg-help .help-key span { display:flex; align-items:center; gap:1px; }
#dlg-help .help-key .glyph { transform:scale(.7); transform-origin:left center; margin-right:-3px; }
#dlg-help details { color:var(--dim); font-size:.78rem; }
#dlg-help summary { min-height:30px; display:flex; align-items:center; cursor:pointer; font-weight:700; }
#dlg-help details p { margin-top:4px; }
#dlg-help form { margin:0; display:flex; justify-content:flex-end; }
#next { color:var(--dim); margin:7px 0 0; font:500 .82rem var(--mono); }
#stats p { margin:.2rem 0 .6rem; }
@media (max-width: 360px) { #goal { gap:4px; font-size:.84rem; } #budget { min-width:0; white-space:normal; text-align:right; } }
.brand-mark { width:22px; height:22px; flex:none; fill:none; stroke:var(--acc); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#howto-card { width:min(360px,calc(100vw - 24px)); max-height:calc(100svh - 24px); margin:auto; padding:14px; border:1px solid var(--edge); border-radius:10px; color:var(--ink); background:var(--panel); }
#howto-card::backdrop { background:rgb(0 0 0 / .72); }
#howto-card h2 { margin:0 0 8px; font-size:1.3rem; }
#howto-card [data-pl="howto-pictures"] { margin:0 0 10px; display:flex; justify-content:center; }
#howto-card img { display:block; width:min(100%,250px); height:auto; aspect-ratio:25/14; background:var(--board); border-radius:8px; }
#howto-card ol { margin:0 0 12px; padding-left:22px; line-height:1.4; }
#howto-card li + li { margin-top:6px; }
#howto-card details { margin:0 0 10px; color:var(--dim); font-size:.85rem; }
#howto-card details summary { min-height:44px; display:flex; align-items:center; cursor:pointer; }
#howto-card details p { margin:0 0 8px; line-height:1.4; }
#howto-card button { width:100%; }
