/* masugami — the player page (web/index.html)
   Layout and component rules for /play and the /d/… share links. Every colour, size,
   duration and shadow is a token from masugami-theme.css (L2w): a value the system lacks is
   added there first. The @font-face rules stay here because they are the player's: the URLs
   are root-absolute on purpose, since /d/{mode}/{number} share links are served from a
   subdirectory and a relative "assets/…" would resolve against /d/{mode}/ and 404.
   scripts/build-prototype.mjs inlines this file into masugami.html in the link's place, so
   the cascade order is unchanged from the days it was an inline <style>. */
/* ============================================================
   Type — self-hosted, so opening a shared link phones nobody.
   Shippori Mincho and Zen Kaku Gothic New are both OFL and already ship inside
   the app; assets/fonts/ holds byte-identical copies of the same Latin subsets
   from Packages/XODesign/Sources/XODesign/Resources/Fonts (~125KB together),
   with the licences beside them as OFL-*.txt.
   These used to come from the Google Fonts CDN, which
   handed Google the IP address of everyone who opened a share link — at odds
   with the App Store "Data Not Collected" declaration, and unnecessary.
   Only weights 300 and 400 are ever asked for by the CSS below; Shippori 500 is
   declared because it is bundled and costs nothing until it is matched.
   The URLs are root-absolute on purpose: /d/{mode}/{number} share links are
   served from a subdirectory, and a relative "assets/…" would resolve against
   /d/{mode}/ and 404.
   ============================================================ */
@font-face{
  font-family:"Shippori Mincho";font-style:normal;font-weight:400;font-display:swap;
  src:url("/releases/0b51053c901639b393d3e503/assets/fonts/ShipporiMincho-Regular.ttf") format("truetype");
}
@font-face{
  font-family:"Shippori Mincho";font-style:normal;font-weight:500;font-display:swap;
  src:url("/releases/0b51053c901639b393d3e503/assets/fonts/ShipporiMincho-Medium.ttf") format("truetype");
}
@font-face{
  font-family:"Zen Kaku Gothic New";font-style:normal;font-weight:300;font-display:swap;
  src:url("/releases/0b51053c901639b393d3e503/assets/fonts/ZenKakuGothicNew-Light.ttf") format("truetype");
}
@font-face{
  font-family:"Zen Kaku Gothic New";font-style:normal;font-weight:400;font-display:swap;
  src:url("/releases/0b51053c901639b393d3e503/assets/fonts/ZenKakuGothicNew-Regular.ttf") format("truetype");
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
/* An in-page jump (the skip link, a fragment) lands below the sticky navigation. */
html{scroll-padding-top:calc(var(--ms-space-8) + var(--ms-space-4))}
body{
  background-color:var(--ms-bg);
  background-image:var(--ms-bg-glow);
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:var(--ms-text);
  font-family:var(--ms-font-ui);
  font-weight:300;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}
.wrap{
  max-width:430px;
  margin:0 auto;
  padding:22px var(--ms-gutter) 60px;
}

/* ---------- skip link ----------
   The first stop for a keyboard, clipped out of sight until it has focus; then a small ink
   plate in the corner of the page. */
.skip-link{
  position:absolute;left:var(--ms-gutter);top:var(--ms-space-2);z-index:10;
  display:flex;align-items:center;min-height:var(--ms-hit-min);padding-inline:var(--ms-space-4);
  background:var(--ms-btn-primary-bg);color:var(--ms-btn-primary-text);
  font-family:var(--ms-font-display);font-weight:400;font-size:var(--ms-size-small);text-decoration:none;
}
.skip-link:not(:focus){clip-path:inset(50%)}
.skip-link:focus-visible{outline:var(--ms-focus-width) solid var(--ms-text);outline-offset:var(--ms-focus-offset)}

/* ---------- header ----------
   The wordmark with its mark is the page's one <h1> and the chrome's one memorable thing;
   the three controls beside it are glyphs, not boxes. */
header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.brand{display:flex;align-items:center;gap:13px;min-width:0;margin:0;font:inherit}
/* The lockup is the way back to masugami.com (target=_top leaves the landing's iframe): it looks
   exactly as it did, and shows a ring only to the keyboard. */
.brand-link{display:flex;align-items:center;gap:inherit;min-width:0;color:inherit;text-decoration:none}
.brand-link:focus-visible{outline:var(--ms-focus-width) solid var(--ms-text);outline-offset:var(--ms-focus-offset)}
/* Splash-inspired artwork follows the selected appearance, like the app icon. */
.mark{
  display:block;width:32px;height:32px;flex:none;
  background:url("/releases/0b51053c901639b393d3e503/assets/brand/masugami-logo.png") center/contain no-repeat;
}
html[data-appearance="dark"] .mark{
  background-image:url("/releases/0b51053c901639b393d3e503/assets/brand/masugami-logo-dark.png");
}
.wordmark{
  font:var(--ms-wordmark);
  letter-spacing:var(--ms-track-wordmark);
  color:var(--ms-text-bright);
  text-transform:lowercase;
  white-space:nowrap;
}
/* Each hit area is --ms-hit-min square with the glyph alone at its centre. The row overhangs
   the header by half a step above and below, and into the gutter at its ends, so the header
   keeps the height and width it had when these were 34px boxes. */
.account-header-actions{
  display:flex;gap:0;
  margin-block:calc(var(--ms-space-3) / -2);
  margin-inline:calc(var(--ms-space-2) * -1) calc(var(--ms-space-3) * -1);
}
.iconbtn{
  appearance:none;border:0;background:transparent;padding:0;
  color:var(--ms-text-3);border-radius:0;width:var(--ms-hit-min);height:var(--ms-hit-min);
  font-size:var(--ms-size-small);line-height:1;cursor:pointer;flex:none;
  transition:color var(--ms-dur-hover);
}
@media (hover:hover){
  .iconbtn:hover{color:var(--ms-text-bright)}
}
.iconbtn:focus-visible{
  color:var(--ms-text-bright);
  outline:var(--ms-focus-width) solid var(--ms-text);outline-offset:calc(var(--ms-focus-offset) * -1);
}
.iconbtn:active{transform:scale(.94)}
.iconbtn svg{display:block;margin:auto}
/* Text a screen reader speaks that the page does not show. */
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.brand-quiet{display:none}

/* ---------- the game view (POLISH_2026_11 W-a 1–4) ----------
   A level open is one quiet row of chrome: the back chevron, the title with its second line, the
   three glyphs. The wordmark and the tabs are not rendered (navigation.js marks the root and
   hides them); the h1 stays for a screen reader as the plain name. Under the row, the pip strip
   and its caption share a line over the hairline. The sheet's stage takes every pixel the chrome
   leaves (the column is the viewport's height), and under it sit the level strip, Undo and Start
   over, and the hint. The column is 430px, 600px from a 720px viewport. */
html[data-view="game"] .brand{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html[data-view="game"] .brand-quiet{display:inline}
html[data-view="game"] header{justify-content:flex-start;gap:var(--ms-space-2);min-height:var(--ms-hit-min)}
html[data-view="game"] .account-header-actions{margin-block:0}
header .where{flex:1;min-width:0}
header #whereMain{
  margin:0;
  font:400 var(--ms-size-title)/1.25 var(--ms-font-display);
  color:var(--ms-text-bright);text-wrap:balance;
}
header #whereSub{
  margin:0;
  font:400 var(--ms-size-small)/1.4 var(--ms-font-display);
  color:var(--ms-text-2);text-wrap:pretty;
}
html[data-view="game"] .wrap{
  display:flex;flex-direction:column;min-height:100dvh;
  padding-top:var(--ms-space-3);padding-bottom:var(--ms-space-4);
}
@media (min-width:720px){html[data-view="game"] .wrap{max-width:600px}}
html[data-view="game"] :is(main,#mainPanel){display:flex;flex-direction:column;flex:1 0 auto}
.tagline{
  margin:26px 0 0;color:var(--ms-text-3);
  font-family:var(--ms-font-display);font-weight:400;
  font-size:var(--ms-size-body);line-height:1.65;text-wrap:pretty;
}
.tagline b{color:var(--ms-text-bright);font-weight:400}

/* ---------- micro caps ---------- */
.counter,.btn{
  font-family:var(--ms-font-ui);
  text-transform:uppercase;
}

/* ---------- tabs ---------- */
.tabs{
  display:flex;gap:26px;margin-top:22px;background:transparent;
  border:0;border-bottom:var(--ms-rule);border-radius:0;padding:0;
}
.tab{
  flex:0 0 auto;appearance:none;border:0;background:transparent;color:var(--ms-text-4);
  font-weight:300;font-size:var(--ms-size-chip);letter-spacing:var(--ms-track-micro);
  padding:0 0 12px;border-radius:0;cursor:pointer;
  border-bottom:1px solid transparent;margin-bottom:-1px;
  transition:color var(--ms-dur-hover), border-color var(--ms-dur-hover);
}
@media (hover:hover){ .tab:hover{color:var(--ms-text-2)} }
.tab.active{background:transparent;color:var(--ms-text-bright);border-bottom-color:var(--ms-text)}

/* ---------- status ----------
   A title and a quiet second line (D4), then the pip strip, which owns the fold count; its
   caption is the page's one micro-caps line (D2). One column, as the iOS header (I2). */
.status{
  margin:0;padding:var(--ms-space-3) 0;
  border-bottom:var(--ms-rule);
}
/* The strip at the left, its caption at the right, on one line (W-a 2). */
.counters{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--ms-space-2) var(--ms-space-4)}
.counter{
  font-weight:400;font-size:var(--ms-size-micro);letter-spacing:var(--ms-track-micro);color:var(--ms-text-4);
  font-variant-numeric:tabular-nums;
}
.counter.over{color:var(--ms-text-bright)}
/* the fold economy as circles of paper: spent pips fill, the seam after the goal-th marks the
   perfect solve. circles are the design law's one exemption — progress reads as circles. */
.pipRow{display:flex;align-items:center;gap:6px}
.pip{width:11px;height:11px;border-radius:var(--ms-radius-pip);border:1.5px solid var(--ms-text-4)}
.pip.spent{background:var(--ms-text-2);border-color:transparent}
.pip.over{background:var(--ms-text-bright);border-color:transparent}
.pipSeam{width:1.5px;height:15px;background:var(--ms-text-4)}

/* ---------- stage ----------
   The flex child that takes the leftover height. The player reads its box for the cell size
   (cellSize) and keeps --stage-lift free at its foot for the sheet's cast shadow; it never
   shrinks below the sheet at its smallest cell (--stage-floor, set by the player) nor below
   --ms-stage-min, so a short landscape phone scrolls rather than crushing the paper. */
.stage{
  --stage-lift:var(--ms-space-6);
  position:relative;
  flex:1 0 0;
  min-height:max(var(--ms-stage-min),var(--stage-floor,0px));
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding-bottom:var(--stage-lift);
  perspective:1100px;
  margin-top:var(--ms-space-2);
}
@media (min-width:720px){.stage{--stage-lift:var(--ms-space-8)}}
/* the live sheet */
.still-sheet{
  position:relative;
  display:grid;
  padding:var(--ms-space-3);
  border-radius:0;
  background:transparent;
  box-shadow:none;
  transform-style:preserve-3d;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  cursor:grab;
}
/* The sheet is its own clipped layer. Keeping paper off the sheet's grid means the
   lifted half reveals the actual room instead of a paper-coloured rectangle. */
.sheet-shadow{position:absolute;inset:0;z-index:0;pointer-events:none}
.sheetbase{
  position:absolute;inset:0;z-index:0;pointer-events:none;border-radius:0;
  background-color:var(--ms-paper);
  /* the texture is an optional multiply layer — if assets/cutpaper.png is
     absent the sheet is simply the flat paper colour, which is correct too */
  background-image:
    var(--ms-paper-light),
    var(--ms-paper-shade),
    url("/releases/0b51053c901639b393d3e503/assets/cutpaper.png");
  background-size:auto, auto, 240% 240%;
  background-position:0 0, 0 0, 26% 20%;
  background-repeat:no-repeat, no-repeat, no-repeat;
  background-blend-mode:normal, normal, multiply;
  box-shadow:var(--ms-paper-lift);
  will-change:clip-path,filter;
}
.sheetbase.cut{box-shadow:none}
/* Shadow the already-cut child: clipping the filter on that same element
   cuts off its shadow too, leaving the held paper floating without depth. */
.sheet-shadow:has(.sheetbase.cut){filter:var(--ms-paper-cut-shadow)}
.cell{
  position:relative;z-index:1;
  border-radius:var(--ms-tile-radius);
  background:transparent;
  border:0;                       /* empty cells render as nothing */
  transition:background var(--ms-dur-cell);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--ms-font-display);font-weight:400;font-size:var(--ms-size-cell);line-height:1;
  user-select:none;-webkit-user-select:none;
}

/* annihilation: ink is a MARK, in every material — see masugami-marks.css. No cell
   that carries ink draws a tile, a border or relief here. */
/* ai keeps its scored grid quiet behind the pool. */
html[data-theme="ai"] .cell:not(.on):not(.bump):not(.dent){
  border:0;
}

.cell.hidden{visibility:hidden}

/* Fold preview ghosts — the marks that describe the sheet that would remain after
   release — live in masugami-marks.css with the material they belong to. */

/* ---------- commit flashes ---------- */
.cell.land{animation:land var(--ms-dur-land) ease-out}
@keyframes land{
  0%{transform:scale(1.18)}
  100%{transform:scale(1)}
}

/* ---------- creases ---------- */
.seam{
  position:absolute;z-index:5;appearance:none;border:0;padding:0;
  background:transparent;color:inherit;pointer-events:none;
}
.seam::before{
  content:"";position:absolute;border-radius:0;
  transition:background var(--ms-dur-crease), box-shadow var(--ms-dur-crease), opacity var(--ms-dur-crease);
}
.seam.v::before{
  left:50%;top:0;bottom:0;width:var(--ms-crease-width);transform:translateX(-50%);
  background:var(--ms-crease);
}
.seam.h::before{
  top:50%;left:0;right:0;height:var(--ms-crease-width);transform:translateY(-50%);
  background:var(--ms-crease-h);
}
/* active: an accent hairline down the middle of the hit strip */
@media (hover:hover){
  .seam.v:hover::before,.seam.h:hover::before{background:var(--ms-accent);opacity:1}
}
.seam.v:active::before,.seam.h:active::before{background:var(--ms-accent);opacity:1}
.seam.armed.v::before,.seam.armed.h::before{background:var(--ms-accent);opacity:1}
.seam:focus-visible{outline:0}
.seam:focus-visible::after{
  content:"";position:absolute;inset:2px;border:1px solid var(--ms-text-bright);
  box-shadow:0 0 0 2px var(--ms-bg);opacity:.9;
}
.seam.cue.v::before,.seam.cue.h::before{
  background:var(--ms-accent);opacity:1;
  animation:cuepulse var(--ms-dur-cue) ease-in-out infinite alternate;
}
@keyframes cuepulse{from{opacity:.45}to{opacity:1}}

/* ---------- fold flap: a real two-sided sheet of paper ---------- */
.foldclone{
  position:absolute;z-index:20;pointer-events:none;overflow:visible;
  contain:layout style;
}
.foldband{
  position:absolute;inset:0;transform-origin:0 0;will-change:transform;
  pointer-events:none;
}
/* A face's side: it takes the per-frame opacity, so the face and its texture are never restyled
   while the paper moves (masugami-paper-flap.js). */
.foldside{position:absolute;inset:0;pointer-events:none;will-change:opacity}
.foldface{
  position:absolute;inset:0;border-radius:0;overflow:hidden;
  background-color:var(--ms-paper);
  background-image:
    var(--ms-paper-light),
    var(--ms-paper-shade),
    url("/releases/0b51053c901639b393d3e503/assets/cutpaper.png");
  background-size:auto, auto, 240% 240%;
  background-position:0 0, 0 0, 26% 20%;
  background-repeat:no-repeat, no-repeat, no-repeat;
  background-blend-mode:normal, normal, multiply;
  will-change:opacity;
}
.foldface.back{background-color:var(--ms-paper-flap)}
.foldface.back.axis-col .fc{transform:scaleX(-1)}
.foldface.back.axis-row .fc{transform:scaleY(-1)}
.foldclone .fc{
  position:absolute;border-radius:var(--ms-tile-radius);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--ms-font-display);font-weight:400;font-size:var(--ms-size-cell);line-height:1;
}
.foldclone .fc.off{border:0}
.flap-crease{position:absolute;display:block;pointer-events:none;opacity:.72}
.flap-crease.v{top:0;bottom:0;width:1.5px;background:var(--ms-crease)}
.flap-crease.h{left:0;right:0;height:1.5px;background:var(--ms-crease-h)}
.foldface.back .flap-crease{opacity:.35}
.hinge-shade,.band-light{
  position:absolute;inset:0;pointer-events:none;will-change:opacity;
}
.paper-thickness{
  position:absolute;display:block;background:var(--ms-paper-edge);z-index:4;
  box-shadow:var(--ms-edge-shadow);
}
.paper-thickness.edge-l{left:0;top:0;bottom:0;width:3px}
.paper-thickness.edge-r{right:0;top:0;bottom:0;width:3px}
.paper-thickness.edge-t{top:0;left:0;right:0;height:3px}
.paper-thickness.edge-b{bottom:0;left:0;right:0;height:3px}

.foldshadow{
  position:absolute;z-index:12;pointer-events:none;border-radius:0;
  background:var(--ms-fold-shadow);
  transform:translateZ(0);will-change:left,top,width,height,filter,opacity;
}

/* ground revealed where the paper lifted away */
.exposed{
  position:absolute;z-index:8;border-radius:0;pointer-events:none;
  background:transparent;
  box-shadow:none;
  opacity:0;transition:opacity var(--ms-dur-exposed);
}
.exposed.show{opacity:1}
.seam.hidden{visibility:hidden}

/* Native artsy materials: the mark silhouettes and jitter are supplied by
   masugami-paper.js to BOTH faces, and drawn by masugami-marks.css. The paper,
   crease and weave rules below stay with the page, because they are the sheet
   rather than the ink; kasure keeps this block's scored groove and cut-paper
   texture instead. */
html:is([data-theme="washi"],[data-theme="ai"]) :is(.sheetbase,.foldface){
  background-image:var(--ms-paper-light),var(--ms-paper-shade),var(--paper-weave),url("/releases/0b51053c901639b393d3e503/assets/cutpaper.png");
  background-size:var(--paper-width) var(--paper-height);
  background-position:var(--paper-offset-x,0px) var(--paper-offset-y,0px);
  background-repeat:no-repeat;background-blend-mode:normal,normal,normal,multiply;
}
/* ai at night: the fibre's pale strokes sink into the dye instead of sitting on it as light (P7). */
html[data-theme="ai"][data-appearance="dark"] :is(.sheetbase,.foldface){background-blend-mode:normal,normal,soft-light,multiply}
/* kasure: smooth pressed paper. Its grain is the fibrous sheet the room already uses; nothing is
   ruled on it, and the creases are the scored grooves of the block above (P6). */
html[data-theme="kasure"] :is(.sheetbase,.foldface){
  background-image:var(--ms-paper-light),var(--ms-paper-shade),url("/releases/0b51053c901639b393d3e503/assets/kasure-paper-grain.jpg");
  background-size:auto,auto,512px 512px;
  background-position:0 0,0 0,var(--paper-offset-x,0px) var(--paper-offset-y,0px);
  background-repeat:no-repeat,no-repeat,repeat;background-blend-mode:normal,normal,multiply;
}
html:is([data-theme="washi"],[data-theme="ai"]) .seam::before{
  background:var(--ms-tile-2);opacity:.24;
  mask-image:var(--crease-mask);mask-size:100% 100%;mask-repeat:no-repeat;
}
html:is([data-theme="washi"],[data-theme="ai"]) .seam.v::before{width:6px}
html:is([data-theme="washi"],[data-theme="ai"]) .seam.h::before{height:6px}
html:is([data-theme="washi"],[data-theme="ai"]) .seam:is(.armed,.cue)::before{background:var(--ms-accent);opacity:1}
html:is([data-theme="washi"],[data-theme="ai"]) .flap-crease{
  background:var(--ms-tile-2);opacity:.24;mask-image:var(--crease-mask);mask-repeat:no-repeat;
}
html:is([data-theme="washi"],[data-theme="ai"]) .flap-crease.v{
  width:6px;margin-left:-2.25px;mask-size:6px var(--paper-height);mask-position:0 var(--paper-offset-y);
}
html:is([data-theme="washi"],[data-theme="ai"]) .flap-crease.h{
  height:6px;margin-top:-2.25px;mask-size:var(--paper-width) 6px;mask-position:var(--paper-offset-x) 0;
}
html:is([data-theme="washi"],[data-theme="ai"]) .foldface.back .flap-crease{opacity:.115}

@media (prefers-reduced-motion: reduce){
  html:not([data-fold-motion="full"]) :is(.foldclone,.foldshadow){display:none}
  .seam::before{transition:none}
  .cell.land{animation:none}
  .seam.cue.v::before,.seam.cue.h::before{animation:none}
}

/* ---------- the result, on the sheet (D6, POLISH_2026_11 W-b 1) ----------
   Its head is the game header's row; then the sheet, the award centred on it; then the medal
   name, the sentence, the day's strip, the primary and two rows of quiet words. (The original's
   result dialog and its rules left with it, RETIRE_ORIGINAL_WORK_ORDER W4.) */
.result-frame{
  --result-gap:var(--ms-space-6);
  position:relative;z-index:1;
  max-width:430px;margin:0 auto;padding:var(--ms-space-3) var(--ms-gutter) var(--ms-space-4);
  display:flex;flex-direction:column;
}
@media (min-width:720px){.result-frame{max-width:600px}}
@media(max-width:380px){.result-frame{padding-inline:20px}}
.result-head{display:flex;align-items:center;gap:var(--ms-space-2);min-height:var(--ms-hit-min)}
.result-head .where{flex:1;min-width:0}
.result{display:none}
.result.show{display:flex;flex-direction:column;align-items:center}
.result-sheet{
  --award:var(--ms-award-size);
  position:relative;flex:none;margin-block:var(--result-gap);transform-origin:0 0;
}
/* The award stands on the sheet's centre at its full size and may overhang a narrow sheet. Its
   cast shadow is the material's own shadow token, one soft fall (a second, chained drop-shadow
   paints a false glow in Chrome's software renderer). */
.result-award{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;pointer-events:none}
.result-award .rank,.still-award .rank{
  flex:none;width:var(--ms-award-size);height:var(--ms-award-size);
  filter:drop-shadow(0 8px 10px var(--ms-shadow));
}
.result-body{width:100%;text-align:center}
.result-body h2{margin:0;font:400 var(--ms-size-result)/1.2 var(--ms-font-display);color:var(--ms-text-bright);text-wrap:balance}
/* The heading takes focus so a reader starts at the medal; it is not a control, so no ring. */
.result-body h2:focus{outline:0}
.result-body .sub{
  margin:var(--ms-space-1) 0 var(--ms-space-3);
  font:400 var(--ms-size-body)/1.6 var(--ms-font-display);color:var(--ms-text-2);
  font-variant-numeric:tabular-nums;text-wrap:pretty;
}
.btn:disabled{opacity:.45;cursor:default;transform:none}
/* One primary across the column, then two rows of quiet words (D3). */
.result-actions{display:flex;flex-direction:column;align-items:stretch}
.result-row{display:flex;flex-wrap:wrap;justify-content:center;column-gap:var(--ms-space-5)}
.result-actions .btn.primary + .result-row{margin-top:var(--ms-space-2)}
/* The day's strip as a picture: the same tiles, at the size the game strip draws them. */
.level-strip.result-strip{margin:0 calc(var(--ms-space-1) * -1) var(--ms-space-5)}
.result-strip .level-cell{cursor:default}

/* The arrival (W-b 2): the sheet settles from where it lay (--settle-*), the award lands from a
   little above with a larger, softer shadow, then the words appear. The game on Home's result
   runs these (masugami-kagami-screen.css); the original's dialog, which also did, is gone. */
@keyframes result-settle{
  from{transform:translate(var(--settle-x,0px),var(--settle-y,0px)) scale(var(--settle-scale,1))}
  to{transform:none}
}
@keyframes award-land{
  0%{opacity:0;transform:scale(var(--ms-award-lift-scale));
    filter:drop-shadow(0 30px 32px var(--ms-shadow))}
  30%{opacity:1}
  100%{opacity:1;transform:none;filter:drop-shadow(0 8px 10px var(--ms-shadow))}
}
@keyframes result-words{from{opacity:0}to{opacity:1}}

/* ---------- the still sheet (Home, W-b 4 and 6) ----------
   The board's own paper, ink and creases drawn once by the player at the board's cell, then
   scaled into its frame; inert. Its award, on a finished day, is the result's. */
.still-frame{position:relative;display:block;flex:none}
.still-sheet{position:absolute;top:0;left:0;transform-origin:0 0;pointer-events:none;cursor:default}
.still-award{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;pointer-events:none}

/* ---------- the level strip (POLISH_2026_11 §2) ----------
   Ten squares of paper in one row, each in a target a full hit tall. A recorded level carries
   its compact Folded Washi mark in the tile's ink; the next level is ringed in ink around its
   numeral; an unreached level is a faint square. The open level is aria-current only. */
.level-strip{
  display:grid;grid-template-columns:repeat(10,minmax(0,1fr));
  margin:var(--ms-space-2) calc(var(--ms-space-1) * -1) 0;
}
.level-strip[hidden]{display:none}
.level-cell{
  appearance:none;border:0;background:transparent;padding:0;border-radius:0;
  min-height:var(--ms-hit-min);display:flex;align-items:center;justify-content:center;
  color:var(--ms-tile-2);cursor:pointer;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
.level-cell:disabled{cursor:default}
.level-tile{
  --level-tile:24px;
  display:grid;place-items:center;width:var(--level-tile);height:var(--level-tile);
  background:var(--ms-paper);box-shadow:0 1px 2px var(--ms-shadow);
  font:400 var(--ms-size-small)/1 var(--ms-font-display);font-variant-numeric:tabular-nums;color:var(--ms-tile-2);
}
@media (min-width:720px){.level-tile{--level-tile:28px}}
.level-tile .paper-symbol{width:86%;height:86%}
.level-cell.next .level-tile{outline:1.5px solid var(--ms-text-bright);outline-offset:3px}
.level-cell.locked .level-tile{opacity:.42;box-shadow:none}
/* Faint means faint on every ground: pale paper on a dark room needs less, ai's dyed paper needs
   more on its night room and less on its pale one. */
html[data-appearance="dark"] .level-cell.locked .level-tile{opacity:.16}
html[data-theme="ai"][data-appearance="dark"] .level-cell.locked .level-tile{opacity:.7}
html[data-theme="ai"][data-appearance="light"] .level-cell.locked .level-tile{opacity:.2}
@media (hover:hover){.level-cell:not(:disabled):hover .level-tile{box-shadow:0 2px 5px var(--ms-shadow)}}
.level-cell:focus-visible{outline:var(--ms-focus-width) solid var(--ms-text);outline-offset:calc(var(--ms-focus-offset) * -1)}

/* ---------- replay (W-a 5) ----------
   The transport and the way back sit under the sheet, which gives up the height they need:
   title, position and guidance, the transport row, then Back to result, all on a phone's first
   screen. The title takes focus so a reader starts there; it is not a control, so no ring. */
/* The core game's viewing (masugami-kagami-screen.js) is the same section under its own sheet,
   named by class: one set of rules for both. */
:is(#playbackControls,.kagami-playback){width:100%;text-align:center;display:flex;flex-direction:column;gap:var(--ms-space-2)}
:is(#playbackControls,.kagami-playback)[hidden]{display:none}
:is(#playbackControls,.kagami-playback){margin:0;font-family:var(--ms-font-display)}
:is(#playbackTitle,.kagami-playback-title){margin:0;font-size:var(--ms-size-title);font-weight:400;line-height:1.3;color:var(--ms-text-bright)}
:is(#playbackTitle,.kagami-playback-title):focus{outline:0}
:is(#playbackPosition,#playbackGuidance,.kagami-playback-position,.kagami-playback .playback-guidance){margin:0;line-height:1.4}
:is(#playbackPosition,.kagami-playback-position){font-variant-numeric:tabular-nums;font-size:var(--ms-size-body)}
:is(#playbackTransport,.kagami-playback-transport){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ms-space-2);margin-top:var(--ms-space-1)}
:is(#playbackTransport,.kagami-playback-transport) .btn{min-width:0;white-space:normal;padding-inline:var(--ms-space-1)}
.playback-guidance{font-size:var(--ms-size-small);color:var(--ms-text-2)}
.practice-label{text-align:center;font-size:var(--ms-size-small)}
#shareFallback{width:100%;min-height:120px}
.btnrow{display:flex;flex-wrap:wrap;gap:var(--ms-space-2);justify-content:center}
.btnrow .btn{flex:1 1 max-content}

/* ---------- buttons ---------- */
.btn{
  appearance:none;font-family:var(--ms-font-ui);font-weight:300;
  white-space:nowrap;word-break:normal;overflow-wrap:normal;hyphens:none;
  font-size:var(--ms-size-chip);letter-spacing:var(--ms-track-chip);text-transform:uppercase;cursor:pointer;
  border-radius:0;min-height:var(--ms-hit-min);padding:13px 12px;border:var(--ms-btn-stroke);
  background:transparent;color:var(--ms-text-2);
  transition:border-color var(--ms-dur-hover), background var(--ms-dur-hover), color var(--ms-dur-hover);
}
@media (hover:hover){
  .btn:hover{border-color:var(--ms-btn-stroke-hover);background:var(--ms-btn-fill-hover)}
}
.btn.primary{
  background:var(--ms-btn-primary-bg);color:var(--ms-btn-primary-text);
  border-color:var(--ms-btn-primary-bg);font-weight:400;
}
@media (hover:hover){
  .btn.primary:hover{background:var(--ms-btn-primary-hover);border-color:var(--ms-btn-primary-hover)}
}
/* The primary (D3): one per screen, filled with ink, its label a sentence in Shippori Mincho at
   the small step; --ms-hit-min tall and square from .btn. */
.btn.primary{
  font-family:var(--ms-font-display);font-size:var(--ms-size-small);letter-spacing:0;text-transform:none;
}
/* The quiet action (D3): a word in ink with no box, underlined on hover and on keyboard focus,
   where it also draws the shared ring. A row of them is a row of words with a gap. */
.btn.quiet{
  border:0;background:transparent;color:var(--ms-text);
  font-family:var(--ms-font-display);font-weight:400;font-size:var(--ms-size-small);
  letter-spacing:0;text-transform:none;padding-inline:var(--ms-space-2);
  text-underline-offset:var(--ms-space-1);
}
@media (hover:hover){
  .btn.quiet:hover{background:transparent;text-decoration:underline}
}
.btn.quiet:disabled{text-decoration:none}
.btn.quiet:focus-visible{
  text-decoration:underline;
  outline:var(--ms-focus-width) solid var(--ms-text);outline-offset:var(--ms-focus-offset);
}
/* No double-tap zoom wait on a control, and no grey tap flash: the press scale is the feedback. */
.btn,.iconbtn,.tab{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.btn:active{transform:scale(.97)}

/* ---------- controls ---------- */
/* Undo and Start over, the quiet pair under the sheet (D3): two words at the column's edges,
   which is the sheet's widest, so they stay put while folding narrows the paper. The row
   overhangs by the buttons' own inline padding so each word, not its hit area, meets the edge. */
.controls{
  display:flex;justify-content:space-between;gap:var(--ms-space-3);
  margin:var(--ms-space-1) calc(var(--ms-space-2) * -1) 0;
}
/* The hint closes the column: centred, at the small step, one line held open so a hint that
   comes and goes does not move the sheet. */
.hint{
  color:var(--ms-text-3);font-family:var(--ms-font-display);font-weight:400;
  font-size:var(--ms-size-small);line-height:1.6;margin:var(--ms-space-1) 0 0;
  min-height:1.6em;text-align:center;text-wrap:balance;
}
/* Home's one status line: a link to a day not yet here, or one that could not be read. */
.link-notice{margin:0 0 var(--ms-space-4);font:400 var(--ms-size-body)/1.6 var(--ms-font-display);color:var(--ms-text-2)}
.link-notice:empty{margin:0}

/* ---------- the embed (POLISH_2026_11 §2) ----------
   /play?embed=sheet inside the landing's frame: the sheet alone on a transparent ground, sized
   to the frame. No header, tabs, title, pips, strip or hint. After the first committed fold a
   quiet Start over; at the end the award on the sheet and one link into today's Daily. */
html[data-embed="sheet"] body{background:transparent;min-height:0}
html[data-embed="sheet"][data-theme] body::before{content:none}
html[data-embed="sheet"] :is(.skip-link,header,.main-navigation,.status,#saveNotice,#homeContent,#linkNotice){display:none!important}
html[data-embed="sheet"] .wrap{max-width:none;min-height:100dvh;padding:var(--ms-space-7) var(--ms-space-7) var(--ms-space-6)}
html[data-embed="sheet"] .stage{margin-top:0}
html[data-embed="sheet"] .controls{justify-content:center;align-items:center;gap:var(--ms-space-4);margin:var(--ms-space-3) 0 0}
/* Before the first fold the foot is one quiet line under the sheet. */
.embed-caption{margin:0;min-height:var(--ms-hit-min);display:flex;align-items:center;text-align:center;font:400 var(--ms-size-small)/1.4 var(--ms-font-display);color:var(--ms-text-3)}
.embed-caption[hidden]{display:none}
/* The sheet's shadow reaches further than any frame can promise on every day's sheet, so the
   frame's own edges fade: a shadow that meets one thins out instead of being cut. */
html[data-embed="sheet"] body{
  mask-image:linear-gradient(90deg,transparent,#000 var(--ms-space-6),#000 calc(100% - var(--ms-space-6)),transparent),
    linear-gradient(180deg,transparent,#000 var(--ms-space-6),#000 calc(100% - var(--ms-space-6)),transparent);
  mask-composite:intersect;
}
html[data-embed="sheet"] #embedPlay{display:inline-flex;align-items:center;justify-content:center;padding-inline:var(--ms-space-6);text-decoration:none}
html[data-embed="sheet"] #embedPlay[hidden]{display:none}
#embedPlay:focus-visible{outline:var(--ms-focus-width) solid var(--ms-text);outline-offset:var(--ms-focus-offset)}
.embed-award{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;pointer-events:none}
.embed-award .rank{width:min(var(--ms-award-size),calc(100% - var(--ms-space-6)));height:auto;aspect-ratio:1;filter:drop-shadow(0 6px 10px var(--ms-shadow))}

/* ---------- sections ---------- */
section{margin-top:44px}
/* A section title is a sentence-case title on the hairline, as Home's (.home-title, W2): the
   running face at the title step, not micro caps (D2). */
section h3{
  font:400 var(--ms-size-title)/1.3 var(--ms-font-display);
  color:var(--ms-text-bright);margin:0;padding-bottom:var(--ms-space-3);
  border-bottom:var(--ms-rule);text-wrap:balance;
}
/* The square swatch: the Achievements dialog's milestone marks (masugami-achievements.js). The
   original's law diagrams and pitch rows, and their swatches, left with it (RETIRE_ORIGINAL_WORK_ORDER W4). */
.sq{width:16px;height:16px;border-radius:0;display:inline-block;flex:none}

/* ---------- optional account sync (P3 S0–S7) ---------- */
.account-scrim{
  border:0;margin:0;max-width:none;max-height:none;width:100%;height:100%;box-sizing:border-box;
  position:fixed;inset:0;z-index:100;display:none;align-items:flex-start;justify-content:center;
  overflow:auto;overscroll-behavior:contain;padding:58px 18px;background:var(--ms-bg);color:var(--ms-text);
  transition:opacity var(--ms-dur-hover) var(--ms-ease);
}
.account-scrim.open{display:flex}
.account-panel{width:min(100%,430px);padding:24px 26px;border:var(--ms-btn-stroke);background:var(--ms-bg);border-radius:0}
.account-panel-head{display:flex;align-items:center;justify-content:space-between;border-bottom:var(--ms-rule);padding-bottom:14px}
/* The panel's name is its title at the h2 step, as the Achievements dialog's; each part of it
   (Theme, Appearance, Sync, and the account states' own names) is a sentence-case title at the
   title step in the running face (D2). */
.account-panel h2{margin:0;font:400 var(--ms-size-h2)/1.3 var(--ms-font-display);color:var(--ms-text-bright);text-wrap:balance}
.account-label{margin:0;padding:0;border:0;font:400 var(--ms-size-title)/1.3 var(--ms-font-display);color:var(--ms-text-bright);text-wrap:balance}
.account-close{appearance:none;border:0;background:transparent;color:var(--ms-text);font:400 24px/1 var(--ms-font-ui);cursor:pointer;min-width:46px;min-height:46px}
.account-preferences{padding-top:var(--ms-space-5)}
/* The parts of Settings are sections; the page's 44px section gap is not theirs. */
.account-preferences .settings-section{margin-top:0}
.account-preferences .settings-section+.settings-section{margin-top:var(--ms-space-6)}
/* The title takes focus as the panel opens so a reader starts there; it is not a control. */
#accountPanelTitle:focus{outline:0}
.settings-theme-list{margin-top:10px;border:var(--ms-btn-stroke)}
.theme-option{
  appearance:none;width:100%;min-height:62px;padding:10px 12px;border:0;border-bottom:var(--ms-rule);
  display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:var(--ms-space-3);
  background:transparent;color:var(--ms-text);text-align:left;cursor:pointer;
}
.theme-option:last-child{border-bottom:0}
/* The chosen material is marked in ink: the accent belongs to the fold alone. */
.theme-option.is-selected{background:var(--ms-btn-fill-hover);box-shadow:inset 2px 0 0 var(--ms-text)}
.theme-swatch{
  position:relative;display:block;width:34px;height:34px;background:var(--ms-paper);
  border:1px solid var(--ms-cell-line);
}
.theme-option-copy{display:block;min-width:0}
.theme-option-name{display:block;font:400 var(--ms-size-cell)/1.25 var(--ms-font-display);text-transform:lowercase;color:var(--ms-text-bright)}
.theme-option-caption{display:block;margin-top:3px;font:400 var(--ms-size-footnote)/1.35 var(--ms-font-display);color:var(--ms-text-4)}
.appearance-options{display:grid;grid-template-columns:repeat(3,1fr);margin-top:10px;border:var(--ms-btn-stroke)}
.appearance-option{
  appearance:none;min-height:var(--ms-hit-min);padding:var(--ms-space-2) var(--ms-space-1);border:0;border-right:var(--ms-rule);
  background:transparent;color:var(--ms-text-3);font:400 var(--ms-size-small)/1.2 var(--ms-font-display);cursor:pointer;
}
.appearance-option:last-child{border-right:0}
.appearance-option.is-selected{background:var(--ms-btn-primary-bg);color:var(--ms-btn-primary-text)}
.account-view{padding-top:22px;margin-top:var(--ms-space-6);border-top:var(--ms-rule)}
.account-copy{margin:var(--ms-space-2) 0 0;font:400 var(--ms-size-body)/1.65 var(--ms-font-display);color:var(--ms-text-2)}
.account-identity{margin:var(--ms-space-2) 0 0;overflow-wrap:anywhere;font:400 var(--ms-size-body)/1.5 var(--ms-font-display);color:var(--ms-text-bright)}
/* A state's one forward action is the full-width primary; every other action is a quiet word,
   flush with the column, in a row with a gap (D3). The provider choices stack as a list. */
.account-actions{display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--ms-space-6);margin-top:var(--ms-space-5)}
.account-actions .btn.primary{flex:1 1 100%;margin-bottom:var(--ms-space-2)}
.account-actions.stack{flex-direction:column;align-items:flex-start}
.account-scrim .btn.quiet,.account-invite .btn.quiet{padding-inline:0}
.account-legal{margin:20px 0 0;font:400 var(--ms-size-footnote)/1.6 var(--ms-font-display);color:var(--ms-text-4)}
.account-legal a{color:var(--ms-text-2);text-underline-offset:var(--ms-space-1)}
/* The three legal links are a row of words with a gap, each a full hit tall; the terms box and
   its sentence are one target. */
nav.account-legal{display:flex;flex-wrap:wrap;column-gap:var(--ms-space-5)}
nav.account-legal a{display:inline-flex;align-items:center;min-height:var(--ms-hit-min)}
label.account-legal{display:flex;align-items:center;gap:var(--ms-space-2);min-height:var(--ms-hit-min);cursor:pointer}
.account-email-form{display:grid;gap:var(--ms-space-2);margin-top:var(--ms-space-4)}
.account-email-form label{font:400 var(--ms-size-small)/1.4 var(--ms-font-display);color:var(--ms-text-2)}
.account-email-form .btn.primary{margin-top:var(--ms-space-2)}
.account-email-form input{width:100%;min-height:46px;padding:var(--ms-space-3);border:var(--ms-btn-stroke);border-radius:0;background:transparent;color:var(--ms-text-bright);font:400 var(--ms-size-input)/1.3 var(--ms-font-display)}
.account-email-form input:focus-visible,.account-scrim button:focus-visible,.account-scrim a:focus-visible{outline:var(--ms-focus-width) solid var(--ms-text);outline-offset:var(--ms-focus-offset)}
.account-error{min-height:18px;margin:10px 0 0;font:400 var(--ms-size-footnote)/1.5 var(--ms-font-display);color:var(--ms-text-2)}
.account-invite{display:none;margin-top:var(--ms-space-5)}
.account-invite.show{display:block}
.account-invite p{margin:0;font:400 var(--ms-size-small)/1.6 var(--ms-font-display);color:var(--ms-text-2)}
.account-invite-actions{display:flex;align-items:center;justify-content:center;column-gap:var(--ms-space-6)}
.account-sync-line{margin-top:var(--ms-space-3);font:400 var(--ms-size-small)/1.6 var(--ms-font-display);color:var(--ms-text-2)}
.account-sync-line[hidden]{display:none}
@media(max-width:420px){.account-scrim{padding:0}.account-panel{min-height:100vh;border-inline:0;border-block:0}}
