:root {
  --ink: #131211;
  --ink-2: #2b2826;
  --ink-3: #5a5550;
  --paper: #faf7f2;
  --paper-2: #f3efe7;
  --rule: #111;
  --rule-soft: rgba(17,17,17,0.18);
  --slot: #d9d4cb;
  --slot-2: #cfc9bf;
  --font-sans: "Hanken Grotesk", "Noto Sans TC", -apple-system, system-ui, sans-serif;
  --font-tc: "Noto Sans TC", "Hanken Grotesk", -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background:
    radial-gradient(1200px 800px at 20% 0%, #efece4 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 100%, #ece7dd 0%, transparent 60%),
    #e8e3d8;
  min-height: 100vh;
  font-family: var(--font-tc);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#stage {
  min-height: 100vh;
  display: block;
}

/* ── Password Gate ── */
#gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 800px at 20% 0%, #efece4 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 100%, #ece7dd 0%, transparent 60%),
    #e8e3d8;
  font-family: var(--font-tc);
}
#gate.gate-hidden { display: none; }
.gate-card {
  background: #faf7f2;
  border: 1px solid rgba(17,17,17,0.1);
  border-radius: 16px;
  padding: 40px 36px 36px;
  width: min(360px, calc(100vw - 48px));
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  display: flex; flex-direction: column; gap: 0;
}
.gate-eyebrow {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 10px;
}
.gate-title {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--ink); margin: 0 0 6px; line-height: 1.2;
}
.gate-sub {
  font-size: 14px; color: var(--ink-3);
  margin: 0 0 28px; line-height: 1.5;
}
.gate-input-wrap { position: relative; margin-bottom: 12px; }
#gate-input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--slot);
  border-radius: 10px; font-size: 16px;
  font-family: var(--font-sans);
  background: #fff; color: var(--ink);
  outline: none; transition: border-color .15s;
  letter-spacing: .18em;
  box-sizing: border-box;
}
#gate-input:focus { border-color: var(--ink); }
#gate-input:disabled { opacity: .45; cursor: not-allowed; }
#gate-btn {
  width: 100%; padding: 13px;
  background: var(--ink); color: #fff;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer; transition: opacity .15s;
  margin-bottom: 14px;
}
#gate-btn:hover:not(:disabled) { opacity: .82; }
#gate-btn:disabled { opacity: .35; cursor: not-allowed; }
#gate-msg {
  font-size: 13px; text-align: center;
  min-height: 18px; margin: 0;
  color: #c0392b;
}
#gate-msg.ok { color: #27ae60; }

#stage[data-mode="mobile"] {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
