
  /* ═══ 帳票 AI 読み取り (/chohyo/) — ocrjp design tokens and shared chrome (header, footer, toast,
     paywall, login) re-implemented from public/index.html; everything chohyo-specific is ch-*. ═══ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { font-size: 16px; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans JP", sans-serif;
    background: #F8FAFC; color: #1E293B; min-height: 100vh; line-height: 1.6;
  }
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; }
  [hidden] { display: none !important; }
  main#chApp { min-height: calc(100vh - 56px - 50px); }
  :root {
    --blue-600: #2563EB; --blue-700: #1D4ED8; --blue-50: #EFF6FF; --blue-100: #DBEAFE;
    --gray-50: #F8FAFC; --gray-100: #F1F5F9; --gray-200: #E2E8F0; --gray-300: #CBD5E1; --gray-400: #94A3B8;
    --gray-500: #64748B; --gray-600: #475569; --gray-700: #334155; --gray-800: #1E293B; --gray-900: #0F172A;
    --green-600: #16A34A; --green-700: #15803D; --green-50: #F0FDF4;
    --red-600: #DC2626; --red-700: #B91C1C; --red-50: #FEF2F2;
    --amber-600: #D97706; --amber-700: #B45309; --amber-50: #FFFBEB;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05); --shadow-md: 0 4px 12px rgba(0,0,0,0.08); --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    /* three tiers: colour + shape (● ◆ ▲) + text; the fills are the Excel fills (PRD §5.3) */
    --t-g: var(--green-700); --t-y: var(--amber-700); --t-r: var(--red-700);
    --t-y-bg: #FBEFCF; --t-r-bg: #F6DDD8; --t-y-bd: #E0A526; --t-r-bd: #C2410C;
    --ch-bar-h: 56px;
  }

  /* ── Header (same markup and look as ocrjp) ── */
  .header { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
  .header-logo { font-size: 20px; font-weight: 700; color: var(--blue-600); display: flex; align-items: center; gap: 8px; white-space: nowrap; flex-shrink: 0; }
  .header-logo svg { width: 28px; height: 28px; }
  .ch-brand { font-size: 12px; font-weight: 600; color: var(--gray-600); border: 1px solid var(--gray-200); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
  .header-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--gray-500); }
  .header-nav a:hover { color: var(--gray-800); }
  .header-nav .nav-link { color: var(--gray-600); font-weight: 500; }
  .quota-badge { font-size: 13px; background: var(--blue-50); color: var(--blue-600); padding: 4px 12px; border-radius: 20px; font-weight: 500; white-space: nowrap; border: 0; font-family: inherit; }
  .quota-badge.warning { background: var(--amber-50); color: var(--amber-600); }
  .quota-badge.exhausted { background: var(--red-50); color: var(--red-600); }
  .quota-badge.token { background: #DBEAFE; color: var(--blue-600); border: 1px solid #93C5FD; cursor: pointer; }
  .qdots { letter-spacing: 1px; margin-right: 4px; }
  #navAccountLink { color: var(--blue-600); font-weight: 600; font-size: 14px; }
  .nav-menu-btn { display: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--gray-200); border-radius: 8px; background: #fff; color: var(--gray-700); align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
  .nav-menu-btn svg { width: 20px; height: 20px; }
  .nav-menu-btn[aria-expanded="true"] { background: var(--gray-100); }
  .nav-menu { position: absolute; top: 100%; right: 8px; margin-top: 6px; z-index: 120; min-width: 230px; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; }
  .nav-menu[hidden] { display: none; }
  .nav-mlink { padding: 10px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--gray-700); }
  .nav-mlink:hover { background: var(--gray-50); }
  .nav-mlink.account { color: var(--blue-600); font-weight: 600; border-top: 1px solid var(--gray-100); border-radius: 0 0 8px 8px; margin-top: 4px; }
  /* the 帳票 label makes the bar wider than ocrjp's: the links move into the menu a little earlier */
  @media (max-width: 1320px) { .header-nav { gap: 12px; font-size: 13px; } .header-nav .nav-link, #navAccountLink { white-space: nowrap; } #navAccountLink { font-size: 13px; } }
  @media (max-width: 1200px) { .header-nav .nav-link { display: none; } .nav-menu-btn { display: inline-flex; } }
  @media (min-width: 1201px) { .nav-menu { display: none !important; } }
  @media (max-width: 600px) { #navAccountLink { display: none; } .header { padding: 0 12px; } .header-logo { font-size: 17px; gap: 6px; } .header-logo svg { width: 24px; height: 24px; } .header-nav { gap: 8px; } .quota-badge { padding: 4px 9px; font-size: 12px; } }
  @media (max-width: 400px) { .ch-brand { display: none; } }

  /* ── Footer ── */
  .footer { padding: 16px 24px; text-align: center; font-size: 12px; color: var(--gray-400); border-top: 1px solid var(--gray-100); background: #fff; }
  .footer a:hover { color: var(--gray-600); }

  /* ── Buttons ── */
  .ch-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; font-size: 14.5px; font-weight: 600; border-radius: 8px; border: 1px solid var(--gray-300); background: #fff; color: var(--gray-700); cursor: pointer; white-space: nowrap; line-height: 1.3; }
  .ch-btn:hover { background: var(--gray-50); border-color: var(--gray-400); }
  .ch-btn.pri { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
  .ch-btn.pri:hover { background: var(--blue-700); border-color: var(--blue-700); }
  .ch-btn.sm { padding: 6px 12px; font-size: 13px; }
  .ch-btn.ghost { border-color: transparent; background: transparent; color: var(--gray-600); }
  .ch-btn.ghost:hover { background: var(--gray-100); }
  .ch-btn:disabled { opacity: .55; cursor: not-allowed; }
  .ch-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
  .ch-link { color: var(--blue-600); text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
  :focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }

  /* ── Views ── */
  .ch-view { display: none; }
  .ch-view.on { display: block; }
  .ch-wrap { max-width: 880px; margin: 0 auto; padding: 40px 24px 56px; }

  /* landing */
  .ch-hero { text-align: center; margin-bottom: 28px; }
  .ch-h1 { font-size: 34px; font-weight: 700; color: var(--gray-800); line-height: 1.35; margin-bottom: 12px; }
  .ch-h1 span { display: block; font-size: 20px; color: var(--blue-600); font-weight: 600; margin-top: 6px; }
  .ch-h1 .ph { display: inline-block; font-size: inherit; color: inherit; font-weight: inherit; margin-top: 0; }   /* a phrase of the H1: lines break between phrases only */
  .ch-lead { color: var(--gray-600); font-size: 15.5px; line-height: 1.85; max-width: 680px; margin: 0 auto 10px; }
  .ch-sub { display: inline-block; font-size: 13.5px; color: var(--gray-700); background: var(--blue-50); border-radius: 999px; padding: 4px 14px; font-weight: 500; }
  .ch-drop { border: 2px dashed var(--gray-300); border-radius: var(--radius); background: #fff; padding: 40px 28px 30px; text-align: center; transition: all .2s ease; }
  .ch-drop.dragover { border-color: var(--blue-600); background: var(--blue-50); box-shadow: var(--shadow-md); }
  .ch-drop-icon { width: 60px; height: 60px; margin: 0 auto 14px; background: var(--blue-50); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
  .ch-drop-icon svg { width: 30px; height: 30px; color: var(--blue-600); }
  .ch-ttl { font-weight: 700; }   /* the state titles (drop zone, PDF picker, processing, reject, error, done): not headings, so the outline is the content (SEO copy 2026-11-03) */
  .ch-drop .ch-ttl { font-size: 18px; font-weight: 600; color: var(--gray-700); margin-bottom: 16px; }
  .ch-drop .ch-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
  /* スマホから選ぶ (10-31, public/shared/handoff.js + handoff.css, as on ocrjp): a PC shows #chPhone (QR dialog) instead of
     「スマホで撮影」, which only opens a file picker there. #chCam stays hidden on a mouse + wide screen until wireIntake() knows
     (no flash), and gets .on back when hoSetup() says it is not a PC (iPad with a trackpad, touch laptop …) */
  @media (hover: hover) and (pointer: fine) and (min-width: 768px) { #chCam:not(.on) { display: none; } }
  @media (max-width: 767px) and (hover: none) { #chPhone { display: none !important; } }
  .ch-fmt { margin-top: 16px; font-size: 12.5px; color: var(--gray-500); line-height: 1.8; }
  .ch-sample { text-align: center; margin: 16px 0 0; font-size: 14px; color: var(--gray-600); }
  .ch-resume { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px 10px 16px; background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 10px; font-size: 14px; color: var(--gray-700); }
  .ch-resume[hidden] { display: none; }
  .ch-resume .t { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
  .ch-resume b { color: var(--gray-900); }
  .ch-resume-x { border: 0; background: none; color: var(--gray-500); font-size: 20px; line-height: 1; padding: 4px 6px; cursor: pointer; }
  .ch-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 36px 0 0; }
  .ch-steps > div { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px 16px 14px; }
  .ch-steps .n { font-size: 12px; color: var(--blue-600); font-weight: 700; letter-spacing: .05em; }
  .ch-steps h3 { font-size: 15px; color: var(--gray-800); margin: 2px 0 4px; }
  .ch-steps p { font-size: 13px; color: var(--gray-500); line-height: 1.7; }
  .ch-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12.5px; color: var(--gray-700); }
  .ch-privacy { display: flex; gap: 8px; align-items: flex-start; margin-top: 24px; font-size: 12.5px; color: var(--gray-500); line-height: 1.75; }
  .ch-privacy svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; }
  /* ── below the tool (SEO copy 2026-11-03, one template for every landing path): what the checks are, the diagrams,
     the steps, the types, the FAQ. The hero adds a kicker line above the H1 and the three points under the lead. ── */
  .ch-kick { font-size: 14px; font-weight: 600; color: var(--blue-600); margin-bottom: 6px; }
  .ch-pts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; max-width: 720px; margin: 0 auto 14px; font-size: 14px; font-weight: 600; color: var(--gray-700); }
  .ch-pts li { display: flex; align-items: baseline; gap: 6px; }
  .ch-pts li::before { content: "✓"; color: var(--blue-600); font-weight: 700; }
  .ch-about { margin-top: 48px; color: var(--gray-700); font-size: 14.5px; line-height: 1.9; }
  .ch-blk { margin-bottom: 44px; }
  .ch-blk > p { margin: 0 0 10px; }
  .ch-about h2 { font-size: 18px; font-weight: 600; color: var(--gray-800); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-200); }
  .ch-about a { color: var(--blue-600); text-decoration: underline; }
  .ch-about .ch-steps { margin-top: 14px; }
  .ch-feat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 16px; }
  .ch-feat > div, .ch-tiers li, .ch-types li { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 14px 16px; }
  .ch-feat h3 { font-size: 15px; color: var(--gray-800); margin: 0 0 4px; }
  .ch-feat p { font-size: 13.5px; color: var(--gray-600); line-height: 1.8; }
  .ch-tiers, .ch-types { list-style: none; display: grid; gap: 10px; margin: 4px 0 12px; }
  .ch-tiers li { border-left-width: 4px; font-size: 14px; padding: 10px 14px; }
  .ch-tiers li.g { border-left-color: var(--t-g); } .ch-tiers li.y { border-left-color: var(--t-y-bd); } .ch-tiers li.r { border-left-color: var(--t-r-bd); }
  .ch-tiers b { display: block; color: var(--gray-800); }
  .ch-types { grid-template-columns: 1fr 1fr; }
  .ch-types li { font-size: 13.5px; color: var(--gray-600); line-height: 1.75; padding: 12px 14px; }
  .ch-types li > a, .ch-types li > b { display: block; font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; }
  .ch-types li > a { color: var(--blue-600); }
  .ch-note { font-size: 13.5px; line-height: 1.8; color: var(--gray-700); background: var(--amber-50); border: 1px solid #FDE68A; border-radius: 10px; padding: 10px 14px; }
  @media (max-width: 760px) { .ch-feat, .ch-types { grid-template-columns: 1fr; } .ch-about { margin-top: 36px; } .ch-blk { margin-bottom: 36px; } }
  /* diagrams: inline SVG in a <figure role="img" aria-label>, styled only here (the page tokens, ● ◆ ▲). Text stays
     ≥ 11 px on a 320 px screen: the flow switches to its vertical drawing below 860 px, the pairs stack below 700 px. */
  .ch-fig { margin: 20px 0 10px; }
  .ch-fig svg { display: block; width: 100%; height: auto; }
  .ch-fig > .n { display: none; max-width: 380px; margin: 0 auto; }
  @media (max-width: 859px) { .ch-fig > .w { display: none; } .ch-fig > .n { display: block; } }
  .ch-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; margin: 0 auto; }
  @media (max-width: 699px) { .ch-duo { grid-template-columns: 1fr; max-width: 400px; } }
  .ch-fig figcaption { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--gray-500); text-align: center; }
  .ch-fig text { font-size: 14px; fill: var(--gray-700); }
  .ch-fig .c { text-anchor: middle; } .ch-fig .e { text-anchor: end; }
  .ch-fig .b { font-weight: 700; fill: var(--gray-800); }
  .ch-fig .h { font-size: 15px; font-weight: 700; fill: var(--gray-800); }
  .ch-fig .s { font-size: 12.5px; fill: var(--gray-500); }
  .ch-fig .o { font-size: 13px; fill: var(--gray-800); }
  .ch-fig .m { fill: var(--gray-500); }
  .ch-fig .bl { fill: var(--blue-700); }
  .ch-fig .rd { fill: var(--t-r); } .ch-fig .tg { fill: var(--t-g); }
  .ch-fig .mk { font-size: 11px; }
  .ch-fig .pn { fill: #fff; stroke: var(--gray-200); }
  .ch-fig .pv { fill: #EEF2F7; stroke: var(--gray-200); }
  .ch-fig .pp { fill: #fff; stroke: var(--gray-300); }
  .ch-fig .bx { fill: #fff; stroke: var(--gray-300); stroke-width: 1.2; }
  .ch-fig .k { fill: var(--blue-50); stroke: var(--blue-600); stroke-width: 1.6; }
  .ch-fig .mu { fill: var(--gray-50); stroke: var(--gray-300); stroke-dasharray: 4 3; }
  .ch-fig .rb { fill: var(--t-r-bg); stroke: var(--t-r-bd); stroke-width: 1.2; }
  .ch-fig .ln { fill: none; stroke: var(--gray-400); stroke-width: 1.6; }
  .ch-fig .ah { fill: var(--gray-400); }
  .ch-fig .ic { fill: none; stroke: var(--blue-600); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
  .ch-fig .fg { fill: var(--t-g); } .ch-fig .fy { fill: var(--t-y); } .ch-fig .fr { fill: var(--t-r); }
  .ch-fig .cy { fill: var(--t-y-bg); } .ch-fig .cr { fill: var(--t-r-bg); }
  .ch-fig .tb { fill: #fff; stroke: var(--gray-200); }
  .ch-fig .hd { fill: var(--gray-50); }
  .ch-fig .gl { fill: none; stroke: var(--gray-200); }
  .ch-fig .rf { fill: var(--t-r-bg); } .ch-fig .rbar { fill: var(--t-r-bd); }
  .ch-fig .fx { fill: #fff; stroke: var(--blue-600); stroke-width: 1.2; }
  .ch-fig .ph { fill: var(--gray-200); }
  .ch-fig .sm { fill: var(--gray-500); opacity: .3; }
  .ch-fig .hl { fill: rgba(246, 221, 216, .35); stroke: var(--t-r-bd); stroke-width: 2; }
  .ch-faq { color: var(--gray-600); font-size: 14px; line-height: 1.9; }
  .ch-faq details { border-bottom: 1px solid var(--gray-100); padding: 10px 0; }
  .ch-faq summary { cursor: pointer; font-weight: 600; color: var(--gray-700); }
  .ch-faq details p { margin-top: 6px; color: var(--gray-600); }
  .ch-dtable-wrap { overflow-x: auto; margin-top: 8px; }
  .ch-dtable { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 12.5px; line-height: 1.7; background: #fff; }
  .ch-dtable th, .ch-dtable td { border: 1px solid var(--gray-200); padding: 6px 9px; text-align: left; vertical-align: top; }
  .ch-dtable th { background: var(--gray-50); color: var(--gray-700); font-weight: 600; white-space: nowrap; }
  .ch-dtable td:first-child { font-weight: 600; color: var(--gray-700); white-space: nowrap; }

  /* tier marks: shape + colour (+ text in the reason line) */
  .ti { display: inline-block; width: 1.05em; text-align: center; font-size: 13px; line-height: 1; flex-shrink: 0; }
  .ti.g { color: var(--t-g); } .ti.y { color: var(--t-y); } .ti.r { color: var(--t-r); } .ti.n { color: var(--gray-400); }

  /* page grid (v-grid, M2a): thumbnails are small JPEGs, never canvases kept in the DOM */
  .ch-pdfhead { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
  .ch-pdfhead .ch-ttl { font-size: 18px; color: var(--gray-800); }
  .ch-pdfhead p { font-size: 13px; color: var(--gray-500); }
  .ch-pdfgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .ch-tile { position: relative; background: #fff; border: 1.5px solid var(--gray-200); border-radius: 10px; padding: 8px; text-align: center; user-select: none; -webkit-user-select: none; scroll-margin: 72px 0 150px; }
  .ch-tile:hover, .ch-tile:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-50); }
  .ch-tile .pick { display: block; border-radius: 6px; cursor: pointer; }
  .ch-tile.locked .pick { cursor: default; }
  .ch-tile img { -webkit-user-drag: none; }
  .ch-tile .mv { display: flex; gap: 4px; margin-top: 6px; }
  .ch-tile .mv button { flex: 1; font: inherit; font-size: 12px; line-height: 1.4; padding: 3px 0; border: 1px solid var(--gray-300); border-radius: 6px; background: #fff; color: var(--gray-700); cursor: pointer; }
  .ch-tile .mv button:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-400); }
  .ch-tile .mv button:disabled { opacity: .4; cursor: not-allowed; }
  @media (hover: hover) and (pointer: fine) and (min-width: 761px) {
    .ch-tile { cursor: grab; }
    .ch-tile .mv { opacity: 0; }        /* still in the tab order and read out; shown under the pointer or the focus */
    .ch-tile:hover .mv, .ch-tile:focus-within .mv { opacity: 1; }
  }
  .ch-tile.drag { opacity: .4; }
  .ch-tile.drop-before::before, .ch-tile.drop-after::before { content: ""; position: absolute; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: var(--blue-600); }
  .ch-tile.drop-before::before { left: -9px; } .ch-tile.drop-after::before { right: -9px; }
  .ch-dragghost { position: fixed; left: 0; top: 0; z-index: 120; width: 76px; pointer-events: none; border-radius: 6px; background: #fff; box-shadow: var(--shadow-md); opacity: .92; }
  .ch-dragghost img, .ch-dragghost .ph { display: block; width: 100%; aspect-ratio: 1 / 1.414; object-fit: contain; border-radius: 6px; background: var(--gray-100); }
  [tabindex="-1"]:focus { outline: none; }
  .ch-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ch-ghint { flex-basis: 100%; font-size: 12.5px; color: var(--gray-500); }
  .ch-refile { margin-bottom: 14px; font-size: 13.5px; line-height: 1.7; color: var(--gray-700); background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
  .ch-refile p { margin: 0; }
  .ch-refile ul { margin: 4px 0 8px 18px; }
  .ch-refile .ch-row { display: flex; flex-wrap: wrap; gap: 8px; }
  .ch-refile.ch-known { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  .ch-glow { flex-basis: 100%; font-size: 12.5px; font-weight: 400; color: var(--amber-700); background: var(--amber-50); border: 1px solid #FDE68A; border-radius: 8px; padding: 4px 10px; line-height: 1.6; }
  .ch-spacebar { position: sticky; top: 56px; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 20px; background: var(--amber-50); border-bottom: 1px solid #FDE68A; color: var(--amber-700); font-size: 13.5px; line-height: 1.6; }
  .ch-spacebar[hidden] { display: none; }
  .ch-spacebar .t { flex: 1 1 240px; min-width: 0; }
  body.v-res .ch-spacebar { position: static; }
  .ch-spacefree { margin-top: 14px; font-size: 13px; color: var(--gray-600); line-height: 1.7; }
  .ch-bxsum { font-size: 14px; color: var(--gray-700); line-height: 1.6; margin-bottom: 12px; overflow-wrap: anywhere; }
  .ch-bxopt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; font-size: 13.5px; color: var(--gray-700); }
  .ch-bxnote { font-size: 12.5px; color: var(--gray-500); line-height: 1.6; }
  .ch-bxprog { font-size: 13px; color: var(--gray-700); margin-top: 8px; }
  .ch-bxmenu { margin-top: 12px; border-top: 1px solid var(--gray-200); padding-top: 12px; }
  /* M2b: 帳票ごとに分けた Excel（ZIP）, the secondary choice under the main buttons */
  .ch-bxalt { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 10px; margin-top: 10px; font-size: 13px; color: var(--gray-500); text-align: right; line-height: 1.6; }
  .ch-bxalt .ch-link:disabled { color: var(--gray-400); text-decoration: none; cursor: default; }
  .ch-bxalt span { font-size: 12px; }
  .ch-bxitem { display: block; width: 100%; text-align: left; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--gray-200); border-radius: 8px; background: #fff; color: var(--gray-800); font: inherit; font-size: 13.5px; cursor: pointer; }
  .ch-bxitem:hover { background: var(--gray-50); }
  .ch-bxitem:disabled { opacity: .55; cursor: default; }
  .ch-bxitem small { display: block; color: var(--gray-500); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ch-bxitem.pri { border-color: var(--blue-600); background: var(--blue-50); font-weight: 700; }
  .ch-bnote { display: block; font-size: 12px; color: var(--gray-500); margin-top: 2px; }
  .ch-tile .ph, .ch-tile img { display: block; width: 100%; aspect-ratio: 1 / 1.414; background: var(--gray-100); border-radius: 4px; object-fit: contain; }
  .ch-tile .ph { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--gray-400); }
  .ch-tile .num { display: block; font-size: 12.5px; color: var(--gray-600); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ch-tile .sel { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 600; border-radius: 99px; padding: 1px 10px; }
  .ch-tile .sel.on { color: var(--blue-700); background: var(--blue-50); } .ch-tile .sel.off { color: var(--gray-500); background: var(--gray-100); }
  .ch-tile .bdg { position: absolute; top: 12px; left: 12px; right: 12px; font-size: 11px; font-weight: 600; line-height: 1.5; border-radius: 6px; padding: 1px 6px; background: var(--gray-700); color: #fff; text-align: left; overflow-wrap: anywhere; }
  .ch-tile .bdg.ok { background: var(--green-50); color: var(--green-700); } .ch-tile .bdg.err { background: var(--red-50); color: var(--red-700); }
  .ch-tile.on { border-color: var(--blue-600); }
  .ch-tile.off img, .ch-tile.off .ph { opacity: .4; filter: grayscale(1); }
  .ch-gridwrap { max-width: 1080px; padding-bottom: 120px; }
  .ch-gtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--gray-600); }
  .ch-gtools input { width: 64px; font: inherit; padding: 4px 6px; border: 1px solid var(--gray-300); border-radius: 6px; }
  .ch-gtools > span { white-space: nowrap; }
  .ch-gnotes { margin-bottom: 14px; font-size: 13px; line-height: 1.7; color: var(--amber-700); background: var(--amber-50); border: 1px solid #FDE68A; border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; }
  .ch-gnotes p { margin: 0; }
  .ch-gbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--gray-200); box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
  .ch-gbar .q { flex: 1 1 280px; min-width: 0; font-size: 14px; font-weight: 600; color: var(--gray-800); line-height: 1.6; }
  .ch-gbar .q small { display: block; font-size: 12px; font-weight: 400; color: var(--gray-500); }

  /* batch list (v-batch): one row per document; colour only on the counts (PRD §4.0, §4.7.1) */
  .ch-batchwrap { max-width: 980px; }
  .ch-bhead { margin-bottom: 14px; }
  .ch-bhead .ch-ttl { font-size: 18px; color: var(--gray-800); }
  .ch-bsum { font-size: 14px; color: var(--gray-700); line-height: 1.7; margin-top: 2px; }
  .ch-bprog { font-size: 13px; color: var(--gray-600); margin-top: 6px; }
  .ch-bhead .ch-pbar { max-width: none; margin: 6px 0 0; }
  .ch-btools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0; font-size: 13px; color: var(--gray-600); }
  .ch-btools label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
  .ch-btools select { font: inherit; padding: 4px 24px 4px 8px; border: 1px solid var(--gray-300); border-radius: 8px; background: #fff; color: var(--gray-800); }
  .ch-blist { list-style: none; display: grid; gap: 8px; }
  .ch-brow { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden; }
  .ch-bopen { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
  .ch-bopen:focus-visible { outline: 2px solid var(--blue-600); outline-offset: -2px; }
  button.ch-bopen:hover { background: var(--gray-50); }
  div.ch-bopen { cursor: default; }
  .ch-bthumb { position: relative; flex: 0 0 48px; width: 48px; height: 66px; border-radius: 4px; background: var(--gray-100); box-shadow: 0 0 0 1px var(--gray-200); }
  .ch-bthumb img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 4px; background: #fff; }
  .ch-bthumb.stack { box-shadow: 0 0 0 1px var(--gray-200), 3px 3px 0 -1px #fff, 3px 3px 0 0 var(--gray-300); }
  .ch-bmain { flex: 1; min-width: 0; }
  .ch-bmain .l1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 14px; color: var(--gray-900); }
  .ch-bmain .l1 b { font-weight: 700; }
  .ch-bmain .l2 { font-size: 12px; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ch-bflag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--gray-700); border: 1px solid var(--gray-300); border-radius: 4px; padding: 0 5px; margin-right: 4px; }
  .ch-bstate { flex-shrink: 0; text-align: right; font-size: 13px; font-weight: 600; color: var(--gray-700); white-space: nowrap; }
  .ch-bstate small { display: block; font-size: 12px; font-weight: 600; }
  .ch-bgo { flex-shrink: 0; color: var(--gray-400); font-size: 18px; }
  .ch-bseam { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 12px; border-top: 1px dashed var(--gray-200); font-size: 12.5px; color: var(--gray-600); }
  .ch-bseam.unsure { background: var(--amber-50); color: var(--amber-700); }
  .ch-bsplit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--gray-100); font-size: 12.5px; color: var(--gray-600); }
  .ch-bfoot { margin-top: 12px; padding: 10px 12px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; font-size: 13.5px; color: var(--gray-700); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .ch-bacts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
  /* detail of a document: the bar above the result, the page pager, the page lines in 明細 */
  .ch-bnav { order: -1; flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--gray-600); }
  .ch-bnav .pos { font-weight: 600; color: var(--gray-800); font-variant-numeric: tabular-nums; }
  .ch-pager:not([hidden]) ~ #chPvHint { display: none; }
  .ch-pager { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-right: 8px; font-variant-numeric: tabular-nums; color: var(--gray-700); }
  .ch-pager[hidden] { display: none; }
  .ch-pvtools button.wide:focus-visible, .ch-pvtools button:focus-visible { outline-offset: 1px; }
  .ch-lt tr.ch-psep td { padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--gray-500); background: var(--gray-50); text-align: center; }
  .ch-lt tr.ch-psep .msg { display: block; font-weight: 400; color: var(--t-y); }
  .ch-kv tr.ch-psep td { padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--gray-500); background: var(--gray-50); text-align: center; }
  .ch-removed { margin-top: 10px; font-size: 12.5px; color: var(--gray-600); }
  .ch-removed ul { list-style: none; margin-top: 6px; display: grid; gap: 4px; }
  .ch-removed li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; background: #fff; border: 1px solid var(--gray-200); border-radius: 8px; padding: 4px 10px; overflow-wrap: anywhere; }

  /* processing / reject / error */
  .ch-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; padding: 28px; box-shadow: var(--shadow-sm); }
  .ch-proc { max-width: 520px; margin: 0 auto; text-align: center; }
  .ch-proc .ch-ttl { font-size: 20px; color: var(--gray-800); margin-bottom: 4px; }
  .ch-proc .fn { font-size: 13px; color: var(--gray-500); margin-bottom: 18px; word-break: break-all; }
  .ch-steps4 { list-style: none; text-align: left; max-width: 320px; margin: 0 auto 18px; }
  .ch-steps4 li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; color: var(--gray-400); }
  .ch-steps4 li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gray-300); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
  .ch-steps4 li.on { color: var(--gray-800); font-weight: 600; }
  .ch-steps4 li.on .dot { border-color: var(--blue-600); border-top-color: transparent; animation: chspin 0.9s linear infinite; }
  .ch-steps4 li.ok { color: var(--gray-600); }
  .ch-steps4 li.ok .dot { border-color: var(--green-600); background: var(--green-600); color: #fff; }
  .ch-steps4 li.ok .dot::before { content: "✓"; }
  @keyframes chspin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .ch-steps4 li.on .dot { animation: none; border-top-color: var(--blue-600); } }
  .ch-pbar { height: 6px; background: var(--gray-100); border-radius: 99px; overflow: hidden; margin: 0 auto 14px; max-width: 320px; }
  .ch-pbar i { display: block; height: 100%; width: 0; background: var(--blue-600); border-radius: 99px; transition: width .3s ease; }
  .ch-busy { font-size: 13px; color: var(--amber-700); background: var(--amber-50); border-radius: 8px; padding: 8px 12px; margin: 0 auto 14px; max-width: 360px; }
  .ch-rej { display: grid; grid-template-columns: 180px 1fr; gap: 22px; max-width: 640px; margin: 0 auto; }
  .ch-rej .img { position: relative; border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; background: var(--gray-100); min-height: 120px; }
  .ch-rej .img img { display: block; width: 100%; height: auto; filter: grayscale(.2); }
  .ch-rej .ch-ttl { font-size: 19px; color: var(--gray-800); line-height: 1.5; margin-bottom: 10px; }
  .ch-free { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--green-700); background: var(--green-50); border-radius: 99px; padding: 3px 12px; margin-bottom: 12px; }
  .ch-errcost { font-size: 13px; color: var(--amber-700); background: var(--amber-50); border-radius: 8px; padding: 8px 12px; margin: 0 auto 12px; max-width: 420px; line-height: 1.6; }
  .ch-rej .why { font-size: 14px; color: var(--gray-700); line-height: 1.75; margin-bottom: 10px; }
  .ch-rej .why b { color: var(--red-700); }
  .ch-rej ul { margin: 0 0 16px 1.2em; font-size: 13.5px; color: var(--gray-600); line-height: 1.8; }
  .ch-rej .ch-row { display: flex; gap: 10px; flex-wrap: wrap; }
  @media (max-width: 600px) { .ch-rej { grid-template-columns: 1fr; } .ch-rej .img { max-width: 220px; } }

  /* ── Result ── */
  .ch-res-bar { position: sticky; top: 56px; z-index: 50; background: #fff; border-bottom: 1px solid var(--gray-200); padding: 10px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: var(--ch-bar-h); }
  .ch-res-bar .ch-new { flex-shrink: 0; }
  .ch-res-bar .ch-dl { margin-left: auto; }   /* wrapped to a row of its own: stays at the right edge */
  .ch-res-bar .fn { font-size: 14px; font-weight: 600; color: var(--gray-800); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ch-res-bar select { font: inherit; font-size: 14px; padding: 6px 28px 6px 10px; border: 1px solid var(--gray-300); border-radius: 8px; background: #fff; color: var(--gray-800); }
  .ch-res-bar select.attn { border-color: var(--amber-600); box-shadow: 0 0 0 3px var(--amber-50); }
  .ch-todo { display: flex; align-items: center; gap: 10px; border: 1px solid var(--gray-200); border-radius: 10px; padding: 5px 6px 5px 12px; font-size: 14px; color: var(--gray-700); }
  .ch-todo b { font-size: 18px; color: var(--gray-900); margin: 0 2px; }
  .ch-todo small { color: var(--gray-500); font-size: 12px; }
  .ch-todo.done { border-color: #BBF7D0; background: var(--green-50); color: var(--green-700); font-weight: 600; padding: 7px 12px; }
  .ch-bar3 { display: inline-flex; width: 110px; height: 6px; border-radius: 99px; overflow: hidden; background: var(--gray-100); }
  .ch-bar3 i { display: block; height: 100%; }
  .ch-bar3 .g { background: var(--green-600); } .ch-bar3 .y { background: #F59E0B; } .ch-bar3 .r { background: var(--red-600); }
  .ch-sp { flex: 1; }
  .ch-dl { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
  /* 出力形式 next to the download buttons (it only changes the file) + the column count of the file right now */
  .ch-expm { display: flex; align-items: center; gap: 6px; margin-right: 4px; }
  .ch-expm label { font-size: 13px; font-weight: 700; color: var(--gray-700); white-space: nowrap; }
  .ch-expm select { padding: 6px 26px 6px 8px; }
  .ch-expn { font-size: 12.5px; color: var(--gray-500); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ch-res { display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); align-items: start; }
  .ch-left { position: sticky; top: calc(56px + var(--ch-bar-h)); height: calc(100vh - 56px - var(--ch-bar-h)); background: #EEF2F7; border-right: 1px solid var(--gray-200); display: flex; flex-direction: column; }
  .ch-pv { position: relative; flex: 1; overflow: auto; cursor: grab; touch-action: pan-x pan-y; overscroll-behavior: contain; }
  .ch-pv.drag { cursor: grabbing; user-select: none; }
  .ch-stage { position: relative; margin: 12px; transform-origin: 0 0; }
  .ch-stage img { display: block; width: 100%; height: auto; background: #fff; box-shadow: var(--shadow-md); user-select: none; -webkit-user-drag: none; }
  .ch-noimg { margin: 24px; padding: 30px 16px; text-align: center; color: var(--gray-500); font-size: 13.5px; background: #fff; border-radius: 10px; }
  .ch-box { position: absolute; border: 2px solid; border-radius: 2px; cursor: pointer; padding: 0; background: transparent; }
  .ch-box.y { border-color: var(--t-y-bd); background: rgba(251, 239, 207, .35); border-style: dashed; }
  .ch-box.r { border-color: var(--t-r-bd); background: rgba(246, 221, 216, .35); }
  .ch-box.act { border-color: var(--blue-600); border-style: solid; box-shadow: 0 0 0 3px rgba(37, 99, 235, .35); background: rgba(37, 99, 235, .08); z-index: 2; }
  .ch-pvtools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--gray-200); background: #fff; font-size: 12.5px; color: var(--gray-500); }
  .ch-pvtools button { width: 32px; height: 30px; border: 1px solid var(--gray-300); border-radius: 6px; background: #fff; cursor: pointer; font-size: 16px; color: var(--gray-700); }
  .ch-pvtools button.wide { width: auto; padding: 0 10px; font-size: 12.5px; }
  .ch-pvnote { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: rgba(15, 23, 42, .85); color: #fff; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; z-index: 5; pointer-events: none; white-space: nowrap; }
  .ch-right { padding: 16px 20px 96px; min-width: 0; container: chright / inline-size; }
  .ch-banner { border-radius: 10px; padding: 10px 14px; font-size: 13.5px; line-height: 1.6; margin-bottom: 12px; }
  .ch-banner.warn { background: var(--amber-50); color: var(--amber-700); border: 1px solid #FDE68A; }
  .ch-banner.info { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }
  .ch-sec { margin-bottom: 22px; }
  .ch-sec h3 { font-size: 15px; color: var(--gray-800); margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
  .ch-sec h3 small { font-size: 12px; color: var(--gray-500); font-weight: 400; }
  .ch-sec h3 small.ch-cur { font-size: 12.5px; color: var(--gray-700); font-weight: 600; background: var(--gray-100); border-radius: 6px; padding: 1px 8px; }
  .ch-kv { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden; }
  .ch-kv th { width: 30%; min-width: 96px; text-align: left; font-size: 13px; font-weight: 500; color: var(--gray-600); background: var(--gray-50); padding: 8px 12px; vertical-align: top; border-bottom: 1px solid var(--gray-100); }
  .ch-kv td { padding: 0; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
  .ch-kv tbody:last-child tr:last-child th, .ch-kv tbody:last-child tr:last-child td { border-bottom: 0; }
  .ch-sec h3.ch-foldh { display: block; margin: 0; font-size: inherit; font-weight: inherit; }
  .ch-fold { display: block; width: 100%; text-align: left; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 13.5px; color: var(--gray-600); cursor: pointer; }
  .ch-fold::before { content: '▸'; display: inline-block; width: 1.2em; color: var(--gray-500); }
  .ch-fold[aria-expanded="true"]::before { content: '▾'; }
  .ch-fold:hover { color: var(--gray-800); background: var(--gray-100); }
  .ch-fold:focus-visible { outline: 2px solid var(--blue-600); outline-offset: -2px; }
  .ch-emptyin { padding-top: 6px; }
  .ch-emptyin .note { font-size: 12.5px; color: var(--gray-500); line-height: 1.6; margin: 4px 2px 0; }
  .ch-emptyin h4 { font-size: 13px; font-weight: 500; color: var(--gray-600); margin: 12px 2px 6px; }
  .ch-lines { overflow-x: auto; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; overscroll-behavior-x: contain; }
  .ch-lt { width: 100%; border-collapse: separate; border-spacing: 0; }
  .ch-lt th { font-size: 12px; font-weight: 500; color: var(--gray-500); text-align: left; padding: 7px 8px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
  .ch-lt td { padding: 0; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
  .ch-lt td.rn { width: 34px; text-align: center; vertical-align: middle; white-space: nowrap; }
  .ch-lt .rnl { display: none; }
  /* table (wide field column): one line per cell — icon, value, OK; the reasons go to the strip under the row */
  .ch-lt th:first-child, .ch-lt td.rn { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 1px 0 0 var(--gray-100); }
  .ch-lt th:first-child { background: var(--gray-50); }
  .ch-lt tr[data-line] .ch-cell { min-height: 0; padding: 6px 8px; }
  .ch-lt tr[data-line] .ch-cell .v { white-space: nowrap; word-break: normal; }
  .ch-lt tr[data-line] td.k-item_name .ch-cell .v { white-space: normal; word-break: break-word; }
  .ch-lt tr[data-line] .ch-cell .why, .ch-lt tr[data-line] .ch-cell .acts { display: none; }
  .ch-lt .k-item_code { min-width: 108px; } .ch-lt .k-item_name { min-width: 230px; } .ch-lt .k-irisu { min-width: 64px; }
  .ch-lt tr[data-line] .ch-ok { padding: 0 6px; font-size: 11px; line-height: 18px; }
  .ch-lt tr[data-line] .ch-cell .l1 { align-items: center; gap: 5px; }
  .ch-lt .k-qty { min-width: 76px; } .ch-lt .k-unit { min-width: 64px; } .ch-lt .k-unit_price { min-width: 92px; }
  .ch-lt .k-amount { min-width: 104px; } .ch-lt .k-tax_rate { min-width: 72px; }
  .ch-lt .mk { flex-shrink: 0; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 4px; line-height: 18px; }
  .ch-lt .mk.cf { color: var(--blue-700); background: var(--blue-50); } .ch-lt .mk.ed { color: #6D28D9; background: #F3E8FF; }
  .ch-lt tr.ch-strip td { padding: 0; border-bottom: 1px solid var(--gray-100); }
  .ch-lt tr.ch-strip.empty { display: none; }
  .ch-lt tr[data-line]:has(+ tr.ch-strip:not(.empty)) td { border-bottom: 0; }
  .ch-stripin { position: sticky; left: 0; width: calc(100cqw - 2px); display: flex; align-items: center; gap: 8px; padding: 3px 10px 5px 40px; font-size: 12px; line-height: 1.6; color: var(--gray-600); }
  .ch-stripin.r { color: var(--t-r); } .ch-stripin.y { color: var(--t-y); }
  .ch-stripin .msg { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ch-stripin .ch-fix, .ch-stripin .ch-undo { flex-shrink: 0; }
  .ch-lt tr:last-child td { border-bottom: 0; }
  .ch-rowdel { border: 0; background: none; color: var(--gray-400); cursor: pointer; font-size: 16px; width: 28px; height: 28px; border-radius: 6px; }
  .ch-rowdel:hover { background: var(--red-50); color: var(--red-600); }
  .ch-lt tr.ch-noline td { padding: 12px; font-size: 13px; color: var(--gray-500); }
  .ch-addrow { margin-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
  .ch-outcols { font-size: 12.5px; color: var(--gray-500); line-height: 1.75; border-top: 1px solid var(--gray-200); padding-top: 12px; }
  .ch-outcols p { margin: 0; }
  /* その他 = full-text reading (2026-10-31): the document's own items (multi-line values as printed) and its tables, one tab
     per table (or per merged group of tables with the same header); the tab strip wraps inside the field column */
  .ch-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
  .ch-tab { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border: 1px solid var(--gray-300); border-radius: 999px; background: #fff; color: var(--gray-700); cursor: pointer; }
  .ch-tab .tt { font-weight: 400; color: var(--gray-500); max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ch-tab:hover { border-color: var(--blue-600); }
  .ch-tab[aria-selected="true"] { background: var(--blue-50); border-color: var(--blue-600); color: var(--blue-700); }
  .ch-tab[aria-selected="true"] .tt { color: var(--blue-700); }
  .ch-tab .nd { font-size: 11px; font-weight: 700; color: var(--t-y); }
  .ch-merge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12.5px; color: var(--gray-600); }
  .ch-merge .ch-btn { white-space: normal; text-align: left; }
  .ch-lt.dyn td { min-width: 96px; }
  .ch-lt.dyn td.rn { min-width: 0; }
  .ch-lt.dyn tr[data-line] .ch-cell .v { white-space: pre-wrap; word-break: break-word; }
  .ch-lt.dyn th { white-space: normal; min-width: 72px; }
  .ch-cell textarea { display: block; flex: 1; min-width: 0; width: 100%; font: inherit; font-size: 14.5px; line-height: 1.5; padding: 4px 6px; border: 1.5px solid var(--blue-600); border-radius: 6px; background: #fff; resize: vertical; }
  .ch-cell .kh { font-size: 11.5px; color: var(--gray-500); margin-top: 2px; }
  .ch-lt.dyn .ch-cell textarea { min-width: 12em; }

  /* one cell */
  .ch-cell { position: relative; padding: 7px 10px; min-height: 38px; border-left: 3px solid transparent; cursor: text; }
  .ch-cell:focus-visible { outline: 2px solid var(--blue-600); outline-offset: -2px; }
  .ch-cell.c-y { background: var(--t-y-bg) radial-gradient(rgba(180, 83, 9, .16) 1px, transparent 1.2px) 0 0 / 6px 6px; border-left-color: var(--t-y-bd); }
  .ch-cell.c-r { background: var(--t-r-bg) repeating-linear-gradient(135deg, rgba(185, 28, 28, .07) 0 4px, transparent 4px 9px); border-left-color: var(--t-r-bd); }
  .ch-cell.act { box-shadow: inset 0 0 0 2px var(--blue-600); }
  .ch-cell .l1 { display: flex; align-items: flex-start; gap: 6px; }
  .ch-cell .v { flex: 1; min-width: 0; font-size: 14.5px; color: var(--gray-900); word-break: break-word; white-space: pre-wrap; }
  .ch-cell.num .v { text-align: right; font-variant-numeric: tabular-nums; }
  .ch-cell .v.empty { color: var(--gray-400); }
  .ch-cell .why { font-size: 12px; line-height: 1.55; margin-top: 3px; }
  .ch-cell.c-y .why { color: var(--t-y); }
  .ch-cell.c-r .why { color: var(--t-r); }
  .ch-cell .why.note { color: var(--gray-500); }
  .ch-cell .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
  .ch-ok { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 2px 9px; border: 1px solid var(--gray-400); border-radius: 6px; background: #fff; color: var(--gray-700); cursor: pointer; }
  .ch-ok:hover { border-color: var(--blue-600); color: var(--blue-700); }
  .ch-fix { font-size: 12px; padding: 2px 9px; border: 1px solid var(--blue-600); border-radius: 6px; background: #fff; color: var(--blue-700); cursor: pointer; font-weight: 600; }
  .ch-fix:hover { background: var(--blue-50); }
  .ch-undo { font-size: 11.5px; border: 0; background: none; color: var(--gray-500); text-decoration: underline; cursor: pointer; padding: 0; }
  .ch-tag { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 4px; padding: 0 6px; margin-top: 3px; margin-right: 6px; }
  .ch-tag.cf { color: var(--blue-700); background: var(--blue-50); }
  .ch-tag.ed { color: #6D28D9; background: #F3E8FF; }
  .ch-cell input { width: 100%; font: inherit; font-size: 14.5px; padding: 4px 6px; border: 1.5px solid var(--blue-600); border-radius: 6px; background: #fff; }
  .ch-cell.num input { text-align: right; }
  .ch-cell .err { color: var(--red-700); font-size: 12px; margin-top: 2px; }

  /* done */
  .ch-done { max-width: 560px; margin: 0 auto; }
  .ch-done .ch-ttl { font-size: 22px; color: var(--gray-800); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
  .ch-done .bal { font-size: 14px; color: var(--gray-600); margin-bottom: 16px; }
  .ch-done .box { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--gray-600); line-height: 1.75; margin-bottom: 14px; }
  .ch-fb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--gray-700); margin: 14px 0; }
  .ch-fb button.thumb { font-size: 20px; width: 46px; height: 40px; border: 1px solid var(--gray-300); border-radius: 10px; background: #fff; cursor: pointer; }
  .ch-fb button.thumb[aria-pressed="true"] { border-color: var(--blue-600); background: var(--blue-50); }
  .ch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
  .ch-chip { font-size: 13px; border: 1px solid var(--gray-300); background: #fff; border-radius: 99px; padding: 4px 12px; cursor: pointer; color: var(--gray-700); }
  .ch-chip[aria-pressed="true"] { border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-700); }
  .ch-pro { border: 1px dashed var(--gray-300); border-radius: 12px; padding: 14px 16px; margin: 14px 0; background: #fff; position: relative; }
  .ch-pro b { display: block; font-size: 14px; color: var(--gray-800); margin-bottom: 4px; padding-right: 24px; }
  .ch-pro p { font-size: 13px; color: var(--gray-600); line-height: 1.7; margin-bottom: 8px; }
  .ch-pro .x { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--gray-400); cursor: pointer; font-size: 16px; width: 28px; height: 28px; border-radius: 6px; }
  .ch-done .ch-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

  /* ── Toast ── */
  .toast { position: fixed; top: 50%; left: 50%; z-index: 600; transform: translate(-50%, -50%) scale(0.96); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s; min-width: 280px; max-width: min(440px, calc(100vw - 32px)); padding: 16px 22px 16px 46px; border-radius: 12px; background: #1F2937; color: #fff; font-size: 14.5px; line-height: 1.65; text-align: left; box-shadow: 0 16px 40px rgba(16, 24, 40, .28); pointer-events: none; }
  .toast::before { content: ""; position: absolute; left: 20px; top: 21px; width: 12px; height: 12px; border-radius: 50%; background: #3B82F6; box-shadow: 0 0 0 4px rgba(59, 130, 246, .22); }
  .toast.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
  .toast.success::before { background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .22); }
  .toast.error::before { background: #EF4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .22); }
  .toast.error { background: #3B1D1D; }

  /* ── Paywall / login / dialogs (ocrjp purchase dialog look) ── */
  .paywall-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 400; align-items: center; justify-content: center; padding: 16px; }
  .paywall-overlay.active { display: flex; }
  .paywall-modal { background: #fff; border-radius: 16px; max-width: 440px; width: 100%; padding: 28px; box-shadow: var(--shadow-lg); position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; }
  #paywallOverlay .paywall-modal { max-width: 540px; }
  /* 読み取り済みのファイル (11-12): ocrjp's .dup-* — a dialog on a PC, a bottom sheet on a phone */
  .ch-dup-ov { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 400; align-items: center; justify-content: center; padding: 16px; }
  .ch-dup-ov.active { display: flex; }
  .ch-dup-modal { position: relative; width: 420px; max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px 24px 18px; outline: none; }
  .ch-dup-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: none; background: transparent; cursor: pointer; color: var(--gray-400); font-size: 20px; line-height: 1; border-radius: 8px; }
  .ch-dup-x:hover { background: var(--gray-100); color: var(--gray-700); }
  .ch-dup-grip { display: none; }
  .ch-dup-head { display: flex; gap: 14px; align-items: center; padding-right: 18px; }
  .ch-dup-thumb { flex: none; display: block; width: 58px; height: 76px; border-radius: 7px; border: 1px solid var(--gray-200); object-fit: cover; object-position: top; background: repeating-linear-gradient(180deg, #fff 0 7px, var(--gray-200) 7px 8px); }
  .ch-dup-thumb.pdf { position: relative; background: #fff; }
  .ch-dup-thumb.pdf::after { content: "PDF"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 12px; font-weight: 700; color: var(--gray-500); }
  .ch-dup-t { font-size: 16.5px; line-height: 1.45; font-weight: 700; color: var(--gray-800); }
  .ch-dup-meta { margin-top: 2px; color: var(--gray-500); font-size: 12.5px; }
  .ch-dup-choice { display: block; width: 100%; margin-top: 14px; padding: 10px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.4; text-align: center; color: #fff; background: var(--blue-600); border: 1px solid var(--blue-600); border-radius: 9px; cursor: pointer; }
  .ch-dup-choice:hover { background: var(--blue-700); border-color: var(--blue-700); }
  .ch-dup-choice small { display: block; font-size: 11.5px; font-weight: 400; opacity: .9; }
  .ch-dup-choice.second { margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--gray-700); background: #fff; border-color: var(--gray-200); }
  .ch-dup-choice.second:hover { background: var(--gray-50); border-color: var(--gray-300); }
  .ch-dup-choice.second small { color: var(--gray-500); opacity: 1; }
  .ch-dup-modal button:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
  .ch-dup-foot { margin-top: 12px; font-size: 11.5px; color: var(--gray-400); line-height: 1.6; }
  @media (max-width: 640px) {
    .ch-dup-ov { align-items: flex-end; padding: 0; }
    .ch-dup-modal { width: 100%; max-height: calc(100dvh - 24px); border-radius: 16px 16px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
    .ch-dup-grip { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--gray-300); margin: -6px auto 12px; }
    /* the sheet closes on a tap outside; the × stays for screen readers only */
    .ch-dup-x { top: auto; right: auto; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
    .ch-dup-head { padding-right: 0; }
    .ch-dup-thumb { width: 44px; height: 58px; }
    .ch-dup-t { font-size: 15px; }
  }
  /* the banner over a result shown from before (one page, the batch list) */
  .ch-dupbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; padding: 9px 14px; border-radius: 10px; background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--gray-700); font-size: 13.5px; line-height: 1.6; }
  .ch-dupbar[hidden] { display: none; }
  .ch-dupbar .ch-link { color: var(--blue-700); white-space: nowrap; }
  .ch-dupbar .ch-link:disabled { color: var(--gray-400); cursor: default; }
  .paywall-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: none; background: transparent; cursor: pointer; color: var(--gray-400); font-size: 20px; line-height: 1; border-radius: 8px; }
  .paywall-close:hover { background: var(--gray-100); color: var(--gray-700); }
  .paywall-title { font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; padding-right: 28px; }
  .paywall-body { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 16px; }
  .paywall-body strong { color: var(--gray-900); }
  .pw-unit { display: inline-block; font-size: 13px; font-weight: 700; color: var(--blue-700); background: var(--blue-50); border-radius: 6px; padding: 2px 10px; margin-top: 6px; }
  .paywall-form { display: flex; flex-direction: column; gap: 12px; }
  .paywall-input { width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit; border: 1px solid var(--gray-200); border-radius: 8px; }
  .paywall-input:focus { outline: none; border-color: var(--blue-600); }
  .paywall-input.invalid { border-color: var(--red-600); }
  .email-hint { display: none; font-size: 12px; border-radius: 6px; padding: 6px 10px; margin-top: 6px; line-height: 1.5; }
  .email-hint.typo { display: block; color: var(--amber-600); background: var(--amber-50); cursor: pointer; }
  .email-hint.err { display: block; color: var(--red-600); background: var(--red-50); }
  .paywall-submit { padding: 12px 16px; font-size: 15px; font-weight: 600; color: #fff; background: var(--blue-600); border: none; border-radius: 8px; cursor: pointer; font-family: inherit; }
  .paywall-submit:hover { background: var(--blue-700); }
  .paywall-submit:disabled { background: var(--gray-300); cursor: not-allowed; }
  #paywallContent .paywall-submit { width: 100%; }
  .paywall-note { font-size: 12px; color: var(--gray-400); text-align: center; margin-top: 4px; }
  .paywall-success { padding: 16px; background: var(--green-50); color: var(--green-600); border-radius: 8px; font-size: 14px; text-align: center; }
  .pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
  .pack-card.selectable { cursor: pointer; margin: 0; padding: 12px 14px; border: 1.5px solid var(--gray-200); border-radius: 12px; transition: border-color .12s, box-shadow .12s; position: relative; display: flex; flex-direction: column; gap: 2px; background: #fff; }
  .pack-card.selectable:hover { border-color: var(--blue-600); }
  .pack-card.selectable.selected { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-50); background: #F5F9FF; }
  .pack-card .pack-name { font-size: 12.5px; color: var(--gray-600); font-weight: 600; }
  .pack-card .pack-price { font-size: 22px; line-height: 1.25; color: var(--gray-900); }
  .pack-card .pack-unit { font-size: 14px; color: var(--gray-900); }
  .pack-card .pack-sub { font-size: 11.5px; color: var(--gray-500); }
  .pack-sub .nw { white-space: nowrap; }
  .pack-tax { font-size: 11px; color: var(--gray-400); font-weight: 400; }
  .pack-badge { position: absolute; top: -9px; right: 10px; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--blue-600); border-radius: 999px; padding: 1px 8px; }
  .pack-hint { font-size: 12.5px; color: var(--amber-600); background: var(--amber-50); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.6; }
  .pw-trust { list-style: none; padding: 0; margin: 12px 0 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12.5px; color: var(--gray-700); }
  .pw-trust li { display: flex; align-items: center; gap: 6px; }
  .pw-trust svg { color: var(--green-600); flex-shrink: 0; }
  .pw-pay { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 10px 0 2px; }
  .pw-pay span { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--gray-600); border: 1px solid var(--gray-200); border-radius: 4px; padding: 1px 6px; background: #fff; }
  .pw-foot a { color: var(--gray-500); }
  .pw-email { margin: 4px 0 10px; }
  .pw-label { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
  .pw-label span { font-size: 11.5px; font-weight: 500; color: var(--gray-500); }
  .pw-email .paywall-input { height: 48px; font-size: 16px; border: 1.5px solid var(--gray-400); border-radius: 10px; padding-left: 40px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") no-repeat 13px center / 18px 18px; }
  .pw-email .paywall-input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-50); }
  .pw-email .paywall-input.invalid { border-color: var(--red-600); box-shadow: none; }
  .ch-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--blue-100); border-top-color: var(--blue-600); margin: 6px auto 14px; animation: chspin 1s linear infinite; }
  @media (max-width: 560px) {
    .pack-grid { grid-template-columns: 1fr; }
    .pw-trust { grid-template-columns: 1fr; gap: 4px; }
    .pack-card.selectable { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 0; align-items: center; padding: 10px 12px; }
    .pack-card.selectable .pack-name { grid-column: 1; grid-row: 1; }
    .pack-card.selectable .pack-price { grid-column: 1; grid-row: 2; font-size: 20px; }
    .pack-card.selectable .pack-unit { grid-column: 2; grid-row: 1; text-align: right; }
    .pack-card.selectable .pack-sub { grid-column: 2; grid-row: 2; text-align: right; }
    .paywall-modal { padding: 22px 18px; }
  }
  .ch-dlg-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
  .ch-acct { position: absolute; z-index: 1000; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; box-shadow: var(--shadow-md); padding: 12px 14px; font-size: 13px; color: var(--gray-700); min-width: 220px; }
  .ch-acct button { width: 100%; padding: 7px; border: 1px solid var(--gray-300); border-radius: 8px; background: #fff; color: var(--gray-600); font-size: 12.5px; cursor: pointer; }

  /* lines as cards (one line = one block of label / value rows) whenever the field column is narrow:
     phones and the half-width desktop pane alike */
  @container chright (max-width: 759px) {
    .ch-lines { border: 0; background: transparent; overflow: visible; }
    .ch-lt { min-width: 0; display: block; }
    .ch-lt thead { display: none; }
    .ch-lt tbody { display: block; }
    .ch-lt tr { display: block; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
    .ch-lt td { display: grid; grid-template-columns: 30% 1fr; border-bottom: 1px solid var(--gray-100); }
    .ch-lt td::before { content: attr(data-label); font-size: 12.5px; color: var(--gray-600); background: var(--gray-50); padding: 8px; }
    .ch-lt td.rn { display: flex; justify-content: space-between; align-items: center; width: auto; padding: 4px 8px; background: var(--gray-50); font-weight: 600; font-size: 13px; color: var(--gray-600); }
    .ch-lt td.rn::before { content: none; }
    .ch-lt tr.ch-noline td { display: block; }
    .ch-lt tr.ch-noline td::before { content: none; }
    .ch-lt tr.ch-psep { border: 0; background: transparent; margin-bottom: 6px; }
    .ch-lt tr.ch-psep td { display: block; background: transparent; }
    .ch-lt tr.ch-psep td::before { content: none; }
    .ch-lt .rnl { display: inline; }
    .ch-lt th:first-child, .ch-lt td.rn { position: static; box-shadow: none; }
    .ch-lt tr[data-line] .ch-cell .why { display: block; }
    .ch-lt tr[data-line] .ch-cell .acts { display: flex; }
    .ch-lt tr[data-line] .ch-cell .v { white-space: normal; }
    .ch-lt .mk, .ch-lt tr.ch-strip { display: none; }
    .ch-lt .k-item_code, .ch-lt .k-item_name, .ch-lt .k-irisu, .ch-lt .k-qty, .ch-lt .k-unit, .ch-lt .k-unit_price, .ch-lt .k-amount, .ch-lt .k-tax_rate { min-width: 0; }
    .ch-lt td.nm { min-width: 0; }
    .ch-lt td { min-width: 0; }
    .ch-lt.dyn td, .ch-lt.dyn th { min-width: 0; }
  }
  /* mobile download bar (§4.10) */
  .ch-mbar { display: none; }
  @media (max-width: 760px) {
    .ch-wrap { padding: 24px 16px 40px; }
    .ch-h1 { font-size: 25px; } .ch-h1 span { font-size: 16px; }
    .ch-kick { font-size: 13px; margin-bottom: 4px; }
    .ch-pts { font-size: 13px; gap: 2px 12px; margin-bottom: 10px; }
    .ch-lead { font-size: 14px; }
    .ch-drop { padding: 26px 16px 20px; }
    .ch-steps { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
    .ch-gbar { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); justify-content: stretch; }
    .ch-gbar .q { flex-basis: 100%; font-size: 13px; }
    .ch-gbar .ch-btn { flex: 1; white-space: normal; }
    .ch-gridwrap { padding-bottom: 190px; }
    .ch-spacebar { padding: 8px 12px; }
    /* the grid is a plain list on a phone: order by the buttons only (PRD §4.10) */
    .ch-pdfgrid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .ch-tile { display: flex; align-items: center; gap: 10px; text-align: left; }
    .ch-tile .pick { flex: 1; min-width: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: center; }
    .ch-tile .pick > img, .ch-tile .pick > .ph { grid-column: 1; grid-row: 1 / span 3; }
    .ch-tile .pick > .num, .ch-tile .pick > .sel, .ch-tile .pick > .bdg { grid-column: 2; }
    .ch-tile .num { margin-top: 0; }
    .ch-tile .sel { margin-top: 0; justify-self: start; }
    .ch-tile .bdg { position: static; justify-self: start; }
    .ch-tile .mv { flex: 0 0 60px; flex-direction: column; margin-top: 0; }
    .ch-tile .mv button { min-height: 40px; font-size: 13px; }
    .ch-gtools input, .ch-btools select { font-size: 16px; }      /* iOS zooms into a focused control under 16px */
    .ch-btools input[type="checkbox"] { width: 20px; height: 20px; }
    .ch-bstate { white-space: normal; max-width: 112px; }
    .ch-bacts .ch-btn { flex: 1 1 100%; white-space: normal; }
    .ch-bfoot .ch-btn { flex: 1 1 100%; white-space: normal; }
    .ch-bsplit .ch-btn { white-space: normal; }
    .ch-bopen { gap: 8px; padding: 8px; }
    .ch-res-bar { position: static; padding: 10px 12px; gap: 8px; }
    .ch-res-bar .fn { max-width: 52vw; }
    .ch-res-bar .ch-dl { display: none; }
    .ch-todo { order: 5; width: 100%; justify-content: space-between; }
    .ch-res { display: block; }
    .ch-left { position: sticky; top: 56px; z-index: 40; height: 34vh; border-right: 0; border-bottom: 1px solid var(--gray-300); }
    .ch-pvtools { padding: 4px 8px; }
    .ch-pager { display: contents; }      /* a row for the pager and zoom, a row for 分ける / つなげる: the image keeps its room */
    .ch-pager[hidden] { display: none; }
    .ch-pvtools button[data-pvact] { order: 5; }
    #chPvHint { display: none; }
    .ch-right { padding: 12px 12px 140px; }   /* clear of the two-row download bar */
    .ch-kv th { width: 34%; min-width: 0; padding: 8px; }
    .ch-mbar { display: flex; flex-wrap: wrap; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--gray-200); box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
    .ch-mbar .ch-btn { flex: 1; padding: 12px 8px; font-size: 15px; }
    .ch-bxopt select { font-size: 16px; }
    .ch-mbar .ch-expm { flex-basis: 100%; margin: 0; }   /* a row of its own above the buttons */
    .ch-mbar .ch-encm { flex: 0 1 auto; min-width: 0; }  /* CSV の文字コード next to the CSV button (M2b): no third row */
    .ch-mbar select { font: inherit; font-size: 16px; padding: 5px 26px 5px 8px; border: 1px solid var(--gray-300); border-radius: 8px; background: #fff; color: var(--gray-800); max-width: 100%; }   /* iOS zooms into a focused control under 16px */
    body.v-res .footer { padding-bottom: 128px; }
  }
  /* ═══ M3 自社 Excel テンプレート (2026-11-13): the 出力形式 menu, the wizard (v-tpl), the template dialogs, the Excel-like previews.
     Neutral throughout (PRD §4.8): no red, no result-screen green; ✓ is grey, ? is the brand blue, – is dashed grey. ═══ */
  .ch-tsel { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--gray-300); border-radius: 8px; background: #fff; color: var(--gray-800); cursor: pointer; max-width: 260px; white-space: nowrap; min-width: 0; }
  .ch-tsel .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ch-tsel .tg { font-size: 11px; font-weight: 700; color: var(--blue-700); background: var(--blue-50); border-radius: 4px; padding: 1px 5px; flex-shrink: 0; }
  .ch-tsel .ar { color: var(--gray-500); font-size: 11px; margin-left: 2px; flex-shrink: 0; }
  .ch-tsel[aria-expanded="true"] { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-50); }
  .ch-tsel:disabled { opacity: .6; cursor: default; }
  .ch-tsel.sm { font-size: 12.5px; padding: 4px 8px; max-width: 190px; }
  .ch-tsel.ovr { border-color: var(--gray-700); font-weight: 600; }
  .ch-expm .lbl { font-size: 13px; font-weight: 700; color: var(--gray-700); white-space: nowrap; }
  .ch-tmenu { position: fixed; z-index: 450; width: 400px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; text-align: left; font-size: 14px; color: var(--gray-800); max-height: min(72vh, 600px); overflow-y: auto; }
  .ch-tmenu[hidden] { display: none; }
  .ch-tmenu.row { width: 230px; }
  .ch-tmh { font-size: 12px; font-weight: 700; color: var(--gray-500); padding: 6px 10px 4px; display: flex; justify-content: space-between; gap: 8px; }
  .ch-tmh small { font-weight: 400; }
  .ch-tmh .x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--gray-500); cursor: pointer; padding: 0 4px; }
  .ch-topt { display: flex; align-items: flex-start; gap: 4px; border-radius: 8px; }
  .ch-topt.on { background: var(--blue-50); }
  .ch-topt .pick { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 0; background: none; font: inherit; color: inherit; text-align: left; border-radius: 8px; cursor: pointer; }
  .ch-topt .pick:hover { background: var(--gray-50); }
  .ch-topt.on .pick:hover { background: transparent; }
  .ch-topt .rd { flex: 0 0 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--gray-400); margin-top: 2px; position: relative; background: #fff; }
  .ch-topt.on .rd { border-color: var(--blue-600); }
  .ch-topt.on .rd::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--blue-600); }
  .ch-topt .tx { flex: 1; min-width: 0; }
  .ch-topt .tx b { display: block; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
  .ch-topt .tx small { display: block; color: var(--gray-500); font-size: 12px; line-height: 1.5; }
  .ch-tacts { display: flex; gap: 2px; flex-shrink: 0; padding-top: 6px; padding-right: 4px; }
  .ch-tacts button { font: inherit; font-size: 12px; border: 0; background: none; color: var(--gray-600); padding: 2px 6px; border-radius: 6px; cursor: pointer; }
  .ch-tacts button:hover { background: #fff; color: var(--blue-700); }
  .ch-tsep { font-size: 12px; font-weight: 700; color: var(--gray-500); padding: 10px 10px 4px; border-top: 1px solid var(--gray-100); margin-top: 6px; }
  .ch-tmfoot { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 10px 4px; border-top: 1px solid var(--gray-100); margin-top: 6px; font-size: 13.5px; }
  .ch-tmfoot button { font: inherit; background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--gray-600); text-decoration: underline; }
  .ch-tmfoot button.add { color: var(--blue-700); font-weight: 600; text-decoration: none; }
  .ch-tmfoot button.mng { margin-left: auto; }
  .ch-tmnote { display: flex; gap: 6px; font-size: 12px; color: var(--gray-500); padding: 6px 10px 2px; line-height: 1.6; }
  .ch-tmnote svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 3px; }
  .ch-tshade { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 440; }
  .ch-tshade[hidden] { display: none; }
  .ch-tmenu.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none; border-radius: 16px 16px 0 0; padding: 8px 12px calc(20px + env(safe-area-inset-bottom)); max-height: 86vh; box-shadow: 0 -8px 24px rgba(0,0,0,.15); }
  .ch-tmenu.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--gray-300); margin: 2px auto 8px; }
  .ch-tmenu.sheet .ch-tmh { font-size: 16px; color: var(--gray-900); align-items: center; }
  .ch-tmenu.sheet .ch-topt .pick { padding: 11px 8px; }
  .ch-landfmt { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; font-size: 14px; color: var(--gray-600); }
  .ch-landfmt small { font-size: 12.5px; color: var(--gray-500); }
  .ch-rowsel { flex-shrink: 0; align-self: center; margin-right: 8px; }
  .ch-rowsel .st { font-size: 12px; color: var(--gray-500); white-space: nowrap; }
  .ch-browl { display: flex; align-items: center; }
  .ch-browl > .ch-bopen { flex: 1; min-width: 0; }
  .ch-tnote { font-size: 12.5px; color: var(--gray-500); }
  /* wizard */
  .ch-twz { max-width: 1120px; margin: 0 auto; padding: 22px 24px 48px; }
  .ch-twzhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
  .ch-twzhead .ch-ttl { font-size: 21px; font-weight: 700; color: var(--gray-900); margin: 0; }
  .ch-tsteps { display: flex; gap: 4px; list-style: none; margin: 0 0 0 8px; padding: 0; font-size: 13px; color: var(--gray-500); }
  .ch-tsteps li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 99px; }
  .ch-tsteps li .n { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; background: var(--gray-200); color: var(--gray-600); }
  .ch-tsteps li.done .n { background: var(--blue-100); color: var(--blue-700); }
  .ch-tsteps li.on { background: var(--blue-50); color: var(--blue-700); font-weight: 700; }
  .ch-tsteps li.on .n { background: var(--blue-600); color: #fff; }
  .ch-tsteps li + li::before { content: ""; width: 14px; height: 1px; background: var(--gray-300); margin-right: 6px; }
  .ch-tfree { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--blue-700); background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 99px; padding: 3px 12px; }
  .ch-tpanel { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
  .ch-tlead { font-size: 13.5px; color: var(--gray-600); line-height: 1.7; margin: 0 0 12px; }
  .ch-trow { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
  .ch-tfield { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--gray-700); }
  .ch-tfield label { font-weight: 700; font-size: 13px; color: var(--gray-700); }
  .ch-tsel2, .ch-tinput { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--gray-300); border-radius: 8px; background: #fff; color: var(--gray-900); max-width: 100%; }
  .ch-tsel2 { padding-right: 26px; min-width: 120px; }
  .ch-tfile { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--gray-50); margin-bottom: 14px; flex-wrap: wrap; }
  .ch-tfile .ic { width: 34px; height: 40px; border-radius: 5px; background: #E7F0E9; color: #1D6F42; font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; border: 1px solid #C9DECF; flex-shrink: 0; }
  .ch-tfile .ic.mute { background: var(--gray-100); color: var(--gray-500); border-color: var(--gray-200); }
  .ch-tfile b { font-size: 14px; color: var(--gray-900); overflow-wrap: anywhere; }
  .ch-tfile small { display: block; font-size: 12px; color: var(--gray-500); }
  .ch-tfile .sp { flex: 1; }
  .ch-twzfoot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
  .ch-twzfoot .hint { margin-right: auto; font-size: 12.5px; color: var(--gray-500); }
  .ch-tnote2 { font-size: 12.5px; color: var(--gray-500); line-height: 1.7; }
  .ch-tlock { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--gray-500); line-height: 1.7; margin-top: 14px; }
  .ch-tlock svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; }
  .ch-tinfo, .ch-tneutral { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; line-height: 1.7; margin-bottom: 12px; color: var(--gray-700); }
  .ch-tinfo { background: var(--blue-50); border: 1px solid var(--blue-100); }
  .ch-tneutral { background: var(--gray-50); border: 1px solid var(--gray-200); }
  .ch-tinfo .i, .ch-tneutral .i { flex: 0 0 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
  .ch-tinfo .i { background: var(--blue-600); }
  .ch-tneutral .i { background: var(--gray-500); }
  .ch-tinfo b, .ch-tneutral b { color: var(--gray-900); }
  .ch-tneutral ul { margin: 6px 0 0 18px; padding: 0; }
  .ch-twz .ch-drop { padding: 30px 24px 24px; }
  .ch-twz .ch-steps { margin-top: 24px; }
  .ch-steps .ch-tsh { font-size: 15px; font-weight: 700; color: var(--gray-800); margin: 2px 0 4px; }
  .ch-twzm { display: none; }
  /* Excel-like grids (source preview, step 3, 出力イメージを見る, the done-page sketch) */
  .ch-xl { border: 1px solid #C8CDD3; border-radius: 6px; overflow: hidden; background: #fff; font-family: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif; }
  .ch-xlbar { display: flex; align-items: center; gap: 8px; background: #F3F4F6; border-bottom: 1px solid #D6DAE0; padding: 5px 10px; font-size: 12px; color: var(--gray-600); min-width: 0; }
  .ch-xlbar span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ch-xlbar .xi { background: #1D6F42; color: #fff; font-weight: 800; font-size: 10px; border-radius: 3px; padding: 1px 4px; flex-shrink: 0; }
  .ch-xlsc { overflow: auto; max-height: 460px; }
  .ch-xl table { border-collapse: collapse; table-layout: fixed; font-size: 11.5px; }
  .ch-xl th.cl, .ch-xl td.rn { background: #F3F4F6; color: #6B7280; font-weight: 400; font-size: 11px; text-align: center; border: 1px solid #E1E4E8; height: 20px; padding: 0 2px; }
  .ch-xl td { border: 1px solid #E5E7EB; padding: 2px 4px; height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #111827; }
  .ch-xl td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .ch-xl tr.hdpick td.rn { background: var(--blue-600); color: #fff; font-weight: 700; }
  .ch-xl tr.hdpick td:not(.rn) { box-shadow: inset 0 2px 0 var(--blue-600), inset 0 -2px 0 var(--blue-600); }
  .ch-xl tr.expick td.rn { background: var(--blue-100); color: var(--blue-700); font-weight: 700; }
  .ch-xl tr.expick td:not(.rn) { color: #888; }
  .ch-xl tr.gone td:not(.rn) { color: #9CA3AF; text-decoration: line-through; text-decoration-color: #CBD5E1; }
  .ch-xl td.fx { background: #F1F3F5 !important; color: #4B5563 !important; }
  .ch-xl td.un { text-decoration: underline dotted #B45309 2px; text-underline-offset: 3px; }
  .ch-xl td.addc { outline: 1px dashed #94A3B8; outline-offset: -2px; color: #374151; }
  .ch-xl td.addh { outline: 2px dashed #93C5FD; outline-offset: -3px; }
  .ch-xl td.y { background: #FBEFCF !important; }
  .ch-xl td.r { background: #F6DDD8 !important; }
  .ch-xl .tabs { display: flex; background: #F3F4F6; border-top: 1px solid #D6DAE0; font-size: 12px; overflow-x: auto; }
  .ch-xl .tabs span { padding: 5px 14px; color: #4B5563; border-right: 1px solid #D6DAE0; white-space: nowrap; }
  .ch-xl .tabs span.on { background: #fff; color: #1D6F42; font-weight: 700; border-bottom: 2px solid #1D6F42; }
  .ch-rtag { font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 0 5px; margin-right: 4px; }
  .ch-rtag.h { background: var(--blue-600); color: #fff; } .ch-rtag.e { background: var(--blue-100); color: var(--blue-700); }
  .ch-tlegend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--gray-600); margin-top: 10px; }
  .ch-tlegend i { display: inline-block; width: 22px; height: 12px; vertical-align: -1px; margin-right: 6px; border-radius: 2px; }
  /* mapping (step 2) */
  .ch-tsum { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--gray-700); margin-bottom: 6px; }
  .ch-tsum > span { display: inline-flex; align-items: center; gap: 6px; }
  .ch-tsum b { color: var(--gray-900); font-size: 15px; }
  .ch-tsum .rt { margin-left: auto; font-size: 12.5px; color: var(--gray-500); }
  .ch-tst { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 800; flex-shrink: 0; }
  .ch-tst.a { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300); }
  .ch-tst.c { background: var(--blue-600); color: #fff; }
  .ch-tst.x { background: #fff; color: var(--gray-400); border: 1px dashed var(--gray-300); }
  .ch-tst.m { background: var(--gray-800); color: #fff; }
  .ch-tmapw { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: 10px; background: #fff; }
  .ch-tmap { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 0; font-size: 13.5px; table-layout: fixed; }
  .ch-tmap th { font-size: 12px; font-weight: 600; color: var(--gray-500); text-align: left; background: var(--gray-50); padding: 8px 10px; border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 1; }
  .ch-tmap th:nth-child(1) { width: 46px; } .ch-tmap th:nth-child(2) { width: 118px; } .ch-tmap th:nth-child(3) { width: 140px; } .ch-tmap th:nth-child(4) { width: 380px; } .ch-tmap th:nth-child(5) { width: 180px; }
  .ch-tmap td { padding: 9px 10px; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
  .ch-tmap tr:last-child td { border-bottom: 0; }
  .ch-tmap .col span { display: inline-block; min-width: 24px; text-align: center; font-size: 12px; font-weight: 700; color: var(--gray-600); background: var(--gray-100); border-radius: 4px; padding: 1px 4px; font-family: ui-monospace, Menlo, monospace; }
  .ch-tmap .hd { font-weight: 700; color: var(--gray-900); overflow-wrap: anywhere; }
  .ch-tmap .hd small { display: block; font-weight: 400; font-size: 11.5px; color: var(--gray-500); }
  .ch-tmap .ex { color: var(--gray-500); font-size: 13px; overflow-wrap: anywhere; }
  .ch-tmap .src .l { display: flex; align-items: center; gap: 8px; }
  .ch-tmap .src select { flex: 1; min-width: 0; }
  .ch-tmap .tf select { width: 100%; min-width: 0; }
  .ch-tmap .why { font-size: 12px; color: var(--gray-500); margin: 4px 0 0 28px; }
  .ch-tmap .now { color: var(--gray-800); font-size: 13px; overflow-wrap: anywhere; }
  .ch-tmap .now small { color: var(--gray-500); }
  .ch-tmap .now.mute, .ch-tmap .dash { color: var(--gray-400); }
  .ch-tmap tr.cand td { background: #F5F8FF; }
  .ch-tmap tr.cand td:first-child { box-shadow: inset 3px 0 0 var(--blue-600); }
  .ch-tmap tr.xs td { background: #FCFCFD; }
  .ch-tchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 0 28px; }
  .ch-tchip { font: inherit; font-size: 12.5px; border: 1px solid var(--gray-300); background: #fff; border-radius: 99px; padding: 3px 11px; color: var(--gray-700); cursor: pointer; white-space: nowrap; }
  .ch-tchip[aria-pressed="true"] { border-color: var(--gray-800); background: var(--gray-800); color: #fff; }
  .ch-tchip.cand { border-color: #BFD3FB; color: var(--blue-700); }
  .ch-task { font-size: 12.5px; color: var(--blue-700); margin: 6px 0 0 28px; }
  .ch-tsame { font-size: 12px; color: var(--gray-500); margin: 5px 0 0 28px; }
  .ch-tfix { display: flex; gap: 6px; align-items: center; margin: 6px 0 0 28px; }
  .ch-tfix .ch-tinput { width: 160px; padding: 4px 8px; font-size: 13.5px; }
  .ch-tchk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--gray-700); margin-top: 12px; }
  .ch-tchk input { width: 16px; height: 16px; accent-color: var(--blue-600); }
  .ch-btn.dis, .ch-btn.dis:hover { background: var(--gray-200); border-color: var(--gray-200); color: var(--gray-500); cursor: not-allowed; }
  /* management, JSON, toast, batch files */
  .paywall-modal.ch-twide { max-width: 720px; text-align: left; }
  .paywall-modal.ch-tmid { max-width: 540px; text-align: left; }
  .ch-tlist { display: grid; gap: 10px; margin: 4px 0 12px; }
  .ch-tcard { border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
  .ch-tcard.on { border-color: #BFD3FB; background: #FAFCFF; }
  .ch-tcard .ic { width: 30px; height: 36px; border-radius: 5px; background: #E7F0E9; color: #1D6F42; font-weight: 800; font-size: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid #C9DECF; flex-shrink: 0; }
  .ch-tcard .ic.mute { background: var(--gray-100); color: var(--gray-500); border-color: var(--gray-200); }
  .ch-tcard .b { flex: 1; min-width: 0; }
  .ch-tcard .b b { font-size: 15px; color: var(--gray-900); overflow-wrap: anywhere; }
  .ch-tcard .cur { font-size: 11px; font-weight: 700; color: var(--blue-700); background: var(--blue-50); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
  .ch-tcard .b small { display: block; font-size: 12px; color: var(--gray-500); line-height: 1.6; margin-top: 2px; overflow-wrap: anywhere; }
  .ch-tcard .acts { display: flex; gap: 6px; flex-wrap: wrap; flex-basis: 100%; padding-left: 42px; }
  .ch-tcard .ren { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
  .ch-tcard .ren .ch-tinput { flex: 1; min-width: 160px; }
  .ch-tkv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13.5px; color: var(--gray-700); margin: 8px 0 12px; }
  .ch-tkv dt { color: var(--gray-500); } .ch-tkv dd { margin: 0; color: var(--gray-900); overflow-wrap: anywhere; }
  .ch-ttoast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 28px; z-index: 610; background: var(--gray-900); color: #fff; font-size: 13.5px; border-radius: 99px; padding: 9px 18px; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 24px); }
  .ch-ttoast[hidden] { display: none; }
  .ch-ttoast span { overflow: hidden; text-overflow: ellipsis; }
  .ch-ttoast button { font: inherit; font-size: 13px; color: #93C5FD; background: none; border: 0; text-decoration: underline; cursor: pointer; flex-shrink: 0; }
  .ch-tzip { border: 1px solid var(--gray-200); border-radius: 10px; background: var(--gray-50); padding: 8px 10px; margin-bottom: 12px; }
  .ch-tzip .zh { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; overflow-wrap: anywhere; }
  .ch-tfl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
  .ch-tfl li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; background: #fff; border: 1px solid var(--gray-200); border-radius: 6px; padding: 4px 8px; min-width: 0; flex-wrap: wrap; }
  .ch-tfl .ic { flex-shrink: 0; font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 0 5px; background: var(--blue-50); color: var(--blue-700); }
  .ch-tfl .ic.std { background: var(--gray-100); color: var(--gray-600); }
  .ch-tfl .nm { color: var(--gray-900); overflow-wrap: anywhere; min-width: 0; }
  .ch-tfl small { margin-left: auto; color: var(--gray-500); font-size: 11.5px; }
  .ch-done.ch-dwide { max-width: 1100px; text-align: left; }
  .ch-donetpl { margin: 4px 0 14px; }
  @media (max-width: 760px) {
    .ch-twzpc { display: none; }
    .ch-twzm { display: block; }
    .ch-tsel { font-size: 16px; max-width: 100%; }     /* iOS zooms into a focused control under 16px */
    .ch-mbar .ch-expm { min-width: 0; }
    .ch-mbar .ch-expm .ch-tsel { flex: 1 1 auto; min-width: 0; }
    .ch-mbar .ch-expm .ch-expn { flex-shrink: 0; }
    .ch-tsel2, .ch-tinput { font-size: 16px; }
    .ch-browl { flex-wrap: wrap; }
    .ch-rowsel { margin: 0 8px 8px auto; }
    .ch-tcard .acts { padding-left: 0; }
    .ch-ttoast { bottom: calc(132px + env(safe-area-inset-bottom)); border-radius: 12px; }
  }
