/* Moss (owner, 2026-12-05): black ground, bone ink, deep moss green, one rust.
   Everything in mono and set wide. Loaded after shell.css by the yard and the rooms. */
body {
  --paper: #000000; --paper-2: #0C100B; --rule: #26361F; --rule-2: #162012; --hair: #3F5A2E; --edge: #6E8F55;
  --ink: #E6E2CF; --ink-2: #CBC8B2; --bone: #E6E2CF; --moss: #3F5A2E; --hot: #C8552B;
  --track: .06em; --track-wide: .24em; --lh-loose: 1.75;
  font-family: var(--mono);
}

.mark { letter-spacing: .5em; }
a.mark { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
a.mark:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* Controls are crumbling blocks: corners bitten off in whole pixels, one pixel missing from the top
   edge, a dither where the fill should be, and a hard moss shade behind them.
   Pointing at one makes it crumble a different way. */
.bar, .actions { filter: drop-shadow(var(--s-1) var(--s-1) 0 var(--moss)); }
.how, .chip, .copy {
  --a: var(--s-1); --b: var(--s-2); --c: var(--s-3); --gap: 62%;
  border-radius: 0; border-color: var(--edge);
  background: repeating-conic-gradient(var(--rule-2) 0 25%, var(--paper) 0 50%) 0 0 / var(--s-1) var(--s-1);
  clip-path: polygon(0 var(--b), var(--a) var(--b), var(--a) var(--a), var(--b) var(--a), var(--b) 0,
    var(--gap) 0, var(--gap) var(--a), calc(var(--gap) + var(--c)) var(--a), calc(var(--gap) + var(--c)) 0, 100% 0,
    100% calc(100% - var(--c)), calc(100% - var(--a)) calc(100% - var(--c)), calc(100% - var(--a)) calc(100% - var(--a)), calc(100% - var(--c)) calc(100% - var(--a)), calc(100% - var(--c)) 100%,
    0 100%);
  transition: clip-path .16s steps(2, end), color .15s var(--ease), border-color .15s var(--ease);
}
.how:hover, .chip:hover, .copy:hover { --a: var(--s-2); --b: var(--s-3); --c: var(--s-1); --gap: 24%; border-color: var(--ink); color: var(--ink); background: repeating-conic-gradient(var(--moss) 0 25%, var(--paper) 0 50%) 0 0 / var(--s-1) var(--s-1); }
.how:active, .chip:active, .copy:active { --a: var(--s-3); --b: var(--s-3); --gap: 80%; }
.how:focus-visible, .chip:focus-visible, .copy:focus-visible { outline: 2px solid var(--ink); outline-offset: calc(var(--s-2) * -1); }
.chip { letter-spacing: var(--track); gap: var(--s-3); padding: 0 var(--s-4) 0 var(--s-2); }
.chip em { padding: var(--s-1) var(--s-2); background: var(--ink-2); color: var(--paper); font-weight: 600; }
.chip:hover em { background: var(--ink); }
.chip:disabled, .copy:disabled { cursor: not-allowed; }
.chip:disabled:hover, .copy:disabled:hover { --a: var(--s-1); --b: var(--s-2); --c: var(--s-3); --gap: 62%; border-color: var(--edge); color: var(--ink-2); background: repeating-conic-gradient(var(--rule-2) 0 25%, var(--paper) 0 50%) 0 0 / var(--s-1) var(--s-1); }
.xlink { padding: 0; }

.how { letter-spacing: var(--track-wide); padding: 0 var(--s-6); gap: var(--s-4); }
.how.solid, .how.solid:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.how.solid:hover { background: var(--hot); border-color: var(--hot); }
.how.solid:focus-visible { outline-color: var(--paper); }
.how[aria-busy="true"] { cursor: progress; }
/* the buy button is a block that looks at you */
.eyes { display: inline-flex; gap: var(--s-2); flex: none; padding: var(--s-1); background: var(--paper); }
.eyes::before, .eyes::after { content: ""; width: var(--s-1); height: var(--s-1); background: var(--bone); animation: blink 5.5s steps(1, end) infinite; }
.how.solid:hover .eyes::before, .how.solid:hover .eyes::after { background: var(--hot); }
@keyframes blink { 0%, 93%, 100% { transform: none; } 94%, 98% { transform: scaleY(.25); } }
/* crumbs that keep falling off */
.actions { position: relative; }
.actions::before, .actions::after { content: ""; position: absolute; top: 100%; width: var(--s-1); height: var(--s-1); background: var(--ink); animation: crumb 3.4s steps(6, end) infinite; }
.actions::before { left: var(--s-5); }
.actions::after { left: var(--s-8); background: var(--moss); animation-duration: 5.2s; animation-delay: -1.7s; }
@keyframes crumb { 0%, 55% { transform: none; opacity: 1; } 95% { transform: translateY(var(--s-6)); opacity: 1; } 100% { transform: translateY(var(--s-6)); opacity: 0; } }

/* the figures: a broken rule of pixels, a different small thing living in each cell, digits with a moss echo */
.strip { position: relative; border-top: 0; border-bottom: 0; margin-top: var(--s-6);
  background: repeating-linear-gradient(90deg, var(--hair) 0 var(--s-3), transparent var(--s-3) var(--s-4)) 0 0 / 100% var(--s-1) no-repeat,
    repeating-linear-gradient(90deg, var(--rule) 0 var(--s-1), transparent var(--s-1) var(--s-3)) 0 100% / 100% var(--s-1) no-repeat; }
.cell { position: relative; padding: var(--s-5) var(--s-5) var(--s-5); border-right: 0;
  background: repeating-linear-gradient(0deg, var(--rule) 0 var(--s-1), transparent var(--s-1) var(--s-3)) 100% 0 / var(--s-1) 100% no-repeat; }
.cell:last-child { background: none; }
.cell u { width: var(--s-4); height: var(--s-4); margin-bottom: var(--s-4); text-decoration: none; background: var(--ink); clip-path: polygon(0 0, 75% 0, 75% 25%, 100% 25%, 100% 100%, 25% 100%, 25% 75%, 0 75%); position: relative; }
.cell:nth-child(1) u::before, .cell:nth-child(1) u::after { content: ""; position: absolute; top: 37.5%; width: 12.5%; height: 25%; background: var(--paper); animation: blink 4.3s steps(1, end) infinite; }
.cell:nth-child(1) u::before { left: 25%; } .cell:nth-child(1) u::after { left: 62.5%; }
.cell:nth-child(2) u { background: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / var(--s-2) var(--s-2); }
.cell:nth-child(3) u { background: var(--hot); width: var(--s-2); height: var(--s-2); margin-top: var(--s-2); clip-path: none; animation: tick 1s steps(1, end) infinite; }
@keyframes tick { 50% { opacity: .25; } }
.cell b { font-size: var(--t-48); letter-spacing: var(--track); text-shadow: calc(var(--s-1) / 2) calc(var(--s-1) / 2) 0 var(--moss); }
.cell span { margin-top: var(--s-4); letter-spacing: var(--track-wide); }
.cell span i { font-style: normal; }
.mark { text-shadow: none; }
.foot { font-family: var(--mono); font-size: var(--t-12); letter-spacing: var(--track); margin-top: var(--s-5); }

/* the page tearing: solid bars and scraps of output, snapped to a 12px grid */
.rip { position: fixed; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; font-family: var(--mono); }
.rip b { position: absolute; height: var(--s-3); background: var(--bone); }
.rip b.p { background: var(--moss); }
.rip span { position: absolute; padding: 0 var(--s-1); font-size: var(--t-12); line-height: var(--lh-body); white-space: nowrap; background: var(--bone); color: var(--paper); }
#veil { position: fixed; inset: 0; z-index: 8; background: var(--paper); }
#warp { position: fixed; inset: 0; z-index: 30; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
body.breaking .eat[aria-busy="true"] { background: var(--bone); color: var(--paper); border-color: var(--bone); }

/* the rooms are doors: the strip answers the pointer, the number field, and the room view itself */
.rooms canvas { cursor: pointer; touch-action: manipulation; }
.rooms.on .tag { background: var(--hot); color: var(--paper); }
.doors { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-4); }
.doors-hint { flex: 1 0 100%; font-size: var(--t-14); color: var(--ink-2); }
.doors-field { display: flex; flex-direction: column; gap: var(--s-1); }
.doors label { font-size: var(--t-12); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--ink-2); }
.doors input { min-height: 44px; width: calc(var(--s-9) + var(--s-5)); padding: 0 var(--s-3); font: inherit; font-size: var(--t-16); letter-spacing: var(--track-wide); color: var(--ink); background: var(--paper); border: 1px solid var(--edge); border-radius: 0; }
.doors input::placeholder { color: var(--ink-2); opacity: 1; }
.doors input:hover { border-color: var(--ink); }
.doors input:focus-visible { outline: 2px solid var(--ink); outline-offset: var(--s-1); }
.doors input[aria-invalid="true"] { border-color: var(--hot); }
.doors input:disabled { border-style: dashed; cursor: not-allowed; }
.doors .how { cursor: pointer; font-family: var(--mono); justify-content: center; }
.doors .how:disabled, .rv .how:disabled { cursor: not-allowed; color: var(--ink-2); border-style: dashed; background: var(--paper); }
.doors .how.solid:disabled { background: var(--paper); color: var(--ink-2); border-color: var(--edge); }
.doors-msg { flex: 1 0 100%; min-height: var(--s-5); font-size: var(--t-14); color: var(--hot); }
#doorfx { display: none; position: fixed; inset: 0; z-index: 25; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }

.rv { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--s-4); padding: var(--s-4) var(--s-5) var(--s-5); background: var(--paper); color: var(--ink); font-family: var(--mono); }
.rv[hidden] { display: none; }
.rv-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.rv-title { margin: 0; font-size: var(--t-24); font-weight: 600; letter-spacing: var(--track-wide); color: var(--ink); text-shadow: var(--s-1) var(--s-1) 0 var(--moss); }
.rv-found { font-size: var(--t-12); letter-spacing: var(--track); color: var(--ink-2); text-align: right; }
.rv-stage { container-type: size; display: grid; place-items: center; min-height: 0; }
.rv-stage canvas { width: min(100cqw, 160cqh); aspect-ratio: 8 / 5; image-rendering: pixelated; background: var(--paper); border: 1px solid var(--rule); }
.rv-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4) var(--s-6); }
.rv-line { flex: 1 1 32ch; min-height: calc(var(--lh-loose) * 3em); font-size: var(--t-16); line-height: var(--lh-loose); letter-spacing: var(--track); color: var(--ink); max-width: 56ch; }
.rv-nav { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.rv .how { cursor: pointer; font-family: var(--mono); justify-content: center; }

@media (max-width: 760px) {
  .rv { padding: var(--s-3) var(--s-3) var(--s-4); gap: var(--s-3); }
  .rv-title { font-size: var(--t-16); letter-spacing: var(--track); white-space: nowrap; }
  .rv-found { white-space: nowrap; }
  .rv-foot { flex-direction: column; align-items: stretch; gap: var(--s-3); }
  .rv-line { flex: none; min-height: calc(var(--lh-loose) * 4em); font-size: var(--t-14); }
  .rv-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
  .rv-nav .solid { grid-column: 1 / -1; order: 2; }
  .rv .how { padding: 0 var(--s-1); letter-spacing: var(--track); min-height: 48px; }
  .doors { gap: var(--s-3); }
  .doors .how { flex: 1 1 0; }
  .doors-field { flex: 1 0 100%; }
  .doors input { width: 100%; }
}

@media (max-width: 760px) {
  .how { padding: 0 var(--s-3); letter-spacing: .12em; gap: var(--s-2); }
  .cell { padding: var(--s-4) var(--s-2) var(--s-3); }
  .cell b { font-size: var(--t-20); }
  .cell span { margin-top: var(--s-3); letter-spacing: .08em; }
  .cell span i { display: none; }
  .strip { margin-top: var(--s-4); }
}
