:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;color:#17243a;background:#f5f7fb}*{box-sizing:border-box}body{margin:0}.wrap{width:min(1120px,92%);margin:auto}.hero{padding:34px 0 30px;background:linear-gradient(135deg,#eef4fb,#fbfcfe)}.eyebrow{font-weight:800;color:#285f9e;letter-spacing:.08em}.hero h1{font-size:clamp(30px,5vw,44px);margin:.15em 0}.lead{font-size:15px;color:#53657a;margin:8px 0 0}.panel,.notice{background:#fff;border:1px solid #dbe3ed;border-radius:20px;padding:24px;margin:28px 0;box-shadow:0 10px 30px rgba(31,66,112,.06)}h2{margin-top:38px}.drop{display:block;border:2px dashed #9ab6d6;border-radius:16px;padding:30px;text-align:center;background:#f8fbff;cursor:pointer}.drop input{display:none}.drop span{font-weight:800}.result{margin-top:18px;padding:18px;border-radius:12px;background:#f3f6fa;white-space:pre-wrap;line-height:1.65}.muted{color:#718096}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:16px}.card{background:#fff;border:1px solid #dbe3ed;border-radius:18px;padding:20px}.card h3{margin-top:0}.card input,.card select,.toolbar input,.toolbar select{width:100%;padding:10px;border:1px solid #ccd8e6;border-radius:10px;margin:7px 0}.mini{display:flex;gap:8px}.split-buttons,.toolbar{display:flex;gap:8px;flex-wrap:wrap}.toolbar>*{flex:1 1 145px}.toolbar button{width:auto}.section-note,.hint{color:#596b80}button{border:0;border-radius:12px;background:#2f6fb3;color:#fff;font-weight:800;padding:12px 15px;cursor:pointer;width:100%}button:hover{filter:brightness(.95)}button.secondary{background:#6c7d91}.canvas-wrap{overflow:auto;background:#dce4e1;border-radius:14px;padding:14px;margin:12px 0}#editCanvas{display:block;max-width:100%;background:white;margin:auto;touch-action:none}.roadmap{display:flex;flex-wrap:wrap;gap:9px}.roadmap span{padding:8px 12px;background:#edf2f8;border-radius:999px;color:#40566f}.status{min-height:24px;font-weight:700}.notice strong{color:#245f9c}footer{margin-top:50px;padding:28px 0;background:#172b45;color:#d8e2ee}
.drop.compact{padding:16px;margin:8px 0 12px}.drop.compact small{font-weight:500;color:#718096}.drop.dragover{border-color:#2f6fb3;background:#edf5ff;transform:translateY(-1px)}

.privacy-fact{display:flex;gap:16px;align-items:center;margin:24px 0;padding:14px 18px;border:1px solid #cbd9e8;border-radius:14px;background:#f7faff}
.privacy-fact strong{color:#245f9c;white-space:nowrap}.privacy-fact span{color:#53657a;font-size:14px}
@media(max-width:640px){.privacy-fact{display:block}.privacy-fact strong,.privacy-fact span{display:block}.privacy-fact span{margin-top:5px}}
.mini-result{font-size:13px;color:#53657a;margin:8px 0;min-height:18px}
.tool-group{margin:18px 0;border:1px solid #dbe3ed;border-radius:14px;background:#fff;overflow:hidden}
.tool-group>summary{list-style:none;cursor:pointer;font-size:21px;font-weight:700;padding:17px 20px;color:#17243a;display:flex;align-items:center;justify-content:space-between;user-select:none}
.tool-group>summary::-webkit-details-marker{display:none}
.tool-group>summary::after{content:'＋';font-size:23px;font-weight:400;color:#53657a}
.tool-group[open]>summary::after{content:'－'}
.tool-group>summary:hover{background:#f7f9fc}
.tool-group>.grid,.tool-group>.panel,.tool-group>.section-note,.tool-group>p{margin-left:18px;margin-right:18px}
.tool-group>.grid{margin-bottom:18px}
.tool-group>.panel{margin-top:0;margin-bottom:18px}
@media(max-width:640px){.tool-group>summary{font-size:19px;padding:15px 16px}.tool-group>.grid,.tool-group>.panel,.tool-group>.section-note,.tool-group>p{margin-left:12px;margin-right:12px}}

/* PC優先: 開閉UIを明確化 */
.tool-group>summary{gap:16px;border-bottom:0}
.tool-group>summary small{margin-left:auto;font-size:12px;font-weight:500;color:#718096}
.tool-group[open]>summary{border-bottom:1px solid #e3e9f0;background:#f8fafc}
.tool-group[open]>summary small{font-size:0}
.tool-group[open]>summary small::after{content:'クリックして閉じる';font-size:12px}
.tool-group:not([open])>summary small{font-size:0}
.tool-group:not([open])>summary small::after{content:'クリックして開く';font-size:12px}
.tool-group>summary::after{margin-left:6px;min-width:24px;text-align:center}

/* カード内の実行ボタンを下端に揃える */
.grid{align-items:stretch}
.card{display:flex;flex-direction:column;height:100%}
.card>button,.card>.card-actions{margin-top:auto}
.card .split-buttons.card-actions{display:flex;gap:8px}
.card .split-buttons.card-actions button{flex:1}
@media(min-width:900px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1250px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.tool-group>summary{background:#eef4fb;color:#245f9c;margin-bottom:0}
.tool-group[open]>summary{background:#e8f0fa;border-bottom:1px solid #cbd9e8}
.tool-group[open]>.grid,.tool-group[open]>.panel,.tool-group[open]>.section-note,.tool-group[open]>p{margin-top:22px}
.form-row{display:flex;gap:8px;align-items:center}
.form-row>*{flex:1;min-width:0}
.card select{width:100%;padding:10px;border:1px solid #ccd8e6;border-radius:10px;margin:7px 0;background:white}
@media(max-width:700px){.form-row{display:block}}
.edit-subtools{margin:10px 0 14px;padding:12px;border:1px solid #dbe3ed;border-radius:12px;background:#f8fafc}
#signatureCanvas{display:block;width:100%;max-width:520px;height:150px;background:white;border:1px solid #aebdce;border-radius:8px;touch-action:none}
.button-link{display:block;margin-top:auto;padding:11px 14px;border-radius:10px;background:#285f9e;color:#fff;text-align:center;text-decoration:none;font-weight:700}
.button-link:hover{background:#24568f}
.coming-soon{display:block;margin-top:auto;padding:10px 12px;border:1px solid #dbe3ed;border-radius:10px;background:#f5f7fb;color:#718096;text-align:center;font-size:13px}
.editor-page{padding-top:22px}.back-link{display:inline-block;margin-bottom:14px;color:#285f9e;text-decoration:none;font-weight:600}.editor-hero{padding-bottom:22px}
@media(min-width:900px){.edit-main-card{grid-column:span 2}.edit-main-card h3{font-size:22px}.edit-main-card p{max-width:620px}}
.editor-tools{margin:14px 0}.mode-buttons{display:flex;gap:6px;flex-wrap:wrap;padding:8px;background:#eef3f8;border-radius:10px}.mode-buttons button{margin:0;background:#fff;color:#40566f;border:1px solid #ccd8e6;box-shadow:none}.mode-buttons button.active{background:#285f9e;color:#fff;border-color:#285f9e}.mode-select{display:none}.tool-options{margin-top:10px}.page-controls{display:flex;gap:8px;align-items:center;margin-top:10px}.page-controls label{display:flex;align-items:center;gap:6px}.page-controls input{width:70px;margin:0}.editor-save{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.editor-save button{width:auto;min-width:150px}.canvas-wrap{margin-top:12px}
@media(max-width:700px){.mode-buttons{display:none}.mode-select{display:block;width:100%}.page-controls{flex-wrap:wrap}.editor-save{display:block}.editor-save button{width:100%;margin-top:8px}}
.editor-drop-zone{cursor:pointer}.editor-drop-zone.dragover{border-color:#285f9e;background:#edf5ff;box-shadow:0 0 0 3px rgba(40,95,158,.08)}
/* PDF編集: PCは左PDF・右ツール */
.mode-buttons.one-line{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin:12px 0 16px;padding:6px;background:#eef3f8;border-radius:10px}.mode-buttons.one-line button{margin:0;background:#fff;color:#40566f;border:1px solid #ccd8e6;box-shadow:none;padding:10px 8px}.mode-buttons.one-line button.active{background:#285f9e;color:#fff;border-color:#285f9e}.editor-workspace{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}.pdf-pane{min-width:0}.pdf-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px}.page-controls,.undo-controls{display:flex;gap:7px;align-items:center}.page-controls button,.undo-controls button{width:auto;padding:8px 12px}.page-controls input{width:64px;margin:0;padding:7px}.canvas-wrap{height:760px;display:flex;align-items:flex-start;justify-content:center;overflow:auto;background:#e9eef4;padding:12px}.editor-sidebar{position:sticky;top:14px;border:1px solid #dbe3ed;border-radius:14px;background:#fff;padding:16px}.editor-sidebar h3{margin:0 0 12px}.editor-sidebar label{display:block;font-size:13px;font-weight:600;margin-bottom:10px}.editor-sidebar input,.editor-sidebar select{width:100%;padding:10px;border:1px solid #ccd8e6;border-radius:9px;margin-top:5px;background:#fff}.editor-sidebar .save-edit{margin-top:14px}.edit-subtools{padding:0;border:0;background:transparent;margin:0}.mode-select{display:none}
@media(max-width:900px){.editor-workspace{display:block}.editor-sidebar{position:static;margin-top:12px}.canvas-wrap{height:auto;max-height:none}.pdf-toolbar{flex-wrap:wrap}.mode-buttons.one-line{grid-template-columns:repeat(3,1fr)}}
@media(max-width:640px){.mode-buttons.one-line{display:none}.mode-select{display:block;width:100%;margin:10px 0}.canvas-wrap{padding:8px}.pdf-toolbar{display:block}.undo-controls{margin-top:8px}.editor-sidebar{padding:12px}}
/* 編集ページはPCで1画面に収める */
@media(min-width:901px){
  body:has(.editor-page){overflow:hidden;height:100vh;background:#f5f7fb}
  .editor-topbar{height:46px;background:#fff;border-bottom:1px solid #dbe3ed;display:flex;align-items:center}
  .editor-topbar-inner{display:flex;align-items:center;gap:16px;height:100%}
  .editor-topbar strong{font-size:18px;color:#17243a}
  .editor-topbar span{font-size:12px;color:#718096}
  .topbar-back{margin-left:auto;color:#285f9e;text-decoration:none;font-size:13px;font-weight:600}
  .editor-page{height:calc(100vh - 46px);padding-top:10px;padding-bottom:10px;display:flex;flex-direction:column;overflow:hidden}
  .editor-page>.panel.editor{flex:1;min-height:0;margin:0;padding:12px;display:flex;flex-direction:column}
  .editor-drop-zone{padding:10px;margin:0 0 8px;flex:0 0 auto}
  .mode-buttons.one-line{margin:0 0 8px;padding:5px;flex:0 0 auto}
  .editor-workspace{flex:1;min-height:0;grid-template-columns:minmax(0,1fr) 300px;gap:12px}
  .pdf-pane{display:flex;flex-direction:column;min-height:0}
  .pdf-toolbar{flex:0 0 auto;margin-bottom:6px}
  .canvas-wrap{flex:1;min-height:0;height:auto;max-height:none;padding:8px;overflow:auto}
  .editor-sidebar{position:static;max-height:100%;overflow:auto;padding:12px}
  .editor-sidebar h3{margin-bottom:8px}
  .status{flex:0 0 auto;margin:6px 0 0;min-height:18px;font-size:13px}
}
@media(max-width:900px){
  .editor-topbar{background:#fff;border-bottom:1px solid #dbe3ed;padding:10px 0}
  .editor-topbar-inner{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
  .editor-topbar span{font-size:12px;color:#718096}.topbar-back{margin-left:auto;color:#285f9e;text-decoration:none}
}
/* PDF編集: PDF表示を最大化 */
@media(min-width:901px){
  .editor-drop-zone{padding:6px 10px;margin-bottom:6px;min-height:42px;display:flex;align-items:center;justify-content:center}
  .editor-drop-zone span{font-size:14px;line-height:1.25}
  .editor-drop-zone small{font-size:11px}
  .mode-buttons.one-line{margin-bottom:6px;padding:4px}
  .mode-buttons.one-line button{padding:8px 6px}
  .editor-workspace{grid-template-columns:minmax(0,1fr) 300px;gap:10px;min-height:0}
  .pdf-toolbar{margin-bottom:4px}
  .pdf-toolbar button{padding:6px 10px}
  .canvas-wrap{padding:6px;align-items:center;justify-content:center}
  #editCanvas{max-width:none;max-height:none}
}
/* PC: 左半分をPDF、右半分を編集ツール */
@media(min-width:901px){
  .editor-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
  .pdf-pane{min-width:0;height:100%}
  .canvas-wrap{height:100%;min-height:0;display:flex;align-items:center;justify-content:center}
  .editor-sidebar{height:100%;max-height:100%;overflow:auto;padding:14px 16px}
  .editor-sidebar .mode-buttons.one-line{grid-template-columns:repeat(3,1fr);margin:0 0 12px}
  .editor-sidebar .mode-buttons.one-line button{padding:9px 6px}
  .editor-sidebar .mode-select{display:none}
}
/* PC: 左半分をPDF、右半分を編集ツール */
@media(min-width:901px){
  .editor-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
  .pdf-pane{min-width:0;height:100%}
  .canvas-wrap{height:100%;min-height:0;display:flex;align-items:center;justify-content:center}
  .editor-sidebar{height:100%;max-height:100%;overflow:auto;padding:14px 16px}
  .editor-sidebar .mode-buttons.one-line{grid-template-columns:repeat(3,1fr);margin:0 0 12px}
  .editor-sidebar .mode-buttons.one-line button{padding:9px 6px}
  .editor-sidebar .mode-select{display:none}
}
@media(min-width:901px){
  
  
  
  
  .canvas-wrap{padding:2px;background:#e9eef4}
  .pdf-pane{margin:0;padding:0}
  #editCanvas{display:block;margin:0 auto}
}
@media(min-width:901px){
  .editor-sidebar .editor-drop-zone{margin:0 0 10px;padding:8px 10px;min-height:48px}
  .editor-sidebar .editor-drop-zone span{font-size:13px;line-height:1.25}
  .editor-sidebar .editor-drop-zone small{font-size:11px}
}
@media(min-width:901px){
  .canvas-wrap{padding:0;background:#e9eef4}
  .pdf-pane{padding:0;margin:0}
  #editCanvas{margin:0;display:block}
}
.labeled-mini{display:grid;grid-template-columns:1fr 1fr;gap:8px}.labeled-mini label{font-size:12px;color:#53657a;font-weight:600}.labeled-mini input{width:100%;margin-top:5px}
.detail-page{padding-top:20px}.detail-panel{max-width:860px;margin:0 auto}.detail-form{margin-top:18px}.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.detail-grid .wide{grid-column:1/-1}.detail-grid label{font-size:13px;font-weight:600;color:#53657a}.detail-grid input,.detail-grid select{width:100%;margin-top:6px;padding:10px;border:1px solid #ccd8e6;border-radius:9px;background:#fff}.preview-box{margin:14px 0;background:#f5f7fb;border:1px solid #dbe3ed;border-radius:12px;padding:10px}.preview-box canvas{display:block;width:100%;height:auto;background:#fff;border-radius:8px}@media(max-width:700px){.detail-grid{grid-template-columns:1fr}.detail-grid .wide{grid-column:auto}}
.font-sample{margin:14px 0;padding:10px 12px;border:1px solid #dbe3ed;border-radius:10px;background:#f8fafc}.font-sample strong{display:block;font-size:13px;margin-bottom:6px}.font-sample canvas{display:block;width:100%;height:auto;background:#fff;border-radius:7px}.pdf-preview-section{margin-top:22px}.pdf-preview-section h2{font-size:18px;margin-bottom:4px}.pdf-preview-section h2 small{font-size:12px;color:#718096}.pdf-preview-wrap{display:flex;justify-content:center;align-items:flex-start;max-height:640px;overflow:auto;padding:10px;background:#e9eef4;border-radius:12px}.pdf-preview-wrap canvas{display:block;max-width:100%;height:auto;background:white;box-shadow:0 1px 5px rgba(0,0,0,.12)}
@media(min-width:901px){.detail-panel{max-width:1240px}.detail-workspace{display:grid;grid-template-columns:minmax(360px,.9fr) minmax(0,1.1fr);gap:22px;align-items:start}.detail-controls{min-width:0}.pdf-preview-section{margin-top:18px;position:sticky;top:12px}.pdf-preview-wrap{max-height:72vh}.detail-form{margin-top:18px}}
@media(max-width:900px){.detail-workspace{display:block}.pdf-preview-section{margin-top:22px}}
#pnSizeCustom{margin-top:7px}
.detail-drop{margin-bottom:14px}.preview-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.preview-title-row h2{margin:0}.preview-page-nav{display:flex;align-items:center;gap:8px}.preview-page-nav button{width:auto;padding:7px 12px}.preview-page-nav span{min-width:58px;text-align:center;font-size:13px;font-weight:600;color:#53657a}#wmSizeCustom,#wmOpacityCustom{margin-top:7px}
@media(min-width:901px){
  .detail-hero{padding:18px 0 16px}
  .detail-hero h1{font-size:32px;margin:.1em 0}
  .detail-page{padding-top:10px}
  .detail-page>.back-link{margin-bottom:8px}
  .detail-panel{margin-top:8px;padding:18px}
  .detail-workspace{align-items:start}
  .pdf-preview-section{margin-top:0;top:8px}
  .pdf-preview-wrap{height:calc(100vh - 330px);max-height:none;overflow:hidden;padding:6px;align-items:center}
  .pdf-preview-wrap canvas{max-height:100%;max-width:100%;width:auto;height:auto;object-fit:contain}
}
@media(min-width:901px){
  .detail-hero{padding:18px 0 16px}
  .detail-hero h1{font-size:32px;margin:.1em 0}
  .detail-page{padding-top:10px}
  .detail-page>.back-link{margin-bottom:8px}
  .detail-panel{margin-top:8px;padding:18px}
  .detail-workspace{align-items:start}
  .pdf-preview-section{margin-top:0;top:8px}
  .pdf-preview-wrap{height:calc(100vh - 330px);max-height:none;overflow:hidden;padding:6px;align-items:center}
  .pdf-preview-wrap canvas{max-height:100%;max-width:100%;width:auto;height:auto;object-fit:contain}
}
.detail-subsection{margin-top:22px;padding-top:18px;border-top:1px solid #d8e2ee}.detail-subsection>h3{margin:0 0 4px;font-size:20px}
.bookmark-preview{margin:12px 0;padding:12px;border:1px solid #dbe3ed;border-radius:10px;background:#f8fafc;max-height:220px;overflow:auto;white-space:pre-line;font-size:13px;line-height:1.7}
.bookmark-preview{margin:12px 0;padding:12px;border:1px solid #dbe3ed;border-radius:10px;background:#f8fafc;max-height:220px;overflow:auto;white-space:pre-line;font-size:13px;line-height:1.7}
.diagnose-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.diagnose-actions button{width:auto}.diagnose-actions .secondary-action{background:#eef4fb;color:#245f9c;border:1px solid #cbd9e8}
.legal-page{max-width:900px;padding:36px 0 70px}.legal-page h1{margin-top:24px}.legal-page h2{font-size:20px;margin-top:30px}.legal-page p,.legal-page li{line-height:1.8}.legal-table{width:100%;border-collapse:collapse;margin:18px 0}.legal-table th,.legal-table td{border:1px solid #dbe3ed;padding:10px;text-align:left;vertical-align:top}.legal-links{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px}.legal-links a{color:inherit;display:inline-flex;align-items:center;min-height:40px;padding:4px 2px}
.editor-heading{min-width:0}.editor-heading h1{font-size:20px;line-height:1.2;margin:0;color:#17243a}.editor-heading p{font-size:12px;line-height:1.4;margin:3px 0 0;color:#596b80}.editor-privacy{font-weight:700;color:#245f9c}.active-tool-heading{display:flex;align-items:center;gap:8px;margin:4px 0 8px}.active-tool-heading span{font-size:11px;font-weight:800;color:#245f9c;background:#e8f0fa;border-radius:999px;padding:4px 8px}.active-tool-heading h2{font-size:19px;margin:0}.tool-next-step{border-left:3px solid #2f6fb3;background:#f4f8fd;padding:9px 10px;border-radius:0 8px 8px 0;color:#40566f;font-weight:600;line-height:1.45}.mode-buttons.one-line button{min-height:44px}.editor-sidebar input,.editor-sidebar select{min-height:44px}.sidebar-page-controls button,.undo-controls button{min-height:40px}.save-edit{min-height:48px;font-size:15px}
@media(min-width:901px){.editor-topbar{height:62px}.editor-page{height:calc(100vh - 62px)}.editor-topbar-inner{gap:18px}.editor-privacy{margin-left:auto;font-size:12px}.topbar-back{white-space:nowrap}.editor-heading{max-width:470px}}
@media(max-width:900px){.editor-topbar-inner{align-items:flex-start}.editor-heading{flex:1 1 100%;order:0}.editor-privacy{order:1;font-size:12px}.topbar-back{order:2}.editor-page{padding-top:12px}.editor-sidebar{overflow:visible}.mode-select{min-height:48px}.page-controls button,.undo-controls button{min-height:44px}.page-controls input{min-height:44px}.editor-drop-zone{min-height:64px;padding:12px}.editor-sidebar input,.editor-sidebar select{font-size:16px}.save-edit{min-height:52px}}
@media(max-width:640px){.wrap{width:min(94%,1120px)}.editor-topbar{padding:10px 0}.editor-heading h1{font-size:22px}.editor-heading p{font-size:13px}.editor-privacy{flex:1 1 100%;padding:7px 9px;background:#eef6ff;border-radius:8px}.topbar-back{margin-left:0}.editor-sidebar{padding:12px 10px}.mode-select{margin:10px 0 14px}.active-tool-heading{margin-top:2px}.form-row button{min-height:46px;margin-top:7px}#signatureCanvas{height:140px}.legal-links{gap:10px}}
.editor-heading{min-width:0}.editor-heading h1{font-size:20px;line-height:1.2;margin:0;color:#17243a}.editor-heading p{font-size:12px;line-height:1.4;margin:3px 0 0;color:#596b80}.editor-privacy{font-weight:700;color:#245f9c}.active-tool-heading{display:flex;align-items:center;gap:8px;margin:4px 0 8px}.active-tool-heading span{font-size:11px;font-weight:800;color:#245f9c;background:#e8f0fa;border-radius:999px;padding:4px 8px}.active-tool-heading h2{font-size:19px;margin:0}.tool-next-step{border-left:3px solid #2f6fb3;background:#f4f8fd;padding:9px 10px;border-radius:0 8px 8px 0;color:#40566f;font-weight:600;line-height:1.45}.mode-buttons.one-line button{min-height:44px}.editor-sidebar input,.editor-sidebar select{min-height:44px}.sidebar-page-controls button,.undo-controls button{min-height:40px}.save-edit{min-height:48px;font-size:15px}
@media(min-width:901px){.editor-topbar{height:62px}.editor-page{height:calc(100vh - 62px)}.editor-topbar-inner{gap:18px}.editor-privacy{margin-left:auto;font-size:12px}.topbar-back{white-space:nowrap}.editor-heading{max-width:470px}}
@media(max-width:900px){.editor-topbar-inner{align-items:flex-start}.editor-heading{flex:1 1 100%;order:0}.editor-privacy{order:1;font-size:12px}.topbar-back{order:2}.editor-page{padding-top:12px}.editor-sidebar{overflow:visible}.mode-select{min-height:48px}.page-controls button,.undo-controls button{min-height:44px}.page-controls input{min-height:44px}.editor-drop-zone{min-height:64px;padding:12px}.editor-sidebar input,.editor-sidebar select{font-size:16px}.save-edit{min-height:52px}}
@media(max-width:640px){.wrap{width:min(94%,1120px)}.editor-topbar{padding:10px 0}.editor-heading h1{font-size:22px}.editor-heading p{font-size:13px}.editor-privacy{flex:1 1 100%;padding:7px 9px;background:#eef6ff;border-radius:8px}.topbar-back{margin-left:0}.editor-sidebar{padding:12px 10px}.mode-select{margin:10px 0 14px}.active-tool-heading{margin-top:2px}.form-row button{min-height:46px;margin-top:7px}#signatureCanvas{height:140px}.legal-links{gap:10px}}
.editor-heading h1{font-size:20px;margin:0}.editor-heading p{font-size:12px;margin:3px 0 0;color:#596b80}.editor-privacy{font-weight:700;color:#245f9c}.active-tool-heading{display:flex;align-items:center;gap:8px;margin:4px 0 8px}.active-tool-heading span{font-size:11px;font-weight:800;color:#245f9c;background:#e8f0fa;border-radius:999px;padding:4px 8px}.active-tool-heading h2{font-size:19px;margin:0}.tool-next-step{border-left:3px solid #2f6fb3;background:#f4f8fd;padding:9px 10px;border-radius:0 8px 8px 0;font-weight:600}.mode-buttons.one-line button,.editor-sidebar input,.editor-sidebar select{min-height:44px}.save-edit{min-height:48px;font-size:15px}
@media(min-width:901px){.editor-topbar{height:62px}.editor-page{height:calc(100vh - 62px)}.editor-privacy{margin-left:auto}.editor-heading{max-width:470px}}
@media(max-width:900px){.editor-heading{flex:1 1 100%}.editor-privacy{font-size:12px}.mode-select,.page-controls button,.undo-controls button,.page-controls input{min-height:44px}.editor-drop-zone{min-height:64px}.editor-sidebar input,.editor-sidebar select{font-size:16px}.save-edit{min-height:52px}}
@media(max-width:640px){.editor-heading h1{font-size:22px}.editor-heading p{font-size:13px}.editor-privacy{flex:1 1 100%;padding:7px 9px;background:#eef6ff;border-radius:8px}.form-row button{min-height:46px}}

/* 困りごと解決: カードをコンパクトにし、操作位置を揃える */
.trouble-grid{align-items:start}
.trouble-grid .card{height:auto;min-height:0}
.trouble-grid .card>button{margin-top:14px}
.trouble-grid .card .drop.compact{margin-bottom:8px}
.blank-card #blankResult{min-height:0;margin:4px 0 0}
.blank-card button[data-action="detect-blanks"]{margin-top:14px}
.blank-card #deleteBlankBtn{margin-top:8px}
@media(min-width:1250px){.trouble-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:900px) and (max-width:1249px){.trouble-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* 診断結果から各ツールへ移動するリンク風ボタン */
.diagnose-actions .secondary-action{background:#fff;color:#245f9c;border:1px solid #8fb0d4;text-decoration:none}
.diagnose-actions .secondary-action:hover{background:#eef5fc}

/* 詳細ツール: 困りごとカードは独立カードとして表示 */
.detail-subsection{margin-top:18px;padding-top:0;border-top:0}
.trouble-grid{gap:14px;margin-top:0!important}
.trouble-grid .card{border-radius:14px;padding:16px;box-shadow:none}

/* ヘッダー/フッターは個別に開閉 */
.hf-section{border:1px solid #dbe3ed;border-radius:12px;background:#fff;margin:10px 0;overflow:hidden}
.hf-section>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:13px 15px;background:#eef4fb;color:#245f9c;font-weight:700;user-select:none}
.hf-section>summary::-webkit-details-marker{display:none}
.hf-section>summary::after{content:'＋';margin-left:auto;font-size:20px;font-weight:400;color:#53657a}
.hf-section[open]>summary::after{content:'－'}
.hf-section>summary small{font-size:11px;font-weight:500;color:#718096;margin-left:auto}
.hf-section[open]>summary small{font-size:0}.hf-section[open]>summary small::after{content:'クリックして閉じる';font-size:11px}
.hf-section:not([open])>summary small{font-size:0}.hf-section:not([open])>summary small::after{content:'クリックして開く';font-size:11px}
.hf-section-body{padding:14px}
.hf-common{margin:12px 0}

/* 詳細ツール内の困りごと系カードも、上段カードと同じ外側余白に揃える */
.detail-subsection{margin:22px 18px 18px;padding-top:0;border-top:0}
.detail-subsection .trouble-grid{margin-left:0!important;margin-right:0!important;margin-bottom:0!important}
@media(max-width:640px){.detail-subsection{margin:18px 12px 12px}}

/* 詳細ツールのカード配置: 4 / 4 / 3 / 2 */
@media(min-width:900px){
  .trouble-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));align-items:stretch;gap:14px}
  .trouble-grid>.card{grid-column:span 3;height:100%;min-height:0;display:flex;flex-direction:column}
  .trouble-grid>.card:nth-child(n+5):nth-child(-n+7){grid-column:span 4}
  .trouble-grid>.card:nth-child(n+8){grid-column:span 6}
  .trouble-grid>.card>button{margin-top:auto;min-height:44px;height:44px;display:flex;align-items:center;justify-content:center}
  .trouble-grid>.card>.secondary{margin-top:8px}
  .trouble-grid>.card .drop.compact{min-height:80px;display:flex;align-items:center;justify-content:center}
  .trouble-grid>.card p{min-height:44px}
  .trouble-grid>.blank-card #blankResult{min-height:18px}
}
@media(max-width:899px){
  .trouble-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .trouble-grid>.card{height:100%}
  .trouble-grid>.card>button{min-height:44px}
}
@media(max-width:640px){.trouble-grid{grid-template-columns:1fr}}

/* 詳細ツール: PDF選択エリアの高さを統一 */
@media(min-width:900px){
  .trouble-grid .drop.compact{height:80px;min-height:80px;padding:12px 14px;display:flex;align-items:center;justify-content:center}
  .trouble-grid .drop.compact span{display:block}
}

/* 編集ツールの入力・印鑑・ページ操作: このブロックで管理 */
.editor-sidebar .sidebar-page-controls {
  display:grid;gap:8px;margin:0 0 12px;padding-bottom:12px;border-bottom:1px solid #e3e9f0;
}
.editor-sidebar .sidebar-page-controls .page-controls {
  display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:8px;margin:0;
}
.editor-sidebar .sidebar-page-controls .page-controls input {
  width:62px;min-height:44px;height:44px;margin:0;padding:6px;text-align:center;
}
.editor-sidebar .sidebar-page-controls .page-controls button {width:auto;min-height:44px;padding:8px 12px}
.editor-sidebar .sidebar-page-controls .page-controls span {white-space:nowrap;line-height:1}
.editor-sidebar .sidebar-page-controls .undo-controls {display:grid;grid-template-columns:1fr;gap:6px;margin:0}
.editor-sidebar .sidebar-page-controls .undo-controls button {width:100%;min-height:44px;padding:8px 12px}
.editor-sidebar .edit-subtools label {margin:0 0 12px;min-width:0;line-height:1.5}
.editor-sidebar .edit-subtools :is(input,select) {display:block;width:100%;min-width:0;margin:6px 0 0}
.editor-sidebar .edit-subtools input[type="file"] {display:none}
.editor-sidebar .edit-subtools input[type="range"] {padding:0;border:0;min-height:28px;height:28px;background:transparent}
.editor-sidebar .edit-subtools output {display:block;margin-top:2px;text-align:center;color:#245f9c;font-size:14px;font-weight:700}
.editor-sidebar .stamp-form,.editor-sidebar .text-format-row {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.editor-sidebar .stamp-size-control {margin-top:4px}
#stampPreview {display:block;width:100%;max-width:292px;height:auto;margin:8px auto 16px;padding:16px;background:#fff;border:1px solid #e3e7ec;border-radius:14px;box-shadow:0 3px 12px rgba(31,66,112,.05)}
.editor-sidebar .font-example {margin:0 0 12px;padding:10px 12px;background:#f8fafc;border:1px solid #e3e7ec;border-radius:8px;overflow-wrap:anywhere;font-size:18px}
@media(max-width:640px){.editor-sidebar .stamp-form,.editor-sidebar .text-format-row{grid-template-columns:1fr}}

/* 基本ツール: 選択枠とPCカードの整列をここで一元管理 */
.tool-group:first-of-type > .grid > .card .drop.compact {
  height:80px;
  min-height:80px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.tool-group:first-of-type > .grid > .card .drop.compact span {display:block}

/* 文言上のクリックも既存JSがbuttonとして受け取れるようにする。 */
.tool-group:first-of-type > .grid > .card > .card-actions > button > span {pointer-events:none}

/* スマホの既存の縦並びを維持し、圧縮ツールの間隔を調整 */
@media(max-width:899px) {
  #compressQuality {margin-bottom:12px}
  #compressStatus {min-height:0;margin:2px 0 4px}
  #compressBtn {margin-top:4px}
}

@media(min-width:900px) {
  /* 同じ横一列で7行を共有。内容に必要な高さだけ確保する。 */
  .tool-group:first-of-type > .grid {
    align-items:stretch;
    row-gap:0;
  }
  .tool-group:first-of-type > .grid > .card {
    display:grid;
    grid-row:span 7;
    grid-template-rows:subgrid;
    grid-template-columns:minmax(0,1fr);
    row-gap:0;
    height:auto;
    min-width:0;
    padding:16px;
    margin-bottom:16px;
  }
  .tool-group:first-of-type > .grid > .card > * {
    grid-column:1;
    min-width:0;
  }
  .tool-group:first-of-type > .grid > .card > h3 {
    grid-row:1;
    margin:0 0 10px;
    align-self:start;
  }
  .tool-group:first-of-type > .grid > .card > p {
    grid-row:2;
    margin:0 0 8px;
    align-self:start;
  }
  .tool-group:first-of-type > .grid > .card > .drop.compact {
    grid-row:3;
    margin:0 0 12px;
    align-self:start;
  }
  /* 4行目はページ番号のラベル用。実際の入力上端は5行目で共有。 */
  .tool-group:first-of-type > .grid > .card > :is(.page-spec,.page-order,.form-row,select,.mini-result) {
    grid-row:5;
    margin:0 0 8px;
    align-self:start;
  }
  .tool-group:first-of-type > .grid > .card :is(input:not([type="file"]),select) {
    height:38px;
    min-width:0;
    margin:0;
  }
  .tool-group:first-of-type > .grid > .card > :is(input,select) {margin-bottom:8px}
  /* 圧縮は選択欄の下に12px。空のステータス行は高さを持たせない。 */
  .tool-group:first-of-type > .grid > .card > #compressQuality {margin-bottom:12px}
  /* 指定順だけ入力欄を上寄せ。余白の合計は維持し、ボタン側に36px確保。 */
  .tool-group:first-of-type > .grid > .card > #reorderPages {
    grid-row:4 / 7;
    align-self:start;
    margin:0 0 36px;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini {
    grid-row:4 / 6;
    display:grid;
    grid-template-rows:subgrid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:8px;
    row-gap:0;
    margin:0 0 8px;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini > label {
    display:grid;
    grid-row:1 / 3;
    grid-template-rows:subgrid;
    row-gap:0;
    min-width:0;
    line-height:20px;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini input {grid-row:2}
  .tool-group:first-of-type > .grid > .card > #compressStatus {
    grid-row:6;
    min-height:0;
    margin:0;
  }
  .tool-group:first-of-type > .grid > .card > #compressStatus:not(:empty) {margin-bottom:8px}
  .tool-group:first-of-type > .grid > .card > :is(button,.card-actions) {
    grid-row:7;
    align-self:end;
    height:44px;
    min-height:44px;
    margin:0;
  }
  .tool-group:first-of-type > .grid > .card > .card-actions {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }
  .tool-group:first-of-type > .grid > .card > .card-actions > button {
    min-width:0;
    height:44px;
    min-height:44px;
    margin:0;
    padding:5px 4px;
    font-size:11px;
    line-height:1.3;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .tool-group:first-of-type > .grid > .card > .card-actions > button > span {
    display:block;
    white-space:nowrap;
    overflow-wrap:normal;
  }
}

/* PDF編集ページ操作: 前 1 / 8 次 1つ戻す このページをクリア を1列に整列 */
.editor-sidebar .sidebar-page-controls .page-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:nowrap;
  gap:8px;
}
.editor-sidebar .sidebar-page-controls .page-controls button,
.editor-sidebar .sidebar-page-controls .page-controls input,
.editor-sidebar .sidebar-page-controls .page-controls span{
  min-height:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
}
.editor-sidebar .sidebar-page-controls .page-controls #undoEdit,
.editor-sidebar .sidebar-page-controls .page-controls #clearEdit{
  width:auto;
  white-space:nowrap;
  flex:0 0 auto;
}
@media(max-width:640px){
  .editor-sidebar .sidebar-page-controls .page-controls{flex-wrap:wrap;justify-content:flex-start}
}

/* 2026-09-14: PDF編集とPDF診断の横余白を微調整 */
.editor-sidebar .sidebar-page-controls .page-controls #undoEdit{
  margin-left:4px;
  margin-right:4px;
}
.tool-group>.diagnose-drop{
  margin-left:18px;
  margin-right:18px;
  width:calc(100% - 36px);
}
@media(max-width:640px){
  .tool-group>.diagnose-drop{
    margin-left:12px;
    margin-right:12px;
    width:calc(100% - 24px);
  }
}


/* 2026-09-14: ページサムネイル整理 + 編集オブジェクト操作 */
.page-organizer{min-width:0;border:1px solid #dbe3ed;border-radius:12px;background:#f8fafc;padding:8px;overflow:hidden}
.page-organizer-head{display:flex;flex-direction:column;gap:2px;margin:0 2px 8px}.page-organizer-head strong{font-size:13px}.page-organizer-head small{font-size:10px;color:#718096}
.page-thumb-list{display:flex;flex-direction:column;gap:8px;max-height:100%;overflow:auto;padding-right:2px}
.page-thumb{position:relative;background:#fff;border:2px solid transparent;border-radius:9px;padding:5px;box-shadow:0 1px 5px rgba(31,66,112,.08);cursor:pointer}.page-thumb.active{border-color:#2f6fb3;background:#eef6ff}.page-thumb.dragover{border-color:#5f8fc5}.page-thumb.dragging{opacity:.5}.page-thumb canvas{display:block;max-width:100%;max-height:138px;margin:0 auto;background:white;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.page-thumb .thumb-select{display:block;width:100%;min-height:26px;margin:4px 0 2px;padding:2px 4px;border-radius:6px;background:#eef3f8;color:#245f9c;font-size:12px}.thumb-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:3px}.thumb-actions button{min-width:0;width:100%;padding:3px 2px;border-radius:5px;background:#6c7d91;font-size:11px;line-height:1.2}.thumb-actions button:last-child{background:#8f5d63}
.object-controls{margin:0 0 10px;padding:8px 9px;border:1px solid #b9cfe6;border-radius:9px;background:#f3f8fe}.object-controls>span{display:block;margin-bottom:6px;font-size:12px;font-weight:800;color:#245f9c}.object-controls>div{display:grid;grid-template-columns:1fr 1fr;gap:6px}.object-controls button{min-height:38px;padding:7px 8px}.object-controls .danger-lite{background:#8f5d63}
@media(min-width:901px){.editor-workspace{grid-template-columns:132px minmax(0,1fr) minmax(330px,.82fr)!important;gap:10px!important}.page-organizer{height:100%;display:flex;flex-direction:column}.page-thumb-list{flex:1;min-height:0}.pdf-pane{height:100%}.editor-sidebar{height:100%}}
@media(max-width:900px){.page-organizer{margin-bottom:10px}.page-organizer-head{flex-direction:row;justify-content:space-between;align-items:center}.page-thumb-list{display:flex;flex-direction:row;gap:8px;overflow-x:auto;overflow-y:hidden;max-height:none;padding-bottom:4px}.page-thumb{flex:0 0 112px}.page-thumb canvas{height:100px;width:auto;max-width:100%}.thumb-actions button{min-height:30px}}

/* 2026-09-15: PC表示を約82〜85%相当にコンパクト化。スマホは従来サイズを維持。 */
@media(min-width:900px){
  .wrap{width:min(1240px,94%)}
  .hero{padding:24px 0 20px}
  .hero h1{font-size:clamp(28px,3.6vw,38px);margin:.1em 0}
  .lead{font-size:14px;margin-top:6px}
  .panel,.notice{padding:18px;margin:20px 0;border-radius:16px}
  .tool-group>summary{padding:12px 16px;font-size:18px}
  .tool-group>summary::after{font-size:20px}
  .tool-group>.grid{gap:12px}
  .card{padding:16px;border-radius:15px}
  .card h3{font-size:20px;margin-bottom:8px}
  .card p{font-size:14px;line-height:1.45}
  .tool-group:first-of-type > .grid > .card{padding:13px 14px;margin-bottom:12px}
  .tool-group:first-of-type > .grid > .card > h3{margin-bottom:7px}
  .tool-group:first-of-type > .grid > .card > p{margin-bottom:6px}
  .tool-group:first-of-type > .grid > .card .drop.compact{height:66px;min-height:66px;padding:8px 12px}
  .drop.compact{padding:12px}
  .drop.compact span{font-size:14px;line-height:1.25}
  .drop.compact small{font-size:11px}
  .tool-group:first-of-type > .grid > .card :is(input:not([type='file']),select){height:34px;padding:7px 9px}
  .tool-group:first-of-type > .grid > .card > :is(button,.card-actions){height:40px;min-height:40px}
  .tool-group:first-of-type > .grid > .card > .card-actions > button{height:40px;min-height:40px}
  .tool-group:first-of-type > .grid > .card button{font-size:13px;padding:8px 11px}
  .mini-result{font-size:12px;margin:5px 0}
}

/* 2026-09-15: PC一覧をさらに高密度化。1920px級では6機能×2段を1画面で見渡せるサイズへ。 */
@media(min-width:900px){
  .hero{padding:16px 0 14px}
  .hero h1{font-size:32px;margin:0 0 4px}
  .lead{font-size:13px;margin:0}
  .tool-group{border-radius:14px}
  .tool-group>summary{padding:9px 14px;font-size:17px}
  .tool-group>.grid{margin-left:12px;margin-right:12px;margin-bottom:12px;gap:9px}
  .tool-group:first-of-type > .grid > .card{padding:10px 11px;margin-bottom:9px;border-radius:13px}
  .tool-group:first-of-type > .grid > .card > h3{font-size:16px;line-height:1.25;margin-bottom:5px}
  .tool-group:first-of-type > .grid > .card > p{font-size:12px;line-height:1.35;margin-bottom:5px}
  .tool-group:first-of-type > .grid > .card .drop.compact{height:56px;min-height:56px;padding:6px 8px;border-radius:11px}
  .tool-group:first-of-type > .grid > .card .drop.compact span{font-size:12px;line-height:1.2}
  .tool-group:first-of-type > .grid > .card .drop.compact small{font-size:10px}
  .tool-group:first-of-type > .grid > .card :is(input:not([type='file']),select){height:31px;padding:5px 7px;font-size:12px;border-radius:8px}
  .tool-group:first-of-type > .grid > .card > :is(button,.card-actions){height:36px;min-height:36px}
  .tool-group:first-of-type > .grid > .card > .card-actions > button{height:36px;min-height:36px;font-size:10px}
  .tool-group:first-of-type > .grid > .card button{font-size:12px;padding:6px 8px;border-radius:9px}
  .tool-group:first-of-type > .grid > .card > #reorderPages{margin-bottom:24px}
  .mini-result{font-size:11px;line-height:1.25;margin:3px 0}
}
@media(min-width:1250px) and (max-width:1499px){
  .tool-group:first-of-type > .grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media(min-width:1500px){
  .wrap{width:min(1760px,96%)}
  .tool-group:first-of-type > .grid{grid-template-columns:repeat(6,minmax(0,1fr))}
}

/* 2026-09-15: PC基本ツールは6カードを基準に、さらにコンパクト化 */
@media(min-width:1300px){
  .wrap{width:min(1820px,97%)}
  .tool-group:first-of-type > .grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-left:10px;margin-right:10px;margin-bottom:10px}
  .tool-group:first-of-type > .grid > .card{padding:8px 9px;margin-bottom:8px;border-radius:12px}
  .tool-group:first-of-type > .grid > .card > h3{font-size:15px;line-height:1.2;margin-bottom:4px}
  .tool-group:first-of-type > .grid > .card > p{font-size:11.5px;line-height:1.3;margin-bottom:4px}
  .tool-group:first-of-type > .grid > .card .drop.compact{height:48px;min-height:48px;padding:4px 6px;border-radius:9px}
  .tool-group:first-of-type > .grid > .card .drop.compact span{font-size:11.5px;line-height:1.15}
  .tool-group:first-of-type > .grid > .card .drop.compact small{font-size:9.5px}
  .tool-group:first-of-type > .grid > .card :is(input:not([type='file']),select){height:28px;padding:4px 6px;font-size:11px}
  .tool-group:first-of-type > .grid > .card > :is(button,.card-actions){height:32px;min-height:32px}
  .tool-group:first-of-type > .grid > .card > .card-actions > button{height:32px;min-height:32px;font-size:9.5px;padding:3px 4px}
  .tool-group:first-of-type > .grid > .card button{font-size:11px;padding:5px 7px;border-radius:8px}
  .tool-group:first-of-type > .grid > .card > #reorderPages{margin-bottom:18px}
  .mini-result{font-size:10.5px;line-height:1.2;margin:2px 0}
  .hero{padding:12px 0 10px}
  .hero h1{font-size:30px}
  .tool-group>summary{padding:8px 12px;font-size:16px}
}

/* 2026-09-15: 基本ツールのカード幅を80%へ。1段目の入力位置と上下余白を統一。 */
@media(min-width:1300px){
  .tool-group:first-of-type > .grid > .card{
    width:80%;
    justify-self:center;
  }
  /* 1段目の入力付きカードは「PDF選択 → 入力 → 実行」を同じ間隔で配置 */
  .tool-group:first-of-type > .grid > .card:nth-child(2) > .drop.compact,
  .tool-group:first-of-type > .grid > .card:nth-child(3) > .drop.compact,
  .tool-group:first-of-type > .grid > .card:nth-child(4) > .drop.compact,
  .tool-group:first-of-type > .grid > .card:nth-child(5) > .drop.compact{
    margin-bottom:8px;
  }
  .tool-group:first-of-type > .grid > .card:nth-child(2) > #extractRange,
  .tool-group:first-of-type > .grid > .card:nth-child(3) > #deletePages,
  .tool-group:first-of-type > .grid > .card:nth-child(4) > .form-row,
  .tool-group:first-of-type > .grid > .card:nth-child(5) > #reorderPages{
    grid-row:5;
    align-self:start;
    margin:0 0 8px;
  }
  .tool-group:first-of-type > .grid > .card:nth-child(2) > button,
  .tool-group:first-of-type > .grid > .card:nth-child(3) > button,
  .tool-group:first-of-type > .grid > .card:nth-child(4) > button,
  .tool-group:first-of-type > .grid > .card:nth-child(5) > button{
    grid-row:6;
    align-self:start;
    margin:0;
  }
  .tool-group:first-of-type > .grid > .card:nth-child(4) > .form-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:6px;
  }
}

/* 1段目入力付きカード: 選択枠→入力→ボタンを連続3行にして余白を同寸化 */
@media(min-width:1300px){
  .tool-group:first-of-type > .grid > .card:nth-child(2) > .drop.compact,
  .tool-group:first-of-type > .grid > .card:nth-child(3) > .drop.compact,
  .tool-group:first-of-type > .grid > .card:nth-child(4) > .drop.compact,
  .tool-group:first-of-type > .grid > .card:nth-child(5) > .drop.compact{
    grid-row:4;
    margin:0 0 8px;
  }
}

/* 2026-09-15: 基本/詳細ツールの縦位置・余白・カード幅を統一 */
@media(min-width:1300px){
  /* 基本ツール内の外周余白を詰める */
  .tool-group:first-of-type > .grid{
    padding-top:8px;
    margin-left:6px;
    margin-right:6px;
    margin-bottom:6px;
    gap:7px 8px;
  }
  .tool-group:first-of-type > .grid > .card{
    align-self:start;
    height:auto;
    min-height:0;
    margin-bottom:0;
    padding:7px 8px;
  }
  /* 各段の見出し・説明領域を揃え、PDF選択の上端を横一列にする */
  .tool-group:first-of-type > .grid > .card > h3{
    min-height:36px;
    display:flex;
    align-items:flex-start;
    margin:0 0 3px;
  }
  .tool-group:first-of-type > .grid > .card > p{
    min-height:58px;
    margin:0 0 5px;
  }
  .tool-group:first-of-type > .grid > .card > .drop.compact{
    grid-row:auto!important;
    margin:0 0 8px!important;
  }
  /* すべての補助欄はPDF選択の直下8px、実行ボタンもその直下8px */
  .tool-group:first-of-type > .grid > .card > :is(.page-spec,.page-order,.form-row,.labeled-mini,select,.mini-result){
    grid-row:auto!important;
    margin:0 0 8px!important;
    align-self:auto!important;
  }
  .tool-group:first-of-type > .grid > .card > :is(button,.card-actions){
    grid-row:auto!important;
    align-self:auto!important;
    margin:0!important;
  }
  .tool-group:first-of-type > .grid > .card > #compressStatus:empty{display:none}

  /* 詳細ツールも基本ツールと同じ約80%カード幅にする */
  .tool-group:nth-of-type(2) > .grid,
  .tool-group:nth-of-type(2) .trouble-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:8px;
    margin-left:6px;
    margin-right:6px;
  }
  .tool-group:nth-of-type(2) > .grid > .card,
  .tool-group:nth-of-type(2) .trouble-grid > .card{
    width:80%;
    justify-self:center;
    align-self:start;
    height:auto;
    padding:8px 9px;
    border-radius:12px;
  }
  .tool-group:nth-of-type(2) .card h3{font-size:15px;line-height:1.2;margin:0 0 4px}
  .tool-group:nth-of-type(2) .card p{font-size:11.5px;line-height:1.3;margin:0 0 6px}
  .tool-group:nth-of-type(2) .drop.compact{height:48px;min-height:48px;padding:4px 6px;margin:0 0 8px;border-radius:9px}
  .tool-group:nth-of-type(2) .drop.compact span{font-size:11.5px;line-height:1.15}
  .tool-group:nth-of-type(2) .drop.compact small{font-size:9.5px}
  .tool-group:nth-of-type(2) .card button,
  .tool-group:nth-of-type(2) .button-link{min-height:32px;padding:5px 7px;font-size:11px;border-radius:8px}
  .tool-group:nth-of-type(2) .detail-subsection{margin-top:10px;padding-top:10px}
}
@media(min-width:1300px) and (max-width:1550px){
  .tool-group:nth-of-type(2) > .grid,
  .tool-group:nth-of-type(2) .trouble-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}

/* 2026-09-15: カード内部の余白を実高さまでトリミングし、詳細カードのspan指定を解除 */
@media(min-width:1300px){
  .tool-group:first-of-type > .grid > .card{
    grid-row:auto!important;
    display:flex!important;
    flex-direction:column;
  }
  .tool-group:first-of-type > .grid > .card > *{grid-column:auto!important}
  .tool-group:first-of-type > .grid > .card > button,
  .tool-group:first-of-type > .grid > .card > .card-actions{margin-top:0!important}

  .tool-group:nth-of-type(2) .trouble-grid > .card{
    grid-column:auto!important;
    width:80%!important;
    height:auto!important;
    min-height:0!important;
    align-self:start!important;
  }
  .tool-group:nth-of-type(2) .trouble-grid > .card:nth-child(n+5),
  .tool-group:nth-of-type(2) .trouble-grid > .card:nth-child(n+8){grid-column:auto!important}
  .tool-group:nth-of-type(2) .trouble-grid > .card > button{margin-top:8px;min-height:32px;height:32px}
  .tool-group:nth-of-type(2) .trouble-grid > .card .drop.compact{min-height:48px;height:48px}
  .tool-group:nth-of-type(2) .trouble-grid > .card p{min-height:0}
  .detail-subsection{margin:10px 6px 8px;padding-top:6px}
}

/* 2026-09-15: 基本ツール最終整列 - カード/選択枠/入力/実行ボタンの高さを統一 */
@media(min-width:1300px){
  .tool-group:first-of-type > .grid{
    padding-top:4px;
    margin-left:4px;
    margin-right:4px;
    margin-bottom:4px;
    gap:6px 8px;
    align-items:stretch;
  }
  .tool-group:first-of-type > .grid > .card{
    width:80%;
    height:234px!important;
    min-height:234px!important;
    align-self:stretch!important;
    justify-self:center;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:30px 56px 44px 42px 32px!important;
    row-gap:5px!important;
    padding:5px 6px!important;
    margin:0!important;
    overflow:hidden;
  }
  .tool-group:first-of-type > .grid > .card > *{
    grid-column:1!important;
    min-width:0;
    margin:0!important;
  }
  .tool-group:first-of-type > .grid > .card > h3{
    grid-row:1!important;
    min-height:0!important;
    height:30px;
    font-size:14px;
    line-height:1.15;
    overflow:hidden;
  }
  .tool-group:first-of-type > .grid > .card > p{
    grid-row:2!important;
    min-height:0!important;
    height:56px;
    font-size:10.8px;
    line-height:1.28;
    overflow:hidden;
  }
  .tool-group:first-of-type > .grid > .card > .drop.compact{
    grid-row:3!important;
    height:44px!important;
    min-height:44px!important;
    padding:3px 5px!important;
    border-radius:8px;
  }
  .tool-group:first-of-type > .grid > .card .drop.compact span{font-size:11px;line-height:1.12}
  .tool-group:first-of-type > .grid > .card .drop.compact small{font-size:9px;line-height:1.1}
  .tool-group:first-of-type > .grid > .card > :is(.page-spec,.page-order,select,.form-row,.labeled-mini,.mini-result){
    grid-row:4!important;
    height:42px!important;
    min-height:42px!important;
    align-self:stretch!important;
  }
  .tool-group:first-of-type > .grid > .card > :is(.page-spec,.page-order,select){
    height:28px!important;
    min-height:28px!important;
    align-self:start!important;
    padding:3px 6px!important;
    font-size:10.5px!important;
  }
  .tool-group:first-of-type > .grid > .card > .form-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:5px!important;
  }
  .tool-group:first-of-type > .grid > .card > .form-row :is(input,select){
    height:28px!important;
    min-height:28px!important;
    margin:0!important;
    padding:3px 5px!important;
    font-size:10.5px!important;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini label{
    font-size:9px!important;
    line-height:1.05!important;
    margin:0!important;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini input{
    height:28px!important;
    min-height:28px!important;
    margin:2px 0 0!important;
    padding:3px 5px!important;
    font-size:10.5px!important;
  }
  .tool-group:first-of-type > .grid > .card > .mini-result{
    font-size:9.5px!important;
    line-height:1.2!important;
    padding-top:2px;
    overflow:hidden;
  }
  .tool-group:first-of-type > .grid > .card > :is(button,.card-actions){
    grid-row:5!important;
    height:32px!important;
    min-height:32px!important;
    align-self:stretch!important;
    margin:0!important;
  }
  .tool-group:first-of-type > .grid > .card > button{
    padding:4px 6px!important;
    font-size:10.5px!important;
    border-radius:7px;
  }
  .tool-group:first-of-type > .grid > .card > .card-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
  }
  .tool-group:first-of-type > .grid > .card > .card-actions > button{
    height:32px!important;
    min-height:32px!important;
    padding:2px 3px!important;
    font-size:9px!important;
  }
  .tool-group:first-of-type > .grid > .card > #compressStatus:empty{display:block!important}
}

/* 2026-09-15: 基本ツール内の文字を約120%へ拡大 */
@media(min-width:1300px){
  .tool-group:first-of-type > .grid > .card > h3{font-size:18px;line-height:1.2}
  .tool-group:first-of-type > .grid > .card > p{font-size:13.8px;line-height:1.35}
  .tool-group:first-of-type > .grid > .card .drop.compact span{font-size:13.8px;line-height:1.15}
  .tool-group:first-of-type > .grid > .card .drop.compact small{font-size:11.4px}
  .tool-group:first-of-type > .grid > .card :is(input:not([type='file']),select){font-size:13.2px}
  .tool-group:first-of-type > .grid > .card button{font-size:13.2px}
  .tool-group:first-of-type > .grid > .card > .card-actions > button{font-size:11.4px}
  .tool-group:first-of-type > .grid > .card .mini-result{font-size:12.6px;line-height:1.25}
  .tool-group:first-of-type > .grid > .card .labeled-mini label{font-size:12.6px}
}


/* PATTO PDF DESIGN SYSTEM v1 - 2026-09-15 */
/*
  Design tokens
  spacing: 4 / 8 / 12 / 16 px
  basic card: title 17px, body 13px, drop 48px, control 34px, action 36px
  desktop grid: 6 columns at 1500px+, 5 columns at 1200-1499px, 4 columns at 900-1199px
  mobile: existing single/two-column behavior, touch targets stay large
*/
@media(min-width:900px){
  .hero{padding:14px 0 12px}
  .hero h1{font-size:30px;line-height:1.15;margin:0 0 4px}
  .lead{font-size:13px;line-height:1.45;margin:0}
  main.wrap{width:min(1480px,96%)}
  .tool-group{border-radius:14px;margin:12px 0}
  .tool-group>summary{min-height:42px;padding:8px 14px;font-size:16px}
  .tool-group>.grid{margin:0 10px 10px;gap:12px}

  /* 基本ツール */
  .tool-group:first-of-type>.grid{display:grid;align-items:stretch}
  .tool-group:first-of-type>.grid>.card{
    width:100%!important;height:228px!important;min-height:228px!important;
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:34px 52px 48px 34px 36px!important;
    row-gap:6px!important;padding:8px!important;margin:0!important;
    border-radius:12px;overflow:hidden;align-self:stretch!important;justify-self:stretch!important;
  }
  .tool-group:first-of-type>.grid>.card>*{grid-column:1!important;min-width:0;margin:0!important}
  .tool-group:first-of-type>.grid>.card>h3{
    grid-row:1!important;height:34px!important;min-height:34px!important;
    display:flex;align-items:flex-start;overflow:hidden;
    font-size:17px!important;line-height:1.18!important;margin:0!important;
  }
  .tool-group:first-of-type>.grid>.card>p{
    grid-row:2!important;height:52px!important;min-height:52px!important;
    font-size:13px!important;line-height:1.32!important;margin:0!important;overflow:hidden;
  }
  .tool-group:first-of-type>.grid>.card>.drop.compact{
    grid-row:3!important;height:48px!important;min-height:48px!important;
    display:flex;align-items:center;justify-content:center;
    padding:5px 7px!important;margin:0!important;border-radius:9px;
  }
  .tool-group:first-of-type>.grid>.card>.drop.compact span{font-size:13px!important;line-height:1.15!important}
  .tool-group:first-of-type>.grid>.card>.drop.compact small{font-size:10.5px!important;line-height:1.1!important}
  .tool-group:first-of-type>.grid>.card>:is(.page-spec,.page-order,select,.form-row,.labeled-mini,.mini-result){
    grid-row:4!important;height:34px!important;min-height:34px!important;margin:0!important;align-self:stretch!important;
  }
  .tool-group:first-of-type>.grid>.card>:is(.page-spec,.page-order,select){
    padding:5px 7px!important;font-size:12.5px!important;border-radius:8px!important;
  }
  .tool-group:first-of-type>.grid>.card>.form-row{display:grid!important;grid-template-columns:1fr 74px!important;gap:6px!important}
  .tool-group:first-of-type>.grid>.card>.form-row :is(input,select){height:34px!important;min-height:34px!important;margin:0!important;padding:5px 6px!important;font-size:12px!important}
  .tool-group:first-of-type>.grid>.card>.labeled-mini{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  .tool-group:first-of-type>.grid>.card>.labeled-mini label{font-size:10.5px!important;line-height:1!important;margin:0!important}
  .tool-group:first-of-type>.grid>.card>.labeled-mini input{height:22px!important;min-height:22px!important;margin:2px 0 0!important;padding:2px 5px!important;font-size:11.5px!important}
  .tool-group:first-of-type>.grid>.card>.mini-result{font-size:11px!important;line-height:1.25!important;overflow:hidden;padding:2px 0!important}
  .tool-group:first-of-type>.grid>.card>#compressStatus:empty{display:block!important}
  .tool-group:first-of-type>.grid>.card>:is(button,.card-actions){
    grid-row:5!important;height:36px!important;min-height:36px!important;margin:0!important;align-self:stretch!important;
  }
  .tool-group:first-of-type>.grid>.card>button{padding:6px 8px!important;font-size:12.5px!important;border-radius:8px!important}
  .tool-group:first-of-type>.grid>.card>.card-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  .tool-group:first-of-type>.grid>.card>.card-actions>button{height:36px!important;min-height:36px!important;padding:3px 4px!important;font-size:10.5px!important;border-radius:8px!important}

  /* 入力のないカードは空き34pxをそのまま使い、全カードのボタン位置を揃える */
  .tool-group:first-of-type>.grid>.card:nth-child(6)>button,
  .tool-group:first-of-type>.grid>.card:nth-child(7)>.card-actions,
  .tool-group:first-of-type>.grid>.card:nth-child(10)>button,
  .tool-group:first-of-type>.grid>.card:nth-child(11)>button{grid-row:5!important}

  /* 詳細ツールも同じ見た目のルール */
  .tool-group:nth-of-type(2)>.grid,
  .tool-group:nth-of-type(2) .trouble-grid{display:grid!important;gap:12px!important;margin:0 10px 10px!important}
  .tool-group:nth-of-type(2) .card{width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;padding:10px!important;border-radius:12px!important}
  .tool-group:nth-of-type(2) .card h3{font-size:16px!important;line-height:1.2!important;margin:0 0 6px!important}
  .tool-group:nth-of-type(2) .card p{font-size:12.5px!important;line-height:1.35!important;margin:0 0 8px!important;min-height:0!important}
  .tool-group:nth-of-type(2) .drop.compact{height:48px!important;min-height:48px!important;margin:0 0 8px!important;padding:5px 7px!important;border-radius:9px!important}
  .tool-group:nth-of-type(2) .card button,.tool-group:nth-of-type(2) .button-link{min-height:36px!important;height:36px!important;padding:6px 8px!important;font-size:12.5px!important;border-radius:8px!important;margin-top:8px!important}
  .tool-group:nth-of-type(2) .detail-subsection{margin:8px 10px 10px!important;padding-top:6px!important}
}
@media(min-width:1500px){
  .tool-group:first-of-type>.grid,
  .tool-group:nth-of-type(2)>.grid,
  .tool-group:nth-of-type(2) .trouble-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important}
}
@media(min-width:1200px) and (max-width:1499px){
  .tool-group:first-of-type>.grid,
  .tool-group:nth-of-type(2)>.grid,
  .tool-group:nth-of-type(2) .trouble-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
@media(min-width:900px) and (max-width:1199px){
  .tool-group:first-of-type>.grid,
  .tool-group:nth-of-type(2)>.grid,
  .tool-group:nth-of-type(2) .trouble-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}


/* 2026-09-15: 基本ツール仕上げ - 段ごとに高さ統一、下切れ解消、区切り余白を確保 */
@media(min-width:1300px){
  .tool-group:first-of-type > .grid{
    padding:12px 4px 12px!important;
    margin-bottom:0!important;
    row-gap:8px!important;
  }
  /* 1段目6枚は同じ高さ */
  .tool-group:first-of-type > .grid > .card:nth-child(-n+6){
    height:228px!important;
    min-height:228px!important;
  }
  /* 2段目は入力系があるため少し高くし、全5枚で統一 */
  .tool-group:first-of-type > .grid > .card:nth-child(n+7){
    height:244px!important;
    min-height:244px!important;
  }
  .tool-group:first-of-type > .grid > .card{
    grid-template-rows:34px 52px 48px 38px 36px!important;
    row-gap:4px!important;
    padding:6px 8px!important;
    overflow:hidden!important;
  }
  .tool-group:first-of-type > .grid > .card > h3{
    height:34px!important;
    font-size:17px!important;
    line-height:1.18!important;
  }
  .tool-group:first-of-type > .grid > .card > p{
    height:52px!important;
    font-size:13px!important;
    line-height:1.28!important;
  }
  .tool-group:first-of-type > .grid > .card > .drop.compact{
    height:48px!important;
    min-height:48px!important;
  }
  .tool-group:first-of-type > .grid > .card > :is(.page-spec,.page-order,select){
    height:34px!important;
    min-height:34px!important;
    align-self:center!important;
    font-size:13px!important;
  }
  .tool-group:first-of-type > .grid > .card > .form-row{
    height:38px!important;
    min-height:38px!important;
    align-items:center!important;
  }
  .tool-group:first-of-type > .grid > .card > .form-row :is(input,select){
    height:34px!important;
    min-height:34px!important;
    font-size:13px!important;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini{
    height:38px!important;
    min-height:38px!important;
    align-items:end!important;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini label{
    font-size:11px!important;
  }
  .tool-group:first-of-type > .grid > .card > .labeled-mini input{
    height:24px!important;
    min-height:24px!important;
    margin-top:1px!important;
    font-size:12px!important;
  }
  .tool-group:first-of-type > .grid > .card > .mini-result{
    height:38px!important;
    min-height:38px!important;
    font-size:11.5px!important;
    line-height:1.2!important;
  }
  .tool-group:first-of-type > .grid > .card > :is(button,.card-actions){
    height:36px!important;
    min-height:36px!important;
  }
  .tool-group:first-of-type > .grid > .card > button{font-size:12.5px!important}
  .tool-group:first-of-type > .grid > .card > .card-actions > button{
    height:36px!important;
    min-height:36px!important;
    font-size:10.5px!important;
  }
  /* 基本ツールと次セクションの間に視覚的な区切り */
  .tool-group:first-of-type{margin-bottom:12px!important}
}

/* 2026-09-15: cross-browser safe card sizing - avoid clipping from fixed pixel heights */
@media(min-width:900px){
  .tool-group:first-of-type>.grid{
    align-items:stretch!important;
    grid-auto-rows:auto!important;
  }
  .tool-group:first-of-type>.grid>.card{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    align-self:stretch!important;
    grid-template-rows:34px 52px 48px minmax(44px,auto) 36px!important;
    row-gap:4px!important;
  }
  .tool-group:first-of-type>.grid>.card:nth-child(-n+6),
  .tool-group:first-of-type>.grid>.card:nth-child(n+7){
    height:auto!important;
    min-height:0!important;
  }
  .tool-group:first-of-type>.grid>.card>:is(input,select,button),
  .tool-group:first-of-type>.grid>.card .form-row :is(input,select),
  .tool-group:first-of-type>.grid>.card .labeled-mini input{
    box-sizing:border-box!important;
    font-family:inherit!important;
    line-height:1.2!important;
  }
  .tool-group:first-of-type>.grid>.card>.labeled-mini{
    height:auto!important;
    min-height:44px!important;
    align-items:start!important;
    padding-top:1px!important;
  }
  .tool-group:first-of-type>.grid>.card>.labeled-mini label{
    display:grid!important;
    grid-template-rows:12px 28px!important;
    gap:2px!important;
    font-size:11px!important;
    line-height:12px!important;
    overflow:visible!important;
  }
  .tool-group:first-of-type>.grid>.card>.labeled-mini input{
    height:28px!important;
    min-height:28px!important;
    margin:0!important;
    padding:3px 5px!important;
  }
  .tool-group:first-of-type>.grid>.card>.mini-result{
    height:auto!important;
    min-height:44px!important;
    overflow:visible!important;
  }
  .tool-group:first-of-type>.grid>.card>#compressStatus:empty{display:none!important}
  .tool-group:first-of-type>.grid>.card>h3,
  .tool-group:first-of-type>.grid>.card>p{
    overflow:visible!important;
  }
}

/* 2026-09-15: 基本ツール余白の最終調整 + 詳細ツールを共通グリッドへ整理 */
@media(min-width:900px){
  /* 基本ツール: 上下の外周余白を同じ8pxにする */
  .tool-group:first-of-type > .grid{
    padding:8px 4px 8px!important;
    margin-bottom:0!important;
  }
  .tool-group:first-of-type{margin-bottom:8px!important}

  /* 詳細ツール: 基本ツールと同じカード幅・密度・部品サイズ */
  .tool-group:nth-of-type(2) > .section-note{
    margin:10px 12px 8px!important;
    font-size:13px;
    line-height:1.4;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid{
    display:grid!important;
    gap:8px!important;
    margin:0 10px 10px!important;
    padding:0!important;
    align-items:stretch!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    padding:8px!important;
    margin:0!important;
    border-radius:12px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card h3{
    font-size:17px!important;
    line-height:1.18!important;
    margin:0 0 6px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card p{
    font-size:13px!important;
    line-height:1.32!important;
    margin:0 0 8px!important;
    min-height:0!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card .drop.compact{
    height:48px!important;
    min-height:48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:5px 7px!important;
    margin:0 0 8px!important;
    border-radius:9px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card .drop.compact span{
    font-size:13px!important;
    line-height:1.15!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card .drop.compact small{
    font-size:10.5px!important;
    line-height:1.1!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card :is(input,select,button){
    box-sizing:border-box!important;
    font-family:inherit!important;
    line-height:1.2!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card > :is(button,.button-link){
    height:36px!important;
    min-height:36px!important;
    margin-top:auto!important;
    padding:6px 8px!important;
    border-radius:8px!important;
    font-size:12.5px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card > label:not(.drop){
    font-size:12px!important;
    line-height:1.2!important;
    margin:0 0 8px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card > label:not(.drop) > select{
    width:100%!important;
    height:34px!important;
    min-height:34px!important;
    margin-top:4px!important;
    padding:5px 7px!important;
    font-size:12.5px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .blank-card .mini-result:empty{display:none!important}
}
@media(min-width:1500px){
  .tool-group:nth-of-type(2) > .detail-tools-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  /* 重い2ツールは3段目へまとめ、2段目の高さを無駄に伸ばさない */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12){grid-column:1!important}
}
@media(min-width:1200px) and (max-width:1499px){
  .tool-group:nth-of-type(2) > .detail-tools-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
@media(min-width:900px) and (max-width:1199px){
  .tool-group:nth-of-type(2) > .detail-tools-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* 詳細ツール: 同じ段のカード高さも揃える */
@media(min-width:900px){
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card{
    align-self:stretch!important;
    height:100%!important;
  }
}


/* 2026-09-15: Detail row 3 compact one-column cards */
@media(min-width:1500px){
  /* row 3 = white/black, booklet, duplex, deskew: all one column */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(10){grid-column:1!important;grid-row:3!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(11){grid-column:2!important;grid-row:3!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12){grid-column:3!important;grid-row:3!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13){grid-column:4!important;grid-row:3!important}

  /* All compact file-choice areas in Detail Tools keep the same height */
  .tool-group:nth-of-type(2) > .detail-tools-grid .drop.compact{
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  /* Duplex: one card, front/back each half width */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12){
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto 1fr 36px!important;
    gap:8px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > h3{
    grid-column:1 / -1!important;
    margin:0!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > label{
    min-width:0!important;
    margin:0!important;
    font-size:10.5px!important;
    line-height:1.15!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > label > .drop.compact{
    width:100%!important;
    margin:4px 0 0!important;
    padding:4px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > label > .drop.compact span{
    font-size:10.5px!important;
    line-height:1.1!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > label > .drop.compact small{
    font-size:9px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > button{
    grid-column:1 / -1!important;
    margin:0!important;
  }

  /* Deskew: file choice and angle selector each half width */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13){
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto auto 48px 36px!important;
    gap:8px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > h3,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > p,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > button{
    grid-column:1 / -1!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > p{
    margin:0!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > .drop.compact{
    grid-column:1!important;
    grid-row:3!important;
    width:100%!important;
    margin:0!important;
    padding:4px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > label{
    grid-column:2!important;
    grid-row:3!important;
    min-width:0!important;
    margin:0!important;
    font-size:10.5px!important;
    line-height:1.1!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > label > select{
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    padding:5px 6px!important;
    box-sizing:border-box!important;
    font-family:inherit!important;
    font-size:12px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > button{
    grid-row:4!important;
    margin:0!important;
  }
}

/* 2026-09-15: final spacing + detail 4/5/4 layout */
@media(min-width:1500px){
  /* Basic Tools: reduce first-row top whitespace to match bottom inset */
  .tool-group:first-of-type > .grid{
    margin-top:4px!important;
    padding-top:0!important;
    padding-bottom:4px!important;
    margin-bottom:0!important;
  }

  /* Detail Tools: semantic 4 / 5 / 4 rows */
  .tool-group:nth-of-type(2) > .detail-tools-grid{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    grid-auto-rows:auto!important;
    align-items:stretch!important;
    gap:12px!important;
    margin-top:10px!important;
    margin-left:10px!important;
    margin-right:10px!important;
    margin-bottom:10px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card{
    width:100%!important;
    min-width:0!important;
    height:100%!important;
    align-self:stretch!important;
  }

  /* row 1: settings (4) */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(1){grid-column:1!important;grid-row:1!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(2){grid-column:2!important;grid-row:1!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(3){grid-column:3!important;grid-row:1!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(4){grid-column:4!important;grid-row:1!important}

  /* row 2: conversion / cleanup (5) */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(5){grid-column:1!important;grid-row:2!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(6){grid-column:2!important;grid-row:2!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(7){grid-column:3!important;grid-row:2!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(8){grid-column:4!important;grid-row:2!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(9){grid-column:5!important;grid-row:2!important}

  /* row 3: processing (4) */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(10){grid-column:1!important;grid-row:3!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(11){grid-column:2!important;grid-row:3!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12){grid-column:3!important;grid-row:3!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13){grid-column:4!important;grid-row:3!important}

  /* Keep heavy cards compact inside one column */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12){
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto auto 36px!important;
    gap:8px 8px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > h3,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > button{grid-column:1/-1!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > label{margin:0!important;font-size:11px!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > label > .drop.compact{height:48px!important;min-height:48px!important;margin:4px 0 0!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > button{margin:0!important}

  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13){
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto auto auto 36px!important;
    gap:8px 8px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > h3,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > p,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > button{grid-column:1/-1!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > .drop.compact{height:48px!important;min-height:48px!important;margin:0!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > label{margin:0!important;font-size:11px!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > label > select{height:48px!important;min-height:48px!important;margin:0!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > button{margin:0!important}
}


/* 2026-09-15: Detail Tools final alignment - equal file boxes, duplex description, row-1 breathing room */
@media(min-width:1500px){
  /* Row 1 settings cards: give the descriptions a small, consistent gap before the action button. */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(-n+4){
    padding:10px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(-n+4) > p{
    margin-bottom:8px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(-n+4) > .button-link{
    margin-top:auto!important;
  }

  /* All Detail Tools file-choice boxes use exactly the same height. */
  .tool-group:nth-of-type(2) > .detail-tools-grid .drop.compact{
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  /* Duplex card: description spans full width, then front/back inputs share the row. */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12){
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto auto auto 36px!important;
    gap:8px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > h3,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > p,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > button{
    grid-column:1 / -1!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > p{
    margin:0!important;
    min-height:0!important;
    font-size:12.5px!important;
    line-height:1.35!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > label{
    min-width:0!important;
    margin:0!important;
    font-size:10.5px!important;
    line-height:1.15!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > label > .drop.compact{
    width:100%!important;
    margin:4px 0 0!important;
    padding:4px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) > button{
    margin:0!important;
  }

  /* Deskew: file choice and angle selector remain half-width and equal-height. */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > .drop.compact,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > label > select{
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    box-sizing:border-box!important;
  }
}

/* 2026-09-15: Detail row-1 description/action spacing */
@media(min-width:1500px){
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(-n+4) > .button-link{
    margin-top:8px!important;
    align-self:stretch!important;
  }
}


/* 2026-09-15: 詳細ツールの選択ボックスと内部文字を最終統一 */
@media(min-width:900px){
  .tool-group:nth-of-type(2) > .detail-tools-grid .drop.compact{
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:4px 6px!important;
    overflow:hidden!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid .drop.compact > span{
    display:block!important;
    width:100%!important;
    text-align:center!important;
    font-size:12px!important;
    font-weight:800!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid .drop.compact > span > small{
    display:block!important;
    margin-top:2px!important;
    font-size:10px!important;
    font-weight:500!important;
    line-height:1.05!important;
    white-space:nowrap!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) .drop.compact > span{
    font-size:10.5px!important;
    line-height:1.05!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(12) .drop.compact > span > small{
    font-size:9px!important;
    margin-top:1px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(13) > label > select{
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    box-sizing:border-box!important;
    font-family:inherit!important;
    font-size:12px!important;
    line-height:1.2!important;
    padding:4px 6px!important;
  }
}

/* 2026-09-15: Detail control-row final alignment */
@media(min-width:1500px){
  /* Row 2: equal title/description/control/action tracks */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+5):nth-child(-n+9){
    display:grid!important;
    grid-template-rows:24px 52px 48px 36px!important;
    row-gap:8px!important;
    padding:10px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+5):nth-child(-n+9) > h3{margin:0!important;align-self:start!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+5):nth-child(-n+9) > p{margin:0!important;height:52px!important;overflow:hidden!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+5):nth-child(-n+9) > .drop.compact{margin:0!important;height:48px!important;min-height:48px!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+5):nth-child(-n+9) > button{margin:0!important;height:36px!important;min-height:36px!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(8) > .mini-result:empty{display:none!important}

  /* Row 3: equal description/control/action vertical positions */
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+10):nth-child(-n+13){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:24px 66px 48px 36px!important;
    row-gap:8px!important;
    padding:10px!important;
  }
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+10):nth-child(-n+13) > h3{grid-column:1!important;grid-row:1!important;margin:0!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+10):nth-child(-n+13) > p{grid-column:1!important;grid-row:2!important;margin:0!important;height:66px!important;overflow:hidden!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(10) > .drop.compact,
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(11) > .drop.compact{grid-row:3!important;margin:0!important;height:48px!important;min-height:48px!important}
  .tool-group:nth-of-type(2) > .detail-tools-grid > .card:nth-child(n+10):nth-child(-n+13) > button{grid-column:1!important;grid-row:4!important;margin:0!important;height:36px!important;min-height:36px!important}

  .duplex-file-row,
  .deskew-control-row{
    grid-column:1!important;
    grid-row:3!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    min-width:0!important;
    height:48px!important;
  }
  .duplex-file-row > .drop.compact,
  .deskew-control-row > .drop.compact{
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    padding:4px 5px!important;
  }
  .duplex-file-row > .drop.compact span,
  .deskew-control-row > .drop.compact span{font-size:11px!important;line-height:1.05!important}
  .duplex-file-row > .drop.compact small,
  .deskew-control-row > .drop.compact small{font-size:9.5px!important;line-height:1!important}

  .angle-control{
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    padding:4px 6px!important;
    border:1px solid #ccd8e6!important;
    border-radius:9px!important;
    background:#fff!important;
    display:grid!important;
    grid-template-rows:12px 1fr!important;
    gap:2px!important;
    box-sizing:border-box!important;
    font-family:inherit!important;
  }
  .angle-control > span{
    font-size:9.5px!important;
    line-height:12px!important;
    color:#53657a!important;
    font-weight:600!important;
  }
  .angle-control > select{
    width:100%!important;
    height:26px!important;
    min-height:26px!important;
    margin:0!important;
    padding:1px 4px!important;
    border:0!important;
    border-radius:5px!important;
    background:#fff!important;
    font:inherit!important;
    font-size:11.5px!important;
    line-height:1.1!important;
    box-sizing:border-box!important;
  }
}


/* 2026-09-15: PDF editor cleanup - page number at thumbnail left, simpler tool guidance */
@media(min-width:901px){
  .page-thumb{
    display:grid;
    grid-template-columns:24px minmax(0,1fr);
    grid-template-rows:auto auto;
    column-gap:4px;
    align-items:center;
  }
  .page-thumb canvas{
    grid-column:2;
    grid-row:1;
    margin:0 auto;
    max-width:100%;
  }
  .page-thumb .thumb-select{
    grid-column:1;
    grid-row:1;
    width:24px;
    min-height:32px;
    margin:0;
    padding:2px 1px;
    align-self:center;
    border-radius:6px;
    font-size:12px;
    line-height:1;
  }
  .page-thumb .thumb-actions{
    grid-column:1 / -1;
    grid-row:2;
    margin-top:4px;
  }
}
.active-tool-heading{gap:0!important}
.active-tool-heading>span{display:none!important}

/* 2026-09-15: お問い合わせフォーム */
.contact-page{max-width:820px;padding-top:28px;padding-bottom:42px}
.contact-form{margin:20px 0 30px;padding:22px;background:#fff;border:1px solid #dbe3ed;border-radius:16px;box-shadow:0 8px 24px rgba(31,66,112,.05)}
.contact-form>label{display:block;font-weight:700;margin:0 0 16px;color:#27384d}
.contact-form select,.contact-form input,.contact-form textarea{display:block;width:100%;margin-top:7px;padding:10px 12px;border:1px solid #cbd7e5;border-radius:10px;background:#fff;color:#17243a;font:inherit;box-sizing:border-box}
.contact-form select,.contact-form input{min-height:42px}.contact-form textarea{resize:vertical;min-height:170px;line-height:1.55}
.contact-form .optional{font-size:12px;font-weight:500;color:#718096;margin-left:6px}
.contact-privacy{font-size:12px;line-height:1.5;color:#607287;margin:2px 0 14px}
.contact-result{min-height:22px;margin:10px 0 0;font-size:13px;font-weight:700}.contact-result.success{color:#287044}.contact-result.error{color:#a23b3b}
.contact-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.contact-form button:disabled{opacity:.6;cursor:wait}
@media(max-width:640px){.contact-form{padding:16px}.contact-page{padding-top:18px}}


/* iHome UI prototype: 2026-09-15 / comparison only */
.ui-prototype .editor-sidebar{padding:14px}
.ui-prototype .editor-drop-zone{margin-bottom:12px}
.ui-prototype .ui-control-label{font-size:12px;font-weight:800;color:#65758a;margin:0 0 6px}
.ui-prototype .ui-page-controls{padding:10px 0 12px;border-bottom:1px solid #e4e9ef;margin-bottom:12px}
.ui-prototype .ui-page-controls .page-controls{display:block;margin:0}
.ui-prototype .page-nav-group{display:grid;grid-template-columns:auto 62px auto auto;gap:6px;align-items:center}
.ui-prototype .page-nav-group button,.ui-prototype .page-nav-group input{min-height:42px;margin:0}
.ui-prototype .edit-utility-group{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:7px}
.ui-prototype .edit-utility-group button{width:100%;min-height:38px;font-size:12px;padding:7px 8px;background:#f7f9fb;color:#526477;border:1px solid #d7e0e8;box-shadow:none}
.ui-prototype .edit-utility-group .quiet-danger{color:#80585d}
.ui-prototype .ui-step-label{display:flex;align-items:center;gap:8px;margin:2px 0 8px;font-size:13px;color:#364b62}
.ui-prototype .ui-step-label>span{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#e9f1fa;color:#245f9c;font-weight:800;font-size:12px}
.ui-prototype .ui-step-settings{margin-top:14px;border-top:1px solid #e7ebef;padding-top:12px}
.ui-prototype .mode-buttons.one-line{grid-template-columns:repeat(3,1fr);gap:7px;margin:0;padding:0;background:transparent}
.ui-prototype .mode-buttons.one-line button{min-height:46px;border-radius:10px;padding:8px 6px;font-weight:700}
.ui-prototype .active-tool-heading{margin:0 0 9px}
.ui-prototype .active-tool-heading h2{font-size:17px}
.ui-prototype .edit-subtools{margin-bottom:10px}
.ui-prototype .advanced-options{margin:4px 0 12px;border:1px solid #dde5ed;border-radius:10px;background:#fafbfd}
.ui-prototype .advanced-options summary{cursor:pointer;padding:10px 12px;font-size:12px;font-weight:700;color:#53687e}
.ui-prototype .advanced-options-body{padding:2px 12px 10px}
.ui-prototype .stamp-size-control{margin-top:8px}
.ui-prototype .signature-use{font-weight:800;min-height:44px}
.ui-prototype .signature-clear{background:#f7f9fb;color:#637487}
.ui-prototype .tool-next-step{margin:10px 0 12px}
.ui-prototype .ui-finish{border-top:1px solid #e4e9ef;padding-top:12px;margin-top:12px}
.ui-prototype .ui-finish .save-edit{width:100%;min-height:52px;font-size:16px;font-weight:800;margin:0}
.ui-prototype .object-controls{margin:0 0 12px}
@media(max-width:640px){
 .ui-prototype .page-nav-group{grid-template-columns:auto 64px auto auto}
 .ui-prototype .edit-utility-group{grid-template-columns:1fr 1fr}
 .ui-prototype .mode-select{margin:0 0 10px}
}

/* UI prototype refinement: keep primary completion action always visible */
.ui-prototype .editor-sidebar{
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 88px);
  overflow:hidden;
}
.ui-prototype .editor-sidebar > :not(.ui-finish){
  flex:0 0 auto;
}
.ui-prototype .editor-sidebar{
  overscroll-behavior:contain;
}
.ui-prototype .ui-finish{
  position:sticky;
  bottom:0;
  z-index:10;
  margin-top:auto;
  background:linear-gradient(to bottom,rgba(255,255,255,.92),#fff 24%);
  padding-top:14px;
  padding-bottom:2px;
  box-shadow:0 -10px 18px rgba(33,51,72,.06);
}
.ui-prototype .editor-sidebar{overflow-y:auto}
.ui-prototype .ui-finish .ui-step-label{margin-bottom:7px}
@media(max-width:900px){
  .ui-prototype .editor-sidebar{max-height:none;overflow:visible}
  .ui-prototype .ui-finish{position:sticky;bottom:0;padding-bottom:max(6px,env(safe-area-inset-bottom));}
}

/* UI prototype refinement: simplify settings heading and page counter */
.ui-prototype .active-tool-heading{display:none}
.ui-prototype .page-nav-group{grid-template-columns:auto 56px auto auto;column-gap:4px}
.ui-prototype .page-nav-group #editPage{width:56px;text-align:center;padding-left:6px;padding-right:6px}
.ui-prototype .page-nav-group #editPageTotal{margin-left:-2px;white-space:nowrap}


/* UI prototype refinement 2: compact page counter + aligned details control */
.ui-prototype .page-nav-group{display:grid !important;grid-template-columns:1fr auto 1fr !important;gap:8px !important;align-items:center}
.ui-prototype .page-nav-group #prevEditPage,.ui-prototype .page-nav-group #nextEditPage{width:100% !important;min-width:0}
.ui-prototype .page-counter{display:inline-flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap}
.ui-prototype .page-counter #editPage{width:56px !important;min-width:56px !important;margin:0 !important;text-align:center;padding-left:6px;padding-right:6px}
.ui-prototype .page-counter #editPageTotal{margin:0 !important;display:inline-block !important;min-width:auto !important;width:auto !important;white-space:nowrap}
.ui-prototype .advanced-options{width:100%;margin:6px 0 12px;border:0;background:transparent}
.ui-prototype .advanced-options summary{box-sizing:border-box;display:flex;align-items:center;width:100%;min-height:44px;padding:10px 12px;border-radius:9px;font-size:13px;background:#fff;border:1px solid #ccd8e6;color:#40566f}
.ui-prototype .advanced-options[open] summary{border-bottom-left-radius:0;border-bottom-right-radius:0}
.ui-prototype .advanced-options-body{border:1px solid #ccd8e6;border-top:0;border-radius:0 0 9px 9px;background:#fafbfd;padding:10px 12px 2px}

/* UI prototype refinement: compact page navigation */
.ui-prototype .page-nav-group{
  display:grid;
  grid-template-columns:minmax(110px,1fr) 86px minmax(110px,1fr);
  gap:10px;
  align-items:center;
}
.ui-prototype .page-nav-group #prevEditPage,
.ui-prototype .page-nav-group #nextEditPage{
  width:100%;
  min-height:44px;
  padding:8px 14px;
}
.ui-prototype .page-counter{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-width:86px;
  white-space:nowrap;
  font-weight:700;
  color:#26384d;
}
.ui-prototype .page-counter #editPage{
  width:28px !important;
  min-width:28px;
  height:36px;
  min-height:36px;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  border-radius:6px;
  background:transparent !important;
  box-shadow:none !important;
  text-align:right;
  font:inherit;
  font-weight:700;
  color:inherit;
  appearance:textfield;
  -moz-appearance:textfield;
}
.ui-prototype .page-counter #editPage::-webkit-outer-spin-button,
.ui-prototype .page-counter #editPage::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.ui-prototype .page-counter #editPage:hover{
  background:#f5f8fb !important;
}
.ui-prototype .page-counter #editPage:focus{
  outline:2px solid #8db3df;
  outline-offset:1px;
  background:#fff !important;
}
.ui-prototype .page-counter #editPageTotal{
  margin:0 !important;
  padding:0;
  white-space:nowrap;
}
@media(max-width:640px){
  .ui-prototype .page-nav-group{
    grid-template-columns:minmax(88px,1fr) 78px minmax(88px,1fr);
    gap:7px;
  }
  .ui-prototype .page-counter{min-width:78px}
}

/* UI prototype fix: page counter aligned on one baseline */
.ui-prototype .page-counter{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:3px !important;
  min-width:76px;
  height:44px;
  white-space:nowrap;
}
.ui-prototype .page-counter #editPage{
  display:inline-block !important;
  width:28px !important;
  min-width:28px !important;
  max-width:28px !important;
  height:32px !important;
  min-height:32px !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  background:transparent !important;
  text-align:right !important;
  line-height:32px !important;
  font:inherit !important;
  font-weight:700 !important;
  box-shadow:none !important;
  appearance:textfield;
}
.ui-prototype .page-counter #editPage::-webkit-outer-spin-button,
.ui-prototype .page-counter #editPage::-webkit-inner-spin-button{appearance:none;margin:0}
.ui-prototype .page-counter #editPageTotal{
  display:inline-block !important;
  margin:0 !important;
  padding:0 !important;
  line-height:32px !important;
  font-weight:700 !important;
  white-space:nowrap !important;
}


/* UI prototype refinement: true page counter display */
.ui-prototype .page-nav-group{grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr);gap:12px;align-items:center}
.ui-prototype .page-counter{width:76px;display:grid;place-items:center}
.ui-prototype .page-counter-display{appearance:none;border:0;background:transparent;color:#17243a;font:700 16px/1.2 inherit;padding:8px 4px;margin:0;width:76px;min-height:40px;cursor:pointer;white-space:nowrap;box-shadow:none}
.ui-prototype .page-counter-display:hover{background:#f2f6fa;border-radius:8px}
.ui-prototype .page-counter-editor{display:none;align-items:center;justify-content:center;gap:3px;width:76px}
.ui-prototype .page-counter-editor.editing{display:flex}
.ui-prototype .page-counter-editor #editPage{display:block!important;width:34px!important;min-width:34px!important;height:36px!important;min-height:36px!important;padding:2px 3px!important;margin:0!important;text-align:center!important;border:1px solid #bfcddd!important;border-radius:7px!important;background:#fff!important;font:700 15px/1 inherit!important}
.ui-prototype .page-counter-editor #editPageTotal{display:inline!important;margin:0!important;padding:0!important;white-space:nowrap!important;font:700 15px/1 inherit!important;color:#17243a!important}
.ui-prototype .page-nav-group>#prevEditPage,.ui-prototype .page-nav-group>#nextEditPage{width:100%;min-width:0}


/* UI prototype refinement: focus on the selected editing tool */
.ui-prototype .secondary-controls{
  background:#f7f9fb;
  border:1px solid #e1e7ed;
  border-radius:11px;
  padding:8px 10px 9px;
  margin:0 0 12px;
}
.ui-prototype .secondary-controls .ui-control-label{
  margin:0 0 4px;
  color:#778698;
  font-size:11px;
  font-weight:700;
}
.ui-prototype .secondary-controls .page-nav-group{
  grid-template-columns:1fr 76px 1fr;
  gap:7px;
}
.ui-prototype .secondary-controls #prevEditPage,
.ui-prototype .secondary-controls #nextEditPage{
  min-height:38px;
  padding:6px 10px;
  background:#eef2f6;
  color:#465b70;
  border:1px solid #d9e1e8;
  box-shadow:none;
}
.ui-prototype .secondary-controls .page-counter-display{
  min-height:38px;
  width:76px;
  font-size:14px;
}
.ui-prototype .secondary-controls .edit-utility-group{
  margin-top:5px;
  gap:5px;
}
.ui-prototype .secondary-controls .edit-utility-group button{
  min-height:32px;
  border:0;
  background:transparent;
  font-size:11px;
  font-weight:650;
  padding:4px 6px;
}
.ui-prototype .tool-focus-card{
  border:1px solid #dce4ec;
  border-radius:13px;
  background:#fff;
  padding:13px;
  box-shadow:0 1px 2px rgba(31,49,69,.03);
}
.ui-prototype .tool-focus-card .ui-step-label{
  margin-top:0;
}
.ui-prototype .tool-focus-card .ui-step-settings{
  margin-top:13px;
  padding-top:12px;
  border-top:1px solid #edf1f4;
}
.ui-prototype .tool-focus-card .mode-buttons.one-line{
  gap:6px;
}
.ui-prototype .tool-focus-card .mode-buttons.one-line button{
  background:#f8fafc;
  border-color:#dbe3eb;
  min-height:43px;
}
.ui-prototype .tool-focus-card .mode-buttons.one-line button.active{
  background:#2f69a8;
  color:#fff;
  border-color:#2f69a8;
  box-shadow:0 1px 2px rgba(25,71,119,.15);
}
.ui-prototype .tool-focus-card .edit-subtools{
  margin:0;
}
.ui-prototype .tool-focus-card .tool-next-step{
  margin-bottom:0;
}
.ui-prototype .ui-finish{
  border-top:0;
  margin-top:10px;
  padding-top:8px;
}
.ui-prototype .ui-finish .ui-step-label{
  display:none;
}
.ui-prototype .ui-finish .save-edit{
  border-radius:11px;
  box-shadow:0 2px 7px rgba(32,83,137,.14);
}
@media(max-width:640px){
  .ui-prototype .tool-focus-card{padding:11px}
  .ui-prototype .secondary-controls{padding:7px 8px}
}


/* iHome top-page prototype: purpose-first navigation */
.home-start{margin:18px 0 22px}
.home-start-head{margin:0 0 14px}
.home-start-head h2{margin:3px 0 5px;font-size:24px;color:#17243a}
.home-start-head p{margin:0;color:#637487}
.home-start-head .home-eyebrow{font-size:12px;font-weight:800;color:#2f6fb3;letter-spacing:.03em}
.home-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.home-feature-card{border:1px solid #dbe3ed;border-radius:16px;padding:18px;background:#fff;box-shadow:0 6px 20px rgba(32,54,78,.045)}
.home-feature-card h3{font-size:20px;margin:0 0 7px;color:#17243a}
.home-feature-card p{min-height:44px;margin:0 0 12px;color:#607185}
.home-feature-card .drop.compact{margin-bottom:10px}
.home-feature-card>button,.home-feature-card>.button-link{min-height:48px;font-weight:800;border-radius:10px}
.home-feature-edit{display:flex;flex-direction:column;justify-content:center;min-height:210px;background:linear-gradient(145deg,#f7fbff,#fff)}
.home-feature-edit .button-link{display:flex;align-items:center;justify-content:center;margin-top:auto}
.home-more-tools{margin-top:6px}
.home-more-tools>summary,.tool-group>summary{min-height:54px;display:flex;align-items:center;justify-content:space-between}
@media(max-width:760px){
 .home-feature-grid{grid-template-columns:1fr}
 .home-feature-card p{min-height:0}
 .home-start-head h2{font-size:21px}
}

/* 2026-09-15: primary tools 4-column layout */
.home-start .home-start-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  align-items:stretch;
}
.home-start .home-start-grid>.card{
  display:flex;
  flex-direction:column;
  min-width:0;
  height:100%;
}
.home-start .home-start-grid>.card p{
  flex:0 0 auto;
  min-height:44px;
}
.home-start .home-start-grid>.card .button-link,
.home-start .home-start-grid>.card button{
  margin-top:auto;
}
.home-start .home-start-grid>.card h3{
  min-height:48px;
  display:flex;
  align-items:center;
}
@media(max-width:980px){
  .home-start .home-start-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:640px){
  .home-start .home-start-grid{grid-template-columns:1fr;}
  .home-start .home-start-grid>.card h3,
  .home-start .home-start-grid>.card p{min-height:0;}
}

/* fix: primary tools use actual home-feature-grid class */
.home-start .home-feature-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:14px;
  align-items:stretch;
}
.home-start .home-feature-grid>.card{
  display:flex;
  flex-direction:column;
  min-width:0;
  height:100%;
}
.home-start .home-feature-grid>.card p{
  min-height:44px;
}
.home-start .home-feature-grid>.card>button,
.home-start .home-feature-grid>.card>.button-link{
  margin-top:auto;
}
.home-start .home-feature-edit{
  min-height:0;
  justify-content:flex-start;
}
@media(max-width:1100px){
  .home-start .home-feature-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:640px){
  .home-start .home-feature-grid{
    grid-template-columns:1fr !important;
  }
  .home-start .home-feature-grid>.card p{
    min-height:0;
  }
}


/* 2026-09-15: primary tools single-column + collapsible */
.home-primary-tools{margin:18px 0 22px}
.home-primary-tools>summary{min-height:54px;display:flex;align-items:center;justify-content:space-between}
.home-primary-tools[open]>summary small::before{content:""}
.home-primary-tools .home-start-head{padding:14px 18px 2px;margin:0}
.home-primary-tools .home-feature-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:12px;
  padding:14px 18px 18px;
}
.home-primary-tools .home-feature-grid>.card{
  width:100%;
  max-width:none;
  min-height:0;
  height:auto;
}
.home-primary-tools .home-feature-edit{min-height:0 !important}
@media(max-width:640px){
  .home-primary-tools .home-start-head{padding:12px 12px 0}
  .home-primary-tools .home-feature-grid{padding:12px;gap:10px}
}

/* 2026-09-15: force primary tools into a true single column */
.home-primary-tools .home-feature-grid{
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  padding:14px 18px 18px !important;
}
.home-primary-tools .home-feature-grid>.card{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  flex:0 0 auto !important;
  box-sizing:border-box !important;
}
.home-primary-tools .home-feature-grid>.home-feature-edit{
  width:100% !important;
}
@media(max-width:640px){
  .home-primary-tools .home-feature-grid{padding:12px !important;}
}


/* 2026-09-15: one-purpose-per-page hybrid prototype */
.home-nav-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;padding:14px 18px 18px!important}
.home-nav-card{display:flex;flex-direction:column;gap:8px;min-height:150px;padding:18px;border:1px solid #dbe3ed;border-radius:14px;background:#fff;text-decoration:none;color:#17243a;box-shadow:0 4px 14px rgba(32,54,78,.04)}
.home-nav-card strong{font-size:19px}.home-nav-card span{color:#607185;line-height:1.6}.home-nav-card b{margin-top:auto;display:flex;align-items:center;justify-content:center;min-height:44px;border-radius:9px;background:#2f6fb3;color:#fff}
.home-nav-card:hover{border-color:#9ebfe1;transform:translateY(-1px)}
@media(max-width:980px){.home-nav-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:640px){.home-nav-grid{grid-template-columns:1fr!important;padding:12px!important}.home-nav-card{min-height:130px}}

.standalone-tool-page .hero{display:none}
.standalone-tool-page .standalone-main{max-width:980px;padding-top:28px}
.standalone-intro{margin:0 0 18px}.standalone-intro h1{font-size:28px;margin:10px 0 7px;color:#17243a}.standalone-intro p{margin:0;color:#607185}.standalone-home-link{display:inline-flex;min-height:40px;align-items:center;color:#2f6fb3;font-weight:700;text-decoration:none}
.standalone-tool-page main>details,.standalone-tool-page main>.notice{display:none!important}
.standalone-tool-page main .home-start{display:block!important;border:0!important;background:transparent!important;margin:0!important}
.standalone-tool-page main .home-start>summary,.standalone-tool-page main .home-start-head{display:none!important}
.standalone-tool-page main .home-start .home-feature-grid{display:block!important;padding:0!important}
.standalone-tool-page main .home-start .home-feature-grid>.card{display:none!important}
.standalone-tool-page main .home-start .home-feature-grid>.standalone-active-tool{display:flex!important;width:100%!important;min-height:0!important}
.standalone-tool-page #status{display:block!important;margin-top:14px}
.standalone-tool-page footer{margin-top:34px}
/* conversion pages: active cards live inside hidden details; expose only active card */
.standalone-tool-page main details:has(.standalone-active-tool){display:block!important;border:0!important;background:transparent!important}
.standalone-tool-page main details:has(.standalone-active-tool)>summary,.standalone-tool-page main details:has(.standalone-active-tool)>.section-note{display:none!important}
.standalone-tool-page main details:has(.standalone-active-tool)>.grid{display:block!important}
.standalone-tool-page main details:has(.standalone-active-tool)>.grid>.card{display:none!important}
.standalone-tool-page main details:has(.standalone-active-tool)>.grid>.standalone-active-tool{display:flex!important}
.standalone-diagnose-page main>.standalone-active-diagnose{display:block!important;border:0!important;background:transparent!important}
.standalone-diagnose-page .standalone-active-diagnose>summary{display:none!important}


/* 2026-09-15: shared navigation + true bottom footer */
.site-shell{min-height:100vh;display:flex;flex-direction:column;background:#f5f8fc}
.site-shell>main{flex:1 0 auto;width:100%}
.site-shell>footer{margin-top:auto!important;flex-shrink:0}
.site-header{background:#fff;border-bottom:1px solid #dce5ef;position:relative;z-index:20}
.site-header-inner{display:flex;align-items:center;gap:26px;min-height:76px}
.site-brand{display:flex;flex-direction:column;flex:0 0 auto;text-decoration:none;color:#17243a;line-height:1.15}
.site-brand strong{font-size:24px;letter-spacing:-.02em}
.site-brand span{font-size:11px;color:#6b7d90;margin-top:5px;white-space:nowrap}
.site-main-nav{margin-left:auto;display:flex;align-items:center;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:none}
.site-main-nav::-webkit-scrollbar{display:none}
.site-main-nav a{display:flex;align-items:center;justify-content:center;min-height:40px;padding:0 11px;border-radius:9px;text-decoration:none;color:#40556c;font-size:14px;font-weight:700;white-space:nowrap}
.site-main-nav a:hover{background:#edf4fb;color:#245f9f}
.site-main-nav a.active{background:#e7f1fb;color:#1d5e9f}
.tool-switcher{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 22px;padding:10px 12px;background:#fff;border:1px solid #dce5ef;border-radius:12px}
.tool-switcher>span{font-size:13px;font-weight:800;color:#687b8f;margin-right:4px}
.tool-switcher a{display:inline-flex;align-items:center;min-height:36px;padding:0 11px;border-radius:8px;text-decoration:none;color:#37516c;font-size:14px;font-weight:700;background:#f4f7fa}
.tool-switcher a:hover{background:#e9f2fb;color:#245f9f}
.tool-switcher a.active{background:#2f6fb3;color:#fff}
.standalone-tool-page .standalone-main{max-width:1080px;padding-top:34px;padding-bottom:48px}
.standalone-tool-page .standalone-intro{margin-bottom:16px}
.standalone-tool-page .standalone-intro h1{font-size:36px;line-height:1.2;margin:0 0 10px;letter-spacing:-.025em}
.standalone-tool-page .standalone-intro>p{font-size:17px;line-height:1.75;color:#586d82}
.standalone-tool-page .standalone-active-tool{padding:26px!important;border-radius:18px!important}
.standalone-tool-page .standalone-active-tool h3{font-size:25px!important;margin-bottom:10px!important}
.standalone-tool-page .standalone-active-tool p{font-size:16px;line-height:1.7}
.standalone-tool-page .standalone-active-tool button,
.standalone-tool-page .standalone-active-tool .button-link{font-size:17px;min-height:52px}
.standalone-tool-page .standalone-active-tool input,
.standalone-tool-page .standalone-active-tool select{font-size:16px}
.editor-page-intro{margin-top:0!important}
.editor-page-intro h1{font-size:34px!important}
.editor-page-intro .privacy-inline{font-size:13px!important;color:#53718d!important;margin-top:6px!important}
.ui-prototype .editor-page.standalone-main{max-width:1500px;padding-top:26px;padding-bottom:40px}
footer{background:#193451;color:#f5f8fb;padding:26px 0!important}
footer .legal-links{margin-top:10px;display:flex;gap:16px;flex-wrap:wrap}
footer .legal-links a{color:#e9f2fb}
@media(max-width:900px){
 .site-header-inner{align-items:flex-start;flex-direction:column;gap:8px;padding-top:12px;padding-bottom:10px}
 .site-main-nav{width:100%;margin-left:0;padding-bottom:2px}
 .site-main-nav a{font-size:13px;padding:0 9px}
 .tool-switcher{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
 .tool-switcher::-webkit-scrollbar{display:none}
 .tool-switcher>span{position:sticky;left:0;background:#fff;padding-right:6px;z-index:2;white-space:nowrap}
}
@media(max-width:640px){
 .site-brand strong{font-size:22px}
 .standalone-tool-page .standalone-main{padding-top:24px;padding-bottom:34px}
 .standalone-tool-page .standalone-intro h1{font-size:30px}
 .standalone-tool-page .standalone-intro>p{font-size:16px}
 .standalone-tool-page .standalone-active-tool{padding:18px!important}
 .standalone-tool-page .standalone-active-tool h3{font-size:22px!important}
}


/* expert review polish 2026-09-15 */
.home-page-intro{margin:30px 0 18px}
.home-page-intro h1{margin:0 0 8px;font-size:34px;line-height:1.2;color:#17243a;letter-spacing:-.025em}
.home-page-intro p{margin:0;color:#5f7286;font-size:17px;line-height:1.7}
.site-main-nav a{min-height:44px}
.tool-switcher a{min-height:44px}
@media(max-width:640px){.home-page-intro{margin:24px 0 15px}.home-page-intro h1{font-size:29px}.home-page-intro p{font-size:16px}}

/* 2026-09-15 layout breathing room + 2x2 home + full-height editor */
.site-shell>main.wrap{
  width:min(1180px,calc(100% - 48px)) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
.site-header-inner,
footer>.wrap{
  width:min(1180px,calc(100% - 48px));
}
.home-nav-grid{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:16px !important;
}
.home-nav-card{
  min-height:168px;
}
@media(max-width:700px){
  .site-shell>main.wrap,
  .site-header-inner,
  footer>.wrap{width:min(94%,1180px) !important;}
  .home-nav-grid{grid-template-columns:1fr !important;}
}

/* Editor is a workspace: use the viewport, not document-page spacing. */
body.ui-prototype.site-shell{
  height:100vh;
  min-height:100vh;
  overflow:hidden;
}
body.ui-prototype.site-shell>.site-header{
  flex:0 0 auto;
}
body.ui-prototype.site-shell>main.editor-page{
  flex:1 1 auto;
  width:min(1500px,calc(100% - 32px)) !important;
  max-width:1500px !important;
  height:auto !important;
  min-height:0 !important;
  padding:10px 0 !important;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
body.ui-prototype .editor-page-intro,
body.ui-prototype .editor-page>.tool-switcher{
  display:none !important;
}
body.ui-prototype .editor-page>.panel.editor{
  flex:1 1 auto;
  min-height:0;
  margin:0 !important;
}
body.ui-prototype .editor-workspace,
body.ui-prototype .pdf-pane,
body.ui-prototype .canvas-wrap{
  min-height:0;
}
body.ui-prototype.site-shell>footer{
  display:none !important;
}
@media(max-width:900px){
  body.ui-prototype.site-shell{height:auto;overflow:auto;}
  body.ui-prototype.site-shell>main.editor-page{width:min(94%,1500px) !important;overflow:visible;}
  body.ui-prototype.site-shell>footer{display:block !important;}
}


/* 2026-09-15 16:26 requested fixes */
/* Top: force the four primary tools into a true 2 x 2 grid on desktop. */
.home-primary-tools .home-feature-grid.home-nav-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:16px !important;
  padding:14px 18px 18px !important;
}
.home-primary-tools .home-feature-grid.home-nav-grid>.home-nav-card{
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  height:100% !important;
  min-height:168px !important;
}
@media(max-width:700px){
  .home-primary-tools .home-feature-grid.home-nav-grid{
    grid-template-columns:1fr !important;
  }
}

/* Editor: make undo / clear unmistakable action buttons. */
.ui-prototype .secondary-controls .edit-utility-group{
  display:grid !important;
  grid-template-columns:1fr 1fr;
  gap:8px !important;
  margin-top:8px;
}
.ui-prototype .secondary-controls .edit-utility-group button{
  min-height:42px !important;
  padding:8px 10px !important;
  border:1px solid #c9d6e4 !important;
  border-radius:9px !important;
  background:#f7f9fc !important;
  color:#35506d !important;
  font-weight:700 !important;
  box-shadow:0 1px 2px rgba(26,54,83,.05) !important;
}
.ui-prototype .secondary-controls .edit-utility-group button:hover{
  background:#eef4fa !important;
}
.ui-prototype .secondary-controls .edit-utility-group .quiet-danger{
  color:#8a4545 !important;
  border-color:#dfcaca !important;
  background:#fffafa !important;
}

/* Stamp: align the name field and advanced-settings control. */
.ui-prototype .simplified-stamp{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:10px !important;
  align-items:end !important;
}
.ui-prototype .simplified-stamp>label{
  margin:0 !important;
}
.ui-prototype .simplified-stamp>label>input{
  height:44px !important;
  min-height:44px !important;
  margin-top:5px !important;
}
.ui-prototype .simplified-stamp>.advanced-options{
  margin:0 !important;
  align-self:end !important;
}
.ui-prototype .simplified-stamp>.advanced-options>summary{
  height:44px !important;
  min-height:44px !important;
  padding:0 12px !important;
  display:flex !important;
  align-items:center !important;
  box-sizing:border-box !important;
}
@media(max-width:520px){
  .ui-prototype .simplified-stamp{grid-template-columns:1fr !important;}
}

/* 2026-09-15 16:xx refinement: simpler top, larger editor type, relaxed secondary tools */
.home-more-tools>.grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:16px !important;
}
.home-more-tools>.grid>.card{
  min-width:0 !important;
  padding:18px !important;
}
.home-more-tools>.grid>.card h3{
  font-size:18px !important;
  line-height:1.35 !important;
}
.home-more-tools>.grid>.card p,
.home-more-tools>.grid>.card label,
.home-more-tools>.grid>.card input,
.home-more-tools>.grid>.card select,
.home-more-tools>.grid>.card button,
.home-more-tools>.grid>.card .button-link{
  font-size:14px !important;
}
@media(max-width:980px){
  .home-more-tools>.grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}
@media(max-width:640px){
  .home-more-tools>.grid{grid-template-columns:1fr !important;}
}

/* PDF editor: keep dimensions, only increase type sizes. */
.ui-prototype .editor-sidebar,
.ui-prototype .page-organizer,
.ui-prototype .editor-sidebar button,
.ui-prototype .editor-sidebar input,
.ui-prototype .editor-sidebar select,
.ui-prototype .editor-sidebar label,
.ui-prototype .editor-sidebar summary,
.ui-prototype .editor-sidebar .hint,
.ui-prototype .editor-sidebar .ui-step-label,
.ui-prototype .editor-sidebar .ui-control-label{
  font-size:15px !important;
}
.ui-prototype .mode-buttons.one-line button{
  font-size:15px !important;
  font-weight:700 !important;
}
.ui-prototype .page-counter-display,
.ui-prototype .page-counter-editor,
.ui-prototype #editPage,
.ui-prototype #editPageTotal{
  font-size:15px !important;
}
.ui-prototype .page-organizer-head strong{font-size:15px !important;}
.ui-prototype .page-organizer-head small{font-size:12px !important;}

/* Stamp advanced layout: name field at left of the advanced-settings heading. */
.ui-prototype #stampTools .stamp-form.simplified-stamp{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:12px !important;
  align-items:start !important;
}
.ui-prototype #stampTools .stamp-form.simplified-stamp>label{
  grid-column:1 !important;
  grid-row:1 !important;
  align-self:start !important;
}
.ui-prototype #stampTools .stamp-form.simplified-stamp>.advanced-options{
  grid-column:2 !important;
  grid-row:1 !important;
  margin:0 !important;
  align-self:start !important;
}
.ui-prototype #stampTools .advanced-options>summary{
  min-height:44px !important;
  display:flex !important;
  align-items:center !important;
}
.ui-prototype #stampTools .stamp-form.simplified-stamp>label input{
  min-height:44px !important;
}
@media(max-width:640px){
  .ui-prototype #stampTools .stamp-form.simplified-stamp{grid-template-columns:1fr !important;}
  .ui-prototype #stampTools .stamp-form.simplified-stamp>label,
  .ui-prototype #stampTools .stamp-form.simplified-stamp>.advanced-options{
    grid-column:1 !important;
    grid-row:auto !important;
  }
}

/* 2026-09-15 tool reclassification */
.home-inline-tools .tool-subgroup-title{margin:18px 18px 10px;font-size:18px;color:#2c4866}
.home-inline-tools>.section-note,.home-dedicated-tools>.section-note{margin:12px 18px 4px}
.home-inline-tools .inline-tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0 18px 18px}
.home-dedicated-tools .dedicated-tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:14px 18px 18px}
.home-dedicated-tools .home-link-card{display:flex;flex-direction:column;min-height:170px}
.home-dedicated-tools .home-link-card .button-link{margin-top:auto}
@media(max-width:980px){.home-inline-tools .inline-tool-grid,.home-dedicated-tools .dedicated-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.home-inline-tools .inline-tool-grid,.home-dedicated-tools .dedicated-tool-grid{grid-template-columns:1fr;padding-left:12px;padding-right:12px}.home-inline-tools .tool-subgroup-title{margin-left:12px}.home-inline-tools>.section-note,.home-dedicated-tools>.section-note{margin-left:12px;margin-right:12px}}

/* page tools workspace */
.page-tools-page{height:100vh;overflow:hidden;background:#f5f8fc}.page-tools-page .site-header{flex:0 0 auto}.page-tools-main{flex:1;min-height:0;padding:10px 0}.page-tools-shell{width:min(1500px,calc(100% - 32px));height:100%;margin:auto;display:grid;grid-template-columns:150px minmax(0,1fr) 430px;gap:10px;background:#fff;border:1px solid #dbe3ed;border-radius:16px;padding:10px}.pt-thumbs,.pt-sidebar{border:1px solid #dbe3ed;border-radius:12px;background:#fff;min-height:0}.pt-thumbs{display:flex;flex-direction:column;padding:10px}.pt-thumbs-head{display:flex;flex-direction:column;gap:2px;font-size:14px}.pt-thumbs-head small{font-size:11px;color:#718096}.pt-thumb-list{flex:1;overflow:auto;margin-top:10px}.pt-empty{font-size:12px;color:#718096;line-height:1.6}.pt-thumb{width:100%;padding:6px;background:#fff;color:#17243a;border:1px solid transparent;border-radius:9px;margin-bottom:8px}.pt-thumb.active{border-color:#2f6fb3;background:#eef6ff}.pt-thumb canvas{max-width:100%;height:auto;display:block;margin:auto}.pt-thumb span{display:block;margin-top:4px;font-size:12px}.pt-preview{min-width:0;min-height:0}.pt-canvas-wrap{width:100%;height:100%;min-height:0;background:#e7edf4;border-radius:12px;display:flex;align-items:center;justify-content:center;overflow:auto;padding:12px;position:relative}.pt-canvas-wrap canvas{display:none;background:#fff;box-shadow:0 2px 12px rgba(20,40,70,.12)}.pt-preview-empty{color:#607185;font-size:16px}.pt-sidebar{padding:12px;overflow:auto}.pt-drop{margin:0 0 10px;min-height:64px;padding:12px}.pt-page-row{display:grid;grid-template-columns:1fr 76px 1fr;gap:8px;align-items:center;margin:10px 0}.pt-page-row button{min-height:44px}.pt-page-row strong{text-align:center}.pt-card{border:1px solid #dbe3ed;border-radius:12px;padding:13px;margin:10px 0}.pt-card h2{font-size:17px;margin:0 0 10px}.pt-action-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.pt-action-grid button{min-height:44px}.pt-number-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.pt-number-grid label{font-size:13px;font-weight:700}.pt-number-grid input,.pt-number-grid select{width:100%;min-height:42px;margin-top:5px;border:1px solid #ccd8e6;border-radius:9px;padding:8px;background:#fff}.pt-check{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:700}.pt-check input{width:18px;height:18px}.pt-save{min-height:52px;font-size:16px}.page-tools-page .quiet-danger{background:#fff7f7;color:#8f4141;border:1px solid #e8caca}@media(max-width:900px){.page-tools-page{height:auto;overflow:auto}.page-tools-main{padding:10px 0 30px}.page-tools-shell{width:min(94%,1500px);height:auto;display:block}.pt-thumbs{max-height:240px}.pt-preview{height:60vh;margin:10px 0}.pt-sidebar{overflow:visible}}

/* page-tools drag highlight */
.pt-drop.dragover{border-color:#2f6fb3 !important;background:#eef6ff !important;box-shadow:0 0 0 3px rgba(47,111,179,.12) inset;}

/* page-tools preview/rotation refinement */
.pt-canvas-wrap{align-items:flex-start !important;justify-content:center !important;scroll-padding-top:12px}
.pt-canvas-wrap canvas{transform-origin:center center;transition:transform .12s ease}
.pt-fine-rotation{margin-top:10px;padding-top:10px;border-top:1px solid #e1e8f0}
.pt-fine-rotation label{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:10px;font-size:13px;font-weight:700}
.pt-fine-rotation select{min-height:42px;border:1px solid #ccd8e6;border-radius:9px;padding:8px;background:#fff}
.pt-fine-rotation small{display:block;margin-top:6px;color:#718096;line-height:1.5}

/* 2026-09-15 grouped tools */
.tool-category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:14px 18px 18px}.tool-category-card,.group-link-card{display:flex;flex-direction:column;gap:8px;text-decoration:none;color:#17243a;border:1px solid #dbe3ed;border-radius:14px;background:#fff;padding:20px;min-height:140px}.tool-category-card strong,.group-link-card strong{font-size:20px}.tool-category-card span,.group-link-card span{color:#607185;line-height:1.6}.tool-category-card b,.group-link-card b{margin-top:auto;background:#2f6fb3;color:#fff;border-radius:9px;min-height:44px;display:flex;align-items:center;justify-content:center}.group-tool-main{max-width:1180px;padding-top:30px;padding-bottom:48px}.group-tool-intro h1{font-size:34px;margin:0 0 8px}.group-tool-intro p{font-size:17px;color:#607185}.group-feature-card{margin-top:22px;background:#fff;border:1px solid #dbe3ed;border-radius:16px;padding:22px}.group-feature-card h2{margin:0 0 8px}.group-rotate-row{display:grid;grid-template-columns:1fr 1fr 180px 180px;gap:10px;align-items:end}.group-rotate-row label{font-weight:700}.group-rotate-row input{width:100%;min-height:44px;margin-top:5px;border:1px solid #ccd8e6;border-radius:9px;padding:8px}.group-link-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}.group-link-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.group-link-card.large{min-height:190px}.group-link-card:hover,.tool-category-card:hover{border-color:#9ebfe1;background:#fbfdff}@media(max-width:800px){.tool-category-grid,.group-link-grid,.group-link-grid.two{grid-template-columns:1fr}.group-rotate-row{grid-template-columns:1fr 1fr}.group-rotate-row label,.group-rotate-row #gpRotateCustom{grid-column:span 1}}


/* 2026-09-15 grouped navigation and functional category pages */
.grouped-nav{overflow:visible!important;gap:3px!important}.grouped-nav>.nav-group{position:relative;display:flex;align-items:center}.grouped-nav>.nav-group>button,.grouped-nav>.nav-home,.grouped-nav>.nav-direct{border:0;background:transparent;color:#40556c;width:auto;min-height:44px;padding:0 10px;border-radius:9px;font-size:14px;font-weight:700;white-space:nowrap;text-decoration:none;display:flex;align-items:center;justify-content:center}.grouped-nav>.nav-group>button:hover,.grouped-nav>.nav-group:focus-within>button,.grouped-nav>.nav-home:hover,.grouped-nav>.nav-direct:hover{background:#eaf3fb;color:#1e5f9f}.grouped-nav .nav-menu{display:none;position:absolute;top:calc(100% - 2px);left:0;min-width:210px;padding:7px;background:#fff;border:1px solid #d7e2ed;border-radius:10px;box-shadow:0 12px 30px rgba(31,66,112,.16);z-index:100}.grouped-nav .nav-group:hover .nav-menu,.grouped-nav .nav-group:focus-within .nav-menu{display:block}.grouped-nav .nav-menu a{display:flex;align-items:center;min-height:40px;padding:7px 10px;border-radius:7px;color:#334e68;text-decoration:none;font-size:14px;font-weight:650}.grouped-nav .nav-menu a:hover{background:#edf5fc;color:#1d5e9f}
.group-work-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.group-work-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.group-work-grid .group-feature-card{margin:0;display:flex;flex-direction:column}.group-work-grid .group-feature-card>button,.group-work-grid .group-feature-card>.button-link{margin-top:auto}.group-feature-card .drop{margin:12px 0}
.processing-page{height:100vh;overflow:hidden;background:#f5f8fc}.processing-main{flex:1;min-height:0;padding:10px 0}.processing-shell{width:min(1500px,calc(100% - 32px));height:100%;margin:auto;display:grid;grid-template-columns:150px minmax(0,1fr) 450px;gap:10px;background:#fff;border:1px solid #dbe3ed;border-radius:16px;padding:10px}.processing-thumbs,.processing-sidebar{border:1px solid #dbe3ed;border-radius:12px;background:#fff;min-height:0}.processing-thumbs{padding:10px;display:flex;flex-direction:column}.processing-thumbs-head{display:flex;flex-direction:column;gap:2px}.processing-thumbs-head small{font-size:11px;color:#718096}.processing-thumb-list{flex:1;overflow:auto;margin-top:10px}.processing-thumb{width:100%;padding:6px;background:#fff;color:#17243a;border:1px solid transparent;border-radius:9px;margin-bottom:8px}.processing-thumb.active{border-color:#2f6fb3;background:#eef6ff}.processing-thumb canvas{max-width:100%;height:auto;display:block;margin:auto}.processing-thumb span{display:block;margin-top:4px;font-size:12px}.processing-preview{min-width:0;min-height:0}.processing-canvas-wrap{width:100%;height:100%;min-height:0;background:#e7edf4;border-radius:12px;display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:12px}.processing-canvas-wrap canvas{display:none;background:#fff;box-shadow:0 2px 12px rgba(20,40,70,.12)}.processing-preview-empty{align-self:center;color:#607185}.processing-sidebar{padding:12px;overflow:auto}.processing-drop{margin:0 0 10px;min-height:64px}.processing-page-row{display:grid;grid-template-columns:1fr 76px 1fr;gap:8px;align-items:center}.processing-page-row strong{text-align:center}.processing-tool-card{border:1px solid #dbe3ed;border-radius:12px;padding:11px;margin-top:10px}.processing-tool-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:12px}.processing-tool-tabs button{background:#fff;color:#40566f;border:1px solid #ccd8e6;padding:9px 6px}.processing-tool-tabs button.active{background:#2f6fb3;color:#fff;border-color:#2f6fb3}.processing-pane{display:none}.processing-pane.active{display:block}.processing-pane h2{font-size:18px;margin:0 0 10px}.processing-pane label{display:block;font-weight:700;font-size:14px;margin:9px 0}.processing-pane input,.processing-pane select{width:100%;min-height:42px;border:1px solid #ccd8e6;border-radius:9px;padding:8px;background:#fff;margin-top:5px}.processing-row{display:grid;gap:8px}.processing-row.two{grid-template-columns:1fr 1fr}.processing-row.three{grid-template-columns:repeat(3,1fr)}.processing-inline{display:grid;grid-template-columns:1fr 110px;gap:8px;align-items:end}.processing-inline button{min-height:42px}.processing-drop.dragover{border-color:#2f6fb3!important;background:#eef6ff!important}
@media(max-width:1000px){.grouped-nav .nav-menu{position:fixed;left:12px;right:12px;top:115px}.group-work-grid,.group-work-grid.two{grid-template-columns:1fr}.processing-page{height:auto;overflow:auto}.processing-shell{width:min(94%,1500px);height:auto;display:block}.processing-thumbs{max-height:220px}.processing-preview{height:60vh;margin:10px 0}.processing-sidebar{overflow:visible}}

/* 2026-09-15 page processing cumulative preview */
.processing-tool-tabs-3x2{grid-template-columns:repeat(3,1fr)!important}
.processing-check{display:flex!important;align-items:center;gap:8px;font-weight:700;margin:10px 0!important}
.processing-check input{width:18px!important;height:18px!important;min-height:18px!important;margin:0!important}
.processing-save{width:100%;min-height:52px;margin-top:10px;font-size:16px;font-weight:800}
@media(max-width:640px){.processing-tool-tabs-3x2{grid-template-columns:repeat(2,1fr)!important}.processing-row.three{grid-template-columns:1fr!important}}

/* 2026-09-15 robust grouped drag/drop + clean diagnosis */
label.drop[data-robust-drop="1"].dragover{border-color:#2f6fb3!important;background:#eaf4ff!important;box-shadow:0 0 0 3px rgba(47,111,179,.12) inset!important}
.diagnose-only-main{max-width:980px!important;padding-top:34px;padding-bottom:48px}.diagnose-only-card{background:#fff;border:1px solid #dbe3ed;border-radius:18px;padding:24px}.diagnose-only-card .diagnose-drop{min-height:110px;display:flex;align-items:center;justify-content:center}.diagnose-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.diagnose-actions .diagnose-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border-radius:9px;background:#2f6fb3;color:#fff;text-decoration:none;font-weight:800}.diagnose-actions .diagnose-link.secondary{background:#6c7d91}

/* 2026-09-15 drop + bookmark + other diagnose fixes */
.processing-shell.whole-drop-active{box-shadow:0 0 0 3px rgba(47,111,179,.22) inset;background:#f7fbff}
.group-feature-card.card-drop-active{box-shadow:0 0 0 3px rgba(47,111,179,.18) inset;background:#f8fbff}
.bookmark-card>label:not(.drop){display:grid;grid-template-columns:120px minmax(0,1fr);gap:10px;align-items:center;margin:8px 0;font-weight:700}
.bookmark-card>label:not(.drop)>select,.bookmark-card>label:not(.drop)>input{width:100%;min-height:42px;border:1px solid #ccd8e6;border-radius:9px;padding:8px 10px;background:#fff;font:inherit}
.other-diagnose-card .result{max-height:340px;overflow:auto;text-align:left}.other-diagnose-card .diagnose-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.other-diagnose-card .diagnose-link{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 12px;border-radius:9px;background:#2f6fb3;color:#fff;text-decoration:none;font-weight:700}.other-diagnose-card .diagnose-link.secondary{background:#6c7d91}
@media(max-width:640px){.bookmark-card>label:not(.drop){grid-template-columns:1fr;gap:4px}}

/* page-tools stable fit + drag target */
.page-tools-shell:has(.pt-drop.dragover){box-shadow:0 0 0 3px rgba(47,111,179,.18) inset;background:#f8fbff}
.pt-canvas-wrap canvas{max-width:100%;max-height:100%;object-fit:contain}

/* Global file drag & drop: single implementation for all PDF tools */
.universal-dragover{outline:3px solid rgba(47,111,179,.32)!important;outline-offset:-3px;background-color:#eef6ff!important}
[data-file-drop-target].universal-dragover{box-shadow:0 0 0 3px rgba(47,111,179,.18) inset!important}
/* 2026-09-15 header brand + nav font normalization */
.site-brand{flex-direction:row!important;align-items:center!important;line-height:1!important;gap:0}
.site-brand strong{font-size:30px!important;letter-spacing:-.035em!important;white-space:nowrap}
.site-brand span{font-size:12px!important;color:#6b7d90!important;margin:0 0 0 14px!important;padding-left:14px;border-left:1px solid #d8e1eb;white-space:nowrap;line-height:1.3}
.grouped-nav>.nav-group>button,.grouped-nav>.nav-home,.grouped-nav>.nav-direct,.grouped-nav .nav-menu a{font-family:inherit!important}
@media(max-width:640px){
  .site-brand strong{font-size:26px!important}
  .site-brand span{font-size:11px!important;margin-left:10px!important;padding-left:10px!important}
}

/* 2026-09-15 editor/processing thumbnail reorder alignment */
.page-organizer{padding-top:10px}
.page-thumb{cursor:grab!important;padding:6px!important;border:1px solid transparent!important;margin-bottom:8px}
.page-thumb:active,.processing-thumb:active{cursor:grabbing!important}
.page-thumb .thumb-page-number{display:block;margin-top:4px;font-size:12px;text-align:left;color:#40566f;font-weight:700}
.page-thumb.dragover,.processing-thumb.dragover{border-color:#2f6fb3!important;background:#eef6ff!important;box-shadow:0 0 0 2px rgba(47,111,179,.12)}
.page-thumb.dragging,.processing-thumb.dragging{opacity:.45}
.processing-thumb{cursor:grab}

/* 2026-09-15 page reorder insertion marker */
.page-thumb,.processing-thumb{position:relative}
.page-thumb.insert-before::before,.processing-thumb.insert-before::before,.page-thumb.insert-after::after,.processing-thumb.insert-after::after{content:"";position:absolute;left:4px;right:4px;height:4px;border-radius:999px;background:#2f6fb3;z-index:8;pointer-events:none;box-shadow:0 0 0 2px rgba(47,111,179,.12)}
.page-thumb.insert-before::before,.processing-thumb.insert-before::before{top:-7px}
.page-thumb.insert-after::after,.processing-thumb.insert-after::after{bottom:-7px}
.page-thumb.insert-before,.page-thumb.insert-after,.processing-thumb.insert-before,.processing-thumb.insert-after{border-color:transparent!important;background:#fff!important}
@media(max-width:1000px){.page-thumb.insert-before::before,.processing-thumb.insert-before::before,.page-thumb.insert-after::after,.processing-thumb.insert-after::after{top:4px;bottom:4px;width:4px;height:auto;left:auto;right:auto}.page-thumb.insert-before::before,.processing-thumb.insert-before::before{left:-7px}.page-thumb.insert-after::after,.processing-thumb.insert-after::after{right:-7px}}

/* 2026-09-15 unified page reorder UI + visible first insertion position */
.pt-thumbs-head{display:flex;flex-direction:column;gap:2px}.pt-thumbs-head small{font-size:11px;color:#718096}
.pt-thumb{position:relative;cursor:grab!important}.pt-thumb:active{cursor:grabbing!important}.pt-thumb.dragging{opacity:.45}
.pt-thumb.insert-before::before,.pt-thumb.insert-after::after{content:"";position:absolute;left:4px;right:4px;height:4px;border-radius:999px;background:#2f6fb3;z-index:8;pointer-events:none;box-shadow:0 0 0 2px rgba(47,111,179,.12)}
.pt-thumb.insert-before::before{top:-7px}.pt-thumb.insert-after::after{bottom:-7px}
.pt-thumb.insert-before,.pt-thumb.insert-after{border-color:transparent!important;background:#fff!important}
.pt-thumb-list,.processing-thumb-list,.page-thumb-list{padding-top:9px!important}
@media(max-width:1000px){
 .pt-thumb.insert-before::before,.pt-thumb.insert-after::after{top:4px;bottom:4px;width:4px;height:auto;left:auto;right:auto}
 .pt-thumb.insert-before::before{left:-7px}.pt-thumb.insert-after::after{right:-7px}
}

/* 2026-09-15 visible thumbnail scrollbars */
@media(min-width:1001px){
  .pt-thumb-list,.processing-thumb-list,.page-thumb-list{
    overflow-y:scroll!important;
    overflow-x:hidden!important;
    scrollbar-width:thin;
    scrollbar-color:#93a6bb #eef3f8;
    padding-right:6px!important;
  }
  .pt-thumb-list::-webkit-scrollbar,.processing-thumb-list::-webkit-scrollbar,.page-thumb-list::-webkit-scrollbar{width:8px}
  .pt-thumb-list::-webkit-scrollbar-track,.processing-thumb-list::-webkit-scrollbar-track,.page-thumb-list::-webkit-scrollbar-track{background:#eef3f8;border-radius:999px}
  .pt-thumb-list::-webkit-scrollbar-thumb,.processing-thumb-list::-webkit-scrollbar-thumb,.page-thumb-list::-webkit-scrollbar-thumb{background:#93a6bb;border-radius:999px;border:2px solid #eef3f8}
}
@media(max-width:1000px){
  .pt-thumb-list,.processing-thumb-list,.page-thumb-list{scrollbar-width:thin}
}


/* 2026-09-15 thumbnail panes: real bounded scrolling */
@media(min-width:1001px){
  body.ui-prototype .editor-workspace{height:100%!important;overflow:hidden!important;align-items:stretch!important}
  body.ui-prototype .page-organizer{height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  body.ui-prototype .page-organizer-head{flex:0 0 auto!important}
  body.ui-prototype .page-thumb-list{flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain}

  .page-tools-shell,.processing-shell{min-height:0!important;overflow:hidden!important}
  .pt-thumbs,.processing-thumbs{height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  .pt-thumbs-head,.processing-thumbs-head{flex:0 0 auto!important}
  .pt-thumb-list,.processing-thumb-list{flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain}
}


/* 2026-09-15 pre-publish mobile UX cleanup */
@media(max-width:900px){
  html,body{max-width:100%;overflow-x:hidden!important}
  .site-header-inner{width:min(94%,1180px)!important;align-items:stretch!important;gap:8px!important}
  .site-brand{align-self:flex-start;max-width:100%;flex-wrap:wrap!important;row-gap:4px}
  .site-brand span{white-space:normal!important;border-left:0!important;padding-left:0!important;margin-left:10px!important}
  .site-main-nav,.grouped-nav{width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;overflow:visible!important;padding:0!important}
  .grouped-nav>.nav-group,.grouped-nav>.nav-home,.grouped-nav>.nav-direct{min-width:0!important;width:100%!important}
  .grouped-nav>.nav-group>button,.grouped-nav>.nav-home,.grouped-nav>.nav-direct{width:100%!important;min-width:0!important;padding:0 5px!important;font-size:12px!important;white-space:normal!important;text-align:center!important;line-height:1.2}
  .grouped-nav .nav-menu{top:112px!important;max-height:calc(100vh - 130px);overflow-y:auto}
  body.ui-prototype.site-shell{height:auto!important;min-height:100vh!important;overflow-x:hidden!important;overflow-y:auto!important}
  body.ui-prototype.site-shell>main.editor-page{width:min(94%,1500px)!important;overflow:visible!important;height:auto!important}
  body.ui-prototype .editor-page>.panel.editor{overflow:visible!important;padding:8px!important}
  body.ui-prototype .editor-workspace{display:block!important;height:auto!important;overflow:visible!important}
  body.ui-prototype .page-organizer{height:auto!important;max-height:none!important;margin-bottom:10px!important;overflow:visible!important}
  body.ui-prototype .page-thumb-list{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;overflow:visible!important;height:auto!important;max-height:none!important;padding:0!important}
  body.ui-prototype .page-thumb{width:auto!important;min-width:0!important;margin:0!important}
  body.ui-prototype .page-thumb canvas{width:100%!important;height:auto!important;max-height:none!important}
  body.ui-prototype .pdf-pane{height:auto!important;margin:0 0 10px!important}
  body.ui-prototype .canvas-wrap{height:auto!important;min-height:48vh!important;max-height:none!important;overflow:auto!important}
  body.ui-prototype #editCanvas{max-width:100%!important;height:auto!important}
  body.ui-prototype .editor-sidebar{height:auto!important;max-height:none!important;overflow:visible!important;margin-top:10px!important}
}
@media(max-width:520px){
  .site-main-nav,.grouped-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.ui-prototype .page-thumb-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* bilingual language switch */
.language-switch{display:flex;align-items:center;gap:6px;margin-left:10px;white-space:nowrap;font-size:12px;color:#687b91}
.language-switch button{appearance:none;border:0;background:transparent;padding:5px 3px;color:inherit;font:inherit;cursor:pointer;border-bottom:2px solid transparent}
.language-switch button:hover,.language-switch button.active{color:#173b63;border-bottom-color:#2e73b9;font-weight:700}
@media(max-width:900px){.site-header-inner{flex-wrap:wrap}.language-switch{order:2;margin-left:auto}.site-main-nav{order:3;width:100%}}
@media(max-width:640px){.language-switch{font-size:11px;margin-left:0}.language-switch button{padding:4px 2px}}
html[data-lang="en"] .tool-group[open]>summary small::after{content:'Click to collapse'}
html[data-lang="en"] .hf-section[open]>summary small::after{content:'Click to collapse'}

/* 2026-10-27: keep grouped navigation within medium desktop widths. */
@media (min-width:901px) and (max-width:1180px){
  .site-header-inner{flex-wrap:wrap!important;row-gap:4px!important}
  .site-main-nav.grouped-nav{
    order:3!important;flex:1 1 100%!important;display:flex!important;flex-wrap:wrap!important;
    justify-content:center!important;gap:4px 10px!important;width:100%!important;max-width:100%!important;
    margin:0!important;padding:0 0 8px!important
  }
  .site-header-inner .language-switch{order:2!important;margin-left:auto!important}
  .grouped-nav > .nav-group,.grouped-nav > .nav-home{flex:0 0 auto!important}
}


/* patto-lang-review-fix-20261027
 * Grouped navigation requires more width than available next to site brand
 * and language switch. Keep navigation on its own row to avoid obscuring
 * language switch buttons on wide desktop screens.
 */
@media (min-width:1181px){
 .site-header-inner{
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;
  column-gap:12px!important;row-gap:6px!important;padding-top:9px!important;padding-bottom:7px!important
 }
 .site-header-inner>.site-brand{order:1!important;flex:0 1 auto!important;min-width:0}
 .site-header-inner>.language-switch{
  order:2!important;position:relative!important;z-index:110!important;
  flex:0 0 auto!important;margin-left:auto!important
 }
 .site-header-inner>.site-main-nav.grouped-nav{
  order:3!important;flex:1 1 100%!important;width:100%!important;
  max-width:100%!important;margin:0!important;min-width:0!important;
  justify-content:center!important;gap:3px 14px!important;align-items:center!important;
  overflow:visible!important
 }
 .site-header-inner>.site-main-nav.grouped-nav>.nav-group{flex:0 0 auto!important}
}


/* 2026-10-27 Unified compact single-row navigation for tool/article/legal pages.
   Keep grouped menu popovers un-clipped and language selector always visible. */
@media (min-width:901px) {
  .site-header .site-header-inner {
    width:min(96%,1500px)!important;
    max-width:1500px!important;
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    column-gap:clamp(6px,.75vw,16px)!important;
    row-gap:0!important;
    min-height:65px!important;
    padding-top:7px!important;
    padding-bottom:7px!important
  }
  .site-header-inner>.site-brand {
    order:1!important;
    flex:0 0 auto!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:baseline!important;
    gap:10px!important;
    min-width:0!important;
    margin-right:auto!important;
    white-space:nowrap!important
  }
  .site-header-inner>.site-brand strong{font-size:clamp(18px,1.65vw,24px)!important}
  .site-header-inner>.site-brand span{margin:0!important;font-size:clamp(11px,.83vw,13px)!important}
  .site-header-inner>.site-main-nav.grouped-nav {
    order:2!important;
    flex:0 1 auto!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:0!important;
    overflow:visible!important
  }
  .site-header-inner>.site-main-nav.grouped-nav > .nav-group,
  .site-header-inner>.site-main-nav.grouped-nav > .nav-home,
  .site-header-inner>.site-main-nav.grouped-nav > .nav-direct{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important
  }
  .site-header-inner .grouped-nav>.nav-group>button,
  .site-header-inner .grouped-nav>.nav-home,
  .site-header-inner .grouped-nav>.nav-direct{
    min-height:39px!important;
    padding:0 clamp(4px,.65vw,10px)!important;
    font-size:clamp(11px,.83vw,13px)!important;
    white-space:nowrap!important
  }
  .site-header-inner>.language-switch {
    order:3!important;
    flex:0 0 auto!important;
    position:relative!important;
    z-index:110!important;
    margin:0!important;
    font-size:12px!important
  }
}
@media (min-width:901px) and (max-width:1120px) {
  .site-header-inner>.site-brand span{display:none!important}
  .site-header-inner>.site-brand strong{font-size:19px!important}
  .site-header-inner>.site-main-nav.grouped-nav{margin-left:auto!important}
}


/* Compact, accessible help: 30 feature pages, native details, closed by default.
   HTML help remains in the original document and is never click-to-load. */
details.seo-guide,
details.solo-guide {
  display:block!important;
  padding:0!important;
  margin:20px 0 28px!important;
  border:1px solid #dce5ef!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#24334a;
  overflow:hidden;
}
details.seo-guide > summary,
details.solo-guide > summary {
  display:flex!important;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  min-height:54px;
  padding:14px 18px!important;
  margin:0!important;
  cursor:pointer;
  font-size:clamp(14px,1.02rem,17px)!important;
  font-weight:700!important;
  line-height:1.45!important;
  list-style:none!important;
}
details.seo-guide > summary::-webkit-details-marker,
details.solo-guide > summary::-webkit-details-marker {display:none}
details.seo-guide > summary::marker,
details.solo-guide > summary::marker {content:""}
details.seo-guide > summary:focus-visible,
details.solo-guide > summary:focus-visible {
  outline:3px solid #88b9ed!important;
  outline-offset:-3px;
}
details.seo-guide > summary:hover,
details.solo-guide > summary:hover {background:#f3f8ff}
details.seo-guide[open] > summary,
details.solo-guide[open] > summary {border-bottom:1px solid #e5edf5}
details.seo-guide > .seo-guide-body,
details.solo-guide > .solo-guide-content {
  padding:18px clamp(18px,2.5vw,26px) 24px!important;
  margin:0!important;
  line-height:1.8;
}
details.seo-guide:not([open]) > .seo-guide-body,
details.solo-guide:not([open]) > .solo-guide-content {display:none!important}
details.seo-guide .guide-usage-content {margin-bottom:20px}
details.seo-guide .guide-usage-content h2:first-child {margin-top:0}
details.seo-guide .guide-usage-content + h2 {border-top:1px solid #edf1f6;padding-top:20px}
details.seo-guide .guide-usage-content .patto-related {margin-bottom:8px}
@media(max-width:640px){
  details.seo-guide,details.solo-guide {margin:14px 0 22px!important}
  details.seo-guide > summary,details.solo-guide > summary {padding:13px 14px!important}
  details.seo-guide > .seo-guide-body,
  details.solo-guide > .solo-guide-content {padding:14px 16px 20px!important}
}


/* 2026-10-27: Workspace tools: place help after the actual document editor.
   Sidebar controls stay unobstructed.  Native closed details remain crawlable. */
body.page-tools-page, body.processing-page {
  height:auto!important;
  min-height:100vh!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body.page-tools-page > main.page-tools-main,
body.processing-page > main.processing-main {
  display:block!important;
  width:100%;
  flex:0 0 auto!important;
  min-height:0!important;
  height:auto!important;
  padding:10px 0 28px!important;
}
body.page-tools-page .page-tools-shell,
body.processing-page .processing-shell{
  height:clamp(580px,calc(100dvh - 110px),900px)!important;
  min-height:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body.page-tools-page .pt-sidebar,
body.processing-page .processing-sidebar {padding-top:43px!important}
body.page-tools-page > main > details.seo-guide.patto-feature-guide,
body.processing-page > main > details.seo-guide.patto-feature-guide {
  position:static!important;
  display:block!important;
  box-sizing:border-box!important;
  inset:auto!important;
  transform:none!important;
  overflow:visible!important;
  width:min(1500px,calc(100% - 32px))!important;
  max-width:1500px!important;
  margin:18px auto 16px!important;
  z-index:auto!important;
  box-shadow:none!important;
}
body.page-tools-page > footer.patto-sidebar-legal,
body.processing-page > footer.patto-sidebar-legal{
  width:min(1500px,calc(100% - 32px));
  box-sizing:border-box;
  margin:0 auto 18px!important;
  padding:12px 16px!important;
  background:transparent!important;
  border-top:1px solid #dce5ef;
  justify-content:center;
  flex:0 0 auto;
}
body.page-tools-page > footer.patto-sidebar-legal a,
body.processing-page > footer.patto-sidebar-legal a {color:#426385}

/* Single-function cards: align help, active card and title to ONE centre line.
   Do not affect the grouped multi-tool landing pages. */
body.patto-feature-page.group-tool-page .group-tool-main > .group-tool-intro {
  width:min(900px,100%)!important;
  max-width:900px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
body.patto-feature-page.group-tool-page .group-tool-main > .group-work-grid {
  justify-content:center!important;
  justify-items:stretch!important;
}
body.patto-feature-page.group-tool-page .group-tool-main > details.seo-guide.patto-feature-guide {
  width:min(900px,100%)!important;
  max-width:900px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
body.patto-feature-page.group-tool-page .group-tool-main > .status {
  max-width:900px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
@media (max-width:1000px) {
  body.page-tools-page .page-tools-shell,
  body.processing-page .processing-shell {
    width:min(94%,1500px)!important;
    height:auto!important;
    display:block!important;
  }
  body.page-tools-page .pt-thumbs,
  body.processing-page .processing-thumbs {max-height:240px!important}
  body.page-tools-page .pt-preview,
  body.processing-page .processing-preview {height:55vh!important;min-height:300px!important;margin:10px 0!important}
  body.page-tools-page .pt-sidebar,
  body.processing-page .processing-sidebar {height:auto!important;overflow:visible!important}
  body.page-tools-page > main > details.seo-guide.patto-feature-guide,
  body.processing-page > main > details.seo-guide.patto-feature-guide {width:min(94%,1500px)!important}
}


/* 2026-10-28: one consistent, single-horizontal-row footer across all pages.
   The footer's own row scrolls on narrow screens without widening the site. */
body > footer.patto-unified-footer {
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  flex:0 0 auto!important;
  height:auto!important;
  min-height:0!important;
  margin-top:auto!important;
  margin-bottom:0!important;
  padding:14px 0!important;
  background:#193451!important;
  color:#f5f8fb!important;
  overflow:hidden!important;
}
body > footer.patto-unified-footer .patto-unified-footer-inner{
  box-sizing:border-box!important;
  width:calc(100% - 48px)!important;
  max-width:none!important;
  margin:0 24px!important;
  padding:0!important;
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:0!important;
  min-height:39px;
  white-space:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
}
body > footer.patto-unified-footer .patto-unified-footer-links{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:max-content!important;
  gap:clamp(12px,1.6vw,22px)!important;
  margin:0!important;
  padding:0!important;
  white-space:nowrap!important;
}
body > footer.patto-unified-footer a{
  flex:0 0 auto!important;
  display:inline-block!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:6px 0!important;
  background:none!important;
  color:#e9f2fb!important;
  font-size:13px!important;
  font-weight:500!important;
  line-height:1.4!important;
  text-decoration:underline;
  text-underline-offset:3px;
}
body > footer.patto-unified-footer a:focus-visible{
  outline:2px solid #a9d3ff;
  outline-offset:3px;
}
@media (max-width:900px){
 body > footer.patto-unified-footer .patto-unified-footer-inner {
   width:calc(100% - 24px)!important;
   margin:0 12px!important;
   justify-content:flex-start!important;
   gap:20px!important;
 }
}

/* Single-operation pages previously positioned their title relative to the
   entire document, leaving a blank strip above the PDF drop target. */
body.page-tools-page .pt-sidebar,
body.processing-page .processing-sidebar {
  padding:12px!important;
  overflow-y:auto;
}
body.page-tools-page .pt-sidebar>.patto-solo-title,
body.processing-page .processing-sidebar>.patto-solo-title{
  position:static!important;
  inset:auto!important;
  display:block!important;
  width:auto!important;
  height:auto!important;
  margin:0 0 10px!important;
  padding:0!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.35!important;
}
/* Shared multi-tool pages without a solo title can start with upload control. */
body.page-tools-page .pt-sidebar:not(:has(>.patto-solo-title))>.drop,
body.processing-page .processing-sidebar:not(:has(>.patto-solo-title))>.drop {
  margin-top:0!important;
}
/* Help for common page-tools & processing pages now lives below workspace. */
body.page-tools-page > main.page-tools-main > details.seo-guide,
body.processing-page > main.processing-main > details.seo-guide {
  position:static!important;
  inset:auto!important;
  width:min(1500px,calc(100% - 32px))!important;
  max-width:1500px!important;
  box-sizing:border-box!important;
  margin:18px auto 16px!important;
  display:block!important;
  transform:none!important;
  overflow:visible!important;
}

/* Editor: retain a usable canvas while showing help and footer beneath it. */
body.ui-prototype.site-shell {
  min-height:100vh!important;
  height:auto!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body.ui-prototype.site-shell > main.editor-page {
  flex:0 0 auto!important;
  height:auto!important;
  min-height:0!important;
  padding-bottom:24px!important;
}
body.ui-prototype.site-shell main.editor-page > .panel.editor{
  box-sizing:border-box!important;
  height:clamp(580px,calc(100dvh - 125px),960px)!important;
  min-height:580px!important;
  flex:0 0 auto!important;
}
body.ui-prototype.site-shell main.editor-page > details.seo-guide{
  display:block!important;
  box-sizing:border-box!important;
  position:static!important;
  inset:auto!important;
  transform:none!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:18px auto 0!important;
  z-index:auto!important;
}
@media(max-width:900px){
 body.ui-prototype.site-shell main.editor-page > .panel.editor{
   height:auto!important;
   min-height:0!important;
   flex:0 0 auto!important;
 }
 body.ui-prototype.site-shell main.editor-page > details.seo-guide{
   width:100%!important;
 }
}
/* Editor used to deliberately hide its footer at desktop widths. Override that
   historical workspace rule so the unified footer is visible on every page. */
body.ui-prototype.site-shell > footer.patto-unified-footer {
  display:block!important;
  position:static!important;
  visibility:visible!important;
}


/* 2026-10-28: one full-width space on EACH side of the header separator.
   The old flex gap + left border + padding made the spacing asymmetric. */
.site-header-inner > .site-brand {
  gap:0!important;
}
.site-header-inner > .site-brand > span {
  margin-left:0!important;
  padding-left:0!important;
  border-left:0!important;
}
.site-header-inner > .site-brand > span::before {
  content:"　　";
  white-space:pre;
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
}


/* 2026-10-28: short solo tools now have the footer at the viewport bottom. */
body.solo-viewport-page {
  min-height:100vh!important;
  display:flex!important;
  flex-direction:column!important;
}
body.solo-viewport-page > main.solo-wrap {
  flex:1 0 auto!important;
  width:min(100%,1000px)!important;
}
/* Editor: section heading instead of a duplicated full-size warning card.
   The important rasterization/privacy warning remains next to Save. */
body.ui-prototype .editor-sidebar > .editor-sidebar-title {
  display:block;
  flex:0 0 auto!important;
  margin:0 0 12px!important;
  padding:0!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.35!important;
  color:#17243a;
}


/* 2026-10-28 Mobile touch and legibility improvements. DESKTOP UNCHANGED.
   Mobile-only, to avoid disturbing the approved desktop layout. */
@media screen and (max-width:640px) {
  /* Keep the brand readable and let its subtitle wrap without clipping. */
  .site-header-inner > .site-brand > span {
    font-size:13px!important;
    line-height:1.5!important;
  }
  /* Language selector must be large enough for thumb interaction. */
  .site-header-inner > .language-switch {
    width:100%!important;
    margin:2px 0 0!important;
    justify-content:flex-end!important;
    gap:6px!important;
    font-size:14px!important;
    line-height:1.3!important;
  }
  .site-header-inner > .language-switch button {
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:44px!important;
    min-width:68px!important;
    padding:8px 10px!important;
    font-size:14px!important;
    line-height:1.35!important;
  }
  /* All primary nav controls and dropdown options are at least 44px tall. */
  .site-header-inner > .site-main-nav.grouped-nav .nav-home,
  .site-header-inner > .site-main-nav.grouped-nav > .nav-group > button,
  .site-header-inner > .site-main-nav.grouped-nav .nav-menu a {
    box-sizing:border-box!important;
    min-height:44px!important;
    font-size:14px!important;
    line-height:1.35!important;
  }
  .site-header-inner > .site-main-nav.grouped-nav .nav-menu a {
    display:flex!important;
    align-items:center!important;
    padding:10px 12px!important;
  }
  /* Preserve one horizontal row, with a 44px tap area even when scrolling. */
  body > footer.patto-unified-footer .patto-unified-footer-links a {
    box-sizing:border-box!important;
    min-height:44px!important;
    padding:11px 0!important;
    font-size:14px!important;
    line-height:22px!important;
  }
  body > footer.patto-unified-footer .patto-unified-footer-links {
    gap:18px!important;
  }
  /* The logo is a link as well: do not leave it as a 26px tap target. */
  .site-header-inner > .site-brand {
    box-sizing:border-box!important;
    min-height:44px!important;
    align-items:center!important;
  }
  details.seo-guide .seo-guide-cue,
  details.solo-guide .seo-guide-cue {
    font-size:14px!important;
  }
}
