/* The tour window, Settings (hybrid), guides and coach marks. */

/* ---------- tour ---------- */
.app-tour .win-titlebar { position: absolute; inset: 0 0 auto; z-index: 2; background: linear-gradient(rgba(30, 30, 32, 0.92), rgba(30, 30, 32, 0)); }
.tour { flex: 1; overflow: auto; padding: 56px 34px 26px; scroll-behavior: smooth; }
.tour-hero { display: flex; gap: 26px; align-items: flex-start; padding-bottom: 22px; }
.tour-icon .app-ico-img { width: 120px; height: 120px; }
.tour-name { margin: 6px 0 2px; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.tour-tagline {
  margin: 0 0 10px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--gold-pale), var(--gold) 40%, #b9bff7 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tour-lede { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--text-2); max-width: 520px; }
.tour-cta { display: flex; flex-wrap: wrap; gap: 8px; }
.tour-req { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }
.tour-section { padding: 18px 0 6px; border-top: 1px solid var(--sep); }
.tour-section h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.tour-note { margin: -6px 0 12px; color: var(--text-2); }
.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tour-steps li { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--sep); }
.tour-steps li span:last-child { color: var(--text-2); line-height: 1.45; }
.tour-step-n {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px;
  background: linear-gradient(135deg, var(--gold), #f0a93a); color: var(--navy); font-weight: 800; font-size: 13px;
}
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tour-card {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; gap: 2px 10px;
  text-align: left; padding: 12px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--sep);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.tour-card:hover { background: rgba(108, 116, 216, 0.16); border-color: rgba(154, 162, 240, 0.4); transform: translateY(-1px); }
.tour-card-icon {
  grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2c3463, var(--navy)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.tour-card-text { display: grid; gap: 3px; }
.tour-card-text b { font-size: 13.5px; }
.tour-card-text span { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.tour-card-try { grid-column: 2; justify-self: start; margin-top: 6px; font-size: 12px; font-weight: 600; color: #6fb2ff; }
.tour-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tour-provider { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--sep); }
.tour-provider span { font-size: 12px; color: var(--text-2); }
.tour-provider.is-free { border-color: rgba(50, 215, 75, 0.45); background: rgba(50, 215, 75, 0.08); }
.tour-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tour-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tour-facts li { display: flex; gap: 10px; align-items: baseline; line-height: 1.5; color: var(--text-2); }
.tour-facts li .sf { color: var(--gold); }
.tour-facts.is-plain li::before { content: "✦"; color: var(--gold); font-size: 11px; }
.tour-footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 18px; margin-top: 12px; border-top: 1px solid var(--sep); color: var(--text-3); }
.tour-author { margin-left: auto; }

/* ---------- Settings (hybrid: screenshot + field guide) ---------- */
.app-settings { background: transparent; box-shadow: none; overflow: visible; }
/* Drag strip over the screenshot's title only: the toolbar tabs below it are hotspots. */
.app-settings .win-titlebar { position: absolute; top: 0; left: 90px; width: calc(640px - 180px); height: 26px; z-index: 3; padding: 0; background: transparent; }
.app-settings .win-lights { visibility: hidden; width: 0; }
.settings { flex: 1; min-height: 0; display: flex; gap: 14px; align-items: flex-start; overflow-y: auto; scrollbar-width: none; }
.settings-shot { flex: none; }
.shot-frame {
  position: relative; width: calc(var(--w) * 1px); max-width: 100%; aspect-ratio: var(--w) / var(--h);
  border-radius: 18px; background: var(--win-bg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 10px 24px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.shot-img { width: 100%; height: 100%; border-radius: 18px; object-fit: contain; }
.shot-frame.is-missing .shot-img { display: none; }
.shot-placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 40px;
  text-align: center; color: var(--text-2); border-radius: 18px;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 12px, transparent 12px 24px), var(--win-bg);
}
.shot-placeholder b { color: var(--text); font-size: 15px; }
.shot-placeholder-note { max-width: 320px; font-size: 12px; color: var(--text-3); }
.shot-lights { position: absolute; left: 20px; top: 20px; display: flex; gap: 8px; z-index: 4; }
.shot-lights button { width: 12px; height: 12px; border-radius: 50%; cursor: default; }
.shot-frame.is-missing .shot-lights button:nth-child(1) { background: #FF5F57; }
.shot-frame.is-missing .shot-lights button:nth-child(2) { background: #FEBC2E; }
.shot-frame.is-missing .shot-lights button:nth-child(3) { background: #28C840; }
.hotspot {
  position: absolute; z-index: 2; border-radius: 7px; cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.hotspot:hover, .hotspot.is-lit { background: rgba(255, 201, 74, 0.12); box-shadow: 0 0 0 2px rgba(255, 201, 74, 0.85), 0 0 18px rgba(255, 201, 74, 0.35); }
.hotspot.is-info { cursor: help; }

.settings-guide {
  flex: 1; min-width: 0; max-height: 100%; overflow: auto; padding: 14px 16px 16px;
  border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.guide-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.guide-tab { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 8px; font-size: 10.5px; color: var(--text-2); cursor: pointer; }
.guide-tab .sf { font-size: 15px !important; }
.guide-tab.is-active { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.guide-items { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.guide-item { padding: 3px 10px; border-radius: 12px; font-size: 12px; background: rgba(255, 255, 255, 0.07); color: var(--text-2); cursor: pointer; }
.guide-item.is-active { background: var(--accent); color: #fff; }
.guide-title { margin: 14px 0 4px; font-size: 15px; }
.guide-intro { margin: 0 0 10px; color: var(--text-2); line-height: 1.5; }
.guide-fields { margin: 0; display: grid; gap: 2px; }
.guide-fields dt { margin-top: 8px; font-weight: 600; color: var(--gold-pale); border-radius: 5px; }
.guide-fields dd { margin: 2px 0 0; color: var(--text-2); line-height: 1.45; }
.guide-fields dd a { color: #6fb2ff; text-decoration: none; white-space: nowrap; }
.guide-fields dd a:hover { text-decoration: underline; }
.guide-fields .is-lit { color: var(--gold); }
.guide-fields dt.is-lit { background: rgba(255, 201, 74, 0.12); }
.guide-note { margin: 14px 0 0; padding: 9px 10px; border-radius: 10px; background: rgba(108, 116, 216, 0.15); color: var(--text-2); line-height: 1.45; }

/* ---------- guides (keys, install) ---------- */
.guide { flex: 1; overflow: auto; padding: 4px 24px 24px; }
.guide-hero { display: flex; gap: 14px; align-items: center; padding: 6px 0 16px; }
.guide-hero h2 { margin: 0; font-size: 20px; }
.guide-hero p { margin: 3px 0 0; color: var(--text-2); line-height: 1.45; }
.guide-hero-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #2c3463, var(--navy)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.key-cards { display: grid; gap: 10px; }
.key-card { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--sep); transition: box-shadow 0.3s ease; scroll-margin-top: 10px; }
.key-card.is-free { border-color: rgba(50, 215, 75, 0.4); }
.key-card.is-focus { box-shadow: 0 0 0 2px var(--gold); }
.key-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.key-head h3 { margin: 0; font-size: 15px; }
.key-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(255, 201, 74, 0.15); color: var(--gold-pale); white-space: nowrap; }
.key-card.is-free .key-badge { background: rgba(50, 215, 75, 0.15); color: #8ff09d; }
.key-card p { margin: 8px 0; color: var(--text-2); line-height: 1.5; }
.key-steps { margin: 6px 0 10px; padding-left: 20px; line-height: 1.55; }
.key-routers { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.key-routers a { color: #6fb2ff; font-weight: 600; text-decoration: none; margin-right: 8px; }
.key-routers code { color: var(--text-2); }
.key-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-box { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(108, 116, 216, 0.12); border: 1px solid rgba(154, 162, 240, 0.22); }
.guide-box h3 { margin: 0 0 6px; font-size: 14px; }
.guide-box p { margin: 0; color: var(--text-2); line-height: 1.5; }
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.install-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.install-step h3 { margin: 3px 0 4px; font-size: 15px; }
.install-step p { margin: 0 0 8px; color: var(--text-2); line-height: 1.5; }
.install-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--gold), #f0a93a); color: var(--navy); }
.gk-shots { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin: 4px 0 8px; }
.gk-shots figure { margin: 0; display: grid; gap: 4px; }
.gk-shots img { height: auto; border-radius: 10px; }
.gk-shots figcaption { font-size: 11.5px; color: var(--text-3); max-width: 200px; }
.dmg { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--sep); max-width: 420px; }
.dmg-shot { width: 100%; height: auto; }
.dmg-drawn { display: none; }
.dmg.is-drawn .dmg-shot { display: none; }
.dmg.is-drawn .dmg-drawn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 26px 44px;
  background: linear-gradient(#eef0fb, #fafafd);
}
.dmg-drawn img { width: 76px; height: 76px; }
.dmg-folder { color: #4aa3ff; }
.dmg-trail { flex: 1; height: 16px; background: radial-gradient(circle, var(--gold) 0 2px, transparent 3px) 0 50% / 18px 16px repeat-x; opacity: 0.8; }
.sys-pane { margin: 4px 0 8px; max-width: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--sep); background: #232325; }
.sys-pane-bar { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; background: #2c2c2f; font-weight: 600; font-size: 12px; }
.sys-dots { display: flex; gap: 5px; }
.sys-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.sys-pane-body { padding: 8px 10px; }
.sys-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.sys-row span { flex: 1; }
.sys-row.is-text span { color: var(--text-2); }
.sys-btn { padding: 4px 10px; border-radius: 7px; background: rgba(255, 255, 255, 0.14); font-size: 12px; font-weight: 500; white-space: nowrap; }
.sys-switch { width: 34px; height: 20px; border-radius: 10px; background: rgba(255, 255, 255, 0.2); position: relative; transition: background 0.2s; cursor: pointer; flex: none; }
.sys-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.sys-switch.is-on { background: var(--accent); }
.sys-switch.is-on::after { transform: translateX(14px); }
.faq { margin: 0; }
.faq dt { margin-top: 10px; font-weight: 600; }
.faq dd { margin: 3px 0 0; color: var(--text-2); line-height: 1.5; }

/* ---------- coach marks ---------- */
.coach {
  position: fixed;
  z-index: 70;
  width: min(300px, calc(100vw - 16px));
  padding: 12px 14px 12px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(48, 54, 104, 0.94), rgba(28, 35, 64, 0.96));
  border: 1px solid rgba(154, 162, 240, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 30px rgba(108, 116, 216, 0.25);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text);
  animation: coach-in 0.25s ease-out;
}
@keyframes coach-in { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
.coach-arrow { position: absolute; width: 14px; height: 14px; background: inherit; border: inherit; transform: rotate(45deg); }
.coach[data-side="bottom"] .coach-arrow { top: -8px; left: calc(var(--arrow, 50%) - 7px); border-right: 0; border-bottom: 0; background: rgba(48, 54, 104, 0.98); }
.coach[data-side="top"] .coach-arrow { bottom: -8px; left: calc(var(--arrow, 50%) - 7px); border-left: 0; border-top: 0; background: rgba(28, 35, 64, 0.98); }
.coach[data-side="right"] .coach-arrow { left: -8px; top: calc(var(--arrow, 50%) - 7px); border-right: 0; border-top: 0; background: rgba(40, 46, 88, 0.98); }
.coach[data-side="left"] .coach-arrow { right: -8px; top: calc(var(--arrow, 50%) - 7px); border-left: 0; border-bottom: 0; background: rgba(36, 42, 80, 0.98); }
.coach[data-side="none"] .coach-arrow { display: none; }
.coach-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; min-height: 16px; }
.coach-counter { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--gold); }
.coach-close { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; color: var(--text-2); cursor: pointer; }
.coach-close:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.coach-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.coach-text { color: rgba(255, 255, 255, 0.8); line-height: 1.45; }
.coach-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.coach-btn { padding: 5px 12px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.coach-btn:hover { background: rgba(255, 255, 255, 0.2); }
.coach-btn.is-primary { background: linear-gradient(135deg, var(--gold), #f3a73b); color: var(--navy); }
.coach-btn.is-primary:hover { filter: brightness(1.06); }
