:root {
  color-scheme: dark;
  --ink: #f8f3e9;
  --muted: rgba(248, 243, 233, 0.72);
  --soft: rgba(248, 243, 233, 0.12);
  --line: rgba(255, 255, 255, 0.22);
  --glass: rgba(255, 255, 255, 0.13);
  --coffee: #352012;
  --amber: #d8aa63;
  --sage: #7fa58b;
  --rose: #c98984;
  --teal: #74b9b7;
  --shadow: rgba(15, 10, 7, 0.44);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, #18110e 0%, #201714 46%, #111819 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

#steam {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.62;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(20, 14, 12, 0.58);
  backdrop-filter: blur(22px) saturate(145%);
}

.brand,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand {
  min-height: 2.75rem;
  font-weight: 700;
}

.brand-mark {
  width: 2.1rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, transparent 0.48rem, var(--amber) 0.5rem, transparent 0.56rem),
    radial-gradient(circle at 44% 58%, rgba(83, 48, 24, 0.9), transparent 0.58rem),
    rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.25);
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-header nav a:hover {
  color: var(--ink);
}

main {
  overflow: clip;
}

.hero,
.method-section,
.symbols-section,
.search-hero,
.seo-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.search-hero {
  padding: clamp(1.7rem, 4vw, 3.2rem) 0 4rem;
}

.search-intro {
  max-width: 50rem;
  margin-bottom: 1.15rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(1.4rem, 5vw, 5rem);
  min-height: calc(100svh - 4.5rem);
  padding: 4rem 0 3rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0;
}

h1 {
  max-width: 16ch;
  font-size: clamp(2.45rem, 5vw, 4.6rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(2.1rem, 4vw, 4.5rem);
  line-height: 0.95;
}

.hero-text {
  max-width: 42rem;
  margin: 0.95rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 700;
}

.button.primary {
  background: var(--ink);
  color: #201611;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 80px var(--shadow), inset 0 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(26px) saturate(150%);
}

.glass-panel::before,
.library-dock::before,
.symbol-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 32%),
    linear-gradient(315deg, rgba(116, 185, 183, 0.14), transparent 42%);
  opacity: 0.55;
}

.hero-stage {
  position: relative;
  min-height: 31rem;
  padding: clamp(0.8rem, 2vw, 1.2rem);
  overflow: hidden;
}

.hero-cup {
  position: absolute;
  inset: 1rem;
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
  object-fit: cover;
  border-radius: var(--radius);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 900ms ease, transform 1500ms ease;
}

.hero-cup.active {
  opacity: 1;
  transform: scale(1);
}

.orbital-card {
  position: absolute;
  right: 1.6rem;
  bottom: 1.6rem;
  width: min(19rem, calc(100% - 3.2rem));
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(20, 12, 8, 0.46);
  backdrop-filter: blur(18px) saturate(150%);
}

.orbital-card span {
  display: block;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14rem;
}

.orbital-card strong {
  display: block;
  margin-top: 0.55rem;
  line-height: 1.35;
}

.method-section,
.symbols-section {
  padding: 4.5rem 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.method-grid article,
.symbol-card,
.feature-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(130%);
}

.method-grid article {
  position: relative;
  min-height: 18rem;
  padding: 1rem;
  overflow: hidden;
}

.method-grid span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 2.2rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: rgba(216, 170, 99, 0.18);
  color: var(--amber);
  font-weight: 800;
}

.method-art {
  display: block;
  width: 100%;
  aspect-ratio: 1.36;
  margin: 0.7rem 0 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(10, 7, 5, 0.24), inset 0 1px rgba(255, 255, 255, 0.2);
}

.method-grid h3 {
  font-size: 1.35rem;
}

.method-grid p,
footer p {
  color: var(--muted);
  line-height: 1.55;
}

.symbols-heading {
  align-items: center;
}

.library-dock {
  position: sticky;
  top: 4.2rem;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) auto auto;
  gap: 0.9rem;
  align-items: end;
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(28, 20, 16, 0.68);
  box-shadow: 0 18px 54px rgba(8, 6, 5, 0.36), inset 0 1px rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(28px) saturate(170%);
}

.library-dock,
.glass-panel,
.symbol-card {
  position: relative;
  overflow: hidden;
}

.search-box {
  display: grid;
  gap: 0.4rem;
  width: 100%;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 3.35rem;
  padding: 0 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font: inherit;
  backdrop-filter: blur(12px);
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-control,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.toggle-control {
  gap: 0.45rem;
}

.toggle-control input {
  width: 1rem;
  aspect-ratio: 1;
  accent-color: var(--amber);
}

.library-stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.15rem 0.5rem;
  align-items: baseline;
  min-width: 10rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
}

.library-stats strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.search-box input:focus {
  border-color: rgba(216, 170, 99, 0.82);
}

.search-box input::placeholder {
  color: rgba(248, 243, 233, 0.5);
}

.featured-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.category-filter button {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
  min-height: 2.4rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.075);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.category-filter span {
  color: rgba(248, 243, 233, 0.5);
  font-size: 0.74rem;
}

.category-filter button.active,
.category-filter button:hover {
  border-color: rgba(116, 185, 183, 0.52);
  background: rgba(116, 185, 183, 0.16);
  color: var(--ink);
}

.feature-card {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  min-height: 6.5rem;
  padding: 0.7rem;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.feature-card img {
  grid-row: 1 / span 2;
  width: 5.2rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.feature-card span {
  grid-column: 2;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12rem;
}

.feature-card strong {
  grid-column: 2;
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  line-height: 1.25;
}

.letter-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-bottom: 1.1rem;
}

.letter-filter button {
  min-width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.letter-filter button.active,
.letter-filter button:hover {
  background: rgba(216, 170, 99, 0.23);
  color: var(--ink);
}

.symbol-layout {
  display: grid;
  grid-template-columns: 28rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.library-results {
  min-width: 0;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.result-toolbar p,
.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.button.small {
  min-height: 2.35rem;
  padding: 0 0.75rem;
  font-size: 0.82rem;
}

.reading-panel {
  position: sticky;
  top: 5.5rem;
  padding: 1rem;
}

.cup-preview {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

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

.cup-image {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}

.cup-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.cup-image.detail,
.cup-image.detail img {
  height: 100%;
}

.cup-image.detail img {
  min-height: 100%;
}

.cup-image .photo-fallback {
  display: none;
}

.cup-image.missing img {
  display: none;
}

.cup-image.missing .photo-fallback {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(20, 14, 12, 0.32);
  color: var(--muted);
  text-align: center;
}

.photo-fallback strong {
  display: block;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.photo-fallback small {
  display: block;
  max-width: 12rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.reading-panel h3 {
  font-size: 2.15rem;
  overflow-wrap: anywhere;
}

.reading-panel p:last-child,
.reading-hint {
  color: var(--muted);
  line-height: 1.62;
}

.reading-hint {
  margin: 0.65rem 0 1rem;
  padding: 0.78rem;
  border: 1px solid rgba(216, 170, 99, 0.28);
  border-radius: var(--radius);
  background: rgba(216, 170, 99, 0.1);
  font-size: 0.92rem;
}

.example-set {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.cup-thumb {
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
}

.cup-thumb:hover,
.cup-thumb.active {
  border-color: rgba(216, 170, 99, 0.72);
}

.photo-note {
  margin: 0;
  padding: 0.78rem;
  border: 1px solid rgba(116, 185, 183, 0.26);
  border-radius: var(--radius);
  background: rgba(116, 185, 183, 0.1);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.example-cup {
  margin: 0;
}

.example-cup svg {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
}

.example-cup figcaption {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0.6rem;
}

.symbol-card {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 0.15rem 0.8rem;
  min-height: 8.5rem;
  padding: 0.7rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card-link,
.full-meaning-link {
  margin-top: 0.75rem;
}

.card-link {
  display: inline-flex;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.symbol-card > * {
  position: relative;
  z-index: 1;
}

.symbol-card:hover,
.symbol-card.active {
  border-color: rgba(216, 170, 99, 0.62);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.mini-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.32rem;
  margin-bottom: 0.75rem;
}

.cup-image.card {
  grid-row: 1 / span 3;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.08);
}

.cup-image.card,
.cup-image.card img,
.cup-image.card .photo-fallback {
  width: 4.6rem;
  height: 4.6rem;
  aspect-ratio: 1;
}

.cup-image.card .photo-fallback {
  padding: 0;
}

.cup-image.card .photo-fallback .mini-examples {
  margin-bottom: 0;
}

.mini-examples svg {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
}

.symbol-card strong {
  display: block;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.symbol-card em {
  display: block;
  margin-top: 0.18rem;
  color: var(--amber);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.symbol-card p {
  display: -webkit-box;
  margin: 0.38rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.symbol-card .card-link {
  align-self: end;
}

.cup-image.card .photo-fallback strong {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.62rem;
  line-height: 1.15;
}

.cup-image.card .photo-fallback small {
  display: none;
}

.browser-page {
  display: grid;
  grid-template-columns: minmax(14rem, 16rem) minmax(0, 1fr);
  gap: 1rem;
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.symbol-sidebar {
  position: sticky;
  top: 5rem;
  align-self: start;
  height: calc(100svh - 6rem);
  min-height: 32rem;
  padding: 0.75rem;
}

.sidebar-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0.25rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-head .eyebrow {
  margin: 0;
}

.sidebar-head strong {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.symbol-list {
  display: grid;
  gap: 0.35rem;
  height: calc(100% - 3.2rem);
  margin-top: 0.6rem;
  padding-right: 0.25rem;
  overflow: auto;
  overscroll-behavior: contain;
}

.symbol-list-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-height: 3rem;
  padding: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.symbol-list-item img {
  width: 2.4rem;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.symbol-list-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.symbol-list-item:hover,
.symbol-list-item.active {
  border-color: rgba(216, 170, 99, 0.42);
  background: rgba(216, 170, 99, 0.13);
  color: var(--ink);
}

.image-browser {
  min-width: 0;
}

.browser-heading {
  display: grid;
  gap: 0.5rem;
  max-width: 52rem;
  margin: 0 0 1rem;
}

.browser-heading .eyebrow,
.browser-heading .hero-text {
  margin: 0;
}

.browser-heading h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.browser-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
  gap: 1rem;
  align-items: start;
}

.main-cup {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  padding: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.main-cup img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: contain;
  background: rgba(17, 12, 10, 0.62);
}

.viewer-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 2.75rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(20, 14, 12, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.viewer-arrow:hover {
  border-color: rgba(216, 170, 99, 0.62);
  background: rgba(216, 170, 99, 0.18);
}

.viewer-arrow.prev {
  left: 1.2rem;
}

.viewer-arrow.next {
  right: 1.2rem;
}

.symbol-detail-card {
  position: sticky;
  top: 5rem;
  padding: 1rem;
}

.symbol-position {
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.symbol-detail-card h2 {
  margin-top: 0.35rem;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.symbol-detail-card > p {
  color: var(--muted);
  line-height: 1.58;
}

.variant-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0;
}

.variant-thumb {
  display: grid;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.variant-thumb img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
}

.variant-thumb.active,
.variant-thumb:hover {
  border-color: rgba(116, 185, 183, 0.58);
  color: var(--ink);
}

.seo-section {
  padding: 0 0 4rem;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.seo-grid article {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.seo-grid h3 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
}

.seo-grid p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.symbol-page main {
  overflow: visible;
}

.symbol-detail {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.breadcrumb {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.breadcrumb a,
.sources-section a {
  color: var(--amber);
}

.symbol-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(1.4rem, 5vw, 4rem);
  align-items: center;
  padding: 2rem 0 4rem;
}

.symbol-hero h1 {
  max-width: 16ch;
  font-size: clamp(2.55rem, 5.4vw, 5rem);
  line-height: 0.94;
}

.symbol-photo {
  margin: 0;
  padding: 1rem;
}

.symbol-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
}

.symbol-photo figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.symbol-variants {
  margin-bottom: 3rem;
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.variant-grid figure {
  margin: 0;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.variant-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
}

.variant-grid figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 2rem;
  align-items: start;
}

.article-prose {
  max-width: 46rem;
}

.article-prose p,
.sources-section p {
  color: rgba(248, 243, 233, 0.82);
  font-size: 1.02rem;
  line-height: 1.86;
}

.article-prose p:first-child {
  margin-top: 0;
}

.detail-aside {
  position: sticky;
  top: 5.5rem;
  display: grid;
  gap: 1rem;
}

.detail-card,
.sources-section,
.related-symbol {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.detail-card,
.sources-section {
  padding: 1rem;
}

.detail-card h2,
.sources-section h2 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
}

.detail-card ul,
.sources-section ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.62;
}

.position-section,
.related-section,
.sources-section {
  margin-top: 3rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.related-symbol {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
}

.related-symbol strong {
  color: var(--ink);
}

.related-symbol span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--amber);
  font-weight: 800;
}

.seo-index {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.seo-index h1 {
  max-width: 14ch;
  margin: 1.2rem 0;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
}

.seo-index > p {
  max-width: 48rem;
  color: var(--muted);
  line-height: 1.7;
}

.seo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.seo-list article {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.seo-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--ci-line, var(--line));
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.68);
  color: var(--ci-ink, var(--ink));
  font-weight: 800;
}

.language-switcher a.active {
  border-color: var(--ci-accent, var(--amber));
  background: var(--ci-accent, var(--amber));
  color: #fffaf2;
}

body[data-theme="dark"] .language-switcher a {
  background: rgba(39, 27, 21, 0.84);
}

body[dir="rtl"] .site-header,
body[dir="rtl"] .section-heading,
body[dir="rtl"] .hero-actions,
body[dir="rtl"] .language-switcher {
  direction: rtl;
}

body[dir="rtl"] .symbol-hero,
body[dir="rtl"] .detail-grid {
  direction: rtl;
}

.seo-list h2 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
}

.seo-list p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .hero,
  .symbol-layout,
  .browser-page,
  .browser-stage,
  .symbol-hero,
  .detail-grid,
  .seo-grid {
    grid-template-columns: 1fr;
  }

  .symbol-sidebar,
  .symbol-detail-card {
    position: relative;
    top: auto;
  }

  .symbol-sidebar {
    height: auto;
    min-height: 0;
  }

  .symbol-list {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    max-height: 18rem;
  }

  .hero {
    min-height: 0;
  }

  .hero-stage {
    min-height: 26rem;
  }

  .method-grid,
  .featured-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-dock {
    position: relative;
    top: auto;
    grid-template-columns: 1fr;
  }

  .reading-panel {
    position: relative;
    top: auto;
  }

  .detail-aside {
    position: static;
  }

  .variant-grid {
    grid-template-columns: 1fr;
  }
}

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

  .hero,
  .method-section,
  .symbols-section,
  .search-hero,
  .browser-page,
  .seo-section {
    width: min(100% - 1rem, 1180px);
  }

  .hero {
    padding-top: 2rem;
  }

  .search-hero {
    padding-top: 1.4rem;
  }

  .hero-stage {
    min-height: 21rem;
  }

  .section-heading,
  .symbols-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .method-grid,
  .featured-strip {
    grid-template-columns: 1fr;
  }

  .dock-actions,
  .result-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toggle-control,
  .icon-button,
  .result-toolbar .button {
    width: 100%;
  }

  .method-grid article {
    min-height: 10rem;
  }

  .feature-card {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .feature-card img {
    width: 4.5rem;
  }

  .browser-page {
    padding-top: 0.6rem;
  }

  .browser-heading h1 {
    font-size: 2.35rem;
  }

  .main-cup {
    min-height: 0;
    padding: 0.5rem;
  }

  .main-cup img {
    max-height: none;
  }

  .viewer-arrow {
    width: 2.35rem;
    font-size: 1.65rem;
  }

  .variant-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .variant-thumb span {
    display: none;
  }
}

/* Coffee Insights app shell */
:root {
  color-scheme: light;
  --ci-bg: #fbf6ee;
  --ci-panel: rgba(255, 252, 246, 0.86);
  --ci-panel-strong: #fffaf2;
  --ci-ink: #2d1609;
  --ci-muted: #6f5140;
  --ci-line: #ead9c5;
  --ci-accent: #6f3209;
  --ci-accent-2: #9d5c25;
  --ci-shadow: 0 18px 48px rgba(91, 51, 20, 0.11);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 8%, rgba(222, 178, 116, 0.22), transparent 24rem),
    radial-gradient(circle at 18% 92%, rgba(160, 100, 45, 0.12), transparent 24rem),
    var(--ci-bg);
  color: var(--ci-ink);
}

body[data-theme="dark"] {
  --ci-bg: #17100c;
  --ci-panel: rgba(39, 27, 21, 0.9);
  --ci-panel-strong: #241813;
  --ci-ink: #fff7ec;
  --ci-muted: #cdb7a4;
  --ci-line: rgba(255, 244, 229, 0.18);
  --ci-accent: #d79a57;
  --ci-accent-2: #f0bd7a;
  --ci-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at 72% 8%, rgba(215, 154, 87, 0.16), transparent 24rem),
    radial-gradient(circle at 18% 92%, rgba(116, 185, 183, 0.1), transparent 24rem),
    var(--ci-bg);
}

body::before,
#steam,
.site-header,
body > footer {
  display: none;
}

.insights-app {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.54);
}

body[data-theme="dark"] .insights-app {
  background: rgba(24, 16, 12, 0.78);
}

.insights-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  min-width: 0;
  min-height: 100vh;
  padding: 1.8rem 1.15rem;
  border-right: 1px solid var(--ci-line);
  background: rgba(255, 250, 242, 0.72);
}

body[data-theme="dark"] .insights-sidebar {
  background: rgba(29, 20, 15, 0.86);
}

.insights-logo {
  display: grid;
  grid-template-columns: 3.7rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.2rem 0.9rem 1rem;
  color: var(--ci-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  line-height: 0.95;
  text-transform: uppercase;
}

.insights-logo span:last-child {
  min-width: 0;
}

.logo-cup {
  position: relative;
  width: 3.2rem;
  height: 2.4rem;
  border: 0.32rem solid var(--ci-accent);
  border-top: 0;
  border-radius: 0 0 1rem 1rem;
}

.logo-cup::before {
  position: absolute;
  right: -1.1rem;
  top: 0.35rem;
  width: 0.9rem;
  height: 0.9rem;
  content: "";
  border: 0.25rem solid var(--ci-accent);
  border-left: 0;
  border-radius: 0 50% 50% 0;
}

.logo-cup::after {
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  bottom: -0.75rem;
  height: 0.22rem;
  content: "";
  border-radius: 999px;
  background: var(--ci-accent);
  box-shadow: 0 -3.05rem 0 -0.03rem var(--ci-accent);
}

.category-menu {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.category-scroll-shell {
  position: relative;
  min-width: 0;
}

.category-scroll-button {
  display: none;
}

.category-item,
.help-button,
.icon-control,
.favorites-control,
.favorite-heart,
.nav-button,
.cup-variation,
.share-button,
.add-favorite-button,
.rail-card,
.carousel-arrow,
.open-meaning-button {
  font: inherit;
}

.category-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 3.2rem;
  padding: 0 0.9rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ci-ink);
  cursor: pointer;
  text-align: left;
}

.category-icon {
  display: grid;
  width: 1.6rem;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ci-accent-2);
  font-size: 1.25rem;
}

.category-item span:nth-child(2) {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-item strong {
  color: var(--ci-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.category-item:hover,
.category-item.active {
  border-color: rgba(111, 50, 9, 0.18);
  background: var(--ci-accent);
  color: #fffaf2;
  box-shadow: 0 12px 28px rgba(111, 50, 9, 0.18);
}

body[data-theme="dark"] .category-item:hover,
body[data-theme="dark"] .category-item.active {
  color: #1b100b;
}

body[data-theme="dark"] .category-item:hover .category-icon,
body[data-theme="dark"] .category-item.active .category-icon,
body[data-theme="dark"] .category-item:hover strong,
body[data-theme="dark"] .category-item.active strong {
  color: #1b100b;
}

.category-item:hover .category-icon,
.category-item.active .category-icon,
.category-item:hover strong,
.category-item.active strong {
  color: #fffaf2;
}

.help-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 4rem;
  margin-top: auto;
  padding: 0 1rem;
  border: 1px solid var(--ci-line);
  border-radius: 10px;
  background: rgba(255, 250, 242, 0.72);
  color: var(--ci-ink);
  cursor: pointer;
}

body[data-theme="dark"] .help-button,
body[data-theme="dark"] .insights-search,
body[data-theme="dark"] .language-select-control,
body[data-theme="dark"] .icon-control,
body[data-theme="dark"] .favorites-control,
body[data-theme="dark"] .nav-button,
body[data-theme="dark"] .share-button,
body[data-theme="dark"] .rail-card {
  background: rgba(39, 27, 21, 0.84);
}

.help-button > span:first-child {
  flex: 0 0 auto;
  display: grid;
  width: 1.55rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--ci-accent-2);
  border-radius: 50%;
  color: var(--ci-accent);
  font-weight: 700;
}

.help-button [data-i18n="help"] {
  min-width: 0;
  overflow-wrap: anywhere;
}

.insights-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 100vh;
  padding: 1.8rem 1rem 1.4rem;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.2rem;
  padding: 0 0.35rem;
}

.insights-search {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: min(28rem, 100%);
  height: 3.4rem;
  padding: 0 1rem;
  border: 1px solid var(--ci-line);
  border-radius: 10px;
  background: rgba(255, 252, 246, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.7);
}

.insights-search span {
  color: var(--ci-ink);
  font-size: 1.45rem;
}

.insights-search input {
  width: 100%;
  height: 100%;
  min-height: 2.75rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ci-ink);
  font: inherit;
}

.insights-search input::placeholder {
  color: #7d5d49;
}

.top-actions,
.symbol-nav,
.action-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.language-select-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  min-height: 3rem;
  border: 1px solid var(--ci-line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.76);
  color: var(--ci-ink);
  cursor: pointer;
}

.language-select-control select {
  width: 100%;
  min-height: 3rem;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  text-align: center;
  text-align-last: center;
  appearance: none;
}

.language-select-control:focus-within {
  border-color: rgba(215, 154, 87, 0.72);
  box-shadow: 0 0 0 3px rgba(215, 154, 87, 0.13);
}

.icon-control,
.favorites-control,
.nav-button,
.share-button,
.add-favorite-button,
.open-meaning-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1rem;
  border: 1px solid var(--ci-line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.76);
  color: var(--ci-ink);
  cursor: pointer;
  text-decoration: none;
}

.nav-button.available,
.carousel-arrow.available {
  border-color: rgba(111, 50, 9, 0.45);
  background: rgba(111, 50, 9, 0.1);
  color: var(--ci-accent);
  box-shadow: 0 8px 22px rgba(111, 50, 9, 0.12);
}

.nav-button.available:hover,
.carousel-arrow.available:hover,
.nav-button.flash,
.carousel-arrow.flash {
  border-color: var(--ci-accent);
  background: var(--ci-accent);
  color: #fffaf2;
}

.nav-button:disabled,
.carousel-arrow:disabled {
  cursor: default;
  opacity: 0.42;
}

.icon-control {
  width: 3.1rem;
  padding: 0;
  font-size: 1.35rem;
}

.icon-control.active {
  border-color: rgba(215, 154, 87, 0.72);
  background: rgba(215, 154, 87, 0.2);
  color: #8a430d;
  box-shadow: 0 0 0 3px rgba(215, 154, 87, 0.13), 0 12px 28px rgba(111, 50, 9, 0.18);
}

body[data-theme="dark"] .icon-control.active {
  border-color: rgba(240, 189, 122, 0.86);
  background: rgba(240, 189, 122, 0.22);
  color: #ffd68f;
  box-shadow: 0 0 0 3px rgba(240, 189, 122, 0.14), 0 0 28px rgba(240, 189, 122, 0.22);
}

.favorites-control,
.add-favorite-button {
  gap: 0.55rem;
}

.favorites-control.active {
  border-color: var(--ci-accent);
  background: var(--ci-accent);
  color: #fffaf2;
  box-shadow: 0 0 0 3px rgba(111, 50, 9, 0.12), 0 12px 28px rgba(111, 50, 9, 0.18);
}

.favorites-control.active span {
  color: #fffaf2;
}

body[data-theme="dark"] .favorites-control.active {
  border-color: rgba(240, 189, 122, 0.86);
  background: rgba(240, 189, 122, 0.22);
  color: #ffd68f;
  box-shadow: 0 0 0 3px rgba(240, 189, 122, 0.14), 0 0 28px rgba(240, 189, 122, 0.22);
}

body[data-theme="dark"] .favorites-control.active span {
  color: #ffd68f;
}

.symbol-viewer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--ci-line);
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.72);
  box-shadow: var(--ci-shadow);
}

body[data-theme="dark"] .symbol-viewer,
body[data-theme="dark"] .meaning-card,
body[data-theme="dark"] .tip-card,
body[data-theme="dark"] .guide-cards article,
body[data-theme="dark"] .method-steps article,
body[data-theme="dark"] .reading-workflow-callout {
  background: rgba(39, 27, 21, 0.82);
}

.symbol-viewer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  min-height: 7.6rem;
  padding: 1.35rem 2.2rem;
  border-bottom: 1px solid var(--ci-line);
}

.symbol-viewer-head h1 {
  max-width: none;
  color: var(--ci-ink);
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  line-height: 1;
}

.symbol-viewer-head p {
  margin: 0.55rem 0 0;
  color: var(--ci-ink);
}

.favorite-heart {
  display: grid;
  width: 3rem;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ci-accent);
  cursor: pointer;
  font-size: 2.2rem;
}

.favorite-heart.active {
  color: #8d3608;
}

.symbol-nav {
  color: var(--ci-ink);
}

.symbol-nav > span {
  min-width: 5.5rem;
  text-align: center;
}

.viewer-content {
  display: grid;
  grid-template-columns: minmax(22rem, 0.82fr) minmax(24rem, 1fr);
  min-height: 0;
}

.primary-column,
.variants-column {
  min-width: 0;
  padding: 1.5rem 1.65rem 1.1rem;
}

.primary-column {
  border-right: 1px solid var(--ci-line);
}

.primary-column h2,
.variants-column h2 {
  margin: 0 0 0.85rem;
  color: var(--ci-ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.hero-cup-card {
  margin: 0;
}

.hero-cup-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.14;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(83, 43, 16, 0.14);
}

.meaning-card,
.tip-card {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--ci-line);
  border-radius: 10px;
  background: rgba(255, 250, 242, 0.78);
}

.meaning-card > span,
.tip-card > span {
  color: var(--ci-accent-2);
  font-size: 1.45rem;
}

.meaning-card h3,
.tip-card h3 {
  margin: 0 0 0.35rem;
  color: var(--ci-ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
}

.meaning-card p,
.tip-card p {
  margin: 0;
  color: var(--ci-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

body[data-theme="dark"] .hero-cup-card img,
body[data-theme="dark"] .cup-variation img,
body[data-theme="dark"] .rail-card img {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.cup-variations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.cup-variation {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}

.cup-variation img {
  display: block;
  width: 100%;
  aspect-ratio: 0.74;
  border-radius: 10px;
  object-fit: cover;
}

.cup-variation > span {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1;
  display: grid;
  width: 1.65rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 250, 242, 0.86);
  color: var(--ci-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.cup-variation.active,
.cup-variation:hover {
  border-color: var(--ci-accent);
}

.tip-card {
  margin-top: 1.8rem;
}

.action-row {
  margin-top: 1.35rem;
  flex-wrap: wrap;
}

.share-button,
.add-favorite-button,
.open-meaning-button {
  min-width: 12rem;
  font-weight: 700;
}

.add-favorite-button,
.open-meaning-button {
  border-color: var(--ci-accent);
  background: var(--ci-accent);
  color: #fffaf2;
}

body[data-theme="dark"] .add-favorite-button,
body[data-theme="dark"] .open-meaning-button,
body[data-theme="dark"] .nav-button.available:hover,
body[data-theme="dark"] .carousel-arrow.available:hover,
body[data-theme="dark"] .nav-button.flash,
body[data-theme="dark"] .carousel-arrow.flash {
  color: #1b100b;
}

.add-favorite-button.active {
  background: #8d3608;
}

.symbol-carousel {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 1.4rem;
  border-top: 1px solid var(--ci-line);
}

.carousel-arrow {
  display: grid;
  width: 2.7rem;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ci-accent);
  cursor: pointer;
  font-size: 2.1rem;
}

.symbol-rail {
  display: flex;
  gap: 0.8rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.symbol-rail::-webkit-scrollbar {
  display: none;
}

.rail-card {
  flex: 0 0 8.4rem;
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid var(--ci-line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.68);
  color: var(--ci-ink);
  cursor: pointer;
}

.rail-card img {
  width: 100%;
  aspect-ratio: 1.45;
  border-radius: 7px;
  object-fit: cover;
}

.rail-card span {
  overflow: hidden;
  font-size: 0.86rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-card.active {
  border-color: var(--ci-accent);
  box-shadow: inset 0 0 0 1px var(--ci-accent);
}

@media (max-width: 1120px) {
  .insights-app {
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .insights-sidebar {
    gap: 0.9rem;
    min-height: 0;
    padding-bottom: 0.85rem;
    border-right: 0;
    border-bottom: 1px solid var(--ci-line);
  }

  .insights-logo {
    padding-bottom: 0.15rem;
  }

  .category-menu {
    display: flex;
    gap: 0.55rem;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0 3.1rem 0.5rem 0;
    scroll-padding-inline: 0.2rem 3.2rem;
    scrollbar-color: rgba(157, 92, 37, 0.72) rgba(157, 92, 37, 0.14);
    scrollbar-width: thin;
  }

  .category-menu::-webkit-scrollbar {
    height: 0.35rem;
  }

  .category-menu::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(157, 92, 37, 0.14);
  }

  .category-menu::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(157, 92, 37, 0.72);
  }

  .category-scroll-shell::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0.5rem;
    width: 4.2rem;
    content: "";
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 250, 242, 0), rgba(255, 250, 242, 0.96) 62%);
  }

  body[data-theme="dark"] .category-scroll-shell::after {
    background: linear-gradient(90deg, rgba(29, 20, 15, 0), rgba(29, 20, 15, 0.96) 62%);
  }

  .category-scroll-button {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    z-index: 2;
    display: grid;
    width: 2.75rem;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(111, 50, 9, 0.28);
    border-radius: 50%;
    background: var(--ci-accent);
    color: #fffaf2;
    cursor: pointer;
    font: inherit;
    font-size: 1.7rem;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(111, 50, 9, 0.22);
    transform: translateY(calc(-50% - 0.25rem));
  }

  .category-scroll-button.at-end {
    transform: translateY(calc(-50% - 0.25rem)) rotate(180deg);
  }

  .category-scroll-button[hidden] {
    display: none;
  }

  .category-item {
    flex: 0 0 13.5rem;
  }

  .help-button {
    min-height: 3.2rem;
    margin-top: 0;
  }

  .viewer-content,
  .symbol-viewer-head {
    grid-template-columns: 1fr;
  }

  .primary-column {
    border-right: 0;
    border-bottom: 1px solid var(--ci-line);
  }
}

@media (max-width: 720px) {
  .insights-main,
  .insights-sidebar {
    padding: 1rem 0.75rem;
  }

  .top-bar,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .symbol-nav {
    justify-content: space-between;
  }

  .top-actions,
  .insights-search {
    width: 100%;
  }

  .symbol-viewer {
    display: flex;
    flex-direction: column;
  }

  .symbol-viewer-head,
  .primary-column,
  .variants-column {
    padding: 1rem;
  }

  .symbol-viewer-head {
    order: 2;
  }

  .symbol-carousel {
    order: 1;
    border-top: 0;
    border-bottom: 1px solid var(--ci-line);
  }

  .viewer-content {
    order: 3;
  }

  .rail-card {
    flex-basis: 6.7rem;
    padding: 0.45rem;
  }

  .rail-card img {
    aspect-ratio: 1.15;
  }

  .cup-variations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .cup-variation img {
    aspect-ratio: 0.82;
  }

  .hero-cup-card img {
    aspect-ratio: 1;
    object-fit: contain;
    background: #221209;
  }

  .symbol-carousel {
    grid-template-columns: 2rem minmax(0, 1fr) 2rem;
    padding-inline: 0.65rem;
  }
}

/* Readable article pages */
body.symbol-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, rgba(222, 178, 116, 0.18), transparent 24rem),
    var(--ci-bg);
  color: var(--ci-ink);
}

body.guide-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, rgba(222, 178, 116, 0.18), transparent 24rem),
    var(--ci-bg);
  color: var(--ci-ink);
}

body.guide-page .site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  border-bottom: 1px solid var(--ci-line);
  background: rgba(255, 250, 242, 0.86);
  color: var(--ci-ink);
  box-shadow: 0 10px 28px rgba(91, 51, 20, 0.08);
}

body[data-theme="dark"].guide-page .site-header,
body[data-theme="dark"].symbol-page .site-header {
  background: rgba(24, 16, 12, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

body.guide-page .site-header nav a,
body.guide-page .breadcrumb {
  color: var(--ci-muted);
}

body.guide-page .breadcrumb a,
body.symbol-page .breadcrumb a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

body.guide-page .site-header nav a:hover,
body.guide-page .breadcrumb a {
  color: var(--ci-accent);
}

body.guide-page .brand-mark {
  border-color: rgba(111, 50, 9, 0.28);
  background:
    radial-gradient(circle at 50% 42%, transparent 0.48rem, var(--ci-accent-2) 0.5rem, transparent 0.56rem),
    radial-gradient(circle at 44% 58%, rgba(111, 50, 9, 0.78), transparent 0.58rem),
    rgba(111, 50, 9, 0.08);
}

body[data-theme="dark"].guide-page .brand-mark,
body[data-theme="dark"].symbol-page .brand-mark {
  border-color: rgba(240, 189, 122, 0.42);
  background:
    radial-gradient(circle at 50% 42%, transparent 0.48rem, var(--ci-accent-2) 0.5rem, transparent 0.56rem),
    radial-gradient(circle at 44% 58%, rgba(240, 189, 122, 0.74), transparent 0.58rem),
    rgba(240, 189, 122, 0.12);
}

.guide-detail {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.guide-hero {
  max-width: 58rem;
  padding: 2rem 0 3rem;
}

.guide-hero h1 {
  max-width: 13ch;
  color: var(--ci-ink);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
}

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

.guide-grid {
  margin-top: 2.5rem;
}

.guide-cards,
.method-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.method-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-cards article,
.method-steps article,
.reading-workflow-callout {
  border: 1px solid var(--ci-line);
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.84);
  box-shadow: 0 16px 38px rgba(91, 51, 20, 0.08);
}

.guide-cards article,
.method-steps article {
  padding: 1.15rem;
}

.guide-cards span {
  display: grid;
  width: 2rem;
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: 0.9rem;
  border-radius: 8px;
  background: var(--ci-accent);
  color: #fffaf2;
  font-weight: 800;
}

.guide-cards h3,
.method-steps h3,
.reading-workflow-callout h2 {
  color: var(--ci-ink);
  font-family: Inter, system-ui, sans-serif;
}

.guide-cards h3,
.method-steps h3 {
  font-size: 1.08rem;
}

.guide-cards p,
.method-steps p,
.reading-workflow-callout p {
  color: var(--ci-muted);
  line-height: 1.6;
}

.reading-workflow-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding: 1.4rem;
}

.reading-workflow-callout h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.reading-workflow-callout p {
  max-width: 48rem;
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .guide-cards,
  .method-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.guide-page .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-detail {
    width: min(100% - 1rem, 1180px);
    padding-top: 1rem;
  }

  .guide-cards,
  .method-steps {
    grid-template-columns: 1fr;
  }

  .reading-workflow-callout {
    align-items: stretch;
    flex-direction: column;
  }
}

body.symbol-page .site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  border-bottom: 1px solid var(--ci-line);
  background: rgba(255, 250, 242, 0.86);
  color: var(--ci-ink);
  box-shadow: 0 10px 28px rgba(91, 51, 20, 0.08);
}

body.symbol-page .brand-mark {
  border-color: rgba(111, 50, 9, 0.28);
  background:
    radial-gradient(circle at 50% 42%, transparent 0.48rem, var(--ci-accent-2) 0.5rem, transparent 0.56rem),
    radial-gradient(circle at 44% 58%, rgba(111, 50, 9, 0.78), transparent 0.58rem),
    rgba(111, 50, 9, 0.08);
}

body.symbol-page .site-header nav a {
  color: var(--ci-muted);
}

body.symbol-page .site-header nav a:hover,
body.symbol-page .breadcrumb a,
body.symbol-page .sources-section a,
body.symbol-page footer a {
  color: var(--ci-accent);
}

body.symbol-page main {
  overflow: visible;
}

body.symbol-page .symbol-detail {
  color: var(--ci-ink);
}

body.symbol-page .breadcrumb,
body.symbol-page .hero-text,
body.symbol-page .symbol-photo figcaption,
body.symbol-page .variant-grid figcaption,
body.symbol-page .detail-card ul,
body.symbol-page .sources-section ul,
body.symbol-page .related-symbol span,
body.symbol-page footer p {
  color: var(--ci-muted);
}

body.symbol-page .eyebrow {
  color: var(--ci-accent-2);
}

body.symbol-page h1,
body.symbol-page h2,
body.symbol-page h3,
body.symbol-page .related-symbol strong {
  color: var(--ci-ink);
}

body.symbol-page .button.primary {
  border-color: var(--ci-accent);
  background: var(--ci-accent);
  color: #fffaf2;
}

body.symbol-page .button.secondary {
  border-color: var(--ci-line);
  background: rgba(255, 250, 242, 0.78);
  color: var(--ci-ink);
}

body.symbol-page .glass-panel,
body.symbol-page .variant-grid figure,
body.symbol-page .detail-card,
body.symbol-page .sources-section,
body.symbol-page .related-symbol,
body.symbol-page .seo-grid article {
  border: 1px solid var(--ci-line);
  background: rgba(255, 252, 246, 0.82);
  box-shadow: 0 16px 38px rgba(91, 51, 20, 0.08);
  backdrop-filter: none;
}

body.symbol-page .glass-panel::before,
body.symbol-page .symbol-card::before,
body.symbol-page .library-dock::before {
  display: none;
}

body.symbol-page .article-prose {
  max-width: 48rem;
}

body.symbol-page .article-prose p,
body.symbol-page .sources-section p {
  color: #3f281b;
  font-size: 1.04rem;
  line-height: 1.82;
}

body[data-theme="dark"].symbol-page .article-prose p,
body[data-theme="dark"].symbol-page .sources-section p {
  color: #ead9c5;
}

body.symbol-page .detail-card h2,
body.symbol-page .sources-section h2 {
  color: var(--ci-ink);
}

body.symbol-page .detail-card li + li,
body.symbol-page .sources-section li + li {
  margin-top: 0.5rem;
}

body.symbol-page .seo-grid p {
  color: var(--ci-muted);
}

body.symbol-page footer {
  display: block;
  color: var(--ci-muted);
}

body[data-theme="dark"].symbol-page,
body[data-theme="dark"].guide-page {
  background:
    radial-gradient(circle at 78% 8%, rgba(215, 154, 87, 0.16), transparent 24rem),
    var(--ci-bg);
}

body[data-theme="dark"].symbol-page .glass-panel,
body[data-theme="dark"].symbol-page .variant-grid figure,
body[data-theme="dark"].symbol-page .detail-card,
body[data-theme="dark"].symbol-page .sources-section,
body[data-theme="dark"].symbol-page .related-symbol,
body[data-theme="dark"].symbol-page .seo-grid article,
body[data-theme="dark"].guide-page .guide-cards article,
body[data-theme="dark"].guide-page .method-steps article,
body[data-theme="dark"].guide-page .reading-workflow-callout {
  background: rgba(39, 27, 21, 0.82);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

@media (max-width: 640px) {
  body.symbol-page .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.symbol-page .symbol-detail {
    width: min(100% - 1rem, 1180px);
    padding-top: 1rem;
  }

  body.symbol-page .symbol-hero {
    padding-top: 1rem;
  }
}
