.sigfield {
  width: min(860px, 96vw); max-height: 94vh; padding: 0; border: 0;
  background: transparent; color: var(--ink); overflow: visible;
}
.sigfield::backdrop {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(2px) grayscale(1);
}
.sf-frame { padding: clamp(18px, 3vw, 30px); display: grid; gap: 14px; }
.sf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sf-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 4px 0 0; }
.sf-view { position: relative; border: 1px solid var(--line); background: #000; }
.sf-view canvas {
  display: block; width: 100%; aspect-ratio: 240 / 136; height: auto;
  image-rendering: pixelated; image-rendering: crisp-edges;
  cursor: crosshair; touch-action: none;
}
.sf-overlay {
  position: absolute; inset: auto 10px 8px 10px; display: flex; justify-content: space-between;
  font: 700 .6rem var(--f-mono); letter-spacing: .2em; color: #ddd; mix-blend-mode: difference; pointer-events: none;
}
.sf-help { margin: 0; font-size: .78rem; color: var(--ink-2); max-width: 70ch; }
.sf-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sf-meter { height: 8px; border: 1px solid var(--line); background: repeating-linear-gradient(90deg, var(--hatch) 0 1px, transparent 1px 8px); }
.sf-meter i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .12s linear; }
.sf-result { margin: 0; font: 700 .78rem/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 12px; border: 1px dashed var(--line); }
.sf-result a { text-decoration-thickness: 2px; }
.sigfield.is-resolved .sf-view { border-style: double; border-width: 4px; }
@media (max-width: 560px) { .sf-controls { grid-template-columns: 1fr; } }
.record-title { margin: 0 0 24px; }
.hollow-text { color: transparent; -webkit-text-stroke: 1.2px var(--ink); }
.record-stamp {
  align-self: center; justify-self: end;
  font: 700 .9rem/1 var(--f-mono); letter-spacing: .3em; text-align: center;
  border: 3px double var(--ink); padding: 12px 14px; transform: rotate(-7deg); opacity: .8;
}
.record { max-width: 900px; padding: clamp(24px, 4vw, 52px); }
.record-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 24px; margin: 0 0 36px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.record-fields dt { color: var(--mid); font-size: .58rem; letter-spacing: .24em; }
.record-fields dd { margin: 3px 0 0; font-weight: 700; }
.record-body { font-family: var(--f-mono); font-size: .95rem; line-height: 1.75; max-width: 72ch; }
.record-body p { margin: 0 0 1.2em; }
.record-body .annotation { font-family: var(--f-serif); font-style: italic; font-size: 1.05rem; border-top: 1px dashed var(--line-dim); padding-top: 1em; transform: rotate(-.4deg); }
.redact { position: relative; display: inline-block; max-width: 100%; vertical-align: bottom; line-height: 1.5; padding: 0 2px; }
.redact > canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.redact:focus-visible { outline: 2px dashed var(--ink); outline-offset: 3px; }
.redact.revealed { background: repeating-linear-gradient(-45deg, var(--hatch) 0 1px, transparent 1px 5px); }
.residue-map { margin: 28px 0; border: 1px solid var(--line-dim); padding: 14px; }
.residue-map canvas { width: 100%; height: auto; display: block; cursor: crosshair; }
.residue-map figcaption { margin-top: 10px; }
.presence { min-height: 1.5em; margin: 26px 0 0; font: 500 .7rem/1.4 var(--f-mono); letter-spacing: .14em; color: var(--mid); opacity: 0; transition: opacity 3s; }
.presence.on { opacity: 1; }
.record.sealed { max-width: 720px; text-align: center; padding: 70px 30px; }
.record-sealed-line { font-family: var(--f-display); font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1; margin: 0 0 14px; }
.bare-stage { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.pres-wrap { width: min(720px, 100%); padding: clamp(22px, 4vw, 44px); background: color-mix(in srgb, var(--bg) 88%, transparent); border-left: 1px solid var(--line-dim); }
.pres-lines { display: grid; gap: 1.1em; margin: 28px 0; font-size: 1.02rem; line-height: 1.65; min-height: 40vh; }
.pres-lines p { margin: 0; }
.pres-facts { list-style: none; margin: 0; padding: 14px 0; border-top: 1px dashed var(--line-dim); border-bottom: 1px dashed var(--line-dim); display: grid; gap: 6px; font-size: .72rem; letter-spacing: .16em; color: var(--ink-2); }
.pres-facts li::before { content: "— "; color: var(--mid); }
.pres-echo { font-family: var(--f-serif); font-style: italic; font-size: 1.2rem; }
.pres-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.pres-form label { grid-column: 1 / -1; }
.pres-end { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 20px; }
.pres-closed { font-size: clamp(1.6rem, 4.6vw, 2.8rem); margin: 0 0 8px; }
.pres-foot { margin-top: 60px; opacity: .7; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-decoration: underline; cursor: pointer; }
.void-readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; font-size: .72rem; letter-spacing: .12em; }
.void-readout dt { color: var(--mid); font-size: .58rem; letter-spacing: .22em; }
.void-readout dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 560px) { .void-readout { grid-template-columns: 1fr; } }
.third-hand {
  margin: 34px 0 0; padding-top: 18px; border-top: 1px dotted var(--line-dim);
  font-family: var(--f-serif); font-style: italic; font-size: 1.04rem; line-height: 1.9; max-width: 64ch;
  transform: rotate(.6deg);
}
.third-hand .w { display: inline-block; white-space: nowrap; }
.third-hand .w span { display: inline-block; transform: translateY(var(--y)) rotate(var(--r)) scale(var(--s)); }
.sutured { margin: 34px 0 0; display: grid; gap: 12px; max-width: 560px; }
.slit {
  position: relative; display: flex; justify-content: space-around; align-items: center;
  height: 64px; border: 1px solid var(--line); background: var(--bg-2);
  background-image: linear-gradient(var(--line), var(--line)); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 50%;
  transition: height .5s cubic-bezier(.2,.8,.2,1);
}
.stitch-btn { appearance: none; background: none; border: 0; padding: 4px; cursor: crosshair; width: 34px; height: 56px; color: var(--ink); }
.stitch-btn svg { width: 100%; height: 100%; overflow: visible; }
.stitch-btn .h { fill: var(--bg); stroke: var(--ink); stroke-width: 1; }
.stitch-btn .t { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.stitch-btn .c1, .stitch-btn .c2 { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; display: none; }
.stitch-btn:hover .t, .stitch-btn:focus-visible .t { stroke-dasharray: 3 2; }
.stitch-btn.cut { cursor: default; }
.stitch-btn.cut .t { display: none; }
.stitch-btn.cut .c1, .stitch-btn.cut .c2 { display: inline; }
.sutured.open .slit { height: 22px; background-image: none; border-style: dashed; }
.sutured .inside { border: 1px solid var(--line); border-top: 0; padding: 16px 18px; font-family: var(--f-serif); font-size: 1.1rem; }
.sutured .inside p { margin: 0 0 8px; }
.aside-note { margin-top: 40px; font-size: .58rem; letter-spacing: .14em; color: var(--dim); opacity: .7; }
.aside-note a { color: inherit; }
.reel-wrap { margin-top: 30px; display: grid; gap: 12px; max-width: 760px; margin-left: auto; margin-right: auto; }
.reel { display: grid; gap: 10px; }
.reel canvas {
  width: 100%; height: auto; display: block; background: #000;
  border-radius: 22px 18px 26px 16px / 18px 24px 16px 22px;
  filter: contrast(1.08) blur(.25px);
}
.reel-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.signed, .cipher {
  font-family: var(--f-mono); font-size: .86rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
  margin: 0; padding: 18px 20px; background: var(--field-bg); border: 1px dashed var(--line-dim);
  border-radius: 14px 5px 16px 4px / 5px 14px 4px 15px;
}
.cipher { letter-spacing: .22em; font-size: .95rem; }
.letter { max-width: 760px; font-family: var(--f-mono); }
.letter-head { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 18px; }
.sealed-block { max-width: 760px; margin-top: 24px; opacity: .8; }
.small-hand { font-size: .95rem; transform: rotate(.3deg); }
.bookcode { font-family: var(--f-mono); font-style: normal; letter-spacing: .08em; overflow-wrap: anywhere; }
.void-presence { display: grid; place-items: center; min-height: 70vh; }
.fpr { letter-spacing: .12em; }
.relay { max-width: 860px; font-family: var(--f-mono); }
.relay-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.relay-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; line-height: 1.5; }
.relay-msg { display: grid; grid-template-columns: 4.2em 11.5em minmax(0, 1fr); gap: 0 12px; align-items: baseline; }
.relay-msg time { color: var(--dim); font-size: .78rem; }
.relay-msg b { font-weight: 700; font-size: .74rem; letter-spacing: .12em; color: var(--mid); }
.relay-msg.from-hav .relay-text { color: var(--ink); }
.relay-msg.from-rk .relay-text { color: var(--ink-2); }
.relay-msg.from-op3 b { color: var(--ink); }
.relay-msg.from-op3 .relay-text { font-family: var(--f-serif); font-style: italic; font-size: 1.04rem; letter-spacing: .01em; }
.relay-msg.deleted .relay-text { color: var(--dim); font-style: italic; }
.relay-edited { color: var(--dim); font-size: .72rem; }
.relay-msg.rewriting .relay-text { filter: blur(1.4px); opacity: .45; letter-spacing: .2em; transition: all .5s; }
.relay-sys { text-align: center; font-size: .68rem; letter-spacing: .22em; color: var(--mid); padding: 10px 0; border-top: 1px dashed var(--line-dim); border-bottom: 1px dashed var(--line-dim); margin: 8px 0; }
.relay-typing { min-height: 1.4em; margin: 14px 0 0; font-size: .74rem; letter-spacing: .12em; color: var(--dim); }
@media (max-width: 640px) {
  .relay-msg { grid-template-columns: 1fr; }
  .relay-msg time, .relay-msg b { display: inline; }
}
.index-card {
  position: relative; max-width: 620px; padding: 22px 24px 70px; font-family: var(--f-mono);
  border: 1px solid var(--line); border-radius: 3px 7px 4px 9px / 8px 3px 9px 4px;
  background: repeating-linear-gradient(var(--bg-2) 0 27px, var(--line-dim) 27px 28px);
  transform: rotate(-.5deg);
}
.index-card .record-fields { grid-template-columns: 1fr; gap: 10px; margin: 0; }
.card-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; font-size: .6rem; letter-spacing: .24em; color: var(--mid); border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.card-stamp { position: absolute; right: 18px; bottom: 14px; margin: 0; font: 700 .8rem/1 var(--f-mono); letter-spacing: .3em; border: 2px solid var(--ink); padding: 6px 8px; transform: rotate(9deg); opacity: .55; }
@media (max-width: 520px) { .card-stamp { position: static; display: inline-block; margin-top: 16px; } }
.tape { max-width: 760px; margin-top: 24px; }
.tape-reels { display: flex; gap: 34px; margin: 18px 0; }
.tape-reels i {
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--ink);
  background: radial-gradient(circle, var(--ink) 0 4px, transparent 5px 14px, var(--line-dim) 15px 16px, transparent 17px),
              conic-gradient(var(--line-dim) 0 10%, transparent 10% 33%, var(--line-dim) 33% 43%, transparent 43% 66%, var(--line-dim) 66% 76%, transparent 76%);
}
.tape-reels.turning i { animation: reel-turn 1.1s linear infinite; }
.tape-reels.turning i + i { animation-duration: 1.6s; }
@keyframes reel-turn { to { transform: rotate(-360deg); } }
.tape-out audio { width: 100%; max-width: 520px; filter: grayscale(1); margin: 6px 0 10px; }
:root[data-polarity="dark"] .tape-out audio { filter: grayscale(1) invert(.88); }
.notebook { max-width: 720px; display: grid; gap: 26px; }
.nb-page {
  padding: 22px 24px 26px 46px; position: relative; font-family: var(--f-serif); font-size: 1.08rem; line-height: 1.75;
  background: repeating-linear-gradient(transparent 0 calc(1.75em - 1px), var(--line-dim) calc(1.75em - 1px) 1.75em);
  border-left: 1px solid var(--line-dim);
}
.nb-page::before { content: ""; position: absolute; left: 14px; top: 18px; bottom: 18px; width: 8px; background: radial-gradient(circle, transparent 0 2.5px, var(--line) 3px 3.6px, transparent 4px) 0 0 / 8px 26px repeat-y; }
.nb-page p { margin: 0 0 .9em; }
.nb-day { font: 700 .66rem var(--f-mono); letter-spacing: .3em; color: var(--mid); margin: 0 0 12px; }
.nb-bright { font-style: italic; }
.nb-cipher { font-size: .82rem; letter-spacing: .16em; margin: 10px 0; }
.nb-page:last-child { min-height: 30vh; display: grid; align-content: end; }
.nb-page:last-child .nb-bright { font-size: .86rem; opacity: .7; }
.o-notes { max-width: 820px; font-family: var(--f-mono); font-size: .92rem; line-height: 1.7; }
.o-entry { margin: 0 0 1.3em; }
.o-entry p { margin: 0; }
.o-sign { font-family: var(--f-serif); font-style: italic; color: var(--ink-2); white-space: nowrap; }
.wounded { --open: 0; position: relative; }
.wounded .lip { display: inline; transition: none; }
.wounded p { position: relative; }
.wounded .lip:first-of-type { position: relative; top: calc(var(--open) * -2px * var(--depth)); }
.wounded .lip.lo { position: relative; top: calc(var(--open) * 3px * var(--depth)); left: calc(var(--open) * 4px); }
.leak {
  margin: 4px 0 0 2em; max-height: calc(var(--open) * var(--depth) * 1.6em); overflow: hidden;
  font-size: .62rem; line-height: 1.6; letter-spacing: .12em; color: var(--mid); white-space: pre-wrap; overflow-wrap: anywhere;
  border-left: 1px solid var(--line-dim); padding-left: 10px;
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
  transform: skewX(calc(var(--open) * -6deg));
}
.inventory { width: 100%; max-width: 640px; border-collapse: collapse; margin: 34px 0 10px; font-size: .78rem; letter-spacing: .06em; }
.inventory caption { text-align: left; font-size: .62rem; letter-spacing: .26em; color: var(--mid); padding-bottom: 8px; }
.inventory th { text-align: left; font-size: .58rem; letter-spacing: .24em; color: var(--mid); border-bottom: 2px solid var(--line); padding: 6px 8px; }
.inventory td { padding: 6px 8px; border-bottom: 1px dashed var(--line-dim); vertical-align: top; }
.inventory td:nth-child(3) { color: var(--ink-2); font-style: italic; font-family: var(--f-serif); }
.o-foot { font-size: .8rem; color: var(--ink-2); }
@media (max-width: 520px) { .inventory { font-size: .72rem; } .inventory td, .inventory th { padding: 5px 4px; } }
.witness { font-family: var(--f-serif); font-style: italic; font-size: 1.15rem; margin: 18px 0 0 40%; transform: rotate(-2deg); }
.confession {
  width: min(680px, 100%); margin: 0 auto; padding: clamp(26px, 5vw, 56px);
  font-family: var(--f-mono); font-size: .95rem; line-height: 1.7; background: var(--bg-2);
  border: 1px solid var(--line-dim); border-radius: 2px 6px 3px 5px / 5px 2px 6px 3px;
}
.confession pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; }
.confession .letter-text p { margin: 0 0 1.1em; max-width: 62ch; }
.confession details { margin-top: 30px; font-size: .7rem; letter-spacing: .1em; color: var(--mid); }
.confession details pre { font-size: .62rem; margin-top: 10px; }
.deep { width: min(680px, 100%); margin: 26px auto 0; }
.deep-log { display: grid; gap: 12px; margin-bottom: 14px; }
.deep-me { margin: 0; font: .82rem/1.5 var(--f-mono); color: var(--mid); text-align: right; }
.deep-her { margin: 0; font: italic 1rem/1.6 var(--f-serif); white-space: pre-wrap; }
.deep textarea { width: 100%; background: transparent; }
.deep .btn { min-width: 44px; }
