:root {
  --bg: #12110f;
  --panel: #1b1916;
  --panel-2: #24211c;
  --line: #3a342c;
  --text: #f3eee6;
  --muted: #9a9184;
  --accent: #e4a24a;
  --ref: #7eb6ea;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --sans: "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

.app {
  height: 100%;
  display: grid;
  position: relative;
  --left-w: 320px;
  --right-w: 300px;
  --lcol: var(--left-w);
  --rcol: var(--right-w);
  --lh: 10px;
  --rh: 10px;
  grid-template-columns: var(--lcol) var(--lh) minmax(0, 1fr) var(--rh) var(--rcol);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "top top top top top"
    "setup lhandle stage rhandle rail";
}

.app.left-collapsed { --lcol: 0px; --lh: 0px; }
.app.right-collapsed { --rcol: 0px; --rh: 0px; }

.app.left-collapsed .setup-side,
.app.right-collapsed .compare-rail,
.app.left-collapsed #leftHandle,
.app.right-collapsed #rightHandle {
  display: none;
}

.handle {
  background: #161411;
  border: 0;
  cursor: col-resize;
  position: relative;
  z-index: 3;
}

.handle#leftHandle { grid-area: lhandle; }
.handle#rightHandle { grid-area: rhandle; }

.handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 4px;
  height: 42px;
  margin-top: -21px;
  border-radius: 4px;
  background: #5b5144;
}

.handle:hover::after,
.app.resizing .handle::after {
  background: var(--accent);
}

.top {
  grid-area: top;
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--line);
  background: #161411;
  white-space: nowrap;
}

.top button { padding: 6px 11px; }
.top .icon-btn { width: 34px; padding: 6px 0; text-align: center; font-weight: 600; }

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}

.mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(228, 162, 74, 0.15);
  flex: 0 0 auto;
}

.brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.modes {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1b1916;
}

.top .mode {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 7px;
}

.top .mode:not(:disabled):not(.active):hover { color: var(--text); background: #2a261f; }

.top .mode.active {
  background: var(--accent);
  color: #1a1308;
  font-weight: 600;
}

.project-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.project-box input {
  flex: 0 1 230px;
  min-width: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1916;
  color: var(--text);
  padding: 6px 8px;
  font: 13px var(--sans);
}

.top-actions { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; flex: 0 0 auto; margin-left: auto; }

.menu-wrap { position: relative; }
.caret { font-size: 11px; color: var(--muted); margin-left: 2px; }
.menu-btn[aria-expanded="true"] { border-color: var(--accent); }

.menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: 330px;
  padding: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  white-space: normal;
}

.menu-title { margin: 4px 8px 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.top .menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
}

.top .menu-item:not(:disabled):hover, .top .menu-item:focus-visible { background: rgba(228, 162, 74, 0.12); outline: none; }
.menu-version { margin: 4px 0 0; padding: 8px 12px 4px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted, #9a8f80); }
.help-version { margin-top: 10px; }
.menu-item strong { display: block; font-size: 14px; font-weight: 600; }
.menu-item strong span { color: var(--accent); font-weight: 500; margin-left: 4px; font-size: 13px; }
.menu-item small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.menu-check { display: flex; gap: 8px; align-items: center; margin: 6px 10px 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.menu-info { margin: 4px 10px 6px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.menu-info:empty { display: none; }

.file-list { margin-top: 10px; }
.file-list h3 {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.file-btn {
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
  font-size: 13px;
}

.file-btn small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.side {
  overflow: auto;
  padding: 0 14px 16px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.side-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -14px;
  padding: 8px 8px 8px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.collapse-btn {
  width: 30px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
  background: transparent;
}

.collapse-btn:hover { border-color: var(--accent); color: var(--accent); }

.panel-tab {
  position: absolute;
  top: 50%;
  z-index: 6;
  transform: translateY(-50%);
  padding: 14px 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.panel-tab b { display: block; margin-bottom: 6px; font-size: 16px; line-height: 1; color: var(--accent); }
.panel-tab span { writing-mode: vertical-rl; display: block; }
.panel-tab.left { left: 0; border-left: 0; border-radius: 0 10px 10px 0; }
.panel-tab.left span { transform: rotate(180deg); }
.panel-tab.right { right: 0; border-right: 0; border-radius: 10px 0 0 10px; }
.panel-tab:hover { border-color: var(--accent); color: var(--accent); }

.setup-side { grid-area: setup; border-right: 0; }
.compare-rail { grid-area: rail; border-left: 0; }

.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.card h2,
.card summary {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.card summary::-webkit-details-marker { display: none; }
.card summary::after {
  content: "▾";
  float: right;
  color: var(--accent);
}
.card:not([open]) summary { margin-bottom: 0; }
.card:not([open]) summary::after { content: "▸"; }

.lede {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}

.hint, .help-block p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.help-block {
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.help-block strong { color: var(--text); }
.card .help-block summary { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--accent); }
.card .help-block[open] summary { margin-bottom: 8px; }
.help-block:not([open]) { padding: 6px 10px; }

.drop {
  display: block;
  position: relative;
  min-height: 84px;
  border: 1px dashed #5b5144;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.18);
}

.drop:hover, .drop.over {
  border-color: var(--accent);
  background: rgba(228, 162, 74, 0.08);
}

.drop input { display: none; }
.drop-title { display: block; font-size: 14px; }
.drop-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.drop.has-file .drop-title,
.drop.has-file .drop-hint { display: none; }

.drop img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--text);
  background: #2a261f;
}

button:disabled { opacity: 0.4; cursor: not-allowed; }

button.primary {
  background: var(--accent);
  color: #1a1308;
  border-color: #c7892d;
  font-weight: 600;
}

button.ghost { background: transparent; }
button.active { border-color: var(--accent); color: var(--accent); }
button.go { width: 100%; margin-top: 8px; }

.choice {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 10px;
}

.choice input { margin-top: 3px; }

.slider {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}

.slider input { width: 100%; accent-color: var(--accent); }

.zoom-readout {
  min-width: 3.2em;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  align-self: center;
}

.sample-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #000, inset 0 0 0 1.5px #000;
  pointer-events: none;
  z-index: 4;
}

.sample-marker::before,
.sample-marker::after {
  content: "";
  position: absolute;
  background: #fff;
  box-shadow: 0 0 0 1px #000;
}

.sample-marker::before { left: 50%; top: -9px; width: 2px; height: 7px; margin-left: -1px; }
.sample-marker::after { left: -9px; top: 50%; width: 7px; height: 2px; margin-top: -1px; }

.view-badge, .pick-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: calc(100% - 100px);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(22, 20, 17, 0.88);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.view-badge.ref-only { border-color: var(--ref); color: #d6e8fa; }

.pick-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 14px;
  border-color: var(--accent);
  pointer-events: auto;
  font-size: 13px;
}

.pick-bar[hidden] { display: none; }
.pick-bar span { overflow: hidden; text-overflow: ellipsis; }
.pick-bar button { padding: 4px 10px; font-size: 12px; border-radius: 999px; }

.loupe {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  width: 250px;
  padding: 8px 10px 10px;
  background: rgba(27, 25, 22, 0.95);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  cursor: default;
}

.loupe.right { left: auto; right: 12px; }

.loupe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.loupe-close { width: 24px; height: 24px; padding: 0; line-height: 1; font-size: 16px; background: transparent; }

.loupe-swatches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.loupe-advice { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--text); }
.loupe-advice:empty { display: none; }

.swatch-col { text-align: center; }

.swatch {
  height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.swatch-label {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.swatch-hex, .swatch-rgb {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.swatch-rgb { color: var(--muted); }


.layer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  max-height: 44vh;
  overflow-y: auto;
}

.layer-row {
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.layer-row .eye {
  flex: 0 0 28px;
  padding: 0;
  font-size: 12px;
  color: var(--accent);
  background: transparent;
}

.layer-row .eye:disabled { opacity: 0.25; }
.layer-row.hidden-layer .eye { color: var(--muted); }
.layer-row.hidden-layer .layer-btn { opacity: 0.5; }

.layer-btn {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 6px 10px;
}

.layer-btn .lname {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-row.active .layer-btn {
  background: rgba(228, 162, 74, 0.14);
  border-color: var(--accent);
}

.layer-row.original .layer-btn {
  border-style: dashed;
}

.layer-tools button { padding: 6px 9px; font-size: 13px; }

.notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.notes textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1916;
  color: var(--text);
  padding: 6px 8px;
  font: 13px/1.4 var(--sans);
}

.card h3 {
  margin: 10px 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.history {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.4;
}

.history li { padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.history time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 4px; }
.history .muted { color: var(--muted); }

.save-state {
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.save-state.dirty { color: var(--accent); }

.layer-btn small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stage-wrap {
  grid-area: stage;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.banner {
  padding: 8px 16px;
  background: #2a2318;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
}

.banner.error {
  background: #3a1d18;
  border-bottom-color: #7a3328;
  color: #ffd9cf;
}

.banner .banner-action {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 12px;
}

.align-quality {
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
}

.viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(45deg, #1a1815 25%, transparent 25%),
    linear-gradient(-45deg, #1a1815 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1815 75%),
    linear-gradient(-45deg, transparent 75%, #1a1815 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  background-color: #141210;
  cursor: crosshair;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.viewport.panning { cursor: grabbing; }

.stage-wrap { position: relative; }

.stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 32px;
  pointer-events: none;
}

.empty p { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; }
.empty button { pointer-events: auto; margin-top: 10px; font-family: var(--sans); font-size: 15px; padding: 10px 18px; }
.empty .muted { color: var(--muted); font-family: var(--sans); font-size: 14px; max-width: 460px; }

.status {
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  background: #161411;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  place-items: center;
  z-index: 20;
}

.modal:not([hidden]) { display: grid; }

.modal-card {
  width: min(460px, calc(100% - 32px));
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-card {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.modal-card.wide { width: min(760px, calc(100% - 32px)); }
.modal-card h2 { margin: 0 0 12px; font-family: var(--serif); }
.modal-card h2 + section h3, .modal-card section h3 { margin: 16px 0 4px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.modal-card ul { padding-left: 18px; color: var(--muted); }
.modal-card li { margin: 6px 0; }
.modal-card p { color: var(--muted); font-size: 14px; }
.modal-card p.hint { font-size: 12px; }
.modal-card > button.ghost:last-child { margin-top: 16px; }
.modal-card code { color: var(--text); }

.example-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.example-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 8px;
  background: #1b1916;
}

.example-card:hover { border-color: var(--accent); }

.example-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
}

.ex-title { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.ex-blurb { font-size: 12px; line-height: 1.4; color: var(--muted); }
.ex-meta { font-size: 11px; color: var(--muted); }

.lib-list { display: flex; flex-direction: column; gap: 6px; }

.lib-row { display: flex; gap: 6px; align-items: stretch; }
.lib-row.current .lib-open { border-color: var(--accent); }

.lib-open {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: #1b1916;
  padding: 6px;
}

.lib-open img { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; flex: 0 0 auto; }
.lib-open span { min-width: 0; }
.lib-open strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-open small { display: block; color: var(--muted); font-size: 11px; }
.lib-del { font-size: 12px; }

.busy {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
  place-items: center;
}

.busy:not([hidden]) { display: grid; }

.busy-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #2a261f;
  color: var(--text);
  font-size: 12px;
}

button kbd { margin-left: 4px; padding: 0 4px; font-size: 10px; color: var(--muted); background: transparent; }

.help-steps { padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.help-steps li { margin: 8px 0; }
.help-steps strong, .modal-card.help li strong, .modal-card.help p strong { color: var(--text); }
.modal-card.help h3 { margin: 18px 0 4px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.modal-card.help ul { font-size: 14px; line-height: 1.45; }
.modal-card.help .keys li { margin: 4px 0; }

.side button { padding: 6px 10px; font-size: 13px; }
.side .card { padding: 12px; }
.side .row { gap: 6px; }

/* Laptops and iPad landscape: slimmer panels. */
@media (max-width: 1366px) {
  .app { --left-w: 300px; --right-w: 296px; }
}

/* iPad portrait and small windows: one side panel at a time (the app enforces it), never wider than 45% of the screen. */
@media (max-width: 1000px) {
  .app { grid-template-columns: min(var(--lcol), 45vw) var(--lh) minmax(0, 1fr) var(--rh) min(var(--rcol), 45vw); }
  .brand h1 { display: none; }
  .top { gap: 8px; padding: 0 8px 0 12px; }
  .top .mode { padding: 5px 11px; }
}

@media (max-width: 640px) {
  .app { grid-template-columns: 0 0 minmax(0, 1fr) 0 0; }
  .side {
    position: absolute;
    top: 52px;
    bottom: 0;
    z-index: 8;
    width: min(320px, 88vw);
    box-shadow: var(--shadow);
  }
  .setup-side { left: 0; }
  .compare-rail { right: 0; }
  .handle { display: none; }
  .brand, .project-box, #helpBtn { display: none; }
  .top { padding: 0 8px; gap: 6px; }
  .top .mode { padding: 5px 9px; }
  .top button { padding: 6px 9px; }
  .menu { width: min(330px, calc(100vw - 16px)); }
}

/* ---------- Tour, tips, small additions (v15) ---------- */
.side-head .tour-btn {
  margin-left: auto;
  margin-right: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(228, 162, 74, 0.45);
  border-radius: 999px;
  background: rgba(228, 162, 74, 0.08);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
.side-head .tour-btn:hover { background: rgba(228, 162, 74, 0.18); }

.tip {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.menu-section {
  margin: 6px 0 0;
  padding: 8px 12px 2px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.zoom-row { align-items: center; }
.help-actions { justify-content: flex-end; gap: 8px; margin-top: 8px; }

.tour {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.tour-spot {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(10, 9, 8, 0.62), 0 0 0 2px rgba(228, 162, 74, 0.9), 0 0 24px 4px rgba(228, 162, 74, 0.35);
  transition: left 0.28s ease, top 0.28s ease, width 0.28s ease, height 0.28s ease;
  pointer-events: none;
}
.tour-card {
  position: fixed;
  width: min(330px, calc(100vw - 24px));
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #2a261f, #1f1c18);
  box-shadow: var(--shadow);
  color: var(--text);
  transition: left 0.28s ease, top 0.28s ease, opacity 0.2s ease;
}
.tour-card h3 {
  margin: 2px 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}
.tour-card p { margin: 0; font-size: 14px; line-height: 1.45; color: #ddd5c9; }
.tour-card .tour-step { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.tour-nav { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tour-nav .primary, .tour-nav .ghost { padding: 6px 14px; }
.tour-skip { border: 0; background: none; color: var(--muted); padding: 6px 4px; font-size: 13px; }
.tour-skip:hover { color: var(--text); }
.tour-dots { display: flex; gap: 5px; margin-right: auto; margin-left: 4px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: #4a4339; }
.tour-dots i.on { background: var(--accent); }

.tour-invite {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  z-index: 55;
  width: min(420px, calc(100vw - 24px));
  padding: 14px 16px 12px;
  border: 1px solid rgba(228, 162, 74, 0.5);
  border-radius: 14px;
  background: linear-gradient(180deg, #2a261f, #1f1c18);
  box-shadow: var(--shadow);
}
.tour-invite p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.tour-invite .row { justify-content: flex-end; gap: 8px; }

.tip-pop {
  position: fixed;
  z-index: 70;
  max-width: 260px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #2b2721;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
}

@media (max-width: 640px) {
  .tour-card { left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto; }
}
