/* Homeric Odyssey Crash Course — styles */
:root {
  --ink: #1a1f2e;
  --ink-soft: #3d4455;
  --parchment: #e6d8bd;
  --parchment-deep: #d5c4a1;
  --cream: #eee2c9;
  --sea: #1e4d6b;
  --sea-mid: #2a6a8f;
  --sea-light: #3d8bb0;
  --terracotta: #b54a2e;
  --terracotta-soft: #c96b52;
  /* subdued, darker burnt orange — accent buttons & numbered markers */
  --burnt: #9a4620;
  --burnt-soft: #b25c33;
  --gold: #c4a35a;
  --gold-dim: #a88b45;
  --sage: #5a7a5e;
  --mist: #c7ba9b;
  --card: #f0e6d0;
  --shadow: 0 4px 24px rgba(26, 31, 46, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 31, 46, 0.12);
  --radius: 12px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --greek: "Cormorant Garamond", "Times New Roman", "Palatino Linotype", serif;
}

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

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(196, 163, 90, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(30, 77, 107, 0.08) 0%, transparent 45%);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a { color: var(--sea); }

.greek {
  font-family: var(--greek);
  font-size: 1.15em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ——— Layout shell ——— */
/* Guarantee the app never exceeds the viewport width, so it always sits
   centred with no horizontal scrolling. */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
  min-height: 100vh;
}

/* Media and wide blocks stay within their column */
img, svg, video, canvas { max-width: 100%; height: auto; }

/* Wide tables scroll inside themselves instead of stretching the page */
.lesson-body table,
.nt-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--mist);
}

.topbar-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sea);
  letter-spacing: 0.03em;
  cursor: pointer;
}

.topbar-brand:hover { color: var(--sea-mid); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--sea);
  color: white;
  box-shadow: 0 2px 8px rgba(30, 77, 107, 0.25);
}
.btn-primary:hover { background: var(--sea-mid); }

.btn-accent {
  background: var(--burnt);
  color: white;
  box-shadow: 0 2px 8px rgba(154, 70, 32, 0.28);
}
.btn-accent:hover { background: var(--burnt-soft); }

.btn-ghost {
  background: transparent;
  color: var(--sea);
  border: 1.5px solid var(--sea);
}
.btn-ghost:hover { background: rgba(30, 77, 107, 0.06); }

.btn-soft {
  background: var(--parchment-deep);
  color: var(--ink);
}
.btn-soft:hover { background: var(--mist); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ——— Welcome ——— */
.welcome {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.welcome-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.welcome-title-block h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.welcome-title-block h1 em {
  font-style: italic;
  font-weight: 700;
}

.welcome-title-block .subtitle {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-soft);
}

.welcome-epigraph {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--sea);
  border-left: 3px solid var(--gold);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1.5rem 0 2rem;
  line-height: 1.4;
}

.welcome-epigraph .trans {
  display: block;
  font-size: 0.95rem;
  font-style: normal;
  color: var(--ink-soft);
  margin-top: 0.35rem;
  font-family: var(--font-body);
}

.welcome-art {
  margin: 0 auto 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--mist);
  box-shadow: var(--shadow);
  background: #c4a478; /* medium tan — matches image fill */
  max-width: 520px;
  text-align: center;
}

.welcome-art img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  vertical-align: middle;
}

.thematic-home-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  text-align: center;
  margin-bottom: 1rem;
}

.theme-art {
  margin: 0 auto 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--mist);
  box-shadow: var(--shadow);
  background: #c4a478;
  max-width: 640px;
  text-align: center;
}

.theme-art img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  vertical-align: middle;
}

.thematic-home-lead {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 0.75rem;
  line-height: 1.5;
}

.thematic-home-lead + .theme-grid {
  margin-top: 1.25rem;
}

.welcome-intro {
  color: var(--ink-soft);
  margin-bottom: 2rem;
  font-size: 1.02rem;
}

.welcome-intro p + p { margin-top: 0.75rem; }

.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 2rem;
  align-items: stretch;
}

@media (min-width: 560px) {
  .module-grid { grid-template-columns: 1fr 1fr; }
}

.module-card {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  cursor: pointer;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

a.module-card,
a.module-card--link {
  text-decoration: none;
  color: inherit;
}

.module-card:hover {
  border-color: var(--sea-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.module-card .mod-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  line-height: 1;
}

.module-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--sea);
}

.module-card p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
  flex: 1 1 auto;
  margin-bottom: 0;
}

.module-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #1e4d6b 0%, #2a6a8f 100%);
  border: none;
  color: white;
}

.module-card.featured h3 { color: white; }
.module-card.featured p { color: rgba(255,255,255,0.88); }
.module-card.featured:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #163d58 0%, #1f5a7a 100%);
  box-shadow: 0 12px 40px rgba(30, 77, 107, 0.4);
  color: white;
}

/* Full-width secondary reading card under the sentence/passage pair */
.module-card.featured-sub {
  grid-column: 1 / -1;
}

.home-section-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1.75rem 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--mist);
}

.home-section-label--odyssey {
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--sea);
  border-bottom-color: var(--gold);
  border-bottom-width: 2px;
  font-weight: 700;
}

.module-card--nostos {
  text-align: left;
  align-items: stretch;
}

.module-card--nostos .mod-greek--solo {
  font-size: 2.4rem;
  opacity: 0.42;
  margin: 0.15rem 0 0.55rem;
  color: var(--sea);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
}

.module-card--nostos p {
  text-align: left;
  max-width: none;
}

.module-card--nostos .progress-pill {
  align-self: flex-start;
}

.reading-line--unit {
  margin-bottom: 1.25rem;
}

.grk-block--passage {
  white-space: pre-line;
  font-size: 1.15rem;
  line-height: 1.55;
}

.poetic-notes {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--mist);
}

.module-card .progress-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 0.75rem;
  min-height: 1.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--parchment-deep);
  color: var(--ink-soft);
}

.module-card .progress-pill.is-spacer {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.module-card.featured .progress-pill {
  background: rgba(255,255,255,0.18);
  color: white;
}

.assumptions {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.assumptions h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.assumptions ul {
  margin-left: 1.15rem;
  margin-top: 0.4rem;
}

.assumptions li { margin-bottom: 0.25rem; }

/* ——— Section hub (grammar TOC) ——— */
.section-hub h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin-bottom: 0.4rem;
}

.section-hub .lead {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.section-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.section-item:hover {
  border-color: var(--sea-mid);
  background: #e4d5b6;
}

.section-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  /* Deep navy so white numbers stay readable in light & dark */
  background: #1e4d6b;
  color: #f7f1e4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.section-item.done .section-num {
  background: #3d6b42;
  color: #f0f5ee;
}

.section-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.section-item p {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ——— Card / lesson ——— */
.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--parchment-deep);
  color: var(--ink-soft);
}

.badge-sea { background: rgba(30, 77, 107, 0.12); color: var(--sea); }
.badge-terra { background: rgba(181, 74, 46, 0.12); color: var(--terracotta); }
.badge-gold { background: rgba(196, 163, 90, 0.2); color: var(--gold-dim); }

.lesson-card {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.lesson-card h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin-bottom: 0.85rem;
  color: var(--ink);
  line-height: 1.2;
}

.lesson-body p { margin-bottom: 0.85rem; color: var(--ink-soft); }
.lesson-body p:last-child { margin-bottom: 0; }

.lesson-body ul, .lesson-body ol {
  margin: 0.5rem 0 0.85rem 1.25rem;
  color: var(--ink-soft);
}

.lesson-body li { margin-bottom: 0.35rem; }

.lesson-body .example-box {
  background: var(--parchment);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  margin: 0.85rem 0;
  border-radius: 0 8px 8px 0;
}

.lesson-body .example-box .greek-line {
  font-family: var(--greek);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.lesson-body .example-box .eng-line {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
}

.lesson-body .tip {
  background: rgba(90, 122, 94, 0.1);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
  margin: 0.85rem 0;
  color: var(--ink);
}

.lesson-body .tip strong { color: var(--sage); }

.lesson-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.85rem 0;
  font-size: 0.92rem;
}

.lesson-body th, .lesson-body td {
  border: 1px solid var(--mist);
  padding: 0.45rem 0.65rem;
  text-align: left;
}

.lesson-body th {
  background: var(--parchment-deep);
  font-weight: 600;
}

.lesson-body td .greek { font-size: 1.05em; }

/* Quiz */
.quiz-block {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.quiz-block h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.quiz-variant-hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.quiz-q {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--mist);
}

.quiz-q:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.quiz-q .q-text {
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--ink);
}

.quiz-q .q-text .greek { font-weight: 700; }

.options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.option-btn {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid var(--mist);
  background: #e4d5b6; /* warm clay — never pure white */
  font-size: 0.92rem;
  color: var(--ink);
  transition: border-color 0.12s, background 0.12s;
}

.option-btn:hover:not(:disabled),
.option-btn:focus-visible:not(:disabled) {
  border-color: var(--sea-light);
  background: #d9c7a0; /* slightly deeper warm hover, still not white */
  outline: none;
}

.option-btn:active:not(:disabled) {
  background: #d0bc94;
}

.option-btn.correct {
  border-color: var(--sage);
  background: rgba(90, 122, 94, 0.18);
  color: #2d4a30;
}

.option-btn.correct:hover:not(:disabled) {
  background: rgba(90, 122, 94, 0.24);
  border-color: var(--sage);
}

.option-btn.wrong {
  border-color: var(--terracotta);
  background: rgba(181, 74, 46, 0.12);
  color: #7a2f1c;
}

.option-btn.wrong:hover:not(:disabled) {
  background: rgba(181, 74, 46, 0.16);
  border-color: var(--terracotta);
}

.option-btn:disabled { cursor: default; }

.feedback {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  display: none;
}

.feedback.show { display: block; }
.feedback.ok { background: rgba(90, 122, 94, 0.12); color: #2d4a30; }
.feedback.no { background: rgba(181, 74, 46, 0.1); color: #7a2f1c; }

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* ——— Vocab ——— */
.vocab-home h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin-bottom: 0.35rem;
}

.vocab-track-panel {
  background: var(--card);
  border: 1.5px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin: 1.25rem 0 1rem;
  box-shadow: var(--shadow);
}

.vocab-track-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  color: var(--sea);
}

.vocab-track-lead {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.vocab-track-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.vocab-track-stats strong {
  color: var(--ink);
  font-weight: 700;
}

.vocab-launch-row {
  margin: 0.5rem 0 0.75rem;
}

.btn-launch {
  font-size: 1.1rem;
  padding: 0.85rem 1.6rem;
  min-width: min(100%, 280px);
  font-weight: 700;
}

.vocab-review-offer {
  margin: 0.85rem 0 0.5rem;
  padding: 0.85rem 1rem;
  background: rgba(30, 77, 107, 0.06);
  border-radius: 10px;
  border: 1px dashed var(--sea-light, #5a8fad);
}

.vocab-track-actions {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--mist);
}

.vocab-study-controls {
  margin-top: 0.5rem;
}

.vocab-stop-wrap {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--mist);
}

.vocab-quiz-offer {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  background: rgba(180, 100, 60, 0.08);
  border: 1px solid rgba(180, 100, 60, 0.25);
  border-radius: 10px;
}

.vocab-quiz-offer p {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.vocab-day-done {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 36rem;
}

.vocab-day-done h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.day-card {
  background: var(--card);
  border: 1.5px solid var(--mist);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.day-card:hover {
  border-color: var(--sea-light);
  transform: translateY(-2px);
}

.day-card.active-day {
  border-color: var(--sea);
  background: rgba(30, 77, 107, 0.06);
}

.day-card .day-label {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sea);
}

.day-card .day-count {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

.day-card .day-mastered {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sage);
  margin-top: 0.3rem;
}

.vocab-card {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  min-height: 280px;
  position: relative;
}

.vocab-card--review {
  border: 2px solid var(--terra, #b45a32);
  box-shadow: 0 0 0 3px rgba(180, 90, 50, 0.12), var(--shadow);
}

.vocab-review-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--terra, #b45a32);
  background: rgba(180, 90, 50, 0.12);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.65rem;
}

.vocab-card .lemma {
  font-family: var(--greek);
  font-size: 2rem;
  font-weight: 700;
  color: var(--sea);
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.vocab-card .meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.vocab-card .gloss {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--ink);
}

.vocab-card .principal-parts {
  font-family: var(--greek);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  padding: 0.5rem 0.7rem;
  background: var(--parchment);
  border-radius: 6px;
}

.example-line {
  border-top: 1px solid var(--mist);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
}

.example-line .cite {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-dim);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.example-line .grk {
  font-family: var(--greek);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.example-line .eng {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
}

.example-line .blank {
  display: inline-block;
  min-width: 4.5em;
  border-bottom: 2px solid var(--burnt);
  color: var(--burnt);
  font-style: normal;
  font-weight: 700;
  text-align: center;
  padding: 0 0.2em;
}
.example-line .blank.filled {
  min-width: 0;
  border-bottom: none;
}

/* underlined target word inside the Greek example line */
.example-line .grk u.tgt {
  text-decoration: underline;
  text-decoration-color: var(--burnt);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* the "(from Day N)" tag appended to the definition */
.vocab-card .gloss .gloss-day {
  font-size: 0.8em;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-soft);
}

.reveal-box {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: rgba(30, 77, 107, 0.08);
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
}

.reveal-box.show { display: block; }

.mastery-bar-wrap {
  margin: 1rem 0 1.5rem;
}

.mastery-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.mastery-bar {
  height: 8px;
  background: var(--mist);
  border-radius: 999px;
  overflow: hidden;
}

.mastery-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sea), var(--sage));
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Thematic */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.theme-card {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: 10px;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.theme-card:hover {
  border-color: var(--sea-light);
  transform: translateY(-2px);
}

.theme-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--sea);
  margin-bottom: 0.2rem;
}

.theme-card p {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.scene-wrap {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.scene-wrap h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.scene-svg-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0.75rem auto;
}

.scene-svg-container svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.hotspot {
  cursor: pointer;
}
.hotspot .hs-ring {
  fill: var(--burnt);
  stroke: #f2e7cf;
  stroke-width: 2.5;
  transition: r 0.12s ease, fill 0.12s ease;
}
.hotspot:hover .hs-ring {
  fill: var(--sea);
}
.hotspot.active .hs-ring {
  fill: var(--sea);
  r: 15;
}
.hotspot-label {
  pointer-events: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  fill: #fff;
}

.word-panel {
  background: var(--parchment);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  min-height: 4.5rem;
  margin-top: 0.75rem;
}

.word-panel .empty-hint {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
}

.word-panel .wp-greek {
  font-family: var(--greek);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sea);
}

.word-panel .wp-gloss {
  font-size: 0.95rem;
  color: var(--ink);
  margin-top: 0.2rem;
}

.word-panel .wp-extra {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

/* Map */
.map-stage {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.map-svg-wrap {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 1rem;
}

.map-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #e8f0f4;
}

.map-pin {
  cursor: pointer;
}

.map-pin circle {
  transition: r 0.15s, stroke-width 0.15s;
}

.map-pin:hover circle,
.map-pin.highlight circle {
  stroke-width: 3;
}

.map-pin text {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  fill: var(--ink);
  pointer-events: none;
}

.map-lesson {
  padding: 0.5rem 0.25rem;
}

.map-lesson h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.map-lesson p {
  color: var(--ink-soft);
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}

/* Reading */
.reading-line {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
}

.reading-line .line-ref {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.reading-line .grk-block {
  font-family: var(--greek);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.65rem;
  color: var(--ink);
}

.reading-line .help-toggle {
  font-size: 0.82rem;
  color: var(--sea);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-bottom: 0.5rem;
}

.reading-line .help-panel {
  display: none;
  background: var(--parchment-deep);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-top: 0.5rem;
  font-size: 0.88rem;
}

.reading-line .help-panel.open,
.reading-line .help-panel.is-open { display: block; }

.reading-line .help-panel .gloss-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

/* Word chips: warm cream chips, not bright white */
.reading-line .help-panel .gloss-item {
  background: #e2d3b5;
  border: 1px solid #c4a878;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  color: #2c2416;
}

/* Greek headword: deep terracotta — readable on warm cream */
.reading-line .help-panel .gloss-item .g {
  font-family: var(--greek);
  font-weight: 700;
  color: #6b2e14;
}

.reading-line .help-panel .notes {
  color: var(--ink);
  margin-top: 0.4rem;
  line-height: 1.45;
}

[data-theme="dark"] .reading-line .help-panel {
  background: #2a2620;
}

[data-theme="dark"] .reading-line .help-panel .gloss-item {
  background: #3d3428;
  border-color: #6a5840;
  color: #e8e0d0;
}

[data-theme="dark"] .reading-line .help-panel .gloss-item .g {
  color: #e0a06a;
}

[data-theme="dark"] .reading-line .help-panel .notes {
  color: #d0c8b8;
}

.reading-line .translation {
  display: none;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--mist);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.reading-line .translation.show { display: block; }

.word-chip {
  display: inline;
  cursor: help;
  border-bottom: 1px dotted var(--sea-light);
  transition: background 0.1s;
}

.word-chip:hover {
  background: rgba(30, 77, 107, 0.1);
  border-radius: 2px;
}

/* Modal tooltip for words */
.tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--ink);
  color: white;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.82rem;
  max-width: 260px;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  display: none;
}

.tooltip.show { display: block; }
.tooltip .tt-grk {
  font-family: var(--greek);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Progress strip */
.progress-strip {
  display: flex;
  gap: 3px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mist);
}

.progress-dot.done { background: var(--sage); }
.progress-dot.current { background: var(--sea); box-shadow: 0 0 0 2px rgba(30, 77, 107, 0.3); }

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.muted { color: var(--ink-soft); font-size: 0.9rem; }

.flash {
  animation: flashIn 0.35s ease;
}

@keyframes flashIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  .lesson-card, .quiz-block, .vocab-card { padding: 1.1rem; }
  .welcome-header { flex-direction: column; }
}

/* ——— Dark mode ——— */
[data-theme="dark"] {
  --ink: #ece5d5;
  --ink-soft: #c4b49a;
  --parchment: #201811;
  --parchment-deep: #322619;
  --cream: #29201a;
  /* Text/link blue: muted enough on dark surfaces, not neon */
  --sea: #8eb4c9;
  --sea-mid: #a3c4d6;
  --sea-light: #6a92a8;
  --terracotta: #e07a5f;
  --terracotta-soft: #f0947a;
  --burnt: #bd6438;
  --burnt-soft: #d17c4c;
  --gold: #d4b56a;
  --gold-dim: #c4a35a;
  --sage: #7aab80;
  --mist: #4a3c2a;
  --card: #2b2117;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(196, 163, 90, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(154, 70, 32, 0.14) 0%, transparent 45%);
}

/* Featured grammar CTA stays a real deep blue panel (not washed out) */
[data-theme="dark"] .module-card.featured {
  background: linear-gradient(135deg, #163248 0%, #1e4a66 100%);
  color: #f0ebe3;
}
[data-theme="dark"] .module-card.featured h3,
[data-theme="dark"] .module-card.featured .mod-greek {
  color: #f5f0e8;
}
[data-theme="dark"] .module-card.featured p {
  color: rgba(245, 240, 232, 0.9);
}

/* Grammar TOC / list rows — never flash light cream on hover */
[data-theme="dark"] .section-item {
  background: var(--card);
  border-color: var(--mist);
}
[data-theme="dark"] .section-item:hover {
  background: #3a3024;
  border-color: #6a5840;
}
[data-theme="dark"] .section-item h3 {
  color: var(--ink);
}
[data-theme="dark"] .section-item p {
  color: var(--ink-soft);
}
[data-theme="dark"] .section-num {
  background: #1a3d56;
  color: #eef4f8;
  border: 1px solid #2a5a78;
}
[data-theme="dark"] .section-item.done .section-num {
  background: #2d4a30;
  color: #e4f0e6;
  border-color: #3d6b42;
}

/* Badges that used pale blue tints */
[data-theme="dark"] .badge-sea {
  background: rgba(30, 70, 100, 0.45);
  color: #c5dce8;
}
[data-theme="dark"] .badge-terra {
  background: rgba(140, 60, 40, 0.35);
  color: #f0c4b0;
}
[data-theme="dark"] .badge-gold {
  background: rgba(160, 130, 60, 0.28);
  color: #e8d5a0;
}

/* Cards / day / theme hovers — warm elevation, not bright clay */
[data-theme="dark"] .module-card:hover:not(.featured),
[data-theme="dark"] .day-card:hover,
[data-theme="dark"] .theme-card:hover {
  background: #342a1e;
  border-color: #6a5840;
}

/* Grammar featured card: deepen blue on hover, never brown */
[data-theme="dark"] .module-card.featured:hover {
  background: linear-gradient(135deg, #0f2a3c 0%, #163d58 100%);
  border-color: transparent;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: #f5f0e8;
}
[data-theme="dark"] .module-card.featured:hover h3,
[data-theme="dark"] .module-card.featured:hover .mod-greek {
  color: #f5f0e8;
}
[data-theme="dark"] .module-card.featured:hover p {
  color: rgba(245, 240, 232, 0.9);
}
[data-theme="dark"] .day-card,
[data-theme="dark"] .theme-card {
  background: var(--card);
}
[data-theme="dark"] .day-card.active-day {
  background: #2a3840;
  border-color: #4a7088;
}

[data-theme="dark"] .vocab-track-panel {
  background: var(--card);
  border-color: #4a4030;
}

[data-theme="dark"] .vocab-review-offer {
  background: rgba(90, 140, 170, 0.12);
  border-color: #4a7088;
}

[data-theme="dark"] .vocab-card--review {
  border-color: #c47850;
  box-shadow: 0 0 0 3px rgba(196, 120, 80, 0.15), var(--shadow);
}

[data-theme="dark"] .vocab-review-badge {
  color: #e8a878;
  background: rgba(196, 120, 80, 0.18);
}

[data-theme="dark"] .vocab-quiz-offer {
  background: rgba(196, 120, 80, 0.12);
  border-color: rgba(196, 120, 80, 0.35);
}

[data-theme="dark"] .vocab-day-done {
  background: var(--card);
}

[data-theme="dark"] .btn-soft {
  background: #3a3024;
  color: var(--ink);
}
[data-theme="dark"] .btn-soft:hover {
  background: #4a3c2c;
}
[data-theme="dark"] .btn-ghost:hover {
  background: rgba(100, 140, 160, 0.12);
}

[data-theme="dark"] .option-btn {
  background: #3a3024;
  color: var(--ink);
}

[data-theme="dark"] .option-btn:hover:not(:disabled),
[data-theme="dark"] .option-btn:focus-visible:not(:disabled) {
  background: #4a3c2c;
  border-color: #6a8a9c;
}

[data-theme="dark"] .option-btn:active:not(:disabled) {
  background: #554533;
}

[data-theme="dark"] .option-btn.correct {
  background: rgba(90, 122, 94, 0.28);
  color: #c8e0c4;
}

[data-theme="dark"] .option-btn.correct:hover:not(:disabled) {
  background: rgba(90, 122, 94, 0.36);
}

[data-theme="dark"] .option-btn.wrong {
  background: rgba(181, 74, 46, 0.22);
  color: #f0c4b0;
}

[data-theme="dark"] .option-btn.wrong:hover:not(:disabled) {
  background: rgba(181, 74, 46, 0.3);
}

[data-theme="dark"] .help-toggle {
  color: #9ec0d0;
}

[data-theme="dark"] .map-svg-wrap svg,
[data-theme="dark"] .scene-svg-container svg {
  box-shadow: 0 0 0 1px var(--mist);
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  border: 1.5px solid var(--mist);
  background: var(--card);
  color: var(--ink);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.theme-toggle:hover {
  border-color: var(--sea-light);
  background: var(--parchment-deep);
}

/* Greek module labels (replace emojis) */
.module-card .mod-greek {
  font-family: var(--greek);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--sea);
  opacity: 0.38;
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.module-card.featured .mod-greek {
  color: white;
  opacity: 0.45;
}

/* Help open by default */
.help-panel.open,
.help-panel.is-open {
  display: block;
}

/* Scene click popover */
.scene-svg-container {
  position: relative;
}
.scene-popover {
  position: absolute;
  z-index: 5;
  min-width: 170px;
  max-width: 250px;
  padding: 0.7rem 0.85rem 0.75rem;
  background: var(--card);
  border: 1.5px solid var(--sea);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  display: none;
  text-align: center;
  transform: translate(-50%, calc(-100% - 16px));
}
.scene-popover.show { display: block; }
.scene-popover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--sea);
}
/* when the marker sits near the top, flip the bubble below it */
.scene-popover.pop-below {
  transform: translate(-50%, 16px);
}
.scene-popover.pop-below::after {
  bottom: auto;
  top: -8px;
  border-top-color: transparent;
  border-bottom-color: var(--sea);
}
.scene-popover .sp-greek {
  font-family: var(--greek);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--sea);
  line-height: 1.15;
}
.scene-popover .sp-parts {
  font-family: var(--greek);
  font-size: 1rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
  padding-top: 0.3rem;
  border-top: 1px solid var(--mist);
}
.scene-popover .sp-gloss {
  font-size: 0.86rem;
  color: var(--ink);
  margin-top: 0.35rem;
}

.scene-hint {
  text-align: center;
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

/* Word lists below the drawing */
.list-head {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--sea);
  margin-bottom: 0.5rem;
}
.word-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.4rem 1rem;
  padding: 0;
  counter-reset: wl;
}
.word-list li {
  padding: 0.35rem 0.5rem 0.35rem 1.9rem;
  border-radius: 7px;
  background: var(--parchment);
  position: relative;
  line-height: 1.35;
}
.word-list:not(.word-list--extra) li { counter-increment: wl; }
.word-list:not(.word-list--extra) li::before {
  content: counter(wl);
  position: absolute;
  left: 0.45rem;
  top: 0.4rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--burnt);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.word-list--extra {
  border-left: 3px solid var(--gold);
  padding-left: 0.75rem;
}
.word-list--extra li { padding-left: 0.6rem; background: var(--parchment-deep); }
.wl-lemma {
  font-family: var(--greek);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sea);
  margin-right: 0.4rem;
}
.wl-parts {
  font-family: var(--greek);
  font-size: 0.95rem;
  color: var(--ink-soft);
  display: block;
}
.wl-gloss {
  font-size: 0.85rem;
  color: var(--ink);
  display: block;
}
.wl-why {
  font-size: 0.74rem;
  color: var(--gold-dim);
  font-style: italic;
  display: block;
  margin-top: 0.1rem;
}
.extra-block { margin-top: 1.25rem; }
.extra-why { font-size: 0.8rem; margin-top: -0.25rem; margin-bottom: 0.5rem; }

.word-panel { display: none; } /* replaced by popover */

/* Vocab lexical line */
.vocab-card .lexical-entry {
  font-family: var(--greek);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.vocab-card .lemma {
  font-size: 1.75rem;
}

/* Map stage larger */
.map-svg-wrap {
  max-width: 100%;
}
.map-svg-wrap svg {
  background: transparent;
  border-radius: 6px;
}

/* NT refresh page */
.nt-refresh h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin-bottom: 0.4rem;
}
.lead-nt { margin-bottom: 1.5rem; }
.nt-block {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.nt-block h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--sea);
  margin-bottom: 0.65rem;
}
.nt-block h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0.85rem 0 0.4rem;
  color: var(--ink);
}
.nt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.nt-table th, .nt-table td {
  border: 1px solid var(--mist);
  padding: 0.35rem 0.5rem;
  text-align: left;
}
.nt-table th { background: var(--parchment-deep); font-weight: 600; }
.nt-table.compact { font-size: 0.82rem; }
.nt-table.compact td .greek, .nt-table .greek { font-family: var(--greek); }
.nt-grid3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 720px) {
  .nt-grid3 { grid-template-columns: 1fr 1fr 1fr; }
}
.nt-grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .nt-grid2 { grid-template-columns: 1fr 1fr; }
}
.nt-card {
  background: var(--parchment);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--mist);
}
.nt-card h4 { margin-top: 0; font-size: 0.98rem; color: var(--sea); }
.endings-line {
  font-size: 0.92rem;
  margin: 0.35rem 0;
  line-height: 1.5;
}
.example-inline {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  background: var(--parchment);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
}
.nt-block ul { margin: 0.4rem 0 0.4rem 1.2rem; color: var(--ink-soft); }
.nt-block li { margin-bottom: 0.3rem; }
.final-nt { border-color: var(--sea-light); }


/* ——— Vase painting studio (thematic vocab) ——— */
:root {
  --draw-board: #e6d5b5; /* light–medium cream */
  --draw-board-border: #c4b090;
}

[data-theme="dark"] {
  --draw-board: #4a4030;
  --draw-board-border: #6a5c48;
}

.vase-studio {
  margin: 1rem 0 1.25rem;
}

.vase-prompt {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.vase-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.vase-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1.5px solid var(--mist);
  background: var(--card);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.vase-tool:hover {
  border-color: var(--sea-light);
}

.vase-tool.is-active {
  border-color: var(--sea);
  background: rgba(30, 77, 107, 0.08);
  box-shadow: 0 0 0 1px var(--sea);
}

[data-theme="dark"] .vase-tool.is-active {
  background: rgba(110, 176, 212, 0.12);
}

.vase-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.vase-swatch--white {
  background: #f5f2ea;
  border-color: #aaa;
}

.vase-swatch--erase {
  background: #e6d5b5;
  border-color: #b8a888;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.vase-reset {
  margin-left: auto;
}

.vase-board-wrap {
  border: 2px solid var(--draw-board-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--draw-board);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), var(--shadow);
}

.vase-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(62vh, 520px);
  cursor: crosshair;
  background: #e6d5b5;
  touch-action: none;
  vertical-align: middle;
}

[data-theme="dark"] .vase-canvas {
  background: #4a4030;
}

.vase-save-hint {
  margin-top: 0.45rem;
  font-size: 0.82rem;
}

/* ——— Vase studio: guides, hotspots, numbers ——— */
.vase-howto {
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0 0 0.65rem;
  max-width: 52rem;
}

.vase-guide-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1.5px solid var(--mist);
  background: var(--card);
  user-select: none;
}

.vase-guide-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--sea);
  cursor: pointer;
}

.vase-num-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.55rem;
  background: var(--parchment-deep);
  border-radius: 8px;
  border: 1px solid var(--mist);
}

.vase-num-row[hidden] { display: none !important; }

.vase-num-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-right: 0.25rem;
}

.vase-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid var(--mist);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s, transform 0.1s;
}

.vase-num:hover {
  border-color: var(--sea-light);
}

.vase-num.is-selected {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: white;
  transform: scale(1.08);
}

.vase-hotspot-status {
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.vase-board-wrap {
  position: relative;
}

.vase-guide-layer {
  position: absolute;
  inset: 0;
  z-index: 3; /* above paint, so faint geometry reads on top of clay */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  /* Dark ink, very faded — not light blue */
  color: #2a2418;
}

.vase-guide-layer.is-on {
  opacity: 0.09;
}

[data-theme="dark"] .vase-guide-layer {
  color: #1a1610;
}

[data-theme="dark"] .vase-guide-layer.is-on {
  opacity: 0.14;
  color: #0d0b08;
}

.vase-guide-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.vase-canvas {
  position: relative;
  z-index: 2;
  background: transparent !important;
}

.vase-canvas.is-hotspot-mode {
  cursor: crosshair;
}

.vase-pin-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none; /* drawing goes through unless hotspot mode */
}

.vase-pin-layer.is-interactive {
  pointer-events: none; /* layer itself still none; pins enable themselves */
}

.vase-pin-layer.is-interactive .vase-pin {
  pointer-events: auto;
  cursor: pointer;
}

.vase-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-family: var(--font-body);
  padding: 0;
  line-height: 1;
  pointer-events: none;
}

.vase-pin-layer.is-interactive .vase-pin:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  background: #9a3412;
}

.vase-swatch--pin {
  background: var(--terracotta);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
}

.word-list--pinnable li.pinnable-word {
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 0.5rem;
  row-gap: 0.1rem;
  align-items: baseline;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: default;
  list-style: none;
  margin-left: 0;
}

.word-list--pinnable {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.word-list--pinnable .pin-badge {
  grid-row: 1 / span 3;
  align-self: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1.5px solid var(--mist);
  background: var(--parchment-deep);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink);
  cursor: pointer;
}

.word-list--pinnable .pin-badge:hover {
  border-color: var(--sea);
}

.word-list--pinnable li.is-pin-selected {
  border-color: var(--terracotta);
  background: rgba(181, 74, 46, 0.08);
}

.word-list--pinnable li.is-pin-selected .pin-badge {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: white;
}

.word-list--pinnable .wl-lemma {
  font-family: var(--greek);
  font-weight: 700;
  color: var(--sea);
}

.word-list--pinnable .wl-parts {
  font-size: 0.82rem;
  color: var(--ink-soft);
  grid-column: 2;
}

.word-list--pinnable .wl-gloss {
  font-size: 0.88rem;
  grid-column: 2;
}

/* ——— Aegean image map + pins ——— */
.map-board-host {
  max-width: 720px;
  margin: 0 auto 1rem;
}

.map-board {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--mist);
  box-shadow: var(--shadow);
  background: #947652; /* warm sea edge */
}

.map-board-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.map-routes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.map-route {
  stroke: #8b6914;
  stroke-width: 0.45;
  stroke-dasharray: 1.2 0.9;
  fill: none;
  opacity: 0.9;
}

.map-pins {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.map-pin.is-dim {
  opacity: 0.28;
}

.map-pin.is-on {
  opacity: 1;
  z-index: 4;
}

.map-pin-dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2c2416;
  border: 2px solid #f7f1e4;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 800;
  color: #f7f1e4;
  font-family: var(--font-body);
}

.map-pin-num {
  line-height: 1;
  transform: scale(0.95);
}

.map-pin.is-on .map-pin-dot {
  width: 18px;
  height: 18px;
  background: #9a3412;
  border-width: 2.5px;
  box-shadow: 0 0 0 4px rgba(154, 52, 18, 0.25), 0 2px 6px rgba(0,0,0,0.35);
  font-size: 0.62rem;
}

.map-route {
  stroke: #c45c20;
  stroke-width: 0.55;
  stroke-dasharray: 1.4 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0.88;
}

.map-pin-label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  background: rgba(247, 241, 228, 0.94);
  border: 1px solid #c4a478;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  white-space: nowrap;
}

.map-pin.is-on .map-pin-label {
  background: #f7f1e4;
  border-color: #9a3412;
}

.map-pin-en {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2c2416;
  font-family: var(--font-body);
}

.map-pin-gr {
  font-size: 0.65rem;
  font-style: italic;
  color: #5c4a32;
  font-family: var(--greek);
}

.map-pin.pin-left {
  flex-direction: row-reverse;
}

.map-pin.pin-left .map-pin-label {
  text-align: right;
}

[data-theme="dark"] .map-pin-label {
  background: rgba(36, 40, 48, 0.94);
  border-color: #8a7050;
}

[data-theme="dark"] .map-pin-en {
  color: #e8e2d4;
}

[data-theme="dark"] .map-pin-gr {
  color: #c4a478;
}

[data-theme="dark"] .map-pin.is-on .map-pin-label {
  background: #2a3038;
  border-color: #e07a5f;
}
