/* iboxbox BookMaker 2.2.0 — purple Booklet Studio.
 * Visual reference: the user's approved purple 2.0.0 screenshot.
 * This stylesheet only presents the 2.1 controls; it does not define page order.
 * Local/system fonts only. Theme tokens are deliberately centralized.
 */
:root {
  color-scheme: light;
  --ink: #38264d;
  --text: #534b60;
  --muted: #81788f;
  --accent: #8054ae;
  --accent-light: #f0e9f8;
  --line: #e9e3ef;
  --paper: #fff;
  --bg: #faf9fc;
  --green: #64b68b;
  --green-bg: #edf7f1;
  --error: #a32e42;
  --error-bg: #fff2f4;
  --radius: 20px;
  --shadow: 0 10px 36px #34244808;
  /* Stable aliases for the previous stylesheet's semantic classes. */
  --blue: var(--accent);
  --blue-dark: var(--ink);
  --cream: #fdfaf5;
  font: 15px/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid #af88d0; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); }
h1 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.23; font-weight: 760; letter-spacing: -1.8px; }
h2 { font-size: 25px; line-height: 1.4; font-weight: 700; letter-spacing: -.5px; margin: 8px 0 10px; }
h3 { font-size: 18px; font-weight: 650; }
.shell { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 12px; color: var(--muted); line-height: 1.75; }
.icon { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; background: white; z-index: 5; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 10px; }

/* Brand navigation: unchanged file state when the language buttons are used. */
.topbar { background: #fdfcff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-icon { display: block; width: 46px; height: 46px; border-radius: 13px; box-shadow: 0 5px 16px #38264d12; }
.brand-word { display: block; font-size: 24px; font-weight: 750; letter-spacing: 1.5px; line-height: 1.25; }
.brand-copy small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 1px; margin-top: 2px; }
.topnav { display: flex; gap: 24px; align-items: center; font-size: 13px; }
.topnav a, .topnav .link { position: relative; padding: 10px 0; color: var(--text); white-space: nowrap; font-size: inherit; }
.topnav a.active { color: var(--ink); font-weight: 650; }
.topnav a.active::after { content: ""; position: absolute; bottom: 2px; left: 0; width: 26px; height: 2px; background: var(--accent); }
.lang-switch { margin-left: auto; display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 25px; background: #f5f1fa; flex-shrink: 0; }
.lang-switch button { border: 0; background: none; border-radius: 18px; padding: 5px 11px; white-space: nowrap; font-size: 12px; font-weight: 650; color: var(--muted); min-height: 30px; }
.lang-switch button[aria-pressed=true] { background: white; color: var(--ink); box-shadow: 0 1px 5px #3424480d; }

/* Approved two-column purple hero and decorative book. */
.hero { border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 78% 55%, #efebf5 0, transparent 48%), linear-gradient(110deg, #fefdfd, #f8f5fb); overflow: hidden; }
.hero-inner { min-height: 302px; display: flex; align-items: center; justify-content: space-between; gap: 36px; padding-block: 32px 35px; }
.hero-copy { max-width: 750px; min-width: 0; }
.hero h1 { white-space: pre-line; }
.eyebrow, .section-kicker { font-size: 10px; letter-spacing: 2.3px; font-weight: 750; color: var(--accent); }
.hero .eyebrow { margin-bottom: 12px; }
.hero-desc { max-width: 635px; font-size: 14px; line-height: 1.85; margin-top: 16px; color: #797185; }
.hero-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11px; margin-top: 18px; }
.privacy { display: inline-flex; align-items: center; gap: 7px; border-radius: 20px; padding: 4px 10px; background: var(--green-bg); color: #397759; font-size: 11px; }
.privacy .icon { width: 16px; height: 16px; }
.hero-footnote { color: var(--muted); }
.hero-art { flex: 0 0 290px; height: 235px; position: relative; transform: rotate(2deg); }
.book-layer { position: absolute; bottom: 12px; left: 48px; width: 143px; height: 196px; border-radius: 3px 10px 10px 3px; transform: rotate(-11deg); background: #e4eeda; border: 1px solid #ccd6c6; }
.book-layer.middle { left: 79px; bottom: 13px; background: #f7f2e8; transform: rotate(1deg); border-color: #e8e1d8; }
.book-cover { position: absolute; left: 94px; bottom: 19px; width: 144px; height: 196px; background: #533b6b; border: 1px solid #49335f; border-radius: 3px 10px 10px 3px; color: #f9f5ff; transform: rotate(9deg); box-shadow: 14px 17px 22px #40314f18; padding: 22px 20px; display: flex; flex-direction: column; }
.book-cover::before { content: ""; position: absolute; left: 7px; top: 0; height: 100%; width: 1px; background: #ffffff21; }
.book-cover .tiny { font-size: 9px; letter-spacing: 2px; }
.book-cover strong { font-size: 24px; font-weight: 600; line-height: 1.25; margin-top: 21px; }
.book-cover small { font-size: 8px; color: #d7c8e6; margin-top: auto; white-space: nowrap; }
.leaf { position: absolute; right: 5px; top: 3px; color: #78b48c; transform: rotate(-18deg); }

/* The same four-step workflow, displayed as one quiet progress strip. */
.workspace { padding-top: 30px; padding-bottom: 45px; }
.steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 16px; background: white; padding: 14px 24px; gap: 14px; margin-bottom: 26px; scroll-margin-top: 20px; }
.step { display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: left; padding: 4px; font-size: 13px; color: var(--muted); }
.step-num { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #f5f1f8; color: #91829f; font-size: 12px; flex-shrink: 0; }
.step[aria-current=step] { color: var(--ink); font-weight: 650; }
.step[aria-current=step] .step-num { background: var(--ink); color: white; }
.step.done .step-num { background: var(--green-bg); color: #427d5d; font-size: 0; }
.step.done .step-num::before { content: "✓"; font-size: 12px; }
.work-grid { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 26px; align-items: start; }
.main-column { min-width: 0; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.panel > .muted { font-size: 13px; margin-top: 8px; }
.panel > .small { margin-top: 12px; }
.link { background: none; border: 0; color: var(--accent); padding: 0; }
.primary, .secondary { border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 17px; font-size: 13px; font-weight: 600; line-height: 1.5; min-height: 42px; text-align: center; }
.primary { background: var(--ink); color: white; box-shadow: 0 5px 12px #38264d15; }
.primary:hover:not(:disabled) { background: #51356c; text-decoration: none; }
.secondary { background: white; border-color: #ddd3e7; color: var(--ink); }
.secondary:hover:not(:disabled) { background: #f8f4fc; text-decoration: none; }
.large { padding: 14px 24px; }
.panel-nav { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 23px; margin-top: 27px; }
.panel-nav .secondary { background: none; border-color: transparent; padding-left: 4px; color: var(--muted); font-weight: 500; }
.panel-nav .secondary::before { content: "←"; font-weight: 400; }
.panel-nav .next::before { content: "→"; font-weight: 400; }
.row-actions { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin-top: 17px; }
.text-link { font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* Upload state and compatibility report, same consent/validation semantics. */
.dropzone { min-height: 224px; border: 1.5px dashed #cbb7df; border-radius: 16px; background: #fbf9fe; text-align: center; padding: 28px 20px; transition: background .15s; }
.dropzone.drag { background: #eee4fa; outline: 2px solid #d7c0eb; }
.dropzone h3 { margin-top: 18px; font-size: 18px; }
.dropzone p { margin: 7px 0 12px; }
.dropzone .small { margin: 16px auto 0; max-width: 480px; font-size: 11px; }
.file-icon { position: relative; margin: 0 auto; width: 44px; height: 52px; border: 1.6px solid #b495cd; border-radius: 8px; background: white; display: grid; place-items: center; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.file-icon > span { position: absolute; width: 23px; height: 23px; bottom: -8px; right: -10px; border-radius: 50%; background: var(--green); color: white; font-size: 15px; border: 2px solid #fff; line-height: 18px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.7; cursor: pointer; }
.check input { accent-color: var(--accent); margin: 3px 0 0; width: 16px; height: 16px; flex: 0 0 16px; }
.rights { margin: 21px 0 18px; }
.file-success { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 20px 0; padding: 16px; border: 1px solid #deece3; border-radius: 14px; background: #f8fcf9; }
.file-success > div { min-width: 0; }
.file-success strong { display: block; color: var(--ink); overflow-wrap: anywhere; font-size: 14px; }
.success-label { display: block; color: #45926a; font-size: 11px; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin: 16px 0; }
.stat { background: #f8f6fb; border-radius: 12px; padding: 12px 8px; text-align: center; }
.stat strong { font-size: 24px; display: block; color: var(--ink); line-height: 1.5; }
.stat small { font-size: 10px; color: var(--muted); }

/* Four distinct 2.1 preset controls, including the sample number pairs. */
.presets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin: 24px 0 14px; }
.preset { position: relative; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 15px; padding: 20px; cursor: pointer; gap: 8px; background: white; min-width: 0; transition: border-color .15s, background .15s; }
.preset:hover { border-color: #ba9dd2; }
.preset:has(input:checked) { border-color: #9172b4; background: #fcfaff; box-shadow: 0 0 0 1px #9172b4; }
.preset:has(input:focus-visible) { outline: 3px solid #c8abe0; outline-offset: 2px; }
.preset input { position: absolute; width: 18px; height: 18px; right: 17px; top: 19px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.preset-icon { width: 38px; height: 31px; color: #9672b6; margin-bottom: 3px; }
.preset-title { color: var(--ink); font-weight: 650; font-size: 15px; line-height: 1.55; }
.preset .small { font-size: 12px; line-height: 1.75; }
.preset-example { margin-top: auto; padding-top: 10px; width: 100%; border-top: 1px solid var(--line); }
.example-caption { display: block; font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.example-line { display: inline-flex; align-items: center; gap: 7px; margin-right: 13px; font-size: 11px; }
.example-pair { display: inline-grid; grid-template-columns: repeat(2,28px); border: 1px solid #e7ddf1; border-radius: 5px; overflow: hidden; color: #604584; text-align: center; }
.example-pair b { background: #f2eaf9; padding: 2px; }
.example-pair b + b { border-left: 1px dashed #bda7d0; background: #fcfaff; }
.mode-distinction { padding: 12px 14px; background: #f7f3fa; border-left: 3px solid #b59acd; border-radius: 6px; margin-bottom: 24px; font-size: 11px; }

/* Basic controls stay small; advanced control IDs/layout semantics are retained. */
.basic-settings { border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 20px; }
.basic-settings h3 { margin-bottom: 15px; font-size: 15px; }
.basic-fields { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 14px; }
.basic-fields:has(#groupBasic:not([hidden])) { grid-template-columns: repeat(4,minmax(0,1fr)); }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; margin: 19px 0; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 12px; color: var(--text); }
.field > span:first-child, .field > label { font-weight: 600; }
input[type=text], input[type=number], input[type=password], select, textarea { border: 1px solid #ddd5e6; background: white; border-radius: 9px; min-height: 43px; padding: 9px 11px; color: var(--text); width: 100%; min-width: 0; font-size: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input:invalid:not(:placeholder-shown), input[aria-invalid=true] { border-color: #b84860; background: #fff8f9; }
input:disabled, select:disabled { background: #f6f4f8; color: #9a92a4; }
.range-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0 5px; }
.range-bottom button { font-size: 12px; white-space: nowrap; }
.range-error { color: var(--error); margin: 8px 0; font-size: 12px; }
.auto-defaults { background: var(--green-bg); color: #537158; border-radius: 9px; padding: 10px 12px; font-size: 11px; margin-top: 15px; }
.advanced-status { padding: 8px 11px; background: #fff9ed; border: 1px solid #ecd8b4; border-radius: 8px; margin: 8px 0; }
details { margin-top: 20px; border: 1px solid var(--line); border-radius: 13px; padding: 17px 20px; background: #fdfcfe; }
summary { cursor: pointer; color: var(--ink); font-weight: 600; font-size: 13px; }
#advanced > summary { display: flex; align-items: center; gap: 13px; list-style: none; }
#advanced > summary::-webkit-details-marker { display: none; }
#advanced > summary::before { content: "☷"; font-size: 19px; line-height: 1; color: #9275ac; }
#advanced > summary::after { content: "+"; margin-left: auto; font-size: 23px; font-weight: 300; }
#advanced[open] > summary::after { content: "−"; }
#advanced[open] > summary { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
#advanced > p { margin: 12px 0; }
#advanced > .field { margin: 14px 0; }
.advanced-core { margin: 14px 0; }
.checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 18px 0; }

/* Right-hand plan and live page-order reference. Numbers still come from pagination. */
.sidecard { position: sticky; top: 24px; min-width: 0; }
.side-panel { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 23px; margin-bottom: 18px; }
.side-panel h3 { font-size: 16px; margin-bottom: 16px; }
.summary-file { color: var(--ink); font-size: 12px; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 14px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.summary-grid span { display: block; color: var(--muted); font-size: 11px; }
.summary-grid strong { display: block; font-size: 23px; color: var(--ink); font-weight: 650; line-height: 1.4; }
.summary-row { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 14px; }
.summary-row span { display: block; color: var(--muted); font-size: 10px; }
.summary-row strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.summary-hint { margin-top: 10px; }
.local-card { background: #f1edf6; border-color: #f1edf6; }
.local-card h3 { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 9px; }
.local-card p { font-size: 11px; line-height: 1.9; }
.reference-card { padding: 21px; }
.reference-mode { font-size: 16px; margin: 8px 0 10px !important; }
.reference-meta { margin-bottom: 12px; font-size: 11px; }
.reference-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0; }
.reference-arrow { border: 1px solid #ded5e6; border-radius: 50%; background: white; color: var(--ink); width: 30px; height: 30px; flex-shrink: 0; padding: 0; }
.reference-sheet { font-size: 11px; text-align: center; color: var(--ink); line-height: 1.5; }
.reference-faces { display: grid; gap: 10px; }
.reference-card .reference-face .sheet-map { max-width: 202px; margin-inline: auto; }
.reference-face .sheet-map { background: #f9f5ff; border-color: #d5c4e5; border-radius: 8px; overflow: hidden; }
.reference-face .map-slot { border-color: #d3c2e5; color: #6b498e; font-size: 28px; background: #faf7fe; }
.reference-face .map-slot:first-child { background: #f1e8fb; }
.reference-face.back .map-slot { color: #377654; background: #f7fcf8; border-color: #bedacb; }
.reference-face.back .map-slot:first-child { background: #eaf5ee; }
.reference-face .map-slot.blank { color: var(--muted); font-size: 13px; background: repeating-linear-gradient(-45deg,#fff,#fff 5px,#f0edf2 5px,#f0edf2 6px); }
.reference-number-note { margin: 13px 0 9px; font-size: 11px; }
.reference-finishing { font-size: 12px; line-height: 1.85; border-top: 1px solid var(--line); padding-top: 10px; }
.reference-caveat { margin-top: 9px; font-size: 10px; line-height: 1.7; }
.all-order { padding: 10px 11px; margin-top: 13px; background: #fcfaff; border: 1px solid var(--line); border-radius: 9px; }
.all-order summary { font-size: 12px; }
.order-table-wrap { overflow: auto; max-height: 340px; margin-top: 9px; }
.order-table { width: 100%; border-collapse: collapse; font-size: 11px; background: white; white-space: nowrap; }
.order-table th, .order-table td { padding: 7px 5px; text-align: center; border-bottom: 1px solid #ece7ef; }
.order-table th { font-weight: 600; color: var(--muted); position: sticky; top: 0; background: #f8f4fc; }
.order-table .group-start td { border-top: 2px solid #d5c4e5; }
.inline-guide { display: none; }

/* Actual preview maps / download / error states. */
.plan-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.plan-summary span { border-radius: 22px; background: var(--green-bg); color: #38765c; font-size: 12px; padding: 6px 12px; }
.preview-controls { align-items: flex-end; margin-bottom: 22px; }
.preview-controls .field { width: 140px; }
.page-map { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.sheet-map { position: relative; border: 1px solid #dacee7; background: #faf7fe; border-radius: 6px; overflow: hidden; width: 100%; }
.map-slot { position: absolute; border: 1px solid #ded0eb; display: grid; place-items: center; line-height: 1; font-weight: 650; color: #6b498e; font-size: clamp(10px,2vw,20px); }
.map-slot.blank { color: #9a92a4; background: #fafafa; font-size: 12px; }
.face-label { font-size: 11px; font-weight: 600; display: block; margin: 5px 0; }
.notice { background: #f6f2fa; border-left: 3px solid #b197c9; padding: 12px 15px; border-radius: 6px; font-size: 12px; line-height: 1.85; margin-top: 18px; }
.warning-box { background: #fff9ed; color: #8b6a2e; border: 1px solid #f1e4c4; padding: 12px 15px; border-radius: 10px; font-size: 12px; margin-top: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.alert { background: var(--error-bg); color: var(--error); border: 1px solid #f4d6dd; border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
.alert.info { background: #f6f2fa; color: #6e5684; border-color: #e8dcef; }
.danger { color: var(--error); }
.busy { border: 1px solid var(--line); border-radius: 12px; background: white; padding: 17px 20px; margin-bottom: 18px; }
.busy-head { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; }
progress { width: 100%; height: 6px; accent-color: var(--accent); display: block; margin-top: 12px; border: 0; border-radius: 6px; }
progress::-webkit-progress-bar { background: #eee6f4; border-radius: 6px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 6px; }
.print-settings { margin-top: 20px; background: #f7f3fa; border: 1px solid var(--line); border-radius: 12px; padding: 18px; color: var(--ink); font-size: 14px; font-weight: 600; }
.print-guide { padding-left: 21px; margin: 18px 0; line-height: 1.9; font-size: 13px; }
.print-guide li + li { margin-top: 9px; }
.download-area { padding: 26px 0 8px; }
.download-area .small { margin-top: 10px; overflow-wrap: anywhere; }
iframe { display: block; width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #f5f2f8; margin: 18px 0 12px; }
dialog { border: 1px solid var(--line); border-radius: 20px; padding: 30px; max-width: min(680px,calc(100vw - 32px)); width: 100%; max-height: 90vh; color: var(--text); background: white; box-shadow: 0 30px 100px #24132d33; }
dialog::backdrop { background: #30243966; backdrop-filter: blur(3px); }
dialog h2 { padding-right: 28px; font-size: 23px; }
dialog .field { margin: 20px 0; }
dialog .secondary { margin-top: 18px; }
.dialog-close { position: absolute; right: 20px; top: 15px; border: 0; background: none; font-size: 25px; color: var(--muted); }
.guide-body { font-size: 13px; white-space: pre-line; line-height: 1.95; margin-top: 20px; }
#passwordDialog { max-width: 450px; }
#shareText { margin-top: 15px; font: 12px/1.8 monospace; }

/* The approved bottom four-card guide, without introducing another workflow. */
.workflow-guide { padding-top: 10px; padding-bottom: 46px; }
.guide-heading { display: flex; justify-content: space-between; gap: 25px; align-items: end; margin-bottom: 23px; }
.guide-heading h2 { font-size: 24px; margin-top: 9px; }
.guide-heading > p { max-width: 375px; padding-bottom: 10px; }
.guide-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.guide-card { border: 1px solid var(--line); background: white; border-radius: 16px; padding: 23px; }
.guide-number { font-size: 27px; font-weight: 500; color: #c4b1d5; display: block; margin-bottom: 14px; }
.guide-card h3 { font-size: 14px; margin-bottom: 7px; }
.guide-card p { font-size: 12px; color: var(--muted); line-height: 1.85; }
.full-guide { font-size: 12px; margin-top: 18px; }
.footer { border-top: 1px solid var(--line); padding: 25px 0 30px; color: var(--muted); font-size: 10px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.footer p { max-width: 750px; }
.footer small { display: block; font-size: 10px; margin-top: 5px; }
.footer a { color: var(--muted); white-space: nowrap; }
.copyright-note { white-space: pre-line; }
noscript p { text-align: center; padding: 30px; }
html[lang=ja] h1 { font-size: clamp(30px,3.2vw,46px); letter-spacing: -1px; }

/* Same inline page reference / basic field behavior as 2.1 on narrow screens. */
@media (min-width: 1500px) {
  .shell { width: min(1360px,calc(100% - 112px)); }
  .hero-inner { min-height: 326px; }
  .hero-art { margin-right: 42px; }
  .work-grid { grid-template-columns: minmax(0,1fr) 314px; }
}
@media (max-width: 1100px) {
  .shell { width: calc(100% - 40px); }
  .header-inner { gap: 24px; }
  .topnav { gap: 18px; }
  .work-grid { grid-template-columns: minmax(0,1fr) 265px; gap: 18px; }
  .card { padding: 24px; }
  .side-panel { padding: 20px 17px; }
  .hero-art { flex-basis: 250px; transform: scale(.9); }
  .hero h1 { font-size: 40px; }
  .basic-fields:has(#groupBasic:not([hidden])) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .preset { padding: 17px; }
  .example-line { margin-right: 7px; gap: 5px; }
}
@media (max-width: 960px) {
  .work-grid { grid-template-columns: 1fr; }
  .sidecard { display: none; }
  .inline-guide { display: block; border: 1px solid var(--line); border-radius: 15px; padding: 18px; background: #fcfaff; margin: 20px 0; }
  .inline-guide .reference-faces { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .inline-guide .reference-nav { max-width: 450px; }
  .reference-face .map-slot { font-size: 24px; }
  .order-table { font-size: 12px; }
  .topnav { gap: 14px; font-size: 12px; }
  .header-inner { gap: 20px; }
  .brand-word { font-size: 22px; }
}
@media (max-width: 760px) {
  .header-inner { min-height: 73px; flex-wrap: wrap; gap: 0 16px; padding-top: 13px; }
  .topnav { order: 3; flex-basis: 100%; gap: 24px; padding: 3px 0 7px; font-size: 12px; }
  .brand-icon { width: 39px; height: 39px; }
  .brand { gap: 10px; }
  .brand-word { font-size: 22px; }
  .brand-copy small { font-size: 9px; }
  .hero-art { display: none; }
  .hero-inner { min-height: 0; padding-block: 29px 28px; }
  .hero h1, html[lang=ja] h1 { font-size: 36px; }
  .hero-footnote { display: none; }
  .hero-desc { max-width: 600px; }
  .guide-heading { display: block; }
  .guide-heading > p { margin-top: 10px; max-width: none; }
  .guide-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  :root { font-size: 14px; }
  .shell { width: calc(100% - 30px); }
  .brand-word { font-size: 21px; }
  .lang-switch { padding: 3px; }
  .lang-switch button { padding: 5px 8px; font-size: 11px; min-height: 30px; }
  .topnav { gap: 23px; }
  .hero h1, html[lang=ja] h1 { font-size: 32px; letter-spacing: -1px; line-height: 1.3; }
  .hero-desc { font-size: 13px; margin-top: 13px; line-height: 1.85; }
  .hero-note { margin-top: 14px; }
  .eyebrow, .section-kicker { font-size: 9px; }
  .workspace { padding-top: 19px; padding-bottom: 30px; }
  .steps { border-radius: 13px; padding: 11px 6px; margin-bottom: 18px; gap: 0; }
  .step { flex-direction: column; gap: 5px; text-align: center; font-size: 10px; padding: 2px; }
  .step-num { width: 26px; height: 26px; font-size: 10px; }
  .card { padding: 21px 17px; border-radius: 16px; }
  h2 { font-size: 21px; letter-spacing: -.6px; }
  .panel > .muted { font-size: 12px; }
  .presets { gap: 10px; }
  .preset { padding: 15px 12px; gap: 8px; }
  .preset input { top: 15px; right: 12px; width: 16px; height: 16px; }
  .preset-icon { height: 29px; width: 35px; }
  .preset-title { font-size: 13px; line-height: 1.5; }
  .preset .small { font-size: 11px; line-height: 1.8; }
  .example-caption { font-size: 9px; }
  .example-line { display: flex; margin: 3px 0; justify-content: space-between; gap: 3px; font-size: 10px; }
  .example-pair { grid-template-columns: repeat(2,25px); }
  .basic-fields, .basic-fields:has(#groupBasic:not([hidden])) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .basic-fields > .field:first-child, #groupBasic { grid-column: 1 / -1; }
  .basic-settings h3 { font-size: 14px; }
  .range-bottom { align-items: flex-start; }
  .range-bottom button { font-size: 11px; }
  .field { font-size: 12px; }
  input[type=text], input[type=password], input[type=number], select, textarea { font-size: 16px; padding: 9px 8px; }
  .fields { gap: 12px; }
  .checks { grid-template-columns: 1fr; }
  .mode-distinction { font-size: 11px; padding: 10px 12px; }
  .auto-defaults, #rangeSummary { font-size: 11px; }
  .inline-guide { padding: 14px; }
  .inline-guide .reference-faces { gap: 10px; }
  .reference-face .map-slot { font-size: 22px; }
  .reference-mode { font-size: 16px; }
  details { padding: 14px; }
  .small { font-size: 11px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .file-success { padding: 13px; align-items: flex-start; }
  .file-success .secondary { font-size: 11px; padding: 6px 10px; white-space: nowrap; }
  .file-success strong { font-size: 13px; }
  .dropzone { padding: 25px 12px; }
  .dropzone h3 { font-size: 16px; }
  .dropzone .small { font-size: 10px; }
  .panel-nav { gap: 8px; padding-top: 18px; margin-top: 23px; }
  .primary, .secondary { padding: 9px 12px; font-size: 12px; min-height: 41px; }
  .page-map { gap: 9px; }
  iframe { height: 360px; }
  .large { width: 100%; }
  .busy-head { align-items: start; }
  .workflow-guide { padding-bottom: 30px; }
  .guide-heading h2 { font-size: 21px; }
  .guide-heading > p { font-size: 11px; }
  .guide-grid { gap: 12px; }
  .guide-card { padding: 18px 15px; }
  .guide-number { font-size: 24px; margin-bottom: 10px; }
  .guide-card h3 { font-size: 12px; }
  .guide-card p { font-size: 11px; }
  .footer-inner { display: block; }
  .footer a { display: inline-block; margin-top: 13px; }
  dialog { padding: 23px; }
  dialog h2 { font-size: 21px; }
  .guide-body { font-size: 12px; }
  html[lang=ja] .step, html[lang=en] .step { font-size: 9px; }
}
@media (max-width: 360px) {
  .presets { grid-template-columns: 1fr; }
  .example-line { display: inline-flex; margin-right: 10px; }
  .preset .small { font-size: 12px; }
  .topnav { gap: 18px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Inline raster preview for mobile PDF viewers. */
.preview-images{display:grid;gap:18px;margin-top:16px}.preview-images figure{margin:0}.preview-images figcaption{font-weight:600;margin-bottom:8px}.preview-images img{display:block;width:100%;height:auto;background:white;border:1px solid var(--line,#ded4e8);border-radius:8px}#imagePreviewToggle{margin:12px 0}#previewFrame[hidden],.preview-images[hidden]{display:none}
