*{box-sizing:border-box}html{font-family:Inter,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#172f37;background:#f4f6f5}body{margin:0}button,input,textarea{font:inherit}button,a,input{touch-action:manipulation}button,a{cursor:pointer}a{color:inherit;text-decoration:none}button{border:0}button:disabled{opacity:.48;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #008876;outline-offset:4px}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linejoin:round;stroke-linecap:round;flex:none}.symbols{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}header{background:#fff;border-bottom:1px solid #dde4e2}.bar{max-width:1176px;padding:0 36px;margin:auto;min-height:74px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:11px;font-size:1.5rem;font-weight:800;letter-spacing:.05em}.brand-icon{width:38px;height:38px;border-radius:11px;background:#153c3d;color:#a7f5d7;display:grid;place-items:center}.brand-icon svg{width:25px;height:25px}nav{display:flex;align-items:center;gap:5px}nav a{display:flex;align-items:center;gap:8px;padding:11px 17px;font-weight:650;font-size:.9rem;color:#596967;border-radius:9px}nav a[aria-current]{background:#e4f4ed;color:#145648}main{max-width:1176px;margin:auto;padding:48px 36px 64px}.heading{margin-bottom:27px}h1,h2,p{margin:0}h1{font-size:clamp(1.85rem,3.2vw,2.65rem);letter-spacing:-.045em;line-height:1.35}.heading p{color:#576663;margin-top:9px;line-height:1.65}.columns{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(260px,1fr);gap:22px;align-items:start}.panel{background:white;border:1px solid #d8e0dd;border-radius:17px;box-shadow:0 3px 11px #15352a05;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 24px}.panel-head h2{display:flex;align-items:center;gap:10px;font-size:1.05rem;letter-spacing:.01em}.panel-head svg{color:#26735f}.pill,.count{font-size:.82rem;line-height:1.6;font-weight:650}.pill{border-radius:24px;background:#eef1ef;color:#52605e;padding:2px 11px}.pill.on{background:#d8f4e6;color:#085b42}.count{color:#4e6560;background:#eef3f0;padding:2px 10px;border-radius:20px;white-space:nowrap}#view{aspect-ratio:1.87;position:relative;background:radial-gradient(ellipse at 45% 45%,#294c4d,#152f37 80%);overflow:hidden;margin:0 18px;border-radius:11px;isolation:isolate}video,.dots{position:absolute;width:100%;height:100%;inset:0}video{object-fit:cover;display:none}.dots{background-image:radial-gradient(#b8ead639 .9px,transparent 1px);background-size:15px 15px}.live video{display:block}.live .dots,.live .sample{display:none}#guide{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:66%;aspect-ratio:1.7;max-height:92%;display:grid;place-items:center}#guide>i{position:absolute;width:22px;height:22px;border:solid #9aefcb;border-width:3px 0 0 3px;top:0;left:0;border-radius:5px 0 0 0}#guide>i:nth-last-child(3){left:auto;right:0;transform:rotate(90deg)}#guide>i:nth-last-child(2){top:auto;bottom:0;transform:rotate(-90deg)}#guide>i:last-child{inset:auto 0 0 auto;transform:rotate(180deg)}.sample{width:82%;aspect-ratio:1.75;background:linear-gradient(110deg,#f7f3e7,#e8e8d8);color:#264040;border-radius:5px;transform:rotate(-7deg);box-shadow:0 12px 20px #001d2580;position:relative;overflow:hidden;padding:7% 8%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;isolation:isolate}.sample:after{content:"";position:absolute;right:-34%;bottom:-106%;width:100%;height:265%;transform:rotate(31deg);background:repeating-radial-gradient(ellipse at 90% 70%,transparent 0 5px,#487f6d 5.5px 6.4px);z-index:-1}.paper-brand{font-family:Georgia,serif;font-size:clamp(.48rem,1.2vw,.83rem);letter-spacing:.13em}.paper-brand i{display:inline-block;width:.76em;height:.76em;background:#3d7968;border-radius:60% 0;margin-right:.2em}.sample strong{margin-top:6%;font-family:"Yu Mincho",serif;font-size:clamp(1rem,2.2vw,2rem);letter-spacing:.14em}.sample small{font-family:Georgia,serif;font-size:clamp(.47rem,1vw,.75rem);letter-spacing:.06em}.sample-lines{width:28%;height:6%;margin-top:7%;border-block:1px solid #8d9a8e}.controls{padding:19px 24px 22px;text-align:center}#hint{font-size:.94rem;color:#475c58;line-height:1.6;min-height:1.6em;margin-bottom:16px}.primary,.secondary,.quiet,.all-link{font-weight:650;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 16px}.primary{background:#154b43;color:white}.primary:hover{background:#0e3c35}#start{width:100%;min-height:49px}.footnote,.list-note{display:flex;align-items:center;justify-content:center;gap:6px;color:#62716d;font-size:.82rem;line-height:1.6}.footnote{margin-top:13px}.footnote svg,.list-note svg{width:15px;height:15px}.recent .panel-head{border-bottom:1px solid #edf0ee}.empty{text-align:center;padding:37px 20px 30px}.empty-mark{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 15px;background:#edf5f0;color:#437564;border-radius:16px}.empty-mark svg{width:28px;height:28px}.empty strong{display:block;font-size:1rem}.empty p{margin:8px auto 0;line-height:1.7;color:#65726f;font-size:.9rem}.all-link{display:flex;margin:0 20px 20px;background:#f1f5f2;color:#36564d}.secondary,.quiet{color:#205f50;background:#f3f7f4;border:1px solid #d4e1d9}.tools{display:flex;gap:8px;padding:0 24px 20px;flex-wrap:wrap}.tools input{flex:1;min-width:165px}input,textarea{border:1px solid #cbd5d0;background:#fff;border-radius:7px;min-height:44px;padding:9px 12px;color:#172f37}input:focus,textarea:focus{outline:2px solid #359477}table{width:100%;border-collapse:collapse;text-align:left}.table-scroll{overflow:auto}th,td{padding:13px 18px;white-space:nowrap;border-bottom:1px solid #edf0ee}th{font-size:.84rem;background:#eff4f0;color:#475c55}td{font-size:.95rem}td button{background:transparent;color:#185a4c;font-weight:700;padding:7px}.list-note{justify-content:flex-start;padding:17px 24px;background:#f7f9f7}.row{padding:14px 20px;width:100%;display:flex;align-items:center;gap:11px;background:white;color:inherit;text-align:left;border-bottom:1px solid #edf0ee}.row:last-child{border:0}.row span:nth-child(2){min-width:0}.row strong,.row small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.row small{color:#62716d;margin-top:3px}.initial{width:36px;height:36px;display:grid;place-items:center;background:#e1f1e7;color:#21634e;border-radius:10px;flex:none}.recent:has(.row) .all-link{margin-top:12px}dialog{color:#172f37;border:1px solid #d9e0db;border-radius:15px;width:min(550px,94%);max-height:88dvh;padding:0}dialog::backdrop{background:#0f2425a8}form{padding:22px}.modal-head,.actions{display:flex;align-items:center;gap:8px}.modal-head{justify-content:space-between}.modal-head h2{font-size:1.25rem}.x{font-size:1.5rem;background:#f1f5f2;border-radius:50%;width:40px;height:40px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fields label{display:grid;gap:5px;font-size:.88rem;font-weight:650}.fields input,.fields textarea{width:100%;font-size:1rem;font-weight:400}.wide{grid-column:1/-1}.actions{margin-top:20px;flex-wrap:wrap}.actions .quiet{color:#863e37;background:#fff}.actions>*{flex:auto}details{margin-top:15px}pre{white-space:pre-wrap;overflow-wrap:anywhere}#edit-info{color:#486258;font-size:.9rem;line-height:1.6;margin:10px 0 15px}#toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);padding:12px 20px;border-radius:12px;box-shadow:0 3px 12px #0002;background:#193b36;color:white;max-width:92vw;width:max-content;z-index:5}
@media(max-width:750px){.bar{padding:0 16px;min-height:64px}.brand{font-size:1.3rem;gap:7px}.brand-icon{width:32px;height:32px}nav a{padding:9px 10px;gap:5px;font-size:.85rem}nav svg{width:16px;height:16px}main{padding:27px 15px 40px}.heading{margin-bottom:20px}.heading p{font-size:.95rem}.columns{grid-template-columns:1fr;gap:16px}.panel-head{padding:17px}.controls{padding:16px}.recent .empty{padding:20px}.recent .empty-mark{display:none}#view{margin:0 10px;aspect-ratio:1.48}#guide{width:85%}.sample strong{font-size:clamp(1.15rem,5.4vw,1.8rem)}.sample small{font-size:.65rem}.paper-brand{font-size:.67rem}.tools{padding:0 16px 15px}.tools input{min-width:100%}.tools button{flex:1}.list-note{padding:14px 16px}.fields{gap:10px}.fields input{min-width:0}form{padding:16px}.actions{flex-direction:column;align-items:stretch}}
@media(max-width:360px){nav a{padding:8px 7px}.brand{gap:4px}.fields{grid-template-columns:1fr}}

/* The preview and saved photo both show the complete camera frame. */
#view.live{aspect-ratio:var(--camera-ratio, 4 / 3);max-height:68dvh;background:#102424}
.live video{object-fit:contain}
.live #guide{display:none}
#stop-camera{margin-top:8px}
#picture{margin:14px 0}
#picture summary{cursor:pointer;font-weight:650;padding:8px 0}
#photo{display:block;width:100%;height:auto;margin:8px 0;border-radius:8px}
#retry-ocr{margin-top:10px}
@media(max-width:750px){
  main:has(#view.live){padding:0}
  body:has(#view.live) header,main:has(#view.live) .heading,main:has(#view.live) .recent,main:has(#view.live) .panel-head{display:none}
  .camera-panel:has(#view.live){border:0;border-radius:0}
  #view.live{width:100%;height:calc(100dvh - 156px - env(safe-area-inset-bottom));max-height:none;aspect-ratio:auto;margin:0;border-radius:0}
  .camera-panel:has(#view.live) .controls{padding:8px 12px calc(8px + env(safe-area-inset-bottom))}
  .camera-panel:has(#view.live) #hint{margin-bottom:6px}
  .camera-panel:has(#view.live) .footnote{display:none}
}
