:root {
  --bg: #0A1628;
  --header-bg: rgba(10, 22, 40, 0.94);
  --surface: #111F36;
  --card: #1A2A44;
  --stage-bg: #07101E;
  --border: #2A3F5F;
  --gold: #F7B500;
  --gold-hover: #ffca2c;
  --gold-ink: #0A1628;
  --accent: #F7B500;
  --text: #F5F0E6;
  --muted: #A8B4C8;
  --pass: #10B981;
  --danger: #EF4444;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  --bg: #F6F4EF;
  --header-bg: rgba(246, 244, 239, 0.94);
  --surface: #ECE8DF;
  --card: #FFFFFF;
  --stage-bg: #E2DDD2;
  --border: #DCD6C8;
  --gold: #F7B500;
  --gold-hover: #e5a700;
  --gold-ink: #0A1628;
  --accent: #9A6700;
  --text: #141E30;
  --muted: #526075;
  --shadow: 0 8px 24px rgba(20, 30, 48, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  transition: background 0.2s, color 0.2s;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.1rem;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--gold-ink);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.brand small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.top-actions { display: flex; gap: 8px; align-items: center; }
.pill-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.pill-btn:hover { border-color: var(--gold); }
.gold-pill {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: var(--gold);
}
.danger-outline:hover { border-color: var(--danger); color: var(--danger); }

/* HERO */
.hero { padding: 28px 0 16px; }
.shield-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.shield-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent);
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.15;
}
.hero p { margin: 0; color: var(--muted); max-width: 700px; font-size: 1.02rem; }

/* MAGNETIC DROP STAGE & WIFI BANNER */
.drop-stage {
  position: relative;
  margin: 18px 0 16px;
  padding: 28px 20px;
  border-radius: 20px;
  border: 2px dashed var(--border);
  background: var(--card);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.25s, transform 0.2s;
}
.drop-stage:hover, .drop-stage.dragover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.drop-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at center, rgba(247, 181, 0, 0.12), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.drop-stage:hover .drop-glow, .drop-stage.dragover .drop-glow { opacity: 1; }
.drop-icon { font-size: 2.3rem; margin-bottom: 6px; }
.drop-content h2 { margin: 0 0 4px; font-size: 1.35rem; }
.drop-content p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.browse-link { color: var(--accent); font-weight: 700; text-decoration: underline; }

.wifi-banner {
  max-width: 680px;
  margin: 15px auto 12px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--text);
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
}
.wifi-icon { font-size: 1.25rem; flex-shrink: 0; }

.workspace-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

/* SUBTLE WORKFLOW TIP */
.workflow-tip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 9px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--muted);
}
.workflow-tip strong { color: var(--accent); }
.wf-arrow { color: var(--accent); font-weight: 800; }

/* TOOL LAUNCHER CARDS GRID */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}
.tool-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tool-num {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(247, 181, 0, 0.16);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.85rem;
}
.tool-launch {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
}
.tool-card h3 { margin: 4px 0 0; font-size: 1.15rem; }
.tool-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* ==================== FULL-SCREEN STUDIO MODAL ==================== */
.studio-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
}
.modal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-badge {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 6px;
}
.modal-title-wrap h2 {
  margin: 0;
  font-size: 1.05rem;
}
.modal-switcher {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.m-tab {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.m-tab:hover, .m-tab.active {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: var(--gold);
}
.modal-controls { display: flex; gap: 8px; align-items: center; }

.modal-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
}
.tool-view {
  width: 100%;
  height: 100%;
  display: flex;
  min-height: 0;
}

/* SIDEBAR & MAXIMIZE MODE */
.side-panel {
  width: 325px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.studio-modal.stage-maximized .side-panel,
.studio-modal.stage-maximized .thumb-rail {
  display: none !important;
}
@media (max-width: 960px) {
  .thumb-rail { display: none !important; }
}
@media (max-width: 820px) {
  .tool-view { flex-direction: column; overflow-y: auto; }
  .side-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 46vh; }
  .modal-switcher { display: none; }
}

.panel-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
}
.panel-block h4 { margin: 0 0 8px; font-size: 0.94rem; }
.flex-grow-scroll { flex: 1; min-height: 180px; overflow-y: auto; }

/* MAIN STAGE */
.main-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--stage-bg);
  display: flex;
  flex-direction: column;
}
.stage-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.page-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}
.canvas-scroll-area {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.canvas-scroll-area canvas {
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
}
.studio-modal.stage-maximized .canvas-scroll-area canvas {
  max-width: none;
  width: min(96vw, 1180px);
}
.stage-placeholder {
  margin: auto;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  max-width: 440px;
}

/* FLANKED THUMBNAIL RAILS (MERGE & SPLIT) */
.flanked-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.thumb-rail {
  width: 215px;
  flex-shrink: 0;
  background: rgba(17, 31, 54, 0.72);
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
:root[data-theme="light"] .thumb-rail {
  background: rgba(236, 232, 223, 0.85);
}
#mergeLeftRail { border-right: 1px solid var(--border); }
#mergeRightRail { border-left: 1px solid var(--border); }

.rail-header {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-align: center;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.rail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.rail-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 5px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.rail-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.rail-card img {
  width: 100%;
  height: 82px;
  object-fit: contain;
  background: #fff;
  border-radius: 3px;
  display: block;
}
.rail-card span {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

/* CAROUSEL (IMAGES TO PDF) */
.carousel-stage { position: relative; }
#carHeroCanvas { cursor: zoom-in; }
.studio-modal.stage-maximized #carHeroCanvas { cursor: zoom-out; }
.carousel-strip {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.car-slide {
  flex-shrink: 0;
  width: 96px;
  padding: 6px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--card);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.car-slide:hover, .car-slide.active {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.car-slide img {
  width: 100%;
  height: 58px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}
.car-slide span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* MINI THUMBNAILS IN SIDEBAR (ORGANIZE) */
.mini-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.mini-thumb {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 9px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
}
.mini-thumb.active { border-color: var(--gold); }
.mini-thumb.dragging { opacity: 0.4; }
.mini-thumb canvas {
  width: 100%;
  height: 92px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
}
.mini-thumb span {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 4px;
}

/* UNLOCKER STAGE CARD */
.unlock-card {
  margin: auto;
  max-width: 520px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow);
}
.unlock-icon { font-size: 3rem; margin-bottom: 10px; }
.unlock-card h3 { margin: 0 0 8px; font-size: 1.25rem; word-break: break-word; }
.password-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.unlock-result {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
}
.unlock-result.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--pass);
}
.unlock-result.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: var(--danger);
}

/* FORM CONTROLS & HELPERS */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.inline-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.mb-8 { margin-bottom: 8px; }
.mt-8 { margin-top: 8px; }
.hidden { display: none !important; }
.small-desc { margin: 0 0 8px; font-size: 0.82rem; color: var(--muted); }
.field-lbl { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }

input[type="text"], input[type="password"], select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.86rem;
}
.btn-gold {
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-gold:hover { background: var(--gold-hover); }
.btn-secondary {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--gold); }
.mini-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
}
.mini-btn:hover { border-color: var(--gold); }
.mini-btn.gold-outline { border-color: var(--gold); color: var(--accent); font-weight: 600; }
.mini-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}
.file-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* METADATA TABLE */
.meta-box {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.meta-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.meta-table th, .meta-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.meta-table th { color: var(--muted); width: 30%; }

/* SIGNATURE */
.ink-controls { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; flex-wrap: wrap; }
.ink-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
}
.ink-dot.active { border-color: var(--gold); transform: scale(1.15); }
#sigCanvas {
  width: 100%;
  height: 135px;
  background: #ffffff;
  border-radius: 9px;
  border: 1px solid var(--border);
  touch-action: none;
  cursor: crosshair;
}
.slider-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.preview-stage {
  position: relative;
  display: inline-block;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  cursor: crosshair;
}
#sigOverlayPreview {
  position: absolute;
  pointer-events: none;
  border: 1.5px dashed #2563eb;
  background: rgba(37, 99, 235, 0.08);
  transform: translate(-50%, -50%);
}

/* TOAST & FOOTER */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateY(0); }

.info-section { margin: 36px 0 24px; }
.info-section h2 { font-size: 1.25rem; margin-bottom: 14px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .info-grid { grid-template-columns: 1fr; } }
.info-grid div {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.info-grid h3 { margin: 0 0 6px; font-size: 1rem; color: var(--accent); }
.info-grid p { margin: 0; font-size: 0.86rem; color: var(--muted); }

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}


/* ==================== LOUD STEP 1 & STEP 2 BANNERS ==================== */
.loud-step-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px auto 14px;
  padding: 14px 22px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(245, 185, 66, 0.16), rgba(245, 185, 66, 0.08));
  border: 2px solid rgba(245, 185, 66, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  text-align: left;
}

.loud-step-banner.step-2 {
  margin-top: 30px;
  margin-bottom: 18px;
}

.loud-step-pill {
  flex-shrink: 0;
  background: #f5b942;
  color: #0b1120;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
}

.loud-step-text {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text, #f8fafc);
  line-height: 1.35;
}

.loud-step-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(245, 185, 66, 0.22);
  color: #f5b942;
  font-size: 1.15rem;
  font-weight: 900;
}

[data-theme="light"] .loud-step-banner {
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border-color: #d97706;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.12);
}

[data-theme="light"] .loud-step-pill {
  background: #d97706;
  color: #ffffff;
}

[data-theme="light"] .loud-step-text {
  color: #0f172a;
}

[data-theme="light"] .loud-step-arrow {
  background: rgba(217, 119, 6, 0.16);
  color: #b45309;
}

.inline-tour-link {
  background: none;
  border: none;
  padding: 0;
  color: #f5b942;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

[data-theme="light"] .inline-tour-link {
  color: #b45309;
}

.tour-launch-btn {
  border-color: rgba(245, 185, 66, 0.55) !important;
  font-weight: 700;
}

/* ==================== GUIDED PRODUCT TOUR ==================== */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(2px);
  z-index: 9990;
}

.tour-highlight {
  position: relative !important;
  z-index: 9995 !important;
  box-shadow: 0 0 0 4px #f5b942, 0 18px 48px rgba(0, 0, 0, 0.55) !important;
  border-radius: 16px;
  background-color: var(--card, #111b2e) !important;
}

[data-theme="light"] .tour-highlight {
  box-shadow: 0 0 0 4px #d97706, 0 18px 48px rgba(15, 23, 42, 0.35) !important;
  background-color: #ffffff !important;
}

.tour-popover {
  position: fixed;
  z-index: 10000;
  width: min(390px, calc(100vw - 24px));
  background: #0f172a;
  color: #f8fafc;
  border: 2px solid #f5b942;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.65);
}

[data-theme="light"] .tour-popover {
  background: #ffffff;
  color: #0f172a;
  border-color: #d97706;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.28);
}

.tour-pop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tour-step-badge {
  background: rgba(245, 185, 66, 0.18);
  color: #f5b942;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}

[data-theme="light"] .tour-step-badge {
  background: #fef3c7;
  color: #b45309;
}

.tour-close-x {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.7;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
}

.tour-close-x:hover {
  opacity: 1;
}

.tour-popover h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.3;
}

.tour-popover p {
  margin: 0 0 16px;
  font-size: 0.94rem;
  line-height: 1.55;
  opacity: 0.92;
}

.tour-pop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tour-next-btn {
  padding: 7px 14px !important;
  font-size: 0.88rem !important;
}

@media (max-width: 640px) {
  .loud-step-banner {
    padding: 12px 14px;
    gap: 10px;
  }
  .loud-step-text {
    font-size: 0.98rem;
  }
}

/* ==================== TOOL 06 CENTER-STAGE UNLOCK LAYOUT ==================== */
.unlock-stage-area {
  align-items: flex-start !important;
  justify-content: center;
  padding-top: 26px !important;
}

.unlock-hub {
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.unlock-hub .unlock-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 28px;
}

.unlock-action-panel {
  background: var(--card, #111b2e);
  border: 1px solid rgba(245, 185, 66, 0.35);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .unlock-action-panel {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.unlock-pwd-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.unlock-pwd-label {
  flex-shrink: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text, #f8fafc);
}

[data-theme="light"] .unlock-pwd-label {
  color: #0f172a;
}

.unlock-pwd-field-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.unlock-pwd-input {
  width: 100%;
  padding: 12px 16px !important;
  font-size: 1.05rem !important;
  font-weight: 600;
  border-radius: 10px !important;
  border: 2px solid rgba(245, 185, 66, 0.5) !important;
  background: rgba(15, 23, 42, 0.85) !important;
  color: #f8fafc !important;
}

.unlock-pwd-input:focus {
  outline: none;
  border-color: #f5b942 !important;
  box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.22);
}

[data-theme="light"] .unlock-pwd-input {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #d97706 !important;
}

.unlock-eye-btn {
  padding: 11px 13px !important;
  font-size: 1.05rem !important;
}

.unlock-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.unlock-main-btn {
  padding: 13px 18px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
}

.unlock-tips-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 720px) {
  .unlock-pwd-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .unlock-btn-row {
    grid-template-columns: 1fr;
  }
}

/* ==================== TOOL 06 MIDDLE FILE-SELECTOR CARD ==================== */
.unlock-select-panel {
  padding: 16px 24px;
}

.unlock-select-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unlock-select-dropdown {
  flex: 1;
  min-width: 0;
  padding: 11px 14px !important;
  font-size: 0.98rem !important;
  font-weight: 600;
  border-radius: 10px !important;
}

.unlock-load-btn {
  flex-shrink: 0;
  padding: 11px 16px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .unlock-select-bar {
    flex-direction: column;
    align-items: stretch;
  }
}