/* 06 Lantern — Vellum's paper table, every card foldable. Warm paper, ink, a lantern-amber "go" colour. */
:root {
  --paper: #f3ecd9;
  --ink: #2b2118;
  --ink-2: #4a3d30;
  --bg: var(--paper);
  --panel: rgba(250, 246, 235, 0.9);
  --panel-solid: #faf6eb;
  --panel-2: rgba(43, 33, 24, 0.06);
  --line: rgba(43, 33, 24, 0.18);
  --line-strong: rgba(43, 33, 24, 0.42);
  --text: var(--ink);
  --muted: #7a6c5a;
  --accent: #d5006c;
  --accent-soft: rgba(213, 0, 108, 0.12);
  --go: #b5651d;
  --go-soft: rgba(181, 101, 29, 0.14);
  --primary: var(--ink);
  --primary-text: #f9f4e8;
  --radius: 7px;
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 10px 28px -14px rgba(43, 33, 24, 0.45), 0 1px 2px rgba(43, 33, 24, 0.12);
  --shadow: 0 12px 32px -12px rgba(43, 33, 24, 0.5), 0 1px 2px rgba(43, 33, 24, 0.15);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
html, body { height: 100%; }
[hidden] { display: none !important; }
body { color: var(--ink); background: var(--paper); background-image: radial-gradient(ellipse at 20% 10%, rgba(255, 252, 244, 0.7), transparent 60%), radial-gradient(ellipse at 80% 90%, rgba(190, 168, 130, 0.22), transparent 55%); }
.app { position: fixed; inset: 0; }
h1, h2, h3, h4 { font-family: 'Lora', Georgia, serif; font-weight: 700; letter-spacing: -0.005em; margin: 0; }
h4 { font-size: 12.5px; margin: 10px 0 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
kbd.inline { margin: 0; padding: 0 4px; font-size: 10px; border-color: var(--line-strong); color: var(--ink-2); background: rgba(255, 255, 255, 0.5); }
.spacer { flex: 1; }
.eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--go); }
.no-motion *, .no-motion *::before, .no-motion *::after { transition: none !important; animation: none !important; }

/* ---- shared widget restyle ---- */
.btn { border-color: var(--line); background: rgba(255, 253, 247, 0.7); border-radius: var(--radius); transition: background .12s, border-color .12s; }
.btn:hover:not(:disabled) { background: #fffdf7; border-color: var(--line-strong); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--primary-text); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.go { background: var(--go); border-color: var(--go); color: #fff; font-weight: 600; }
.btn.go:hover:not(:disabled) { background: #9a5416; border-color: #9a5416; }
.btn.go.big { width: 100%; justify-content: center; padding: 9px 12px; font-size: 14px; margin-top: 6px; }
.seg { background: rgba(255, 253, 247, 0.7); border-color: var(--line); }
.seg-btn.on { background: var(--ink); color: var(--primary-text); }
input[type="text"], input[type="search"], input[type="number"], select, input:not([type]) { background: rgba(255, 253, 247, 0.85); border-color: var(--line); }
input[type="range"] { accent-color: var(--ink); }
.chip { background: var(--panel-2); text-transform: none; }
.chip.size-metropolis, .chip.size-city { background: #e8dcc2; color: #5a4310; }
.chip.size-town { background: #e2e8dd; color: #2f5d50; }
.chip.kind-lair { background: #f3d9d5; color: #7a1410; }
.chip.kind-ruin, .chip.kind-cave, .chip.kind-mine { background: #ebe1cf; color: #5c4a2a; }
.chip.kind-inn, .chip.kind-tavern { background: #f6e3c8; color: #7a4f16; }
.chip.kind-temple, .chip.kind-shrine { background: #ebdff0; color: #5c3a6e; }
button.link { color: var(--go); }
code { background: rgba(43, 33, 24, 0.07); }
.popover, .ctx-menu { background: var(--panel); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.ctx-title { font-family: 'Lora', Georgia, serif; }
.progress { height: 3px; background: transparent; border: none; overflow: visible; }
.progress-bar { height: 3px; opacity: 1; background: var(--accent); box-shadow: 0 0 8px rgba(213, 0, 108, 0.5); }
.progress-label { inset: auto; top: 10px; left: 50%; transform: translateX(-50%); position: fixed; padding: 4px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--card-shadow); font-size: 11.5px; white-space: nowrap; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.toasts { right: auto; left: 50%; bottom: 60px; transform: translateX(-50%); align-items: center; }
.toast { background: var(--panel); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-color: var(--line); box-shadow: var(--shadow); }

/* ================================================================ desk (world list) */
.desk { position: absolute; inset: 0; overflow: auto; padding: 48px 32px 40px; }
.desk-head { display: flex; align-items: center; gap: 16px; max-width: 1180px; margin: 0 auto 28px; }
.desk-mark { width: 52px; height: 52px; display: grid; place-items: center; border: 1.5px solid var(--go); border-radius: 50%; color: var(--go); background: rgba(255, 253, 247, 0.6); }
.desk-title h1 { font-size: 34px; line-height: 1; }
.desk-title p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.desk-head .about-btn { margin-left: auto; }
.desk-list .world-list { grid-template-columns: 340px 1fr; gap: 32px; padding: 0; max-width: 1180px; }
.world-create { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--card-shadow); padding: 20px; gap: 12px; }
.world-create h3 { font-size: 18px; }
.world-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.world-card { position: relative; padding: 18px 20px 16px 26px; background: linear-gradient(160deg, rgba(255, 253, 247, 0.95), rgba(243, 236, 217, 0.9)); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--card-shadow); transition: transform .18s var(--ease); overflow: hidden; }
.world-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--go); opacity: 0.7; border-right: 1px solid rgba(43, 33, 24, 0.25); }
.world-card:nth-child(2)::before { background: #6f95c2; } .world-card:nth-child(3)::before { background: #7fb07a; } .world-card:nth-child(4)::before { background: #a284c1; }
.world-card:hover { transform: translateY(-2px); }
.world-card-head h3 { font-size: 20px; }
.desk-foot { max-width: 1180px; margin: 36px auto 0; text-align: center; }

/* ================================================================ the table */
.stage { position: absolute; inset: 0; }
.stage .map { position: absolute; inset: 0; }
.stage .mapsvg { --paper: #f3ecd9; }
.stage .mapsvg .callout-box { fill: #fffdf7; }
.stage .mapsvg .dim-veil { fill-opacity: 0.6; }
.stage .mapsvg .preview-mask { fill-opacity: 0.3; fill: #2b2118; }
.stage .mapsvg .preview-frame { stroke-width: 2.2px; stroke-dasharray: 8 5; }
.mapsvg.picking { cursor: crosshair; }

/* columns and bands: transparent layout boxes that hold the cards */
.col { position: absolute; top: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; z-index: 10; }
.col > * { pointer-events: auto; }
.col-left { left: 14px; width: 236px; align-items: flex-start; }
.col-right { right: 14px; width: 340px; align-items: flex-end; }
.band-top { position: absolute; top: 14px; left: 262px; right: 366px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 11; }
.band-top > * { pointer-events: auto; }
.app.cleared .col, .app.cleared .band-top, .app.cleared .status { display: none; }
.restore-pill { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 12; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); box-shadow: var(--card-shadow); cursor: pointer; font-size: 12px; color: var(--ink-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.restore-pill kbd { margin: 0; }

/* ---- the foldable paper card ---- */
.ccard, .status, .find-card {
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
  backdrop-filter: blur(8px) saturate(1.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}
.ccard { display: flex; flex-direction: column; min-height: 0; max-width: 100%; }
.ccard-head { display: flex; align-items: center; gap: 6px; padding: 7px 8px 6px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; flex: none; }
.ccard-head .icon { color: var(--go); }
.ccard-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard-toggle { padding: 2px; border: none; background: none; color: var(--muted); }
.ccard-toggle:hover { color: var(--ink); background: var(--panel-2); }
.ccard.collapsed { background: rgba(250, 246, 235, 0.82); border-radius: 999px; box-shadow: 0 4px 12px -8px rgba(43, 33, 24, 0.5); }
.ccard-tab { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 9px; border: none; background: none; cursor: pointer; color: var(--ink-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ccard-tab .icon { color: var(--go); }
.ccard-tab:hover { color: var(--ink); }

/* ---- left column ---- */
.crumb-card { flex: none; width: 100%; }
.crumb-body { display: flex; gap: 8px; padding: 8px 10px 8px 8px; }
.crumb-side { display: flex; flex-direction: column; gap: 4px; }
.crumb-side .btn { padding: 4px; }
.crumb-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.crumb-floor:empty { display: none; }
.crumb-floor { margin-top: 6px; padding: 7px 8px 2px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.crumb-floor select { padding: 2px 6px; font-size: 12px; }
.crumbs .breadcrumb { flex-direction: column; align-items: stretch; gap: 0; }
.crumbs .crumb-sep { display: none; }
.crumbs .crumb { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 2px 8px; line-height: 1.25; color: var(--ink-2); position: relative; max-width: 100%; }
.crumbs .crumb + .crumb-sep + .crumb { margin-left: 12px; }
.crumbs .crumb + .crumb-sep + .crumb + .crumb-sep + .crumb { margin-left: 24px; }
.crumbs .crumb + .crumb-sep + .crumb + .crumb-sep + .crumb + .crumb-sep + .crumb { margin-left: 36px; }
.crumbs .crumb:not(:first-of-type)::before { content: '↳'; position: absolute; left: -8px; top: 3px; font-size: 11px; color: var(--muted); }
.crumbs .crumb-scale { font-size: 9.5px; letter-spacing: 0.08em; opacity: 0.75; }
.crumbs .crumb-label { font-family: 'Lora', Georgia, serif; font-size: 14px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.crumbs .crumb.current .crumb-label { font-size: 16px; font-weight: 700; color: var(--ink); }
.crumbs .crumb:hover:not(:disabled) { background: var(--panel-2); }

.stages-card { flex: 0 1 auto; width: 100%; max-height: 48%; }
.stages-body { overflow: auto; padding: 8px; }
.stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stage-dots { display: inline-flex; gap: 4px; }
.stage-dots .dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 10px 'Inter', sans-serif; font-style: normal; border: 1.5px solid var(--line-strong); color: var(--muted); }
.stage-dots .dot.current { background: var(--go); border-color: var(--go); color: #fff; }
.stage-dots .dot.cached { background: var(--go-soft); border-color: var(--go); color: var(--go); }
.stages .stage { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 7px; padding: 7px 8px 7px 7px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 253, 247, 0.55); cursor: pointer; }
.stages .stage.current { border-color: var(--go); box-shadow: inset 3px 0 0 var(--go); }
.stages .stage.idle { cursor: default; opacity: 0.6; border-style: dashed; background: transparent; }
.stage-num { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 10.5px 'Inter', sans-serif; color: var(--muted); border: 1.5px solid var(--line-strong); }
.stage.current .stage-num, .stage.cached .stage-num { background: var(--go); border-color: var(--go); color: #fff; }
.stage.cached .stage-num { opacity: 0.6; }
.stage-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stage-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stage-name { font-family: 'Lora', Georgia, serif; font-weight: 700; font-size: 13px; }
.pill { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.pill.current { background: var(--go); color: #fff; }
.pill.cached { background: var(--go-soft); color: var(--go); }
.pill.idle { background: var(--panel-2); color: var(--muted); }
.stage-choice { font-size: 12px; line-height: 1.3; }
.stage-meta { font-size: 10.5px; display: flex; align-items: center; gap: 2px; }
.stage-hint { font-size: 11px; font-style: italic; }
.rail-thumb { width: 100% !important; height: 84px !important; margin-top: 4px; }

.map-card { flex: 0 1 auto; width: 100%; min-height: 0; }
.world-body { overflow: auto; padding: 10px 12px 12px; }
.world-body .map-info h2 { font-size: 16px; margin-bottom: 4px; }
.world-body .map-info .row .btn { padding: 3px 8px; font-size: 11.5px; }
.world-body .hint { display: none; }
.focus-vars { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 253, 247, 0.55); }
.focus-vars .var-row:first-child { border-top: none; }
.focus-foot { justify-content: space-between; margin-top: 6px; }

.legibility-card { margin-top: auto; width: 100%; }
.leg-body { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.leg-row { display: grid; grid-template-columns: 52px 1fr 26px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.leg-row output { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-size: 11.5px; }
.leg-row input[type="range"] { min-width: 0; height: 16px; }
.leg-row.toggle-row { grid-template-columns: 1fr auto; margin-top: 2px; }

/* ---- top band ---- */
.chips-card { flex-direction: row; align-items: center; border-radius: 999px; }
.chips-card .ccard-head { border-bottom: none; border-right: 1px solid var(--line); padding: 5px 8px 5px 12px; }
.chips-card .ccard-toggle { order: 2; }
.chips-row { display: flex; gap: 4px; padding: 4px 8px; flex-wrap: wrap; justify-content: center; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 253, 247, 0.5); color: var(--muted); font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.fchip .sw { width: 8px; height: 8px; border-radius: 2px; background: var(--line); }
.fchip.on { color: var(--ink); border-color: var(--line-strong); background: #fffdf7; }
.fchip.on .sw { background: var(--go); }
.fchip.na { opacity: 0.4; }
.fchip kbd { margin-left: 2px; padding: 0 4px; font-size: 9.5px; }
.find-card { width: 420px; max-height: 60vh; display: flex; flex-direction: column; }
.find-card .ccard-head .btn { padding: 2px; border: none; background: none; }
.find-body { padding: 8px 10px 10px; overflow: auto; min-height: 0; display: flex; flex-direction: column; }
.find-body .element-list { flex: 1; min-height: 0; }
.list-head .search { background: rgba(255, 253, 247, 0.85); }
.pick-hint { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; background: var(--go); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow); pointer-events: none; z-index: 12; }

/* ---- right column ---- */
.tools-card { flex: none; }
.tools-row { display: flex; align-items: center; gap: 5px; padding: 6px 8px; flex-wrap: wrap; justify-content: flex-end; }
.tools-card .ccard-head { display: none; }
.tools-card:not(.collapsed) .tools-row::after { content: ''; }
.tb-group { display: flex; gap: 4px; align-items: center; }
.tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.tools-row .btn { padding: 5px 8px; }
.tools-row .about-btn { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-family: 'Lora', Georgia, serif; font-weight: 700; padding: 0; }
/* the tools card is header-less, so give it its own fold button inside the row */
.tools-card .tools-row { position: relative; }

.choices-card { flex: 1 1 auto; width: 100%; min-height: 0; }
.choices-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.choices-body { position: absolute; inset: 0; overflow: auto; }
.choices-body.covered { visibility: hidden; overflow: hidden; }
.choices-content { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.lead { margin: 0 2px 2px; line-height: 1.4; }
.choices-content .card { display: flex; gap: 10px; align-items: flex-start; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 253, 247, 0.6); }
.choices-content .card.cand { cursor: pointer; flex-wrap: wrap; }
.choices-content .card.cand:hover { border-color: var(--line-strong); background: #fffef9; }
.choices-content .card.cand.selected { border-color: var(--go); box-shadow: 0 0 0 1px var(--go); background: #fffcf4; }
.choices-content .card.custom { border-style: dashed; }
.card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-title { font-family: 'Lora', Georgia, serif; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-facts { font-size: 11px; line-height: 1.35; }
.thumb { position: relative; border-radius: 6px; overflow: hidden; background: #efe5cf; border: 1px solid var(--line); flex: none; }
.thumb .mapsvg { cursor: default; --paper: #f2e8d3; }
.thumb .mapsvg .lbl, .thumb .mapsvg .layer-labels, .thumb .mapsvg .glyphs-tree, .thumb .mapsvg .coast-glow, .thumb .mapsvg .sym, .thumb .mapsvg .road-casing, .thumb .mapsvg .road-trail { display: none; }
.thumb .mapsvg .road-major { stroke-width: 1px; } .thumb .mapsvg .road-minor { stroke-width: 0.6px; }
.thumb .mapsvg .river { stroke-width: 0.9px !important; } .thumb .mapsvg .kingdom-border { stroke-width: 1px; stroke-dasharray: none; }
.thumb:empty::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #efe5cf 0 6px, #e8ddc4 6px 12px); opacity: 0.7; }
.cand-edit { flex-basis: 100%; border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.cand-edit input[type="range"] { width: 100%; accent-color: var(--go); }
.cand-edit p { margin: 0; }
.choices-content .card.anywhere { align-items: center; border-style: dashed; color: var(--muted); }
.choices-content .card.anywhere .icon { color: var(--go); }
.choices-content .card.current-region { background: var(--go-soft); border-color: transparent; }
.choices-content .card.battle-spot { flex-direction: column; gap: 8px; background: var(--panel-2); border-color: transparent; }
.choices-content .card.battle-spot .card-title .icon { color: var(--go); }
.choices-content .card.battle-spot.picking { outline: 2px dashed var(--go); outline-offset: -2px; }
.choices-content .card.battle-spot.placed { background: #fffcf4; border-color: var(--go); }
.picking-msg { display: inline-flex; align-items: center; gap: 5px; color: var(--go); font-weight: 600; }
.steppers { gap: 10px; }
.stepper { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.stepper input { width: 58px; }
.filter-row { padding: 0 2px; color: var(--muted); }
.filter-row select { flex: 1; }
.floor-bar select { flex: 1; }
.section { border-top: 1px solid var(--line); }
.section summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 4px; cursor: pointer; list-style: none; font-family: 'Lora', Georgia, serif; font-weight: 700; font-size: 13.5px; }
.section summary::-webkit-details-marker { display: none; }
.section summary .count { font: 500 11px 'Inter', sans-serif; color: var(--muted); background: var(--panel-2); border-radius: 999px; padding: 1px 7px; }
.section.active-floor summary { color: var(--go); }
.rows { list-style: none; margin: 0; padding: 0 0 4px; }
.row-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 8px; border-radius: 6px; cursor: pointer; border-left: 3px solid transparent; }
.row-item:hover, .row-item.hovered { background: var(--panel-2); }
.row-item.selected { background: var(--accent-soft); border-left-color: var(--accent); }
.row-main { flex: 1; min-width: 0; }
.row-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.row-title .icon { color: var(--muted); flex: none; }
.row-title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 11px; margin-top: 1px; padding-left: 19px; }
.row-item .btn.go.small { opacity: 0; transition: opacity .12s; padding: 3px 9px; }
.row-item:hover .btn.go.small, .row-item.selected .btn.go.small, .row-item.hovered .btn.go.small { opacity: 1; }
.lock-ic { color: #8a5a1e; }
.rows .empty { padding: 4px 8px 8px; }
.inspector { position: absolute; inset: 0; overflow: auto; padding: 8px 12px 14px; background: var(--panel-solid); animation: slide-in .18s var(--ease); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.back-btn { display: inline-flex; align-items: center; gap: 4px; border: none; background: none; padding: 4px 6px 8px 0; color: var(--go); font-weight: 600; cursor: pointer; }
.inspector .el-head h2 { font-family: 'Lora', Georgia, serif; font-size: 20px; }
.inspector .el-head .close { display: none; }
.inspector .el-actions .btn { padding: 4px 8px; font-size: 12px; }
.inspector .el-nav .btn.primary { background: var(--go); border-color: var(--go); }
.inspector-vars { margin-top: 2px; }

.mini-card { flex: none; width: 100%; transition: width .18s var(--ease); }
.mini-card.moving { width: 520px; }
.mini-body { display: flex; flex-direction: column; }
.mini-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.mini-head .mini-title { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-head .btn.small { padding: 2px 8px; font-size: 11px; }
.mini-head .btn.primary { background: var(--go); border-color: var(--go); }
.mini-map { height: 170px; background: var(--paper); }
.mini-card.moving .mini-map { height: 330px; }
.mini-card:not(.moving) .mini-map .mapsvg { pointer-events: none; cursor: default; }
.mini-map .mapsvg { box-shadow: none; }
.mini-map .mapsvg .preview-frame { stroke: var(--accent); stroke-dasharray: none; }
.mini-map .mapsvg .preview-corners, .mini-map .mapsvg .preview-cross { stroke: var(--accent); }
.mini-map .mapsvg .handle-box { stroke: var(--accent); }
.mini-map .mapsvg .preview-mask { fill-opacity: 0.4; }

/* ---- status ---- */
.status { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 6px 12px; font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; z-index: 9; }
.coords { min-width: 150px; text-align: right; }
.scale-bar { display: inline-flex; align-items: center; gap: 8px; }
.scale-line { display: inline-block; height: 5px; border: 1.5px solid var(--ink); border-top: none; width: 80px; position: relative; }
.scale-line::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid var(--ink); }
.scale-text { font-weight: 700; color: var(--ink); }

/* ---- hover tip, popovers ---- */
.hover-tip { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; display: flex; flex-direction: column; gap: 1px; padding: 4px 9px 5px; background: rgba(255, 253, 247, 0.94); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 4px 12px -6px rgba(43, 33, 24, 0.5); font-size: 12px; max-width: 320px; }
.hover-tip b { font-family: 'Lora', Georgia, serif; }
.hover-tip span { font-size: 10.5px; color: var(--muted); }
.layers-pop { display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.layers-pop h3 { font-size: 14px; }
.layers { display: flex; gap: 4px; flex-wrap: wrap; }
.all-vars-wrap { width: 460px; max-height: 70vh; overflow: auto; }
.all-vars-wrap h3 { font-size: 15px; margin-bottom: 8px; }
.about { width: 440px; font-size: 12.5px; line-height: 1.45; }
.about h3 { font-size: 16px; margin-bottom: 4px; }
.about p { margin: 0 0 8px; }
.about ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.about li b { font-family: 'Lora', Georgia, serif; }
.export-menu { min-width: 300px; }
