/* Platform taxonomy */
.filter-chips-platform {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.filter-chip-platform {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.filter-chip-platform[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.study-platform {
  margin-left: auto;
  margin-right: 10px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.study-platform[data-platform="web"] {
  border-color: rgba(0, 113, 227, 0.28);
  background: rgba(0, 113, 227, 0.07);
  color: #0060b8;
}

.study-platform[data-platform="mobile"] {
  border-color: rgba(48, 209, 88, 0.3);
  background: rgba(48, 209, 88, 0.09);
  color: #1f7a43;
}

.study-platform[data-platform="both"] {
  border-color: rgba(94, 92, 230, 0.28);
  background: rgba(94, 92, 230, 0.08);
  color: #4b49c4;
}

/* Shared visibility guard */
.tip-bubble[hidden],
.dd-menu[hidden],
.lp-menu[hidden],
.ot-tip[hidden],
.ot-veil[hidden],
.ls-content[hidden],
.tu-toast[hidden],
.eb-reopen[hidden],
.bt-panel[hidden] {
  display: none !important;
}

/* Tooltip */
.tip-scene {
  position: relative;
  width: min(100%, 470px);
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: 32px;
  border: 1px solid var(--stage-line);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.035);
}

.tip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.tip-trigger {
  padding: 9px 18px;
  border: 1px solid var(--stage-line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.07);
  color: var(--stage-ink);
  font-size: 12px;
  cursor: help;
}

.tip-trigger:hover,
.tip-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.tip-bubble {
  position: absolute;
  z-index: 4;
  max-width: 240px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.tip-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.tip-bubble[data-placement="above"]::after {
  bottom: -4px;
}

.tip-bubble[data-placement="below"]::after {
  top: -4px;
}

.tip-status {
  margin-top: 14px;
  color: var(--stage-muted);
  font-size: 11px;
  text-align: center;
}

/* Dropdown menu */
.dd-wrap {
  position: relative;
  width: min(100%, 300px);
}

.dd-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--stage-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--stage-ink);
  font-size: 12px;
}

.dd-caret {
  color: var(--stage-muted);
  font-size: 10px;
}

.dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  min-width: 100%;
  padding: 6px;
  border-radius: 14px;
  background: #f5f5f7;
  color: #1d1d1f;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform-origin: top right;
}

.dd-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  text-align: left;
}

.dd-item:hover,
.dd-item:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}

.dd-check {
  width: 12px;
  color: #0071e3;
  font-size: 11px;
}

.dd-status {
  margin-top: 16px;
  color: var(--stage-muted);
  font-size: 11px;
  text-align: center;
}

/* Sticky header */
.sh-scroll {
  width: min(100%, 520px);
  height: 330px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: #f7f7f9;
  color: #1d1d1f;
  text-align: left;
  scrollbar-width: thin;
}

.sh-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  transition: height var(--sh-duration, 200ms) cubic-bezier(0.22, 1, 0.36, 1),
              padding var(--sh-duration, 200ms) cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.sh-header.is-compact {
  height: 40px;
}

.sh-brand {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.sh-nav {
  display: flex;
  gap: 3px;
  margin-left: auto;
}

.sh-link {
  padding: 5px 9px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: #6e6e73;
  font-size: 10px;
}

.sh-link[aria-current="true"] {
  background: rgba(0, 113, 227, 0.1);
  color: #0066cc;
}

.sh-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(0, 0, 0, 0.05);
}

.sh-progress i {
  display: block;
  height: 100%;
  background: #0071e3;
  transform-origin: left;
  transform: scaleX(0);
}

.sh-section {
  min-height: 190px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sh-index {
  margin-bottom: 6px;
  color: #8a8a8f;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.sh-section h4 {
  margin-bottom: 6px;
  font-size: 16px;
}

.sh-section p {
  color: #6e6e73;
  font-size: 12px;
  line-height: 1.7;
}

.sh-filler {
  margin-top: 10px;
  opacity: 0.6;
}

.sh-caption {
  color: var(--stage-muted);
  font-size: 11px;
}

/* Theme reveal */
.tr-stage {
  position: relative;
  width: min(100%, 520px);
  height: 300px;
  overflow: hidden;
  border-radius: 22px;
  background: #f5f5f7;
  color: #1d1d1f;
  text-align: left;
}

.tr-stage.is-dark {
  background: #151517;
  color: #f5f5f7;
}

.tr-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 34px;
}

.tr-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  opacity: 0.55;
}

.tr-content h4 {
  max-width: 12ch;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.tr-content p {
  max-width: 36ch;
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.7;
}

.tr-toggle {
  align-self: flex-start;
  margin-top: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: #1d1d1f;
  color: #fff;
  font-size: 12px;
}

.tr-stage.is-dark .tr-toggle {
  background: #f5f5f7;
  color: #1d1d1f;
}

.tr-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.tr-caption {
  color: var(--stage-muted);
  font-size: 11px;
}

/* Text scramble */
.ts-scene {
  width: min(100%, 600px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.ts-eyebrow {
  color: var(--stage-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.ts-line {
  min-height: 1.25em;
  font-size: clamp(26px, 4.4vw, 50px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: pre-wrap;
  font-variant-numeric: tabular-nums;
}

.ts-line span {
  display: inline-block;
  min-width: 0.58em;
  text-align: center;
}

.ts-sub {
  color: var(--stage-muted);
  font-size: 11px;
}

.ts-actions {
  display: flex;
  gap: 8px;
}

/* Horizontal story */
.hs-viewport {
  width: min(100%, 560px);
  height: 340px;
  overflow-y: auto;
  border: 1px solid var(--stage-line);
  border-radius: 20px;
  background: #17171a;
  scrollbar-width: thin;
}

.hs-rail {
  height: 300%;
}

.hs-sticky {
  position: sticky;
  top: 0;
  height: 100%;
  overflow: hidden;
}

.hs-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.hs-panel {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  text-align: left;
  transition: opacity 160ms ease, transform 160ms ease;
}

.hs-panel[data-tone="a"] { background: linear-gradient(140deg, #1e3a6b, #2d5f9e); }
.hs-panel[data-tone="b"] { background: linear-gradient(140deg, #3a1e5f, #6a3fa0); }
.hs-panel[data-tone="c"] { background: linear-gradient(140deg, #0f4d3c, #1f7a5f); }

.hs-index {
  font-family: var(--font-mono);
  font-size: 9px;
  opacity: 0.6;
  letter-spacing: 0.16em;
}

.hs-panel h4 {
  font-size: clamp(24px, 3.4vw, 38px);
  letter-spacing: -0.04em;
}

.hs-panel p {
  max-width: 30ch;
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.8;
}

.hs-art {
  position: relative;
  width: 160px;
  height: 70px;
  margin-top: 8px;
}

.hs-art i {
  position: absolute;
  top: 8px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hs-art i:nth-child(1) { left: 0; }
.hs-art i:nth-child(2) { left: 38px; top: 2px; background: rgba(255, 255, 255, 0.26); }
.hs-art i:nth-child(3) { left: 76px; background: rgba(255, 255, 255, 0.12); }

.hs-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.hs-dot {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 9px;
}

.hs-dot[aria-pressed="true"] {
  background: #fff;
  color: #151517;
}

.hs-hint {
  color: var(--stage-muted);
  font-size: 11px;
}

/* Bottom tabs */
.bt-phone {
  position: relative;
  width: 280px;
  height: 430px;
  overflow: hidden;
  border: 8px solid #2a2a2e;
  border-radius: 38px;
  background: #f5f5f7;
  color: #1d1d1f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.bt-screen {
  position: relative;
  height: calc(100% - 70px);
}

.bt-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 26px;
  text-align: center;
}

.bt-panel-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(0, 113, 227, 0.1);
  color: #0071e3;
  font-size: 24px;
}

.bt-panel h4 {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.bt-panel p {
  color: #6e6e73;
  font-size: 11px;
  line-height: 1.6;
}

.bt-meta {
  margin-top: 4px;
  color: #0071e3;
  font-size: 10px;
}

.bt-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  display: flex;
  padding: 0 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.bt-indicator {
  position: absolute;
  top: 8px;
  left: 5px;
  z-index: 1;
  border-radius: 16px;
  background: rgba(0, 113, 227, 0.12);
}

.bt-tab {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: #6e6e73;
  font-size: 9px;
}

.bt-tab[aria-selected="true"] {
  color: #0071e3;
}

.bt-icon {
  font-size: 17px;
}

.bt-caption {
  color: var(--stage-muted);
  font-size: 11px;
}

/* Edge swipe back */
.eb-phone {
  position: relative;
  width: 280px;
  height: 430px;
  overflow: hidden;
  border: 8px solid #2a2a2e;
  border-radius: 38px;
  background: #f7f7f9;
  color: #1d1d1f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.eb-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 20px;
  will-change: transform;
}

.eb-list {
  background: #f7f7f9;
}

.eb-detail {
  z-index: 2;
  background: #fff;
}

.eb-eyebrow {
  color: #8a8a8f;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.eb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
}

.eb-row span:last-child {
  color: #8a8a8f;
  font-size: 9px;
}

.eb-note,
.eb-meta {
  margin-top: 6px;
  color: #8a8a8f;
  font-size: 10px;
  line-height: 1.6;
}

.eb-detail h4 {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.eb-detail p {
  color: #6e6e73;
  font-size: 11px;
  line-height: 1.7;
}

.eb-back {
  align-self: flex-start;
  padding: 7px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  font-size: 10px;
}

.eb-edge {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 28px;
  touch-action: pan-y;
  background: linear-gradient(90deg, rgba(0, 113, 227, 0.12), transparent);
}

.eb-reopen {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: #1d1d1f;
  color: #fff;
  font-size: 10px;
  transform: translateX(-50%);
}

.eb-caption {
  color: var(--stage-muted);
  font-size: 11px;
}

/* Long press menu */
.lp-scene {
  position: relative;
  width: 320px;
  height: 280px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stage-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.lp-card {
  width: 210px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, #2a3a63, #4a3468);
  color: #fff;
  text-align: left;
  touch-action: none;
  user-select: none;
  transition: transform 160ms ease;
}

.lp-card:active {
  transform: scale(0.985);
}

.lp-eyebrow {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  opacity: 0.6;
}

.lp-card h4 {
  margin: 6px 0 4px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.lp-card p {
  font-size: 11px;
  opacity: 0.75;
}

.lp-hold {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(120, 170, 255, 0.28);
  border: 1px solid rgba(160, 200, 255, 0.6);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
}

.lp-menu {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lp-item {
  position: absolute;
  width: 54px;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 9px;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.lp-item span:first-child {
  font-size: 14px;
}

.lp-actions {
  display: flex;
  justify-content: center;
}

.lp-status {
  color: var(--stage-muted);
  font-size: 11px;
  text-align: center;
}

/* Double tap zoom */
.dz-frame {
  width: min(100%, 460px);
  height: 280px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #1c2230;
  touch-action: pan-y;
  cursor: zoom-in;
}

.dz-art {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(140deg, #314b8a, #a05c8f 55%, #d9a05f);
  transform-origin: center;
  will-change: transform;
}

.dz-art i {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dz-art i:nth-child(1) { width: 46%; height: 90%; left: 8%; top: 6%; }
.dz-art i:nth-child(2) { width: 20%; height: 34%; left: 58%; top: 12%; }
.dz-art i:nth-child(3) { width: 14%; height: 22%; left: 70%; top: 62%; }

.dz-actions {
  display: flex;
  gap: 8px;
}

.dz-hint {
  color: var(--stage-muted);
  font-size: 11px;
}

/* Loading states */
.ls-scene {
  width: min(100%, 540px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ls-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.ls-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--stage-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--stage-muted);
  font-size: 9px;
  text-align: center;
}

.ls-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: #79b4ff;
  border-radius: 50%;
  animation: ls-spin var(--ls-speed, 900ms) linear infinite;
}

.ls-indeterminate {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
}

.ls-indeterminate i {
  display: block;
  width: 40%;
  height: 100%;
  background: #79b4ff;
  animation: ls-slide var(--ls-speed, 900ms) ease-in-out infinite;
}

.ls-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
}

.ls-track i {
  display: block;
  height: 100%;
  background: #68dbac;
  transform-origin: left;
  transform: scaleX(0);
}

.ls-percent {
  color: var(--stage-ink);
  font-family: var(--font-mono);
  font-size: 13px;
}

.ls-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid rgba(104, 219, 172, 0.3);
  border-radius: 16px;
  background: rgba(104, 219, 172, 0.1);
  font-size: 11px;
}

.ls-content span {
  color: var(--stage-muted);
}

.ls-actions {
  display: flex;
  gap: 8px;
}

.ls-status {
  color: var(--stage-muted);
  font-size: 11px;
  text-align: center;
}

@keyframes ls-spin {
  to { transform: rotate(1turn); }
}

@keyframes ls-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}

html[data-motion="none"] .ls-spinner,
html[data-motion="none"] .ls-indeterminate i {
  animation: none;
}

html[data-motion="none"] .ls-indeterminate i {
  width: 100%;
  opacity: 0.4;
}

/* Toast undo */
.tu-scene {
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.tu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--stage-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.tu-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tu-copy strong {
  font-size: 12px;
}

.tu-copy span {
  color: var(--stage-muted);
  font-size: 10px;
}

.tu-delete {
  flex: none;
  padding: 6px 12px;
  border: 1px solid rgba(255, 139, 154, 0.35);
  border-radius: var(--r-pill);
  background: transparent;
  color: #ff8b9a;
  font-size: 10px;
}

.tu-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 12px 16px 14px;
  border-radius: 14px;
  background: #f5f5f7;
  color: #1d1d1f;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.tu-text {
  flex: 1;
  font-size: 11px;
}

.tu-undo {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(0, 113, 227, 0.12);
  color: #0066cc;
  font-size: 11px;
  font-weight: 600;
}

.tu-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.07);
}

.tu-progress i {
  display: block;
  height: 100%;
  background: #0071e3;
  transform-origin: left;
  transform: scaleX(1);
}

.tu-status {
  color: var(--stage-muted);
  font-size: 11px;
  text-align: center;
}

/* Optimistic update */
.ou-scene {
  width: min(100%, 500px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.ou-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ou-row {
  overflow: hidden;
  border: 1px solid var(--stage-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.ou-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 0;
  background: transparent;
  color: var(--stage-ink);
  font-size: 12px;
  text-align: left;
  transition: background 160ms ease;
}

.ou-toggle[aria-pressed="true"] {
  background: rgba(255, 107, 138, 0.08);
}

.ou-toggle:disabled {
  cursor: progress;
}

.ou-heart {
  width: 22px;
  color: #ff6b8a;
  font-size: 18px;
  line-height: 1;
}

.ou-title {
  flex: 1;
}

.ou-state {
  color: var(--stage-muted);
  font-size: 9px;
}

.ou-status {
  color: var(--stage-muted);
  font-size: 11px;
  text-align: center;
}

.ou-caption {
  color: var(--stage-muted);
  font-size: 10px;
  text-align: center;
}

/* Onboarding tour */
.ot-app {
  position: relative;
  width: min(100%, 560px);
  height: 300px;
  overflow: hidden;
  border-radius: 20px;
  background: #f5f5f7;
  color: #1d1d1f;
  text-align: left;
}

.ot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #8a8a8f;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.ot-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 22px;
}

.ot-target {
  padding: 10px 16px;
  border: 1px solid #d5d5da;
  border-radius: 10px;
  background: #fff;
  color: #1d1d1f;
  font-size: 12px;
}

.ot-search {
  font-weight: 600;
}

.ot-chips {
  display: flex;
  gap: 8px;
}

.ot-chip {
  padding: 8px 14px;
  border: 1px solid #d5d5da;
  border-radius: var(--r-pill);
  background: #fff;
  color: #6e6e73;
  font-size: 11px;
}

.ot-note {
  padding: 0 22px;
  color: #8a8a8f;
  font-size: 10px;
  line-height: 1.6;
}

.ot-veil {
  position: absolute;
  z-index: 3;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(10, 10, 12, 0.55);
  pointer-events: none;
}

.ot-tip {
  position: absolute;
  z-index: 4;
  width: min(240px, calc(100% - 16px));
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  color: #1d1d1f;
  text-align: left;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.ot-step {
  color: #8a8a8f;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.ot-tip h4 {
  margin: 4px 0 5px;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.ot-tip p {
  color: #6e6e73;
  font-size: 11px;
  line-height: 1.6;
}

.ot-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.ot-controls > div {
  display: flex;
  gap: 6px;
}

.ot-button {
  padding: 6px 11px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--r-pill);
  background: transparent;
  color: #1d1d1f;
  font-size: 10px;
}

.ot-button:disabled {
  opacity: 0.35;
}

.ot-primary {
  border-color: #1d1d1f;
  background: #1d1d1f;
  color: #fff;
}

.ot-skip {
  border-color: transparent;
  color: #8a8a8f;
}

.ot-start-row {
  display: flex;
  justify-content: center;
}

.ot-status {
  color: var(--stage-muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 560px) {
  .ls-cards { grid-template-columns: 1fr; }
  .ls-card { min-height: 92px; flex-direction: row; justify-content: flex-start; }
  .ls-indeterminate, .ls-track { width: 90px; }
  .tip-scene { padding: 22px; }
  .sh-scroll, .tr-stage, .hs-viewport, .dz-frame { height: 300px; }
  .ot-app { height: 320px; }
  .bt-phone, .eb-phone { width: 250px; height: 400px; }
}

/* Fade chapters share one viewport; only the active chapter is exposed. */
.hs-track[data-mode="fade"] { display:grid; }
.hs-track[data-mode="fade"] .hs-panel { grid-area:1 / 1; width:100%; min-width:0; }
html[data-motion="reduced"] .ls-spinner,html[data-motion="reduced"] .ls-indeterminate i { animation:none; }
.ls-scene:not([data-state="loading"]) .ls-spinner,
.ls-scene:not([data-state="loading"]) .ls-indeterminate i { animation-play-state:paused; }
