/* Phoenix palette: Пепел #2C2C2A · Въглен #712B13 · Искра #D85A30 · Пламък #EF9F27 · Светлина #FAC775 */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: #2C2C2A;
  color: #e8d5b0;
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 0;
}

.brand-mark {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(2rem, 6vw, 2.8rem);
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 0.7rem;
  line-height: 1;
}

.brand-phoenix {
  font-weight: 400;
  color: #EF9F27;
}

.brand-inf {
  font-weight: 400;
  color: #D85A30;
  font-size: 0.55em;
  vertical-align: middle;
  padding: 0 0.15em;
}

.brand-tarot {
  font-weight: 700;
  color: #FAC775;
}

h1 {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #b08a55;
  margin-bottom: 0.3rem;
  text-align: center;
  line-height: 1.25;
}

.subtitle {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #8a6a40;
  margin-bottom: 0.25rem;
  letter-spacing: 0.1em;
  text-align: center;
}

.subtitle-cards {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: #5a4030;
  margin-bottom: 2.5rem;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

#draw-btn {
  background: linear-gradient(135deg, #712B13, #D85A30);
  color: #FAC775;
  border: 1px solid #D85A30;
  font-family: Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 2.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#draw-btn:hover {
  background: linear-gradient(135deg, #8a3520, #E06838);
}

#draw-btn:active {
  transform: scale(0.97);
}

#draw-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#spread-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.spread-btn {
  background: transparent;
  color: #a07850;
  border: 1px solid #3d2215;
  font-family: Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 1.3rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.spread-btn:hover {
  background: #2C2C2A;
  color: #EF9F27;
  border-color: #712B13;
}

.spread-btn.active {
  background: #2C2C2A;
  color: #EF9F27;
  border-color: #712B13;
}

#cards-area {
  margin-top: 2.5rem;
}

#cards-area.layout-one {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#cards-area.layout-one #slot-1,
#cards-area.layout-one #slot-2,
#cards-area.layout-one #slot-3,
#cards-area.layout-one #slot-4,
#cards-area.layout-one #slot-5,
#cards-area.layout-one #slot-6,
#cards-area.layout-one #slot-7,
#cards-area.layout-one #slot-8,
#cards-area.layout-one #slot-9 {
  display: none;
}

#cards-area.layout-three {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

#cards-area.layout-three #slot-3,
#cards-area.layout-three #slot-4,
#cards-area.layout-three #slot-5,
#cards-area.layout-three #slot-6,
#cards-area.layout-three #slot-7,
#cards-area.layout-three #slot-8,
#cards-area.layout-three #slot-9 {
  display: none;
}

#cards-area.layout-cross #slot-5,
#cards-area.layout-cross #slot-6,
#cards-area.layout-cross #slot-7,
#cards-area.layout-cross #slot-8,
#cards-area.layout-cross #slot-9 {
  display: none;
}

#cards-area.layout-spiral #slot-7,
#cards-area.layout-spiral #slot-8,
#cards-area.layout-spiral #slot-9 {
  display: none;
}

#cards-area.layout-spiral {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 520 / 680;
  margin: 2.5rem auto 0;
}

.spiral-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#cards-area.layout-spiral .card-slot {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transform: translate(-50%, calc(-50% + 14px));
}

#cards-area.layout-spiral .card-slot.visible {
  transform: translate(-50%, -50%);
}

#cards-area.layout-spiral .card-slot.enlarged {
  z-index: 10;
}

#cards-area.layout-spiral .card-image-wrap {
  width: 73px;
}

#cards-area.layout-spiral .card-number {
  font-size: 0.55rem;
  color: #a07850;
  letter-spacing: 0.05em;
  text-align: center;
  max-width: 75px;
  line-height: 1.3;
  text-transform: none;
  white-space: normal;
}

@media (max-width: 640px) {
  #cards-area.layout-spiral .card-image-wrap { width: 62px; }
  #cards-area.layout-spiral .card-number { max-width: 64px; }
}

@media (max-width: 480px) {
  #cards-area.layout-spiral .card-image-wrap { width: 55px; }
  #cards-area.layout-spiral .card-number { max-width: 57px; }
}

.spiral-marker {
  position: absolute;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, -50%);
}

.spiral-marker-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #FAC775 0%, #D85A30 58%, rgba(216,90,48,0) 100%);
  box-shadow: 0 0 6px 3px rgba(216,90,48,0.45);
  animation: spiralMarkerPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes spiralMarkerPulse {
  0%, 100% { box-shadow: 0 0 6px 3px rgba(216,90,48,0.45); transform: scale(1); }
  50%       { box-shadow: 0 0 13px 8px rgba(216,90,48,0.12); transform: scale(1.3); }
}

.spiral-marker-label {
  font-size: min(0.62rem, 2.6vw);
  color: #D85A30;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0.88;
  line-height: 1;
}

#cards-area.layout-cross {
  display: grid;
  grid-template-columns: repeat(3, auto);
  grid-template-rows: repeat(3, auto);
  gap: 0.8rem;
  justify-content: center;
  align-items: start;
}

#cards-area.layout-cross #slot-0 { grid-area: 2 / 2; }
#cards-area.layout-cross #slot-1 { grid-area: 2 / 1; }
#cards-area.layout-cross #slot-2 { grid-area: 1 / 2; }
#cards-area.layout-cross #slot-3 { grid-area: 3 / 2; }
#cards-area.layout-cross #slot-4 { grid-area: 2 / 3; }

.card-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.card-slot.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-image-wrap {
  width: 200px;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #3d2215;
  background: #252220;
  transition: box-shadow 0.2s ease;
}

.card-slot.enlarged .card-image-wrap {
  box-shadow: 0 0 0 2.5px #EF9F27, 0 0 12px rgba(239, 159, 39, 0.35);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* shown when image fails to load */
.card-image-wrap img.error {
  display: none;
}
.card-image-wrap .img-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #7a5a3a;
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}
.card-image-wrap img.error + .img-fallback {
  display: flex;
}

.card-number {
  font-size: 0.75rem;
  color: #a07850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c8a060;
  letter-spacing: 0.06em;
  text-align: center;
  max-width: 200px;
  margin-top: 0.3rem;
  line-height: 1.3;
}
#cards-area.layout-spiral .card-name,
#cards-area.layout-celtic .card-name { display: none; }

#context-wrap {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  max-width: 480px;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.field-row label {
  font-size: 0.9rem;
  color: #a07850;
  letter-spacing: 0.06em;
}

.field-hint {
  font-size: 0.75rem;
  color: #4a3828;
  margin-top: 0.2rem;
}

.birthdate-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

.birthdate-row input[type="text"] {
  background: #252220;
  border: 1px solid #3d2215;
  border-radius: 4px;
  color: #e8d5b0;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  padding: 0.55rem 0.6rem;
  text-align: center;
}

.birthdate-row input[type="text"]:focus {
  outline: none;
  border-color: #D85A30;
}

#bd-day, #bd-month { width: 3.2rem; }
#bd-year { width: 4.4rem; }

.birthdate-sep {
  color: #4a3828;
  font-size: 1rem;
  user-select: none;
}

#calc-btn {
  background: #2C2C2A;
  color: #EF9F27;
  border: 1px solid #3d2215;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

#calc-btn:hover {
  background: #353330;
  border-color: #712B13;
}

#lifepath-display {
  font-size: 0.8rem;
  color: #EF9F27;
  letter-spacing: 0.06em;
  min-height: 1.2em;
}

#question-input {
  width: 100%;
  background: #252220;
  border: 1px solid #3d2215;
  border-radius: 4px;
  color: #e8d5b0;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  resize: vertical;
  min-height: 72px;
}

#question-input:focus {
  outline: none;
  border-color: #D85A30;
}

#question-input::placeholder {
  color: #4a3828;
}

#reading-area {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 640px;
  display: none;
}

#reading-area.visible {
  display: block;
}

#new-reading-btn {
  display: block;
  margin: 2rem auto 0;
  background: transparent;
  color: #a07850;
  border: 1px solid #3d2215;
  font-family: Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.6rem 1.8rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

#new-reading-btn:hover {
  background: #2C2C2A;
  color: #EF9F27;
  border-color: #712B13;
}

.reading-divider {
  border: none;
  border-top: 1px solid #3d2215;
  margin-bottom: 1.5rem;
}

#reading-text {
  font-family: 'Lora', Georgia, serif;
  color: #e8d5b0;
  font-size: 1rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

#tts-btn[hidden] { display: none; }

#tts-btn {
  display: block;
  margin: 1.4rem auto 0;
  background: transparent;
  color: #a07850;
  border: 1px solid #3d2215;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

#tts-btn:hover {
  background: rgba(239, 159, 39, 0.08);
  color: #EF9F27;
  border-color: #712B13;
}

#tts-btn.tts-speaking {
  color: #EF9F27;
  border-color: #EF9F27;
  background: rgba(239, 159, 39, 0.08);
}

#tts-btn.tts-speaking:hover {
  color: #D85A30;
  border-color: #D85A30;
  background: rgba(216, 90, 48, 0.12);
}

/* ── Loading ritual ─────────────────────────────────── */
#reading-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 60px;
}

#loading-sparks-container {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 65px;
  pointer-events: none;
  overflow: visible;
}

.spark {
  position: absolute;
  border-radius: 50%;
  animation: sparkRise linear forwards;
}

@keyframes sparkRise {
  0%   { opacity: 0;   transform: translateY(0)      scale(1);   }
  12%  { opacity: 1;                                              }
  80%  { opacity: 0.6;                                            }
  100% { opacity: 0;   transform: translateY(-105px) scale(0.2); }
}

#loading-infinity {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  animation: infinityPulse 2.8s ease-in-out infinite;
}

@keyframes infinityPulse {
  0%, 100% {
    color: #EF9F27;
    text-shadow: 0 0 8px rgba(239,159,39,0.3);
    opacity: 0.65;
  }
  50% {
    color: #FAC775;
    text-shadow: 0 0 22px rgba(250,199,117,0.75), 0 0 44px rgba(216,90,48,0.25);
    opacity: 1;
  }
}

#loading-phrase {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9rem;
  color: #9a7a4a;
  letter-spacing: 0.04em;
  text-align: center;
  font-style: italic;
  min-height: 1.4em;
  transition: opacity 0.5s ease;
}

#loading-phrase.fade-out { opacity: 0; }

/* === Reading-pause: smoldering coals zone (below cards, above Ново четене) === */
#coals-zone {
  display: none;
  width: min(100%, 560px);
  margin: 1.2rem auto 0;
  text-align: center;
}
#coals-zone.visible { display: block; }

#coals-phrase {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.85rem;
  color: #c8884a;
  letter-spacing: 0.04em;
  font-style: italic;
  min-height: 1.4em;
  margin-bottom: 0.55rem;
  transition: opacity 0.5s ease;
}

#coals-band {
  position: relative;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(to top, #0a0301 0%, #1c0a04 50%, #291208 100%);
}

#coals-sparks-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#coals-embers {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100%;
  background:
    radial-gradient(ellipse 30% 60% at 10% 100%, rgba(255,100,18,0.72) 0%, transparent 100%),
    radial-gradient(ellipse 22% 45% at 28% 100%, rgba(195,65,12,0.58) 0%, transparent 100%),
    radial-gradient(ellipse 34% 65% at 50% 100%, rgba(255,120,30,0.78) 0%, transparent 100%),
    radial-gradient(ellipse 24% 50% at 70% 100%, rgba(185,58,14,0.62) 0%, transparent 100%),
    radial-gradient(ellipse 28% 55% at 90% 100%, rgba(240,90,20,0.68) 0%, transparent 100%);
  animation: coalBreathe 4s ease-in-out infinite;
}

@keyframes coalBreathe {
  0%, 100% { opacity: 0.65; transform: scaleY(1);    }
  42%       { opacity: 1;    transform: scaleY(1.06); }
  68%       { opacity: 0.52; transform: scaleY(0.96); }
}

.coal-spark {
  position: absolute;
  border-radius: 50%;
  animation: coalSparkRise linear forwards;
}

@keyframes coalSparkRise {
  0%   { opacity: 0;   transform: translateY(0)     scale(1);   }
  13%  { opacity: 1;                                             }
  78%  { opacity: 0.45;                                          }
  100% { opacity: 0;   transform: translateY(-80px) scale(0.2); }
}

#reading-error {
  color: #D85A30;
  font-size: 0.9rem;
  text-align: center;
  display: none;
  margin-top: 1rem;
}

/* ── Shuffle selector ────────────────────────────────── */
#shuffle-selector {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

.shuffle-label {
  font-size: 0.82rem;
  color: #8a6a40;
  letter-spacing: 0.05em;
  margin-right: 0.2rem;
}

.shuffle-opt {
  background: transparent;
  color: #a07850;
  border: 1px solid #3d2215;
  font-family: Georgia, serif;
  font-size: 0.85rem;
  padding: 0.3rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.shuffle-opt.active {
  background: #2C2C2A;
  color: #EF9F27;
  border-color: #712B13;
}

.shuffle-opt:hover {
  background: #2C2C2A;
  color: #EF9F27;
  border-color: #712B13;
}

@media (max-width: 640px) {
  .card-image-wrap { width: 28vw; }
  #cards-area.layout-three  { gap: 1rem; }
  #cards-area.layout-cross  { gap: 0.4rem; }
  .card-name { font-size: 0.75rem; }
}

/* ── Lightbox ────────────────────────────────────────── */
#card-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.84);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#card-lightbox.open { display: flex; }

#lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  cursor: default;
  animation: lightboxIn 0.22s ease;
  padding: 1.5rem;
}
@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
#lightbox-img-wrap {
  width: min(240px, 72vw);
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid #712B13;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.8);
}
#lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#lightbox-label {
  font-size: 0.78rem;
  color: #a07850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}
#lightbox-name {
  font-size: 0.95rem;
  color: #e8d5b0;
  text-align: center;
  max-width: min(240px, 72vw);
  line-height: 1.4;
}
#lightbox-close-hint {
  font-size: 0.62rem;
  color: #4a3828;
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
}

/* ── Celtic Cross layout ─────────────────────────────── */
#cards-area.layout-celtic {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 520 / 480;
  margin: 2.5rem auto 0;
}

#cards-area.layout-celtic .card-slot {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transform: translate(-50%, calc(-50% + 14px));
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#cards-area.layout-celtic .card-slot.visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Crossing card: rotated 90°, un-rotates when enlarged */
#cards-area.layout-celtic #slot-1 {
  transform: translate(-50%, calc(-50% + 14px)) rotate(90deg);
  z-index: 2;
}
#cards-area.layout-celtic #slot-1.visible {
  transform: translate(-50%, -50%) rotate(90deg);
}
#cards-area.layout-celtic #slot-1.enlarged {
  transform: translate(-50%, -50%);
  z-index: 10;
}
#cards-area.layout-celtic #slot-1 .card-number { opacity: 0; }
#cards-area.layout-celtic #slot-1.enlarged .card-number { opacity: 1; }

#cards-area.layout-celtic .card-slot.enlarged { z-index: 10; }
#cards-area.layout-celtic .card-image-wrap { width: 66px; }
#cards-area.layout-celtic .card-number {
  font-size: 0.5rem;
  color: #a07850;
  max-width: 68px;
  text-transform: none;
  white-space: normal;
  text-align: center;
}

/* Cross (center at 35.6% / 50%) */
#cards-area.layout-celtic #slot-0 { left: 35.6%; top: 50.0%; }  /* Сърцевина */
#cards-area.layout-celtic #slot-1 { left: 35.6%; top: 50.0%; }  /* Кръстосано */
#cards-area.layout-celtic #slot-2 { left: 35.6%; top: 75.0%; }  /* Основата   */
#cards-area.layout-celtic #slot-3 { left: 14.4%; top: 50.0%; }  /* Миналото   */
#cards-area.layout-celtic #slot-4 { left: 35.6%; top: 25.0%; }  /* Възможното */
#cards-area.layout-celtic #slot-5 { left: 56.7%; top: 50.0%; }  /* Близкото   */
/* Staff (right column, bottom → top) */
#cards-area.layout-celtic #slot-6 { left: 80.8%; top: 87.5%; }  /* Ти самият  */
#cards-area.layout-celtic #slot-7 { left: 80.8%; top: 62.5%; }  /* Средата    */
#cards-area.layout-celtic #slot-8 { left: 80.8%; top: 37.5%; }  /* Сърцето    */
#cards-area.layout-celtic #slot-9 { left: 80.8%; top: 12.5%; }  /* Светлината */

@media (max-width: 640px) {
  #cards-area.layout-celtic .card-image-wrap { width: 55px; }
  #cards-area.layout-celtic .card-number { max-width: 57px; }
}

@media (max-width: 480px) {
  #cards-area.layout-celtic .card-image-wrap { width: 40px; }
  #cards-area.layout-celtic .card-number { max-width: 42px; }
}

/* ── Language switcher ───────────────────────────────── */
#lang-select {
  position: fixed;
  top: 0.85rem;
  right: 1rem;
  z-index: 50;
  appearance: none;
  -webkit-appearance: none;
  background-color: #1e1e1c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23EF9F27'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 7px 4px;
  color: #EF9F27;
  border: 1px solid #4a3020;
  border-radius: 3px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 0.35rem 1.5rem 0.35rem 0.5rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, color 0.2s;
}

#lang-select:hover {
  border-color: #c88a48;
  color: #c88a48;
}

#lang-select option {
  background: #1e1e1c;
  color: #EF9F27;
}

/* ── Consent gate ─────────────────────────────────────────────────────────── */
body.no-scroll { overflow: hidden; }

#consent-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(14, 10, 8, 0.97);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem;
}
#consent-gate.open { display: flex; }

#consent-box {
  max-width: 540px;
  width: 100%;
  background: #201a16;
  border: 1px solid #3d2215;
  border-radius: 6px;
  padding: 2rem 2rem 1.75rem;
  margin: auto;
  animation: lightboxIn 0.25s ease;
}

.consent-brand {
  text-align: center;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  margin: 0 0 1.1rem;
  color: #a07850;
}

#consent-box h2 {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #EF9F27;
  text-align: center;
  margin: 0 0 1.1rem;
  letter-spacing: 0.04em;
}

.consent-para {
  font-family: Lora, Georgia, serif;
  font-size: 0.93rem;
  line-height: 1.65;
  color: #c8b896;
  margin: 0 0 0.85rem;
}

.consent-crisis {
  font-family: Lora, Georgia, serif;
  font-size: 0.88rem;
  font-style: italic;
  color: #a07850;
  margin: 0 0 0.85rem;
  padding-left: 0.75rem;
  border-left: 2px solid #712B13;
}

.consent-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-family: Georgia, serif;
  font-size: 0.87rem;
  color: #a07850;
  margin: 1.1rem 0 1.25rem;
  cursor: pointer;
  line-height: 1.5;
}
.consent-check-label input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: #D85A30;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.consent-link {
  background: none;
  border: none;
  padding: 0;
  color: #EF9F27;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-link:hover { color: #FAC775; }

#consent-accept {
  display: block;
  width: 100%;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, #712B13, #D85A30);
  color: #FAC775;
  border: none;
  border-radius: 4px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: opacity 0.2s;
}
#consent-accept:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
#consent-accept:not(:disabled):hover { opacity: 0.85; }

/* ── Legal document view ──────────────────────────────────────────────────── */
#legal-view {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 49;
  background: #181410;
  overflow-y: auto;
}
#legal-view.open { display: block; }

#legal-view-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

#legal-back {
  background: none;
  border: 1px solid #3d2215;
  color: #a07850;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 1.75rem;
  display: inline-block;
  transition: color 0.2s, border-color 0.2s;
}
#legal-back:hover { color: #EF9F27; border-color: #c88a48; }

#legal-content h2 {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #EF9F27;
  margin: 0 0 0.4rem;
  letter-spacing: 0.04em;
}
#legal-content h3 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #c88a48;
  margin: 1.6rem 0 0.5rem;
  letter-spacing: 0.05em;
}
#legal-content p {
  font-family: Lora, Georgia, serif;
  font-size: 0.93rem;
  line-height: 1.7;
  color: #c8b896;
  margin: 0 0 0.85rem;
}
#legal-content ul {
  margin: 0 0 0.85rem 1.25rem;
  padding: 0;
}
#legal-content li {
  font-family: Lora, Georgia, serif;
  font-size: 0.93rem;
  line-height: 1.7;
  color: #c8b896;
  margin-bottom: 0.3rem;
}
#legal-content a {
  color: #EF9F27;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#legal-content a:hover { color: #FAC775; }
#legal-content strong { color: #e8d5b0; }
#legal-content .legal-meta {
  color: #6a5540;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
#legal-content .legal-notice {
  color: #6a5540;
  font-size: 0.85rem;
  border-left: 2px solid #3d2215;
  padding-left: 0.75rem;
  margin-bottom: 1.25rem;
}
#legal-content .legal-accept {
  margin-top: 2rem;
  color: #6a5540;
  font-size: 0.88rem;
  border-top: 1px solid #3d2215;
  padding-top: 1rem;
}

/* ── Site footer ──────────────────────────────────────────────────────────── */
#site-footer {
  margin-top: 3rem;
  padding: 1rem 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.55;
  transition: opacity 0.2s;
}
#site-footer:hover { opacity: 0.85; }

.footer-link {
  background: none;
  border: none;
  color: #a07850;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-link:hover { color: #EF9F27; }

.footer-sep {
  color: #3d2215;
  font-size: 0.8rem;
}
