/* 进站口令页（2026-11-10）——独立样式，不依赖 style.css：闸门页必须能在
   只放行 /web/gate.* 与静态后缀的前提下完整渲染，任何一处外链缺失都会让访客
   看到一页裸 HTML。深色为主，跟随系统浅色偏好；390 宽不横向溢出。 */

:root {
  --bg: #0a0d12;
  --bg-elev: #121722;
  --line: #222a38;
  --fg: #e8eef8;
  --fg-dim: #93a1b5;
  --accent: #4c8dff;
  --danger: #ff6b6b;
  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb;
    --bg-elev: #ffffff;
    --line: #dde3ee;
    --fg: #16202e;
    --fg-dim: #5d6b80;
    --accent: #2f6fe4;
    --danger: #c03434;
  }
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
}

body.gate {
  margin: 0;
  padding: 24px 16px 32px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(76, 141, 255, .10), transparent 60%), var(--bg);
  color: var(--fg);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

.gate-wrap {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  letter-spacing: .02em;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--accent);
  background: rgba(76, 141, 255, .10);
  border: 1px solid var(--line);
  flex: none;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.card h1 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.card p {
  margin: 6px 0 0;
  color: var(--fg-dim);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.gate-form {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate-form label {
  font-size: 13px;
  color: var(--fg-dim);
}

/* 2026-11-10（每人一个）：名字 + PIN 两个字段，竖排；hidden 必须真的隐藏，
   否则 display:flex 会盖掉 [hidden] 的 UA 规则（password 模式要收起名字框）。 */
.gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gate-form [hidden] {
  display: none !important;
}

.gate-form input {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  font-size: 16px; /* iOS 低于 16px 会自动放大页面 */
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.gate-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 141, 255, .18);
}

.gate-form button {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter .15s ease, opacity .15s ease;
}

.gate-form button:hover { filter: brightness(1.06); }
.gate-form button:active { filter: brightness(.94); }
.gate-form button[disabled] { opacity: .6; cursor: default; }

.gate-error {
  margin: 0;
  padding: 9px 11px;
  font-size: 13px;
  color: var(--danger);
  background: rgba(255, 107, 107, .08);
  border: 1px solid rgba(255, 107, 107, .28);
  border-radius: 9px;
  overflow-wrap: anywhere;
}

.gate-tip {
  margin: 14px 0 0;
  color: var(--fg-dim);
  font-size: 12px;
  line-height: 1.55;
}

.gate-foot {
  margin: 0;
  text-align: center;
  color: var(--fg-dim);
  font-size: 12px;
  opacity: .8;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.gate-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.gate-actions a.primary {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

code {
  padding: 1px 5px;
  font-size: 12px;
  border-radius: 5px;
  background: rgba(127, 127, 127, .16);
  overflow-wrap: anywhere;
}
