/*
 * Webtrip — Narozeninový výlet
 * Modern redesign — clean, warm, editorial
 */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Neutral base — warm, airy */
  --c-bg:        #FBF9F6;   /* page background, warm near-white */
  --c-surface:   #FFFFFF;   /* cards, panels */
  --c-surface-2: #F4F0EA;   /* subtle raised / tinted blocks */
  --c-ink:       #211D1A;   /* near-black, warm */
  --c-ink-soft:  #3A342F;
  --c-muted:     #7A736C;   /* secondary text */
  --c-faint:     #A69E96;   /* tertiary / captions */
  --c-line:      #ECE6DE;   /* hairline borders */
  --c-line-2:    #E0D8CD;

  /* Accents — used sparingly */
  --c-accent:      #C4552D;  /* terracotta */
  --c-accent-deep: #A2401F;  /* terracotta pressed */
  --c-accent-soft: #F3E6DC;  /* terracotta tint bg */
  --c-mustard:     #CF9A3C;
  --c-forest:      #3C6B54;

  /* Dark sections */
  --c-dark:      #211D1A;
  --c-dark-2:    #2C2723;

  /* Placeholder gradients — stand in for real photos */
  --grad-1: linear-gradient(150deg, #C9764A 0%, #D89A5B 55%, #E3B778 100%);
  --grad-2: linear-gradient(150deg, #3E6E7C 0%, #5E97A2 55%, #9CC0C4 100%);
  --grad-3: linear-gradient(150deg, #7C5A34 0%, #A8834F 55%, #CDB182 100%);
  --grad-4: linear-gradient(150deg, #2F5A7C 0%, #5388A6 55%, #8FB6C8 100%);
  --grad-5: linear-gradient(150deg, #5B4A7C 0%, #8672A2 55%, #B7A6C4 100%);

  --ff-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ff-body:    'Manrope', system-ui, -apple-system, sans-serif;

  /* Soft, diffuse shadows */
  --shadow-xs: 0 1px 2px rgba(33, 29, 26, 0.04);
  --shadow-sm: 0 4px 16px rgba(33, 29, 26, 0.05);
  --shadow-md: 0 10px 30px rgba(33, 29, 26, 0.07);
  --shadow-lg: 0 24px 60px rgba(33, 29, 26, 0.12);

  --t-fast:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --t-normal: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   0.6s  cubic-bezier(0.22, 1, 0.36, 1);
  --t-page:   0.5s  cubic-bezier(0.22, 1, 0.36, 1);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-full: 9999px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--c-ink);
  background-color: var(--c-bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: pageEnter var(--t-page) both;
}

@keyframes pageEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  font-optical-sizing: auto;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--c-muted);
  line-height: 1.7;
  font-weight: 400;
}

.eyebrow {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.container--narrow { max-width: 760px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  border-radius: var(--r-full);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; }

.btn--primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(196, 85, 45, 0.28);
}
.btn--primary:hover {
  background: var(--c-accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(196, 85, 45, 0.34);
}

.btn--dark {
  background: var(--c-ink);
  color: var(--c-bg);
}
.btn--dark:hover {
  background: var(--c-ink-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1.5px solid var(--c-line-2);
}
.btn--ghost:hover { border-color: var(--c-ink); background: var(--c-surface); }

/* Ghost button sitting on a dark surface (e.g. dest CTA) */
.btn--ghost-onDark {
  color: var(--c-bg);
  border-color: rgba(251, 249, 246, 0.28);
}
.btn--ghost-onDark:hover {
  background: rgba(251, 249, 246, 0.08);
  border-color: rgba(251, 249, 246, 0.6);
}

/* Heart CTA reflects favourited state */
.heart-cta.is-active svg { fill: #fff; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.15rem 0;
  transition: background var(--t-normal), box-shadow var(--t-normal), padding var(--t-normal), border-color var(--t-normal);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(251, 249, 246, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--c-line);
  padding: 0.8rem 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Minimal brand mark — no wordmark */
.site-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  background: var(--c-accent-soft);
  transition: background var(--t-fast), transform var(--t-normal), box-shadow var(--t-fast);
}
.site-mark:hover { transform: scale(1.08); box-shadow: var(--shadow-sm); }
.site-mark svg { width: 20px; height: 20px; fill: var(--c-accent); transition: fill var(--t-fast); }

.site-header.scrolled .site-mark { background: var(--c-accent); }
.site-header.scrolled .site-mark svg { fill: #fff; }

/* Occasion tag on the right of the header */
.header-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.header-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: var(--r-full);
  background: var(--c-mustard);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-muted);
  transition: color var(--t-fast);
}

.back-link:hover { color: var(--c-accent); }
.back-link svg { width: 15px; height: 15px; transition: transform var(--t-fast); }
.back-link:hover svg { transform: translateX(-3px); }

/* ============================================================
   HERO — HOMEPAGE (light, airy, editorial)
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 9rem 0 5rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 82% 18%, rgba(196, 85, 45, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(207, 154, 60, 0.10) 0%, transparent 55%);
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 920px) {
  .hero__grid { grid-template-columns: 1.05fr 0.85fr; gap: 4.5rem; }
}

.hero__content {
  max-width: 640px;
}

/* Layered visual composition (placeholder photo + floating chips) */
.hero__visual { position: relative; display: none; }

@media (min-width: 920px) {
  .hero__visual { display: block; }
}

.hero__card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(155deg, #C9764A 0%, #B4566A 45%, #6E5A93 100%);
  background-image: url('../img/hero-collage.jpg');
  background-size: cover;
  background-position: center;
  animation: floatY 7s ease-in-out infinite;
}

.hero__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--c-surface);
  color: var(--c-ink);
  padding: 0.65rem 1rem;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--c-line);
  white-space: nowrap;
}
.hero__chip svg { width: 16px; height: 16px; color: var(--c-accent); }

.hero__chip--tl { top: 2rem; left: -1.5rem; animation: floatY 5.5s ease-in-out infinite; }
.hero__chip--br { bottom: 2.25rem; right: -1.5rem; animation: floatY 6.5s ease-in-out infinite 0.6s; }

.hero__badge-40 {
  position: absolute;
  top: -1.4rem; right: 2rem;
  width: 68px; height: 68px;
  border-radius: var(--r-full);
  background: var(--c-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 1.7rem;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(196, 85, 45, 0.35);
  animation: floatY 6s ease-in-out infinite 0.3s;
}

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

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 1.75rem;
  padding: 0.5rem 1rem;
  background: var(--c-accent-soft);
  border-radius: var(--r-full);
}
.hero__badge svg { width: 13px; height: 13px; }

.hero__title {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--c-ink);
  margin-bottom: 1.75rem;
  font-weight: 400;
}

.hero__title em {
  font-style: italic;
  color: var(--c-accent);
}

.hero__message {
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  color: var(--c-muted);
  line-height: 1.75;
  max-width: 540px;
  margin-bottom: 2.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--c-faint);
  animation: bob 2.4s ease-in-out infinite;
}
.hero__scroll svg { width: 22px; height: 22px; }

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* ============================================================
   DESTINATIONS SECTION
   ============================================================ */
.destinations {
  padding: 5rem 0 7rem;
}

.destinations__header {
  max-width: 620px;
  margin-bottom: 3.5rem;
}

.destinations__header .eyebrow { margin-bottom: 1rem; }
.destinations__header h2 { margin-bottom: 1rem; }

.destinations__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .destinations__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 940px) {
  .destinations__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   DESTINATION CARD
   ============================================================ */
.destination-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-normal), box-shadow var(--t-normal);
  display: flex;
  flex-direction: column;
}

.destination-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.destination-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Thumbnail */
.card-thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  flex-shrink: 0;
}

.card-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow);
}

.destination-card:hover .card-thumb__img { transform: scale(1.06); }

.card-thumb__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 16, 12, 0.30) 0%, transparent 45%);
}

.card-thumb__country {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-full);
}

/* Card body */
.card-body {
  padding: 1.5rem 1.5rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body__name {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--c-ink);
}

.card-body__desc {
  font-size: 0.92rem;
  color: var(--c-muted);
  line-height: 1.6;
  flex: 1;
}

.card-body__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--c-line);
}

.card-body__more {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-accent);
  transition: gap var(--t-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-body__more svg {
  width: 13px;
  height: 13px;
  transition: transform var(--t-fast);
}

.destination-card:hover .card-body__more svg { transform: translateX(4px); }

/* ============================================================
   HEART / FAVOURITE BUTTON
   ============================================================ */
.heart-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--c-bg);
  border: 1.5px solid var(--c-line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  position: relative;
  z-index: 2;
}

.heart-btn:hover {
  background: #fdf0ec;
  border-color: #e8b3a0;
  transform: scale(1.06);
}

.heart-btn.is-active {
  background: #fdece7;
  border-color: var(--c-accent);
}

.heart-btn svg {
  width: 18px;
  height: 18px;
  fill: transparent;
  stroke: var(--c-muted);
  stroke-width: 1.9;
  transition: fill var(--t-fast), stroke var(--t-fast);
  pointer-events: none;
}

.heart-btn.is-active svg {
  fill: var(--c-accent);
  stroke: var(--c-accent);
  animation: heartPop 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes heartPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.4); }
  65%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ============================================================
   FLOATING FAVOURITES BUTTON
   ============================================================ */
.favorites-fab {
  position: fixed;
  bottom: 1.75rem;
  left: 1.75rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  background: var(--c-ink);
  color: var(--c-bg);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transform: translateY(90px);
  opacity: 0;
  transition: transform var(--t-page), opacity var(--t-page), background var(--t-fast), box-shadow var(--t-fast);
}

.favorites-fab.is-visible { transform: translateY(0); opacity: 1; }

.favorites-fab:hover {
  background: var(--c-ink-soft);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.favorites-fab.is-complete {
  background: var(--c-forest);
  animation: fabGlow 2.4s ease-in-out infinite;
}

@keyframes fabGlow {
  0%, 100% { box-shadow: var(--shadow-md); }
  50%      { box-shadow: 0 10px 34px rgba(60, 107, 84, 0.5); }
}

.favorites-fab__icon { display: flex; align-items: center; }
.favorites-fab__icon svg { width: 17px; height: 17px; fill: currentColor; }

.favorites-fab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ============================================================
   FAVOURITES PANEL (popup)
   ============================================================ */
.favorites-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(33, 29, 26, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}
.favorites-backdrop.is-open { opacity: 1; pointer-events: auto; }

.favorites-panel {
  position: fixed;
  bottom: 5.25rem;
  left: 1.75rem;
  z-index: 210;
  width: calc(100vw - 3.5rem);
  max-width: 340px;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-normal), opacity var(--t-normal);
  border: 1px solid var(--c-line);
}

.favorites-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.favorites-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.favorites-panel__title {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 500;
}

.favorites-panel__close {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.favorites-panel__close:hover { background: var(--c-surface-2); color: var(--c-ink); }
.favorites-panel__close svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; }

.favorites-list { display: flex; flex-direction: column; gap: 0.6rem; }

.favorites-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-md);
  background: var(--c-bg);
  animation: slideIn 0.25s ease both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.favorites-item__thumb { width: 40px; height: 40px; border-radius: var(--r-sm); flex-shrink: 0; }
.favorites-item__name { font-size: 0.9rem; font-weight: 700; color: var(--c-ink); }
.favorites-item__country { font-size: 0.76rem; color: var(--c-muted); }

.favorites-empty {
  font-size: 0.9rem;
  color: var(--c-muted);
  text-align: center;
  padding: 0.5rem 0;
}

.favorites-panel__footer {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-line);
  font-size: 0.88rem;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.55;
  display: none;
}

.favorites-panel__footer.is-complete-msg { display: block; }

/* ============================================================
   DESTINATION PAGE — HERO
   ============================================================ */
.dest-hero {
  position: relative;
  height: 66vh;
  min-height: 420px;
  max-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.dest-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dest-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20, 14, 10, 0.05) 0%, rgba(20, 14, 10, 0.25) 45%, rgba(20, 14, 10, 0.72) 100%);
}

.dest-hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: 3.5rem;
  width: 100%;
}

.dest-hero__country {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-full);
  margin-bottom: 1rem;
}

.dest-hero__title {
  color: #fff;
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  font-weight: 400;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.dest-hero__tagline {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.75rem;
  max-width: 620px;
}

/* ============================================================
   DESTINATION PAGE — CONTENT
   ============================================================ */
.dest-content { padding: 4rem 0 6rem; }

.dest-content .container--narrow {
  display: flex;
  flex-direction: column;
  gap: 3.75rem;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-line-2);
}

.dest-intro {
  font-family: var(--ff-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}

.dest-body p {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.dest-body p:last-child { margin-bottom: 0; }

/* ============================================================
   WHY IN OCTOBER BOX
   ============================================================ */
.why-october {
  background: var(--c-accent-soft);
  border-radius: var(--r-lg);
  padding: 2.25rem 2.5rem;
}

.why-october .section-label { margin-bottom: 1.1rem; }
.why-october .section-label::after { background: rgba(196, 85, 45, 0.25); }

.why-october__text {
  font-size: clamp(1.02rem, 1.9vw, 1.15rem);
  line-height: 1.75;
  color: var(--c-ink-soft);
}

.why-october__text + .why-october__text { margin-top: 1rem; }

/* ============================================================
   ITINERARY ACCORDION
   ============================================================ */
/* gentle "this plan is not set in stone" note above the itinerary */
.itinerary-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--c-accent-soft);
  border-radius: var(--r-md);
  font-family: var(--ff-display);
  font-style: italic;
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.55;
  color: var(--c-ink-soft);
}

.itinerary-note svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
  stroke: var(--c-accent);
  fill: none;
  stroke-width: 1.8;
}

.itinerary {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  box-shadow: var(--shadow-xs);
}

.day { border-bottom: 1px solid var(--c-line); }
.day:last-child { border-bottom: none; }

.day__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.85rem;
  cursor: pointer;
  transition: background var(--t-fast);
  user-select: none;
  -webkit-user-select: none;
}

.day__header:hover { background: var(--c-bg); }
.day.is-open .day__header { background: var(--c-bg); }

.day__meta { display: flex; align-items: baseline; gap: 0.85rem; }

.day__number {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.day__title {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--c-ink);
}

.day__toggle {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--c-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-fast), transform var(--t-normal);
}

.day.is-open .day__toggle {
  background: var(--c-accent);
  transform: rotate(180deg);
}

.day__toggle svg {
  width: 16px; height: 16px;
  stroke: var(--c-muted);
  stroke-width: 2;
  fill: none;
  transition: stroke var(--t-fast);
}
.day.is-open .day__toggle svg { stroke: #fff; }

/* CSS grid trick for smooth height transition */
.day__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-normal);
}
.day.is-open .day__body { grid-template-rows: 1fr; }
.day__body-inner { overflow: hidden; }

.day__activities {
  padding: 0.5rem 1.85rem 1.85rem;
  display: flex;
  flex-direction: column;
}

.activity {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 0.9rem 0;
  position: relative;
}

.activity:not(:last-child) { border-bottom: 1px solid var(--c-line); }

.activity__time {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--c-accent);
  min-width: 48px;
  padding-top: 2px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.activity__dot {
  width: 9px; height: 9px;
  border-radius: var(--r-full);
  background: var(--c-mustard);
  margin-top: 8px;
  flex-shrink: 0;
}

.activity__content { flex: 1; }

.activity__name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--c-ink);
  line-height: 1.55;
}

.activity__desc {
  font-size: 0.88rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-top: 0.15rem;
}

/* ============================================================
   INFO BOX (transport / practical)
   ============================================================ */
.info-box {
  background: var(--c-surface-2);
  border-radius: var(--r-lg);
  padding: 2.25rem 2.5rem;
}

.info-box__title {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.info-box__title svg {
  width: 22px; height: 22px;
  stroke: var(--c-accent);
  fill: none;
  stroke-width: 1.75;
  flex-shrink: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 480px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

.info-item__label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 0.35rem;
  display: block;
}

.info-item__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 0.2rem;
}

.info-item__note { font-size: 0.85rem; color: var(--c-muted); }

/* ============================================================
   PHOTO GALLERY
   ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 540px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

.gallery__item {
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.gallery__item:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7;
}

.gallery__ph { width: 100%; height: 100%; position: relative; }

/* real photo + caption overlay */
.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow);
}
.gallery__item:hover .gallery__img { transform: scale(1.05); }

.gallery__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.5rem 0.95rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(to top, rgba(20, 14, 10, 0.72) 0%, transparent 100%);
  pointer-events: none;
}

/* gallery photo links to Wikipedia (opens in new tab) */
.gallery__link { display: block; width: 100%; height: 100%; position: relative; }

.gallery__link::after {
  content: '';
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  background: rgba(20, 14, 10, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E") center / 14px no-repeat;
  backdrop-filter: blur(2px);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity var(--t-fast), transform var(--t-fast);
  pointer-events: none;
}
.gallery__item:hover .gallery__link::after,
.gallery__link:focus-visible::after { opacity: 1; transform: translateY(0); }

.ph-1 { background: var(--grad-1); }
.ph-2 { background: var(--grad-2); }
.ph-3 { background: var(--grad-3); }
.ph-4 { background: var(--grad-4); }
.ph-5 { background: var(--grad-5); }
.ph-6 { background: linear-gradient(130deg, #3C6B54 0%, #6A9A7C 50%, #A6C4AC 100%); }

.gallery__ph::after {
  content: attr(data-caption);
  position: absolute;
  bottom: 0.75rem;
  left: 0.9rem;
  right: 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* placeholder tag for photos to be added */
.gallery__ph::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ============================================================
   CALL TO ACTION (bottom of dest page)
   ============================================================ */
.dest-cta {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--c-dark);
  border-radius: var(--r-xl);
  margin-top: 0.5rem;
}

.dest-cta h3 {
  color: var(--c-bg);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.dest-cta p {
  color: rgba(251, 249, 246, 0.6);
  margin-bottom: 2rem;
  max-width: 420px;
  margin-inline: auto;
}

.dest-cta__actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--c-dark);
  color: rgba(251, 249, 246, 0.5);
  text-align: center;
  padding: 3rem 0;
  font-size: 0.85rem;
  line-height: 1.7;
}

.site-footer strong { color: rgba(251, 249, 246, 0.75); font-weight: 600; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal--hidden { opacity: 0; transform: translateY(24px); }
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   RESPONSIVE — MOBILE TWEAKS
   ============================================================ */
@media (max-width: 479px) {
  .favorites-fab { left: 1rem; bottom: 1rem; }
  .favorites-panel { left: 1rem; bottom: 4.75rem; max-width: calc(100vw - 2rem); }

  .day__header { padding: 1.2rem 1.3rem; }
  .day__activities { padding: 0.4rem 1.3rem 1.4rem; }
  .day__meta { flex-direction: column; align-items: flex-start; gap: 0.4rem; }

  .info-box, .why-october { padding: 1.6rem 1.5rem; }
}

/* ============================================================
   BUTTON — LARGE VARIANT
   ============================================================ */
.btn--lg { padding: 1.1rem 2.4rem; font-size: 0.98rem; }

/* ============================================================
   INTRO MINI-GAME (unlock sequence)
   ============================================================ */

/* Gate: hide the site while the game is active */
body.game-active { overflow: hidden; }
body.game-active .site-header,
body.game-active main,
body.game-active .site-footer,
body.game-active .favorites-fab,
body.game-active .favorites-panel,
body.game-active .favorites-backdrop { display: none !important; }

.game { display: none; }

body.game-active .game {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 70% 55% at 80% 15%, rgba(196, 85, 45, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 12% 88%, rgba(207, 154, 60, 0.14) 0%, transparent 55%),
    var(--c-bg);
  animation: fadeIn var(--t-normal) both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.game.is-exiting {
  animation: gameOut 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gameOut {
  to { opacity: 0; transform: scale(1.04); }
}

.game__inner {
  width: 100%;
  max-width: 520px;
  margin: auto;
}

.game__progress {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.game-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-faint);
  transition: color var(--t-fast);
}

.game-dot__num {
  width: 26px; height: 26px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--c-line-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  transition: all var(--t-fast);
}

.game-dot__label { display: none; }
@media (min-width: 420px) { .game-dot__label { display: inline; } }

.game-dot.current { color: var(--c-accent); }
.game-dot.current .game-dot__num { border-color: var(--c-accent); color: var(--c-accent); background: var(--c-accent-soft); }
.game-dot.done { color: var(--c-forest); }
.game-dot.done .game-dot__num { border-color: var(--c-forest); background: var(--c-forest); color: #fff; }

.game__card {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-line);
  padding: 2.5rem 2.25rem;
  text-align: center;
  overflow: hidden;
}

@media (max-width: 479px) { .game__card { padding: 2rem 1.4rem; } }

.game-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  animation: screenIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.game__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.game__title {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
  color: var(--c-ink);
}
.game__title--q { font-size: clamp(1.3rem, 3.5vw, 1.7rem); }

.game__text {
  color: var(--c-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 42ch;
}

.game__note {
  background: var(--c-surface-2);
  border-radius: var(--r-md);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--c-ink-soft);
  max-width: 42ch;
}

.game__caption {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  color: var(--c-ink);
  line-height: 1.35;
}

.game__hint-line { font-size: 0.82rem; color: var(--c-faint); }

.game__feedback {
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--c-accent);
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--t-fast);
  max-width: 40ch;
}
.game__feedback.show { opacity: 1; }
.game__feedback.hint { color: var(--c-mustard); font-weight: 700; }

/* seal / badge */
.game__seal {
  width: 66px; height: 66px;
  border-radius: var(--r-full);
  background: var(--c-forest);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 8px 22px rgba(60, 107, 84, 0.35);
  animation: sealPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.game__seal--open, .game__seal--gift { background: var(--c-accent); box-shadow: 0 8px 22px rgba(196, 85, 45, 0.35); }
.game__seal--gift { font-size: 2rem; }

@keyframes sealPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* quiz */
.quiz__count {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-faint);
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  max-width: 360px;
}

.quiz__opt {
  padding: 0.95rem 1.25rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-line-2);
  background: var(--c-surface);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-ink);
  text-align: left;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.quiz__opt:hover:not(:disabled) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.quiz__opt:disabled { cursor: default; opacity: 0.6; }
.quiz__opt.is-correct { border-color: var(--c-forest); background: rgba(60, 107, 84, 0.12); color: var(--c-forest); opacity: 1; }
.quiz__opt.is-wrong { border-color: var(--c-accent); background: #fdece7; animation: shake 0.4s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* code lock */
.lock__display {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin: 0.25rem 0 0.5rem;
}
.lock__display.shake { animation: shake 0.5s; }
.lock__display.is-open .lock__dot { border-color: var(--c-forest); background: rgba(60, 107, 84, 0.14); color: var(--c-forest); }

.lock__dot {
  width: 48px; height: 58px;
  border-radius: var(--r-md);
  border: 2px solid var(--c-line-2);
  background: var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--c-ink);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.lock__dot.filled { border-color: var(--c-accent); }

.lock__pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  width: 100%;
  max-width: 280px;
}

.lock__key {
  aspect-ratio: 1.4;
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-ink);
  transition: background var(--t-fast), transform var(--t-fast);
}
.lock__key:hover { background: var(--c-line); }
.lock__key:active { transform: scale(0.94); }
.lock__key--sm { font-size: 1.05rem; color: var(--c-muted); background: transparent; border: 1.5px solid var(--c-line); }

/* puzzle */
.puzzle {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  gap: 4px;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  margin: 0.25rem auto;
  padding: 4px;
  background: var(--c-line);
  border-radius: var(--r-md);
}

.puzzle__tile {
  aspect-ratio: 1;
  border-radius: 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), outline var(--t-fast);
  outline: 0 solid transparent;
}
.puzzle__tile:hover { transform: scale(0.97); }
.puzzle__tile.sel {
  outline: 3px solid var(--c-accent);
  outline-offset: -3px;
  z-index: 1;
  transform: scale(0.94);
}

.puzzle--done {
  max-width: 300px;
  padding: 0;
  background: none;
  animation: sealPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.puzzle__full {
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

/* Restart link on the unlocked site */
.game-restart {
  background: none;
  color: rgba(251, 249, 246, 0.45);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
.game-restart:hover { color: rgba(251, 249, 246, 0.85); }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================================
   CHAT WIDGET — osobní průvodce výběrem (kolečko vpravo dole)
   ============================================================ */
.chat-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 0;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--r-full);
  box-shadow: 0 8px 24px rgba(196, 85, 45, 0.32);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), opacity var(--t-normal);
  animation: chatPulse 3.2s ease-in-out 1.5s 2;
}
.chat-fab:hover { background: var(--c-accent-deep); transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 30px rgba(196, 85, 45, 0.42); }
.chat-fab.is-hidden { opacity: 0; transform: translateY(12px) scale(0.9); pointer-events: none; }
.chat-fab svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2; }

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(196, 85, 45, 0.32); }
  50%      { box-shadow: 0 8px 30px rgba(196, 85, 45, 0.55); }
}

.chat-panel {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 210;
  display: flex;
  flex-direction: column;
  width: calc(100vw - 3.5rem);
  max-width: 380px;
  height: min(560px, calc(100vh - 3.5rem));
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-normal), opacity var(--t-normal);
}
.chat-panel.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.chat-panel__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: var(--c-dark);
  color: var(--c-bg);
  flex-shrink: 0;
}
.chat-panel__avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  background: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-panel__avatar svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; }
.chat-panel__titles { flex: 1; min-width: 0; }
.chat-panel__title { font-family: var(--ff-display); font-size: 1.02rem; font-weight: 500; line-height: 1.2; }
.chat-panel__subtitle { font-size: 0.72rem; color: rgba(251, 249, 246, 0.6); }
.chat-panel__close {
  width: 30px; height: 30px;
  border-radius: var(--r-full);
  background: rgba(251, 249, 246, 0.12);
  color: var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-fast);
}
.chat-panel__close:hover { background: rgba(251, 249, 246, 0.22); }
.chat-panel__close svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--c-bg);
}

.chat-msg { display: flex; }
.chat-msg--user { justify-content: flex-end; }
.chat-msg--assistant { justify-content: flex-start; }

.chat-bubble {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg--assistant .chat-bubble {
  background: var(--c-surface);
  color: var(--c-ink);
  border: 1px solid var(--c-line);
  border-bottom-left-radius: 5px;
}
.chat-msg--user .chat-bubble {
  background: var(--c-accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}

/* typing dots */
.chat-dots { display: inline-flex; gap: 4px; padding: 2px 0; }
.chat-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-faint);
  animation: chatDot 1.2s ease-in-out infinite;
}
.chat-dots span:nth-child(2) { animation-delay: 0.18s; }
.chat-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes chatDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1.15rem 0.6rem;
  background: var(--c-bg);
}
.chat-chip {
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-full);
  border: 1px solid var(--c-line-2);
  background: var(--c-surface);
  color: var(--c-ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.chat-chip:hover { background: var(--c-accent-soft); border-color: var(--c-accent); color: var(--c-accent-deep); }

.chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--c-line);
  background: var(--c-surface);
  flex-shrink: 0;
}
.chat-input input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--c-line-2);
  border-radius: var(--r-full);
  font: inherit;
  font-size: 0.9rem;
  color: var(--c-ink);
  background: var(--c-bg);
  outline: none;
  transition: border-color var(--t-fast);
}
.chat-input input:focus { border-color: var(--c-accent); }
.chat-input input:disabled { opacity: 0.6; }
.chat-send {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: var(--r-full);
  background: var(--c-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.chat-send:hover { background: var(--c-accent-deep); transform: scale(1.05); }
.chat-send:disabled { opacity: 0.5; transform: none; }
.chat-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* hide the whole widget while the intro game is active */
body.game-active .chat-fab,
body.game-active .chat-panel { display: none !important; }

@media (max-width: 479px) {
  .chat-fab { right: 1rem; bottom: 1rem; }
  .chat-panel { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; width: auto; height: min(70vh, 520px); }
}
