/* ============================================================
   Free Resume Maker - builder.css
   App layout for builder.html. Mobile: one panel at a time with
   a bottom tab bar. Laptop: editor on the left, live page on the right.
   ============================================================ */

body.app { background: var(--mist); min-height: 100vh; min-height: 100dvh; }

/* Top bar */
.app-bar { position: sticky; top: 0; z-index: 50; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.app-bar .logo { font-size: 1.05rem; }
.app-bar .logo-icon { width: 32px; height: 32px; }
.save-state { font-size: .85rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.save-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #22a06b; }
.save-state.bad { color: var(--danger); }
.save-state.bad::before { background: var(--danger); }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.more { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.3); padding: 6px; min-width: 280px; z-index: 60; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 11px 12px; border-radius: 8px; cursor: pointer; font-size: .95rem; color: var(--ink); }
.menu button:hover, .menu button:focus-visible { background: var(--mist); }
.menu button small { display: block; color: var(--ink-3); font-size: .8rem; }
.menu .danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Layout */
.app-body { display: grid; grid-template-columns: minmax(380px, 470px) 1fr; min-height: calc(100vh - 68px); }
.side { border-right: 1px solid var(--line); background: var(--paper); height: calc(100vh - 68px); overflow-y: auto; position: sticky; top: 68px; overscroll-behavior: contain; }
.seg { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.seg button { border: 0; background: var(--mist); color: var(--ink-2); border-radius: 999px; padding: 9px 0; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--paper); }
.panel { padding: 16px 16px 40px; }
.panel-design, .panel-edit { display: none; }
body[data-panel="edit"] .panel-edit, body[data-panel="preview"] .panel-edit, body[data-panel="design"] .panel-design { display: block; }
.panel-preview { display: flex; flex-direction: column; min-width: 0; }
.preview-bar { display: flex; align-items: center; gap: 14px; padding: 12px 28px; color: var(--ink-2); font-size: .92rem; flex-wrap: wrap; }
.preview-bar b { color: var(--ink); }
.preview-bar .link { margin-left: auto; background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; padding: 6px 0; }
.preview-scroll { flex: 1; padding: 0 28px 48px; overflow-x: hidden; }
.paper-wrap { position: relative; margin: 0 auto; box-shadow: var(--shadow-paper); background: #fff; overflow: hidden; border-radius: 2px; }
#paper { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.page-guide { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed #e0574b; z-index: 2; pointer-events: none; }
.page-guide span { position: absolute; right: 6px; top: 2px; font-size: 11px; color: #c0392b; background: #fff; padding: 0 6px; border-radius: 4px; font-weight: 600; }

/* Bottom tab bar (phones / tablets) */
.tabbar { display: none; }

@media (max-width: 1023px) {
  .app-body { display: block; min-height: 0; }
  .side { height: auto; position: static; border-right: 0; overflow: visible; background: transparent; }
  .seg { display: none; }
  .panel { padding: 14px 14px 110px; max-width: 720px; margin: 0 auto; }
  .panel-preview { display: none; }
  body[data-panel="preview"] .panel-edit { display: none; }
  body[data-panel="preview"] .panel-preview { display: flex; }
  .preview-bar { padding: 12px 14px; }
  .preview-scroll { padding: 0 12px 110px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--paper); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: .78rem; font-weight: 600; color: var(--ink-3); cursor: pointer; border-radius: 10px; min-height: 52px; justify-content: center; }
  .tabbar svg { width: 22px; height: 22px; fill: currentColor; }
  .tabbar button.on { color: var(--brand); background: var(--brand-tint); }
  .tabbar .tab-dl { color: #fff; background: var(--brand); }
  [data-theme="dark"] .tabbar .tab-dl { color: #06201c; }
  .bar-actions .hide-sm { display: none; }
  .save-state { display: none; }
}
@media (max-width: 520px) {
  .app-bar { padding: 0 10px; gap: 8px; }
  .app-bar .logo-text { display: none; }
  .bar-actions .btn span { display: none; }
  .bar-actions .btn { padding: 6px 12px; }
}

/* Form groups */
.group { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
@media (min-width: 1024px) { .group { border-radius: 12px; } }
.group > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.08rem; color: var(--ink); min-height: 54px; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary .gi { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-tint); display: grid; place-items: center; flex-shrink: 0; }
.group > summary .gi svg { width: 18px; height: 18px; fill: var(--brand); }
.group > summary .count { margin-left: auto; font-family: var(--body); font-size: .8rem; font-weight: 700; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 1px 9px; }
.group > summary .count:empty { display: none; }
.group > summary .chev { width: 20px; height: 20px; fill: var(--ink-3); transition: transform .2s; flex-shrink: 0; }

.group[open] > summary .chev { transform: rotate(180deg); }
.group-body { padding: 0 16px 18px; }
.group-tip { font-size: .9rem; color: var(--ink-3); margin-bottom: 12px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; grid-column: 1 / -1; min-width: 0; }
.field.half { grid-column: auto; }
@media (max-width: 380px) { .field.half { grid-column: 1 / -1; } }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select, .skill-row input, .skill-row select, .add-skill input, .hexrow input[type="text"], .panel select, .dialog textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 11px 12px; font-size: 16px; line-height: 1.4; min-height: 46px; transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus, .skill-row input:focus, .add-skill input:focus, .panel select:focus, .hexrow input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: .82rem; min-height: 0; }
.err:empty { display: none; }
.hint { color: var(--ink-3); font-size: .82rem; }
.quick { display: flex; gap: 6px; }
.quick button { border: 1px solid var(--line); background: var(--mist); border-radius: 999px; padding: 3px 12px; font-size: .82rem; cursor: pointer; color: var(--ink-2); }

/* Photo */
.photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; grid-column: 1 / -1; }
.photo-thumb { width: 64px; height: 64px; border-radius: 50%; background: var(--mist) center/cover no-repeat; border: 1.5px dashed var(--line); display: grid; place-items: center; flex-shrink: 0; }
.photo-thumb.has { border-style: solid; }
.photo-thumb.has svg { display: none; }
.photo-thumb svg { width: 28px; height: 28px; fill: var(--ink-3); }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.photo-actions label.btn { cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; color: var(--ink-2); user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex-shrink: 0; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }
.show-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--mist); border-radius: 10px; margin-bottom: 12px; }

/* Entries */
.entry { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--paper); }
.entry > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; cursor: pointer; min-height: 50px; }
.entry > summary::-webkit-details-marker { display: none; }
.entry-title { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry[open] > summary { border-bottom: 1px solid var(--line); }
.entry > .grid { padding: 14px; }
.entry-tools { display: flex; gap: 2px; }
.tool { width: 36px; height: 36px; border-radius: 8px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--ink-3); }
.tool:hover { background: var(--mist); color: var(--ink); }
.tool:disabled { opacity: .3; cursor: default; background: none; }
.tool.danger:hover { color: var(--danger); }
.tool svg { width: 20px; height: 20px; fill: currentColor; }
.add-btn { width: 100%; border: 1.5px dashed var(--brand); color: var(--brand); background: transparent; border-radius: 12px; padding: 12px; font-weight: 700; cursor: pointer; min-height: 48px; }
.add-btn:hover { background: var(--brand-tint); }
.list-empty { color: var(--ink-3); font-size: .92rem; margin-bottom: 10px; }

/* Skills */
.add-skill { display: flex; gap: 8px; margin-bottom: 10px; }
.add-skill .btn { flex-shrink: 0; }
.skill-row { display: grid; grid-template-columns: 1fr 130px 36px; gap: 6px; align-items: center; margin-bottom: 6px; }
.skill-row input, .skill-row select { min-height: 42px; padding: 8px 10px; }
.skill-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.skill-suggest span { font-size: .82rem; color: var(--ink-3); width: 100%; }
.skill-suggest button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 11px; font-size: .85rem; cursor: pointer; color: var(--ink-2); }
.skill-suggest button:hover { border-color: var(--brand); color: var(--brand); }
.note { font-size: .84rem; color: var(--ink-3); margin: 0 0 10px; }

/* Design panel */
.d-sec { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.d-sec h2 { font-size: 1.08rem; margin-bottom: 12px; }
.d-sec h3 { font-size: .92rem; font-family: var(--body); font-weight: 700; margin: 16px 0 8px; color: var(--ink-2); letter-spacing: 0; }
.tpl-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
@media (max-width: 1023px) and (min-width: 560px) { .tpl-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tpl-opt { background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: .85rem; }
.tpl-opt .mini { display: block; width: 100%; aspect-ratio: 210 / 297; position: relative; overflow: hidden; border-radius: 6px; background: #fff; outline: 1px solid var(--line); transition: outline-color .15s; }
.tpl-opt .mini-paper { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.tpl-opt:hover .mini { outline: 2px solid var(--ink-3); }
.tpl-opt[aria-pressed="true"] .mini { outline: 3px solid var(--brand); }
.tpl-opt[aria-pressed="true"] { color: var(--brand); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.swatch-auto { background: conic-gradient(#0f766e, #1d4ed8, #7c3aed, #dc2626, #b45309, #0f766e); color: #fff; font-weight: 800; font-size: .8rem; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.hexrow { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.hexrow input[type="color"] { width: 52px; height: 46px; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; background: var(--paper); cursor: pointer; flex-shrink: 0; }
.hexrow input[type="text"] { max-width: 140px; font-family: 'Courier New', monospace; text-transform: lowercase; }
.hexrow label { font-size: .88rem; color: var(--ink-2); font-weight: 600; }
.text-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.text-presets button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.range-row { display: grid; grid-template-columns: 90px 1fr 48px; align-items: center; gap: 10px; margin-top: 12px; }
.range-row label { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.range-row output { font-size: .88rem; color: var(--ink-3); text-align: right; }
input[type="range"] { accent-color: var(--brand); width: 100%; min-height: 32px; }
.toggles { display: grid; gap: 4px; }
.toggles .switch { justify-content: space-between; flex-direction: row-reverse; padding: 8px 0; }

/* Review banner, undo */
.review { margin: 12px 16px 0; background: #fff8e6; border: 1px solid #f0d58f; color: #4a3b12; border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; }
.review p { flex: 1; }
.review button { border: 0; background: #4a3b12; color: #fff; border-radius: 999px; padding: 5px 12px; font-weight: 600; cursor: pointer; }
@media (max-width: 1023px) { .review { margin: 12px 14px 0; } }
.undo { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 14px; z-index: 80; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); max-width: calc(100% - 24px); }
.undo[hidden] { display: none; }
.undo button { background: var(--marigold); color: #15302b; border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
@media (min-width: 1024px) { .undo { bottom: 24px; } }

/* Import dialog */
.dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.dialog::backdrop { background: rgba(10, 25, 22, .55); }
.dialog-inner { padding: 22px; overflow-y: auto; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.dialog-head h2 { font-size: 1.4rem; }
.dialog p.lead { color: var(--ink-2); margin-bottom: 16px; font-size: .97rem; }
.import-status { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--brand-tint); color: var(--ink); font-size: .92rem; }
.import-status.bad { background: #fdecea; color: #8a1c12; }
.import-status[hidden] { display: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: .88rem; margin: 18px 0 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.dialog textarea { min-height: 120px; resize: vertical; font-size: 15px; }
.dialog .row { display: flex; justify-content: flex-end; margin-top: 10px; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--ink-3); margin-top: 16px; }
.privacy-note svg { width: 18px; height: 18px; fill: var(--brand); flex-shrink: 0; margin-top: 2px; }
.exact-note { font-size: .88rem; color: var(--ink-2); background: var(--mist); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.group > summary .chev { margin-left: auto; }
.group > summary .count:not(:empty) + .chev { margin-left: 0; }
@media (max-width: 1023px) { body.app .cookie-banner { bottom: 84px; } }
@media (max-width: 1023px) { body.app .toast { bottom: 92px; } }

/* Shared site header inside the builder */
.app-head { display: flex; align-items: center; gap: 16px; height: 68px; padding: 0 20px; max-width: none; }
body.app .main-nav { margin-left: 8px; }
@media (max-width: 1240px) { body.app .main-nav a { padding: 8px 8px; font-size: .92rem; } }
@media (max-width: 1100px) { body.app .main-nav { display: none; } body.app .hamburger { display: grid; } }
body.app .header-controls .more { position: relative; }
.preview-bar .save-state { margin-left: 4px; }
@media (max-width: 1023px) { .preview-bar .save-state { display: none; } }
@media (max-width: 520px) { .app-head { padding: 0 12px; gap: 8px; } body.app .logo-text { display: none; } body.app .header-controls .btn span { display: none; } }

/* Job type + resume strength */
.jobtype-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.jobtype-card label { display: block; font-family: var(--display); font-weight: 700; font-size: 1.02rem; margin-bottom: 8px; color: var(--ink); }
.jobtype-card .hint { display: block; margin-top: 6px; }
.jobtype-card a { font-size: .88rem; font-weight: 600; }
.strength { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; }
.strength-head { display: flex; justify-content: space-between; font-weight: 600; font-size: .92rem; margin-bottom: 8px; color: var(--ink-2); }
.strength-head b { color: var(--ink); }
.meter { height: 8px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 999px; transition: width .4s ease, background .3s; }
.meter-fill.low { background: #e0574b; } .meter-fill.mid { background: var(--marigold); } .meter-fill.high { background: #22a06b; }
.strength .hint { display: block; margin-top: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.next-row { display: flex; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.tpl-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.tpl-tools select, .tpl-tools input { width: 100%; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 9px 10px; font-size: 15px; min-height: 42px; }
@media (max-width: 420px) { .tpl-tools { grid-template-columns: 1fr; } }
.tpl-opt[hidden] { display: none; }
@media (max-width: 1023px) { body.app .header-controls .hide-sm { display: none; } }

/* ── v9 builder ── */
@media (max-width: 1400px) { body.app .main-nav { display: none; } body.app .hamburger { display: grid; } }
@media (max-width: 420px) { body.app .header-controls .hide-xs { display: none; } }
.tool-top { display: grid; gap: 12px; margin-bottom: 12px; }
.tool-top .jobtype-card, .tool-top .strength { margin-bottom: 0; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-actions .btn svg { width: 16px; height: 16px; }
.btn-danger:hover { background: #fdecea; }
.switch-banner { margin: 12px 16px 0; background: var(--brand-tint); border: 1px solid var(--brand); border-radius: 12px; padding: 12px 14px; font-size: .93rem; }
.switch-banner div { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 1023px) { .switch-banner { margin: 12px 14px 0; } }
.design-hint { background: var(--brand-tint); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin-bottom: 12px; }
.score-pill { font-size: .78rem; font-weight: 800; border-radius: 999px; padding: 2px 10px; background: var(--mist); }
.score-pill.low { background: #fdecea; color: #a5281b; } .score-pill.mid { background: #fff4d6; color: #7a5300; } .score-pill.high { background: #dcf5e8; color: #0f6a3e; }
.preview-bar .dl-inline { margin-left: 4px; }
@media (max-width: 1023px) { .preview-bar .dl-inline { display: none; } }
.sub-h { font-size: .95rem; font-family: var(--body); font-weight: 700; margin: 18px 0 8px; letter-spacing: 0; }
.use-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--mist); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }

/* Signature */
.sig-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 16px; }
.sig-mode-btn { border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 10px 8px; cursor: pointer; text-align: left; color: var(--ink); display: flex; flex-direction: column; gap: 2px; min-height: 64px; }
.sig-mode-btn strong { font-size: .9rem; }
.sig-mode-btn small { font-size: .76rem; color: var(--ink-3); line-height: 1.3; }
.sig-mode-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand); }
@media (max-width: 520px) { .sig-modes { grid-template-columns: 1fr 1fr; } }
.sig-pic { grid-column: 1 / -1; }
.sig-pic .lbl { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.sig-row, .sig-pic:not(.field) { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.sig-thumb { width: 150px; height: 56px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff center/contain no-repeat; }
.sig-thumb.has { border-style: solid; }
.sign-canvas { width: 100%; height: 180px; border: 1.5px dashed var(--brand); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
[data-sig-show][hidden] { display: none !important; }

/* Arrange sections */
.arrange { display: grid; gap: 6px; }
.arr-row { display: grid; grid-template-columns: 22px 1fr auto 34px 34px; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 4px 6px; }
.arr-row.off input[type=text] { opacity: .5; text-decoration: line-through; }
.arr-row.dragging { opacity: .5; }
.arr-row.over { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint); }
.arr-grip { cursor: grab; display: grid; place-items: center; }
.arr-grip svg { width: 18px; height: 18px; fill: var(--ink-3); }
.arr-row input[type=text] { border: 0; background: transparent; padding: 8px 4px; font-weight: 600; font-size: .95rem; min-width: 0; color: var(--ink); }
.arr-row input[type=text]::placeholder { color: var(--ink); opacity: .85; }
.arr-row input[type=text]:focus { outline: none; background: var(--mist); border-radius: 6px; }
.arr-row .tool { width: 34px; height: 34px; }

/* Download formats */
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.fmt { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; color: var(--ink); min-height: 64px; }
.fmt:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-tint); }
.fmt:disabled { opacity: .5; cursor: wait; }
.fmt svg { width: 28px; height: 28px; fill: var(--brand); flex-shrink: 0; }
.fmt strong { display: block; font-size: .95rem; }
.fmt small { display: block; color: var(--ink-3); font-size: .8rem; line-height: 1.3; }
.steps-list { padding-left: 1.2em; margin: 0 0 16px; color: var(--ink-2); }
.steps-list li { margin: 6px 0; }
.dialog .row { display: flex; justify-content: flex-end; margin-top: 10px; }

/* Welcome */
.welcome-label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink-2); margin: 4px 0 6px; }
.welcome-select { width: 100%; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 16px; min-height: 46px; margin-bottom: 14px; }
.start-opts { display: grid; gap: 8px; }
.start-opt { text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; color: var(--ink); }
.start-opt:hover { border-color: var(--brand); background: var(--brand-tint); }
.start-opt strong { display: block; font-size: 1.02rem; }
.start-opt small { color: var(--ink-3); }
.field .switch input[type="checkbox"] { width: 40px; height: 24px; min-height: 0; padding: 0; border: 0; border-radius: 999px; flex-shrink: 0; }
.field .switch input[type="checkbox"]:focus { box-shadow: 0 0 0 3px var(--brand-tint); }

/* ===== v10: guide content under the tool ===== */
.tool-seo { background: var(--paper); border-top: 1px solid var(--line); padding: 56px 0 64px; }
.tool-seo .prose { margin: 0 auto; }
.tool-seo .prose > h2:first-child { margin-top: 0; }
.tool-seo .faq-list { margin-top: 8px; }
.tool-seo-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 16px; }
.tool-seo-links a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--brand); text-decoration: none; background: var(--mist); }
.tool-seo-links a:hover { border-color: var(--brand); }
.tool-seo-foot { font-size: .85rem; color: var(--ink-3); }
@media (max-width: 1023px) {
  .tool-seo { padding: 36px 0 120px; }
  body[data-panel="design"] .tool-seo, body[data-panel="preview"] .tool-seo { display: none; }
}
