:root {
  color-scheme: light;
  --paper: #f7faff;
  --ink: #243452;
  --pink: #c52b70;
  --lake: #18768c;
  --lilac: #e9e4fa;
  --line: #d9e1ed;
  --muted: #53627b;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; line-height: 1.65; }
[hidden] { display: none !important; }
a { color: var(--lake); text-underline-offset: .25em; }
a, button, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
:focus { scroll-margin-block: 24px; }
h1, h2, h3, h4, p { margin: 0 0 14px; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.35; letter-spacing: -.025em; }
h2 { font-size: 1.2rem; font-weight: 850; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
button, input, select { font: inherit; }
select { display: block; width: 100%; min-height: 46px; border: 1px solid #8696ae; border-radius: 4px; background: white; color: var(--ink); padding: 9px 12px; }
select:disabled { background: #edf1f7; }
button, .topbar a, #member-nav a { min-height: 44px; }
button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--lake); border-radius: 5px; background: var(--lake); color: white; padding: 9px 16px; cursor: pointer; line-height: 1.4; font-weight: 700; }
button:hover:not(:disabled) { filter: brightness(.92); }
button:disabled { cursor: not-allowed; background: #e4e9f1; color: #53627b; border-color: #b9c5d6; }
button.secondary { background: transparent; color: var(--lake); border-color: var(--line); }
button.secondary:disabled { color: var(--muted); }
.topbar { max-width: 1040px; margin: auto; padding: 20px 24px 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.topbar a { display: inline-flex; align-items: center; text-decoration: none; padding: 6px 0; }
.brand { font-weight: 900; color: var(--ink); gap: 12px; }
.brand span { font-size: .8rem; font-weight: 500; color: var(--muted); }
.topbar nav { display: flex; gap: 22px; }
.topbar [aria-current] { box-shadow: inset 0 -2px var(--pink); color: var(--pink); }
.shell { max-width: 1000px; margin: auto; padding: 30px 24px 56px; }
.page-heading { margin-bottom: 28px; }
.page-heading > p:last-child { color: var(--muted); }
.eyebrow { color: var(--lake); letter-spacing: .1em; font-size: .78rem; font-weight: 800; }
.small, small { color: var(--muted); font-size: .85rem; }
footer { max-width: 952px; margin: 0 auto; border-top: 1px solid var(--line); padding: 20px 24px; color: var(--muted); font-size: .8rem; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; background: white; padding: 12px; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.status { padding: 12px 14px; background: #eaf2f7; border-left: 3px solid var(--lake); overflow-wrap: anywhere; }
.notice, .note { background: var(--lilac); padding: 16px; border-radius: 5px; font-size: .9rem; }
.member-layout { display: grid; grid-template-columns: minmax(180px, .6fr) minmax(0, 1.4fr); gap: 36px; align-items: start; }
.member-guide nav { display: grid; gap: 4px; margin-bottom: 20px; }
#member-nav a { display: flex; align-items: center; padding: 8px 12px; text-decoration: none; border-left: 3px solid transparent; }
#member-nav [aria-current] { border-color: var(--pink); color: var(--pink); font-weight: 800; background: white; }
.note h2 { font-size: 1rem; }
.note p:last-child { margin-bottom: 0; }
.member-content { min-width: 0; }
.member-content section[data-panel] { margin-top: 24px; }
.member-content strong { overflow-wrap: anywhere; }
form { margin: 20px 0 28px; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
legend { font-weight: 800; padding: 0; margin-bottom: 12px; font-size: 1.1rem; }
label { display: block; font-weight: 700; margin: 18px 0 6px; }
input { display: block; width: 100%; min-height: 46px; border: 1px solid #8696ae; border-radius: 4px; background: white; color: var(--ink); padding: 9px 12px; }
input:disabled { background: #edf1f7; }
small { display: block; margin-top: 5px; }
form button { margin-top: 20px; }
form .notice { margin-top: 16px; }
#password-form, #code-form { border-top: 1px solid var(--line); padding-top: 24px; }
#retry-session { margin-bottom: 16px; }
.secret-panel { background: var(--lilac); border: 2px solid var(--pink); padding: 18px; margin: 24px 0; }
.secret-panel output { display: block; padding: 12px; background: white; font-family: ui-monospace, monospace; overflow-wrap: anywhere; user-select: all; margin-bottom: 16px; }
.birthday-spread { display: grid; grid-template-columns: 1.3fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
.calendar-paper { padding: 24px; }
.calendar-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.calendar-heading h2, .section-heading h2 { margin: 0; }
.month-controls { display: flex; gap: 6px; }
.month-controls button { min-width: 44px; padding: 8px; }
.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 16px 0; font-variant-numeric: tabular-nums; }
.calendar th { font-size: .8rem; color: var(--muted); font-weight: 500; padding-bottom: 10px; }
.calendar td { text-align: center; height: 42px; border-top: 1px solid var(--line); }
.calendar [aria-current="date"] { background: var(--pink); color: white; font-weight: 800; }
.memorial-card { background: var(--lilac); border-left: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.card-mark { width: 90px; height: 104px; display: grid; place-items: center; color: var(--pink); font-size: 3.5rem; font-weight: 900; border: 1px solid #b4a6d5; border-radius: 46px 46px 5px 5px; margin: 10px 0 20px; }
.memorial-card h2 { color: var(--pink); letter-spacing: .1em; }
.memorial-card p { font-size: .9rem; }
.card-bottom { width: 100%; border-top: 1px solid #c6badf; margin-top: 20px; padding-top: 12px; font-size: .75rem; color: var(--muted); }
.content-section { margin-top: 32px; }
.prediction-boundary { display: flex; gap: 16px; align-items: center; margin-top: 20px; }
.prediction-boundary button { flex-shrink: 0; }
.prediction-boundary p { margin: 0; font-size: .9rem; color: var(--muted); }
.season { border: 1px solid var(--line); padding: 18px; margin: 16px 0; overflow-wrap: anywhere; }
.badge { color: var(--pink); font-weight: 700; font-size: .85rem; }
.round { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.season-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.season-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); }
.boundary-note { margin: 12px 0; }
.predict-box { margin-top: 12px; background: #f2f6fc; border-radius: 6px; padding: 14px 16px; }
.predict-box form { margin: 8px 0 0; }
.predict-box form button { margin-top: 14px; }
.my-prediction { font-weight: 700; }
.login-guide { margin: 0; }
.timeline-predictions { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.timeline-predictions li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hit, .miss { font-size: .78rem; font-weight: 800; border-radius: 999px; padding: 1px 10px; }
.hit { background: #e2f3ea; color: #1c6b45; border: 1px solid #9fd4ba; }
.miss { background: #f7e7ee; color: var(--pink); border: 1px solid #e3b3ca; }
.archive-badge { border: 1px solid #e3b3ca; border-radius: 999px; padding: 1px 10px; background: #fdf3f8; white-space: nowrap; }
table.board { width: 100%; border-collapse: collapse; margin: 12px 0; font-variant-numeric: tabular-nums; }
table.board th, table.board td { text-align: left; padding: 9px 10px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
table.board thead th { border-top: 0; color: var(--muted); font-size: .85rem; font-weight: 700; }
.profile-name { font-size: 1.3rem; font-weight: 850; overflow-wrap: anywhere; }
.picker { margin: 16px 0; max-width: 420px; }
.rules { border-top: 1px solid var(--line); padding-top: 24px; }
.rules dl { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
.rules dt { font-weight: 800; margin-bottom: 6px; }
.rules dd { margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 660px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; gap: 4px 20px; }
  .brand span { display: none; }
  .topbar nav { gap: 16px; }
  .shell { padding: 24px 16px 40px; }
  .member-layout, .birthday-spread, .rules dl { grid-template-columns: minmax(0, 1fr); }
  .member-layout { gap: 24px; }
  .member-guide nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .member-guide .note { padding: 14px; }
  .calendar-paper { padding: 18px; }
  .memorial-card { border-left: 0; border-top: 1px solid var(--line); padding: 22px; }
  .card-mark { width: 70px; height: 80px; font-size: 2.7rem; margin: 4px 0 14px; }
  .prediction-boundary { align-items: flex-start; flex-direction: column; }
  .page-heading { margin-bottom: 22px; }
  table.board th, table.board td { padding: 8px 6px; font-size: .9rem; }
  .season-tabs { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
