/* ==========================================================================
   MICROWAVE. — Apple-Minimalist Full-Viewport 3D Studio Stylesheet
   Pro Obsidian background + Frosted Glass floating HUD + 3D Callout Pins
   ========================================================================== */

:root {
  --bg-obsidian: #050608;
  --bg-editorial: #0a0b0f;
  --surface-card: #12141a;
  --glass-bg: rgba(24, 26, 32, 0.72);
  --glass-bg-strong: rgba(18, 20, 26, 0.86);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover: rgba(255, 255, 255, 0.10);

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #6e6e73;

  --apple-blue: #0a84ff;
  --apple-green: #30d158;
  --apple-orange: #ff9f0a;
  --apple-red: #ff453a;
  --apple-cyan: #64d2ff;

  --radius-pill: 999px;
  --shadow-float: 0 20px 50px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-width: 1024px;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

/* ==========================================================================
   FLOATING TOP NAVIGATION BAR
   ========================================================================== */
.floating-header {
  position: fixed;
  top: 18px;
  left: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.floating-header > * {
  pointer-events: auto;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
  user-select: none;
}

.brand-mark span {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
}

.page-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
}

.page-switch a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  transition: all 0.16s ease;
}

.page-switch a:hover {
  color: var(--text-primary);
}

.page-switch a.active {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-float);
}

.nav-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-float);
}

.icon-circle-btn:hover {
  background: var(--glass-hover);
  transform: scale(1.04);
}

.icon-circle-btn.active {
  background: var(--apple-blue);
  border-color: var(--apple-blue);
  color: #fff;
}

.icon-circle-btn.sound-on {
  background: var(--apple-red);
  border-color: var(--apple-red);
  color: #fff;
}

.icon-circle-btn.hidden {
  display: none;
}

/* ==========================================================================
   FULL-BLEED 3D STAGES
   ========================================================================== */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.stage-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #131a28 0%, #050608 78%);
}

.stage-fullscreen canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.stage-fullscreen canvas:active {
  cursor: grabbing;
}

.whisper-hud {
  position: fixed;
  top: 84px;
  left: 32px;
  z-index: 50;
  max-width: 520px;
  pointer-events: none;
}

.whisper-hud > * {
  pointer-events: auto;
}

.whisper-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
}

.whisper-sub {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.stroke-dots-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(18, 20, 26, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.stroke-dot-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot-swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.tour-trigger-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(20px);
  transition: all 0.18s ease;
}

.tour-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.tour-trigger-btn.hidden {
  display: none;
}

/* ==========================================================================
   FLOATING BOTTOM DOCK
   ========================================================================== */
.bottom-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--shadow-float);
  transition: opacity 0.22s ease, transform 0.22s ease;
  white-space: nowrap;
}

.bottom-dock.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
}

.dock-segment {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.28);
  padding: 3px;
  border-radius: var(--radius-pill);
}

.dock-seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.16s ease;
}

.dock-seg-btn:hover {
  color: var(--text-primary);
}

.dock-seg-btn.active {
  background: #ffffff;
  color: #050608;
}

.dock-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
}

.dock-btn {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.dock-btn.active {
  background: var(--apple-blue);
  color: #fff;
}

.dock-btn.primary-action {
  background: var(--apple-blue);
  color: #fff;
}

.dock-btn.primary-action:hover {
  filter: brightness(1.12);
}

.dock-speed-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.dock-speed-wrap input[type="range"] {
  width: 72px;
  accent-color: #ffffff;
  cursor: pointer;
}

/* ==========================================================================
   30-SECOND CINEMA TOUR OVERLAY
   ========================================================================== */
.story-overlay {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  width: min(740px, calc(100vw - 48px));
  padding: 20px 24px;
  border-radius: 24px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--shadow-float);
  display: none;
}

.story-overlay.active {
  display: block;
  animation: fadeUp 0.24s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.story-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.story-step-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--apple-blue);
  letter-spacing: 0.04em;
}

.story-dots {
  display: flex;
  gap: 6px;
}

.story-dot {
  width: 24px;
  height: 4px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.story-dot.active {
  background: #ffffff;
}

.story-headline {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.story-body {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.story-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.story-demos {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.story-demo-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.story-demo-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.story-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   COLLAPSIBLE RIGHT GLASS INSPECTOR DRAWER
   ========================================================================== */
.inspector-drawer {
  position: fixed;
  top: 72px;
  right: 20px;
  bottom: 92px;
  width: 344px;
  z-index: 80;
  border-radius: 22px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--shadow-float);
  padding: 18px;
  overflow-y: auto;
  transform: translateX(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.inspector-drawer.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.drawer-title {
  font-size: 15px;
  font-weight: 700;
}

.drawer-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 15px;
}

.drawer-section {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-val {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.apple-slider {
  width: 100%;
  accent-color: var(--apple-blue);
  cursor: pointer;
  height: 4px;
}

.mini-seg-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.mini-seg-btn {
  flex: 1;
  min-width: 44px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.mini-seg-btn.active {
  background: var(--apple-blue);
  border-color: var(--apple-blue);
  color: #fff;
}

.drawer-kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.drawer-kpi {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 8px 10px;
}

.drawer-kpi-label {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.drawer-kpi-val {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   TAB 2: ASSEMBLY HUD
   ========================================================================== */
.assembly-hud-top {
  position: fixed;
  top: 82px;
  left: 32px;
  z-index: 60;
  max-width: 440px;
  pointer-events: none;
}

.assembly-hud-top > * {
  pointer-events: auto;
}

.assembly-bp-pills {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  margin-bottom: 14px;
}

.assembly-progress-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.asm-dot {
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.2s;
}

.asm-dot.done {
  background: var(--apple-green);
}

.asm-dot.current {
  background: var(--apple-blue);
}

.asm-diag-toast {
  position: fixed;
  top: 84px;
  right: 28px;
  z-index: 65;
  max-width: 330px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  font-size: 12.5px;
  display: none;
}

.asm-diag-toast.visible {
  display: block;
}

.asm-diag-toast.ok {
  border-color: rgba(48, 209, 88, 0.5);
}

/* ==========================================================================
   TAB 3: APPLE EDITORIAL WORDS & COMPARISON VIEW
   ========================================================================== */
.editorial-page {
  min-height: 100vh;
  background: var(--bg-editorial);
  padding: 96px 32px 84px;
}

.editorial-inner {
  max-width: 960px;
  margin: 0 auto;
}

.editorial-hero {
  margin-bottom: 42px;
}

.editorial-hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.editorial-hero p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.editorial-card {
  background: var(--surface-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 26px;
  margin-bottom: 24px;
}

.editorial-card h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.editorial-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.editorial-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 32px;
}

.glossary-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.glossary-search {
  width: 260px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.glossary-item-card {
  background: var(--surface-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.glossary-plain-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.glossary-tech-sub {
  font-size: 12px;
  color: var(--apple-blue);
  margin-top: 2px;
}

.glossary-metaphor-box {
  font-size: 12.5px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  border-radius: 10px;
}

.glossary-desc-txt {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.btn-3d-jump {
  border: none;
  background: rgba(10, 132, 255, 0.15);
  color: var(--apple-blue);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-3d-jump:hover {
  background: var(--apple-blue);
  color: #fff;
}

/* ==========================================================================
   3D-TRACKED CALLOUT PIN & LEADER LINE
   ========================================================================== */
.callout-layer {
  position: fixed;
  inset: 0;
  z-index: 68;
  pointer-events: none;
  display: none;
}

.callout-layer.active {
  display: block;
}

.callout-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.callout-card {
  position: absolute;
  width: 268px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--glass-bg-strong);
  border: 1px solid rgba(56, 189, 248, 0.45);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--shadow-float);
  pointer-events: auto;
}

.callout-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--apple-cyan);
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.callout-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.callout-note {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.5;
}

.callout-back-btn {
  margin-top: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.callout-back-btn:hover {
  background: var(--apple-blue);
  color: #fff;
}
/* ==========================================================================
   AFFILIATE PICKS — bottom sheet (Howvida integration layer)
   ========================================================================== */
.aff-open-btn {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 150; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill);
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  color: var(--text-primary); font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow-float); white-space: nowrap;
}
.aff-open-btn:hover { background: var(--glass-hover); }
.aff-open-btn .aff-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--apple-green); }
.aff-sheet {
  position: fixed; inset: 0; z-index: 400; display: none;
  background: rgba(3, 4, 6, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.aff-sheet.open { display: block; }
.aff-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow-y: auto;
  background: var(--bg-editorial); border-top: 1px solid var(--glass-border);
  border-radius: 24px 24px 0 0; padding: 28px 22px 40px;
  max-width: 860px; margin: 0 auto; box-shadow: var(--shadow-float);
}
.aff-panel h2 { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; letter-spacing: -0.01em; }
.aff-panel .aff-lead { color: var(--text-secondary); font-size: 14px; line-height: 1.7; margin: 0 0 20px; }
.aff-close {
  position: sticky; top: 0; float: right; width: 34px; height: 34px; border-radius: 50%;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  color: var(--text-primary); font-size: 16px; cursor: pointer; z-index: 2;
}
.aff-type { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 22px 0 4px; }
.aff-type small { color: var(--text-tertiary); font-weight: 500; margin-left: 8px; }
.aff-type-desc { color: var(--text-secondary); font-size: 13px; line-height: 1.65; margin: 0 0 10px; }
.aff-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.aff-card {
  background: var(--surface-card); border: 1px solid var(--glass-border);
  border-top-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  border-radius: 20px; padding: 16px 18px;
}
.aff-card .aff-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.aff-card .aff-maker { font-size: 12px; color: var(--text-tertiary); margin-bottom: 10px; }
.aff-card .aff-specs { font-size: 12.5px; color: var(--text-secondary); line-height: 1.8; background: rgba(255, 255, 255, 0.04); border-radius: 10px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.aff-card .aff-price { font-size: 19px; font-weight: 700; color: var(--text-primary); margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.aff-card .aff-price small { font-size: 11.5px; color: var(--text-tertiary); font-weight: 500; }
.aff-card .aff-cost { font-size: 12.5px; color: var(--apple-green); margin-bottom: 12px; }
.aff-card .aff-why { font-size: 12.5px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 14px; }
.aff-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 14px; }
.aff-btns.single { grid-template-columns: 1fr; }
.aff-btn {
  display: block; text-align: center; padding: 12px 8px; border-radius: 12px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.aff-btn::after { content: " \2197"; }
.aff-btn-primary { background: #f5f5f7; color: #1d1d1f; }
.aff-btn-ghost { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); border: 1px solid rgba(255, 255, 255, 0.16); }
.aff-btn-amazon { background: rgba(255, 153, 0, 0.10); color: #ffb84d; border: 1px solid rgba(255, 153, 0, 0.38); }
.aff-btns .span2 { grid-column: 1 / -1; }
.aff-btn:hover { opacity: 0.88; }
.aff-btn:active { transform: scale(0.97); opacity: 0.85; }
.aff-lead-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aff-lead-clamp.open { display: block; -webkit-line-clamp: unset; }
.aff-lead-toggle { background: none; border: none; color: var(--text-tertiary); font-size: 12px; font-family: inherit; cursor: pointer; padding: 0; margin: -14px 0 18px; text-decoration: underline; display: block; }
.aff-why-head { color: var(--text-primary); font-weight: 700; }
.aff-note { color: var(--text-tertiary); font-size: 11.5px; line-height: 1.7; margin-top: 22px; }
@media (max-width: 640px) { .aff-open-btn { bottom: 108px; font-size: 12.5px; padding: 10px 16px; } }

/* ============ MOBILE LAYER (Howvida integration) ============ */
@media (max-width: 820px) {
  html, body { min-width: 0 !important; }
  .floating-header { top: 10px; left: 12px; right: 12px; flex-wrap: wrap; row-gap: 8px; }
  .brand-mark { font-size: 17px; }
  .brand-mark span { white-space: nowrap; font-size: 14px; }
  .nav-pill { order: 3; margin: 0 auto; }
  .nav-tab { padding: 7px 15px; white-space: nowrap; font-size: 13px; }
  .whisper-hud { top: 116px; left: 14px; right: 14px; max-width: none; }
  .whisper-title { font-size: 21px; line-height: 1.4; }
  .whisper-sub { font-size: 12.5px; line-height: 1.6; }
  .stroke-dots-row { display: flex; flex-wrap: wrap; gap: 6px 12px; max-width: calc(100vw - 28px); }
  .assembly-hud-top { top: 116px; left: 14px; right: 14px; max-width: none; }
  .bottom-dock { bottom: 10px; max-width: 96vw; flex-wrap: wrap; justify-content: center; white-space: normal; row-gap: 6px; padding: 7px 8px; max-height: 46vh; overflow-y: auto; scrollbar-width: none; }
  .inspector-drawer { top: auto; bottom: calc(var(--dockh, 120px) + 8px); right: 8px; left: 8px; width: auto; max-height: 48vh; padding: 14px; }
  .story-overlay { bottom: calc(var(--dockh, 120px) + 8px); width: calc(100vw - 20px); padding: 14px 16px; }
  .story-headline { font-size: 20px; line-height: 1.45; }
  .glossary-grid { grid-template-columns: 1fr; }
  .editorial-2col { grid-template-columns: 1fr; }
  .callout-card { max-width: 60vw; }
  .aff-open-btn { bottom: calc(var(--dockh, 120px) + 14px); font-size: 12.5px; padding: 10px 16px; max-width: 92vw; }
  .aff-panel { padding: 22px 16px 30px; }
  .glossary-header-row { flex-wrap: wrap; max-width: calc(100vw - 28px); }
  .glossary-search { width: 100% !important; max-width: calc(100vw - 56px); box-sizing: border-box; }
  .tab-panel { overflow-x: clip; }
  .bottom-dock button { white-space: nowrap; }
  .whisper-title, .whisper-sub { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65), 0 0 3px rgba(0, 0, 0, 0.6); }
}
