:root {
  color-scheme: light;
  --ink: #1f2528;
  --muted: #657176;
  --line: #d8ddda;
  --paper: #f7f6f0;
  --surface: #ffffff;
  --accent: #116466;
  --accent-2: #8b3e2f;
  --accent-3: #d5b942;
  --soft: #e8efec;
  --shadow: 0 20px 70px rgba(28, 37, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

html[data-platform="ios"] [data-web-only] {
  display: none !important;
}

[data-ios-only] {
  display: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(31, 37, 40, 0.1);
  background: rgba(247, 246, 240, 0.92);
  backdrop-filter: blur(18px);
}

html[data-platform="ios"] .app-header {
  padding-top: calc(14px + env(safe-area-inset-top));
}

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

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 12px;
  background: #f4f0df;
  box-shadow: 0 8px 24px rgba(31, 37, 40, 0.12);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.main-nav a,
.button,
button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 13px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.main-nav a:hover,
.button:hover,
button:hover {
  border-color: rgba(31, 37, 40, 0.18);
  background: rgba(255, 255, 255, 0.68);
}

.button.primary,
button.primary {
  background: var(--accent);
  color: white;
}

.button.primary:hover,
button.primary:hover {
  background: #0e5557;
}

.button.subtle,
button.subtle {
  background: var(--soft);
}

.button.danger,
button.danger {
  color: #8b1e12;
}

.app-shell {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  min-height: calc(100vh - 112px);
  padding-bottom: 28px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(46px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #455055;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(31, 37, 40, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.3)),
    url("https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?auto=format&fit=crop&w=1200&q=80")
      center/cover;
  box-shadow: var(--shadow);
}

.hero-panel::after {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  content: "";
  background: linear-gradient(transparent, rgba(31, 37, 40, 0.72));
}

.hero-stat {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  color: white;
}

.hero-stat div {
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  padding-top: 12px;
}

.hero-stat strong {
  display: block;
  font-size: 26px;
}

.hero-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 22px 0 18px;
}

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}

.section-head p {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head.compact {
  margin-top: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

.toolbar input,
.toolbar select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}

.toolbar input {
  min-width: min(100%, 320px);
  flex: 1;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.timeline-range-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: -12px 0 24px;
}

.compact-field {
  width: 128px;
}

.compact-field input {
  min-height: 38px;
}

.segmented-control button {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  padding: 8px 12px;
}

.segmented-control button.active {
  background: var(--ink);
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.philosopher-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.philosopher-directory-head strong {
  color: var(--ink);
  font-size: 15px;
}

.muted-text {
  color: var(--muted);
}

.search-workbench {
  margin-bottom: 28px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.search-result {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.search-result span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.search-result small {
  color: var(--muted);
  line-height: 1.5;
}

.card {
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(31, 37, 40, 0.06);
}

.tappable-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tappable-card h3,
.tappable-card p {
  color: inherit;
}

.viewpoint-philosopher-link {
  display: block;
  border-radius: 8px;
  padding: 8px 0;
  color: #4a5559;
}

.viewpoint-philosopher-link strong,
.viewpoint-philosopher-link span {
  display: inline;
}

.card h3 {
  margin: 0;
  font-size: 22px;
}

.card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--soft);
  color: #314046;
  font-size: 12px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 146px;
  width: 2px;
  content: "";
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 50px;
  align-items: start;
}

.timeline-year {
  color: var(--accent-2);
  font-size: 20px;
  font-weight: 800;
  text-align: right;
}

.timeline-content {
  position: relative;
}

.timeline-content::before {
  position: absolute;
  top: 8px;
  left: -31px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.star-timeline-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.star-timeline-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 18px;
  background: #11191d;
  color: #f7f6f0;
}

.star-timeline-head h2 {
  margin: 0;
  font-size: 26px;
}

.star-timeline-head p {
  margin: 6px 0 0;
  color: rgba(247, 246, 240, 0.68);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(247, 246, 240, 0.76);
  font-size: 13px;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 18px currentColor;
}

.star-map {
  position: relative;
  height: min(72vh, 760px);
  min-height: 520px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(213, 185, 66, 0.22), transparent 28%),
    radial-gradient(circle at 72% 70%, rgba(86, 211, 155, 0.18), transparent 34%),
    radial-gradient(circle at 48% 42%, rgba(88, 166, 255, 0.11), transparent 36%),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #131c20 0%, #0d171b 48%, #13201d 100%);
  background-size:
    auto,
    auto,
    auto,
    100% 112px,
    120px 100%,
    auto;
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
}

.star-map.dragging {
  cursor: grabbing;
}

.star-canvas {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 100%;
}

.star-canvas::before {
  position: absolute;
  inset: 54px 52px 48px 132px;
  z-index: 0;
  min-width: 1320px;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02) 48%, rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 22% 32%, rgba(213, 185, 66, 0.12), transparent 28%),
    radial-gradient(circle at 76% 62%, rgba(86, 211, 155, 0.12), transparent 30%);
  opacity: 0.55;
  pointer-events: none;
}

.star-canvas::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background-image:
    radial-gradient(circle, rgba(247, 246, 240, 0.48) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(213, 185, 66, 0.4) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(88, 166, 255, 0.38) 0 1px, transparent 1.7px);
  background-position:
    24px 36px,
    120px 88px,
    210px 152px;
  background-size:
    260px 220px,
    340px 260px,
    420px 300px;
  opacity: 0.28;
  pointer-events: none;
}

.star-map-overlay {
  position: sticky;
  top: 14px;
  left: 14px;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: calc(100% - 28px);
  gap: 12px;
  margin: 14px;
  pointer-events: none;
}

.map-hint {
  z-index: 9;
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(8, 12, 14, 0.62);
  color: rgba(247, 246, 240, 0.66);
  font-size: 12px;
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.star-map-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
  pointer-events: auto;
}

.ghost-control {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(247, 246, 240, 0.1);
  color: rgba(247, 246, 240, 0.9);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.ghost-control:hover {
  border-color: rgba(213, 185, 66, 0.45);
  background: rgba(213, 185, 66, 0.16);
}

.relation-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(8, 12, 14, 0.62);
  color: rgba(247, 246, 240, 0.72);
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.relation-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-line {
  display: inline-block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  box-shadow: 0 0 10px currentColor;
}

.legend-line.inherit {
  background: rgba(213, 185, 66, 0.94);
  color: rgba(213, 185, 66, 0.94);
}

.legend-line.critique {
  width: 24px;
  background: repeating-linear-gradient(90deg, rgba(255, 126, 112, 0.94) 0 6px, transparent 6px 10px);
  color: rgba(255, 126, 112, 0.94);
}

.legend-line.transform {
  background: rgba(102, 168, 255, 0.9);
  color: rgba(102, 168, 255, 0.9);
}

.era-bands {
  position: absolute;
  top: 54px;
  right: 52px;
  bottom: 48px;
  left: 132px;
  z-index: 1;
  min-width: 1320px;
  pointer-events: none;
}

.era-bands,
.year-ruler,
.star-track,
.star-canvas::before {
  min-width: 0;
}

.era-bands {
  inset: 42px 30px 28px 92px;
}

.star-canvas::before {
  inset: 42px 30px 28px 92px;
}

.year-ruler {
  top: 12px;
  right: 30px;
  left: 92px;
}

.year-ruler span::before {
  height: 390px;
}

.star-track {
  top: calc(58px + var(--track-index) * 68px);
  right: 30px;
  left: 92px;
  height: 62px;
}

.track-label {
  left: -82px;
  top: 19px;
  width: 64px;
  font-size: 12px;
}

.track-line {
  top: 31px;
}

.node-label-svg {
  font-size: 11px;
}

.era-bands span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
}

.era-bands span:nth-child(even) {
  background: linear-gradient(180deg, rgba(86, 211, 155, 0.055), rgba(86, 211, 155, 0.01));
}

.era-bands b {
  position: sticky;
  top: 0;
  display: block;
  padding: 12px;
  color: rgba(247, 246, 240, 0.52);
  font-size: 12px;
}

.d3-star-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.d3-relation {
  stroke: rgba(247, 246, 240, 0.16);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.d3-relation.relation-inherit {
  stroke-dasharray: none;
}

.d3-relation.relation-critique {
  stroke: rgba(255, 126, 112, 0.24);
  stroke-dasharray: 7 7;
}

.d3-relation.relation-transform {
  stroke: rgba(102, 168, 255, 0.22);
  stroke-dasharray: 2 6;
}

.d3-star-svg marker path {
  fill: rgba(213, 185, 66, 0.94);
}

.d3-relation.active {
  stroke: rgba(213, 185, 66, 0.94);
  stroke-width: 2.8;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 5px rgba(213, 185, 66, 0.76));
}

.d3-relation.active.relation-critique {
  stroke: rgba(255, 126, 112, 0.94);
  stroke-dasharray: 8 6;
  filter: drop-shadow(0 0 5px rgba(255, 126, 112, 0.66));
}

.d3-relation.active.relation-transform {
  stroke: rgba(102, 168, 255, 0.94);
  stroke-dasharray: 2 6;
  filter: drop-shadow(0 0 5px rgba(102, 168, 255, 0.66));
}

.d3-relation.path {
  stroke-width: 3.2;
  opacity: 0.98;
  filter: drop-shadow(0 0 7px rgba(213, 185, 66, 0.72));
}

.d3-relation.active.incoming {
  opacity: 0.96;
}

.d3-density {
  cursor: zoom-in;
}

.d3-density .density-hit {
  fill: transparent;
  pointer-events: all;
}

.d3-density circle:not(.density-hit) {
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 1.5;
  opacity: 0.82;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.18));
}

.d3-density:hover circle:not(.density-hit) {
  opacity: 1;
  stroke-width: 2;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.38));
}

.d3-density text {
  fill: #081015;
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
  text-anchor: middle;
}

.year-ruler {
  position: absolute;
  top: 18px;
  right: 52px;
  left: 132px;
  z-index: 4;
  min-width: 1320px;
  height: 34px;
  color: rgba(247, 246, 240, 0.64);
}

.year-ruler span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  white-space: nowrap;
}

.year-ruler span::before {
  display: block;
  width: 1px;
  height: 610px;
  margin: 18px auto 0;
  background: rgba(255, 255, 255, 0.08);
  content: "";
}

.star-track {
  position: absolute;
  right: 52px;
  left: 132px;
  min-width: 1320px;
  top: calc(104px + var(--track-index) * 136px);
  z-index: 5;
  height: 122px;
  pointer-events: none;
}

.star-track::before {
  position: absolute;
  inset: 10px 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 46%, rgba(255, 255, 255, 0.025)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
  content: "";
  pointer-events: none;
}

.track-label {
  position: absolute;
  left: -112px;
  top: 42px;
  width: 88px;
  color: rgba(247, 246, 240, 0.94);
  font-weight: 800;
  text-align: right;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.track-line {
  position: absolute;
  top: 60px;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(247, 246, 240, 0.08), rgba(247, 246, 240, 0.34), rgba(247, 246, 240, 0.08));
}

.star-map,
.star-map.explore-overview,
.star-map.explore-middle,
.star-map.explore-close {
  height: min(72vh, 760px);
  min-height: 520px;
  overflow: hidden;
  cursor: default;
}

.star-canvas,
.star-map.explore-overview .star-canvas,
.star-map.explore-middle .star-canvas,
.star-map.explore-close .star-canvas {
  width: 100%;
  min-width: 100%;
  height: 100%;
}

.era-bands,
.year-ruler,
.star-track,
.star-canvas::before {
  min-width: 0;
}

.era-bands,
.star-canvas::before {
  inset: 42px 30px 28px 92px;
}

.year-ruler {
  top: 12px;
  right: 30px;
  left: 92px;
  min-width: 0;
}

.year-ruler span::before {
  height: 390px;
}

.star-track {
  top: calc(58px + var(--track-index) * 68px);
  right: 30px;
  left: 92px;
  min-width: 0;
  height: 62px;
}

.track-label {
  left: -82px;
  top: 19px;
  width: 64px;
  font-size: 12px;
}

.track-line {
  top: 31px;
}

.d3-star-node {
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.16s ease;
}

.d3-star-node .node-hit {
  fill: transparent;
  pointer-events: all;
}

.d3-star-node .node-orbit {
  opacity: 0.18;
  filter: drop-shadow(0 0 18px currentColor);
}

.d3-star-node .node-portrait-bg {
  opacity: 0.92;
  filter: drop-shadow(0 0 14px currentColor);
}

.d3-star-node .node-portrait-img {
  pointer-events: none;
  opacity: 0.96;
}

.d3-star-node .node-core-svg {
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 2;
  filter: drop-shadow(0 0 12px currentColor);
}

.d3-star-node.importance-major .node-core-svg {
  stroke-width: 2.8;
}

.d3-star-node.importance-supporting .node-core-svg {
  stroke-width: 1.6;
  opacity: 0.86;
}

.d3-star-node.selected .node-core-svg {
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 0 20px currentColor);
}

.d3-star-node.path {
  opacity: 1;
}

.d3-star-node.path .node-core-svg {
  stroke: rgba(213, 185, 66, 0.96);
  stroke-width: 3.2;
}

.d3-star-node.path .node-orbit {
  opacity: 0.36;
}

.d3-star-node.context-muted {
  opacity: 0.18;
}

.d3-star-node.related {
  opacity: 1;
}

.d3-star-node.related .node-orbit,
.d3-star-node.selected .node-orbit {
  opacity: 0.34;
}

.node-label-svg {
  fill: rgba(247, 246, 240, 0.86);
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(0, 0, 0, 0.7);
  stroke-width: 4px;
  text-anchor: middle;
  opacity: 0;
}

.d3-star-node.show-label .node-label-svg,
.d3-star-node:hover .node-label-svg {
  opacity: 1;
}

.star-hover-card {
  position: absolute;
  z-index: 20;
  width: max-content;
  max-width: 300px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 12, 14, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  color: #f7f6f0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.star-hover-card.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.star-hover-card strong,
.star-hover-card small,
.star-hover-card em,
.star-hover-card span,
.star-hover-card a {
  display: block;
}

.star-hover-card small {
  margin-top: 3px;
  color: rgba(247, 246, 240, 0.66);
  font-size: 11px;
}

.star-hover-card b {
  display: block;
  margin-top: 7px;
  color: rgba(247, 246, 240, 0.82);
  font-size: 11px;
}

.star-hover-card em {
  margin-top: 8px;
  color: rgba(213, 185, 66, 0.92);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.star-hover-card span {
  margin-top: 6px;
  color: rgba(247, 246, 240, 0.74);
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
}

.star-hover-card a {
  width: fit-content;
  margin-top: 10px;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(213, 185, 66, 0.16);
  color: rgba(247, 246, 240, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.star-hover-card a:hover {
  background: rgba(213, 185, 66, 0.28);
  color: #fff;
}

.timeline-minimap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: auto;
  z-index: 12;
  display: block;
  width: 242px;
  height: 96px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    rgba(8, 12, 14, 0.7);
  background-size:
    100% 14px,
    28px 100%,
    auto;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  cursor: crosshair;
  backdrop-filter: blur(14px);
}

.timeline-mobile-navigator {
  display: contents;
}

.timeline-nav-toggle {
  display: none;
}

.timeline-path-selector {
  position: sticky;
  top: 58px;
  left: 0;
  z-index: 13;
  width: 100%;
  padding: 0 14px 8px;
  pointer-events: auto;
}

.timeline-path-trigger {
  display: inline-flex;
  align-items: center;
  max-width: min(420px, 92vw);
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(8, 12, 14, 0.68);
  color: rgba(247, 246, 240, 0.86);
  gap: 7px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.timeline-path-trigger.active {
  border-color: rgba(213, 185, 66, 0.46);
  background: rgba(213, 185, 66, 0.18);
}

.timeline-path-trigger span,
.timeline-path-trigger b {
  color: rgba(247, 246, 240, 0.58);
  font-size: 11px;
  font-weight: 900;
}

.timeline-path-trigger strong {
  overflow: hidden;
  max-width: 168px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.timeline-path-menu {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 8px;
  max-height: min(46dvh, 360px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px;
  background: rgba(8, 12, 14, 0.82);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.timeline-path-selector.open .timeline-path-menu {
  display: grid;
}

.timeline-path-menu button {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(247, 246, 240, 0.08);
  color: rgba(247, 246, 240, 0.86);
  text-align: left;
}

.timeline-path-menu button.active {
  border-color: rgba(213, 185, 66, 0.46);
  background: rgba(213, 185, 66, 0.18);
}

.timeline-path-menu button:disabled {
  opacity: 0.42;
}

.timeline-path-menu strong,
.timeline-path-menu span {
  display: block;
}

.timeline-path-menu strong {
  font-size: 13px;
  font-weight: 900;
}

.timeline-path-menu span {
  color: rgba(247, 246, 240, 0.62);
  font-size: 11px;
  line-height: 1.35;
}

.mini-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mini-ruler line {
  stroke: rgba(247, 246, 240, 0.16);
  stroke-width: 1;
}

.mini-points circle {
  filter: drop-shadow(0 0 4px currentColor);
  opacity: 0.88;
}

.mini-viewport {
  fill: rgba(247, 246, 240, 0.07);
  stroke: rgba(247, 246, 240, 0.65);
  stroke-width: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(247, 246, 240, 0.2));
}

.timeline-inspector {
  min-height: 1120px;
}

.timeline-compare {
  display: grid;
  gap: 16px;
}

.compare-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.compare-lane {
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(31, 37, 40, 0.06);
}

.compare-lane h3 {
  margin: 0 0 10px;
}

.compare-card {
  display: block;
  border-top: 1px solid rgba(31, 37, 40, 0.08);
  padding: 10px 0;
}

.compare-card strong,
.compare-card span {
  display: block;
}

.compare-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.compare-card p {
  margin: 6px 0 0;
  color: #4a5559;
  font-size: 13px;
  line-height: 1.6;
}

.inspector-card {
  position: sticky;
  top: 94px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.inspector-kicker {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.inspector-card h2 {
  margin: 8px 0 8px;
  font-size: 30px;
}

.inspector-card p {
  color: #4a5559;
  line-height: 1.7;
}

.inspector-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.inspector-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.relation-summary {
  display: grid;
  gap: 10px;
}

.relation-summary small {
  display: block;
  margin-bottom: 7px;
  color: rgba(31, 37, 40, 0.5);
  font-size: 12px;
  font-weight: 800;
}

.relation-chip {
  display: inline-flex;
  margin: 0 6px 6px 0;
  border: 1px solid rgba(213, 185, 66, 0.32);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(213, 185, 66, 0.1);
  color: #4a3f0c;
  font-size: 12px;
  font-weight: 800;
}

.relation-chip:hover {
  border-color: rgba(213, 185, 66, 0.54);
  background: rgba(213, 185, 66, 0.18);
}

.inspector-link {
  display: block;
  border-radius: 8px;
  padding: 10px 0;
}

.inspector-link + .inspector-link {
  border-top: 1px solid rgba(31, 37, 40, 0.08);
}

.inspector-link strong,
.inspector-link span {
  display: block;
}

.inspector-link span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 22px;
}

.side-panel {
  align-self: start;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.side-panel dl {
  margin: 0;
}

.side-panel dt {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.side-panel dd {
  margin: 4px 0 0;
}

.content-block {
  margin-bottom: 16px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
}

.content-block h2,
.content-block h3 {
  margin: 0 0 12px;
}

.content-block p,
.content-block li {
  color: #4a5559;
  line-height: 1.8;
}

.learning-block {
  border-color: rgba(14, 85, 87, 0.16);
  background:
    linear-gradient(135deg, rgba(14, 85, 87, 0.06), rgba(213, 185, 66, 0.06)),
    var(--surface);
}

.learning-grid {
  display: grid;
  gap: 16px;
}

.learning-grid section {
  border-top: 1px solid rgba(31, 37, 40, 0.08);
  padding-top: 14px;
}

.learning-grid section:first-child {
  border-top: 0;
  padding-top: 0;
}

.learning-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.concept-note-list,
.misconception-list {
  display: grid;
  gap: 10px;
}

.concept-note,
.misconception-item {
  border: 1px solid rgba(31, 37, 40, 0.08);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.concept-note strong,
.misconception-item strong,
.concept-note span,
.misconception-item span {
  display: block;
}

.concept-note strong {
  color: var(--accent-2);
}

.misconception-item strong {
  color: #8a4f22;
}

.concept-note span,
.misconception-item span {
  margin-top: 5px;
  color: #4a5559;
  line-height: 1.65;
}

/* ── Philosopher detail: extended blocks ── */
.bio-sections {
  display: grid;
  gap: 20px;
}

.bio-section h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bio-section p {
  margin: 0;
  line-height: 1.8;
}

.philosopher-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(31, 37, 40, 0.07);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-year {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.timeline-event {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
}

.contributions-list {
  display: grid;
  gap: 20px;
}

.contribution-item {
  padding: 16px;
  border: 1px solid rgba(31, 37, 40, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.contribution-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

.contribution-item p {
  margin: 0;
  line-height: 1.75;
  color: #3c4448;
}

.key-works-list {
  display: grid;
  gap: 12px;
}

.key-work-item {
  padding: 12px 14px;
  border-left: 3px solid rgba(14, 85, 87, 0.3);
  background: rgba(14, 85, 87, 0.03);
  border-radius: 0 8px 8px 0;
}

.key-work-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.key-work-head strong {
  font-size: 15px;
  color: var(--ink);
}

.key-work-year {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.key-work-item p {
  margin: 0;
  font-size: 14px;
  color: #4a5559;
  line-height: 1.65;
}

.influences-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .influences-grid { grid-template-columns: 1fr; }
}

.influences-grid h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.influence-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.influence-list li {
  font-size: 15px;
  line-height: 1.6;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.comparison-toolbar {
  margin-bottom: 16px;
}

.comparison-toolbar select {
  min-width: min(100%, 360px);
}

.full-width {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
}

.question-learning-intro p,
.question-learning-block p {
  max-width: 860px;
  color: var(--muted);
  line-height: 1.8;
}

.question-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.question-directory-head strong {
  color: var(--ink);
  font-size: 15px;
}

.question-mobile-hero {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.question-mobile-hero h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.question-mobile-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.question-hero-kicker {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(17, 100, 102, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.question-learning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.question-learning-grid section {
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 14px;
  background: #fbfbf7;
}

.question-learning-grid span,
.question-confusions h3 {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.question-confusions {
  margin-top: 16px;
}

.question-confusions div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.question-confusions span {
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(17, 100, 102, 0.08);
  color: #395155;
  font-size: 13px;
  font-weight: 800;
}

.block-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-link {
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 800;
}

.development-block {
  overflow: hidden;
}

.development-line {
  display: grid;
  grid-auto-columns: minmax(180px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.development-step {
  position: relative;
  min-height: 168px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(213, 185, 66, 0.08), rgba(14, 85, 87, 0.04)),
    #fbfbf7;
}

.development-step::before {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 10px;
  border: 3px solid rgba(247, 246, 240, 0.9);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(213, 185, 66, 0.16);
  content: "";
}

.development-step span,
.development-step strong,
.development-step em,
.development-step small {
  display: block;
}

.development-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.development-step strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
}

.development-step em {
  margin-top: 6px;
  color: var(--accent-2);
  font-style: normal;
  font-weight: 900;
}

.development-step small {
  margin-top: 8px;
  color: #4a5559;
  font-size: 13px;
  line-height: 1.55;
}

.compare-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.compare-guide span {
  border: 1px solid rgba(14, 85, 87, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(14, 85, 87, 0.06);
  color: #314348;
  line-height: 1.6;
}

.comparison-column {
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 14px;
  background: #fbfbf7;
}

.comparison-column h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.comparison-item {
  display: block;
  padding: 10px 0;
}

.philosopher-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.philosopher-card-head h3 {
  margin: 0;
}

.philosopher-mobile-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 16px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.philosopher-mobile-hero h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.philosopher-mobile-hero p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.ios-back-link {
  display: none;
}

.ios-detail-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.comparison-item + .comparison-item {
  border-top: 1px solid rgba(31, 37, 40, 0.08);
}

.comparison-item strong,
.comparison-item span {
  display: block;
}

.chronology-item {
  display: grid;
  grid-template-columns: 120px minmax(110px, 0.22fr) minmax(140px, 0.26fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-top: 1px solid rgba(31, 37, 40, 0.08);
  padding: 14px 0;
}

.chronology-item:first-child {
  border-top: 0;
}

.chronology-item span {
  color: var(--muted);
  font-weight: 900;
}

.chronology-item strong {
  color: var(--ink);
}

.chronology-item em {
  color: var(--accent-2);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.chronology-item p {
  margin: 0;
}

.dialogue-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.dialogue-head {
  margin-bottom: 18px;
}

.dialogue-head p {
  max-width: 760px;
}

.dialogue-chat-layout {
  align-items: stretch;
}

.dialogue-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.dialogue-mode-control {
  width: min(100%, 420px);
}

.dialogue-sidebar h2 {
  margin-top: 0;
}

.dialogue-account-panel {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.dialogue-account-panel.signed-in {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.dialogue-account-panel strong,
.dialogue-account-panel small {
  display: block;
}

.dialogue-account-panel small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dialogue-account-panel input {
  min-height: 38px;
  border: 1px solid rgba(31, 37, 40, 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.9);
}

.dialogue-account-panel.phone-auth-panel {
  gap: 10px;
}

.dialogue-account-panel.phone-auth-panel > button {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
}

.dialogue-dev-login {
  border-top: 1px solid rgba(31, 37, 40, 0.08);
  padding-top: 8px;
}

.dialogue-dev-login summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}

.dialogue-dev-login form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.dialogue-roundtable {
  display: grid;
  gap: 10px;
}

.dialogue-roundtable h3 {
  margin: 0;
  font-size: 15px;
}

.dialogue-example-grid button,
.dialogue-followups button {
  justify-content: flex-start;
  text-align: left;
  line-height: 1.5;
}

.dialogue-picker {
  margin: 0;
}

.dialogue-picker select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
}

.dialogue-profile {
  padding: 14px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  background: var(--soft);
}

.dialogue-profile > span {
  display: block;
}

.dialogue-profile span,
.dialogue-profile p {
  color: var(--muted);
}

.dialogue-profile p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.dialogue-roundtable label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--muted);
}

.dialogue-main {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto auto;
  gap: 12px;
}

.dialogue-chat-main {
  width: min(100%, 880px);
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.dialogue-compose-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(31, 37, 40, 0.1);
}

.dialogue-compose-head h2 {
  margin: 0;
}

.dialogue-compose-head p {
  max-width: 560px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.dialogue-mode-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.dialogue-guide-carousel {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.dialogue-guide-card {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 250px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(17, 100, 102, 0.13), rgba(213, 185, 66, 0.16)),
    #fbfaf6;
}

.dialogue-guide-meta,
.dialogue-guide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialogue-guide-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.dialogue-guide-meta a {
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.dialogue-guide-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.dialogue-guide-card h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.28;
}

.dialogue-guide-card p {
  margin: 0;
  color: #465155;
  line-height: 1.8;
}

.dialogue-guide-card small {
  color: var(--accent-2);
  font-weight: 900;
}

.dialogue-guide-controls button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.dialogue-guide-dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.dialogue-guide-dots button {
  width: 8px;
  min-width: 8px;
  height: 8px;
  min-height: 8px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(31, 37, 40, 0.2);
}

.dialogue-guide-dots button.active {
  width: 22px;
  border-radius: 999px;
  background: var(--accent);
}

.dialogue-stream {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  overflow: visible;
  padding: 8px 0 18px;
}

.dialogue-empty {
  display: grid;
  min-height: 360px;
  place-content: center;
  text-align: center;
  padding: 24px 0 12px;
}

.dialogue-empty h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
}

.dialogue-empty p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
}

.dialogue-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 760px);
  margin: 10px auto 0;
}

.dialogue-example-grid button {
  min-height: 34px;
  border-color: rgba(31, 37, 40, 0.08);
  padding: 7px 10px;
  background: rgba(232, 239, 236, 0.42);
  color: #596468;
  font-size: 14px;
  font-weight: 600;
}

.dialogue-example-grid button:hover {
  background: rgba(232, 239, 236, 0.76);
  color: var(--ink);
}

.dialogue-message {
  display: grid;
  gap: 12px;
  scroll-margin-bottom: 190px;
}

.dialogue-message.user {
  justify-items: end;
}

.dialogue-message.user p {
  max-width: min(78%, 720px);
  margin: 0;
  padding: 12px 15px;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  line-height: 1.7;
}

.dialogue-reply-card,
.dialogue-synthesis {
  padding: 18px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dialogue-reply-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.dialogue-reply-head h3 {
  margin: 0;
}

.philosopher-hover {
  position: relative;
  display: inline-flex;
}

.philosopher-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.philosopher-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.46), transparent 34%),
    linear-gradient(135deg, var(--avatar-color), hsl(var(--avatar-hue), 54%, 34%));
  color: white;
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 8px 18px rgba(31, 37, 40, 0.14);
}

.philosopher-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.philosopher-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.philosopher-avatar.portrait {
  background: var(--soft);
}

.philosopher-avatar.small {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.philosopher-popover {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 10px);
  width: min(280px, 70vw);
  border: 1px solid rgba(31, 37, 40, 0.12);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.philosopher-hover:hover .philosopher-popover,
.philosopher-hover:focus-within .philosopher-popover {
  opacity: 1;
  transform: translateY(0);
}

.philosopher-popover strong,
.philosopher-popover em,
.philosopher-popover span,
.philosopher-popover small {
  display: block;
}

.philosopher-popover em {
  margin-top: 4px;
  color: var(--accent-2);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.philosopher-popover span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.philosopher-popover small {
  margin-top: 10px;
  color: var(--accent);
  font-weight: 800;
}

.dialogue-stance,
.dialogue-answer {
  margin: 12px 0;
  color: var(--accent);
  font-weight: 800;
}

.dialogue-reply-card p {
  max-width: 780px;
  line-height: 1.8;
}

.dialogue-caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.85;
  animation: dialogue-caret-blink 1s steps(2, start) infinite;
}

@keyframes dialogue-caret-blink {
  to { opacity: 0; }
}

.dialogue-concept,
.dialogue-reflection {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
  line-height: 1.7;
}

.dialogue-concept span,
.dialogue-reflection span {
  color: var(--muted);
}

.dialogue-basis {
  display: inline-flex;
  margin-top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(17, 100, 102, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.dialogue-synthesis p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.dialogue-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 0 0 8px;
}

.dialogue-followups > span {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dialogue-followups button {
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.dialogue-input {
  position: sticky;
  bottom: 14px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(31, 37, 40, 0.16);
  border-radius: 28px;
  padding: 10px 12px 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 60px rgba(28, 37, 38, 0.12);
  backdrop-filter: blur(18px);
}

html[data-platform="ios"] .dialogue-input {
  bottom: max(14px, env(safe-area-inset-bottom));
}

.dialogue-input-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  justify-content: space-between;
}

.dialogue-input-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.dialogue-input-actions #dialogue-clear {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.dialogue-input-settings {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dialogue-mode-tabs,
.dialogue-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  border: 1px solid rgba(31, 37, 40, 0.12);
  border-radius: 999px;
  padding: 4px;
  background: rgba(247, 246, 240, 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.dialogue-mode-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.dialogue-mode-tabs button.active {
  background: var(--ink);
  color: var(--paper);
}

.dialogue-picker-trigger {
  gap: 8px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.76);
}

.dialogue-picker-trigger:hover {
  background: var(--surface);
}

.dialogue-picker-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--accent);
}

.dialogue-picker-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 25;
  width: min(680px, calc(100vw - 56px));
  max-height: min(520px, 62vh);
  overflow: auto;
  border: 1px solid rgba(31, 37, 40, 0.14);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(28, 37, 38, 0.16);
}

.dialogue-picker-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dialogue-picker-panel-head strong {
  font-size: 14px;
}

.dialogue-picker-panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dialogue-thinker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.dialogue-thinker-grid button {
  justify-content: flex-start;
  min-height: 64px;
  border-color: rgba(31, 37, 40, 0.1);
  padding: 9px 10px;
  background: #fbfaf6;
  text-align: left;
}

.dialogue-thinker-grid button.active {
  border-color: rgba(17, 100, 102, 0.36);
  background: rgba(17, 100, 102, 0.08);
}

.dialogue-thinker-grid button span,
.dialogue-roundtable-picker label span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dialogue-thinker-grid small,
.dialogue-roundtable-picker small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialogue-selected-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 34px;
}

.dialogue-selected-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 9px 4px 5px;
  background: rgba(232, 239, 236, 0.74);
  color: #314046;
  font-size: 13px;
  font-weight: 800;
}

.dialogue-selected-summary .muted {
  padding-left: 10px;
  color: var(--muted);
}

.dialogue-roundtable-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.dialogue-roundtable-panel {
  display: grid;
}

.dialogue-roundtable-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dialogue-roundtable-summary > span:not(.philosopher-avatar) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dialogue-roundtable-picker label {
  min-height: 34px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 12px;
  padding: 9px;
  background: #fbfaf6;
  color: var(--muted);
  cursor: pointer;
}

.dialogue-roundtable-picker label.active {
  border-color: rgba(17, 100, 102, 0.3);
  background: rgba(17, 100, 102, 0.08);
  color: var(--accent);
}

.dialogue-roundtable-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.roundtable-confirm {
  justify-self: end;
  min-height: 38px;
  border-radius: 999px;
  margin-top: 12px;
  padding: 6px 16px;
  font-size: 13px;
}

.dialogue-input textarea {
  width: 100%;
  resize: none;
  min-height: 70px;
  max-height: 160px;
  overflow-y: auto;
  border: 0;
  border-radius: 18px;
  padding: 10px 8px 2px;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
}

.dialogue-input textarea:focus {
  outline: 0;
}

.dialogue-input-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: -2px;
}

.dialogue-input-tools button {
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(232, 239, 236, 0.58);
  color: #4d5a5d;
  font-size: 13px;
  font-weight: 800;
}

.dialogue-input-tools button:hover {
  background: rgba(17, 100, 102, 0.1);
  color: var(--accent);
}

.dialogue-input button[type="submit"] {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 50%;
  padding: 0;
  font-size: 0;
}

.dialogue-input button[type="submit"]::before {
  content: "↑";
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.dialogue-loading,
.dialogue-error {
  border-radius: 16px;
  padding: 12px 14px;
  line-height: 1.7;
}

.dialogue-loading {
  background: var(--soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 2px;
}

.loading-dots {
  animation: loading-blink 1.2s ease-in-out infinite;
}

@keyframes loading-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.dialogue-error {
  background: #fff2ee;
  color: #8b1e12;
}

.dialogue-mobile-toolbar,
.dialogue-session-sheet,
.dialogue-session-backdrop,
.dialogue-toolbar-action {
  display: none;
}

.comparison-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.comparison-question-brief p {
  max-width: 860px;
  color: var(--muted);
  line-height: 1.8;
}

.comparison-mobile-hero {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.comparison-mobile-hero h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.comparison-mobile-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.comparison-tool {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.comparison-picker {
  position: sticky;
  top: 18px;
}

.comparison-picker-list {
  display: grid;
  gap: 8px;
  max-height: 68vh;
  overflow: auto;
  padding-right: 4px;
}

.comparison-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: #fbfaf6;
  cursor: pointer;
}

.comparison-choice.active {
  border-color: rgba(17, 100, 102, 0.38);
  background: rgba(17, 100, 102, 0.08);
}

.comparison-choice input {
  margin-top: 4px;
}

.comparison-choice strong,
.comparison-choice small,
.comparison-choice em {
  display: block;
}

.comparison-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.comparison-choice em {
  margin-top: 7px;
  color: #3f4f53;
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

.comparison-output {
  overflow-x: auto;
}

.comparison-matrix {
  display: grid;
  min-width: min(860px, 100%);
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.comparison-matrix-row {
  display: grid;
  grid-template-columns: 128px repeat(var(--compare-count), minmax(170px, 1fr));
  border-top: 1px solid rgba(31, 37, 40, 0.08);
}

.comparison-matrix-row:first-child {
  border-top: 0;
}

.comparison-matrix-row > span,
.comparison-matrix-row > strong,
.comparison-matrix-row > p {
  margin: 0;
  padding: 13px;
  border-left: 1px solid rgba(31, 37, 40, 0.08);
  line-height: 1.7;
}

.comparison-matrix-row > :first-child {
  border-left: 0;
}

.comparison-matrix-row > span {
  background: #f4f5ef;
  color: var(--accent);
  font-weight: 900;
}

.comparison-matrix-row.header {
  background: #182126;
  color: #f7f6f0;
}

.comparison-matrix-row.header > span,
.comparison-matrix-row.header > strong {
  background: transparent;
  color: inherit;
}

.comparison-summary {
  margin-top: 16px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(17, 100, 102, 0.07);
}

.comparison-summary strong,
.comparison-summary small {
  display: block;
}

.comparison-summary p {
  margin: 8px 0;
  line-height: 1.75;
}

.comparison-summary small {
  color: var(--muted);
  font-weight: 800;
}

.comparison-mobile-cards {
  display: grid;
  gap: 10px;
}

.comparison-mobile-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.comparison-mobile-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.comparison-mobile-card-head strong,
.comparison-mobile-card-head span,
.comparison-mobile-point span,
.comparison-mobile-point p {
  display: block;
}

.comparison-mobile-card-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.comparison-mobile-point {
  border-top: 1px solid rgba(31, 37, 40, 0.08);
  padding-top: 10px;
}

.comparison-mobile-point span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.comparison-mobile-point p {
  margin: 5px 0 0;
  color: #3f4f53;
  line-height: 1.65;
}

.source-note {
  border-left: 3px solid rgba(17, 100, 102, 0.28);
  padding-left: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.source-note strong {
  color: var(--accent);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.44fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-ai-settings {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-unlock {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: center;
  max-width: 820px;
}

.admin-unlock h2 {
  margin-top: 0;
}

.admin-unlock p {
  color: var(--muted);
  line-height: 1.7;
}

.admin-ai-settings h2 {
  margin-top: 0;
}

.admin-ai-settings p {
  color: var(--muted);
  line-height: 1.7;
}

.admin-status {
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--soft);
  color: var(--accent) !important;
  font-weight: 800;
}

.admin-status.error {
  background: #fff2ee;
  color: #8b1e12 !important;
}

.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form .form-actions {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-health {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
}

.health-grid span {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(31, 37, 40, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: #fbfbf7;
  color: var(--muted);
  font-size: 12px;
}

.health-grid strong {
  color: var(--ink);
  font-size: 22px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(31, 37, 40, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.row-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-row strong,
.list-row small {
  display: block;
}

.list-row small {
  margin-top: 3px;
  color: var(--muted);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

/* iOS application layout and touch-first interactions. */
html[data-platform="ios"] body {
  background: #f7f7f5;
  color: #16191c;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

html[data-platform="ios"] [data-ios-only] {
  display: flex;
}

html[data-platform="ios"] .app-header {
  min-height: 50px;
  justify-content: center;
  padding: calc(7px + env(safe-area-inset-top)) 14px 7px;
  border-bottom-color: rgba(60, 60, 67, 0.12);
  background: rgba(247, 247, 245, 0.86);
}

html[data-platform="ios"] .brand {
  gap: 9px;
}

html[data-platform="ios"] .brand-mark {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 9px;
}

html[data-platform="ios"] .brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

html[data-platform="ios"] .brand small,
html[data-platform="ios"] .main-nav {
  display: none;
}

html[data-platform="ios"] .app-shell {
  width: 100%;
  padding: 10px 16px calc(92px + env(safe-area-inset-bottom));
}

html[data-platform="ios"][data-route="dialogue"] .app-header {
  display: none;
}

html[data-platform="ios"][data-route="dialogue"] .app-shell {
  padding-top: calc(58px + env(safe-area-inset-top));
}

html[data-platform="ios"] .section-head {
  align-items: flex-start;
  margin: 10px 0 14px;
}

html[data-platform="ios"] .section-head h1,
html[data-platform="ios"] .section-head h2 {
  font-size: 29px;
  line-height: 1.2;
}

html[data-platform="ios"] .section-head p {
  font-size: 14px;
  line-height: 1.65;
}

.ios-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 45;
  justify-content: space-around;
  gap: 4px;
  height: calc(72px + env(safe-area-inset-bottom));
  padding: 8px 10px max(6px, env(safe-area-inset-bottom));
  border-top: 0.5px solid rgba(60, 60, 67, 0.2);
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(26px) saturate(180%);
  transition: transform 0.18s ease;
}

.ios-tabbar a {
  display: grid;
  min-width: 68px;
  min-height: 50px;
  gap: 3px;
  place-items: center;
  color: #73777b;
}

.ios-nav-icon {
  position: relative;
  display: block;
  width: 25px;
  height: 24px;
  color: currentColor;
}

.ios-tabbar small {
  font-size: 10px;
  font-weight: 600;
}

.ios-tabbar a.active {
  color: #087f7a;
}

.ios-nav-icon.dialogue::before {
  content: "";
  position: absolute;
  inset: 3px 1px 5px;
  border: 2px solid currentColor;
  border-radius: 9px;
}

.ios-nav-icon.dialogue::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 2px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  transform: skewX(-28deg);
}

.ios-nav-icon.star::before,
.ios-nav-icon.star::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.ios-nav-icon.star::before {
  left: 11px;
  top: 1px;
  width: 2px;
  height: 22px;
}

.ios-nav-icon.star::after {
  left: 1px;
  top: 11px;
  width: 22px;
  height: 2px;
  box-shadow: 0 0 0 3px #fafaf8, 0 0 0 5px currentColor;
  border-radius: 2px;
}

.ios-nav-icon.people::before,
.ios-nav-icon.people::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
}

.ios-nav-icon.people::before {
  top: 2px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ios-nav-icon.people::after {
  bottom: 2px;
  left: 4px;
  width: 16px;
  height: 10px;
  border-radius: 12px 12px 7px 7px;
}

.ios-nav-icon.question::before {
  content: "?";
  position: absolute;
  inset: 1px;
  border: 2px solid currentColor;
  border-radius: 50%;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

html[data-platform="ios"] .dialogue-head,
html[data-platform="ios"] .dialogue-sidebar {
  display: none;
}

html[data-platform="ios"] .dialogue-layout {
  display: block;
}

html[data-platform="ios"] .dialogue-mobile-toolbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: calc(54px + env(safe-area-inset-top));
  padding: calc(6px + env(safe-area-inset-top)) 12px 5px;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.16);
  background: rgba(247, 247, 245, 0.9);
  backdrop-filter: blur(24px) saturate(180%);
}

html[data-platform="ios"] .dialogue-toolbar-action {
  position: absolute;
  top: calc(6px + env(safe-area-inset-top));
  display: grid;
  width: 44px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: transparent;
  color: #087f7a;
}

html[data-platform="ios"] .dialogue-toolbar-action:active,
html[data-platform="ios"] .dialogue-mobile-thinker:active {
  background: rgba(60, 60, 67, 0.08);
}

html[data-platform="ios"] .dialogue-toolbar-action.history {
  left: 8px;
}

html[data-platform="ios"] .dialogue-toolbar-action.new {
  right: 8px;
}

html[data-platform="ios"] .dialogue-toolbar-action.history span,
html[data-platform="ios"] .dialogue-toolbar-action.history span::before,
html[data-platform="ios"] .dialogue-toolbar-action.history span::after {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

html[data-platform="ios"] .dialogue-toolbar-action.history span {
  position: relative;
}

html[data-platform="ios"] .dialogue-toolbar-action.history span::before,
html[data-platform="ios"] .dialogue-toolbar-action.history span::after {
  content: "";
  position: absolute;
  left: 0;
}

html[data-platform="ios"] .dialogue-toolbar-action.history span::before {
  top: -7px;
}

html[data-platform="ios"] .dialogue-toolbar-action.history span::after {
  top: 7px;
}

html[data-platform="ios"] .dialogue-toolbar-action.new span {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  border: 1.8px solid currentColor;
  border-radius: 7px;
}

html[data-platform="ios"] .dialogue-toolbar-action.new span::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}

html[data-platform="ios"] .dialogue-mobile-thinker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 116px);
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

html[data-platform="ios"] .dialogue-mobile-thinker small {
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(8, 127, 122, 0.1);
  color: var(--accent);
  font-size: 11px;
}

html[data-platform="ios"] .dialogue-mobile-random {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
}

html[data-platform="ios"] .dialogue-mobile-avatars {
  display: flex;
  align-items: center;
}

html[data-platform="ios"] .dialogue-mobile-avatars .philosopher-avatar + .philosopher-avatar {
  margin-left: -7px;
  border: 1px solid #f7f7f5;
}

html[data-platform="ios"] .dialogue-chat-main {
  min-height: calc(100dvh - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding-bottom: 106px;
}

html[data-platform="ios"] .dialogue-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 8px;
}

html[data-platform="ios"] .dialogue-stream {
  gap: 14px;
  padding: 6px 0 10px;
}

html[data-platform="ios"] .empty-conversation .dialogue-stream {
  min-height: calc(100dvh - 286px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  align-content: center;
}

html[data-platform="ios"] .dialogue-empty {
  min-height: 0;
  padding: 10px 0;
}

html[data-platform="ios"] .dialogue-empty h2 {
  font-size: 30px;
}

html[data-platform="ios"] .dialogue-empty p {
  margin: 10px auto 14px;
  font-size: 14px;
}

html[data-platform="ios"] .dialogue-example-grid {
  gap: 7px;
}

html[data-platform="ios"] .dialogue-example-grid button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
}

html[data-platform="ios"] .dialogue-reply-card {
  padding: 10px 0;
}

html[data-platform="ios"] .dialogue-reply-card p {
  margin: 10px 0;
  font-size: 15px;
}

html[data-platform="ios"] .dialogue-message.assistant .dialogue-input-tools {
  margin: 2px 0 5px;
}

html[data-platform="ios"] .dialogue-message.user p {
  max-width: 88%;
  padding: 10px 13px;
  font-size: 15px;
}

html[data-platform="ios"] .dialogue-input {
  position: fixed;
  right: 10px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  left: 10px;
  z-index: 36;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 44px;
  align-items: end;
  gap: 4px;
  border-color: rgba(60, 60, 67, 0.16);
  border-radius: 25px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 26px rgba(31, 37, 40, 0.09);
}

html[data-platform="ios"] .dialogue-input textarea {
  grid-column: 2;
  grid-row: 1;
  min-height: 44px;
  max-height: 124px;
  padding: 9px 6px 6px;
  font-size: 16px;
  line-height: 1.55;
}

html[data-platform="ios"] .dialogue-input-tools {
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 2px;
  scrollbar-width: none;
}

html[data-platform="ios"] .dialogue-input-tools button {
  flex: 0 0 auto;
  font-size: 12px;
}

html[data-platform="ios"] .dialogue-input-bar {
  display: contents;
}

html[data-platform="ios"] .dialogue-selected-summary {
  display: none;
}

html[data-platform="ios"] .ios-dialogue-settings {
  position: static;
  grid-column: 1;
  grid-row: 1;
}

html[data-platform="ios"] .ios-compose-menu {
  display: grid;
  width: 42px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: #697177;
}

html[data-platform="ios"] .ios-compose-menu span,
html[data-platform="ios"] .ios-compose-menu span::after {
  display: block;
  background: currentColor;
}

html[data-platform="ios"] .ios-compose-menu span {
  position: relative;
  width: 20px;
  height: 2px;
}

html[data-platform="ios"] .ios-compose-menu span::after {
  content: "";
  position: absolute;
  top: -9px;
  left: 9px;
  width: 2px;
  height: 20px;
}

html[data-platform="ios"] .dialogue-input-actions {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
}

html[data-platform="ios"] .dialogue-input-actions #dialogue-clear {
  display: none;
}

html[data-platform="ios"] .dialogue-input button[type="submit"] {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  background: #087f7a;
}

html[data-platform="ios"] .dialogue-input button[type="submit"]:disabled {
  background: #d5dadb;
}

html[data-platform="ios"] .ios-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 54;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.24);
}

html[data-platform="ios"] .ios-picker-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  display: grid;
  gap: 12px;
  max-height: min(78dvh, 650px);
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  background: #f9f9f7;
  box-shadow: 0 -12px 42px rgba(31, 37, 40, 0.18);
  animation: ios-sheet-rise 0.18s ease-out;
}

@keyframes ios-sheet-rise {
  from { transform: translateY(12%); opacity: 0.75; }
  to { transform: translateY(0); opacity: 1; }
}

html[data-platform="ios"] .ios-sheet-handle {
  justify-self: center;
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: #c8c8ca;
}

html[data-platform="ios"] .ios-picker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

html[data-platform="ios"] .ios-picker-title div {
  display: grid;
  gap: 3px;
}

html[data-platform="ios"] .ios-picker-title strong {
  font-size: 19px;
}

html[data-platform="ios"] .ios-picker-title small {
  overflow: hidden;
  max-width: 55%;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-platform="ios"] .ios-picker-title button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: #087f7a;
}

html[data-platform="ios"] .ios-picker-sheet > .dialogue-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 42px;
  border-radius: 10px;
  padding: 2px;
  background: #e8e8e6;
}

html[data-platform="ios"] .ios-picker-sheet > .dialogue-mode-tabs button {
  min-height: 38px;
  border-radius: 8px;
  font-size: 14px;
}

html[data-platform="ios"] .ios-picker-sheet > .dialogue-mode-tabs button.active {
  background: #fff;
  color: #171a1e;
  box-shadow: 0 1px 3px rgba(31, 37, 40, 0.12);
}

html[data-platform="ios"] .ios-picker-sheet .dialogue-picker-panel {
  position: static;
  display: grid;
  width: auto;
  max-height: min(54dvh, 480px);
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

html[data-platform="ios"] .dialogue-session-backdrop {
  position: fixed;
  inset: 0;
  z-index: 54;
  display: block;
  background: rgba(31, 37, 40, 0.22);
}

html[data-platform="ios"] .dialogue-session-sheet {
  position: fixed;
  right: 10px;
  bottom: 0;
  left: 10px;
  z-index: 55;
  display: grid;
  gap: 12px;
  max-height: min(66dvh, 560px);
  border-radius: 22px 22px 0 0;
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  background: #f9f9f7;
  box-shadow: 0 20px 70px rgba(28, 37, 38, 0.2);
}

html[data-platform="ios"] .dialogue-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

html[data-platform="ios"] .dialogue-session-head strong {
  font-size: 17px;
}

html[data-platform="ios"] .dialogue-session-head button {
  min-height: 34px;
  border-radius: 999px;
}

html[data-platform="ios"] .dialogue-session-list {
  display: grid;
  gap: 7px;
  overflow-y: auto;
}

html[data-platform="ios"] .dialogue-session-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 5px;
  border-radius: 12px;
  background: #f7f6f0;
}

html[data-platform="ios"] .dialogue-session-list article.active {
  background: rgba(17, 100, 102, 0.09);
}

html[data-platform="ios"] .dialogue-session-list article > button:first-child {
  display: grid;
  justify-content: stretch;
  gap: 3px;
  min-height: 55px;
  border: 0;
  padding: 9px 12px;
  background: transparent;
  text-align: left;
}

html[data-platform="ios"] .dialogue-session-list strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-platform="ios"] .dialogue-session-list small,
html[data-platform="ios"] .dialogue-session-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

html[data-platform="ios"] .dialogue-session-delete {
  min-height: 34px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

html[data-platform="ios"].ios-keyboard-open .ios-tabbar {
  transform: translateY(100%);
  pointer-events: none;
}

html[data-platform="ios"].ios-keyboard-open .dialogue-input {
  bottom: max(8px, env(safe-area-inset-bottom));
}

html[data-platform="ios"].ios-keyboard-open .dialogue-chat-main {
  padding-bottom: 106px;
}

html[data-platform="ios"] .dialogue-thinker-grid,
html[data-platform="ios"] .dialogue-roundtable-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-platform="ios"] .dialogue-thinker-grid button,
html[data-platform="ios"] .dialogue-roundtable-picker label {
  min-height: 56px;
}

html[data-platform="ios"] .hero {
  display: grid;
  gap: 14px;
  min-height: auto;
  padding: 2px 0 12px;
}

html[data-platform="ios"] .hero-copy h1 {
  font-size: 34px;
  line-height: 1.08;
}

html[data-platform="ios"] .hero-copy p {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

html[data-platform="ios"] .hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

html[data-platform="ios"] .hero-actions .button {
  min-height: 44px;
  border-radius: 999px;
}

html[data-platform="ios"] .hero-panel {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-platform="ios"] .hero-panel::after {
  display: none;
}

html[data-platform="ios"] .hero-stat {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  color: var(--ink);
}

html[data-platform="ios"] .hero-stat div {
  border: 1px solid rgba(31, 37, 40, 0.08);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

html[data-platform="ios"] .hero-stat strong {
  font-size: 22px;
}

html[data-platform="ios"] .hero-stat span {
  color: var(--muted);
}

html[data-platform="ios"] .search-workbench {
  margin-bottom: 18px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

html[data-platform="ios"] .search-workbench .section-head {
  margin-bottom: 8px;
}

html[data-platform="ios"] .search-workbench .section-head p {
  display: none;
}

html[data-platform="ios"] .search-workbench .toolbar {
  margin: 0 0 10px;
}

html[data-platform="ios"] .search-workbench input {
  min-height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

html[data-platform="ios"] .search-results {
  display: grid;
  gap: 8px;
}

html[data-platform="ios"] .search-result {
  border-radius: 10px;
  padding: 12px;
  box-shadow: none;
}

html[data-platform="ios"] .ios-detail-dialogue-action {
  margin-top: 12px;
  border-radius: 999px;
}

html[data-platform="ios"] .philosopher-filter-trigger {
  margin-top: -4px;
}

html[data-platform="ios"] .philosopher-toolbar {
  margin: 0 0 12px;
}

html[data-platform="ios"] .philosopher-toolbar input,
html[data-platform="ios"] .philosopher-toolbar select {
  width: 100%;
}

html[data-platform="ios"] .philosopher-directory-head {
  margin: 8px 2px 10px;
}

html[data-platform="ios"] .philosopher-directory-head span {
  display: none;
}

html[data-platform="ios"] .question-learning-intro {
  margin-bottom: 12px;
  border: 0;
  border-radius: 0;
  padding: 2px 0 4px;
  background: transparent;
}

html[data-platform="ios"] .question-learning-intro h2 {
  font-size: 19px;
}

html[data-platform="ios"] .question-filter-trigger {
  margin-top: 2px;
}

html[data-platform="ios"] .question-toolbar {
  margin: 0 0 12px;
}

html[data-platform="ios"] .question-toolbar input,
html[data-platform="ios"] .question-toolbar select {
  width: 100%;
}

html[data-platform="ios"] .question-directory-head {
  margin: 8px 2px 10px;
}

html[data-platform="ios"] .question-directory-head span {
  display: none;
}

html[data-platform="ios"] .question-directory {
  display: grid;
  gap: 8px;
}

html[data-platform="ios"] .question-card {
  display: grid;
  gap: 8px;
  border-radius: 10px;
  padding: 14px;
  box-shadow: none;
  min-height: 112px;
  -webkit-tap-highlight-color: rgba(14, 85, 87, 0.12);
}

html[data-platform="ios"] .question-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

html[data-platform="ios"] .question-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4a5559;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[data-platform="ios"] .question-mobile-hero {
  margin: -4px -2px 12px;
  border: 0;
  border-radius: 0;
  padding: 46px 2px 14px;
  background: transparent;
}

html[data-platform="ios"] .question-mobile-hero h1 {
  font-size: 28px;
  line-height: 1.25;
}

html[data-platform="ios"] .question-mobile-hero p {
  font-size: 15px;
}

html[data-platform="ios"] .question-hero-kicker {
  margin-left: 38px;
}

html[data-platform="ios"] .comparison-mobile-hero {
  margin: -4px -2px 12px;
  border: 0;
  border-radius: 0;
  padding: 46px 2px 14px;
  background: transparent;
}

html[data-platform="ios"] .comparison-mobile-hero h1 {
  font-size: 27px;
  line-height: 1.25;
}

html[data-platform="ios"] .comparison-mobile-hero p {
  font-size: 15px;
}

html[data-platform="ios"] .comparison-mobile-hero .question-hero-kicker {
  margin-left: 38px;
}

html[data-platform="ios"] .comparison-toolbar {
  margin: 0 0 12px;
}

html[data-platform="ios"] .comparison-toolbar select {
  width: 100%;
  min-width: 0;
}

html[data-platform="ios"] .comparison-question-brief.ios-compact-brief {
  margin-bottom: 12px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

html[data-platform="ios"] .comparison-question-brief.ios-compact-brief h2,
html[data-platform="ios"] .comparison-question-brief.ios-compact-brief p {
  display: none;
}

html[data-platform="ios"] .compare-guide {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin-top: 0;
  padding-bottom: 4px;
}

html[data-platform="ios"] .compare-guide span {
  flex: 0 0 min(78vw, 320px);
}

html[data-platform="ios"] .comparison-picker-trigger {
  margin: 0 0 10px;
}

html[data-platform="ios"] .comparison-tool {
  display: block;
}

html[data-platform="ios"] .comparison-picker {
  position: static;
  margin-bottom: 12px;
}

html[data-platform="ios"] .comparison-picker-list {
  max-height: min(44dvh, 360px);
  overflow: auto;
  padding-right: 0;
}

html[data-platform="ios"] .comparison-choice {
  min-height: 62px;
  border-radius: 10px;
  padding: 10px;
}

html[data-platform="ios"] .comparison-choice em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[data-platform="ios"] .comparison-output {
  overflow-x: visible;
}

html[data-platform="ios"] .comparison-mobile-card {
  border-radius: 10px;
  padding: 13px;
  box-shadow: none;
}

html[data-platform="ios"] .comparison-summary {
  margin-top: 12px;
  border-left-width: 0;
  border-radius: 10px;
  padding: 13px;
}

html[data-platform="ios"] .philosopher-directory {
  display: grid;
  gap: 8px;
}

html[data-platform="ios"] .philosopher-card {
  display: grid;
  gap: 8px;
  border-radius: 10px;
  padding: 12px;
  box-shadow: none;
  min-height: 128px;
  -webkit-tap-highlight-color: rgba(14, 85, 87, 0.12);
}

html[data-platform="ios"] .philosopher-card-head {
  align-items: center;
}

html[data-platform="ios"] .philosopher-card-head .philosopher-avatar {
  width: 46px;
  height: 46px;
}

html[data-platform="ios"] .philosopher-card h3 {
  font-size: 17px;
}

html[data-platform="ios"] .philosopher-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4a5559;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[data-platform="ios"] .philosopher-card .meta {
  gap: 6px;
}

html[data-platform="ios"] .philosopher-card .tag {
  font-size: 11px;
}

html[data-platform="ios"] .philosopher-mobile-hero {
  grid-template-columns: auto minmax(0, 1fr);
  margin: -4px -2px 12px;
  border: 0;
  border-radius: 0;
  padding: 8px 2px 14px;
  background: transparent;
}

html[data-platform="ios"] .philosopher-mobile-hero .philosopher-avatar {
  width: 72px;
  height: 72px;
}

html[data-platform="ios"] .philosopher-mobile-hero h1 {
  font-size: 28px;
}

html[data-platform="ios"] .philosopher-mobile-hero p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

html[data-platform="ios"] .ios-back-link {
  position: absolute;
  top: 4px;
  left: -2px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(31, 37, 40, 0.06);
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
}

html[data-platform="ios"] .philosopher-mobile-hero > .philosopher-avatar {
  margin-left: 36px;
}

html[data-platform="ios"] .ios-detail-actions {
  position: sticky;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 14;
  grid-column: 1 / -1;
  padding-top: 2px;
}

html[data-platform="ios"] .ios-detail-actions .button {
  flex: 1;
  justify-content: center;
  margin-top: 0;
  min-height: 44px;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(31, 37, 40, 0.12);
}

html[data-platform="ios"] .detail-layout {
  display: block;
}

html[data-platform="ios"] .side-panel {
  margin-bottom: 12px;
  padding: 14px;
}

html[data-platform="ios"] .side-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

html[data-platform="ios"] .side-panel dt,
html[data-platform="ios"] .side-panel dd {
  margin: 0;
}

html[data-platform="ios"] .side-panel dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

html[data-platform="ios"] .side-panel dd {
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(31, 37, 40, 0.06);
  color: var(--ink);
  font-size: 13px;
}

html[data-platform="ios"] .content-block {
  margin-bottom: 12px;
  padding: 15px;
}

html[data-platform="ios"] .question-learning-grid section {
  padding: 12px;
}

html[data-platform="ios"] .question-confusions div {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

html[data-platform="ios"] .question-confusions span {
  flex: 0 0 auto;
  max-width: 82vw;
}

html[data-platform="ios"] .development-line {
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 8px;
  overflow-x: visible;
  padding: 2px 0;
}

html[data-platform="ios"] .development-step {
  min-height: auto;
  padding: 12px;
}

html[data-platform="ios"] .development-step::before {
  float: left;
  margin: 3px 10px 18px 0;
}

html[data-platform="ios"] .question-learning-grid {
  grid-template-columns: 1fr;
}

html[data-platform="ios"] .grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

html[data-platform="ios"] .card {
  padding: 14px;
}

html[data-platform="ios"] .tappable-card:active,
html[data-platform="ios"] .viewpoint-philosopher-link:active,
html[data-platform="ios"] .development-step:active,
html[data-platform="ios"] .comparison-item:active {
  background: rgba(14, 85, 87, 0.08);
}

html[data-platform="ios"] .viewpoint-card {
  display: grid;
  gap: 8px;
}

html[data-platform="ios"] .viewpoint-philosopher-link {
  min-height: 44px;
  border: 1px solid rgba(14, 85, 87, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(14, 85, 87, 0.05);
  color: var(--ink);
  line-height: 1.6;
}

html[data-platform="ios"] .toolbar {
  margin: 12px 0 16px;
}

.ios-filter-trigger {
  display: none;
}

html[data-platform="ios"] .ios-filter-trigger {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin: 0 0 12px;
  border-color: rgba(31, 37, 40, 0.1);
  background: var(--surface);
  font-weight: 800;
}

html[data-platform="ios"] .ios-filter-trigger span {
  color: var(--accent);
  font-size: 13px;
}

html[data-platform="ios"] .timeline-toolbar.ios-filter-panel,
html[data-platform="ios"] .timeline-range-bar.ios-filter-panel {
  display: none;
}

html[data-platform="ios"] .timeline-toolbar.ios-filter-panel.open,
html[data-platform="ios"] .timeline-range-bar.ios-filter-panel.open {
  display: flex;
}

html[data-platform="ios"] .timeline-toolbar {
  border-radius: 12px 12px 0 0;
  margin: 0;
  padding: 12px;
  background: #fff;
}

html[data-platform="ios"] .timeline-toolbar input,
html[data-platform="ios"] .timeline-toolbar select {
  width: 100%;
}

html[data-platform="ios"] .timeline-toolbar .segmented-control {
  width: 100%;
  grid-template-columns: repeat(2, 1fr);
}

html[data-platform="ios"] .timeline-range-bar {
  margin: 0 0 12px;
  border-radius: 0 0 12px 12px;
  padding: 0 12px 12px;
  background: #fff;
}

html[data-platform="ios"] .timeline-range-bar .compact-field {
  width: calc(50% - 5px);
}

html[data-platform="ios"] .star-timeline-head {
  display: none;
}

html[data-platform="ios"] .star-map,
html[data-platform="ios"] .star-map.explore-overview,
html[data-platform="ios"] .star-map.explore-middle,
html[data-platform="ios"] .star-map.explore-close {
  height: calc(100dvh - 250px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  min-height: 520px;
  overflow: auto;
  border-radius: 12px;
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html[data-platform="ios"] .star-canvas,
html[data-platform="ios"] .star-map.explore-middle .star-canvas,
html[data-platform="ios"] .star-map.explore-close .star-canvas {
  width: max(1120px, 190vw);
  min-width: max(1120px, 190vw);
  height: 520px;
  min-height: 520px;
}

html[data-platform="ios"] .star-map.explore-overview .star-canvas {
  width: 100%;
  min-width: 100%;
  height: 520px;
  min-height: 520px;
}

html[data-platform="ios"] .star-map.explore-overview .node-label-svg {
  font-size: 10px;
  stroke-width: 3.8px;
}

html[data-platform="ios"] .star-map.explore-overview .track-label {
  color: rgba(247, 246, 240, 0.72);
  font-size: 11px;
}

html[data-platform="ios"] .star-map.explore-overview .track-line {
  background: linear-gradient(90deg, rgba(247, 246, 240, 0.04), rgba(247, 246, 240, 0.22), rgba(247, 246, 240, 0.06));
}

html[data-platform="ios"] .era-bands,
html[data-platform="ios"] .star-canvas::before {
  inset: 34px 30px 26px 92px;
}

html[data-platform="ios"] .year-ruler span::before {
  height: 430px;
}

html[data-platform="ios"] .star-track {
  top: calc(42px + var(--track-index) * 64px);
  height: 56px;
}

html[data-platform="ios"] .track-label {
  top: 17px;
}

html[data-platform="ios"] .track-line {
  top: 28px;
}

html[data-platform="ios"] .star-map-overlay {
  top: 8px;
  width: calc(100% - 16px);
  gap: 6px;
  margin: 8px;
}

html[data-platform="ios"] .map-hint {
  max-width: 192px;
  padding: 6px 9px;
}

html[data-platform="ios"] .star-map-tools {
  max-width: 138px;
  justify-content: flex-end;
}

html[data-platform="ios"] .timeline-region-rail {
  position: sticky;
  top: 54px;
  left: 0;
  z-index: 13;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  width: 100%;
  padding: 0 10px 8px;
  scrollbar-width: none;
  pointer-events: auto;
}

html[data-platform="ios"] .timeline-region-rail::-webkit-scrollbar {
  display: none;
}

html[data-platform="ios"] .timeline-region-rail button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(8, 12, 14, 0.66);
  color: rgba(247, 246, 240, 0.86);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

html[data-platform="ios"] .timeline-region-rail button.active {
  border-color: rgba(213, 185, 66, 0.42);
  background: rgba(213, 185, 66, 0.2);
}

html[data-platform="ios"] .timeline-region-rail button:disabled {
  opacity: 0.42;
}

html[data-platform="ios"] .timeline-region-rail b {
  color: rgba(247, 246, 240, 0.58);
  font-size: 11px;
}

html[data-platform="ios"] .timeline-path-selector {
  top: 98px;
  padding: 0 10px 7px;
}

html[data-platform="ios"] .timeline-path-trigger {
  max-width: calc(100vw - 20px);
  min-height: 34px;
}

html[data-platform="ios"] .timeline-path-menu {
  grid-template-columns: 1fr;
  max-height: min(38dvh, 310px);
}

html[data-platform="ios"] .timeline-path-menu button {
  min-height: 56px;
  border-radius: 10px;
}

html[data-platform="ios"] .ghost-control {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}

html[data-platform="ios"] .relation-legend {
  display: none;
}

html[data-platform="ios"] .timeline-mobile-navigator {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 0;
  z-index: 18;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  margin-top: -74px;
  padding: 0 12px;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

html[data-platform="ios"] .star-map.sheet-open .timeline-mobile-navigator {
  opacity: 0 !important;
  transform: translateY(12px);
  pointer-events: none;
}

html[data-platform="ios"] .timeline-nav-toggle {
  display: inline-grid;
  min-width: 74px;
  min-height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(8, 12, 14, 0.76);
  color: rgba(247, 246, 240, 0.94);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

html[data-platform="ios"] .timeline-mobile-navigator .timeline-minimap {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  display: block;
  width: auto;
  height: 68px;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom center;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

html[data-platform="ios"] .timeline-mobile-navigator.open {
  justify-content: flex-start;
  margin-top: -96px;
}

html[data-platform="ios"] .timeline-mobile-navigator.open .timeline-nav-toggle {
  position: relative;
  z-index: 2;
  min-width: 84px;
  background: rgba(213, 185, 66, 0.22);
}

html[data-platform="ios"] .timeline-mobile-navigator.open .timeline-minimap {
  opacity: 1 !important;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

html[data-platform="ios"] .d3-relation {
  stroke-width: 1.8;
  opacity: 0.22;
}

html[data-platform="ios"] .d3-relation.active {
  stroke-width: 3.6;
  opacity: 1;
}

html[data-platform="ios"] .d3-star-node .node-core-svg {
  stroke-width: 2.4;
}

html[data-platform="ios"] .d3-star-node .node-portrait-bg {
  filter: drop-shadow(0 0 16px currentColor);
}

html[data-platform="ios"] .d3-star-node.selected .node-core-svg {
  stroke-width: 4;
}

html[data-platform="ios"] .node-label-svg {
  font-size: 12px;
  stroke-width: 4.5px;
}

html[data-platform="ios"] .star-hover-card {
  position: fixed;
  right: 10px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  left: 10px !important;
  top: auto !important;
  width: auto;
  max-width: none;
  border-radius: 18px;
  padding: 15px;
  transform: translateY(18px);
  max-height: min(42dvh, 360px);
  overflow: auto;
  overscroll-behavior: contain;
}

html[data-platform="ios"] .star-hover-card.visible {
  transform: translateY(0);
}

.star-sheet-handle {
  display: none;
}

html[data-platform="ios"] .star-sheet-handle {
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(247, 246, 240, 0.28);
}

.star-sheet-close {
  display: none;
}

html[data-platform="ios"] .star-sheet-close {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 50%;
  padding: 0;
  background: rgba(247, 246, 240, 0.12);
  color: #f7f6f0;
  font-size: 20px;
}

html[data-platform="ios"] .star-hover-card strong {
  padding-right: 36px;
}

.star-sheet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.star-sheet-actions a,
.star-sheet-actions button {
  width: fit-content;
  margin-top: 0;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(213, 185, 66, 0.16);
  color: rgba(247, 246, 240, 0.92);
  font-size: 12px;
  font-weight: 900;
}

html[data-platform="ios"] .star-sheet-actions a,
html[data-platform="ios"] .star-sheet-actions button {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  align-items: center;
}

.star-sheet-relations {
  display: none;
}

html[data-platform="ios"] .star-sheet-relations {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

html[data-platform="ios"] .star-sheet-relations button {
  min-height: 32px;
  border: 1px solid rgba(213, 185, 66, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(213, 185, 66, 0.1);
  color: rgba(247, 246, 240, 0.92);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero,
  .detail-layout,
  .dialogue-layout,
  .admin-ai-settings,
  .admin-unlock,
  .admin-layout,
  .star-timeline-shell,
  .admin-health {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    min-height: 360px;
  }

  .timeline::before {
    left: 18px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 46px;
  }

  .timeline-year {
    text-align: left;
  }

  .timeline-content::before {
    left: -34px;
  }

  .star-timeline-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .legend {
    justify-content: flex-start;
  }

  .star-map,
  .timeline-inspector {
    min-height: 560px;
  }

  .star-track {
    top: calc(84px + var(--track-index) * 108px);
  }

  .inspector-card {
    position: static;
  }

  .dialogue-sidebar {
    position: static;
  }

  .dialogue-main {
    min-height: auto;
  }

  .dialogue-stream {
    max-height: none;
  }

  .dialogue-example-grid,
  .dialogue-input,
  .dialogue-compose-head,
  .compact-form,
  .question-learning-grid,
  .comparison-tool {
    grid-template-columns: 1fr;
  }

  .comparison-picker {
    position: static;
  }

  .comparison-picker-list {
    max-height: none;
  }

  .comparison-matrix-row {
    grid-template-columns: 110px repeat(var(--compare-count), minmax(180px, 1fr));
  }

  .dialogue-message.user p {
    max-width: 100%;
  }

  .health-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chronology-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
