:root {
  --ink: #172940; --text: #283548; --muted: #65707c; --line: #e4ded3;
  --paper: #f6f1e8; --green: #284c70; --mint: #eaf0f6; --white: #fff;
  --amber: #8b491c; --orange: #b9561a; --orange-light: #f3a955;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--text); font-synthesis: none; color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); display: flex; min-height: 100vh; min-height: 100svh; font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: 12px 15px; min-height: 44px; font-weight: 600; font-size: 14px; line-height: 1.4; transition: background .15s, transform .15s; }
button:hover:not(:disabled) { filter: brightness(.96); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #3479a7; outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { color: #fff; background: var(--orange); }
button.outline { color: var(--ink); background: #fff; border: 1px solid #d0d6dd; }
button.text-button { padding: 10px 4px; background: transparent; color: var(--green); font-size: 13px; }
button.full { width: 100%; margin-top: 15px; }
.sidebar { position: sticky; top: 0; height: 100svh; flex: 0 0 264px; background: var(--ink); padding: 32px 23px; display: flex; flex-direction: column; color: #f8f0e2; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff5e5; font-size: 15px; font-weight: 750; white-space: nowrap; }
.brand img { width: 56px; height: 56px; object-fit: cover; object-position: 50% 19%; border-radius: 16px; border: 2px solid #d99a58; flex: none; }
.brand small { display: block; font-size: 10px; letter-spacing: 2.7px; margin-top: 7px; color: #bbc8d7; font-weight: 600; }
.new-doc { margin-top: 36px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; }
.sidebar .new-doc { color: var(--ink); background: var(--orange-light); box-shadow: 0 5px 20px #0812221a; }
.new-doc span { font-size: 21px; font-weight: 400; }
.section-label { margin-top: 32px; margin-bottom: 13px; font-size: 12px; color: #bcc8d7; letter-spacing: 1px; display: flex; justify-content: space-between; }
.section-label span { letter-spacing: 0; }
#documents { flex: 1; overflow: auto; margin: 0 -7px; }
#documents button { display: block; width: 100%; text-align: left; background: transparent; color: #e0e8f2; font-weight: 500; padding: 14px 12px; margin: 3px 0; overflow: hidden; }
#documents button.active { background: #ffffff12; color: #fff4e1; box-shadow: inset 3px 0 var(--orange-light); }
#documents strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
#documents small { display: block; font-size: 11px; margin-top: 6px; color: #b8c4d2; }
.sidebar-footer { font-size: 12px; line-height: 1.7; color: #bec9d7; padding-top: 21px; border-top: 1px solid #ffffff24; }
.sidebar-footer small { display: block; margin: 12px 0 3px; }
.green-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #307957; margin-right: 8px; flex: none; }
.sidebar-footer .green-dot { background: #8bc3a4; }
.sidebar-footer button { color: #f3c08b; font-weight: 500; }
main { min-width: 0; flex: 1; padding: 30px 36px 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 650; color: var(--muted); }
h1 { font-size: 24px; font-weight: 650; letter-spacing: .3px; margin: 8px 0 0; word-break: break-word; color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.local-badge { font-size: 12px; background: #e7eee7; color: #356345; padding: 8px 12px; border-radius: 30px; white-space: nowrap; }
.header-actions .primary { min-width: 90px; display: flex; justify-content: space-between; gap: 15px; }
.statusbar { font-size: 13px; color: var(--muted); margin-top: 19px; padding-bottom: 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; line-height: 1.7; }
.statusbar.error { color: #a43531; }
.statusbar.error .green-dot { background: #b64039; }
.welcome { display: grid; grid-template-columns: 1fr 1.06fr; gap: 36px; margin-top: 36px; max-width: 1200px; }
.welcome-copy { padding: 14px 0 0 4px; }
h2 { font-weight: 650; }
.welcome h2 { font-size: clamp(36px, 4vw, 56px); line-height: 1.4; letter-spacing: -1.5px; margin: 14px 0 18px; color: var(--ink); }
.welcome h2 em { font-style: normal; color: var(--orange); }
.welcome-copy p { color: var(--muted); font-size: 15px; line-height: 1.85; letter-spacing: .2px; }
.capability { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.capability span { font-size: 12px; color: #536172; padding: 7px 9px; border: 1px solid #dbd4c8; border-radius: 7px; background: #fffaf2; }
.portrait-signature { display: flex; align-items: center; gap: 16px; margin-top: 26px; padding-top: 23px; border-top: 1px solid var(--line); }
.portrait-signature img { width: 100px; height: 112px; object-fit: cover; object-position: 50% 17%; border-radius: 14px; border: 1px solid #d1b48d; flex: none; }
.portrait-signature strong { display: block; font-size: 12px; color: var(--ink); letter-spacing: 1px; }
.portrait-signature span { display: block; font-size: 16px; color: var(--ink); margin-top: 10px; font-weight: 600; }
.portrait-signature small { display: block; font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.upload-zone { border: 1px dashed #c6b198; background: #fffcf7; border-radius: 23px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 38px 22px; min-height: 440px; position: relative; box-shadow: 0 10px 40px #48332205; }
.upload-zone.drag { background: #fcf0dc; outline: 3px solid #bc763b; }
.upload-zone h3 { font-size: 22px; margin: 25px 0 12px; font-weight: 650; color: var(--ink); }
.upload-zone p { font-size: 14px; color: var(--muted); margin: 0 0 25px; line-height: 1.7; }
.upload-zone small { font-size: 12px; color: var(--muted); margin-top: 21px; line-height: 1.8; max-width: 340px; }
.upload-buttons { display: flex; gap: 12px; width: 100%; max-width: 300px; }
.upload-buttons button { flex: 1; min-height: 48px; font-size: 15px; }
.paper-illustration { width: 142px; height: 144px; position: relative; }
.paper { position: absolute; inset: 10px 22px; background: #fff; box-shadow: 0 12px 32px #17294012; border: 1px solid #d7dce3; border-radius: 4px; transform: rotate(-6deg); padding: 23px 14px; }
.paper i { display: block; height: 4px; background: #d7dde4; margin: 9px 0; width: 100%; }
.paper i:first-child { height: 6px; width: 45%; background: #708ca8; margin-bottom: 19px; }
.paper i:nth-child(3) { width: 80%; }
.paper i:nth-child(5) { width: 55%; }
.paper b { display: block; position: absolute; width: 20px; height: 20px; border: 1px solid #c77948; border-radius: 50%; right: 14px; bottom: 17px; }
.scan-corner { position: absolute; width: 19px; height: 19px; border: 2px solid #cb7b35; border-radius: 3px; z-index: 2; }
.c1 { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.c2 { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.c3 { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.c4 { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.scan-line { position: absolute; left: -10px; right: -10px; top: 75px; height: 2px; background: linear-gradient(90deg, transparent, #e2a660, transparent); z-index: 3; box-shadow: 0 5px 15px #df9c5440; }
.start-guide { grid-column: 1 / -1; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 26px 4px; gap: 18px; }
.start-guide > div { display: flex; align-items: center; gap: 15px; }
.start-guide b { font-size: 12px; font-weight: 600; color: var(--orange); }
.start-guide span { font-size: 14px; font-weight: 600; }
.start-guide small { display: block; margin-top: 7px; font-size: 12px; font-weight: 400; color: var(--muted); }
.workspace { margin-top: 21px; display: grid; grid-template-columns: 102px minmax(220px, 1fr) 312px; min-height: 620px; border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; }
.page-rail { padding: 17px 10px; background: #f9f7f2; border-right: 1px solid var(--line); }
.page-label, .page-count { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 15px; }
.pages { max-height: 580px; overflow: auto; }
.page-thumb { padding: 5px; background: #fff; border: 1px solid #d5dce2; width: 100%; margin-bottom: 10px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.page-thumb.active { border: 2px solid var(--orange); padding: 4px; background: #fff2e4; }
.page-thumb img { width: 100%; height: 75px; object-fit: contain; }
.page-thumb small { font-size: 11px; color: var(--muted); }
.add-page { background: transparent; border: 1px dashed #b5bec9; padding: 9px 4px; width: 100%; font-size: 12px; color: var(--green); line-height: 1.8; margin-top: 7px; }
.image-workspace { min-width: 0; background: #e9edf0; display: flex; flex-direction: column; }
.image-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 14px; border-bottom: 1px solid #d7dce2; }
.segmented { display: flex; gap: 3px; padding: 3px; background: #dfe5ea; border-radius: 10px; }
.segmented button { padding: 10px 9px; border-radius: 7px; font-size: 12px; font-weight: 500; color: #526073; background: transparent; white-space: nowrap; }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #17294010; }
#dimensions { font-size: 11px; color: var(--muted); white-space: nowrap; }
.image-stage { flex: 1; display: flex; justify-content: center; align-items: center; padding: 25px 20px; min-height: 430px; overflow: hidden; background-image: radial-gradient(#cbd2d8 1px, transparent 1px); background-size: 16px 16px; }
.surface { position: relative; line-height: 0; max-width: 100%; touch-action: none; box-shadow: 0 9px 30px #17294014; }
.surface canvas { max-width: 100%; max-height: 64svh; display: block; width: auto; height: auto; }
.surface svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; touch-action: none; }
.surface svg[hidden] { display: none; }
.crop-handle { fill: white; stroke: #264f77; stroke-width: 2; cursor: move; filter: drop-shadow(0 1px 2px #0005); }
.crop-edge { fill: #38649215; stroke: #264f77; stroke-width: 2; vector-effect: non-scaling-stroke; }
.region-box { fill: #38649212; stroke: #386492; stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; }
.region-box.selected { fill: #38649255; stroke: #17385a; }
.page-caption { font-size: 12px; color: var(--muted); padding: 10px 14px; background: #f9fafb; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #d7dce2; flex-wrap: wrap; }
.page-caption .text-button { font-size: 12px; padding: 8px 5px; }
.tool-panel { border-left: 1px solid var(--line); background: white; min-width: 0; }
.tool-tabs { display: flex; padding: 10px 12px; border-bottom: 1px solid var(--line); gap: 5px; }
.tool-tabs button { flex: 1; padding: 11px; font-weight: 500; background: transparent; color: var(--muted); font-size: 14px; }
.tool-tabs button.active { background: var(--ink); color: #fff; }
.panel { padding: 22px 20px; max-height: 820px; overflow: auto; }
.panel-title { margin-bottom: 23px; }
.panel-title h3 { margin: 0 0 9px; font-weight: 600; font-size: 18px; color: var(--ink); }
.step-tag { font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin: 20px 0 10px; }
.button-pair { display: flex; gap: 8px; }
.button-pair button { flex: 1; min-width: 0; padding: 11px 7px; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 11px 0; }
.mode-options { display: flex; gap: 8px; }
.mode-options button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 11px 4px; border: 1px solid #d2d9e0; background: #fff; font-size: 12px; font-weight: 500; color: var(--muted); }
.mode-options button.active { border-color: #456384; background: var(--mint); color: var(--ink); }
.mode-sample { height: 33px; width: 30px; border: 1px solid #ccd5de; background: repeating-linear-gradient(0deg, #ccd5de 0 3px, #fff 3px 8px); }
.mode-sample.color { background: repeating-linear-gradient(0deg, #95abc2 0 3px, #eaf0f6 3px 8px); }
.mode-sample.gray { filter: grayscale(1); }
.mode-sample.bw { background: repeating-linear-gradient(0deg, #363b40 0 2px, #fff 2px 8px); }
.slider-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 23px 0 8px; }
.slider-label output { color: var(--text); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--orange); height: 30px; }
.history { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; color: var(--muted); }
.history summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
#versionHistory { line-height: 1.8; margin-top: 8px; }
.history button { display: block; margin: 5px 0; padding: 10px 6px; background: #f3f6f9; text-align: left; width: 100%; font-size: 12px; font-weight: 400; color: var(--text); }
select, textarea, input[type=text] { background: #f9fafc; border: 1px solid #d3dbe4; border-radius: 9px; color: var(--text); padding: 11px; font-size: 14px; width: 100%; min-height: 44px; }
textarea { resize: vertical; line-height: 1.7; min-height: 65px; }
#ocrText { min-height: 220px; }
.candidate { font-size: 11px; font-weight: 400; background: #fdf0db; color: var(--amber); padding: 4px 6px; float: right; border-radius: 5px; }
.ocr-actions { margin-top: 14px; }
.selected-text { font-size: 13px; line-height: 1.7; white-space: pre-wrap; padding: 10px 0; }
.check-label { display: flex; align-items: flex-start; gap: 9px; margin-top: 20px; font-size: 13px; line-height: 1.8; min-height: 44px; }
input[type=checkbox] { accent-color: var(--orange); margin-top: 4px; width: 20px; height: 20px; flex: none; }
.main-footer { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 20px 0; font-size: 11px; color: #71777e; letter-spacing: 1px; gap: 10px; }
.main-footer .text-button { font-size: 12px; font-weight: 500; letter-spacing: 0; }
.main-footer small { margin-left: 7px; letter-spacing: 0; }
dialog { border: 1px solid var(--line); border-radius: 19px; max-width: 570px; width: calc(100% - 30px); padding: 28px; color: var(--text); box-shadow: 0 25px 80px #17294033; }
dialog::backdrop { background: #17294080; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 22px; margin: 0; color: var(--ink); }
.icon-button { font-size: 24px; padding: 3px 9px; min-width: 44px; background: #edf1f5; color: var(--muted); }
dialog p, dialog li { font-size: 14px; line-height: 1.85; color: var(--muted); }
dialog li { margin: 12px 0; }
.export-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.export-options button { text-align: left; border: 1px solid var(--line); background: #fffbf5; padding: 17px 13px; }
.export-options strong { display: block; font-size: 14px; color: var(--ink); }
.export-options span { display: block; font-size: 12px; color: var(--muted); margin-top: 9px; font-weight: 400; line-height: 1.6; }
.busy { position: fixed; inset: 0; z-index: 90; background: #17294080; backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; }
.busy > div { width: min(330px, calc(100% - 32px)); background: #fff; border-radius: 19px; padding: 30px; text-align: center; box-shadow: 0 20px 80px #17294033; }
.spinner { display: block; margin: 0 auto 18px; border: 3px solid #f0e5d7; border-top-color: var(--orange); border-radius: 50%; width: 34px; height: 34px; animation: spin 1s linear infinite; }
.busy strong { font-size: 17px; }
.busy p { font-size: 13px; line-height: 1.8; color: var(--muted); }
progress { width: 100%; accent-color: var(--orange); height: 7px; margin: 12px 0; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 100; max-width: calc(100vw - 28px); background: var(--ink); color: white; border-radius: 12px; padding: 14px 20px; font-size: 14px; line-height: 1.6; box-shadow: 0 7px 30px #1729402b; }
.busy[hidden], [hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } .spinner { animation-duration: 3s; } }
@media (min-width: 1500px) { main { padding: 35px 50px 0; } .workspace { grid-template-columns: 110px minmax(220px,1fr) 330px; } .image-stage { min-height: 600px; } }
@media (max-width: 1200px) {
  .sidebar { flex-basis: 236px; padding: 28px 19px; } .brand { font-size: 13px; gap: 10px; } .brand img { width: 48px; height: 48px; }
  main { padding: 25px 24px 0; } .workspace { grid-template-columns: 85px minmax(180px,1fr) 280px; } .panel { padding: 21px 16px; }
  .welcome { gap: 28px; } #dimensions { display: none; } .local-badge { display: none; }
  .portrait-signature { gap: 12px; } .portrait-signature img { width: 82px; height: 96px; } .portrait-signature span { font-size: 14px; }
}
@media (max-width: 960px) {
  .sidebar { flex-basis: 210px; padding: 24px 14px; } .brand { font-size: 12px; gap: 8px; } .brand img { width: 43px; height: 43px; border-radius: 13px; }
  .brand small { font-size: 9px; letter-spacing: 2px; } .workspace { grid-template-columns: 82px minmax(180px,1fr); }
  .tool-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); } .panel { max-height: none; padding: 23px 26px; }
  .mode-options { max-width: 340px; } .welcome { grid-template-columns: 1fr; gap: 26px; margin-top: 28px; }
  .welcome-copy { padding: 0; } .welcome-copy h2 { font-size: 40px; } .welcome-copy h2 br { display: none; } .welcome-copy p br { display: none; }
  .portrait-signature { margin-top: 20px; padding-top: 18px; } .portrait-signature img { width: 74px; height: 80px; }
  .upload-zone { min-height: 350px; } .start-guide { gap: 15px; } .start-guide > div { gap: 10px; } .start-guide small { font-size: 11px; }
  .image-stage { min-height: 400px; } h1 { font-size: 21px; }
}
@media (max-width: 600px) {
  body { display: block; }
  .sidebar { height: auto; position: relative; padding: max(14px, env(safe-area-inset-top)) 16px 14px; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
  .brand { font-size: 13px; gap: 10px; } .brand img { width: 47px; height: 47px; border-radius: 14px; } .brand small { font-size: 8px; letter-spacing: 2.5px; margin-top: 5px; }
  .new-doc { margin: 0; padding: 10px 12px; font-size: 12px; gap: 5px; min-width: 82px; } .new-doc span { font-size: 18px; }
  .section-label, .sidebar-footer { display: none; }
  #documents { position: absolute; top: 100%; left: 0; right: 0; z-index: 3; display: flex; height: 58px; padding: 5px 10px; margin: 0; background: #203650; border-top: 1px solid #ffffff12; overflow: auto; flex: none; }
  #documents:empty { display: none; } #documents button { width: auto; min-width: 110px; max-width: 190px; padding: 6px 11px; margin: 0 4px; }
  #documents strong { font-size: 12px; } #documents small { font-size: 10px; margin-top: 3px; }
  body.has-doc main { padding-top: 78px; } main { padding: 22px 16px 0; }
  .topbar { min-height: 52px; gap: 10px; } .eyebrow { font-size: 10px; letter-spacing: 1.5px; } h1 { font-size: 19px; margin-top: 7px; }
  .header-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 130px; }
  .header-actions button { padding: 10px 11px; font-size: 13px; } .header-actions .primary { min-width: 68px; gap: 8px; }
  .statusbar { margin-top: 15px; font-size: 12px; padding-bottom: 15px; }
  .welcome { margin-top: 22px; gap: 22px; } .welcome-copy h2 { font-size: 28px; line-height: 1.4; margin: 12px 0; letter-spacing: -1px; } .welcome-copy h2 br { display: none; }
  .welcome-copy p { display: none; } .capability { margin-top: 13px; gap: 6px; } .capability span { font-size: 11px; padding: 6px 8px; }
  .portrait-signature { padding-top: 0; border-top: 0; margin-top: 15px; gap: 13px; } .portrait-signature img { width: 62px; height: 66px; border-radius: 11px; }
  .portrait-signature strong { font-size: 10px; } .portrait-signature span { font-size: 14px; margin-top: 7px; } .portrait-signature small { font-size: 11px; margin-top: 5px; }
  .upload-zone { min-height: 350px; padding: 27px 17px; border-radius: 18px; }
  .paper-illustration { transform: scale(.82); margin: -10px 0; } .upload-zone h3 { font-size: 21px; margin-top: 17px; } .upload-zone p { font-size: 13px; margin-bottom: 20px; }
  .upload-zone small { font-size: 11px; margin-top: 17px; } .upload-buttons { flex-direction: row-reverse; gap: 9px; }
  #captureBtn { background: var(--orange); color: #fff; border-color: var(--orange); } #uploadBtn { color: var(--ink); background: #fff; border: 1px solid #d0d6dd; }
  .start-guide { padding: 22px 0; gap: 10px; } .start-guide > div { gap: 6px; align-items: flex-start; }
  .start-guide b { font-size: 10px; margin-top: 3px; } .start-guide span { font-size: 12px; } .start-guide small { font-size: 10px; line-height: 1.7; max-width: 90px; }
  .workspace { display: flex; flex-direction: column; margin-top: 17px; min-height: 0; }
  .page-rail { padding: 10px; display: flex; align-items: center; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .page-label { display: none; } .pages { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; max-height: 100px; }
  .page-thumb { width: 59px; min-width: 59px; padding: 3px; margin: 0; } .page-thumb.active { padding: 2px; } .page-thumb img { height: 49px; } .page-thumb small { font-size: 10px; }
  .add-page { width: 69px; flex: none; padding: 8px 3px; font-size: 11px; margin-top: 0; }
  .image-toolbar { padding: 10px; } .segmented { width: 100%; } .segmented button { flex: 1; font-size: 12px; padding: 9px 6px; }
  .image-stage { min-height: 300px; padding: 19px 14px; } .surface canvas { max-height: 58svh; }
  .page-caption { padding: 10px; font-size: 11px; gap: 4px; } .page-caption .text-button { font-size: 12px; }
  .tool-tabs { padding: 8px; } .tool-tabs button { font-size: 15px; } .panel { padding: 22px 18px; } .panel-title { margin-bottom: 18px; }
  .mode-options { max-width: none; } .field-label, .slider-label { font-size: 14px; } .button-pair button { font-size: 14px; padding: 11px 6px; }
  .tool-panel textarea, .tool-panel select, .tool-panel input[type=text] { font-size: 16px; }
  .hint, .check-label { font-size: 13px; } .main-footer { font-size: 9px; gap: 8px; padding: 23px 0 max(23px, env(safe-area-inset-bottom)); letter-spacing: .4px; }
  .export-options { gap: 9px; } .export-options button { padding: 15px 11px; } .export-options strong { font-size: 13px; } .export-options span { font-size: 11px; }
  dialog { padding: 22px; }
}
@media (max-width: 350px) {
  .sidebar { padding-left: 12px; padding-right: 12px; gap: 7px; } .brand { font-size: 12px; gap: 8px; } .brand img { width: 41px; height: 41px; }
  .new-doc { padding: 10px; min-width: 72px; font-size: 11px; } main { padding-left: 12px; padding-right: 12px; }
  .capability span { font-size: 10px; } .start-guide { gap: 7px; } .start-guide > div { gap: 4px; } .start-guide span { font-size: 11px; }
  .welcome-copy h2 { font-size: 25px; }
  .segmented button { font-size: 11px; padding-left: 4px; padding-right: 4px; }
}
