:root {
  color-scheme: dark;
  --bg: #111317;
  --panel: #191c21;
  --panel-2: #20242a;
  --text: #f2f0ea;
  --muted: #9da2aa;
  --line: #343941;
  --accent: #d7b96f;
  --error: #ef9292;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,.055), transparent 34%),
    radial-gradient(rgba(255,255,255,.045) .55px, transparent .7px),
    var(--bg);
  background-size: auto, 8px 8px, auto;
}

button, input { font: inherit; }
.access-shell {
  min-height: 100vh;
  padding: max(28px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
}

.access-card {
  width: min(430px, 100%);
  padding: clamp(30px, 7vw, 48px);
  background: linear-gradient(155deg, rgba(32,36,42,.98), rgba(23,25,29,.98));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0,0,0,.36);
}

.access-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid #4b515a;
  border-radius: 50%;
  font: 18px var(--mono);
}

.access-kicker {
  margin: 30px 0 9px;
  color: var(--accent);
  font: 600 10px var(--mono);
  letter-spacing: .22em;
}

h1 { margin: 0; font-size: clamp(30px, 8vw, 42px); line-height: 1.2; letter-spacing: .05em; }
.access-copy { margin: 15px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.75; }
form { margin: 0; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 650; }
.code-input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  color: var(--text);
  background: #111317;
  border: 1px solid #454b54;
  border-radius: 6px;
  outline: none;
  font: 700 18px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: border-color .16s, box-shadow .16s;
}
.code-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(215,185,111,.12); }
.code-input::placeholder { color: #686e77; }
.access-hint { margin: 8px 0 18px; color: var(--muted); font-size: 11px; }
.human-check { margin: 0 0 18px; }
.human-check-label { margin: 0 0 9px; font-size: 13px; font-weight: 650; }
#turnstileWidget { min-height: 65px; overflow: hidden; }
button {
  width: 100%;
  min-height: 52px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #17191d;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
button:hover { filter: brightness(1.06); }
button:focus-visible { outline: 3px solid rgba(215,185,111,.32); outline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; }
.notice-panel h2 {
  margin: 0 0 12px;
  font-size: 25px;
  letter-spacing: .04em;
}
.notice-intro { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.notice-list {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  counter-reset: notice;
}
.notice-list li {
  position: relative;
  min-height: 34px;
  margin: 0 0 12px;
  padding: 3px 0 0 42px;
  color: #dedbd4;
  font-size: 13px;
  line-height: 1.7;
  counter-increment: notice;
}
.notice-list li::before {
  content: counter(notice, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #17191d;
  background: var(--accent);
  border-radius: 50%;
  font: 700 10px var(--mono);
}
.notice-consent {
  min-height: 58px;
  margin: 0 0 16px;
  padding: 12px 13px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: #111317;
  border: 1px solid #454b54;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.65;
}
.notice-consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}
.notice-consent:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(215,185,111,.12); }
.notice-decline { margin: 13px 0 0; color: #777d86; font-size: 11px; line-height: 1.6; }
.access-message { min-height: 22px; margin: 14px 0 0; color: var(--error); font-size: 12px; }
.access-message.success { color: var(--accent); }
.access-foot {
  margin: 30px 0 0;
  padding-top: 18px;
  color: #777d86;
  border-top: 1px solid var(--line);
  font: 10px var(--mono);
  letter-spacing: .08em;
}

@media (max-width: 480px) {
  .access-shell { padding-left: 14px; padding-right: 14px; }
  .access-card { padding: 30px 24px; border-radius: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media (forced-colors: active) {
  button, input, .access-card, .access-mark { border: 1px solid CanvasText; }
}
