:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Noto Sans TC', 'PingFang TC', sans-serif;
  line-height: 1.55;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1 { margin: 0; font-size: 1.75rem; line-height: 1.24; letter-spacing: 0.025em; }
form { margin: 0; }
input, button, textarea { font: inherit; }
input, button, textarea { border-radius: 9px; width: 100%; }
input, textarea { border: 1px solid var(--field-border); color: var(--input-text); background: var(--field); padding: 12px 14px; }
button { border: 1px solid transparent; min-height: 48px; font-weight: 700; cursor: pointer; color: var(--action-text); background: var(--action); }
button:hover { background: var(--action-hover); }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
input::placeholder { color: var(--muted); opacity: 1; }
.notice { margin: 0; font-size: 0.9375rem; color: var(--notice); }

.gate {
  --field-border: #394b67;
  --field: #101b2b;
  --input-text: #f6f8fb;
  --muted: #9dacc2;
  --action: #a7dcff;
  --action-hover: #c5e9ff;
  --action-text: #0b2236;
  --focus: #9acffc;
  --notice: #ffc4b9;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 1.25rem;
  background: radial-gradient(ellipse at 53% 21%, #263d5c 0%, #111e30 46%, #0a1320 100%);
  color: #f5f8fd;
  color-scheme: dark;
}
.gate main { width: min(100%, 34rem); }
.entry-card, .content-card {
  width: min(100%, 24rem);
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid #364964;
  border-radius: 22px;
  background: #162337;
  box-shadow: 0 24px 80px #060d1780;
}
.entry-card { text-align: center; }
.entry-card h1 { margin-bottom: 1.5rem; }
.entry-card form { display: grid; gap: 0.85rem; }
.entry-card input { min-height: 54px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0.14em; }
.entry-card input::placeholder { letter-spacing: 0.025em; }
.entry-hint { margin: 0; color: #d3e1f3; font-size: 0.9375rem; }
.content-card { width: 100%; overflow-wrap: anywhere; }
.content-card p { margin-bottom: 0; color: #cbd8e9; white-space: pre-wrap; }
.content-card p:empty { display: none; }

.admin {
  --field-border: #bdc8d7;
  --field: #ffffff;
  --input-text: #132338;
  --muted: #54647a;
  --action: #173f65;
  --action-hover: #1b4c79;
  --action-text: white;
  --focus: #2c6298;
  --notice: #304b67;
  padding: clamp(1rem, 5vw, 3.5rem) 1rem;
  background: #ecf1f6;
  color: #142235;
}
.admin-card {
  width: min(100%, 38rem);
  margin-inline: auto;
  background: #ffffff;
  padding: clamp(1.25rem, 5vw, 2.4rem);
  border: 1px solid #d0dae7;
  border-radius: 17px;
  box-shadow: 0 12px 32px #16304c13;
}
.admin-card.login { max-width: 24rem; }
.login form { margin-top: 1.5rem; display: grid; gap: 0.7rem; }
.admin-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 1px solid #e2e8f0; padding-bottom: 1.15rem; margin-bottom: 1.25rem; }
.state { color: #54647a; margin: 0.3rem 0 0; }
.secondary { color: #1c4569; background: #edf3f9; padding: 0.45rem 0.8rem; min-height: 42px; white-space: nowrap; }
.secondary:hover { background: #e0ebf5; }
.settings { display: grid; gap: 1rem; }
.settings label, .login label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
.settings small { color: #54647a; display: block; margin-top: 0.25rem; }
textarea { resize: vertical; }
