/**
 * Syria — Layers of the Levant
 * Palmyra limestone / Hauran basalt / damask crimson palette, bilingual (LTR + RTL) layout.
 * Development work by David Lane
 */

.sy-page {
  --sy-rose: #9c2233;
  --sy-rose-deep: #74172a;
  --sy-sand: #e3d3b4;
  --sy-sand-soft: #f5f0e6;
  --sy-sand-line: #d3c3a3;
  --sy-stone: #7c6a58;
  /* Heading ink — inverts in dark mode. */
  --sy-basalt: #1a1a19;
  --sy-basalt-soft: #292926;
  /* Inset dark surfaces (card backs, modals, story chip) — never inverted. */
  --sy-panel: #1a1a19;
  --sy-panel-soft: #292926;
  --sy-panel-ink: #f5f0e6;
  --sy-olive: #5c7050;
  --sy-gold: #c9992f;
  --sy-ink: #2a2420;
  --sy-muted: #6a5d4e;

  background: var(--sy-sand-soft);
  color: var(--sy-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.sy-page[dir='rtl'] {
  font-family: 'Amiri', 'Inter', system-ui, sans-serif;
}

.sy-main {
  padding-bottom: 3rem;
}

/* ---------------------------------------------------------------- hero */

.sy-hero {
  --sy-gust: 0.6;
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212, 162, 76, 0.35), transparent 60%),
    linear-gradient(165deg, #f7ecd8 0%, #e8d3ae 55%, #dcc094 100%);
  border-bottom: none;
}

/* Desert sandstorm — veils + canvas grains obscure the cityscape */

.sy-hero-atmos {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sy-hero-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 78% 8%, rgba(255, 214, 140, 0.28), transparent 58%),
    radial-gradient(ellipse 50% 40% at 12% 18%, rgba(181, 48, 31, 0.08), transparent 55%);
  animation: sy-sky-breathe 18s ease-in-out infinite;
}

.sy-hero.is-sandstorm .sy-hero-sky {
  background:
    radial-gradient(ellipse 80% 60% at 60% 20%, rgba(210, 160, 90, 0.35), transparent 62%),
    radial-gradient(ellipse 55% 45% at 10% 30%, rgba(160, 90, 40, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(180, 130, 70, 0.12), transparent 50%);
  animation: sy-sky-storm 9s ease-in-out infinite;
}

/* Soft dusk/night glow tucked behind the skyline — museum atlas, not neon */
.sy-hero-horizon-glow {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: min(42%, 220px);
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(212, 162, 76, 0.22), transparent 70%),
    radial-gradient(ellipse 40% 40% at 22% 92%, rgba(181, 48, 31, 0.1), transparent 65%),
    radial-gradient(ellipse 35% 35% at 78% 90%, rgba(255, 236, 200, 0.12), transparent 60%);
  opacity: 0.72;
  animation: sy-horizon-breathe 16s ease-in-out infinite;
}

.sy-hero.is-sandstorm .sy-hero-horizon-glow {
  opacity: 0.55;
  height: min(38%, 200px);
}

/* Full-hero canvas: sparse stars + gold motes (drawn in JS) */
.sy-hero-sparkle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.sy-hero-heat {
  position: absolute;
  inset: 35% 0 0 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 236, 200, 0.12) 40%,
    rgba(212, 162, 76, 0.08) 100%
  );
  opacity: 0.55;
  transform-origin: 50% 100%;
  animation: sy-heat-shimmer 7s ease-in-out infinite;
}

.sy-hero.is-sandstorm .sy-hero-heat {
  inset: 40% 0 0 0;
  opacity: 0.4;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(220, 170, 100, 0.1) 50%,
    rgba(160, 100, 45, 0.14) 100%
  );
  animation: sy-heat-shimmer 7s ease-in-out infinite;
}

/* Cityscape — soft blend into the sky, no hard frame */
.sy-hero-silhouettes {
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  width: min(100% - 2rem, 1360px);
  height: 56px;
  z-index: 1;
  opacity: 0.55;
  color: #4a321c;
  display: block;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  box-sizing: border-box;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.sy-hero.is-sandstorm .sy-hero-silhouettes {
  opacity: 0.65;
  filter: none;
  animation: sy-skyline-breathe 10s ease-in-out infinite;
}

.sy-hero-city {
  opacity: 1;
  animation: sy-city-drift 18s ease-in-out infinite;
}

.sy-hero-city--far {
  opacity: 0.7;
  animation-duration: 26s;
  animation-delay: -6s;
}

.sy-hero-arch {
  fill: currentColor;
  opacity: 1;
  animation: sy-arch-glow 12s ease-in-out infinite;
  transform-origin: 50% 100%;
  transform-box: fill-box;
}

.sy-hero-arch--mid {
  opacity: 0.9;
  animation-delay: -3s;
  animation-duration: 14s;
}

.sy-hero-arch--far {
  opacity: 0.75;
  animation-delay: -5s;
  animation-duration: 16s;
}

.sy-hero-dune {
  fill: currentColor;
  opacity: 0.95;
  animation: sy-dune-drift 20s ease-in-out infinite;
  transform-origin: 50% 100%;
  transform-box: fill-box;
}

.sy-hero.is-sandstorm .sy-hero-dune {
  animation: sy-dune-drift 14s ease-in-out infinite;
  opacity: 1;
}

.sy-hero-sand {
  position: absolute;
  inset: auto 0 0 0;
  height: 64px;
  background:
    linear-gradient(180deg, transparent, rgba(181, 48, 31, 0.06)),
    repeating-linear-gradient(115deg, rgba(138, 106, 75, 0.08) 0 2px, transparent 2px 18px);
  background-size: auto, 40px 40px;
  animation: sy-sand-stripes 22s linear infinite;
  mask-image: linear-gradient(180deg, transparent, #000 50%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 50%);
}

.sy-hero.is-sandstorm .sy-hero-sand {
  height: 64px;
  opacity: 0.65;
  animation: sy-sand-stripes 12s linear infinite;
}

/* Storm = skyline strip only */
.sy-hero-storm {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: 80px;
  display: block;
  z-index: 1;
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
  opacity: 0.75;
}

.sy-hero-motes {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  top: auto;
  height: 80px;
  z-index: 2;
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
  pointer-events: none;
}

.sy-hero-mote {
  position: absolute;
  top: -4%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(212, 162, 76, 0.4);
  box-shadow: none;
  opacity: 0;
  animation-name: sy-mote-blow;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.sy-hero-mote.is-grain {
  width: 3px;
  height: 1px;
  border-radius: 999px;
  background: rgba(138, 106, 75, 0.35);
  box-shadow: none;
}

@keyframes sy-horizon-breathe {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 0.82; }
}

@keyframes sy-sky-breathe {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

@keyframes sy-sky-storm {
  0%, 100% { opacity: 0.75; filter: saturate(0.9); }
  40% { opacity: 1; filter: saturate(1.15) brightness(1.05); }
  70% { opacity: 0.85; filter: saturate(0.8) brightness(0.95); }
}

@keyframes sy-heat-shimmer {
  0%, 100% { opacity: 0.28; transform: translateY(0) scaleY(1); }
  50% { opacity: 0.42; transform: translateY(-3px) scaleY(1.02); }
}

@keyframes sy-heat-storm {
  0%, 100% { opacity: 0.4; transform: translateX(0) scaleY(1); }
  50% { opacity: 0.7; transform: translateX(-2%) scaleY(1.04); }
}

@keyframes sy-skyline-breathe {
  0%, 100% { opacity: 0.46; }
  50% { opacity: 0.58; }
}

@keyframes sy-arch-glow {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-1px); opacity: 0.82; }
}

@keyframes sy-city-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-0.8%); }
}

@keyframes sy-dune-drift {
  0%, 100% { transform: translateX(0) scaleY(1); }
  50% { transform: translateX(-1.5%) scaleY(1.02); }
}

@keyframes sy-sand-stripes {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 0, 48px 0; }
}

@keyframes sy-mote-blow {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  12% { opacity: 0.55; }
  100% {
    opacity: 0;
    transform: translate3d(var(--sy-drift-x, -180px), 12px, 0) rotate(var(--sy-spin, 20deg));
  }
}

.sy-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.sy-hero > .container {
  position: relative;
  z-index: 1;
}

.sy-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sy-rose);
}

.sy-page[dir='rtl'] .sy-kicker {
  letter-spacing: normal;
  font-size: 0.95rem;
  text-transform: none;
}

.sy-hero-title {
  margin: 0 0 0.75rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 0.95;
  color: var(--sy-basalt);
}

.sy-page[dir='rtl'] .sy-hero-title,
.sy-page[dir='rtl'] .sy-section-title,
.sy-page[dir='rtl'] .sy-era-title,
.sy-page[dir='rtl'] .sy-card-name {
  font-family: 'Amiri', serif;
}

.sy-hero-line {
  max-width: 42ch;
  margin: 0 0 1.15rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--sy-ink);
}

.sy-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.sy-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  border-top: none;
}

.sy-facts div {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--sy-sand) 72%, #fff);
  border: 1px solid var(--sy-sand-line);
  box-shadow: 0 4px 12px rgba(44, 32, 22, 0.06);
  transform: rotate(var(--sy-ticket-tilt, 0deg));
}

.sy-facts div:nth-child(1) { --sy-ticket-tilt: -0.6deg; }
.sy-facts div:nth-child(2) { --sy-ticket-tilt: 0.5deg; }
.sy-facts div:nth-child(3) { --sy-ticket-tilt: -0.35deg; }
.sy-facts div:nth-child(4) { --sy-ticket-tilt: 0.7deg; }

.sy-facts dt {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sy-rose-deep);
  line-height: 1.1;
  /* Latin dates keep their own reading order inside the RTL layout. */
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

.sy-page[dir='rtl'] .sy-facts dt {
  text-align: right;
}

.sy-facts dd {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--sy-muted);
}

/* --------------------------------------------------------------- buttons */

.sy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sy-ink);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.sy-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
}

.sy-btn:focus-visible,
.sy-chip:focus-visible,
.sy-site-btn:focus-visible,
.sy-phrase:focus-visible,
.sy-card-front:focus-visible,
.sy-era-open:focus-visible,
.sy-narrate input:focus-visible,
.sy-story-narrate input:focus-visible {
  outline: 3px solid var(--sy-gold);
  outline-offset: 2px;
}

.sy-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sy-btn-sm {
  padding: 0.42rem 0.85rem;
  font-size: 0.84rem;
}

.sy-btn-primary {
  background: linear-gradient(135deg, var(--sy-rose), var(--sy-rose-deep));
  color: #fff6ec;
  box-shadow: 0 6px 16px rgba(140, 34, 20, 0.28);
}

.sy-btn-sand {
  background: var(--sy-sand);
  border-color: var(--sy-sand-line);
  color: var(--sy-basalt);
}

.sy-btn-rose {
  background: var(--sy-rose);
  border-color: transparent;
  color: #fffaf0;
}

.sy-btn-rose:hover:not(:disabled) {
  filter: brightness(1.08);
}

.sy-btn-rose.is-playing {
  background: var(--sy-rose-deep, #8a2a1a);
}

.sy-btn-ghost {
  border-color: rgba(138, 106, 75, 0.45);
  color: var(--sy-stone);
}

.sy-btn-ghost:hover:not(:disabled) {
  background: rgba(138, 106, 75, 0.1);
}

.sy-btn-lang {
  border-color: var(--sy-basalt);
  background: var(--sy-basalt);
  color: var(--sy-sand);
  font-family: 'Amiri', 'Inter', serif;
}

/* ----------------------------------------------------------- guide dock */

.sy-guide {
  position: sticky;
  top: 88px;
  padding: 1.15rem;
  border: 1px solid var(--sy-sand-line);
  border-radius: 22px 18px 26px 20px;
  background:
    radial-gradient(ellipse 90% 70% at 12% 0%, rgba(212, 162, 76, 0.22), transparent 55%),
    rgba(255, 252, 245, 0.94);
  box-shadow:
    0 14px 34px rgba(44, 32, 22, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  transform: rotate(-0.4deg);
}

.sy-guide-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sy-guide-portrait {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--sy-gold);
  background: var(--sy-sand-soft);
  flex: 0 0 auto;
  animation: syGuideBob 3.8s ease-in-out infinite;
}

.sy-guide.is-speaking .sy-guide-portrait {
  animation: syPulse 1.6s ease-in-out infinite;
}

@keyframes syGuideBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes syPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181, 48, 31, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(181, 48, 31, 0); }
}

.sy-guide-meta h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sy-basalt);
}

.sy-guide-meta p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--sy-muted);
}

.sy-guide-status {
  margin-top: 0.2rem !important;
  font-style: italic;
}

.sy-guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.sy-narrate--global {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(181, 48, 31, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 232, 168, 0.35), rgba(255, 253, 248, 0.9));
  color: var(--sy-basalt);
  cursor: pointer;
  user-select: none;
}

.sy-narrate--global input {
  accent-color: var(--sy-rose);
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  cursor: pointer;
}

.sy-narrate__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.sy-narrate__title {
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.sy-narrate__scope {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--sy-muted);
}

.sy-narrate--global:focus-within {
  outline: 2px solid rgba(181, 48, 31, 0.4);
  outline-offset: 2px;
}

html.sy-narration-off .sy-narrate--global {
  border-color: var(--sy-sand-line);
  background: rgba(255, 253, 248, 0.55);
}

html.sy-narration-off .sy-listen-btn {
  opacity: 0.55;
}

.sy-story-panel {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--sy-sand-line);
}

.sy-story-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.sy-story-narrate {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--sy-muted);
  cursor: pointer;
}

.sy-story-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--sy-muted);
}

.sy-story-dots {
  display: flex;
  gap: 4px;
}

.sy-story-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(138, 106, 75, 0.3);
}

.sy-story-dot.is-active { background: var(--sy-rose); transform: scale(1.25); }
.sy-story-dot.is-done { background: var(--sy-olive); }

.sy-story-error {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--sy-rose-deep);
}

/* -------------------------------------------------------------- sections */

/* Wider than Bootstrap xl (~1140), shy of full-bleed — cityscape-adjacent. */
.sy-page .sy-sections.container {
  max-width: 1360px;
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.5vw, 2rem);
}

.sy-sections {
  padding-bottom: 1rem;
}

.sy-section {
  margin: 0 0 1rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--sy-stone) 42%, var(--sy-sand-line));
  border-radius: 1.05rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.55), transparent 4.5rem),
    color-mix(in srgb, var(--sy-sand-soft) 88%, #fff);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    0 1px 0 rgba(212, 162, 76, 0.22),
    0 10px 28px rgba(44, 32, 22, 0.07);
  overflow: clip;
}

.sy-section.is-open {
  border-color: color-mix(in srgb, var(--sy-gold) 45%, var(--sy-sand-line));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 0 0 1px rgba(212, 162, 76, 0.18),
    0 12px 32px rgba(44, 32, 22, 0.09);
}

.sy-section-head {
  max-width: none;
  margin: 0;
  border-bottom: 1px solid transparent;
}

.sy-section.is-open > .sy-section-head {
  border-bottom-color: color-mix(in srgb, var(--sy-gold) 35%, var(--sy-sand-line));
  background: linear-gradient(
    180deg,
    rgba(255, 248, 230, 0.55),
    rgba(255, 253, 248, 0.15)
  );
}

.sy-section-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 1.15rem 1.25rem;
  border: none;
  background: transparent;
  text-align: start;
  cursor: pointer;
  color: inherit;
}

.sy-section-toggle:hover {
  background: color-mix(in srgb, var(--sy-sand) 35%, transparent);
}

.sy-section-toggle:focus-visible {
  outline: 3px solid var(--sy-gold);
  outline-offset: -3px;
}

.sy-section-toggle__copy {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.sy-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--sy-basalt);
}

.sy-section-lead {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--sy-muted);
  max-width: 62ch;
}

.sy-section-chevron {
  flex: 0 0 auto;
  margin-top: 0.35rem;
  font-size: 1.15rem;
  color: var(--sy-rose);
  transition: transform 0.25s ease;
}

.sy-section.is-open .sy-section-chevron {
  transform: rotate(180deg);
}

.sy-section-panel {
  padding: 1rem 1.25rem 1.4rem;
}

.sy-section-panel[hidden] {
  display: none !important;
}

.sy-loading {
  color: var(--sy-muted);
  font-style: italic;
  list-style: none;
}

/* -------------------------------------------------------------- timeline + calendar */

.sy-timeline-stage {
  display: grid;
  grid-template-columns: minmax(8.5rem, 10.5rem) minmax(0, 1fr);
  gap: 0.95rem;
  align-items: stretch;
  margin: 0 0 1.35rem;
}

.sy-timeline-selected {
  position: relative;
  min-height: 10.5rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--sy-sand-line);
  background:
    radial-gradient(ellipse 70% 60% at 40% 30%, rgba(255, 232, 168, 0.28), transparent 60%),
    linear-gradient(165deg, #2a2218, #1c1a17);
  box-shadow: inset 0 1px 0 rgba(255, 232, 168, 0.12);
}

.sy-timeline-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sy-timeline-3d canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.sy-timeline-selected__empty {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.sy-timeline-selected__empty[hidden] {
  display: none !important;
}

.sy-timeline-selected__prompt {
  position: absolute;
  inset: auto 0.6rem 0.75rem;
  z-index: 2;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 232, 168, 0.78);
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.sy-timeline-selected__card {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem 0.7rem 0.8rem;
  background: #1c1a17;
}

.sy-timeline-selected__card[hidden] {
  display: none !important;
}

.sy-timeline-selected__media {
  position: absolute;
  inset: 0;
}

.sy-timeline-selected__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sy-timeline-selected__card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, rgba(12, 10, 8, 0.9) 100%);
  pointer-events: none;
}

.sy-timeline-selected__date,
.sy-timeline-selected__title {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
}

.sy-timeline-selected__date {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: #ffe8a8;
  direction: ltr;
  unicode-bidi: isolate;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.sy-timeline-selected__title {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.3;
  color: rgba(246, 239, 226, 0.94);
}

.sy-timeline-selected.has-selection .sy-timeline-selected__empty {
  display: none;
}

.sy-calendar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  justify-content: center;
  padding: 0.85rem 1.1rem 0.85rem;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(28, 26, 23, 0.04), transparent),
    linear-gradient(90deg, rgba(181, 48, 31, 0.12), rgba(212, 162, 76, 0.18), rgba(0, 122, 61, 0.1));
  border: 1px solid var(--sy-sand-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sy-calendar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0.2rem 0.15rem;
}

.sy-calendar__head-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sy-rose-deep);
}

.sy-calendar__head-range {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sy-basalt);
  direction: ltr;
  unicode-bidi: isolate;
}

.sy-calendar__track {
  position: relative;
  height: 3.35rem;
  margin: 0 0.35rem;
}

.sy-calendar__rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(28, 26, 23, 0.28) 0 1px,
      transparent 1px 18px
    ),
    linear-gradient(90deg, #8c2214 0%, #b5301f 28%, #d4a24c 62%, #6f7f52 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sy-calendar__fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe8a8, #d4a24c);
  box-shadow: 0 0 12px rgba(212, 162, 76, 0.55);
  transition: width 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.sy-page[dir='rtl'] .sy-calendar__fill {
  left: auto;
  right: 0;
}

.sy-calendar__centuries {
  display: none;
}

.sy-calendar__ticks {
  position: absolute;
  inset: 0;
}

.sy-calendar__tick {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  translate: -50% 0;
  padding: 0;
  border: 2px solid var(--sy-rose);
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(212, 162, 76, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.sy-calendar__tick-date {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.35rem);
  translate: -50% 0;
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sy-rose-deep);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  background: rgba(255, 253, 248, 0.92);
  padding: 0.1rem 0.3rem;
  border-radius: 0.3rem;
}

.sy-calendar__tick:hover .sy-calendar__tick-date,
.sy-calendar__tick:focus-visible .sy-calendar__tick-date,
.sy-calendar__tick.is-active .sy-calendar__tick-date {
  opacity: 1;
}

.sy-calendar__tick:hover,
.sy-calendar__tick:focus-visible {
  transform: scale(1.2);
  background: #ffe8a8;
  outline: none;
  z-index: 3;
}

.sy-calendar__tick.is-active {
  background: var(--sy-rose);
  border-color: var(--sy-gold);
  box-shadow: 0 0 0 5px rgba(181, 48, 31, 0.28);
  transform: scale(1.25);
  z-index: 4;
}

.sy-calendar__now {
  position: absolute;
  top: 50%;
  right: 0;
  width: 3px;
  height: 1.7rem;
  margin-top: -0.85rem;
  border-radius: 999px;
  background: var(--sy-olive);
  box-shadow: 0 0 0 2px rgba(111, 127, 82, 0.25);
  z-index: 1;
}

.sy-page[dir='rtl'] .sy-calendar__now {
  right: auto;
  left: 0;
}

.sy-calendar__scale {
  position: relative;
  height: 1.15rem;
  margin: 0 0.35rem;
}

.sy-calendar__mark {
  position: absolute;
  top: 0;
  translate: -50% 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sy-rose-deep);
  white-space: nowrap;
}

.sy-page[dir='rtl'] .sy-calendar__mark {
  letter-spacing: normal;
  font-size: 0.7rem;
}

@media (max-width: 700px) {
  .sy-timeline-stage {
    grid-template-columns: 1fr;
  }

  .sy-timeline-selected {
    min-height: 9.5rem;
  }

  .sy-calendar__tick-date {
    font-size: 0.55rem;
  }
}

.sy-era-list {
  --sy-rail: 1.35rem;
  position: relative;
  margin: 0;
  padding: 0.25rem 0 0.5rem var(--sy-rail);
  list-style: none;
  perspective: 900px;
}

.sy-era-list::before {
  content: '';
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0.45rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sy-gold), var(--sy-rose), var(--sy-basalt));
  opacity: 0.7;
}

.sy-page[dir='rtl'] .sy-era-list {
  padding: 0.25rem var(--sy-rail) 0.5rem 0;
}

.sy-page[dir='rtl'] .sy-era-list::before {
  left: auto;
  right: 0.45rem;
}

.sy-era {
  position: relative;
  margin-bottom: 1rem;
  animation: syEraEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sy-era-i, 0) * 0.05s);
}

.sy-era-node {
  position: absolute;
  top: 1.55rem;
  left: calc(-1 * var(--sy-rail) + 0.12rem);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sy-sand-soft);
  border: 3px solid var(--sy-rose);
  box-shadow: 0 0 0 4px rgba(212, 162, 76, 0.2);
  z-index: 1;
}

.sy-page[dir='rtl'] .sy-era-node {
  left: auto;
  right: calc(-1 * var(--sy-rail) + 0.12rem);
}

.sy-era.is-active .sy-era-node {
  background: var(--sy-rose);
  border-color: var(--sy-gold);
  box-shadow: 0 0 0 5px rgba(181, 48, 31, 0.22);
}

.sy-era-card {
  position: relative;
  min-height: 14rem;
  perspective: 1400px;
  border: none;
  background: none;
  padding: 0;
}

.sy-era-card-inner {
  position: relative;
  width: 100%;
  min-height: 14rem;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1), min-height 0.35s ease;
  transform-style: preserve-3d;
}

.sy-era.is-flipped .sy-era-card {
  min-height: 24rem;
}

.sy-era.is-flipped .sy-era-card-inner {
  min-height: 24rem;
  transform: rotateY(180deg);
}

.sy-era-face {
  border: 1px solid var(--sy-sand-line);
  border-radius: 1rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    0 10px 24px rgba(44, 32, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sy-era-front {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(7.5rem, 9rem) minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  margin: 0;
  width: 100%;
  text-align: start;
  cursor: pointer;
  color: inherit;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(246, 239, 226, 0.92));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sy-era-front:hover,
.sy-era-front:focus-visible {
  border-color: color-mix(in srgb, var(--sy-rose) 55%, var(--sy-sand-line));
  box-shadow:
    0 16px 34px rgba(140, 34, 20, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  outline: none;
}

.sy-era-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.1rem 1rem;
  background:
    linear-gradient(160deg, #241f17 0%, #1c1810 55%, #2a2218 100%);
  color: #f6efe2;
  transform: rotateY(180deg);
  overflow: hidden;
}

.sy-era-back__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4a24c;
}

.sy-page[dir='rtl'] .sy-era-back__label {
  letter-spacing: normal;
  font-size: 0.82rem;
}

.sy-era-back__title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fffaf2;
}

.sy-era-back__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-inline-end: 0.25rem;
}

.sy-era-history {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(246, 239, 226, 0.9);
}

.sy-era-back .sy-era-tools {
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.sy-era-back .sy-btn-ghost {
  border-color: rgba(246, 239, 226, 0.35);
  color: #f6efe2;
}

.sy-era-back .sy-btn-ghost:hover:not(:disabled) {
  background: rgba(246, 239, 226, 0.1);
}

.sy-era-cal {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.65rem 0.55rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212, 162, 76, 0.28), transparent 70%),
    #1c1a17;
  color: #f6efe2;
  min-height: 7.5rem;
  aspect-ratio: 1;
}

.sy-era-cal.has-image {
  padding: 0;
}

.sy-era-cal__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sy-era-cal.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(28, 26, 23, 0.82) 100%);
  pointer-events: none;
  z-index: 1;
}

.sy-era-cal__tick {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--sy-gold), transparent);
  opacity: 0.85;
}

.sy-era-cal__band {
  position: relative;
  z-index: 2;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: #ffe8a8;
  direction: ltr;
  unicode-bidi: isolate;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  padding: 0.55rem 0.4rem 0.65rem;
}

.sy-era-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sy-era-years {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sy-rose);
}

.sy-page[dir='rtl'] .sy-era-years {
  letter-spacing: normal;
  font-size: 0.9rem;
}

.sy-era-title {
  margin: 0 0 0.35rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--sy-basalt);
}

.sy-era-copy {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--sy-muted);
}

.sy-era-hint {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sy-rose);
}

.sy-page[dir='rtl'] .sy-era-hint {
  letter-spacing: normal;
  font-size: 0.82rem;
}

.sy-era.is-active .sy-era-face {
  border-color: color-mix(in srgb, var(--sy-rose) 55%, var(--sy-sand-line));
}

@keyframes syEraEnter {
  from {
    opacity: 0;
    transform: translateY(12px) rotateX(-8deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

@media (max-width: 700px) {
  .sy-era-front {
    grid-template-columns: 1fr;
  }

  .sy-era-card,
  .sy-era-card-inner {
    min-height: 16rem;
  }

  .sy-era.is-flipped .sy-era-card,
  .sy-era.is-flipped .sy-era-card-inner {
    min-height: 26rem;
  }

  .sy-era-cal {
    min-height: 9rem;
    max-height: 11rem;
    aspect-ratio: 16 / 9;
  }

  .sy-era-cal__band {
    text-align: center;
    font-size: 0.9rem;
  }
}

.sy-era-tools {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

/* ------------------------------------------------------------------ map */

.sy-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 1.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--sy-gold) 28%, var(--sy-sand-line));
  border-radius: 0.85rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.85), rgba(246, 239, 226, 0.45));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.sy-map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.sy-narrate--section {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  margin-inline-start: auto;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(181, 48, 31, 0.35);
  background: rgba(255, 232, 168, 0.18);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--sy-basalt);
  cursor: pointer;
  user-select: none;
}

.sy-narrate--section input {
  accent-color: var(--sy-rose);
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  cursor: pointer;
}

.sy-narrate--section:focus-within {
  outline: 2px solid rgba(181, 48, 31, 0.4);
  outline-offset: 2px;
}

html.sy-narration-off .sy-narrate--section {
  border-color: var(--sy-sand-line);
  background: rgba(255, 253, 248, 0.45);
  opacity: 0.9;
}

body.dark-mode.sy-page .sy-narrate--section {
  background: rgba(212, 162, 76, 0.12);
  border-color: rgba(212, 162, 76, 0.4);
  color: var(--sy-ink);
}

.sy-chip {
  padding: 0.45rem 1rem;
  border: 1px solid var(--sy-sand-line);
  border-radius: 999px;
  background: #fffdf8;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--sy-ink);
  cursor: pointer;
}

.sy-chip.is-active {
  background: var(--sy-rose);
  border-color: var(--sy-rose-deep);
  color: #fff6ec;
}

.sy-map-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.45fr);
  gap: 1.25rem;
  align-items: start;
}

.sy-site-list {
  max-height: 560px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid color-mix(in srgb, var(--sy-stone) 38%, var(--sy-sand-line));
  border-radius: 14px;
  background: #fffdf8;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 6px 18px rgba(44, 32, 22, 0.05);
}

.sy-site-list li + li {
  border-top: 1px solid color-mix(in srgb, var(--sy-sand-line) 80%, transparent);
}

.sy-site-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: none;
  background: none;
  text-align: inherit;
  cursor: pointer;
}

.sy-site-btn:hover,
.sy-site-btn.is-active {
  background: rgba(212, 162, 76, 0.22);
}

.sy-site-btn.is-active {
  box-shadow: inset 3px 0 0 var(--sy-rose);
}

.sy-page[dir='rtl'] .sy-site-btn.is-active {
  box-shadow: inset -3px 0 0 var(--sy-rose);
}

.sy-site-emoji {
  flex: 0 0 auto;
  font-size: 1.35rem;
  line-height: 1.35;
}

.sy-site-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.sy-site-copy strong {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sy-basalt);
}

.sy-site-copy span {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #4a3c2e;
}

.sy-site-unesco {
  display: inline-block;
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(111, 127, 82, 0.22);
  font-size: 0.74rem;
  font-weight: 700;
  color: #3a4628;
}

.sy-map-wrap {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--sy-stone) 38%, var(--sy-sand-line));
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 6px 18px rgba(44, 32, 22, 0.05);
  overflow: hidden;
}

.sy-map-canvas {
  width: 100%;
  height: 520px;
  border: none;
  border-radius: 0;
  background: var(--sy-sand);
  display: block;
}

.sy-map-status {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--sy-muted);
}

.sy-map-reset {
  position: absolute;
  top: 0.65rem;
  inset-inline-end: 0.65rem;
  background: rgba(255, 253, 248, 0.94);
}

/* ----------------------------------------------------------- flip cards */

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

.sy-card {
  position: relative;
  min-height: 420px;
  border: none;
  background: none;
  padding: 0;
  perspective: 1200px;
  cursor: pointer;
  text-align: inherit;
  transition: min-height 0.35s ease;
}

.sy-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  transition:
    transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1),
    min-height 0.35s ease;
  transform-style: preserve-3d;
}

/* Taller when flipped so history text is more readable */
.sy-card.is-flipped {
  min-height: 560px;
}

.sy-card.is-flipped .sy-card-inner {
  min-height: 560px;
  transform: rotateY(180deg);
}

.sy-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid var(--sy-sand-line);
  border-radius: 16px;
  backface-visibility: hidden;
  overflow: hidden;
}

.sy-card-front {
  width: 100%;
  background: linear-gradient(160deg, #fffdf8, #f4e6cd);
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.sy-card-front:hover {
  border-color: rgba(181, 48, 31, 0.45);
}

.sy-card-history {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 0 0.85rem;
  padding: 0 0.45rem 0.65rem 0;
  font-size: 0.98rem;
  line-height: 1.65;
  overflow-y: auto;
  overflow-wrap: anywhere;
  scrollbar-gutter: stable;
  color: rgba(246, 239, 226, 0.92);
}

.sy-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, var(--sy-panel), var(--sy-panel-soft));
  color: var(--sy-panel-ink);
  border-color: var(--sy-panel);
  cursor: pointer;
}

.sy-card-back .sy-card-actions {
  flex: 0 0 auto;
  cursor: default;
}

.sy-card-back .sy-card-actions .sy-btn {
  cursor: pointer;
}

.sy-card-emoji {
  font-size: 2.1rem;
  line-height: 1;
}

.sy-card-photo {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 160px;
  margin-bottom: 0.55rem;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(138, 106, 75, 0.12);
  box-shadow: inset 0 0 0 1px rgba(138, 106, 75, 0.12);
}

.sy-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.sy-card-name {
  margin: 0.6rem 0 0.25rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sy-basalt);
}

.sy-card-back .sy-card-name {
  flex: 0 0 auto;
  margin-bottom: 0.45rem;
  color: var(--sy-gold);
  font-size: 1.15rem;
}

.sy-card-tagline {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--sy-muted);
}

.sy-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.8rem;
}

.sy-tag {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(181, 48, 31, 0.1);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sy-rose-deep);
}

.sy-card-hint {
  margin: 0.55rem 0 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sy-stone);
}

.sy-page[dir='rtl'] .sy-card-hint {
  letter-spacing: normal;
  text-transform: none;
}

.sy-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.15rem;
}

.sy-card-actions .sy-btn {
  flex: 1 1 auto;
  min-width: max-content;
  justify-content: center;
  white-space: nowrap;
}

/* Card backs are always dark panels — use panel ink, never --sy-sand-soft
   (that token inverts to near-black in site dark mode). */
.sy-card-back .sy-btn-ghost {
  border-color: rgba(246, 239, 226, 0.55);
  color: var(--sy-panel-ink);
  background: rgba(246, 239, 226, 0.08);
}

.sy-card-back .sy-btn-ghost:hover {
  background: rgba(246, 239, 226, 0.18);
  border-color: rgba(246, 239, 226, 0.75);
  color: #fffaf0;
}

.sy-card-back .sy-btn-sand {
  background: #e6cfa9;
  border-color: #d9c19a;
  color: #1c1a17;
}

.sy-card-back .sy-btn-sand:hover:not(:disabled) {
  background: #f0dcb8;
}

.sy-listen-btn.is-listening,
.sy-card-back .sy-btn-sand.is-listening,
.sy-era-tools .sy-btn-sand.is-listening {
  background: #8a2a1a;
  border-color: #6f2014;
  color: #fffaf0;
}

.sy-card-back .sy-btn-sand.is-listening:hover:not(:disabled),
.sy-era-tools .sy-btn-sand.is-listening:hover:not(:disabled),
.sy-listen-btn.is-listening:hover:not(:disabled) {
  background: #a33420;
  color: #fffaf0;
}

.sy-card-back .sy-btn-rose {
  background: #c45a3a;
  border-color: #b3482c;
  color: #fffaf0;
}

.sy-card-back .sy-btn-rose:hover:not(:disabled) {
  background: #d46848;
}

.sy-card-back .sy-btn-rose.is-playing {
  background: #8a2a1a;
  border-color: #6f2014;
}

.sy-card.is-playing-music .sy-card-back {
  box-shadow: inset 0 0 0 1px rgba(212, 162, 76, 0.55);
}

.sy-card-audio-credit {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(246, 239, 226, 0.72);
}

/* ------------------------------------------------------------ phrasebook */

.sy-phrase-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sy-phrase {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--sy-sand-line);
  border-radius: 14px;
  background: #fffdf8;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.sy-phrase:hover,
.sy-phrase.is-speaking {
  border-color: var(--sy-rose);
  transform: translateY(-1px);
}

.sy-phrase-icon {
  flex: 0 0 auto;
  color: var(--sy-rose);
  font-size: 1.1rem;
}

.sy-phrase-ar {
  display: block;
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--sy-basalt);
  direction: rtl;
}

.sy-phrase-translit {
  display: block;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--sy-rose-deep);
}

.sy-phrase-en {
  display: block;
  font-size: 0.85rem;
  color: var(--sy-muted);
}

/* --------------------------------------------------------- story overlay */

.sy-story-overlay {
  position: fixed;
  inset-inline: 0;
  bottom: clamp(16px, 4vh, 40px);
  z-index: 1150;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

.sy-story-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: 620px;
  padding: 0.95rem 1.15rem;
  border: 1px solid rgba(212, 162, 76, 0.55);
  border-radius: 18px;
  background: rgba(28, 26, 23, 0.93);
  color: var(--sy-panel-ink);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.sy-story-chip img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--sy-gold);
  flex: 0 0 auto;
}

.sy-story-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sy-gold);
}

.sy-story-title {
  margin: 0.15rem 0 0.3rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.sy-page[dir='rtl'] .sy-story-title { font-family: 'Amiri', serif; }
.sy-page[dir='rtl'] .sy-story-kicker { letter-spacing: normal; text-transform: none; }

.sy-story-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(246, 239, 226, 0.88);
}

.sy-story-progress {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  color: rgba(246, 239, 226, 0.6);
}

.sy-story-spotlight {
  outline: 3px solid var(--sy-gold);
  outline-offset: 6px;
  border-radius: 16px;
  transition: outline-color 0.3s ease;
}

body.sy-story-running .sy-guide {
  border-color: var(--sy-gold);
}

/* ----------------------------------------------------------- sheet modal */

.sy-sheet {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sy-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.65);
  backdrop-filter: blur(3px);
}

.sy-sheet-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: 86vh;
  border: 1px solid rgba(212, 162, 76, 0.4);
  border-radius: 18px;
  background: linear-gradient(160deg, var(--sy-panel), var(--sy-panel-soft));
  color: var(--sy-panel-ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.sy-sheet-header,
.sy-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.sy-sheet-header {
  border-bottom: 1px solid rgba(246, 239, 226, 0.14);
}

.sy-sheet-footer {
  border-top: 1px solid rgba(246, 239, 226, 0.14);
}

.sy-sheet-header h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: var(--sy-gold);
}

.sy-page[dir='rtl'] .sy-sheet-header h2 { font-family: 'Amiri', serif; }

.sy-sheet-body {
  padding: 1.15rem 1.25rem;
  overflow-y: auto;
  line-height: 1.7;
  font-size: 0.95rem;
}

.sy-sheet-body p { margin-bottom: 0.9rem; }

.sy-sheet-label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sy-gold);
}

.sy-page[dir='rtl'] .sy-sheet-label { letter-spacing: normal; text-transform: none; }

.sy-heygen-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
}

.sy-heygen-script {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.sy-heygen-script img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--sy-gold);
  flex: 0 0 auto;
}

.sy-heygen-script p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

.sy-heygen-credit {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(246, 239, 226, 0.6);
}

.sy-footer-note {
  padding: 2rem 0 0;
  font-size: 0.8rem;
  text-align: center;
  color: var(--sy-muted);
}

/* --------------------------------------------------------------- chat fab */

/* Chat opens from Niqula dock “Ask Niqula” — hide duplicate FAB */
.sy-page .ai-chat-button {
  display: none !important;
}

.sy-page .ai-chat-header {
  background: linear-gradient(135deg, var(--sy-panel), var(--sy-panel-soft)) !important;
}

.sy-page .ai-chat-send-btn {
  background: var(--sy-rose) !important;
}

.sy-page .dark-mode-toggle {
  bottom: 100px;
  inset-inline-end: 28px;
  z-index: 1190;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 991.98px) {
  .sy-hero-layout,
  .sy-map-layout {
    grid-template-columns: 1fr;
  }

  .sy-guide {
    position: static;
  }

  .sy-map-canvas {
    height: 380px;
  }

  .sy-site-list {
    max-height: 320px;
  }
}

@media (max-width: 575.98px) {
  .sy-story-chip {
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
  }

  .sy-story-chip img {
    width: 44px;
    height: 44px;
  }

  .sy-story-title {
    font-size: 1.15rem;
  }
}

@media (min-width: 700px) {
  .sy-card.is-flipped {
    min-height: 600px;
  }

  .sy-card.is-flipped .sy-card-inner {
    min-height: 600px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sy-card,
  .sy-card-inner {
    transition: none;
  }

  .sy-card-inner,
  .sy-btn,
  .sy-era-card,
  .sy-section-chevron {
    transition: none;
  }

  .sy-era,
  .sy-era-card-inner {
    animation: none !important;
  }

  .sy-era.is-flipped .sy-era-card-inner {
    transition: none;
  }

  .sy-guide.is-speaking .sy-guide-portrait,
  .sy-guide-portrait {
    animation: none !important;
  }

  .sy-hero-sky,
  .sy-hero-heat,
  .sy-hero-horizon-glow,
  .sy-hero-arch,
  .sy-hero-dune,
  .sy-hero-sand,
  .sy-hero-mote,
  .sy-hero-city,
  .sy-hero-silhouettes {
    animation: none !important;
  }

  .sy-hero-horizon-glow {
    opacity: 0.55;
  }

  .sy-hero-silhouettes {
    height: 72px;
  }

  .sy-hero-heat {
    opacity: 0.45;
  }

  .sy-hero-motes,
  .sy-hero-storm {
    display: none;
  }

  /* Static starfield may remain; JS paints once and skips RAF */
  .sy-hero-sparkle {
    opacity: 0.7;
  }

  .sy-hero.is-sandstorm .sy-hero-silhouettes {
    opacity: 0.4;
    filter: none;
  }
}

/* -------------------------------------------------------------- dark mode */

body.dark-mode.sy-page {
  --sy-sand-soft: #17150f;
  --sy-sand: #2c261c;
  --sy-sand-line: #453a2a;
  --sy-ink: #f0e6d4;
  --sy-muted: #d4c4a8;
  --sy-basalt: #f2e7d3;
  background: #17150f;
}

body.dark-mode.sy-page .sy-hero {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212, 162, 76, 0.16), transparent 60%),
    linear-gradient(165deg, #221e16 0%, #1a1710 100%);
}

body.dark-mode.sy-page .sy-hero.is-sandstorm {
  background:
    radial-gradient(ellipse at 40% 10%, rgba(180, 120, 50, 0.28), transparent 55%),
    radial-gradient(ellipse at 80% 40%, rgba(120, 70, 30, 0.22), transparent 50%),
    linear-gradient(165deg, #2a2216 0%, #1a1510 55%, #14110c 100%);
}

body.dark-mode.sy-page .sy-hero-silhouettes {
  color: #e2c48a;
  opacity: 0.5;
  border: none;
  background: none;
  box-shadow: none;
}

body.dark-mode.sy-page .sy-hero.is-sandstorm .sy-hero-silhouettes {
  color: #edcf96;
  opacity: 0.62;
}

body.dark-mode.sy-page .sy-hero-city--far {
  opacity: 0.8;
}

body.dark-mode.sy-page .sy-hero-arch--far {
  opacity: 0.78;
}

body.dark-mode.sy-page .sy-hero-sky {
  background:
    radial-gradient(ellipse 70% 55% at 78% 8%, rgba(212, 162, 76, 0.14), transparent 58%),
    radial-gradient(ellipse 50% 40% at 12% 18%, rgba(181, 48, 31, 0.1), transparent 55%);
}

body.dark-mode.sy-page .sy-hero.is-sandstorm .sy-hero-sky {
  background:
    radial-gradient(ellipse 80% 55% at 55% 15%, rgba(180, 120, 55, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 35%, rgba(140, 60, 25, 0.16), transparent 55%);
}

body.dark-mode.sy-page .sy-hero-horizon-glow {
  background:
    radial-gradient(ellipse 75% 60% at 50% 100%, rgba(212, 162, 76, 0.28), transparent 72%),
    radial-gradient(ellipse 42% 42% at 18% 90%, rgba(181, 48, 31, 0.14), transparent 65%),
    radial-gradient(ellipse 38% 38% at 82% 88%, rgba(246, 230, 196, 0.1), transparent 62%);
  opacity: 0.85;
  animation-duration: 20s;
}

body.dark-mode.sy-page .sy-hero.is-sandstorm .sy-hero-horizon-glow {
  opacity: 0.7;
}

body.dark-mode.sy-page .sy-hero-sparkle {
  opacity: 1;
}

body.dark-mode.sy-page .sy-hero-heat {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(212, 162, 76, 0.06) 45%,
    rgba(140, 34, 20, 0.08) 100%
  );
}

body.dark-mode.sy-page .sy-hero.is-sandstorm .sy-hero-heat {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(160, 100, 40, 0.08) 55%,
    rgba(100, 50, 20, 0.14) 100%
  );
}

body.dark-mode.sy-page .sy-section {
  background:
    linear-gradient(180deg, rgba(212, 162, 76, 0.06), transparent 4.5rem),
    #1c1913;
  border-color: #5a4a32;
  box-shadow:
    0 0 0 1px rgba(212, 162, 76, 0.08) inset,
    0 1px 0 rgba(212, 162, 76, 0.16),
    0 12px 30px rgba(0, 0, 0, 0.28);
}

body.dark-mode.sy-page .sy-section.is-open {
  border-color: color-mix(in srgb, var(--sy-gold) 55%, #5a4a32);
}

body.dark-mode.sy-page .sy-section.is-open > .sy-section-head {
  border-bottom-color: rgba(212, 162, 76, 0.28);
  background: linear-gradient(180deg, rgba(212, 162, 76, 0.1), transparent);
}

body.dark-mode.sy-page .sy-map-toolbar {
  border-color: rgba(212, 162, 76, 0.32);
  background: linear-gradient(180deg, rgba(40, 34, 24, 0.95), rgba(28, 24, 18, 0.9));
  box-shadow: 0 1px 0 rgba(212, 162, 76, 0.1) inset;
}

body.dark-mode.sy-page .sy-map-wrap,
body.dark-mode.sy-page .sy-site-list {
  border-color: #5a4a32;
  box-shadow:
    0 0 0 1px rgba(212, 162, 76, 0.08) inset,
    0 8px 20px rgba(0, 0, 0, 0.22);
}

body.dark-mode.sy-page .sy-timeline-3d {
  background:
    radial-gradient(ellipse 70% 60% at 40% 30%, rgba(212, 162, 76, 0.2), transparent 60%),
    linear-gradient(165deg, #2a2218, #14110c);
}

body.dark-mode.sy-page .sy-calendar {
  background: linear-gradient(90deg, rgba(181, 48, 31, 0.14), rgba(212, 162, 76, 0.12), rgba(181, 48, 31, 0.1));
}

body.dark-mode.sy-page .sy-calendar__tick {
  background: #2a2418;
}

body.dark-mode.sy-page .sy-section-toggle:hover {
  background: rgba(212, 162, 76, 0.08);
}

body.dark-mode.sy-page .sy-era-card,
body.dark-mode.sy-page .sy-site-list,
body.dark-mode.sy-page .sy-phrase,
body.dark-mode.sy-page .sy-chip,
body.dark-mode.sy-page .sy-guide {
  background: #201c15;
  color: var(--sy-ink);
}

body.dark-mode.sy-page .sy-era-front {
  background: linear-gradient(145deg, #241f17, #1c1810);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  color: var(--sy-ink);
}

body.dark-mode.sy-page .sy-section-title,
body.dark-mode.sy-page .sy-era-title {
  color: var(--sy-ink);
}

body.dark-mode.sy-page .sy-facts div {
  background: color-mix(in srgb, #2a2418 88%, var(--sy-sand));
  border-color: #5a4a35;
}

body.dark-mode.sy-page .sy-hero-line {
  color: #e8dcc4;
}

body.dark-mode.sy-page .sy-guide {
  background:
    radial-gradient(ellipse 90% 70% at 12% 0%, rgba(212, 162, 76, 0.12), transparent 55%),
    #201c15;
}

body.dark-mode.sy-page .sy-chip {
  border-color: #5a4a35;
  color: #f0e6d4;
}

body.dark-mode.sy-page .sy-chip.is-active {
  background: var(--sy-rose);
  border-color: var(--sy-rose-deep);
  color: #fff6ec;
}

body.dark-mode.sy-page .sy-site-list li + li {
  border-top-color: #3a3124;
}

body.dark-mode.sy-page .sy-site-btn:hover,
body.dark-mode.sy-page .sy-site-btn.is-active {
  background: rgba(212, 162, 76, 0.18);
}

body.dark-mode.sy-page .sy-site-copy span {
  color: #d8c8ae;
}

body.dark-mode.sy-page .sy-site-unesco {
  background: rgba(111, 127, 82, 0.35);
  color: #e4efc8;
}

body.dark-mode.sy-page .sy-card-front {
  background: linear-gradient(160deg, #241f17, #1c1810);
  color: var(--sy-ink);
}

body.dark-mode.sy-page .sy-btn-ghost {
  border-color: rgba(240, 230, 212, 0.45);
  color: #f0e6d4;
  background: rgba(240, 230, 212, 0.06);
}

body.dark-mode.sy-page .sy-btn-ghost:hover:not(:disabled) {
  background: rgba(240, 230, 212, 0.14);
  border-color: rgba(240, 230, 212, 0.7);
  color: #fffaf0;
}

body.dark-mode.sy-page .sy-card-name,
body.dark-mode.sy-page .sy-era-title,
body.dark-mode.sy-page .sy-site-copy strong,
body.dark-mode.sy-page .sy-phrase-ar {
  color: var(--sy-ink);
}

/* -------------------------------------------------------------- flag splash */

body.sy-splash-open {
  overflow: hidden;
}

.sy-splash {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% 28%, rgba(206, 17, 38, 0.22), transparent 58%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0, 122, 61, 0.18), transparent 55%),
    linear-gradient(165deg, #0c0a08 0%, #17140f 48%, #0e0c09 100%);
  color: #f6efe2;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.sy-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sy-splash.is-closing {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s ease;
}

.sy-splash__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 10, 8, 0.15), transparent 35%, rgba(12, 10, 8, 0.55));
  pointer-events: none;
}

.sy-splash__grain {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image: radial-gradient(rgba(246, 239, 226, 0.35) 0.6px, transparent 0.7px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
}

.sy-splash__skip {
  position: absolute;
  top: 1.1rem;
  inset-inline-end: 1.1rem;
  z-index: 2;
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(246, 239, 226, 0.35);
  border-radius: 999px;
  background: rgba(12, 10, 8, 0.35);
  color: #f6efe2;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.sy-splash__skip:hover,
.sy-splash__skip:focus-visible {
  border-color: #d4a24c;
  color: #ffe8a8;
  outline: none;
}

.sy-splash__stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 36rem;
  opacity: 0;
  transform: translateY(14px);
}

.sy-splash.is-ready .sy-splash__stage {
  animation: sySplashStageIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.sy-splash__flag-wrap {
  width: min(72vw, 28rem);
  margin-bottom: 1.75rem;
  perspective: 900px;
}

.sy-splash__flag {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  transform-origin: 50% 55%;
  transform: rotateX(12deg) scale(0.92);
  opacity: 0;
}

.sy-splash.is-ready .sy-splash__flag {
  animation: sySplashFlagIn 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.sy-splash.is-ready .sy-splash__stripe--black {
  animation: sySplashStripe 0.7s ease 0.25s both;
}

.sy-splash.is-ready .sy-splash__stripe--white {
  animation: sySplashStripe 0.7s ease 0.38s both;
}

.sy-splash.is-ready .sy-splash__stripe--green {
  animation: sySplashStripe 0.7s ease 0.5s both;
}

.sy-splash.is-ready .sy-splash__star {
  animation: sySplashStar 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both;
}

.sy-splash__kicker {
  margin: 0 0 0.45rem;
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 700;
  color: rgba(255, 232, 168, 0.92);
  letter-spacing: 0.02em;
}

.sy-splash__title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(3.2rem, 10vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fffaf2;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.sy-splash__line {
  margin: 0.65rem 0 0;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 239, 226, 0.72);
  font-weight: 600;
}

.sy-splash__rule {
  width: 4.5rem;
  height: 2px;
  margin: 1.15rem 0 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #d4a24c, transparent);
}

.sy-splash__enter {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 239, 226, 0.55);
  animation: sySplashPulse 2.2s ease-in-out 1.4s infinite;
}

@keyframes sySplashStageIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sySplashFlagIn {
  to {
    opacity: 1;
    transform: rotateX(0deg) scale(1);
  }
}

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

/* Three stars of the Syrian band ride in together; each polygon keeps its own placement transform. */
@keyframes sySplashStar {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-28deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.sy-splash__star {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes sySplashPulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

.sy-splash.is-reduced .sy-splash__flag,
.sy-splash.is-reduced .sy-splash__stage,
.sy-splash.is-reduced .sy-splash__stripe--black,
.sy-splash.is-reduced .sy-splash__stripe--white,
.sy-splash.is-reduced .sy-splash__stripe--green,
.sy-splash.is-reduced .sy-splash__star,
.sy-splash.is-reduced .sy-splash__enter {
  animation: none !important;
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .sy-splash,
  .sy-splash.is-closing {
    transition-duration: 0.25s;
  }
}
