:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-soft: #efece3;
  --surface-deep: #183429;
  --ink: #151d19;
  --ink-muted: #52615a;
  --ink-subtle: #78867f;
  --forest: #1e4234;
  --forest-light: #e6efe9;
  --accent: #dc582a;
  --accent-soft: #fbece6;
  --border: #dfd9cc;
  --border-strong: #c8c0b0;
  --shadow-sm: 0 2px 10px rgba(21, 29, 25, 0.05);
  --shadow-lg: 0 20px 56px rgba(21, 29, 25, 0.1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ================= TOPBAR ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 2px 4px;
  text-align: left;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--forest);
  color: #f6f4ee;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 14px; font-weight: 800; letter-spacing: -0.02em; }
.brand-text small { font-size: 11px; color: var(--ink-muted); font-weight: 500; }

.mode-switch {
  display: inline-flex;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  gap: 4px;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.mode-btn.active {
  background: var(--forest);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.pill-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.mode-btn:not(.active) .pill-count {
  background: rgba(21, 29, 25, 0.08);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 999px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-download-mini:hover { opacity: 0.92; transform: translateY(-1px); }

.icon-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 9px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover { background: var(--surface-soft); }
.icon-btn.active { background: var(--forest); color: #fff; border-color: var(--forest); }

body.mode-hub .deck-only { display: none !important; }

/* ================= DECK VIEW ================= */
.deck-view {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 58px);
}

.period-bar-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.period-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 20px;
  scrollbar-width: none;
}
.period-bar::-webkit-scrollbar { display: none; }

.period-pill {
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  transition: all 0.15s ease;
}
.period-pill:hover { background: var(--surface-soft); color: var(--ink); }
.period-pill.active {
  background: var(--forest-light);
  color: var(--forest);
  border-color: rgba(30, 66, 52, 0.28);
}

.progress-track {
  height: 3px;
  background: var(--surface-soft);
  width: 100%;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--forest), var(--accent));
  width: 3%;
  transition: width 0.25s ease;
}

.stage-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 16px;
}

.slide-stage {
  width: 100%;
  max-width: 1240px;
  min-height: 610px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 38px 46px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  animation: fadeSlide 0.22s ease;
}

@keyframes fadeSlide {
  from { opacity: 0.45; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--forest) 0%, var(--forest) 72%, var(--accent) 72%, var(--accent) 100%);
}

.slide-head { margin-bottom: 22px; }
.slide-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.slide-eyebrow .slide-num-badge {
  background: var(--forest-light);
  color: var(--forest);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.slide-title {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.1vw, 40px);
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: pre-line;
}
.slide-lead {
  margin: 0;
  font-size: clamp(15px, 1.35vw, 18.5px);
  color: var(--ink-muted);
  max-width: 920px;
  white-space: pre-line;
}

.slide-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Layouts */
.layout-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 30px;
  align-items: center;
}

.hero-highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.hero-hl-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14.5px;
}
.hero-hl-row span { font-weight: 800; color: var(--forest); }
.hero-hl-row strong { font-weight: 700; color: var(--ink); }

.media-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.media-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
}
.media-caption {
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
}

.layout-split {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  align-items: center;
}

.bullet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}
.bullet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  flex-shrink: 0;
}

.layout-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.compare-box {
  border-radius: var(--radius-md);
  padding: 24px 26px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.compare-box.accent {
  background: var(--forest-light);
  border-color: rgba(30, 66, 52, 0.35);
}
.compare-badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
  background: var(--surface);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}
.compare-box.accent .compare-badge {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.compare-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare-box li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.compare-box li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--ink-subtle);
  font-weight: 800;
}
.compare-box.accent li::before {
  content: '✔';
  color: var(--forest);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--forest);
  background: var(--forest-light);
  padding: 3px 9px;
  border-radius: 999px;
}
.info-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.info-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.55;
}
.cmd-inline {
  margin-top: auto;
  padding: 8px 11px;
  background: var(--surface-deep);
  color: #e9f3ee;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  word-break: break-all;
}

/* Timeline */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tl-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-item.break {
  background: var(--accent-soft);
  border-color: rgba(220, 88, 42, 0.3);
}
.tl-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--forest);
}
.tl-item.break .tl-top { color: var(--accent); }
.tl-title { font-size: 15px; font-weight: 800; line-height: 1.35; }
.tl-out { font-size: 12.5px; color: var(--ink-muted); margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--border); }

/* Prompt Box */
.prompt-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.prompt-box {
  background: var(--surface-deep);
  color: #f4f8f6;
  border-radius: var(--radius-md);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}
.prompt-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.prompt-box-title {
  font-size: 13px;
  font-weight: 700;
  color: #a9d5c0;
}
.copy-btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.copy-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.copy-btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.copy-btn.light {
  background: var(--forest);
  color: #fff;
}

.prompt-text {
  margin: 0;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.6;
  font-weight: 600;
  white-space: pre-line;
}

.alt-cmd-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--forest-light);
  border: 1px solid rgba(30, 66, 52, 0.25);
  border-radius: 12px;
  padding: 12px 18px;
}
.alt-cmd-bar code {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--forest);
}

/* Download QR Layout */
.download-qr-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 28px;
  align-items: center;
}
.qr-card {
  background: var(--surface);
  border: 2px solid var(--forest);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.qr-card img { width: 210px; height: 210px; display: block; margin: 0 auto 10px; }
.qr-card small { display: block; font-size: 12px; font-weight: 700; color: var(--forest); }

.dl-details { display: flex; flex-direction: column; gap: 12px; }
.dl-file-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
}
.dl-file-box h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: var(--forest); word-break: break-all; }
.dl-meta { font-size: 13.5px; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.sha-line {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 7px;
  word-break: break-all;
  color: var(--ink-muted);
}
.dl-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-primary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  padding: 11px 18px;
  border-radius: 10px;
}
.path-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.path-card {
  background: var(--forest-light);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
}
.path-card strong { display: block; color: var(--forest); margin-bottom: 3px; }
.path-card code { font-family: var(--mono); font-weight: 700; font-size: 12.5px; }

/* Diagram Layout */
.diagram-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 26px;
  align-items: center;
}
.svg-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.svg-panel svg { width: 100%; height: auto; max-height: 360px; }

/* Checklist */
.checklist-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.check-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.check-row strong { display: block; font-size: 17px; margin-bottom: 3px; }
.check-row span { font-size: 14.5px; color: var(--ink-muted); }

/* Matrix Table */
.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.matrix-table th {
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  color: var(--forest);
  padding: 0 16px 4px;
}
.matrix-table td {
  background: var(--bg);
  padding: 18px 16px;
  font-size: 15.5px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.matrix-table td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 12px 0 0 12px;
  font-weight: 800;
  color: var(--forest);
  width: 22%;
}
.matrix-table td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 12px 12px 0;
  font-weight: 600;
}

/* Speaker Notes Drawer */
.notes-drawer {
  max-width: 1240px;
  width: calc(100% - 48px);
  margin: 0 auto 12px;
  background: #fffdf8;
  border: 1px solid #decba8;
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
}
.notes-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
}
.notes-close {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}
.notes-body { margin: 0; font-size: 14.5px; color: var(--ink); line-height: 1.6; }

/* Deck Footer Controls */
.deck-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.deck-controls-left { display: flex; align-items: center; gap: 10px; }
.nav-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 10px;
}
.nav-btn.primary { background: var(--forest); color: #fff; border-color: var(--forest); }
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.slide-counter { font-size: 14px; font-weight: 800; color: var(--ink-muted); min-width: 64px; text-align: center; }
.deck-controls-center { font-size: 13px; font-weight: 700; color: var(--forest); }
.deck-controls-right { display: flex; align-items: center; gap: 10px; }
.kbd-hint { font-size: 12px; color: var(--ink-subtle); }
.kbd-hint kbd {
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
}

/* ================= HUB VIEW ================= */
.hub-view { padding-bottom: 64px; }
.hub-hero {
  background: var(--forest);
  color: #f6f4ee;
  padding: 36px 24px;
}
.hub-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.hub-hero .eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #f6a485;
}
.hub-hero h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; }
.hub-hero-lead { margin: 0; max-width: 680px; color: rgba(246, 244, 238, 0.85); font-size: 15px; }
.hub-hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.schedule-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
}
.schedule-chip strong { color: #ffd0bd; }

.hub-tabs-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 57px;
  z-index: 30;
}
.hub-tabs {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hub-tab {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: 999px;
}
.hub-tab.active { background: var(--forest); color: #fff; border-color: var(--forest); }

.hub-content {
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 0 24px;
}

.hub-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.hub-section h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.hub-section .sec-sub { margin: 0 0 18px; font-size: 14.5px; color: var(--ink-muted); }

/* Checklist Interactive */
.os-switch { display: inline-flex; gap: 6px; margin-bottom: 16px; }
.chip-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
}
.chip-btn.active { background: var(--forest); color: #fff; border-color: var(--forest); }

.prep-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--forest);
}
.prep-bar { flex: 1; height: 9px; background: var(--surface-soft); border-radius: 999px; overflow: hidden; }
.prep-bar-fill { height: 100%; background: var(--forest); transition: width 0.2s ease; }

.check-list-interactive { display: flex; flex-direction: column; gap: 10px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.15s ease;
}
.check-item.checked { background: var(--forest-light); border-color: rgba(30, 66, 52, 0.35); }
.check-item input[type="checkbox"] { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--forest); cursor: pointer; }
.check-item-body { flex: 1; }
.check-item-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.check-item-title { font-size: 15px; font-weight: 800; }
.check-item.checked .check-item-title { text-decoration: line-through; color: var(--forest); }
.check-item-desc { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-muted); }
.time-tag { font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }

/* Prompt Book Cards */
.prompt-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.p-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.p-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.p-card-meta { display: flex; gap: 6px; align-items: center; }
.p-period { background: var(--forest); color: #fff; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.p-badge { background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.p-card h3 { margin: 0; font-size: 16px; font-weight: 800; }
.p-where { font-size: 12.5px; color: var(--ink-subtle); }
.p-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-line;
  flex: 1;
}

/* Apps Catalog */
.catalog-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.search-input {
  width: 100%;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  font-size: 14.5px;
  font-family: inherit;
  background: var(--bg);
}
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.app-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.app-card-id { font-family: var(--mono); font-size: 11.5px; color: var(--ink-subtle); }
.app-card h3 { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--forest); }
.app-card p { margin: 0; font-size: 13px; color: var(--ink-muted); flex: 1; }
.app-card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px dashed var(--border); }

/* Worksheet */
.ws-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ws-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ws-field label { font-size: 13.5px; font-weight: 800; color: var(--forest); }
.ws-field input, .ws-field textarea, .ws-field select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}
.ws-field textarea { min-height: 76px; resize: vertical; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* Troubleshooting */
.trouble-list { display: flex; flex-direction: column; gap: 12px; }
.trouble-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.trouble-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.trouble-symptom { font-size: 15.5px; font-weight: 800; }
.trouble-cause { font-size: 13.5px; color: var(--ink-muted); margin: 0 0 8px; }
.trouble-fix { font-size: 14px; font-weight: 600; color: var(--forest); white-space: pre-line; margin: 0 0 10px; }

/* Grid Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(18, 28, 23, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal-dialog {
  width: 100%;
  max-width: 1080px;
  max-height: 86vh;
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 { margin: 0; font-size: 19px; }
.modal-header p { margin: 2px 0 0; font-size: 13px; color: var(--ink-muted); }
.grid-list {
  padding: 20px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.grid-card {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 12px;
  padding: 13px 15px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.grid-card.current { border-color: var(--accent); background: var(--accent-soft); }
.grid-card-top { font-size: 11.5px; font-weight: 800; color: var(--forest); display: flex; justify-content: space-between; }
.grid-card strong { font-size: 14px; line-height: 1.35; }

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: var(--surface-deep);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
}

/* Fullscreen adjustments */
:fullscreen .topbar,
:fullscreen .period-bar-wrap { display: none; }
:fullscreen .deck-view { min-height: 100vh; }
:fullscreen .slide-stage { max-width: 1420px; min-height: calc(100vh - 96px); }

/* Responsive */
@media (max-width: 980px) {
  .layout-hero, .layout-split, .layout-compare, .diagram-layout, .download-qr-layout, .ws-grid, .prompt-card-grid { grid-template-columns: 1fr; }
  .timeline-grid, .app-grid, .grid-list { grid-template-columns: repeat(2, 1fr); }
  .cards-grid.cols-3 { grid-template-columns: 1fr; }
  .slide-stage { padding: 26px 22px; min-height: auto; }
}

@media (max-width: 680px) {
  .topbar { flex-wrap: wrap; padding: 10px 12px; }
  .hide-sm { display: none !important; }
  .timeline-grid, .cards-grid, .app-grid, .grid-list, .path-pair { grid-template-columns: 1fr; }
  .stage-shell { padding: 12px; }
  .deck-controls { padding: 10px 14px; }
  .hub-content { padding: 0 14px; }
  .hub-section { padding: 18px 16px; }
}

@media print {
  .topbar, .period-bar-wrap, .deck-controls, .hub-tabs-wrap, .copy-btn, .ws-actions { display: none !important; }
  body { background: #fff; }
  .hub-section, .slide-stage { box-shadow: none; border-color: #ccc; }
}
