/* ═══════════════════════════════════════════════════════════════════
   Orion — editor. Sleek white workspace: paper-light chrome, royal-blue
   interaction accent, gold reserved for Premium.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f6f7f9;          /* app chrome */
  --panel: #ffffff;       /* raised surfaces */
  --panel-2: #fbfbfd;     /* subtle surface */
  --line: #e3e6ec;
  --line-strong: #d3d7e0;
  --text: #191e2b;
  --text-dim: #6a7080;
  --text-faint: #9aa0ae;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.09);
  --accent-line: rgba(37, 99, 235, 0.45);
  --gold: #b07818;
  --gold-bright: #f0b34e;
  --gold-deep: #c98d2a;
  --gold-soft: rgba(240, 179, 78, 0.14);
  --stage: #eceef3;
  --danger: #d43d2f;
  --shadow-menu: 0 10px 34px rgba(21, 27, 44, 0.14), 0 2px 8px rgba(21, 27, 44, 0.08);
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Schibsted Grotesk', 'Segoe UI', sans-serif;
  --font-mono: 'Fragment Mono', 'Consolas', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.gold { color: var(--gold); }
.muted { color: var(--text-dim); }

button { font-family: inherit; color: inherit; }

/* The hidden attribute must always win, even over author display rules. */
[hidden] { display: none !important; }

/* ── Menu bar ────────────────────────────────────────────────────── */
.menubar {
  display: flex; align-items: center; gap: 4px;
  height: 42px; padding: 0 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0; user-select: none;
  position: relative; z-index: 200;
}
.mb-logo {
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; color: var(--text);
  margin-right: 14px; white-space: nowrap;
}
.mb-logo-mark {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; color: #fff;
  background: linear-gradient(150deg, #3b6ff0, #1d43b8);
}
.mb-logo-name { font-family: var(--font-display); font-size: 17px; font-weight: 600; }

.mb-menus { display: flex; align-items: center; gap: 2px; }

.menu-container { position: relative; }
.menu-trigger {
  padding: 6px 11px; font-size: 12.5px; border: none; border-radius: 7px;
  background: transparent; color: var(--text-dim); cursor: pointer;
}
.menu-trigger:hover, .menu-trigger.is-open { background: var(--bg); color: var(--text); }

.menu-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 248px; padding: 5px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-menu);
  z-index: 300;
}
.menu-dropdown button {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 24px; padding: 7px 11px; border: none; border-radius: 6px;
  background: none; cursor: pointer; font-size: 13px; color: var(--text);
  text-align: left; white-space: nowrap;
}
.menu-dropdown button:hover { background: var(--accent-soft); color: var(--accent); }
.menu-dropdown button:hover .shortcut { color: var(--accent); }
.menu-dropdown button.is-disabled { color: var(--text-faint); cursor: default; }
.menu-dropdown button.is-disabled:hover { background: none; color: var(--text-faint); }
.menu-dropdown .shortcut { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); }
.menu-dropdown .divider { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-dropdown .group-label {
  padding: 7px 11px 4px; font-size: 9.5px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 700;
}

/* Open Recent flyout */
.menu-sub { position: relative; }
.menu-sub-items {
  display: none; position: absolute; left: calc(100% + 2px); top: -5px;
  min-width: 220px; padding: 5px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-menu);
}
.menu-sub:hover .menu-sub-items { display: block; }

.mb-right {
  margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0;
}
.mb-doc {
  font-size: 11px; color: var(--text-dim);
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mb-pageinfo { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.mb-sep { width: 1px; height: 16px; background: var(--line); }

.tb-chip {
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--text-dim); font-size: 11.5px; cursor: pointer; white-space: nowrap;
}
.tb-chip:hover { border-color: var(--gold-deep); color: var(--gold); }
.tb-chip.is-premium {
  border-color: rgba(201, 141, 42, 0.55); color: var(--gold);
  background: var(--gold-soft); cursor: default;
}

/* ── Main toolbar ────────────────────────────────────────────────── */
.toolbar {
  display: flex; align-items: center; gap: 4px; padding: 6px 10px;
  background: var(--panel); border-bottom: 1px solid var(--line);
  flex-shrink: 0; overflow-x: auto; scrollbar-width: thin;
  position: relative; z-index: 100;
}
.tool-group { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.tool-sep { width: 1px; height: 22px; background: var(--line); margin: 0 5px; flex-shrink: 0; }
.tool-right { margin-left: auto; }

.tool-btn {
  min-width: 32px; height: 32px; padding: 0 7px;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.tool-btn:hover:not(:disabled) { background: var(--bg); color: var(--text); border-color: var(--line); }
.tool-btn:disabled { opacity: 0.35; cursor: default; }
.tool-btn.is-active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.tool-btn.wide { padding: 0 12px; font-size: 12.5px; font-weight: 600; }

.btn-primary {
  height: 32px; padding: 0 14px; border-radius: 8px; border: none;
  background: linear-gradient(160deg, var(--gold-bright), var(--gold-deep));
  color: #241803; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(201, 141, 42, 0.45); }

.page-box { display: inline-flex; align-items: center; gap: 5px; padding: 0 3px; }
.page-number-input {
  width: 44px; height: 26px; text-align: center;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: 7px; font-size: 11.5px; color: var(--text);
}
.page-number-input:focus { outline: none; border-color: var(--accent); }
.page-slash, .page-total { font-size: 11px; color: var(--text-dim); }
.page-total { min-width: 20px; text-align: center; }

.zoom-select {
  height: 28px; padding: 0 6px; min-width: 96px;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: 7px; font-size: 11px; color: var(--text); cursor: pointer;
}
.zoom-select:focus { outline: none; border-color: var(--accent); }

.search-group { gap: 5px; }
.search-wrap { position: relative; display: inline-flex; align-items: center; }
.search-icon {
  position: absolute; left: 9px; font-size: 13px; color: var(--text-faint);
  pointer-events: none;
}
.search-input {
  width: 150px; height: 28px; padding: 0 8px 0 27px;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: 7px; font-size: 12px; color: var(--text);
}
.search-input:focus { outline: none; border-color: var(--accent); width: 190px; }
.search-count { font-size: 10.5px; color: var(--text-dim); white-space: nowrap; }

/* ── Workspace ───────────────────────────────────────────────────── */
.workspace { display: flex; flex: 1; min-height: 0; }

/* Icon rail */
.side-icons {
  width: 56px; flex-shrink: 0; padding: 10px 0;
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sidebar-item {
  width: 46px; height: 46px; border: none; border-radius: 11px;
  background: transparent; color: var(--text-dim); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.sidebar-item:hover { background: var(--bg); color: var(--text); }
.sidebar-item.is-active { background: var(--accent); color: #fff; }
.si-glyph { font-size: 15px; line-height: 1; }
.si-label { font-size: 8.5px; letter-spacing: 0.04em; }
.si-spacer { flex: 1; }

/* Sidebar panels */
.sidebar {
  width: 196px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--panel-2); border-right: 1px solid var(--line);
  min-height: 0;
}
.sidebar.is-collapsed { display: none; }
.panel-content { flex: 1; overflow-y: auto; padding: 12px 10px; scrollbar-width: thin; }
.panel-title { font-size: 9.5px; letter-spacing: 0.09em; color: var(--text-faint); margin-bottom: 10px; font-weight: 700; }
.panel-empty { font-size: 11.5px; color: var(--text-faint); text-align: center; padding: 28px 6px; }

.thumbs { display: flex; flex-direction: column; }
.thumb {
  position: relative; margin-bottom: 10px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 7px; overflow: hidden;
  background: #fff; min-height: 40px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.thumb:hover { border-color: var(--line-strong); box-shadow: 0 3px 10px rgba(21, 27, 44, 0.1); }
.thumb.is-active { border-color: var(--accent); }
.thumb.drag-over { transform: translateY(4px); border-color: var(--accent); border-style: dashed; }
.thumb-canvas { display: block; width: 100%; }
.thumb-num {
  position: absolute; bottom: 4px; right: 5px;
  background: rgba(25, 30, 43, 0.78); color: #fff;
  font-family: var(--font-mono); font-size: 9px;
  padding: 1px 6px; border-radius: 6px;
}

.bm-item, .att-item, .note-item {
  display: block; width: 100%; text-align: left;
  padding: 6px 8px; border: none; border-radius: 7px;
  background: none; cursor: pointer; font-size: 12px; color: var(--text);
  margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bm-item:hover, .att-item:hover, .note-item:hover { background: var(--accent-soft); color: var(--accent); }
.bm-item.bm-l2 { padding-left: 22px; font-size: 11.5px; }
.bm-item.bm-l3 { padding-left: 34px; font-size: 11px; }
.note-item .note-page {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--accent);
  margin-right: 6px;
}
.att-item .att-size { color: var(--text-faint); font-size: 10px; margin-left: 6px; }

.page-tools { border-top: 1px solid var(--line); padding: 10px; flex-shrink: 0; }
.pt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pt-btn {
  padding: 7px 6px; font-size: 10.5px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--panel); color: var(--text-dim);
  cursor: pointer; white-space: nowrap; text-align: center;
}
.pt-btn:hover { border-color: var(--accent-line); color: var(--accent); }
.pt-wide { width: 100%; margin-bottom: 6px; text-align: left; padding: 8px 10px; font-size: 11.5px; }

/* Stage */
.stage-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.stage {
  flex: 1; overflow: auto; position: relative;
  background-color: var(--stage);
  background-image: radial-gradient(#d8dbe3 1px, transparent 1px);
  background-size: 22px 22px;
  display: grid; place-items: center; padding: 26px;
}
.page-wrap {
  position: relative; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(21, 27, 44, 0.12), 0 14px 44px rgba(21, 27, 44, 0.16);
  background: #fff; border-radius: 2px;
}
#page-canvas { display: block; }
#overlay-canvas { position: absolute; inset: 0; touch-action: none; }

/* Inline text layer: WYSIWYG boxes floating over the canvases */
.inline-layer {
  position: absolute; inset: 0;
  pointer-events: none; /* only the boxes themselves catch input */
  overflow: visible;
}
.inline-box {
  position: absolute; pointer-events: auto;
  border: 1px dotted rgba(23, 28, 43, 0.65);
  background: rgba(255, 255, 255, 0.9);
  padding: 3px; cursor: move; z-index: 5;
  box-shadow: 0 2px 10px rgba(21, 27, 44, 0.14);
}
.ib-text {
  outline: none; cursor: text;
  white-space: pre; line-height: 1.25;
  min-width: 8px; min-height: 1em;
}
.inline-box.is-page { background: #fff; }
.inline-box.is-page .ib-text { line-height: 1.05; }
.inline-ghost {
  position: absolute; pointer-events: none;
  border: 1px dotted rgba(37, 99, 235, 0.9);
  background: rgba(255, 255, 255, 0.75);
  padding: 3px; color: var(--muted, #6b7280);
  line-height: 1.25; white-space: nowrap;
}

/* Empty state */
.dropzone {
  text-align: center; padding: 44px 40px;
  background: var(--panel);
  border: 1.5px dashed var(--line-strong); border-radius: 20px;
  max-width: 440px; transition: border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 30px rgba(21, 27, 44, 0.06);
}
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dz-mark {
  width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 18px;
  display: grid; place-items: center; font-size: 26px; color: #fff;
  background: linear-gradient(150deg, #3b6ff0, #1d43b8);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}
.dz-title { font-family: var(--font-display); font-weight: 550; font-size: 27px; }
.dz-sub { color: var(--text-dim); margin: 8px 0 18px; font-size: 13.5px; }
.dz-actions { display: flex; gap: 10px; justify-content: center; }
.dz-btn {
  padding: 11px 22px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 13.5px;
}
.dz-btn:hover { box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); }
.dz-btn-ghost {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line-strong);
}
.dz-btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.dz-fine { margin-top: 18px; font-size: 10px; color: var(--text-faint); }

/* Status bar */
.statusbar {
  height: 26px; flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; font-size: 10.5px; color: var(--text-dim);
  background: var(--panel); border-top: 1px solid var(--line);
}
.sb-sep { width: 1px; height: 12px; background: var(--line); }
.sb-flex { flex: 1; }

/* ── Right properties rail ───────────────────────────────────────── */
.props-rail {
  width: 250px; flex-shrink: 0; overflow-y: auto; padding: 12px;
  background: var(--panel-2); border-left: 1px solid var(--line);
  scrollbar-width: thin;
}
.props-section { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.props-section:last-of-type { border-bottom: none; }

.prop-label {
  font-size: 11px; color: var(--text-dim); margin: 10px 0 6px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.prop-value { font-size: 10px; color: var(--text-faint); }

.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.color-swatch {
  width: 22px; height: 22px; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; padding: 0;
  transition: transform 0.12s ease;
  display: inline-block; position: relative;
}
.color-swatch:hover { transform: scale(1.14); }
.color-swatch.is-active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.swatch-custom {
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
  overflow: hidden;
}
.swatch-custom input[type='color'] {
  position: absolute; inset: -6px; width: 40px; height: 40px;
  border: none; padding: 0; cursor: pointer; opacity: 0;
}

.props-rail input[type='range'] { width: 100%; accent-color: var(--accent); }

.info-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 11.5px; padding: 3px 0;
}
.info-row span:first-child { color: var(--text-faint); }
.info-row span:last-child {
  color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 130px;
}

/* Pro panels (collapsibles) */
.panel {
  border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 7px; background: var(--panel);
  overflow: hidden;
}
.panel summary {
  padding: 9px 11px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  list-style: none; user-select: none; color: var(--text);
}
.panel summary::-webkit-details-marker { display: none; }
.panel summary:hover { color: var(--accent); }
.panel-body { padding: 3px 11px 11px; display: flex; flex-direction: column; gap: 8px; }

.lock {
  font-size: 9px; color: var(--gold); border: 1px solid rgba(201, 141, 42, 0.45);
  padding: 0 4px; border-radius: 6px; vertical-align: 2px;
}

.p-input {
  width: 100%; padding: 8px 10px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12.5px;
  font-family: var(--font-body);
}
.p-input:focus { outline: none; border-color: var(--accent); }
.p-input-s { width: 64px; padding: 5px 8px; }
textarea.p-input { resize: vertical; min-height: 60px; }
select.p-input { cursor: pointer; }

.p-row { display: flex; align-items: center; gap: 10px; }
.p-row input[type='color'] {
  width: 28px; height: 28px; border: 1px solid var(--line-strong);
  background: none; cursor: pointer; padding: 1px; border-radius: 7px;
}
.p-row input[type='range'] { flex: 1; accent-color: var(--accent); }
.p-row label { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-dim); }

.p-btn {
  padding: 9px 14px; border-radius: 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 12.5px; font-weight: 700; width: 100%;
}
.p-btn:hover { border-color: var(--accent); color: var(--accent); }
.p-btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.p-btn-accent:hover { color: #fff; box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35); }
.p-btn-gold {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold-deep));
  border: none; color: #241803;
}
.p-btn-gold:hover { color: #241803; box-shadow: 0 4px 18px rgba(201, 141, 42, 0.4); }
.p-btn-s { width: auto; padding: 6px 12px; }
.p-hint { font-size: 11px; color: var(--text-dim); line-height: 1.55; }

.form-fields { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.form-field label { display: block; font-size: 10.5px; color: var(--text-dim); margin-bottom: 3px; }
.form-field .p-input { font-size: 12px; }
.form-field input[type='checkbox'] { accent-color: var(--accent); width: 15px; height: 15px; }

.rail-upsell {
  margin-top: 4px; padding: 13px;
  border: 1px solid rgba(201, 141, 42, 0.4); border-radius: 12px;
  background:
    radial-gradient(220px 120px at 50% -30px, rgba(240, 179, 78, 0.16), transparent 70%),
    var(--panel);
  display: flex; flex-direction: column; gap: 8px; font-size: 12.5px;
}
.rail-upsell .muted { font-size: 11.5px; }
.rail-upsell.is-hidden { display: none; }

/* ── Context menu ───────────────────────────────────────────────── */
.context-menu {
  position: fixed; z-index: 400; min-width: 200px; padding: 5px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-menu);
}
.context-menu button {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 7px 11px; border: none; border-radius: 6px;
  background: none; cursor: pointer; font-size: 12.5px; color: var(--text);
  text-align: left; white-space: nowrap;
}
.context-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.context-menu .divider { height: 1px; background: var(--line); margin: 5px 4px; }

/* ── Loading overlay ─────────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(246, 247, 249, 0.86); backdrop-filter: blur(3px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--text-dim); font-size: 13px;
}
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modals ──────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 450;
  background: rgba(25, 30, 43, 0.4); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  position: relative; width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 24px; box-shadow: 0 30px 80px rgba(21, 27, 44, 0.3);
  display: flex; flex-direction: column; gap: 12px;
  animation: pop 0.2s ease both;
  max-height: 86vh; overflow-y: auto;
}
.modal-wide { width: min(600px, 100%); }
.modal-center { text-align: center; align-items: center; }
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.modal-x {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--text-faint);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.modal-x:hover { color: var(--text); }
.modal-title { font-family: var(--font-display); font-size: 23px; font-weight: 550; }
.modal-sub { color: var(--text-dim); font-size: 13px; margin-top: -6px; }
.modal-error { color: var(--danger); font-size: 12.5px; }
.up-divider {
  text-align: center; font-size: 10px; color: var(--text-faint);
  display: flex; align-items: center; gap: 10px;
}
.up-divider::before, .up-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

#sign-pad {
  width: 100%; background: #fdfcf8; border-radius: 10px;
  border: 1px solid var(--line-strong); cursor: crosshair; touch-action: none;
}

/* Stamp picker */
.stamp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stamp-opt {
  padding: 12px 8px; border-radius: 8px; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; background: var(--panel);
  border: 2px solid currentColor;
}
.stamp-opt:hover { transform: scale(1.03); }
.stamp-green { color: #1f9d55; }
.stamp-red { color: #d43d2f; }
.stamp-blue { color: #2563eb; }
.st-custom-label { font-size: 10px; color: var(--text-dim); display: flex; flex-direction: column; gap: 6px; }

/* Properties grid */
.props-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 12px;
}
.props-grid .pg-label { color: var(--text-faint); font-size: 10.5px; margin-bottom: 2px; }
.props-grid .pg-value { color: var(--text); word-break: break-word; }

/* Shortcuts grid */
.shortcuts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.sc-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px;
}
.sc-row span:first-child { color: var(--text-dim); }
.sc-row .mono { font-size: 10.5px; }

/* Docs modal */
.docs-body { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.6; color: var(--text-dim); }
.docs-body strong { color: var(--text); }

/* About */
.about-mark {
  width: 60px; height: 60px; border-radius: 18px; font-size: 26px; color: #fff;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #3b6ff0, #1d43b8);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}
.about-badges { display: flex; gap: 8px; justify-content: center; }
.about-badges span {
  font-size: 9.5px; color: var(--text-dim); padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2);
}

/* ── Toasts ──────────────────────────────────────────────────────── */
.toast-region {
  position: fixed; bottom: 38px; left: 50%; transform: translateX(-50%);
  z-index: 600; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #23283a; color: #fff;
  padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 13px;
  box-shadow: 0 12px 40px rgba(21, 27, 44, 0.35);
  animation: pop 0.22s ease both; max-width: 90vw;
}
.toast.is-gold { background: linear-gradient(160deg, var(--gold-bright), var(--gold-deep)); color: #241803; }
.toast.is-error { background: var(--danger); color: #fff; }

/* ── Narrow screens ─────────────────────────────────────────────── */
@media (max-width: 1120px) {
  .props-rail { display: none; }
}
@media (max-width: 880px) {
  .sidebar { display: none; }
  .mb-doc { display: none; }
}
