:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --primary-pale: #ede9fe;
  --primary-ghost: #f5f3ff;
  --accent: #d4a010;
  --midnight: #0f0a1e;
  --midnight-lighter: #2d2250;
  --bg: #faf8ff;
  --surface: #ffffff;
  --border: #e5e0f0;
  --border-light: #f0ecf8;
  --text: #1a1035;
  --text-muted: #5a5272;
  --text-light: #8a82a0;
  --font-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: Cinzel, Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1100px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-lg: 0 8px 30px rgba(15, 10, 30, 0.12);
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.7;
}

html[lang='ko'] body {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[lang='ko'] .reading-hero h1,
html[lang='ko'] .panel-heading h2,
html[lang='ko'] .reading-guide h2,
html[lang='ko'] .results-header h2,
html[lang='ko'] .dropzone-empty strong,
html[lang='ko'] .result-summary h3,
html[lang='ko'] .result-card h3 {
  font-family: var(--font-body);
  letter-spacing: -0.025em;
}

body:has(.home-hero) {
  background: var(--midnight);
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  background: var(--midnight);
  backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #f0d060;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color var(--transition);
}

.site-logo:hover {
  color: var(--accent);
}

.logo-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px rgba(240, 208, 96, 0.4));
}

.header-nav {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transform: translateX(-50%);
}

.header-nav a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color var(--transition);
}

.header-nav a:hover {
  color: #f0d060;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
  white-space: nowrap;
}

.language-switcher a {
  font-size: inherit;
}

.language-switcher a[aria-current='page'] {
  color: #f0d060;
}

.search-bar {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: var(--radius-full);
  background: var(--midnight-lighter);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-bar input {
  min-width: 0;
  flex: 1;
  width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.search-bar button {
  border: 0;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  transition: background var(--transition);
}

.search-bar button:hover {
  background: var(--primary-dark);
}

.page-content {
  padding-bottom: 4rem;
}

.page-content:has(.home-hero) {
  padding-bottom: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 4rem 1.5rem;
  background: var(--midnight);
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(124, 58, 237, 0.22),
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 50%,
      rgba(212, 160, 16, 0.15),
      transparent 50%
    ),
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.12), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      1px 1px at 20px 30px,
      rgba(255, 255, 255, 0.3),
      transparent
    ),
    radial-gradient(
      1px 1px at 40px 70px,
      rgba(255, 255, 255, 0.2),
      transparent
    ),
    radial-gradient(
      1px 1px at 50px 160px,
      rgba(255, 255, 255, 0.25),
      transparent
    ),
    radial-gradient(
      1px 1px at 90px 40px,
      rgba(255, 255, 255, 0.3),
      transparent
    ),
    radial-gradient(
      1px 1px at 130px 80px,
      rgba(255, 255, 255, 0.15),
      transparent
    ),
    radial-gradient(
      1.5px 1.5px at 160px 120px,
      rgba(240, 208, 96, 0.4),
      transparent
    ),
    radial-gradient(
      1px 1px at 200px 50px,
      rgba(255, 255, 255, 0.2),
      transparent
    ),
    radial-gradient(
      1px 1px at 250px 140px,
      rgba(255, 255, 255, 0.25),
      transparent
    ),
    radial-gradient(
      1.5px 1.5px at 300px 30px,
      rgba(240, 208, 96, 0.3),
      transparent
    ),
    radial-gradient(
      1px 1px at 350px 90px,
      rgba(255, 255, 255, 0.2),
      transparent
    );
  background-size: 400px 200px;
  animation: twinkle 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes twinkle {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.hero-icon {
  margin-bottom: 1.5rem;
  font-size: 3rem;
  filter: drop-shadow(0 0 12px rgba(240, 208, 96, 0.5));
}

.hero h1 {
  margin: 0 0 1.5rem;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero h1 span {
  background: linear-gradient(135deg, #f0d060, var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}

.section-header h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.section-header p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.post-card {
  display: flex;
  overflow: hidden;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.post-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--midnight), var(--midnight-lighter));
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-placeholder {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at 30% 40%,
      rgba(124, 58, 237, 0.25),
      transparent 45%
    ),
    radial-gradient(
      circle at 70% 60%,
      rgba(212, 160, 16, 0.16),
      transparent 45%
    ),
    linear-gradient(135deg, var(--midnight), var(--midnight-lighter));
  font-size: 3rem;
}

.post-card-badge,
.article-category {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.post-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.post-card-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 0.6rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  flex: 1;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-light);
  font-size: 0.78rem;
}

.post-card-steps {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.pagination a {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}

.pagination a:hover {
  border-color: var(--primary-light);
  background: var(--primary-ghost);
  color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  color: #ffffff;
}

.pagination .ellipsis {
  color: var(--text-light);
}

.pagination .prev,
.pagination .next {
  font-weight: 700;
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.back-link:hover {
  color: var(--primary-dark);
}

.article-category {
  margin-bottom: 1rem;
  padding: 0.5rem 0.8rem;
}

.article-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-excerpt {
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.article-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 2rem;
  border-radius: var(--radius-lg);
  object-fit: cover;
  object-position: center top;
}

.photo-credit {
  color: var(--text-muted);
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.hero-photo-credit {
  margin: -1.5rem 0 2rem;
}

.prose {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.75;
}

.prose h1,
.prose h2 {
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
  font-family: var(--font-display);
  line-height: 1.25;
}

.prose h3 {
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 0 0 1.25rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose blockquote {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--primary-ghost);
  color: var(--text-muted);
  font-style: italic;
}

.prose img {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius-md);
}

.prose code {
  padding: 0.15em 0.35em;
  border-radius: 6px;
  background: var(--primary-pale);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--midnight);
}

.prose pre code {
  padding: 0;
  background: transparent;
  color: #e2e8f0;
}

.empty-state {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
  color: var(--text-muted);
}

/* Free face reading tool */

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.reading-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 1.5rem 5.5rem;
  background:
    radial-gradient(
      circle at 18% 40%,
      rgba(124, 58, 237, 0.3),
      transparent 35%
    ),
    radial-gradient(
      circle at 85% 25%,
      rgba(212, 160, 16, 0.16),
      transparent 32%
    ),
    var(--midnight);
  text-align: center;
}

.reading-hero::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 35% 70%, rgba(240, 208, 96, 0.4), transparent),
    radial-gradient(1px 1px at 65% 20%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 88% 65%, rgba(255, 255, 255, 0.35), transparent);
  background-size: 320px 180px;
  content: '';
  pointer-events: none;
}

.reading-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.reading-eyebrow {
  display: block;
  margin-bottom: 0.8rem;
  color: #e9cb62;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reading-hero h1 {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 6vw, 4.25rem);
  line-height: 1.08;
}

.reading-hero p {
  max-width: 650px;
  margin: 1.25rem auto 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.1rem;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: var(--radius-full);
  background: rgba(45, 34, 80, 0.7);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
}

.reading-tool {
  max-width: var(--max-width);
  margin: -2.5rem auto 0;
  padding: 0 1.5rem 4rem;
}

.reading-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.8fr);
  gap: 1.5rem;
  align-items: start;
}

.reading-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.reading-input-panel {
  padding: clamp(1.25rem, 4vw, 2rem);
}

.panel-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.panel-heading > div {
  min-width: 0;
}

.step-number {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  font-weight: 800;
}

.panel-heading h2,
.reading-guide h2,
.results-header h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.25;
}

.panel-heading p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.photo-dropzone {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  border: 2px dashed #cfc5e5;
  border-radius: var(--radius-lg);
  outline: 0;
  background: var(--primary-ghost);
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.photo-dropzone:hover,
.photo-dropzone:focus-visible,
.photo-dropzone.is-dragging {
  border-color: var(--primary);
  background: var(--primary-pale);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.dropzone-empty {
  display: flex;
  min-height: 326px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  text-align: center;
}

.dropzone-icon {
  display: flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), var(--midnight-lighter));
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
  color: #f0d060;
  font-size: 1.8rem;
}

.dropzone-empty strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.dropzone-empty > span:not(.choose-photo-button) {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.choose-photo-button {
  margin: 1.15rem 0 0.75rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 750;
}

.dropzone-empty small {
  color: var(--text-light);
}

.photo-preview-wrap {
  position: relative;
  min-height: 326px;
  background: var(--midnight);
}

.photo-preview-wrap img {
  width: 100%;
  height: min(58vh, 520px);
  min-height: 326px;
  object-fit: contain;
}

#landmark-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.replace-photo-button {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  background: rgba(15, 10, 30, 0.8);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.photo-guidance {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.photo-guidance span::first-letter {
  color: var(--primary);
}

.reading-alert {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid #f1b8b8;
  border-radius: var(--radius-md);
  background: #fff4f4;
  color: #8b2525;
  font-size: 0.9rem;
}

.analyze-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.22);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.analyze-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.3);
}

.analyze-button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.48;
}

.button-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: reading-spin 0.8s linear infinite;
}

.analyze-button.is-loading .button-loader {
  display: block;
}

@keyframes reading-spin {
  to {
    transform: rotate(360deg);
  }
}

.privacy-note {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 1rem 0 0;
  color: var(--text-light);
  font-size: 0.76rem;
  line-height: 1.5;
}

.reading-guide {
  padding: 1.5rem;
}

.reading-guide h2 {
  font-size: 1.18rem;
}

.tip-list {
  margin-top: 1.35rem;
}

.tip-item {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-light);
}

.tip-item > span {
  display: flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-ghost);
  color: var(--primary);
}

.tip-item strong {
  font-size: 0.9rem;
}

.tip-item p {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.offline-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: #f7f5fb;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 160, 16, 0.14);
}

.offline-status.is-ready .status-dot {
  background: #299e63;
  box-shadow: 0 0 0 3px rgba(41, 158, 99, 0.14);
}

.reading-results {
  margin-top: 2rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.results-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.results-header .reading-eyebrow {
  color: var(--primary);
}

.print-reading-button,
.start-over-button {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  padding: 0.65rem 1rem;
}

.result-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 1px solid #ded3f2;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(212, 160, 16, 0.07)),
    #ffffff;
}

.summary-symbol {
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--midnight);
  color: #f0d060;
  font-family: var(--font-display);
  font-size: 1.65rem;
}

.summary-label {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-summary h3 {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.result-summary p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.result-card {
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.result-card-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.result-card-icon {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-ghost);
  color: var(--primary);
}

.result-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
}

.result-card .feature-reading {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.feature-observation {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--primary-ghost);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 750;
}

.results-disclaimer {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: #fffbec;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.results-disclaimer strong {
  color: var(--text);
}

.results-disclaimer p {
  margin: 0.25rem 0 0;
}

.start-over-button {
  display: block;
  margin: 1.5rem auto 0;
}

.javascript-required {
  max-width: var(--max-width);
  margin: 1rem auto;
  padding: 1rem 1.5rem;
  color: #8b2525;
  text-align: center;
}

.site-footer {
  border-top: 1px solid rgba(124, 58, 237, 0.3);
  background: var(--midnight);
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  margin-bottom: 1rem;
  color: #f0d060;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-desc {
  max-width: 520px;
  margin: 0 auto 1.5rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #f0d060;
}

.footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reading-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .reading-guide {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }

  .header-nav {
    position: static;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    transform: none;
  }

  .language-switcher {
    padding-left: 0.75rem;
  }

  .search-bar input {
    width: 100%;
  }

  .search-bar {
    width: 100%;
  }

  .search-bar button {
    flex: 0 0 auto;
  }

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

  .reading-hero {
    padding: 3.25rem 1rem 4.5rem;
  }

  .reading-tool {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .privacy-pill {
    max-width: 100%;
    align-items: flex-start;
    border-radius: var(--radius-md);
    text-align: left;
  }

  .photo-dropzone,
  .dropzone-empty,
  .photo-preview-wrap,
  .photo-preview-wrap img {
    min-height: 280px;
  }

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

  .results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .reading-hero,
  .reading-workspace,
  .print-reading-button,
  .start-over-button {
    display: none !important;
  }

  .page-content,
  .reading-tool {
    margin: 0;
    padding: 0;
  }

  .reading-results {
    display: block !important;
    border: 0;
    box-shadow: none;
  }
}

/* Compact image footnotes: hover/focus previews, click/tap keeps them open. */
.article .image-note {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: -1.4rem 0 2rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.image-note summary {
  cursor: pointer;
  color: var(--primary);
  list-style: none;
  padding: 0.25rem 0.4rem;
}
.image-note summary::-webkit-details-marker { display: none; }
.image-note summary:focus-visible { outline: 2px solid var(--primary); border-radius: 4px; }
.article .image-note .image-note-content {
  display: none;
  position: absolute;
  z-index: 10;
  left: 0;
  bottom: 100%;
  width: min(34rem, calc(100vw - 4rem));
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 14px #160c3226;
  overflow-wrap: anywhere;
}
.article .image-note[open] .image-note-content,
.article .image-note:focus-within .image-note-content,
.article .image-note:hover .image-note-content { display: block; }
.article .image-note .image-note-content p { margin: 0; font-size: inherit; }
.article .image-note .image-note-content p + p { margin-top: 0.6rem; }
@media print {
  .article .image-note .image-note-content { display: block; position: static; box-shadow: none; }
}
.image-note:hover::details-content,
.image-note:focus-within::details-content {
  content-visibility: visible;
}

.article-summary {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e4dbfa;
  border-left: 4px solid #7c3aed;
  border-radius: 12px;
  background: #f5f0ff;
  color: #21173b;
}

.article-summary h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.article-summary ul {
  margin: 0;
  padding-left: 1.3rem;
}

.article-summary li {
  padding-left: 0.2rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.article-summary li + li {
  margin-top: 0.4rem;
}

/* Browser-language suggestion, above the navigation on every supported page. */
.language-banner { background: #282332; color: #fff; }
.language-banner-inner { max-width: 1200px; margin: auto; padding: 16px 24px; display: flex; align-items: center; gap: 24px; }
.language-banner p { flex: 1; margin: 0; font-size: 14px; line-height: 1.6; }
.language-banner form { display: flex; align-items: center; gap: 12px; }
.language-banner select { min-width: 180px; background: #443c50; color: #fff; border: 1px solid #766986; border-radius: 8px; padding: 10px 14px; font: inherit; }
.language-banner button { border: 0; border-radius: 8px; background: #fff; color: #221b30; padding: 11px 20px; font: inherit; cursor: pointer; white-space: nowrap; }
.language-banner-dismiss { color: #ddd; text-decoration: none; font-size: 28px; display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.language-banner :is(a, button, select):focus-visible { outline: 3px solid #d8b4fe; outline-offset: 3px; }
@media (max-width: 640px) {
  .language-banner-inner { display: grid; grid-template-columns: 1fr 44px; gap: 12px; padding: 12px 16px; }
  .language-banner p { grid-column: 1; }
  .language-banner form { grid-row: 2; grid-column: 1 / -1; }
  .language-banner select { min-width: 0; flex: 1; }
  .language-banner-dismiss { grid-row: 1; grid-column: 2; }
}
.language-banner .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
