@font-face {
  font-family: Anton;
  src: url("fonts/Anton-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --yellow: #FFD401;
  --red: #A00B11;
  --bg: #0D0D0D;
  --elev: #1A1614;
  --text: #FFF8E7;
  --muted: #D4C9A8;
  --border: #3F362C;
  --radius: 14px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --heading-font: Anton, Impact, "Arial Narrow", sans-serif;
  --heading-weight: 400;
  --heading-lh: 1.1;
}

:lang(ja), :lang(zh), :lang(zh-Hans), :lang(ko), :lang(th), :lang(hi), :lang(ar), :lang(ru), :lang(uk), :lang(el) {
  --heading-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans CJK JP", "Noto Sans CJK SC", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Thai", Arial, sans-serif;
  --heading-weight: 800;
  --heading-lh: 1.25;
}

:lang(th), :lang(hi), :lang(ar) {
  --heading-lh: 1.38;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  max-width: 100%;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button, a, select { font: inherit; }
p, h1, h2, li, button, a, span, label { overflow-wrap: anywhere; }

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  min-width: 0;
}

.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  min-width: 0;
  flex: 1 1 160px;
}
.lang-wrap {
  flex: 0 0 auto;
  max-width: 100%;
}
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 28px 8px 12px;
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: auto;
  max-width: 138px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23FFD401' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 10px 7px;
}
[dir="rtl"] .lang-select {
  padding: 8px 12px 8px 28px;
  background-position: left 11px center;
}
.lang-select option {
  background: #1A1614;
  color: #FFF8E7;
}
.lang-select:focus-visible,
.btn:focus-visible,
.opt:focus-visible,
.thumb:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.gallery { margin: 0 0 18px; min-width: 0; }
.hero-main {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  border: 1px solid var(--border);
}
.hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.thumb {
  appearance: none;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  aspect-ratio: 1;
}
.thumb[aria-current="true"] { border-color: var(--yellow); }
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery.compact .hero-main { aspect-ratio: 16 / 7; }
.gallery.compact .thumbs { display: none; }

.title {
  margin: 0 0 10px;
  font-family: Anton, Impact, "Arial Narrow", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.1;
  font-size: clamp(32px, 10vw, 44px);
  color: var(--yellow);
}
.level-title {
  margin: 0;
  font-family: var(--heading-font);
  font-weight: var(--heading-weight);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: var(--heading-lh);
  font-size: clamp(20px, 6vw, 24px);
  color: var(--yellow);
}
.card-title {
  margin: 0;
  font-family: var(--heading-font);
  font-weight: var(--heading-weight);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: var(--heading-lh);
  font-size: clamp(24px, 7vw, 30px);
  color: var(--yellow);
}
.card-name {
  margin: 0;
  font-family: var(--heading-font);
  font-weight: var(--heading-weight);
  text-transform: uppercase;
  line-height: var(--heading-lh);
  font-size: clamp(20px, 6vw, 22px);
  color: var(--yellow);
}
:lang(el) .level-title,
:lang(el) .card-title,
:lang(el) .card-name {
  text-transform: none;
}
:lang(ja) .card-title,
:lang(zh) .card-title,
:lang(zh-Hans) .card-title,
:lang(ko) .card-title {
  font-size: clamp(20px, 5.5vw, 26px);
}

.intro, .note, .also, .footer-text, .ask, .fact p {
  margin: 0;
  color: var(--text);
}
.intro { margin-bottom: 18px; }
.ask {
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.35;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}
.progress-meta { color: var(--muted); font-size: 13px; }
.bar {
  height: 8px;
  width: 100%;
  border-radius: 999px;
  background: #2A251F;
  overflow: hidden;
  margin: 8px 0 14px;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--yellow);
  border-radius: 999px;
  width: 0%;
}

.opts, .stack, .facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.opts { margin: 12px 0 14px; }

.opt {
  display: block;
  width: 100%;
  text-align: start;
  box-sizing: border-box;
  padding: 12px 14px;
  min-height: 48px;
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--elev);
  color: var(--text);
  cursor: pointer;
}
.opt[aria-pressed="true"] {
  border-color: var(--yellow);
  background: #2A2308;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 48px;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  max-width: 100%;
}
.btn-primary {
  background: var(--yellow);
  color: #111;
  border-color: var(--yellow);
}
.btn-book {
  background: var(--red);
  color: #FFF8E7;
  border-color: var(--red);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.actions { display: flex; flex-direction: column; flex-wrap: wrap; gap: 8px; min-width: 0; }
.actions .btn, .cta { width: 100%; }

.result {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--elev);
}
.unlocked {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.fact {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  min-width: 0;
}
.fact:first-child { border-top: 0; padding-top: 0; }
.fact span {
  display: block;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.note, .also { color: var(--muted); font-size: 0.95rem; }
.also { color: var(--text); }

.rule {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 22px 0 16px;
}
.callout {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #161210;
  min-width: 0;
}
.age {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 700;
}
.footer-text { color: var(--muted); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
