/* FOLD — gallery minimalism. Colour comes from the paper itself. */
:root {
  --bg: #ecebe5;
  --paper: #fbfaf6;
  --paper-2: #f4f2ec;
  --back: #fff8ee;
  --ink: #161514;
  --ink-2: #5f5b54;
  --ink-3: #9a958b;
  --line: #d9d5cb;
  --hair: rgba(22, 21, 20, 0.12);
  --red: #d93a2b;
  --red-2: #b52c1f;
  --ok: #2f6d4f;
  --sans: "Zen Kaku Gothic New", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --w: 1320px;
  --shadow: 0 1px 0 rgba(22, 21, 20, 0.04), 0 10px 30px -18px rgba(22, 21, 20, 0.35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 0; }
.serif { font-family: var(--serif); }
.dim { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.red { color: var(--red); }
.up { color: var(--ok); }
.down { color: var(--red); }
[hidden] { display: none !important; }

/* ---------- strip + header ---------- */
.strip {
  background: var(--ink);
  color: var(--paper);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 7px 12px;
}
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px max(16px, calc((100vw - var(--w)) / 2));
  background: rgba(236, 235, 229, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; }
.seal {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--red);
  color: #fff;
  font: 700 21px/1 var(--serif);
  border-radius: 3px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16);
}
.seal.sm { width: 22px; height: 22px; font-size: 14px; border-radius: 2px; }
.word { font: 500 17px/1 var(--mono); letter-spacing: 0.32em; }
.nav { display: flex; gap: 4px; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-2);
}
.nav a.show-s { display: none; }
.nav a i { font: 400 10px/1 var(--mono); font-style: normal; color: var(--ink-3); }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--ink); }
.actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.snd {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-3);
}
.snd .w1, .snd .w2 { opacity: 0.25; }
.snd[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.snd[aria-pressed="true"] .w1, .snd[aria-pressed="true"] .w2 { opacity: 1; }

/* ---------- paper tab buttons: a folded corner that opens on hover ---------- */
.tab {
  --c: 12px;
  --tab-bg: var(--paper);
  --tab-fg: var(--ink);
  --tab-edge: var(--ink);
  --tab-back: #e7e3da;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px 0 16px;
  background: var(--tab-bg);
  color: var(--tab-fg);
  border: 1px solid var(--tab-edge);
  font: 500 14px/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%);
  transition: clip-path 0.28s cubic-bezier(0.3, 0.7, 0.2, 1), background 0.15s;
}
.tab::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: var(--c);
  height: var(--c);
  background: linear-gradient(45deg, var(--tab-back) 0 calc(50% - 0.6px), var(--tab-edge) calc(50% - 0.6px) calc(50% + 0.6px), transparent calc(50% + 0.6px));
  border-left: 1px solid var(--tab-edge);
  border-bottom: 1px solid var(--tab-edge);
  transition: width 0.28s cubic-bezier(0.3, 0.7, 0.2, 1), height 0.28s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.tab:hover:not(:disabled), .tab:focus-visible { clip-path: polygon(0 0, 100% 0, 100% 0, 100% 100%, 0 100%); }
.tab:hover:not(:disabled)::after, .tab:focus-visible::after { width: 0; height: 0; border-color: transparent; }
.tab:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.tab:disabled { opacity: 0.45; cursor: not-allowed; }
.tab-red { --tab-bg: var(--red); --tab-fg: #fff; --tab-edge: var(--red-2); --tab-back: #fff3ea; }
.tab-red:hover:not(:disabled) { --tab-bg: var(--red-2); }
.tab-ink { --tab-bg: var(--ink); --tab-fg: var(--paper); --tab-edge: var(--ink); --tab-back: #fff8ee; }
.tab-ghost { --tab-bg: transparent; --tab-edge: var(--line); --tab-back: var(--paper-2); }
.tab-lg { height: 52px; font-size: 16px; --c: 16px; padding: 0 26px 0 22px; }
.tab-sm { height: 32px; font-size: 13px; --c: 9px; padding: 0 14px 0 12px; }
.tab-block { display: flex; width: 100%; }

/* ---------- wallet: a tag on a string ---------- */
.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-2);
}
.tag .string { width: 22px; height: 40px; margin-right: -2px; }
.tag-body {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 14px 0 22px;
  background: var(--ink);
  color: var(--paper);
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.02em;
  clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%);
  transition: background 0.15s, transform 0.25s;
  transform-origin: 0 50%;
}
.tag .hole { width: 7px; height: 7px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.tag:hover .tag-body { transform: rotate(-3deg); }
.tag.on .tag-body { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tag.on .hole { background: var(--bg); box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- layout ---------- */
.view { flex: 1; width: 100%; max-width: var(--w); margin: 0 auto; padding: 28px 16px 64px; }
.foot { border-top: 1px solid var(--hair); }
.foot-in { max-width: var(--w); margin: 0 auto; padding: 22px 16px 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; color: var(--ink-3); font-size: 13px; }
.foot-links { margin-left: auto; display: flex; gap: 16px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
h1, h2, h3 { margin: 0; font-weight: 600; }
.display { font: 600 clamp(40px, 6vw, 76px)/1.02 var(--serif); letter-spacing: -0.01em; }
.h2 { font: 600 30px/1.15 var(--serif); }
.h3 { font: 600 20px/1.25 var(--serif); }
.lede { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 520px; }
.rule { height: 1px; background: var(--hair); border: 0; margin: 0; }
.panel { background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 54px 0 18px; }
.sec-head .h2 { display: flex; align-items: baseline; gap: 12px; }
.sec-head .h2 small { font: 400 13px/1 var(--mono); color: var(--ink-3); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.stage-wrap { position: relative; background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--shadow); min-height: 520px; display: flex; flex-direction: column; }
.stage-wrap .corner { position: absolute; top: 16px; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.stage { flex: 1; position: relative; display: grid; place-items: center; padding: 44px 32px 20px; }
.stage svg.fig, .stage svg.cp { width: 100%; height: 100%; max-height: 520px; }
.stage-cap { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--hair); }
.stage-cap b { font: 600 22px/1 var(--serif); }
.stage-empty { display: grid; place-items: center; text-align: center; color: var(--ink-3); gap: 10px; }
.hero-side { display: flex; flex-direction: column; gap: 22px; padding: 6px 0; }
/* the cast: every figure a sheet can become, under the stage */
.hero-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero-main .stage-wrap { flex: 1; min-height: 460px; }
.cast { background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--shadow); padding: 14px 16px 16px; }
.cast-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.cast-head b { font: 600 18px/1.2 var(--serif); }
.cast-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.cast-it {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 4px 9px;
  border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  text-decoration: none; color: var(--ink-3); transition: background 0.15s;
}
.cast-it:hover { background: #fff; color: var(--ink); }
.cast-it.got { color: var(--ink); }
.cast-fig { width: 100%; aspect-ratio: 1; max-width: 76px; display: block; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cast-fig svg { width: 100%; height: 100%; }
.cast-it:not(.got) .cast-fig { opacity: 0.75; }
.cast-it:hover .cast-fig { transform: translateY(-3px) rotate(-3deg); }
.cast-it b { font: 600 13px/1.2 var(--serif); }
.cast-meta { font: 400 10px/1.2 var(--mono); letter-spacing: 0.04em; color: var(--ink-3); text-transform: lowercase; }
.cast-meta em { font-style: normal; color: var(--red); }
.cast-n { position: absolute; top: 6px; right: 7px; font: 500 10px/1 var(--mono); font-style: normal; color: var(--ink-3); }
.cast-it.got .cast-n { color: var(--red); }
@media (max-width: 760px) { .cast-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* a finished sheet standing up as its figure */
.rise svg { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; transform-origin: 50% 80%; }
@keyframes rise { from { opacity: 0; transform: translateY(5%) scaleY(0.2) skewX(-8deg); } 60% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rise svg { animation: none; } }

/* the swan that folds itself at the top of the desk */
.swan-box {
  position: relative; margin: 0; height: 270px;
  background: radial-gradient(55% 60% at 50% 50%, rgba(255, 255, 255, 0.7), transparent 75%);
  border-bottom: 1px solid var(--hair);
}
.swan-box > div { position: absolute; inset: 0 0 26px; }
.swan { cursor: default; }
.swan.swan-done { cursor: pointer; }
.swan-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.swan-paper { filter: drop-shadow(0 0.03px 0.02px rgba(22, 21, 20, 0.2)) drop-shadow(0 0.08px 0.1px rgba(22, 21, 20, 0.12)); }
.swan-water {
  fill: none; stroke: var(--ink-3); stroke-width: 0.012; stroke-linecap: round;
  stroke-dasharray: 2.6; stroke-dashoffset: 2.6; opacity: 0;
  transition: stroke-dashoffset 1s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.3s;
}
.swan-done .swan-water { stroke-dashoffset: 0; opacity: 0.8; }
.swan-done .swan-bob { animation: swan-bob 1.8s ease-in-out infinite alternate; }
@keyframes swan-bob { to { transform: translateY(-0.03px) rotate(-0.8deg); } }
.swan-box figcaption {
  position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: space-between; gap: 10px;
  font: 400 11px/1 var(--mono); letter-spacing: 0.06em; color: var(--ink-3);
}
.swan-again { opacity: 0; transition: opacity 0.4s; }
.swan-box:has(.swan-done) .swan-again { opacity: 1; }
.keys { list-style: none; margin: -6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.keys li { display: inline-flex; align-items: baseline; gap: 7px; padding: 6px 11px 6px 9px; border: 1px dashed var(--line); font: 400 13px/1 var(--sans); color: var(--ink-2); }
.keys b { font: 500 12px/1 var(--mono); color: var(--red); text-transform: uppercase; letter-spacing: 0.08em; }
@media (max-width: 980px) { .hero-side { order: -1; } }
@media (max-width: 520px) {
  .swan-box { height: 230px; }
  .swan-box figcaption { white-space: nowrap; font-size: 10px; letter-spacing: 0.02em; }
}
.counts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hair); }
.counts div { padding: 14px 0; }
.counts div + div { border-left: 1px solid var(--hair); padding-left: 16px; }
.counts b { display: block; font: 500 30px/1.1 var(--mono); letter-spacing: -0.02em; }
.counts span { font-size: 12px; color: var(--ink-3); }
.senba { display: grid; gap: 10px; }
.senba-grid { display: grid; grid-template-columns: repeat(50, 1fr); gap: 2px; }
.senba-grid i { aspect-ratio: 1; background: #dcd8ce; border-radius: 1px; }
.senba-grid i.on { background: var(--red); }
.senba-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.senba-head b { font: 600 18px/1.2 var(--serif); }
.ticker { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.tk { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--hair); text-decoration: none; font-size: 14px; }
.tk:hover { background: rgba(255, 255, 255, 0.35); }
.tk .st { font: 500 13px/1 var(--mono); }
.tk .st.open { color: var(--red); }
.tk .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk .when { font: 400 12px/1 var(--mono); color: var(--ink-3); }

/* ---------- desk ---------- */
.filters { display: flex; gap: 0; border-bottom: 1px solid var(--ink); }
.filters button {
  position: relative;
  background: transparent;
  border: 0;
  padding: 9px 16px 8px;
  font: 500 13px/1 var(--sans);
  color: var(--ink-2);
  cursor: pointer;
}
.filters button.on { color: var(--ink); background: var(--paper); box-shadow: inset 1px 0 0 var(--ink), inset -1px 0 0 var(--ink), inset 0 1px 0 var(--ink); }
.filters button.on::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: -1px; height: 1px; background: var(--paper); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.3, 0.7, 0.2, 1), box-shadow 0.25s;
}
.card:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 1px 0 rgba(22, 21, 20, 0.05), 0 22px 40px -22px rgba(22, 21, 20, 0.45); }
.card-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 0; }
.no { font: 400 11px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.06em; }
.stepc { font: 500 15px/1 var(--mono); }
.stepc small { color: var(--ink-3); font-size: 11px; }
.stepc.done { color: var(--red); }
.mat { position: relative; aspect-ratio: 1 / 0.86; display: grid; place-items: center; padding: 14px 22px 6px; }
.mat svg { width: 100%; height: 100%; }
.card-meta { display: flex; align-items: center; gap: 10px; padding: 8px 14px 10px; }
.avatar { width: 34px; height: 34px; object-fit: cover; border: 1px solid var(--hair); background: var(--paper-2); }
.card-meta .nm { min-width: 0; flex: 1; }
.card-meta .nm b { display: block; font: 500 14px/1.2 var(--mono); }
.card-meta .nm span { display: block; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reads { font: 500 14px/1.1 var(--serif); text-align: right; white-space: nowrap; }
.reads small { display: block; font: 400 10px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 3px; }
.ticks { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; padding: 0 14px; }
.ticks i { height: 9px; border: 1px solid #cfcabf; background: transparent; }
.ticks i.on { border-color: var(--ink); background: linear-gradient(135deg, var(--ink) 0 50%, transparent 50%); }
.ticks i.next { border-color: var(--red); }
.card-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px 12px; font: 400 12px/1.2 var(--mono); color: var(--ink-3); }
.card-foot b { color: var(--ink); font-weight: 500; }
.stock-dot { display: inline-block; width: 9px; height: 9px; vertical-align: -1px; margin-right: 5px; border: 1px solid rgba(0, 0, 0, 0.15); }
.badge { display: inline-block; padding: 3px 6px; font: 500 10px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid currentColor; }
.badge.red { color: var(--red); }
.badge.ink { color: var(--ink); }
.badge.ok { color: var(--ok); }
.stamp {
  position: absolute;
  top: 44px;
  right: 14px;
  padding: 4px 8px 3px;
  border: 2px solid var(--red);
  color: var(--red);
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(8deg);
  opacity: 0.85;
  background: rgba(251, 250, 246, 0.6);
}
.empty { padding: 60px 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); }

/* ---------- sheet page ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; font: 400 12px/1 var(--mono); color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.sp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-bottom: 22px; }
.sp-head img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--hair); }
.sp-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-title h1 { font: 600 34px/1.05 var(--serif); }
.sp-title .sub { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font: 400 13px/1.2 var(--mono); color: var(--ink-2); }
.sp-title .sub a { color: var(--ink-2); }
.sp-stats { margin-left: auto; display: flex; gap: 26px; }
.sp-stats div span { display: block; font: 400 11px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.sp-stats div b { font: 500 20px/1 var(--mono); }
.sp-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.steps-col { background: var(--paper); border: 1px solid var(--hair); }
.steps-col h3 { padding: 14px 16px; border-bottom: 1px solid var(--hair); display: flex; justify-content: space-between; align-items: baseline; }
.steps { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow: auto; }
.steps li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: baseline; padding: 7px 16px; border-bottom: 1px solid var(--hair); font-size: 13px; }
.steps li .n { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.steps li .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.steps li .w { font: 400 11px/1 var(--mono); color: var(--ink-3); }
.steps li.done .n { color: var(--ink); }
.steps li.next { background: #fff6f3; }
.steps li.next .n, .steps li.next .k { color: var(--red); }
.steps li.wait .k { color: var(--ink-3); }
.steps li.last { background: var(--paper-2); }
.stage-col { display: flex; flex-direction: column; gap: 0; background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--shadow); min-width: 0; }
.vtabs { display: flex; border-bottom: 1px solid var(--hair); }
.vtabs button { flex: 1; padding: 12px 10px; background: transparent; border: 0; border-right: 1px solid var(--hair); cursor: pointer; font-size: 13px; color: var(--ink-2); }
.vtabs button:last-child { border-right: 0; }
.vtabs button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.big { aspect-ratio: 1 / 0.92; padding: 34px; }
.reads-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 14px 18px; border-top: 1px solid var(--hair); align-items: baseline; }
.reads-line .fam { font: 600 26px/1 var(--serif); }
.reads-line .fam small { font: 400 11px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; margin-right: 10px; vertical-align: 4px; }
.meas { display: flex; gap: 14px; font: 400 12px/1 var(--mono); color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 0 18px 14px; font: 400 12px/1 var(--mono); color: var(--ink-2); }
.legend i { display: inline-block; width: 26px; height: 0; vertical-align: 3px; margin-right: 6px; border-top: 1.5px dashed var(--ink); }
.legend i.mt { border-top-style: dotted; }
.legend i.sc { border-top: 1px solid #a49d90; }
.legend i.hi { border-top-color: var(--red); }
.side-col { display: flex; flex-direction: column; gap: 16px; }
.box { background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--shadow); }
.box-h { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 0; }
.box-b { padding: 14px 16px 16px; display: grid; gap: 12px; }
.sides { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--hair); }
.sides button { padding: 14px 10px; background: transparent; border: 0; cursor: pointer; font: 500 15px/1 var(--sans); color: var(--ink-3); position: relative; }
.sides button.on { color: var(--ink); }
.sides button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.sides button.on.unf { color: var(--red); }
.sides button.on.unf::after { background: var(--red); }
.sides small { display: block; font: 400 11px/1 var(--mono); margin-top: 5px; color: var(--ink-3); }
.lbl { display: block; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.field { display: flex; align-items: center; border: 1px solid var(--line); background: #fff; }
.field:focus-within { border-color: var(--ink); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px; font: 500 20px/1 var(--mono); }
.field span { padding: 0 12px; font: 500 13px/1 var(--mono); color: var(--ink-3); }
.presets { display: flex; gap: 6px; margin-top: 8px; }
.presets button { flex: 1; padding: 7px 0; background: transparent; border: 1px solid var(--line); cursor: pointer; font: 400 12px/1 var(--mono); color: var(--ink-2); }
.presets button:hover { border-color: var(--ink); color: var(--ink); }
.q { display: grid; gap: 7px; font-size: 13px; }
.q .row { display: flex; justify-content: space-between; gap: 10px; }
.q .row span { color: var(--ink-2); }
.q .row b { font: 500 13px/1.3 var(--mono); }
.foldnote { padding: 10px 12px; border-left: 2px solid var(--ink); background: var(--paper-2); font-size: 13px; }
.foldnote.unf { border-left-color: var(--red); background: #fff4f1; }
.fine { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.groups button { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; background: #fff; border: 1px solid var(--line); cursor: pointer; font-size: 12px; overflow: hidden; }
.groups button svg { width: 26px; height: 26px; }
.groups button .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--ink-3); }
.groups button:hover { border-color: var(--ink); }
.groups button.mine { border-color: var(--red); color: var(--red); }
.groups button.mine .bar { background: var(--red); }
.groups button:disabled { cursor: default; opacity: 0.6; }
.groups button .n { font: 400 10px/1 var(--mono); color: var(--ink-3); }
.seal-box { font: 400 11px/1.5 var(--mono); color: var(--ink-2); word-break: break-all; }
.venues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.venues a { position: relative; display: grid; gap: 3px; padding: 11px 10px 9px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); transition: transform .15s; }
.venues a::after { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: linear-gradient(225deg, transparent 50%, var(--line) 50%); }
.venues a b { font: 700 13px/1.1 var(--sans, inherit); }
.venues a small { font: 400 10px/1 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.venues a:hover { transform: translateY(-1px); border-color: var(--ink); }
.venues a:hover::after { background: linear-gradient(225deg, transparent 50%, var(--red) 50%); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
.kv span { color: var(--ink-3); }
.kv b { font: 500 13px/1.3 var(--mono); text-align: right; }
.sp-low { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.chart { height: 200px; }
.chart canvas { width: 100%; height: 100%; display: block; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font: 500 10px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding: 0 8px 8px; border-bottom: 1px solid var(--ink); }
table.t td { padding: 9px 8px; border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: 12.5px; }
table.t td.r, table.t th.r { text-align: right; }
table.t tr:hover td { background: rgba(255, 255, 255, 0.5); }
table.t a { text-decoration: none; }
.scroll { max-height: 380px; overflow: auto; }

/* ---------- finished ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { padding: 7px 12px; background: transparent; border: 1px solid var(--line); cursor: pointer; font: 400 13px/1 var(--sans); color: var(--ink-2); }
.chips button b { font: 400 11px/1 var(--mono); color: var(--ink-3); margin-left: 6px; }
.chips button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips button.on b { color: var(--ink-3); }
.plaque { padding: 12px 16px 16px; border-top: 1px solid var(--hair); display: grid; gap: 4px; }
.plaque .fam { font: 600 22px/1.15 var(--serif); }
.plaque .fam small { font: 400 13px/1 var(--mono); color: var(--ink-3); }
.plaque .line { font: 400 12px/1.4 var(--mono); color: var(--ink-2); }
.gallery .mat { aspect-ratio: 1; padding: 26px; }

/* ---------- board ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---------- notes ---------- */
.notes { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.notes aside { position: sticky; top: 90px; align-self: start; display: grid; gap: 8px; font-size: 13px; }
.notes aside a { color: var(--ink-2); text-decoration: none; }
.notes article { max-width: 760px; }
.notes section { padding: 26px 0; border-top: 1px solid var(--hair); }
.notes section:first-child { border-top: 1px solid var(--ink); }
.notes h2 { font: 600 26px/1.2 var(--serif); margin-bottom: 12px; display: flex; gap: 14px; align-items: baseline; }
.notes h2 i { font: 400 12px/1 var(--mono); color: var(--ink-3); font-style: normal; }
.notes p, .notes li { color: var(--ink-2); line-height: 1.7; }
.notes b { color: var(--ink); font-weight: 500; }
.notation { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.notation div { padding: 14px; background: var(--paper); border: 1px solid var(--hair); font-size: 13px; }
.notation svg { width: 100%; height: 26px; }
.fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.fams div { padding: 10px 12px; background: var(--paper); border: 1px solid var(--hair); font-size: 13px; display: flex; justify-content: space-between; }
.fams div span { font: 400 11px/1 var(--mono); color: var(--ink-3); }

/* ---------- launch ---------- */
.launch { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.form { display: grid; gap: 16px; padding: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inp, .ta { width: 100%; border: 1px solid var(--line); background: #fff; padding: 11px 12px; font: 400 15px/1.3 var(--sans); outline: 0; border-radius: 0; }
.inp:focus, .ta:focus { border-color: var(--ink); }
.ta { min-height: 84px; resize: vertical; }
.drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--ink-3); background: #fff; cursor: pointer; }
.drop.over { border-color: var(--red); background: #fff6f3; }
.drop input { display: none; }
.drop .ph { width: 64px; height: 64px; display: grid; place-items: center; background: var(--paper-2); border: 1px solid var(--hair); flex: none; overflow: hidden; }
.drop .ph img { width: 100%; height: 100%; object-fit: cover; }
.prog { display: grid; gap: 0; }
.prog div { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); color: var(--ink-3); font-size: 14px; }
.prog div i { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; font: 500 11px/1 var(--mono); font-style: normal; }
.prog div.run { color: var(--ink); }
.prog div.run i { border-color: var(--red); color: var(--red); animation: pulse 1s infinite; }
.prog div.done { color: var(--ink); }
.prog div.done i { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@keyframes pulse { 50% { opacity: 0.35; } }
.note { padding: 12px 14px; border-left: 2px solid var(--ink); background: var(--paper); font-size: 14px; }
.note.red { border-left-color: var(--red); }

/* ---------- studio ---------- */
.studio-top { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; }
.sum { display: flex; gap: 30px; }
.sum div span { display: block; font: 400 11px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 7px; }
.sum div b { font: 500 24px/1 var(--mono); }

/* ---------- wallet sheet + toasts ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(22, 21, 20, 0.32); display: grid; place-items: center; padding: 16px; }
.sheet-card { width: min(380px, 100%); background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.4); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--hair); }
.sheet-head .x { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-2); }
#sheet-body { padding: 10px; display: grid; gap: 6px; }
.wopt { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); cursor: pointer; text-decoration: none; text-align: left; }
.wopt:hover { border-color: var(--ink); }
.wopt img { width: 28px; height: 28px; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; background: var(--ink); color: var(--paper); font-size: 14px; border-left: 3px solid var(--paper); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.5); }
.toast a { color: inherit; }
.toast.ok { border-left-color: #7fc8a0; }
.toast.bad { border-left-color: var(--red); }
.skel { background: linear-gradient(90deg, var(--paper-2), #fff, var(--paper-2)); background-size: 200% 100%; animation: sk 1.2s infinite; min-height: 140px; border: 1px solid var(--hair); }
@keyframes sk { to { background-position: -200% 0; } }
.replay-cap { position: absolute; left: 18px; bottom: 14px; font: 400 12px/1.4 var(--mono); color: var(--ink-2); background: rgba(251, 250, 246, 0.85); padding: 4px 8px; }
.share-row { display: flex; gap: 8px; padding: 0 18px 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .sp-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .steps-col { grid-column: 1 / -1; order: 3; }
  .steps { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (max-width: 980px) {
  .top { grid-template-columns: auto 1fr; }
  .nav { grid-column: 1 / -1; order: 3; overflow-x: auto; margin: 0 -8px; }
  .hero, .launch, .sp-low, .two, .notes { grid-template-columns: 1fr; }
  .stage-wrap { min-height: 420px; }
  .notes aside { position: static; display: flex; flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 760px) {
  .sp-grid { grid-template-columns: 1fr; }
  .sp-stats { margin-left: 0; width: 100%; justify-content: space-between; gap: 12px; }
  .hide-s { display: none; }
  .nav a.show-s { display: inline-flex; color: var(--red); }
  .sum { flex-wrap: wrap; gap: 16px 22px; }
  .inp, .ta, .field input { font-size: 16px; }
  .view { padding-top: 18px; }
  .counts b { font-size: 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-foot { display: none; }
  .reads { font-size: 13px; }
  .row2 { grid-template-columns: 1fr; }
  .senba-grid { gap: 1px; }
  .big { padding: 18px; }
}
