
@font-face { font-family: "CMU Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/cmu-serif-normal.woff2) format("woff2"); }
@font-face { font-family: "CMU Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/cmu-serif-italic.woff2) format("woff2"); }

:root {
  --ink: #22222A; --navy: #1A2A4A; --slate: #56648A; --muted: #5A5C6B; --rust: #8F3B1E; --paper: #FFFFFF;
  --soft: #F4F5F8; --soft2: #E7E9EF; --desk: #ECEDF1; --gold: #E0A23C; --teal: #1FA89C; --orange: #C65A2E;
  --font: "CMU Serif", "Latin Modern Roman", "Computer Modern Serif", Georgia, serif;
  --ui: var(--font);
}
html.night {
  --ink: #E6E3DA; --navy: #C8D3EA; --slate: #A2ADC6; --muted: #A0A2B1; --rust: #EE9670; --paper: #10131B;
  --soft: #181C27; --soft2: #232838; --desk: #0C0F16; color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--navy); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }
h1, h2, h3, h4 { font-weight: 400; color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img.ico, .ico-undo, .ico-redo { image-rendering: pixelated; image-rendering: crisp-edges; flex: none; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 14px; height: 14px; background: var(--paper); }
  ::-webkit-scrollbar-thumb { background: var(--ink); background-clip: padding-box; border: 3px solid transparent; border-radius: 0; }
  ::-webkit-scrollbar-thumb:hover { background-color: var(--navy); }
}


.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; line-height: 1.2; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, box-shadow .08s; }
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active:not(:disabled) { transform: none; box-shadow: none; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--paper); }
html.night .btn.primary { color: #10131B; }
.btn.primary img.ico { filter: brightness(0) invert(1); }
html.night .btn.primary img.ico { filter: none; }
.btn.danger { border-color: var(--rust); color: var(--rust); }
.btn.small { font-size: 15px; padding: 3px 10px; }
.btn.icon { padding: 5px; }
.btn.wide { display: flex; width: 100%; margin: 10px 0 0; }
.btn.toggle[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.link { border: 0; background: none; padding: 0 2px; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 16px; }
.link:hover { color: var(--rust); }
.field { font-size: 16px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); width: 100%; min-width: 0; }
.field.small { width: auto; padding: 3px 6px; font-size: 15px; }
.field.num { width: 5.2em; }
select.field { padding-right: 24px; }
input[type=range] { width: 100%; accent-color: var(--navy); }
input[type=checkbox], input[type=radio] { accent-color: var(--navy); width: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.fieldrow { display: block; margin: 12px 0 0; }
.fieldrow > .lbl { display: block; font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.lbl { font-size: 15px; color: var(--muted); }
.note { font-size: 15px; color: var(--muted); margin: 8px 0 0; min-height: 1.2em; }
.muted { color: var(--muted); font-size: 15px; }
.tip { margin: 0 0 12px; font-size: 16px; }
.check, .radio { display: flex; gap: 9px; align-items: flex-start; margin: 10px 0 0; font-size: 16px; cursor: pointer; }
.check small, .radio small { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; }
.radios { margin: 6px 0 0; }
.radios .radio { margin: 6px 0 0; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; }
.swatch { width: 26px; height: 26px; padding: 0; border: 2px solid var(--ink); border-radius: 0; cursor: pointer; }
.swatch[aria-pressed=true] { outline: 3px solid var(--navy); outline-offset: 2px; }
.swatch.white { background: #fff; }


.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 0; max-width: 1500px; margin: 0 auto; }
.home { font-size: 15px; color: var(--slate); text-decoration: none; }
.home:hover { color: var(--rust); }
.sky { padding: 6px; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; line-height: 0; }
.sky img { width: 22px; height: 22px; image-rendering: pixelated; transition: transform .2s; }
.sky:hover img { transform: translateY(-2px); }


.intro { max-width: 1060px; margin: 0 auto; padding: 18px 20px 60px; }
.intro h1 { font-size: 48px; line-height: 1.08; margin: 6px 0 10px; }
.lede { font-size: 22px; line-height: 1.4; color: var(--navy); max-width: 760px; margin: 0 0 22px; }
.drop { display: flex; align-items: center; gap: 22px; padding: 26px 28px; border: 2px solid var(--ink); background: var(--soft); cursor: pointer; transition: background .15s, box-shadow .1s, transform .1s; }
.drop:hover, .drop.over { background: #FFF6E3; box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
html.night .drop:hover, html.night .drop.over { background: #2A2416; }
#stack { width: 120px; height: 96px; image-rendering: pixelated; flex: none; }
.drop-t { display: flex; flex-direction: column; gap: 2px; }
.drop-t strong { font-weight: 400; font-size: 26px; color: var(--navy); }
.drop-t span { color: var(--muted); font-size: 17px; }
.toolcards { margin: 34px 0 0; }
.tg h2 { font-size: 24px; margin: 26px 0 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.card:active { transform: none; box-shadow: none; }
.card .ci img { width: 36px; height: 36px; image-rendering: pixelated; }
.card .ct { display: flex; flex-direction: column; }
.card strong { font-weight: 400; font-size: 19px; color: var(--navy); line-height: 1.2; }
.card .ct span { font-size: 15px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.how { max-width: 760px; margin: 46px 0 0; font-size: 17px; }
.how h2 { font-size: 24px; margin: 0 0 8px; }
.how p { margin: 0 0 10px; }
.credits { color: var(--muted); font-size: 15px; }


body.has-desk { background: var(--desk); }
body.has-desk .top { background: var(--paper); max-width: none; padding-bottom: 8px; }
.desk { max-width: none; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 20px; background: var(--paper); border-bottom: 2px solid var(--ink); }
.namebox { display: flex; align-items: center; gap: 2px; min-width: 160px; flex: 0 1 300px; }
.namebox .field { font-size: 18px; color: var(--navy); }
.namebox .ext { color: var(--muted); font-size: 16px; }
.stats { color: var(--muted); font-size: 15px; white-space: nowrap; }
.spacer { flex: 1; }
.desk-body { display: grid; grid-template-columns: 210px minmax(0, 1fr) 340px; align-items: start; min-height: calc(100vh - 120px); }
.rail { position: sticky; top: 64px; max-height: calc(100vh - 64px); overflow: auto; padding: 10px 8px 30px 12px; background: var(--paper); border-right: 2px solid var(--ink); align-self: stretch; }
.rg h3 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 6px 4px; }
.rt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 5px 6px; border: 2px solid transparent; background: none; cursor: pointer; font-size: 16px; color: var(--ink); line-height: 1.2; }
.rt img { width: 24px; height: 24px; image-rendering: pixelated; }
.rt:hover { border-color: var(--ink); }
.rt[aria-pressed=true] { background: var(--navy); color: var(--paper); border-color: var(--navy); }
html.night .rt[aria-pressed=true] { color: #10131B; }
.pages { padding: 14px 22px 120px; min-width: 0; }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 36px; margin: 0 0 12px; font-size: 16px; }
.selbar strong { font-weight: 400; color: var(--navy); margin-right: 4px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 22px 18px; }
.thumb { display: flex; flex-direction: column; align-items: center; gap: 6px; outline: none; user-select: none; -webkit-user-select: none; touch-action: pan-y; -webkit-touch-callout: none; }
.thumb .paper { position: relative; display: flex; align-items: center; justify-content: center; width: 166px; height: 222px; cursor: grab; }
.thumb canvas { display: block; background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(34, 34, 42, .18); max-width: 100%; max-height: 100%; }
html.night .thumb canvas { border-color: #2c3346; box-shadow: none; }
.thumb.sel canvas { outline: 4px solid var(--orange); outline-offset: 3px; }
.thumb:focus-visible canvas { outline: 3px solid var(--navy); outline-offset: 3px; }
.thumb.lifting { opacity: .35; }
.thumb .tag { position: absolute; left: 4px; top: 4px; width: 10px; height: 10px; border: 2px solid var(--ink); }
.thumb .badges { position: absolute; right: 2px; top: 2px; display: flex; gap: 3px; }
.badge { font-size: 12px; line-height: 1; padding: 3px 4px; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); font-family: ui-monospace, Menlo, monospace; }
.badge.dark { background: #000; color: #fff; border-color: #000; }
.thumb .under { display: flex; align-items: center; justify-content: space-between; width: 166px; min-height: 30px; }
.thumb .num { font-size: 16px; color: var(--muted); padding-left: 2px; }
.thumb .acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.thumb:hover .acts, .thumb:focus-within .acts, .thumb.sel .acts { opacity: 1; }
@media (hover: none) { .thumb .acts { opacity: 1; } }
.mini { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; color: var(--ink); font-size: 18px; }
.mini:hover:not(:disabled) { border-color: var(--ink); background: var(--paper); }
.mini:disabled { opacity: .3; }
.mini img { width: 18px; height: 18px; image-rendering: pixelated; }
html.night .mini img, html.night .rt:not([aria-pressed=true]) img, html.night .btn:not(.primary) img.ico, html.night .ph img { filter: invert(.9) hue-rotate(180deg); }
.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; width: 120px; opacity: .92; }
.ghost .paper { width: 110px; height: 150px; }
.ghost .under { display: none; }
.ghost .count { position: absolute; right: 0; top: -8px; background: var(--rust); color: #fff; font-size: 14px; padding: 1px 7px; border: 2px solid var(--ink); }
.drop-marker { position: fixed; z-index: 99; width: 4px; background: var(--orange); display: none; pointer-events: none; }
body.dragging-files .pages { outline: 3px dashed var(--orange); outline-offset: -10px; }

.panel { position: sticky; top: 64px; max-height: calc(100vh - 64px); overflow: auto; padding: 16px 18px 40px; background: var(--paper); border-left: 2px solid var(--ink); align-self: stretch; font-size: 16px; }
.panel-x { display: none; }
.ph { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; }
.ph img { width: 36px; height: 36px; image-rendering: pixelated; }
.ph h2 { font-size: 24px; margin: 0; line-height: 1.15; }
.ph p { margin: 2px 0 0; color: var(--muted); font-size: 15px; line-height: 1.35; }
.panel h4 { font-size: 18px; margin: 22px 0 4px; }
.files { list-style: none; margin: 6px 0 0; padding: 0; }
.files li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--soft2); }
.files .chip { width: 12px; height: 12px; border: 2px solid var(--ink); flex: none; }
.files .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files small { display: block; color: var(--muted); font-size: 13px; }
.plain { padding-left: 18px; margin: 8px 0; }
.plain li { margin: 6px 0; }
.posgrid { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: 44px 44px; gap: 4px; margin: 12px 0 0; padding: 6px; border: 2px solid var(--ink); width: max-content; background: var(--soft); }
.pos { position: relative; border: 2px solid transparent; background: var(--paper); cursor: pointer; }
.pos[aria-pressed=true] { border-color: var(--navy); }
.pos .dot { position: absolute; width: 10px; height: 6px; background: var(--slate); }
.pos[aria-pressed=true] .dot { background: var(--orange); }
.dot.tl { left: 5px; top: 5px; } .dot.tc { left: 15px; top: 5px; } .dot.tr { right: 5px; top: 5px; }
.dot.bl { left: 5px; bottom: 5px; } .dot.bc { left: 15px; bottom: 5px; } .dot.br { right: 5px; bottom: 5px; }
.cropgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 8px; align-items: end; margin: 6px 0 4px; }
.cropgrid .fieldrow { margin: 6px 0 0; }
.cropmid { display: block; height: 52px; border: 2px dashed var(--slate); margin: 6px 0 0; }
.metabox dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 6px 0 4px; font-size: 15px; }
.metabox dt { color: var(--muted); }
.metabox dd { margin: 0; word-break: break-word; }
.sigrow { display: flex; flex-wrap: wrap; gap: 8px; }
.sigprev { height: 40px; max-width: 140px; object-fit: contain; border: 2px solid var(--soft2); background: #fff; padding: 2px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); z-index: 300; max-width: min(640px, calc(100vw - 24px)); padding: 10px 16px; background: var(--navy); color: var(--paper); border: 2px solid var(--ink); font-size: 16px; transition: transform .2s, opacity .2s, visibility .2s; pointer-events: none; opacity: 0; visibility: hidden; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast.error { background: var(--rust); }
html.night .toast { color: #10131B; }
.busy { position: fixed; left: 16px; bottom: 16px; z-index: 310; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: 16px; max-width: calc(100vw - 32px); }
.busy[hidden] { display: none; }
.busy-dot { width: 12px; height: 12px; background: var(--orange); animation: blink 0.8s steps(2) infinite; flex: none; }
@keyframes blink { 50% { background: var(--gold); transform: translateY(-3px); } }
body.working .bar .btn, body.working .panel .btn { pointer-events: none; opacity: .55; }


dialog.dz { border: 2px solid var(--ink); border-radius: 0; padding: 0; width: min(560px, calc(100vw - 24px)); max-width: calc(100vw - 24px); background: var(--paper); color: var(--ink); font-family: var(--font); }
dialog.dz::backdrop { background: rgba(34, 34, 42, .4); }
.dz-in { padding: 16px 20px 18px; }
.dz-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.dz h2 { font-size: 24px; line-height: 1.2; margin: 0; }
.dz-x { font: inherit; font-size: 28px; line-height: 1; border: 0; background: none; color: var(--ink); cursor: pointer; padding: 0 2px; }
.dz-x:hover { color: var(--rust); }
.dz-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.sigdlg { width: min(720px, calc(100vw - 24px)); }
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--ink); margin: 0 0 12px; }
.tab { font-size: 17px; padding: 6px 16px; border: 2px solid transparent; border-bottom: 0; background: none; cursor: pointer; margin-bottom: -2px; color: var(--muted); }
.tab[aria-selected=true] { border-color: var(--ink); background: var(--paper); color: var(--navy); }
.sig-pad { display: block; width: 100%; aspect-ratio: 1200 / 420; border: 2px solid var(--ink); background: #fff linear-gradient(transparent calc(78% - 1px), #C9CCD6 calc(78% - 1px), #C9CCD6 78%, transparent 78%); touch-action: none; cursor: crosshair; }
.sig-photo { cursor: default; background: repeating-conic-gradient(#f3f3f3 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.sig-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 0; }
.hint { color: var(--muted); font-size: 15px; }
.hint.inline { display: flex; align-items: center; gap: 8px; }
.faces { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 10px 0 0; }
.face { font-size: 40px; line-height: 1.25; padding: 4px 14px; text-align: left; border: 2px solid var(--soft2); background: #fff; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face[aria-pressed=true] { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }


dialog.editor { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--desk); color: var(--ink); font-family: var(--font); }
dialog.editor[open] { display: flex; flex-direction: column; }
.ed-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--paper); border-bottom: 2px solid var(--ink); }
.ed-nav { display: flex; align-items: center; gap: 6px; }
.ed-title { min-width: 8.5em; text-align: center; font-size: 17px; color: var(--navy); }
.ed-body { flex: 1; display: flex; min-height: 0; }
.ed-tools { width: 128px; flex: none; overflow-y: auto; padding: 8px 6px; background: var(--paper); border-right: 2px solid var(--ink); display: flex; flex-direction: column; gap: 2px; }
.tool { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 2px solid transparent; background: none; cursor: pointer; font-size: 15px; text-align: left; color: var(--ink); line-height: 1.15; }
.tool img { width: 24px; height: 24px; image-rendering: pixelated; }
.tool:hover { border-color: var(--ink); }
.tool[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: var(--paper); }
html.night .tool[aria-pressed=true] { color: #10131B; }
html.night .tool img { filter: invert(.9) hue-rotate(180deg); }
.ed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-props { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 48px; padding: 6px 12px; background: var(--paper); border-bottom: 2px solid var(--ink); }
.ed-props .swatches { margin: 0; }
.ed-props .field { width: auto; }
.ed-props input[type=search] { width: 240px; }
.sigwrap { position: relative; display: inline-flex; }
.sigchip { height: 38px; padding: 2px 6px; border: 2px solid var(--soft2); background: #fff; cursor: pointer; }
.sigchip.on { border-color: var(--orange); box-shadow: 2px 2px 0 var(--ink); }
.sigchip img { height: 30px; max-width: 120px; object-fit: contain; display: block; }
.sigx { position: absolute; right: -8px; top: -8px; width: 18px; height: 18px; line-height: 14px; padding: 0; font-size: 14px; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; display: none; }
.sigwrap:hover .sigx, .sigwrap:focus-within .sigx { display: block; }
.ed-stage { flex: 1; overflow: auto; padding: 12px; display: flex; }
.ed-sheet { position: relative; margin: auto; flex: none; background: #fff; box-shadow: 4px 4px 0 rgba(0, 0, 0, .25); border: 2px solid var(--ink); box-sizing: content-box; }
.ed-canvas { position: absolute; left: 0; top: 0; display: block; }
.ed-layer { position: absolute; inset: 0; touch-action: pan-x pan-y; }
.ed-layer:not([data-tool=select]):not([data-tool=forms]) { cursor: crosshair; touch-action: none; }
.ed-layer[data-tool=text] { cursor: text; }
.ed-hint { margin: 0; padding: 6px 12px 8px; font-size: 15px; color: var(--muted); background: var(--paper); border-top: 2px solid var(--ink); min-height: 2.2em; }
.ed-paths { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.ed-paths .hit { pointer-events: stroke; cursor: move; }
.ed-paths .hit.on { filter: drop-shadow(0 0 2px var(--orange)); }
.it { position: absolute; transform-origin: 0 0; cursor: move; touch-action: none; white-space: pre; line-height: 1.2; box-sizing: border-box; }
.it.on { outline: 2px dashed #C65A2E; outline-offset: 2px; }
.it img { display: block; width: 100%; height: 100%; pointer-events: none; }
.it svg { display: block; pointer-events: none; overflow: visible; }
.it-whiteout { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.it-redact { background: #000; }
.it-highlight { mix-blend-mode: multiply; opacity: .85; }
.it-frame { pointer-events: none; }
.it.editing { cursor: text; outline: 2px solid #3D6B9E; background: rgba(255, 255, 255, .6); min-width: 10px; }
.grip { position: absolute; right: -9px; bottom: -9px; width: 14px; height: 14px; background: #C65A2E; border: 2px solid #22222A; cursor: nwse-resize; }
.band { position: absolute; border: 2px dashed #22222A; pointer-events: none; }
.band-redact { background: rgba(0, 0, 0, .75); }
.band-highlight { background: rgba(245, 213, 71, .85); mix-blend-mode: multiply; }
.band-whiteout { background: rgba(255, 255, 255, .85); }
.cropmask { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.crophole { position: absolute; box-shadow: 0 0 0 9999px rgba(34, 34, 42, .55); outline: 2px dashed #fff; }
.fld { position: absolute; border: 1px solid #3D6B9E; background: rgba(214, 228, 255, .55); color: #000; font-family: Helvetica, Arial, sans-serif; padding: 0 3px; border-radius: 0; resize: none; margin: 0; }
.fld:focus { outline: 2px solid #C65A2E; background: rgba(255, 255, 255, .9); }
input.fld[type=checkbox], input.fld[type=radio] { margin: 0; accent-color: #1A2A4A; }


@media (max-width: 1100px) { .desk-body { grid-template-columns: 190px minmax(0, 1fr) 300px; } }
@media (max-width: 900px) {
  body { font-size: 17px; }
  .intro h1 { font-size: 40px; }
  .lede { font-size: 19px; }
  .drop { padding: 18px; gap: 14px; }
  #stack { width: 75px; height: 60px; }
  .drop-t strong { font-size: 21px; }
  
  .bar { position: static; padding: 8px 12px; gap: 6px; }
  .namebox { flex: 1 1 100%; }
  .stats { order: 1; flex: 1 1 100%; font-size: 14px; }
  .bar .spacer { order: 2; display: none; }
  .bar .btn { order: 3; font-size: 15px; padding: 5px 10px; }
  #get { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; min-height: 54px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); font-size: 18px; border-width: 2px 0 0; }
  #get:hover:not(:disabled), #get:active:not(:disabled) { transform: none; box-shadow: none; }
  .desk-body { display: block; }
  .rail { position: sticky; top: 0; z-index: 15; display: flex; gap: 4px; overflow-x: auto; max-height: none; padding: 6px 8px; border-right: 0; border-bottom: 2px solid var(--ink); scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rg { display: contents; }
  .rg h3 { display: none; }
  .rt { flex: none; width: auto; font-size: 15px; padding: 4px 8px; white-space: nowrap; }
  .panel { position: fixed; left: 0; right: 0; bottom: calc(54px + env(safe-area-inset-bottom)); top: auto; z-index: 25; max-height: 55vh; overflow: auto; overscroll-behavior: contain; border-left: 0; border-top: 2px solid var(--ink); box-shadow: 0 -4px 0 rgba(26, 42, 74, .10); display: none; padding: 14px 16px 18px; }
  .panel.open { display: block; }
  .panel-x { display: block; position: sticky; top: 0; float: right; margin: -6px -6px 0 8px; z-index: 1; }
  .pages { padding: 12px 10px 90px; }
  body:has(.panel.open) .pages { padding-bottom: calc(55vh + 90px); }
  .toast { bottom: auto; top: 62px; transform: translate(-50%, -20px); }
  .toast.show { transform: translate(-50%, 0); }
  .busy { bottom: auto; top: 62px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 10px; }
  .thumb .paper { width: 130px; height: 176px; }
  .thumb .under { width: 136px; }
  .mini { width: 32px; height: 32px; }
  .ed-body { flex-direction: column-reverse; }
  .ed-tools { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-top: 2px solid var(--ink); padding: 4px; }
  .tool { flex-direction: column; gap: 2px; font-size: 12px; min-width: 64px; padding: 4px; text-align: center; }
  .ed-title { min-width: 6em; font-size: 15px; }
  .ed-props input[type=search] { width: 100%; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .ed-top { gap: 4px; padding: 6px 8px; flex-wrap: nowrap; }
  .ed-nav { gap: 4px; }
  .ed-top .btn.icon { padding: 2px; }
  .ed-top .btn.primary { padding: 5px 10px; font-size: 15px; }
  .ed-title { min-width: 0; font-size: 14px; white-space: nowrap; }
  .ed-props { gap: 6px; padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
