/* ============================================================
   PAR NOTES — Dark Dotted Notebook Theme
   Aesthetic: dark paper + white gel-pen + pastel accents
   ============================================================ */

/* --- Palette --- */
:root {
  --bg-dark:       #1a1a2e;
  --bg-page:       #16213e;
  --bg-sidebar:    #0f0f1a;
  --dot-color:     rgba(255, 255, 255, 0.08);
  --dot-size:      1.5px;
  --dot-gap:       22px;

  --ink-white:     #e8e8e8;
  --ink-dim:       #a0a0b8;

  --accent-mint:   #7ecec1;
  --accent-lav:    #b8a9d4;
  --accent-peach:  #f4a6a0;

  --font-body:     'Mali', cursive;
  --font-heading:  'Sacramento', cursive;
  --font-sub:      'Shadows Into Light Two', cursive;
  --font-mono:     'Courier New', monospace;

  --sidebar-width: 260px;
  --radius:        8px;
  --transition:    0.25s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  display: flex;
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--ink-white);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.85;
  letter-spacing: 0.3px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar.collapsed { transform: translateX(-100%); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.logo {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 400;
  background: linear-gradient(135deg, var(--accent-mint), var(--accent-lav));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  transition: color var(--transition);
}
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible { color: var(--ink-white); outline: none; }

/* Search */
.sidebar-search { padding: 0.8rem 1rem; }
.sidebar-search input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  color: var(--ink-white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  outline: none;
  transition: border-color var(--transition);
}
.sidebar-search input::placeholder { color: var(--ink-dim); }
.sidebar-search input:focus { border-color: var(--accent-mint); }

/* Nav list */
.nav-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

/* Subject header (accordion toggle) */
.nav-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-dim);
  border-left: 3px solid transparent;
  transition: all var(--transition);
  user-select: none;
}
.nav-subject:hover { color: var(--ink-white); background: rgba(255,255,255,0.02); }
.nav-subject.mint  { border-left-color: var(--accent-mint); color: var(--accent-mint); }
.nav-subject.lav   { border-left-color: var(--accent-lav);  color: var(--accent-lav); }
.nav-subject.peach { border-left-color: var(--accent-peach); color: var(--accent-peach); }

.nav-arrow {
  font-size: 1rem;
  transition: transform var(--transition);
}
.nav-subject.expanded .nav-arrow { transform: rotate(90deg); }

/* Chapter list (collapsible) */
.nav-chapters {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.nav-chapters.expanded { max-height: 600px; }

.nav-chapters li {
  padding: 0.4rem 1rem 0.4rem 2.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-dim);
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.nav-chapters li:hover {
  color: var(--ink-white);
  background: rgba(255,255,255,0.03);
}
.nav-chapters li.active {
  color: var(--accent-mint);
  border-left-color: var(--accent-mint);
  background: rgba(126, 206, 193, 0.06);
}

/* Sub-subjects wrapper (collapsible under subject) */
.nav-sub-subjects {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.nav-sub-subjects.expanded { max-height: 1200px; }

/* Sub-subject header (level 2 accordion) */
.nav-sub-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem 0.45rem 1.4rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-dim);
  border-left: 2px solid transparent;
  transition: all var(--transition);
  user-select: none;
}
.nav-sub-subject:hover { color: var(--ink-white); background: rgba(255,255,255,0.02); }
.nav-sub-subject.mint  { border-left-color: var(--accent-mint); color: var(--accent-mint); }
.nav-sub-subject.lav   { border-left-color: var(--accent-lav);  color: var(--accent-lav); }
.nav-sub-subject.peach { border-left-color: var(--accent-peach); color: var(--accent-peach); }
.nav-sub-subject .nav-arrow { font-size: 0.85rem; }
.nav-sub-subject.expanded .nav-arrow { transform: rotate(90deg); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}
.sidebar-overlay.visible { display: block; }

/* ============================================================
   NOTEBOOK PAGE  (dotted paper)
   ============================================================ */
.notebook-page {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: 2.5rem 3rem;
  background-color: var(--bg-page);
  background-image: radial-gradient(circle, var(--dot-color) var(--dot-size), transparent var(--dot-size));
  background-size: var(--dot-gap) var(--dot-gap);
  transition: margin-left var(--transition);
}
.sidebar.collapsed ~ .notebook-page { margin-left: 0; }

.page-content {
  max-width: 820px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TYPOGRAPHY — gel-pen / brush-letter feel
   ============================================================ */

/* Page title — brush calligraphy */
.note-title {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  font-weight: 400;
  color: var(--accent-mint);
  margin-bottom: 0.4rem;
  line-height: 1.2;
  letter-spacing: 1px;
}

/* Subtitle */
.note-subtitle {
  font-family: var(--font-sub);
  font-size: 1.6rem;
  color: var(--accent-lav);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

/* Section heading */
.section-heading {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--accent-peach);
  margin: 2.2rem 0 0.7rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid rgba(244, 166, 160, 0.25);
}

/* Sub-heading */
.sub-heading {
  font-family: var(--font-sub);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent-lav);
  margin: 1.6rem 0 0.5rem;
  text-decoration: underline;
  text-decoration-color: rgba(184, 169, 212, 0.3);
  text-underline-offset: 5px;
}

/* Body paragraph */
.note-text {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--ink-white);
  margin-bottom: 0.9rem;
  line-height: 1.9;
}

/* Bold accent within text */
.note-text strong {
  font-weight: 600;
  color: #f0f0f0;
}

/* Dimmed / secondary text */
.note-dim {
  color: var(--ink-dim);
  font-size: 1rem;
  font-weight: 300;
}

/* ============================================================
   CONTENT BLOCKS
   ============================================================ */

/* Boxed formula / highlight box */
.box {
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  background: rgba(255,255,255,0.02);
}
.box.mint   { border-color: rgba(126,206,193,0.4); background: rgba(126,206,193,0.04); }
.box.lav    { border-color: rgba(184,169,212,0.4); background: rgba(184,169,212,0.04); }
.box.peach  { border-color: rgba(244,166,160,0.4); background: rgba(244,166,160,0.04); }

/* Inline code */
.code {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.06);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--accent-mint);
}

/* Code block — global snippet card (macOS-style) */
.code-block,
.sql-code,
.dc-code-wrap,
.schema-box {
  position: relative;
  background: #1a1b2e;
  border: none;
  border-radius: 12px;
  padding: 2.6rem 1.2rem 1.2rem;
  margin: 0.8rem 0 1rem;
  overflow-x: auto;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', Menlo, monospace;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #d4d4d4;
  white-space: pre;
  tab-size: 4;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* macOS traffic-light dots */
.code-block::after,
.sql-code::after,
.dc-code-wrap::after,
.schema-box::after {
  content: '';
  position: absolute;
  left: 16px;
  top: 11px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 20px 0 0 #febc2e, 40px 0 0 #28c840;
  pointer-events: none;
}

/* Centered label (default empty — subjects override via ::before content) */
.code-block::before,
.sql-code::before,
.schema-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #7a7a8e;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  pointer-events: none;
}

/* Global syntax colors */
.code-block .kw, .sql-code .kw, .dc-code .kw  { color: #c678dd; }
.code-block .fn, .sql-code .fn, .dc-code .fn  { color: #dcdcaa; }
.code-block .str, .sql-code .str, .dc-code .str { color: #e06c75; }
.code-block .num, .sql-code .num, .dc-code .num { color: #b5cea8; }
.code-block .cm, .sql-code .cm, .dc-code .cm  { color: #5c6370; font-style: italic; }
.code-block .op, .dc-code .op  { color: #d4d4d4; }
.code-block .var, .dc-code .var { color: #61afef; }
.code-block .cls, .dc-code .cls { color: #e5c07b; }
.code-block .imp, .dc-code .imp { color: #c678dd; }
.code-block .par, .dc-code .par { color: #abb2bf; }
.sql-code .alias { color: #7ee787; }

/* ── Global copy-to-clipboard button (icon only, appears on hover) ── */
.snippet-copy-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #555;
  padding: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.sql-code:hover > .snippet-copy-btn,
.code-block:hover > .snippet-copy-btn,
.schema-box:hover > .snippet-copy-btn,
.dc-code-wrap:hover > .snippet-copy-btn {
  opacity: 1;
}

.snippet-copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #bbb;
}

.snippet-copy-btn.copied {
  opacity: 1;
  color: #28c840;
}

.snippet-copy-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Bullet list */
.note-list {
  list-style: none;
  padding-left: 0.5rem;
  margin: 0.6rem 0 1rem;
}
.note-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.5rem;
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 1.8;
}
.note-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-lav);
  font-size: 1.3rem;
  line-height: 1.55;
}

/* Numbered list */
.note-list.numbered { counter-reset: note-counter; }
.note-list.numbered li::before {
  counter-increment: note-counter;
  content: counter(note-counter) '.';
  color: var(--accent-peach);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
}

/* Arrow callout */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0.8rem 0;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
}
.callout-arrow {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.callout.mint  .callout-arrow { color: var(--accent-mint); }
.callout.lav   .callout-arrow { color: var(--accent-lav); }
.callout.peach .callout-arrow { color: var(--accent-peach); }

/* Divider */
.divider {
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 2rem 0;
}

/* Table */
.note-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.note-table th,
.note-table td {
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: left;
  font-weight: 300;
  line-height: 1.6;
}
.note-table th {
  background: rgba(255,255,255,0.04);
  color: var(--accent-mint);
  font-weight: 600;
  font-size: 0.9rem;
}
.note-table td strong {
  color: var(--accent-lav);
  font-weight: 600;
}

/* Tag / badge */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 400;
  margin-right: 0.4rem;
  margin-bottom: 0.3rem;
}
.tag.mint  { background: rgba(126,206,193,0.15); color: var(--accent-mint); }
.tag.lav   { background: rgba(184,169,212,0.15); color: var(--accent-lav); }
.tag.peach { background: rgba(244,166,160,0.15); color: var(--accent-peach); }

/* ============================================================
   FLOATING TOGGLE (when sidebar collapsed)
   ============================================================ */
.float-toggle {
  display: none;
  position: fixed;
  top: 1rem; left: 1rem;
  z-index: 200;
  background: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--ink-white);
  font-size: 1.3rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: opacity var(--transition);
}
.float-toggle:hover { opacity: 0.85; }
.sidebar.collapsed ~ .float-toggle { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 768px) {
  :root { --sidebar-width: 250px; }
  html { font-size: 17px; }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
  }

  .notebook-page {
    margin-left: 0;
    padding: 1.8rem 1.5rem;
  }
  .page-content { max-width: 100%; }
  .float-toggle { display: block; }

  .note-title { font-size: 3rem; }
  .section-heading { font-size: 2.2rem; }
  .sub-heading { font-size: 1.3rem; }
}

/* Phone */
@media (max-width: 480px) {
  html { font-size: 16px; }

  .notebook-page { padding: 1.4rem 1rem; }

  .note-title { font-size: 2.5rem; }
  .section-heading { font-size: 1.9rem; }
  .note-subtitle { font-size: 1.3rem; }

  .box { padding: 0.8rem; }
  .code-block, .sql-code, .dc-code-wrap, .schema-box { padding: 2.4rem 0.8rem 0.8rem; font-size: 0.82rem; }
  .callout { padding: 0.6rem 0.8rem; }
}

/* ============================================================
   SCROLLBAR — Modern, visible, thin
   ============================================================ */

/* --- Webkit (Chrome, Edge, Safari) --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(126, 206, 193, 0.25);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(126, 206, 193, 0.45);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* Sidebar nav-list scrollbar — slightly narrower */
.nav-list::-webkit-scrollbar { width: 5px; }
.nav-list::-webkit-scrollbar-thumb {
  background: rgba(184, 169, 212, 0.3);
  border-radius: 3px;
}
.nav-list::-webkit-scrollbar-thumb:hover {
  background: rgba(184, 169, 212, 0.5);
}

/* --- Firefox --- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 206, 193, 0.25) rgba(255, 255, 255, 0.03);
}

/* ═══════ TOGGLE SECTIONS (details/summary) ═══════ */

.toggle-section,
.qa-toggle {
  border: 1px solid rgba(126, 206, 193, 0.15);
  border-radius: 10px;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.toggle-btn,
.qa-question {
  cursor: pointer;
  padding: 0.85rem 1.2rem;
  font-family: 'Mali', cursive;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent-mint);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: background 0.2s ease;
}

.toggle-btn:hover,
.qa-question:hover {
  background: rgba(126, 206, 193, 0.08);
  border-radius: 10px;
}

.toggle-btn::before,
.qa-question::before {
  content: '▶';
  font-size: 0.75rem;
  transition: transform 0.25s ease;
  display: inline-block;
}

details[open] > .toggle-btn::before,
details[open] > .qa-question::before {
  transform: rotate(90deg);
}

/* remove default marker */
.toggle-btn::-webkit-details-marker,
.qa-question::-webkit-details-marker {
  display: none;
}

.qa-question {
  color: var(--accent-lav);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.qa-answer {
  padding: 0 1.2rem 1rem;
}

.toggle-section > *:not(summary) {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Top 7 exam-important highlight */
.qa-toggle.top7 {
  border-color: rgba(244, 166, 160, 0.35);
  background: rgba(244, 166, 160, 0.04);
}
.qa-toggle.top7 .qa-question {
  color: var(--accent-peach);
}

.exam-badge::after {
  content: '★';
  margin-left: 0.5rem;
  color: var(--accent-peach);
  font-size: 0.9em;
}

/* ═══════ HAND-DRAWN FLOWCHARTS ═══════ */

.draw-box {
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0.8rem;
  margin-top: 0.8rem;
  background: rgba(255,255,255,0.015);
}
.draw-title {
  font-family: 'Shadows Into Light Two', cursive;
  font-size: 0.85rem;
  color: var(--accent-mint);
  margin-bottom: 0.6rem;
  text-align: center;
}

.flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.flow-box {
  border: 2px dashed rgba(126, 206, 193, 0.45);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-family: 'Mali', cursive;
  font-size: 0.82rem;
  color: #ddd;
  text-align: center;
  background: rgba(126, 206, 193, 0.05);
  max-width: 230px;
  line-height: 1.35;
}
.flow-box.peach {
  border-color: rgba(244, 166, 160, 0.5);
  background: rgba(244, 166, 160, 0.06);
}
.flow-box.lav {
  border-color: rgba(184, 169, 212, 0.45);
  background: rgba(184, 169, 212, 0.05);
}
.flow-box.wide { max-width: 320px; }
.flow-arrow {
  color: var(--accent-mint);
  font-size: 1.1rem;
  line-height: 1;
  text-align: center;
  padding: 0.1rem 0;
}
.flow-branch {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}
.flow-branch > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.flow-vs {
  font-family: 'Shadows Into Light Two', cursive;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  align-self: center;
}

/* ═══════ HAND-DRAWN SKETCHES & ILLUSTRATIONS ═══════ */

.sketch {
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 1rem;
  margin: 0.8rem 0;
  background: rgba(126,206,193,0.025);
}
.sketch-title {
  font-family: 'Shadows Into Light Two', cursive;
  font-size: 0.88rem;
  color: var(--accent-mint);
  margin-bottom: 0.6rem;
  text-align: center;
}
.sketch-center { text-align: center; }
.sketch-art {
  font-family: 'Courier New', monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  color: #aaa;
  white-space: pre;
  overflow-x: auto;
  padding: 0.2rem 0;
  display: inline-block;
  text-align: left;
}
.sketch-art .m { color: #7ecec1; }
.sketch-art .p { color: #f4a6a0; }
.sketch-art .l { color: #b8a9d4; }
.sketch-compare {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}
.sketch-side {
  border: 2px dashed rgba(126,206,193,0.3);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  min-width: 120px;
  max-width: 175px;
  text-align: center;
  font-family: 'Mali', cursive;
  font-size: 0.78rem;
  color: #ccc;
  line-height: 1.35;
}
.sketch-side.peach { border-color: rgba(244,166,160,0.4); }
.sketch-side.lav { border-color: rgba(184,169,212,0.4); }
.sketch-vs {
  font-family: 'Shadows Into Light Two', cursive;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.2);
  align-self: center;
}
.sketch-caption {
  text-align: center;
  font-family: 'Mali', cursive;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.5rem;
}
.sketch-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}
.sketch-stop {
  border: 2px dashed rgba(184,169,212,0.35);
  border-radius: 50%;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Mali', cursive;
  font-size: 0.65rem;
  color: #ccc;
  line-height: 1.2;
  padding: 0.2rem;
  flex-shrink: 0;
}
.sketch-stop.mint { border-color: rgba(126,206,193,0.4); }
.sketch-stop.peach { border-color: rgba(244,166,160,0.4); }
.sketch-connector {
  color: var(--accent-mint);
  font-family: 'Mali', cursive;
  font-size: 0.85rem;
}
.sketch-grid {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.3rem 0;
}
.sketch-card {
  border: 1.5px dashed rgba(126,206,193,0.25);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-family: 'Mali', cursive;
  font-size: 0.72rem;
  color: #bbb;
  text-align: center;
  min-width: 55px;
  line-height: 1.3;
}
.sketch-card.peach { border-color: rgba(244,166,160,0.35); }
.sketch-card.lav { border-color: rgba(184,169,212,0.35); }

/* ═══════ HAND-DRAWN MAP ═══════ */

.map-wrapper {
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 0.6rem 0.4rem 0.4rem;
  margin: 1rem 0;
  background: #f5f0e8;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.map-title {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
  color: #333;
  text-align: center;
  margin-bottom: 0.2rem;
}
.map-subtitle {
  font-family: 'Patrick Hand', cursive;
  font-size: 0.72rem;
  color: #888;
  text-align: center;
  margin-bottom: 0.4rem;
}
.map-svg-wrap {
  width: 100%;
  overflow-x: auto;
  text-align: center;
}
.map-svg-wrap svg {
  max-width: 100%;
  height: auto;
}
.map-legend {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.4rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 0.7rem;
  color: #555;
}
.map-legend span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.map-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.map-legend .dot.mint-bg { background: rgba(126,206,193,0.5); }
.map-legend .dot.peach-bg { background: rgba(244,166,160,0.5); }
.map-legend .dot.lav-bg { background: rgba(184,169,212,0.5); }
