:root {
  --desk: #1c1a26;
  --desk-2: #2a2735;
  --desk-3: #3b3848;
  --paper: #f5edd8;
  --paper-2: #ebe1c7;
  --rule: #d8cdb2;
  --ink: #1c1a26;
  --ink-2: #4a4556;
  --stamp: #b3291b;
  --go: #0e6647;
  --blue: #23408f;
  --highlight: #ffd84a;
  --on-desk: #f5edd8;
  --on-desk-2: #c6bfae;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--desk);
  color: var(--on-desk);
  font: 15px/1.6 var(--mono);
  overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
.sheet :focus-visible { outline-color: var(--blue); }
img, svg, canvas { max-width: 100%; display: block; }
code { font: inherit; background: rgba(28, 26, 38, 0.08); padding: 0 4px; }

[data-mt="8"] { margin-top: 8px; }
[data-mt="12"] { margin-top: 12px; }
[data-mt="16"] { margin-top: 16px; }
[data-mt="18"] { margin-top: 18px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--highlight); color: var(--ink); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.ribbon { background: var(--highlight); color: var(--ink); text-align: center; font-weight: 700; font-size: 13px; padding: 6px 16px; letter-spacing: 0.04em; }
.notice { background: var(--stamp); color: #fff; text-align: center; font-weight: 700; padding: 8px 16px; }
.notice[hidden] { display: none; }

.top { border-bottom: 2px solid var(--desk-3); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: block; width: 168px; text-decoration: none; }
.brand svg { width: 100%; height: auto; fill: var(--on-desk); }
.nav { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-left: auto; list-style: none; }
.nav a { display: inline-block; padding: 6px 2px; text-decoration: none; color: var(--on-desk-2); font-weight: 700; font-size: 14px; }
.nav a:hover { color: var(--on-desk); }
.nav a[aria-current="page"] { color: var(--highlight); box-shadow: 0 2px 0 var(--highlight); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 2px solid var(--desk-3); font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--on-desk); text-decoration: none; }
.pill i { width: 9px; height: 9px; background: var(--on-desk-2); display: block; }
.pill.on i { background: #5fd3a3; }
.pill.paused i { background: #ff8a75; }

main { flex: 1; padding: 26px 0 48px; }
.page-title { margin-bottom: 8px; }
.page-title svg { fill: var(--on-desk); width: auto; height: 30px; max-width: 100%; }
.lede { color: var(--on-desk-2); max-width: 66ch; margin-bottom: 22px; }

.grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) {
  .grid.two { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .grid.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-content: start; }

.sheet {
  background: var(--paper);
  color: var(--ink);
  padding: 18px 18px 20px 30px;
  position: relative;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
  min-width: 0;
}
.sheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: 16px; width: 2px; background: #e4a79b; }
.sheet h2 { font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.sheet h3 { font-size: 15px; margin: 16px 0 6px; }
.sheet .muted, .muted { color: var(--ink-2); }
.on-desk .muted { color: var(--on-desk-2); }
.sheet a { color: var(--blue); }

.btn {
  display: inline-block;
  padding: 10px 16px;
  background: var(--highlight);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.sheet a.btn { color: var(--ink); }
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn[disabled] { background: var(--paper-2); color: var(--ink-2); cursor: not-allowed; transform: none; box-shadow: none; }
.btn.small { padding: 4px 10px; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); }
.btn.ghost { background: var(--paper); }
.btn.big { font-size: 18px; padding: 12px 24px; box-shadow: 4px 4px 0 #000; border-color: #000; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.stamp {
  display: inline-block;
  padding: 1px 7px;
  border: 2px solid currentColor;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-2);
}
.stamp.good { color: var(--go); }
.stamp.bad { color: var(--stamp); }
.stamp.note { color: var(--blue); }

.hero { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: center; margin-bottom: 26px; }
.hero h1 svg { width: 100%; height: auto; fill: var(--on-desk); }
.hero h1 .accent { fill: var(--highlight); }
.hero .sub { color: var(--on-desk-2); margin-top: 14px; font-size: 17px; }
@media (min-width: 860px) { .hero { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 34px; } }

.desk { background: var(--desk-2); border: 2px solid var(--desk-3); padding: 10px; }
.desk canvas { width: 100%; height: auto; image-rendering: pixelated; aspect-ratio: 16 / 11; background: #d9cfb8; }
.desk .state { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-weight: 700; color: var(--on-desk); }

.clock { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.clock b { font-size: 26px; letter-spacing: 0.02em; }
.task-list { list-style: none; }
.task-list li { padding: 9px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; }
.task-list li:first-child { border-top: 0; }
.task-list .meta { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }
.count { font-weight: 700; white-space: nowrap; }
.empty { color: var(--ink-2); font-style: italic; }

.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field textarea {
  width: 100%;
  padding: 8px 10px;
  background: #fffdf6;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0;
}
.hint { font-size: 13px; color: var(--ink-2); }
.error { color: var(--stamp); font-weight: 700; }
.ok { color: var(--go); font-weight: 700; }
.wallets { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.wallets img { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; margin-right: 6px; }

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); white-space: nowrap; }
th, td { padding: 8px 10px 8px 0; border-top: 1px solid var(--rule); vertical-align: top; }
th[scope="row"] { white-space: normal; width: 34%; }
td.num, th.num { text-align: right; }
thead + tbody tr:first-child td { border-top: 2px solid var(--ink); }
tbody:only-child tr:first-child td, tbody:only-child tr:first-child th { border-top: 0; }
.break { word-break: break-all; }

.feed { list-style: none; background: var(--desk); color: var(--on-desk); padding: 10px 12px; min-height: 240px; max-height: 460px; overflow-y: auto; font-size: 14px; }
.feed li { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; padding: 2px 0; }
.feed time { color: var(--on-desk-2); }
.feed .pass { color: #5fd3a3; }
.feed .fail { color: #ff9c8a; }
.feed .hl { color: var(--highlight); }

.shots { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shots figure { margin: 0; }
.shots figcaption { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.card-img { border: 2px solid var(--ink); width: 100%; height: auto; }
.note-box { background: var(--paper-2); border-left: 4px solid var(--stamp); padding: 10px 12px; font-style: italic; }
.post { width: 100%; min-height: 92px; padding: 8px 10px; background: #fffdf6; color: var(--ink); border: 2px solid var(--ink); border-radius: 0; resize: vertical; }

.play-frame { position: relative; background: #000; border: 2px solid var(--desk-3); width: 100%; aspect-ratio: 16 / 10; max-height: 76vh; }
.play-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .play-frame { aspect-ratio: 9 / 15; max-height: 80vh; } }

.steps { list-style: none; counter-reset: step; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { counter-increment: step; }
.steps li::before { content: "0" counter(step); display: block; font-weight: 700; color: var(--stamp); }
.rule-list { padding-left: 18px; }
.rule-list li { margin-bottom: 6px; }

.sheet-free { background: var(--paper); }

.foot { border-top: 2px solid var(--desk-3); color: var(--on-desk-2); font-size: 13px; padding: 16px 0 22px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.foot a { color: var(--on-desk-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .btn:active { transform: none; }
}
