:root {
  --bg: #07140f;
  --felt: #0e2a20;
  --card: #143028;
  --gold: #e7c56a;
  --ink: #f4f1e8;
  --muted: #b7c7be;
  --line: rgba(231, 197, 106, .35);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.5 "Segoe UI", "PingFang SC", sans-serif;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(231, 197, 106, .16), transparent 60%),
    var(--bg);
}
a { color: var(--gold); }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 22px;
  background: rgba(7, 20, 15, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand b { letter-spacing: .14em; font-size: 18px; }
.top-tools { display: flex; align-items: center; gap: 10px; }
.text-btn, .lang select, .ghost, .btn, .hall button, .x, .chat {
  font: inherit; color: inherit;
}
.text-btn {
  text-decoration: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px;
}
.lang select {
  background: #0c1f18; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 12px;
}
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 80px; }
.intro {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px;
  align-items: center; padding: 28px 0 10px;
}
h1, h2 { font-weight: 650; letter-spacing: .02em; }
h1 { font-size: clamp(32px, 5vw, 52px); margin: 0 0 8px; }
.intro-copy p, .welcome { color: var(--muted); }
.center { text-align: center; }
.auth, .sheet-card, .age-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}
.auth h2 { margin: 0 0 12px; }
.auth label { display: block; margin: 8px 0; font-size: 14px; color: var(--muted); }
.auth input[type="email"], .auth input[type="password"], #note {
  width: 100%; margin-top: 4px; padding: 10px 12px;
  border-radius: 12px; border: 1px solid var(--line);
  background: #0c1f18; color: var(--ink);
}
.check { font-size: 14px; }
.auth-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn, .age button, .ghost {
  border-radius: 999px; padding: 10px 16px; cursor: pointer; border: 0;
}
.btn.gold, #age-yes { background: var(--gold); color: #1a1406; font-weight: 700; }
.btn.line, .ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.error { color: #ffb4b4; }
.signed { color: var(--gold); }
.hall { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.hall button {
  padding: 0; border: 0; background: #10261d; color: inherit; text-align: left;
  border-radius: 16px; overflow: hidden; cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
.hall img { width: 100%; height: 148px; object-fit: cover; display: block; }
.hall span { display: block; padding: 8px 10px 12px; font-size: 13px; }
.full, .portrait { width: 100%; border-radius: 16px; display: block; }
.portrait {
  width: min(100%, 560px); max-height: 64vh; margin: 0 auto 14px;
  object-fit: contain; background: #07140f;
}
.gate { text-align: center; }
.gate p { margin: 0 0 12px; color: var(--muted); }
.gate .auth-actions { justify-content: center; }
a.btn { display: inline-block; text-decoration: none; text-align: center; }
.full.deal { transform: scale(1.02); filter: brightness(1.15); transition: .35s ease; }
.chip-line { color: var(--gold); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #10261d; border: 1px solid var(--gold); border-radius: 999px;
  padding: 8px 14px; z-index: 20;
}
.foot {
  display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: center;
  padding: 18px; border-top: 1px solid var(--line);
}
.foot a { color: var(--muted); text-decoration: none; }
.chat {
  position: fixed; right: 16px; bottom: 16px; text-decoration: none;
  background: var(--gold); color: #1a1406; border-radius: 999px; padding: 10px 14px;
  font-weight: 700;
}
.age {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center; padding: 20px;
  background: rgba(0,0,0,.72);
}
.age[hidden], .sheet[hidden], .toast[hidden], .error[hidden], .signed[hidden] { display: none; }
.age-card { width: min(420px, 100%); text-align: center; }
.age-card button, .gift .btn { margin: 6px; }
.gift { z-index: 32; }
.gift h1 { font-size: min(34px, 5.6vw); line-height: 1.35; white-space: nowrap; }
.sheet {
  position: fixed; inset: 0; z-index: 25;
  display: grid; place-items: center; padding: 18px;
  background: rgba(0,0,0,.62);
}
.sheet-card { width: min(720px, 100%); max-height: min(88vh, 900px); overflow: auto; position: relative; }
.sheet-card h2 { margin: 0 48px 12px 0; }
.x {
  position: absolute; top: 12px; right: 12px;
  height: 36px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); background: #0c1f18; cursor: pointer;
}
html[dir="rtl"] .x { right: auto; left: 12px; }
html[dir="rtl"] .chat { right: auto; left: 16px; }
html[dir="rtl"] .sheet-card h2 { margin-right: 0; margin-left: 48px; }
@media (max-width: 900px) {
  .intro, .hall { grid-template-columns: 1fr 1fr; }
  .intro { grid-template-columns: 1fr; }
  .hall img { height: 120px; }
}
