* { box-sizing:border-box }
:root {
  --paper:#efeee8; --ink:#252623; --muted:#5e625b; --line:#c6c7be; --soft:#e3e3da;
  --white:#fbfaf6; --metal:#d1d2ca; --black:#252624; --accent:#815037;
  --sans:"Inter","Segoe UI","Microsoft YaHei UI","PingFang SC",sans-serif;
  --serif:"Baskervville","Songti SC","Noto Serif CJK SC","SimSun",serif;
  --mono:"IBM Plex Mono","Cascadia Mono","Consolas",monospace
}
body { margin:0; color:var(--ink); background:var(--paper); font:15px/1.6 var(--sans); -webkit-font-smoothing:antialiased }
[hidden] { display:none!important }
button,input,textarea,select { font:inherit }
button {
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem; padding:9px 16px;
  border:1px solid #a9ada1; border-radius:3px; background:transparent; color:var(--ink);
  font-size:14px; line-height:1.5; cursor:pointer; transition:background .14s,border-color .14s,color .14s
}
button:hover { background:#e0e1d8; border-color:#70746b }
button:disabled { opacity:.5; cursor:wait }
:where(button,a,input,textarea,select,summary):focus-visible { outline:2px solid #9b6341; outline-offset:3px }
button.solid { background:var(--black); border-color:var(--black); color:#fafaf3; font-weight:600; padding:11px 20px }
button.solid:hover { background:#46483e; border-color:#46483e }
button.quiet { border-color:transparent; color:var(--muted) }
button.danger { color:#973d34 }
button.icon { width:34px; height:34px; padding:0; border:1px solid #6a6b65; border-radius:50%; color:#fbfbf8; background:transparent; font-size:22px }
button.icon:hover { background:#484a44 }
h1,h2,h3,p,figure,dl,dd { margin:0 }
h1,.plate-caption h2,.dialog-top h2 { font-family:var(--serif); font-weight:600; letter-spacing:-.055em }
h1 { font-size:clamp(35px,3.7vw,58px); line-height:1.15 }
h2 { font-size:20px; font-weight:630; line-height:1.3 } h3 { font-size:17px }
.wordmark { display:flex;align-items:center;gap:12px;font-size:17px;font-weight:630;letter-spacing:.09em;white-space:nowrap }
.wordmark i { display:block;position:relative;width:26px;height:18px;margin-top:2px;border:2px solid currentColor;border-radius:3px }
.wordmark i:before { content:"";position:absolute;top:-5px;left:2px;width:7px;height:3px;border-radius:1px 1px 0 0;background:currentColor }
.wordmark i:after { content:"";position:absolute;top:2px;left:8px;width:7px;height:7px;border:1.5px solid currentColor;border-radius:50% }
.top {
  display:flex;align-items:center;gap:clamp(26px,6vw,100px);height:64px;
  padding:0 clamp(20px,5.15vw,90px);color:#f0f0e8;
  background:linear-gradient(180deg,#30312f,#252624);border-bottom:1px solid #74766c
}
.top nav { display:flex;align-self:stretch;gap:clamp(18px,2.7vw,48px) }
.top nav button { position:relative;background:transparent;color:#c0c2b9;border:0;border-radius:0;padding:0 4px;font-size:14px }
.top nav button:hover,.top nav button[aria-current=page] { color:#fffefa }
.top nav button[aria-current=page]:after { content:"";height:2px;position:absolute;left:4px;right:4px;bottom:10px;background:#e7e7da }
.top>.quiet { margin-left:auto;padding:6px 12px;color:#d7d9d0;border-color:#62655d;font-size:13px }
.top>.quiet:hover { background:#43463e }
main { max-width:1500px; margin:0 auto; padding:clamp(28px,3.7vw,58px) clamp(20px,5.15vw,90px) 64px }
.heading,.section-head,.dialog-top,.actions,.strip { display:flex;align-items:center;justify-content:space-between;gap:15px }
.heading { border-bottom:1px solid #686c61;padding-bottom:clamp(18px,2vw,30px);margin-bottom:clamp(21px,2.25vw,34px) }
.heading>div { display:flex;align-items:baseline;gap:18px;flex-wrap:wrap }
.heading p,.help,.muted,small { color:var(--muted) }
.heading p { font-size:14px }
.strip { justify-content:flex-start;flex-wrap:wrap }
.catalog-layout { display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);grid-template-areas:"plate index" "plate specs";grid-template-rows:max-content 1fr;gap:28px clamp(27px,4.4vw,76px);align-items:start }
.film-sheet,.inventory,.recipe-sheet { min-width:0 }
.film-sheet { grid-area:plate }.inventory { grid-area:index }.recipe-sheet { grid-area:specs }.mobile-price { display:none }
.film-gate {
  padding:clamp(13px,1.25vw,20px) clamp(19px,1.78vw,28px);position:relative;isolation:isolate;
  background:linear-gradient(105deg,#30312d,#1c1d1a 55%,#31322d);
  border-radius:4px;box-shadow:0 1px 0 #fff8,0 1px 2px #16181438
}
.film-gate:before,.film-gate:after {
  content:"";position:absolute;top:10%;bottom:10%;width:6px;opacity:.62;
  background:repeating-linear-gradient(to bottom,#a2a398 0 8px,transparent 8px 36px)
}
.film-gate:before { left:calc(1.05% + 2px) }.film-gate:after { right:calc(1.05% + 2px) }
.film-window {
  aspect-ratio:1.22;overflow:hidden;position:relative;display:grid;place-items:center;
  background:#b9b9ac;border-radius:2px;box-shadow:0 0 0 1px #050504
}
.film-window img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center }
.missing-art { font-size:14px;color:#404239 }
.plate-caption { margin-top:20px;display:flex;justify-content:space-between;gap:20px;align-items:start }
.plate-caption>div { min-width:0 }.plate-caption h2 { font-size:clamp(32px,2.9vw,47px);line-height:1.15;overflow-wrap:anywhere }
.plate-caption p { font-size:14px;color:var(--muted);margin-top:10px;overflow-wrap:anywhere;max-width:47em }
button.edit-stock { white-space:nowrap;margin-top:3px;padding:7px 14px;border-color:#8d9086 }
.index-head,.stock-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(56px,.26fr) minmax(66px,.29fr);align-items:center;gap:10px }
.index-head { min-height:30px;padding:0 13px 9px 14px;border-bottom:1px solid #767a70 }
.index-head h2,.recipe-sheet>h2 { font-family:var(--serif);font-size:22px;letter-spacing:-.035em;font-weight:600 }
.index-head span { color:var(--muted);font-size:12px;text-align:right }
.stock-index { max-height:365px;overflow:auto;scrollbar-color:#b0b2a8 transparent;scrollbar-width:thin }
button.stock-row {
  position:relative;width:100%;min-height:65px;margin:0;padding:8px 13px 8px 14px;border:0;border-bottom:1px solid var(--line);
  border-radius:0;text-align:left;color:var(--ink);font-variant-numeric:tabular-nums
}
.stock-row:hover { background:#e4e5dc }
.stock-row[aria-pressed=true] { background:#dbddd3 }
.stock-row[aria-pressed=true]:before { content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#585e50 }
.stock-row:focus-visible { outline-offset:-3px }
.stock-identity { display:flex;align-items:center;gap:13px;min-width:0 }
.stock-identity strong { overflow-wrap:anywhere;font-size:16px;font-weight:570;line-height:1.35 }
.stock-identity img,.thumb-empty { display:block;flex:none;width:44px;height:44px;object-fit:cover;background:#c0c2b8;border-radius:1px }
.frame-count,.stock-price { display:block;text-align:right;font-size:14px }
.frame-count { color:#575d52 }.stock-price { font-family:var(--mono);letter-spacing:-.04em }
.recipe-sheet { border-top:1px solid #767a70;padding-top:12px }
.specs { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 25px;padding:17px 0 15px }
.specs dt { font-size:12px;color:var(--muted);margin-bottom:2px }
.specs dd { font-size:14px;font-weight:530;overflow-wrap:anywhere;line-height:1.5 }
.recipe-detail { border-top:1px solid var(--line);font-size:13px }
.recipe-detail summary { cursor:pointer;line-height:1.5;padding:11px 0;color:#454b40;font-weight:560 }
.recipe-detail p { color:#454b40;padding:0 0 10px;white-space:pre-wrap;overflow-wrap:anywhere }
.entry { display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);min-height:100vh;background:var(--paper) }
.entry-photo { min-height:370px;background:#21231f;display:grid;place-items:center;overflow:hidden;position:relative;padding:clamp(20px,6vw,110px) }
.entry-photo img { width:min(100%,680px);max-height:82vh;aspect-ratio:1;object-fit:cover;box-shadow:0 0 0 1px #131411,0 18px 48px #0003 }
.entry-content { display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:48px clamp(32px,7vw,122px) }
.entry-content .wordmark { margin-bottom:clamp(35px,5.5vh,68px);font-size:15px;color:#51574b }
.entry-content h1 { margin-bottom:30px }.entry-content form { width:min(390px,100%) }.entry-content .solid { width:100%;justify-content:space-between;margin-top:12px }
label { display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:570;margin-bottom:15px }
input,textarea,select { min-width:0;width:100%;padding:10px 11px;border:1px solid #aeb2a5;border-radius:2px;color:var(--ink);background:#fbfbf7;font-weight:400;font-size:14px;line-height:1.55 }
input::placeholder,textarea::placeholder { color:#73786f }
textarea { resize:vertical;min-height:75px }input[type=color] { height:44px;padding:4px }input[type=checkbox] { width:auto }
.grid2 { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 17px }
.help { font-size:13px;margin:3px 0 14px }.error,#login-error { font-size:14px;color:#94392e;white-space:pre-wrap;margin-top:9px }
.help:empty,.error:empty,#login-error:empty { display:none }
dialog { width:min(700px,calc(100% - 28px));max-height:90vh;padding:0;border:1px solid #676b60;border-radius:4px;color:var(--ink);background:var(--paper);box-shadow:0 18px 85px #14171249 }
dialog::backdrop { background:#1619158c }
.dialog-top { position:sticky;top:0;z-index:2;padding:15px 24px;color:#f1f2e9;background:#2a2c28 }
.dialog-top h2 { font-size:27px }#dialog-content { padding:21px 24px 26px }
fieldset { border:0;min-width:0;margin:21px 0 0;padding:15px 0 0;border-top:1px solid #b1b5a8 }
legend { font-weight:600;font-size:17px;padding:0 11px 0 0 }
.preview { display:block;max-width:190px;max-height:150px;border:1px solid #aaafa1;border-radius:2px;margin-bottom:12px;object-fit:cover }
.actions { justify-content:flex-end;margin-top:20px;flex-wrap:wrap }.actions .danger { margin-right:auto }
.table-scroll { overflow:auto;scrollbar-width:thin }
table { border-collapse:collapse;width:100%;font-size:14px;font-variant-numeric:tabular-nums }
th,td { text-align:left;white-space:nowrap;padding:12px 11px;border-bottom:1px solid var(--line) }
th { color:#50564b;font-weight:600;font-size:12px;border-top:1px solid #797e71;background:#e3e5dc }
.settings { max-width:800px }.settings fieldset { padding-top:20px }.settings label { margin-bottom:18px }
.stats { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:10px 0 17px;border-top:1px solid #989e8e;border-bottom:1px solid #989e8e }
.stats>div { padding:10px 12px 10px 0 }.stats b { display:block;font-weight:550;font-size:19px }.stats small { font-size:12px }
.inline { display:flex;align-items:center;gap:9px;flex-wrap:wrap }.inline label { flex-direction:row;align-items:center;margin:0 }
.search { width:min(310px,100%);margin-bottom:17px }
#toast { position:fixed;left:50%;bottom:23px;transform:translateX(-50%);background:#252824;color:#fff;z-index:9;max-width:calc(100vw - 28px);padding:9px 18px;border-radius:3px;text-align:center }
@media(max-width:950px) and (min-width:721px) {
  .catalog-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px }
  .stock-identity { gap:8px }.stock-identity img,.thumb-empty { width:34px;height:34px }.index-head,.stock-row { gap:4px }
  button.stock-row { min-height:56px }.plate-caption { flex-wrap:wrap;gap:10px }
}
@media(max-width:720px) {
  .top { height:auto;min-height:55px;display:grid;grid-template-columns:1fr auto;gap:0;padding-top:13px }
  .top .wordmark { font-size:15px }.top nav { order:3;grid-column:1/-1;height:40px;gap:25px }
  .top>.quiet { margin-left:0;padding:4px 9px }.top nav button[aria-current=page]:after { bottom:0 }
  main { padding:25px 18px 45px }.heading { gap:10px }.heading>div { gap:2px;display:block }.heading p { font-size:12px;margin-top:4px }
  .heading .solid { padding:9px 12px;font-size:13px }
  .catalog-layout { display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:"index" "plate" "specs";gap:18px }
  .index-head { display:none }
  .stock-index { display:flex;gap:4px;overflow-x:auto;max-height:none }
  button.stock-row { display:block;flex:1 0 77px;min-height:0;padding:5px 4px 8px;text-align:center;border:0;border-bottom:2px solid var(--line) }
  .stock-row[aria-pressed=true] { background:#dadcd2;border-bottom-color:#50574a }
  .stock-row[aria-pressed=true]:before,.stock-row .frame-count,.stock-row .stock-price { display:none }
  .stock-identity { flex-direction:column;gap:4px }.stock-identity img,.thumb-empty { width:36px;height:36px }
  .stock-identity strong { font-size:12px;max-width:100%;line-height:1.4 }
  .mobile-price { display:block;margin-top:6px;font:12px/1.5 var(--mono);color:#444a3f }
  .film-gate { padding:11px 15px }.film-window { aspect-ratio:1.22 }
  .film-gate:before,.film-gate:after { width:4px;top:13%;bottom:13%;background:repeating-linear-gradient(to bottom,#a3a59a 0 5px,transparent 5px 23px) }
  .plate-caption { margin-top:13px;gap:10px }.plate-caption h2 { font-size:30px }.plate-caption p { font-size:13px;margin-top:5px }
  .plate-caption .edit-stock { font-size:13px;margin-top:0;padding:6px 9px }.index-head h2,.recipe-sheet>h2 { font-size:20px }
  .entry { grid-template-columns:1fr;grid-template-rows:minmax(170px,32vh) 1fr }.entry-photo { min-height:0;padding:14px; }
  .entry-photo img { width:auto;height:min(100%,260px);max-height:30vh }.entry-content { padding:29px 25px;justify-content:flex-start }
  .entry-content .wordmark { margin-bottom:21px }.entry-content h1 { margin-bottom:20px }
  .dialog-top { padding:12px 15px }#dialog-content { padding:16px }.grid2 { grid-template-columns:1fr }
}
@media(prefers-reduced-motion:reduce) { * { transition:none!important;scroll-behavior:auto!important } }
