@font-face{font-family:Barlow;src:url('/assets/display.woff2') format('woff2');font-display:swap;font-weight:800}
@font-face{font-family:DM;src:url('/assets/body.woff2') format('woff2');font-display:swap;font-weight:400}
@font-face{font-family:DM;src:url('/assets/bold.woff2') format('woff2');font-display:swap;font-weight:700}
:root{--ink:#173d2f;--soft:#54695d;--green:#103d2c;--yellow:#f9db52;--cream:#f7f7ef;--paper:#fffefa;--line:#dce3d8;--mint:#e8efe1;--warn:#fff2cc;color:var(--ink);background:var(--cream);font:16px/1.5 DM,system-ui,sans-serif}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-height:100dvh}
svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
button:disabled{cursor:default;opacity:.48}
:focus-visible{outline:3px solid #18744d;outline-offset:3px}
h1,h2,p,ul{margin:0}
h1,h2{line-height:.98;font-family:Barlow,'Arial Narrow',sans-serif;font-weight:800}
h1{font-size:clamp(3.35rem,8vw,6.15rem);letter-spacing:-.025em}
h1 span{color:#9c7300}
h2{font-size:1.85rem;letter-spacing:.005em}
.top{background:#fffef9;border-bottom:1px solid var(--line)}
.top-inner{max-width:1136px;margin:auto;min-height:78px;padding:12px 26px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:24px}
.brand{display:flex;align-items:center;gap:10px;width:max-content}
.brand img{border-radius:11px}
.brand strong,.brand small{display:block;line-height:1}
.brand strong{font:800 1.65rem/.93 Barlow,sans-serif;letter-spacing:.02em}
.brand small{font-size:.57rem;letter-spacing:.125em;font-weight:700;margin-top:4px}
nav{display:flex;gap:6px;background:#f1f3ea;border-radius:13px;padding:5px}
nav a{display:flex;gap:8px;align-items:center;justify-content:center;min-height:42px;padding:7px 16px;border-radius:9px;color:var(--soft);font-size:.91rem;font-weight:700}
nav a[aria-current]{color:var(--ink);background:white;box-shadow:0 1px 4px #18382a1b}
nav svg,.local svg{width:17px;height:17px}
.local{justify-self:end;color:var(--soft);font-size:.86rem;display:flex;gap:6px;align-items:center}
main{max-width:1084px;margin:0 auto;padding:33px 20px 18px}
.hero{min-height:186px;margin-bottom:24px;padding:20px 28px 22px;display:flex;justify-content:space-between;align-items:center;gap:18px;border:1px solid #dce6d5;border-radius:24px;background:radial-gradient(ellipse at 86% 50%,#e3edd9 0%,#edf2e6 49%,#f2f3e9 100%)}
.hero p,.page-heading p{color:var(--soft);margin-top:10px}
.mascot{width:clamp(84px,17vw,138px);height:auto;aspect-ratio:1;object-fit:cover;border-radius:22%;box-shadow:0 10px 22px #173d2f25;transform:rotate(4deg);margin-right:8px}
.dashboard,.notebook-layout,.formats-layout{display:grid;grid-template-columns:minmax(0,1.88fr) minmax(0,1fr);gap:18px;align-items:start}
.camera-card{background:var(--green);color:#f9fbf3;padding:20px;border-radius:23px;box-shadow:0 7px 18px #193e2f1a}
.camera-title,.aside-title,.format-heading{display:flex;align-items:center;gap:12px}
.camera-title{margin-bottom:15px}
.camera-title p{margin-top:4px;color:#d6e3d7;font-size:.88rem}
.camera-icon,.tile-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:none;background:#2b5543;color:#f9db52}
.camera-icon svg{width:24px;height:24px}
.viewfinder{position:relative;display:grid;place-items:center;min-height:190px;aspect-ratio:2.38;border:1px solid #42634d;border-radius:14px;isolation:isolate;overflow:hidden;background-color:#102a21;background-image:radial-gradient(#51746070 1px,transparent 1px);background-size:16px 16px}
.viewfinder video,.viewfinder img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}
.viewfinder img{object-fit:contain}
.guide{position:absolute;width:76%;height:47%;top:26.5%;left:12%;z-index:1;pointer-events:none}
.guide i{width:18px;height:18px;border:3px solid var(--yellow);position:absolute}
.guide i:nth-child(1){top:0;left:0;border-width:3px 0 0 3px;border-radius:5px 0 0}
.guide i:nth-child(2){top:0;right:0;border-width:3px 3px 0 0;border-radius:0 5px 0 0}
.guide i:nth-child(3){bottom:0;left:0;border-width:0 0 3px 3px;border-radius:0 0 0 5px}
.guide i:nth-child(4){bottom:0;right:0;border-width:0 3px 3px 0;border-radius:0 0 5px}
.guide span{position:absolute;left:4%;right:4%;top:50%;height:1px;background:#f9db5266}
.aim-placeholder{z-index:2;text-align:center;background:#142d23;padding:7px 15px;border-radius:9px;display:grid;justify-items:center;gap:5px;color:#d5e5d5;font-size:.68rem;font-weight:700;letter-spacing:.16em}
.aim-placeholder svg{width:25px;height:25px;color:var(--yellow)}
.close-camera{position:absolute;z-index:3;right:6px;top:6px;background:#122b20e8!important;color:#fff}
.scan-status{font-size:.9rem;margin-top:11px;color:#ffe987}
.photo-options{font-size:.88rem;margin-top:8px}
.photo-options label{color:#fff;font-size:inherit;margin:0;min-height:34px;display:flex;align-items:center;gap:6px}
input[type=checkbox]{accent-color:#1c6747;width:18px;height:18px}
.primary,.secondary,.camera-secondary button,.text-action,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:11px;min-height:44px;padding:8px 13px;font-weight:700}
.primary{background:var(--yellow);color:#1c3527;border:1px solid #eed151}
.primary:hover:not(:disabled){background:#fce479}
.primary.small{padding-inline:17px}
.camera-action{width:100%;min-height:53px;font-size:1.05rem;margin-top:14px}
.camera-action svg{width:22px;height:22px}
.camera-card :focus-visible{outline-color:var(--yellow)}
.camera-secondary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:7px}
.camera-secondary button{color:#e5eee6;font-size:.91rem}
.camera-secondary button:hover{background:#24503e}
.scan-aside{display:grid;gap:14px}
.paper{border:1px solid var(--line);border-radius:19px;background:var(--paper);padding:18px;min-width:0}
.tile-icon{color:#285743;background:var(--mint);width:38px;height:38px;border-radius:11px}
.tile-icon svg{width:19px;height:19px}
.aside-title h2{font-size:1.66rem}
.note-name{font-weight:700;margin-top:15px;overflow-wrap:anywhere}
.muted,.field-help{color:var(--soft)}
.field-help{font-size:.9rem;min-height:1.4em;margin-top:6px}
.field-help:empty{display:none}
.text-action{padding:7px 0;justify-content:flex-start;margin-top:5px;font-size:.9rem;color:#226248}
.text-action:hover{text-decoration:underline}
.text-action svg{width:16px;height:16px}
.recent #recent-list{margin-top:10px}
.recent-item{display:flex;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px solid var(--line);font-size:.89rem;overflow-wrap:anywhere}
.recent-item:last-child{border-bottom:0}
footer{display:flex;align-items:center;gap:7px;color:var(--soft);justify-content:center;font-size:.79rem;text-align:center;margin:22px 0 5px}
footer svg{width:15px;height:15px}
.page-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:9px 0 22px}
.page-heading h1{font-size:clamp(3.15rem,7vw,5rem)}
.notebook-layout,.formats-layout{grid-template-columns:minmax(0,1fr) minmax(0,2.05fr)}
.note-list h2,.model-panel h2{margin-bottom:11px}
.note-list .secondary,.model-panel .secondary{width:100%;margin-top:10px}
.note-select,.pattern-select{width:100%;text-align:left;min-height:45px;padding:9px 10px;border-radius:9px;border:1px solid var(--line);margin-bottom:6px;overflow-wrap:anywhere}
.note-select[aria-pressed=true],.pattern-select[aria-pressed=true]{background:var(--mint);border-color:#8ead98}
.note-select strong,.note-select small{display:block}
.note-select small{color:var(--soft)}
.group-chips{display:flex;flex-wrap:wrap;list-style:none;gap:6px;padding:0;margin-top:10px}
.group-chips li{background:var(--mint);border-radius:8px;padding:4px 8px;font-size:.83rem;overflow-wrap:anywhere;min-width:0}
.note-detail h2{overflow-wrap:anywhere}
.exports,.form-actions{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}
.secondary{border:1px solid #cdd9ce;background:var(--paper);font-size:.9rem}
.secondary:hover:not(:disabled){background:var(--mint)}
.exports svg,.secondary svg{width:16px;height:16px}
.group-block{margin-top:12px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.group-block h3{margin:0;background:#eef3e9;padding:8px 12px;font-size:1rem;display:flex;align-items:center;justify-content:space-between;gap:8px;overflow-wrap:anywhere}
.group-block ul{list-style:none;padding:0 12px}
.group-block li{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:9px 0;overflow-wrap:anywhere}
.group-block li+li{border-top:1px solid var(--line)}
.group-block li small{color:var(--soft);text-align:right}
code,.pattern-output output,.pattern-select{font-family:ui-monospace,Menlo,monospace}
label{display:block;font-weight:700;font-size:.88rem;margin:12px 0 5px}
input:not([type=checkbox]),select{width:100%;min-height:46px;border:1px solid #bdcdbf;border-radius:10px;background:white;padding:8px 11px;font-size:16px}
.model-panel label{margin-top:0}
.model-panel h2{margin-top:17px}
.format-heading p{margin-top:5px}
.legend{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0 11px}
.legend span{font-size:.8rem;border:1px solid var(--line);padding:3px 8px;border-radius:7px}
.legend b{font-family:ui-monospace,monospace;margin-right:3px}
.wheel-bank{display:flex;flex-wrap:wrap;gap:5px;padding:9px;border-radius:14px;background:#15382c;border:1px solid #2d5243;box-shadow:inset 0 2px 8px #0c261b;margin-bottom:11px}
.wheel{width:49px;display:grid;grid-template-columns:1fr;justify-items:stretch;color:#f8fbef}
.wheel :focus-visible{outline-color:var(--yellow);outline-offset:-2px}
.wheel-step,.wheel-remove{min-width:44px;height:34px;color:#e1eadc;border-radius:6px;padding:0}
.wheel-step:hover,.wheel-remove:hover{background:#2d5243}
.wheel-step svg,.wheel-remove svg{width:16px;height:16px}
.wheel-step.up svg{transform:rotate(180deg)}
.wheel-window{height:75px;position:relative;overflow:hidden;border:1px solid #91a797;border-radius:7px;background:linear-gradient(#9ead9e,#f2f6e8 39%,#f4f6e9 61%,#a6b4a4);color:#163a2a;touch-action:none;user-select:none;padding:0}
.wheel-window::after{position:absolute;content:'';inset:24px 0;border-block:1px solid #183b2d44;pointer-events:none}
.wheel-track{position:absolute;inset-inline:0;top:24px;pointer-events:none;will-change:transform}
.wheel-face{display:grid;place-items:center;height:25px;font:800 1.48rem/1 Barlow,sans-serif}
.wheel-face.faded{opacity:.48;font-size:1.08rem}
.pattern-output{margin:12px 0 3px;font-size:.89rem}
.pattern-output output{padding:4px 6px;border-radius:6px;background:var(--mint);overflow-wrap:anywhere;margin-left:4px}
.valid{color:#236746}.invalid{color:#884600}
dialog{border:1px solid var(--line);color:var(--ink);background:var(--paper);border-radius:18px;padding:18px;width:min(510px,calc(100% - 24px));max-height:calc(100dvh - 28px);overflow:auto}
dialog::backdrop{background:#0d261eb3}
.dialog-title{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.dialog-title h2{font-size:2.2rem}
.icon-button{padding:0;width:44px;flex:none}
.icon-button:hover{background:var(--mint)}
#review-photo{display:block;width:100%;max-height:190px;object-fit:contain;background:#e5ebe3;border-radius:10px;margin-top:10px}
.notice{border:1px solid #e9ca73;border-radius:9px;background:var(--warn);color:#573f16;padding:8px 11px;font-size:.88rem;margin:8px 0}
#ocr-choices{display:flex;flex-wrap:wrap;gap:5px}
#ocr-details{margin-top:9px;font-size:.87rem}
#ocr-raw{white-space:pre-wrap;overflow-wrap:anywhere}
.input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
.check-row{display:flex;align-items:center;gap:7px}
dialog form>.primary{width:100%;margin-top:11px}
#picker-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(52px,1fr));gap:6px;margin-top:12px}
#picker-options button{font-family:ui-monospace,monospace}
.toast{position:fixed;z-index:10;bottom:max(24px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100vw - 28px);width:max-content;background:var(--green);color:white;padding:10px 15px;border-radius:10px;box-shadow:0 4px 22px #173d2f35}
@media(max-width:690px){
  .top-inner{min-height:65px;grid-template-columns:1fr auto;padding:9px 16px;gap:8px}
  .top-inner nav{position:fixed;z-index:5;left:0;right:0;bottom:0;justify-content:space-around;gap:0;border-radius:0;border-top:1px solid var(--line);background:#fffef9;padding:4px 8px calc(4px + env(safe-area-inset-bottom))}
  nav a{flex:1;flex-direction:column;gap:1px;font-size:.73rem;padding:5px;min-height:47px}
  nav a[aria-current]{background:var(--mint);box-shadow:none}
  main{padding:15px 12px calc(65px + env(safe-area-inset-bottom))}
  .hero{min-height:125px;padding:12px 14px;margin-bottom:12px;gap:9px;border-radius:17px}
  .hero h1{font-size:clamp(2.45rem,9.6vw,4rem)}
  .hero p{font-size:.83rem;line-height:1.3;margin-top:5px}
  .mascot{margin-right:3px}
  .dashboard,.notebook-layout,.formats-layout{grid-template-columns:1fr;gap:12px}
  .camera-card{padding:13px;border-radius:17px}
  .camera-title{margin-bottom:10px}
  .viewfinder{min-height:0;aspect-ratio:1.73}
  .camera-action{margin-top:10px}
  .scan-aside{gap:9px;grid-template-columns:1fr 1fr}
  .scan-aside .paper{padding:10px;border-radius:13px}
  .aside-title{gap:6px}
  .aside-title h2{font-size:1.32rem}
  .aside-title .tile-icon{height:27px;width:27px;border-radius:7px}
  .aside-title .tile-icon svg{height:15px;width:15px}
  .active-note .note-name{margin-top:7px}
  .scan-aside p,.scan-aside a{font-size:.79rem}
  .scan-aside .text-action{min-height:38px}
  .page-heading{margin:8px 0 14px}
  .page-heading p{font-size:.89rem}
  .page-heading .primary{white-space:nowrap}
  .formats-layout .paper,.notebook-layout .paper{padding:13px}
  .formats-layout .format-panel{grid-row:2}
  .wheel-step,.wheel-remove{height:44px}
  .toast{bottom:calc(66px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important}}
.viewfinder:has(#photo-preview:not([hidden])) .guide:not([hidden]){pointer-events:auto;touch-action:none;cursor:move;background:#f9db5217}
#picker-options [aria-pressed=true]{background:var(--mint);border-color:#56846a}
.scan-modes{display:flex;gap:4px;background:#1d4a37;padding:4px;border-radius:10px;margin-bottom:11px}
.scan-modes button{flex:1;color:#dbe8de;min-height:40px;border-radius:7px;padding:5px 9px;font-size:.9rem;font-weight:700}
.scan-modes button[aria-pressed=true]{background:#f1f4e8;color:#173d2f}
#scan-review-group{margin-top:7px}
#group-review-photo{display:block;width:100%;max-height:190px;object-fit:contain;background:#e5ebe3;border-radius:10px;margin-top:10px}
#group-choices{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
#group-choices button{overflow-wrap:anywhere;max-width:100%}
#guide-sizing input{flex:1;min-width:0;padding:0;min-height:26px;accent-color:var(--yellow)}
@media(max-width:690px){.viewfinder{max-height:245px}.scan-modes button{min-height:44px}}
.camera-back{display:block;color:#e5eee6;min-height:44px;width:100%;margin-top:5px;border-radius:9px;text-decoration:underline;text-underline-offset:3px}
.camera-back:hover{background:#24503e}
