:root{color-scheme:dark;--bg:#1d1e1e;--ink:#e7e7e4;--muted:#a0a2a0;--line:#626564;--cyan:#00e5f2}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif;min-height:100svh;display:flex;flex-direction:column}header{margin:0 4.2%;padding:34px 0 28px;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;justify-content:space-between}.identity{font-size:20px;letter-spacing:.09em;text-decoration:none;color:inherit;line-height:1.3}.identity span{display:block;font-size:12px;letter-spacing:.16em;color:var(--muted);margin-top:9px}.location{font:12px 'Courier New',monospace;letter-spacing:.09em;padding-top:5px;color:var(--muted)}main{margin:0 4.2%;flex:1;display:flex;flex-direction:column}.stage-top,.stage-bottom{display:flex;justify-content:space-between;gap:20px;font:12px 'Courier New',monospace;letter-spacing:.08em;color:var(--muted)}.stage-top{padding-top:24px}.canvas{flex:1;min-height:360px;display:flex;align-items:center;justify-content:center;overflow:hidden}svg#tangram{width:100%;height:min(66vh,660px);overflow:visible}.tile{outline:none;cursor:pointer}.tile polygon{fill:#fff;stroke:var(--bg);stroke-width:4;stroke-linejoin:miter;transition:fill 100ms;vector-effect:non-scaling-stroke}.tile text{fill:var(--bg);font-family:Arial,Helvetica,sans-serif;font-size:14px;letter-spacing:.7px;pointer-events:none;text-anchor:middle;dominant-baseline:middle}.tile:hover polygon,.tile:focus-visible polygon{fill:var(--cyan)}.tile:focus-visible polygon{stroke:var(--cyan);stroke-width:2}.inert{pointer-events:none}.stage-bottom{align-items:center;padding:8px 0 24px;min-height:60px}button{font:inherit;letter-spacing:inherit;color:var(--ink);border:0;background:transparent;cursor:pointer;padding:10px 0}button:hover{color:var(--cyan)}button:focus-visible,a:focus-visible{outline:1px solid var(--ink);outline-offset:6px}#rearrange{font-size:12px;white-space:nowrap}#rearrange span{font-size:21px;vertical-align:-2px;margin-left:9px}footer{margin:0 4.2%;padding:22px 0 26px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;color:var(--muted);font:12px 'Courier New',monospace;letter-spacing:.06em}dialog{width:min(540px,calc(100% - 40px));padding:32px;background:var(--bg);color:var(--ink);border:1px solid var(--line);max-height:80svh}dialog::backdrop{background:rgb(0 0 0 / .75)}.close{display:block;margin-left:auto;font-size:12px}.eyebrow{font:12px 'Courier New',monospace;letter-spacing:.1em;color:var(--muted);margin-top:30px}h1{font-size:32px;font-weight:400;margin:18px 0 24px}dialog p{font-size:16px;line-height:1.6}dialog h2{font-size:18px;font-weight:400;margin:30px 0 4px}dialog a{color:var(--ink)}@media(max-width:600px){header{padding-top:25px}.identity{font-size:17px}.location{font-size:12px;max-width:90px;text-align:right;line-height:1.5}.canvas{min-height:400px}svg#tangram{height:auto;min-height:340px}.stage-top{padding-top:20px}footer{line-height:1.6;flex-direction:column;gap:6px}.stage-bottom{font-size:12px;gap:12px}#hint{max-width:180px;line-height:1.5}dialog{padding:24px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Size SVG coordinates in screen pixels so label fitting also works on phones. */
:root{--cyan:#4A8FD8}
/* No painted outlines, including while tiles cross during assembly. */
.tile polygon,.tile:focus-visible polygon{stroke:none;stroke-width:0}
.tile:focus-visible text{text-decoration:underline}
.stage-top,.stage-bottom{justify-content:flex-end}
svg#tangram{display:block;width:100%;height:clamp(420px,66svh,660px);min-height:0;overflow:visible}
.tile text{font-size:16px;letter-spacing:.5px;text-anchor:start;dominant-baseline:auto}
.tile{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.tile:active polygon{fill:var(--cyan)}
footer{justify-content:flex-end}
#rearrange,.close{min-height:44px;min-width:44px}
@media(max-width:600px){
  header{padding:25px 0}.identity{font-size:20px;letter-spacing:.06em}
  .canvas{min-height:0}svg#tangram{height:clamp(420px,65svh,650px);min-height:0}
  .stage-bottom{padding-bottom:14px}footer{padding-top:18px;padding-bottom:20px}
}
@media(max-height:500px) and (orientation:landscape){svg#tangram{height:360px}}
