:root {
  --bg: #0d0f12;
  --card: rgba(255, 255, 255, 0.075);
  --card-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f1ea;
  --muted: rgba(245, 241, 234, 0.66);
  --soft: rgba(245, 241, 234, 0.12);
  --line: rgba(245, 241, 234, 0.16);
  --accent: #d4a373;
  --accent-2: #7bdff2;
  --green: #9ccf93;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(212, 163, 115, 0.24), transparent 30%),
    radial-gradient(circle at 80% 12%, rgba(123, 223, 242, 0.16), transparent 28%),
    radial-gradient(circle at 55% 90%, rgba(156, 207, 147, 0.14), transparent 32%),
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 72%);
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0 0;
  margin-bottom: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #14110f;
  background: linear-gradient(135deg, #f3d5b5, #d4a373 55%, #a47148);
  box-shadow: 0 10px 28px rgba(212, 163, 115, 0.25);
}

nav {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: .2s ease;
}

nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,.05);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items: stretch;
  min-height: 560px;
}

.hero-main,
.hero-side,
.link-card,
.note {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.045));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-main::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -160px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,163,115,.36), transparent 64%);
  filter: blur(4px);
}

.eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(212,163,115,.38);
  border-radius: 999px;
  color: #f3d5b5;
  background: rgba(212,163,115,.09);
  font-size: 13px;
  margin-bottom: 24px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(156,207,147,.13);
}

h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 760px;
  font-size: clamp(46px, 8vw, 92px);
  line-height: .92;
  letter-spacing: -0.07em;
  font-weight: 760;
}

.lead {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-size: 14px;
  font-weight: 620;
  transition: transform .2s ease, background .2s ease, border .2s ease;
}

.button:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.12);
  border-color: rgba(245,241,234,.26);
}

.button.primary {
  color: #15100c;
  border-color: transparent;
  background: linear-gradient(135deg, #f3d5b5, #d4a373);
}

.hero-side {
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 24px;
  overflow: hidden;
  position: relative;
}

.orb {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  right: -70px;
  top: -70px;
  background: radial-gradient(circle, rgba(123,223,242,.25), transparent 70%);
}

.portrait {
  position: relative;
  min-height: 310px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #15171b;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.portrait img {
  width: 100%;
  height: 100%;
  min-height: 310px;
  display: block;
  object-fit: cover;
  object-position: 50% 34%;
}

.side-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.side-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

.booking-lines {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.booking-lines p {
  color: rgba(245,241,234,.82);
  font-size: 15px;
  line-height: 1.6;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.045);
}

.stat strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.section {
  margin-top: 34px;
}

header + .section {
  margin-top: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin: 0 0 16px;
}

.section h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.05em;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.link-card {
  min-height: 190px;
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 163, 115, .42);
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
}

.tag {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(212,163,115,.12);
  color: #f3d5b5;
  font-size: 12px;
}

.link-card h3 {
  margin: 18px 0 8px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.link-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.record-card,
.social-card {
  cursor: default;
}

.record-card:hover,
.social-card:hover {
  transform: none;
}

.record-button,
.social-actions {
  width: fit-content;
}

.social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.social-button {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1;
}

.arrow {
  margin-top: 22px;
  color: var(--text);
  opacity: .78;
  font-size: 14px;
}

.note {
  margin-top: 16px;
  border-radius: 24px;
  padding: 20px 22px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .page {
    width: min(100% - 28px, 1120px);
    padding-top: 18px;
  }

  header {
    margin-bottom: 26px;
  }

  nav {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-main {
    min-height: 460px;
  }

  .links {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 10px;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-main, .hero-side {
    border-radius: 22px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .social-actions {
    width: 100%;
    flex-wrap: nowrap;
  }

  .social-button {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 6px;
    font-size: 12px;
  }
}

.subpage-hero {
  display: block;
  min-height: auto;
}

.subpage-hero .hero-main {
  min-height: 420px;
}

.quiz-hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.wide-card,
.quiz-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.045));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.wide-card {
  border-radius: 24px;
  padding: clamp(22px, 4vw, 34px);
}

.quiz-list {
  grid-template-columns: 1fr;
}

.quiz-entry {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.quiz-card {
  border-radius: 24px;
  padding: clamp(18px, 3vw, 28px);
}

.quiz-card h2,
.quiz-card h3 {
  margin-top: 0;
  letter-spacing: -0.04em;
}

.quiz-shell .section-head h1 {
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1;
}

.quiz-card p {
  color: var(--muted);
  line-height: 1.6;
}

.quiz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.quiz-shell {
  max-width: 860px;
  margin: 0 auto;
}

.quiz-panel {
  margin-top: 18px;
}

#wrap {
  padding: 0;
  font-family: inherit;
}

#prog-bg {
  height: 6px;
  background: rgba(245,241,234,.13);
  border-radius: 999px;
  margin-bottom: 22px;
  overflow: hidden;
}

#prog-fill {
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  transition: width .35s ease;
  width: 0%;
}

#cat-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

#counter {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

#qtext {
  font-size: clamp(19px, 2.4vw, 27px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

#options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  font-family: inherit;
  transition: background .16s, border-color .16s, transform .16s;
}

.opt:hover:not([disabled]) {
  background: rgba(255,255,255,.095);
  border-color: rgba(212, 163, 115, .42);
  transform: translateY(-1px);
}

.opt.correct {
  background: rgba(156,207,147,.22) !important;
  border-color: rgba(156,207,147,.78) !important;
  color: var(--text) !important;
  font-weight: 650;
}

.opt.wrong {
  background: rgba(211,91,91,.22) !important;
  border-color: rgba(211,91,91,.72) !important;
  color: var(--text) !important;
}

#exp-box {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(255,255,255,.055);
  border-left: 3px solid var(--accent);
  border-radius: 0 16px 16px 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  display: none;
}

#next-btn,
#restart-btn {
  margin-top: 20px;
  cursor: pointer;
  font-family: inherit;
}

#next-btn {
  display: none;
}

#result-box {
  display: none;
}

.result-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 740;
  letter-spacing: -0.05em;
  margin-bottom: 6px;
}

#res-sub {
  font-size: 15px;
  margin-bottom: 22px;
  font-weight: 650;
}

.sc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.sc-card {
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.sc-num {
  font-size: 28px;
  font-weight: 740;
  color: var(--text);
}

.sc-lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.cr-name {
  flex: 1.4;
  font-size: 13px;
  color: var(--muted);
}

.cr-bar-bg {
  flex: 2;
  height: 8px;
  background: rgba(245,241,234,.13);
  border-radius: 999px;
  overflow: hidden;
}

.cr-bar {
  height: 8px;
  border-radius: 999px;
}

.cr-val {
  font-size: 13px;
  color: var(--muted);
  min-width: 42px;
  text-align: right;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}

.sec-lbl {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

@media (max-width: 860px) {
  .quiz-entry {
    grid-template-columns: 1fr;
  }

  .quiz-list {
    grid-template-columns: 1fr;
  }

  .subpage-hero .hero-main {
    min-height: 320px;
  }
}

@media (max-width: 480px) {
  .sc-grid {
    grid-template-columns: 1fr;
  }

  .cat-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .cr-bar-bg {
    width: 100%;
    flex: none;
  }
}
