/* GlassVault Tour — Soft Botanical Sage & Frosted Cream
   CUSTOMIZE: Adjust :root tokens to preview light Frosted Cream vs dark Deep Pine glass modes. */

:root {
  --bg: #e8f0ec;
  --bg-grad: radial-gradient(circle at 14% 12%, #d4e7dd 0%, transparent 48%),
             radial-gradient(circle at 86% 84%, #fef3c7 0%, transparent 45%),
             #e8f0ec;
  --glass: rgba(250, 252, 249, 0.82);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --sidebar: rgba(235, 243, 239, 0.88);
  --border: rgba(20, 54, 43, 0.14);
  --border-strong: rgba(20, 54, 43, 0.25);
  --ink: #14362b;
  --muted: #466559;
  --brass: #b45309;
  --brass-bg: rgba(180, 83, 9, 0.12);
  --accent: #14533c;
  --radius: 16px;
  --shadow: 0 22px 50px -18px rgba(20, 54, 43, 0.2);
  --font-serif: Georgia, "New York", "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root[data-theme="dark"] {
  --bg: #0b1914;
  --bg-grad: radial-gradient(circle at 18% 14%, #14362b 0%, transparent 48%),
             radial-gradient(circle at 84% 85%, #3b2310 0%, transparent 45%),
             #0b1914;
  --glass: rgba(15, 36, 29, 0.84);
  --glass-strong: rgba(18, 43, 35, 0.94);
  --sidebar: rgba(12, 29, 23, 0.90);
  --border: rgba(167, 243, 208, 0.16);
  --border-strong: rgba(167, 243, 208, 0.30);
  --ink: #ecf5f0;
  --muted: #9eb9ad;
  --brass: #fbbf24;
  --brass-bg: rgba(251, 191, 36, 0.14);
  --accent: #34d399;
  --shadow: 0 26px 56px -16px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--brass);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus { left: 12px; }

.shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.brand-title { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; }
.brand-sub { font-size: 0.78rem; color: var(--muted); }

.top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.pill-btn, .vpill {
  border: 1px solid var(--border-strong);
  background: var(--glass-strong);
  color: var(--ink);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.vpill[aria-pressed="true"], .pill-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.cta-link {
  text-decoration: none;
  background: var(--brass);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}
:root[data-theme="dark"] .cta-link { color: #0b1914; }

.snippet-bar {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 13px;
  background: var(--glass);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.snippet-label { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.snippet-list { display: flex; flex-wrap: wrap; gap: 6px; }
.snip-chip {
  border: 1px solid var(--border-strong);
  background: var(--glass-strong);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.snip-chip[aria-pressed="true"] {
  background: var(--brass-bg);
  border-color: var(--brass);
  color: var(--brass);
}

.app-frame {
  margin-top: 14px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  min-height: 580px;
  background: var(--glass);
  backdrop-filter: blur(22px);
}

.sidebar {
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-search input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--glass-strong);
  font-size: 0.84rem;
}

.folder-group { margin-bottom: 8px; }
.folder-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 4px 6px;
}

.file-btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  display: block;
  color: var(--ink);
}
.file-btn:hover { background: var(--glass); }
.file-btn.active {
  background: var(--glass-strong);
  border-color: var(--border-strong);
  box-shadow: 0 4px 12px -8px rgba(0, 0, 0, 0.25);
}

.editor-pane {
  padding: 20px 18px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--brass);
  font-weight: 700;
}

h1 {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.15;
}

.view-pills { display: flex; gap: 6px; }

/* Live Obsidian snippet effect toggles */
.note-body { font-size: 0.93rem; min-width: 0; }
.note-body h2 { font-family: var(--font-serif); font-size: 1.25rem; margin: 18px 0 8px; }
.note-body h3 { font-size: 1rem; margin: 14px 0 6px; }
.note-body p { margin: 8px 0; }
.note-body pre {
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.note-body code { font-family: var(--font-mono); font-size: 0.84em; background: var(--brass-bg); padding: 1px 5px; border-radius: 5px; }
.note-body pre code { background: none; padding: 0; }

.glass-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.g-card {
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 24px -16px rgba(20, 54, 43, 0.25);
}
body.no-cards .glass-cards-grid { display: block; }
body.no-cards .g-card { background: transparent; border: none; box-shadow: none; padding: 4px 0; }
body.no-glass .app-frame, body.no-glass .topbar { backdrop-filter: none; background: var(--bg); }
body.no-focus .note-body h2 { font-family: var(--font-sans); }

.g-card-title { font-weight: 800; font-size: 0.92rem; margin-bottom: 6px; }
.g-card ul { margin: 0; padding-left: 18px; }
.g-card li { margin: 4px 0; }

.wikilink {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.canvas-board {
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--glass-strong);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.canvas-node {
  border-radius: 12px;
  padding: 12px;
  border: 1.5px solid var(--brass);
  background: var(--bg);
}
.canvas-node h3 { margin: 0 0 6px; font-size: 0.9rem; }
.canvas-node p { margin: 0; font-size: 0.8rem; color: var(--muted); }

.footer {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (min-width: 820px) {
  .app-frame { grid-template-columns: 270px minmax(0, 1fr); }
  .sidebar { border-bottom: none; border-right: 1px solid var(--border); max-height: 700px; overflow-y: auto; }
  .editor-pane { padding: 24px 28px; max-height: 700px; overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
