
  :root{
    --ink:#14213D;
    --ink-2:#1E2E52;
    --amber:#F2A93B;
    --amber-dark:#D98E1F;
    --paper:#FAF8F3;
    --paper-dim:#F0EDE4;
    --line:#DDD7C7;
    --text:#1C1C1C;
    --text-dim:#5B5B54;
    --ok:#2E7D4F;
  }
  *{box-sizing:border-box;margin:0;padding:0;}
  html{scroll-behavior:smooth;}
  body{
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    background:var(--paper);
    color:var(--text);
    line-height:1.5;
  }
  a{color:inherit;text-decoration:none;}

  /* ---------- HEADER ---------- */
  header{
    background:var(--ink);
    color:var(--paper);
    padding:18px 24px;
    position:sticky;
    top:0;
    z-index:100;
    border-bottom:3px solid var(--amber);
  }
  .header-inner{
    max-width:1100px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    flex-wrap:wrap;
  }
  .logo{
    font-size:1.3rem;
    font-weight:800;
    letter-spacing:-0.02em;
    display:flex;
    align-items:center;
    gap:8px;
  }
  .logo .dot{color:var(--amber);}
  nav{display:flex;gap:22px;flex-wrap:wrap;font-size:0.92rem;font-weight:600;}
  nav a{opacity:0.85;transition:opacity .15s;}
  nav a:hover{opacity:1;color:var(--amber);}

  /* ---------- HERO ---------- */
  .hero{
    background:var(--ink);
    color:var(--paper);
    padding:64px 24px 80px;
    text-align:center;
  }
  .hero h1{
    font-size:2.4rem;
    font-weight:800;
    max-width:680px;
    margin:0 auto 16px;
    line-height:1.15;
    letter-spacing:-0.02em;
  }
  .hero p{
    color:#C9CEDC;
    font-size:1.05rem;
    max-width:520px;
    margin:0 auto 32px;
  }
  .search-box{
    max-width:480px;
    margin:0 auto;
    display:flex;
    background:var(--paper);
    border-radius:8px;
    overflow:hidden;
    box-shadow:0 8px 24px rgba(0,0,0,0.25);
  }
  .search-box input{
    flex:1;
    border:none;
    padding:14px 16px;
    font-size:1rem;
    outline:none;
    font-family:inherit;
  }
  .search-box button{
    background:var(--amber);
    border:none;
    padding:0 20px;
    font-weight:700;
    cursor:pointer;
    color:var(--ink);
    font-size:0.95rem;
  }
  .search-box button:hover{background:var(--amber-dark);}

  /* ---------- SECTION HEADINGS ---------- */
  .section{
    max-width:1100px;
    margin:0 auto;
    padding:56px 24px;
  }
  .section-head{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    margin-bottom:24px;
    border-bottom:2px solid var(--line);
    padding-bottom:12px;
  }
  .section-head h2{
    font-size:1.4rem;
    font-weight:800;
    letter-spacing:-0.01em;
  }
  .section-head span{
    font-size:0.85rem;
    color:var(--text-dim);
  }

  /* ---------- TOOL CARDS GRID (homepage) ---------- */
  .tool-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:14px;
  }
  .tool-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:6px;
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:8px;
    transition:border-color .15s, transform .15s;
    cursor:pointer;
  }
  .tool-card:hover{
    border-color:var(--amber);
    transform:translateY(-2px);
  }
  .tool-card .icon{
    font-size:1.5rem;
  }
  .tool-card h3{
    font-size:1rem;
    font-weight:700;
  }
  .tool-card p{
    font-size:0.85rem;
    color:var(--text-dim);
  }
  .badge-soon{
    display:inline-block;
    font-size:0.7rem;
    font-weight:700;
    color:var(--amber-dark);
    background:#FBEAC9;
    padding:2px 8px;
    border-radius:4px;
    width:fit-content;
  }

  /* ---------- TOOL WORKSPACE (functional tools) ---------- */
  .workspace{
    background:var(--paper-dim);
  }
  .tool-panel{
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:28px;
    margin-bottom:20px;
  }
  .tool-panel h3{
    font-size:1.15rem;
    font-weight:800;
    margin-bottom:6px;
  }
  .tool-panel .tool-desc{
    color:var(--text-dim);
    font-size:0.9rem;
    margin-bottom:20px;
  }
  .field-row{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:14px;
  }
  .field{
    flex:1;
    min-width:140px;
  }
  .field label{
    display:block;
    font-size:0.82rem;
    font-weight:600;
    margin-bottom:6px;
    color:var(--text-dim);
  }
  .field input, .field select{
    width:100%;
    padding:10px 12px;
    border:1px solid var(--line);
    border-radius:6px;
    font-size:0.95rem;
    font-family:inherit;
  }
  textarea{
    width:100%;
    min-height:140px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:6px;
    font-size:0.95rem;
    font-family:inherit;
    resize:vertical;
  }
  .btn{
    background:var(--ink);
    color:var(--paper);
    border:none;
    padding:11px 22px;
    border-radius:6px;
    font-weight:700;
    font-size:0.92rem;
    cursor:pointer;
    transition:background .15s;
  }
  .btn:hover{background:var(--ink-2);}
  .btn-amber{background:var(--amber);color:var(--ink);}
  .btn-amber:hover{background:var(--amber-dark);}
  .btn-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}

  .result-box{
    margin-top:18px;
    padding:16px;
    background:var(--paper-dim);
    border-left:4px solid var(--amber);
    border-radius:4px;
    font-size:0.95rem;
    display:none;
  }
  .result-box.show{display:block;}
  .stat-row{
    display:flex;
    gap:24px;
    flex-wrap:wrap;
    margin-top:12px;
  }
  .stat{
    background:var(--paper-dim);
    padding:10px 16px;
    border-radius:6px;
    text-align:center;
    min-width:80px;
  }
  .stat .num{font-size:1.3rem;font-weight:800;color:var(--ink);}
  .stat .lbl{font-size:0.72rem;color:var(--text-dim);text-transform:uppercase;letter-spacing:0.03em;}

  img.preview{max-width:100%;border-radius:6px;margin-top:12px;border:1px solid var(--line);}

  /* ---------- FAQ ---------- */
  .faq-item{
    border-bottom:1px solid var(--line);
    padding:14px 0;
  }
  .faq-item h4{font-size:0.95rem;font-weight:700;margin-bottom:6px;}
  .faq-item p{font-size:0.88rem;color:var(--text-dim);}

  /* ---------- FOOTER ---------- */
  footer{
    background:var(--ink);
    color:#B9BECC;
    padding:40px 24px 24px;
    margin-top:40px;
  }
  .footer-inner{
    max-width:1100px;
    margin:0 auto;
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:24px;
  }
  .footer-col h5{
    color:var(--paper);
    font-size:0.9rem;
    margin-bottom:10px;
  }
  .footer-col a{
    display:block;
    font-size:0.85rem;
    padding:4px 0;
    color:#B9BECC;
  }
  .footer-col a:hover{color:var(--amber);}
  .footer-bottom{
    max-width:1100px;
    margin:24px auto 0;
    padding-top:20px;
    border-top:1px solid #2A3B63;
    font-size:0.8rem;
    text-align:center;
    color:#7E86A0;
  }

  @media (max-width:600px){
    .hero h1{font-size:1.7rem;}
    .search-box{flex-direction:column;}
    .search-box button{padding:12px;}
  }

  .p2j-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:12px;}
  .p2j-item{border:1px solid var(--line);border-radius:8px;padding:8px;text-align:center;font-size:0.82rem;}
  .p2j-item img{width:100%;height:150px;object-fit:contain;background:#f4f4f4;border-radius:4px;margin-bottom:6px;}
  .p2j-item .btn{padding:6px 10px;font-size:0.8rem;margin-top:6px;}
  .pg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;margin:10px 0;max-height:60vh;overflow:auto;padding:6px;background:#eceae2;border-radius:8px;}
  .pg-cell{cursor:pointer;text-align:center;}
  .pg-box{height:150px;display:flex;align-items:center;justify-content:center;background:#fff;border:2px solid transparent;border-radius:6px;overflow:hidden;}
  .pg-box img{max-width:100%;max-height:100%;transition:transform .15s;}
  .pg-cell.sel .pg-box{border-color:#2d7ff9;box-shadow:0 0 0 2px #2d7ff9 inset;}
  #pgRoot[data-mode=delete] .pg-cell.sel .pg-box{border-color:#c0392b;box-shadow:0 0 0 2px #c0392b inset;background:#fdeaea;}
  .pg-lbl{font-size:0.78rem;color:var(--text-dim);margin-top:3px;}
  .cl-thumbs{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;}
  .cl-th{position:relative;width:72px;height:72px;}
  .cl-th img{width:100%;height:100%;object-fit:cover;border-radius:6px;border:1px solid var(--line);}
  .cl-th button{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:none;background:#c0392b;color:#fff;cursor:pointer;padding:0;line-height:1;}
  .cl-th button.cl-l{right:auto;left:-6px;background:var(--ink);}
  .rd-pages{max-height:70vh;overflow:auto;background:#5b6270;padding:10px;border-radius:8px;}
  .rd-page canvas{max-width:100%;height:auto;cursor:crosshair;touch-action:none;display:block;margin:0 auto 10px;background:#fff;}
  .rr-area,.iv-area{margin-top:14px;}
  .rr-rec{border:1.5px solid #333;padding:14px 18px;margin:10px 0;page-break-inside:avoid;font-size:14px;line-height:1.55;background:#fff;color:#000;}
  .rr-h{text-align:center;font-weight:800;letter-spacing:.1em;border-bottom:1px solid #333;padding-bottom:6px;margin-bottom:8px;font-size:16px;}
  .rr-no{font-size:12px;margin-bottom:6px;}
  .rr-sign{display:flex;justify-content:space-between;align-items:flex-end;margin-top:12px;font-size:13px;}
  .rr-stamp{border:1px dashed #888;width:84px;height:58px;font-size:10px;color:#888;display:flex;align-items:center;justify-content:center;text-align:center;}
  .iv-edit{overflow-x:auto;}
  table.iv-in{border-collapse:collapse;width:100%;min-width:560px;}
  table.iv-in th{text-align:left;font-size:0.8rem;padding:4px;}
  table.iv-in td{padding:3px;}
  table.iv-in input{padding:7px 8px;border:1.5px solid var(--line);border-radius:6px;font:inherit;width:100%;background:#fff;}
  .iv-doc{border:1px solid #999;padding:18px;background:#fff;color:#000;font-size:13px;line-height:1.5;}
  .iv-top{display:flex;justify-content:space-between;gap:16px;margin-bottom:12px;}
  .iv-title{font-size:1.3rem;font-weight:800;margin-bottom:6px;}
  .iv-bill{margin-bottom:12px;}
  table.iv-t{width:100%;border-collapse:collapse;}
  table.iv-t th,table.iv-t td{border:1px solid #999;padding:6px;text-align:left;}
  table.iv-t th{background:#eee;}
  table.iv-s{margin:10px 0 10px auto;border-collapse:collapse;min-width:260px;}
  table.iv-s td{padding:4px 8px;border-bottom:1px solid #ddd;} table.iv-s td:last-child{text-align:right;}
  table.iv-s tr.iv-g td{border-top:2px solid #333;}
  .iv-sign{margin-top:24px;text-align:right;}
  @media print{
    body.print-rr header,body.print-rr footer,body.print-rr main>:not(.tool-panel),body.print-rr .tool-panel>:not(#rrArea),
    body.print-iv header,body.print-iv footer,body.print-iv main>:not(.tool-panel),body.print-iv .tool-panel>:not(#ivArea){display:none!important;}
    body.print-rr .page,body.print-iv .page{padding:0;max-width:none;}
    body.print-rr .tool-panel,body.print-iv .tool-panel{border:none;padding:0;box-shadow:none;}
  }

  .field textarea{width:100%;padding:10px 12px;border:1.5px solid var(--line);border-radius:6px;font:inherit;background:#fff;resize:vertical;}
  .qr-out{margin-top:14px;}
  .qr-out canvas{max-width:100%;height:auto;border:1px solid var(--line);border-radius:4px;display:block;image-rendering:pixelated;}
  .qr-info{font-size:0.82rem;color:var(--text-dim);margin-top:6px;}
  .pe-toolbar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:14px 0 8px;}
  .pe-b{background:var(--paper-dim);border:1px solid var(--line);padding:8px 12px;border-radius:6px;font:inherit;font-weight:600;font-size:0.85rem;cursor:pointer;color:var(--ink);}
  .pe-b:hover{border-color:var(--ink);} .pe-b.on{background:var(--ink);color:#fff;border-color:var(--ink);} .pe-b:disabled{opacity:.45;cursor:default;}
  .pe-sep{width:1px;height:24px;background:var(--line);margin:0 4px;} .pe-zoom{font-size:0.85rem;min-width:44px;text-align:center;}
  .pe-opts{display:flex;flex-wrap:wrap;gap:14px;align-items:center;font-size:0.85rem;margin-bottom:10px;}
  .pe-opts label{display:flex;gap:6px;align-items:center;} .pe-optgrp{display:flex;gap:14px;align-items:center;}
  .pe-opts select,.pe-opts input[type=number]{padding:5px 8px;border:1.5px solid var(--line);border-radius:6px;font:inherit;}
  .pe-opts input[type=color]{width:36px;height:28px;padding:1px;border:1px solid var(--line);border-radius:4px;background:#fff;}
  .pe-hint{color:var(--text-dim);}
  #pePages{max-height:76vh;overflow:auto;background:#5b6270;padding:12px;border-radius:8px;}
  .pe-page{position:relative;margin:0 auto 14px;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.35);}
  .pe-page canvas{display:block;}
  .pe-ov{position:absolute;left:0;top:0;right:0;bottom:0;}
  .pe-svg{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;overflow:visible;}
  polyline.pe-draw{pointer-events:stroke;cursor:pointer;} polyline.sel{filter:drop-shadow(0 0 2px #2d7ff9);}
  #pePages[data-tool=text] .pe-ov{cursor:text;}
  #pePages[data-tool=hl] .pe-ov,#pePages[data-tool=wo] .pe-ov,#pePages[data-tool=draw] .pe-ov{cursor:crosshair;touch-action:none;}
  .pe-el{position:absolute;box-sizing:border-box;touch-action:none;}
  .pe-el.sel{outline:1.5px dashed #2d7ff9;}
  .pe-text .pe-tx{white-space:pre;line-height:1.2;outline:none;min-width:1ch;cursor:text;touch-action:auto;}
  .pe-hd{position:absolute;left:-1px;top:-18px;height:18px;padding:0 7px;background:#2d7ff9;color:#fff;font-size:12px;line-height:18px;cursor:move;display:none;border-radius:3px 3px 0 0;touch-action:none;user-select:none;}
  .pe-text.sel .pe-hd,.pe-text:hover .pe-hd{display:block;}
  .pe-image img{width:100%;height:100%;display:block;pointer-events:none;user-select:none;}
  .pe-hl{mix-blend-mode:multiply;cursor:move;} .pe-wo{cursor:move;} .pe-image{cursor:move;} .pe-ghost{pointer-events:none;opacity:.55;}
  .pe-rs{position:absolute;right:-7px;bottom:-7px;width:14px;height:14px;background:#2d7ff9;border-radius:50%;cursor:nwse-resize;display:none;touch-action:none;}
  .pe-del{position:absolute;right:-11px;top:-13px;width:24px;height:24px;border-radius:50%;border:none;background:#c0392b;color:#fff;cursor:pointer;display:none;line-height:1;font-size:16px;padding:0;}
  .pe-el.sel>.pe-rs,.pe-el.sel>.pe-del{display:block;}
  .pe-num{position:absolute;right:6px;bottom:4px;font-size:11px;color:#777;background:rgba(255,255,255,.85);padding:1px 7px;border-radius:8px;pointer-events:none;}
  a.tool-card{color:inherit;}
  .logo{display:inline-block;}
  input[type=file]{font-family:inherit;font-size:0.9rem;max-width:100%;}
  input[type=file]::file-selector-button{background:var(--ink);color:var(--paper);border:none;padding:10px 18px;border-radius:6px;font-weight:700;font-size:0.9rem;font-family:inherit;cursor:pointer;margin-right:12px;}
  input[type=file]::file-selector-button:hover{background:var(--ink-2);}
  .page{max-width:820px;margin:0 auto;padding:28px 24px 8px;}
  .crumbs{font-size:0.82rem;color:var(--text-dim);margin-bottom:14px;}
  .crumbs a{color:var(--ink);text-decoration:underline;text-underline-offset:2px;}
  .page h1{font-size:1.9rem;font-weight:800;letter-spacing:-0.02em;line-height:1.2;margin-bottom:12px;color:var(--ink);}
  .page .lead{font-size:1.02rem;color:var(--text-dim);margin-bottom:24px;max-width:68ch;}
  .page h2{font-size:1.25rem;font-weight:800;margin:34px 0 12px;color:var(--ink);}
  .page h3{font-size:0.98rem;font-weight:700;margin-bottom:6px;}
  .prose p{max-width:68ch;font-size:0.95rem;color:#333;margin-bottom:12px;}
  ol.steps{padding-left:22px;max-width:68ch;}
  ol.steps li{margin-bottom:8px;font-size:0.95rem;}
  .related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;}
  .tool-panel{margin-bottom:8px;}
  .tool-panel .btn-row:first-child{margin-top:0;}
  .home-section{max-width:1100px;margin:0 auto;padding:40px 24px 8px;}
  .no-results{display:none;text-align:center;color:var(--text-dim);padding:24px;}
  .footer-col a{padding:3px 0;}
  .sched-wrap{margin-top:12px;max-height:340px;overflow:auto;border:1px solid var(--line);border-radius:6px;}
  table.sched{width:100%;border-collapse:collapse;font-size:0.82rem;}
  table.sched th,table.sched td{padding:7px 10px;text-align:right;border-bottom:1px solid var(--line);white-space:nowrap;}
  table.sched th:first-child,table.sched td:first-child{text-align:left;}
  table.sched thead th{position:sticky;top:0;background:var(--paper-dim);}
  .field select,.field input{background:#fff;}
  :focus-visible{outline:3px solid var(--amber);outline-offset:2px;}
  .search-box input:focus-visible{outline:none;}
  @media (max-width:600px){.page h1{font-size:1.5rem;}}
