/* 공통 토큰과 컴포넌트. 메인, 물품 신청, 관리 페이지가 함께 씁니다. */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --ink: #18202e; --muted: #5b6577; --line: #dde2ec;
  --accent: #1d4c9e; --accent-soft: #d9e3f5; --red: #c3303c; --ok: #1f7a4d; --ok-soft: #cfe9db;
  --f-display: "Do Hyeon", "IBM Plex Sans KR", system-ui, sans-serif;
  --f-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --f-num: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111620; --surface: #1a2130; --ink: #e8ecf3; --muted: #9aa5b8; --line: #2c3547;
    --accent: #7ea6ef; --accent-soft: #24365a; --red: #ef7b84; --ok: #6fd19e; --ok-soft: #1d4232;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.55; }
a { color: var(--accent); }
h1, h2 { font-family: var(--f-display); font-weight: 400; text-wrap: balance; margin: 0; }
h1 { font-size: 2.1rem; line-height: 1.15; }
h2 { font-size: 1.35rem; }
h3 { margin: 0; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar nav { max-width: 760px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.topbar .home { font-family: var(--f-display); font-size: 1.1rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.topbar a:not(.home) { color: var(--muted); text-decoration: none; }
.topbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }

.wrap { max-width: 760px; margin: 0 auto; padding-block: 28px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 28px; }
.eyebrow { font-size: .78rem; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
.lede { color: var(--muted); margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font-size: .82rem; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.chip.end { background: transparent; color: var(--red); border: 1px solid var(--red); }
.notice { font-size: .85rem; color: var(--muted); border-left: 3px solid var(--red); padding: 4px 0 4px 10px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 12px; }
.panel p { margin: 0; }
ul.plain, ol.plain { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.summary div { background: var(--surface); padding: 12px 14px; display: grid; gap: 2px; }
.summary b { font-family: var(--f-num); font-size: 1.4rem; font-weight: 500; }
.summary span { font-size: .8rem; color: var(--muted); }

button, .btn { font: inherit; font-size: .9rem; font-weight: 500; border-radius: 8px; padding: 8px 14px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--surface); cursor: pointer; text-decoration: none; display: inline-block; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); }
button.sm { padding: 4px 10px; font-size: .82rem; }
button.danger { background: transparent; border-color: var(--line); color: var(--red); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select { font: inherit; font-size: .9rem; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); min-width: 0; width: 100%; }
input[type="checkbox"] { width: auto; }
label.field { display: grid; gap: 3px; font-size: .78rem; color: var(--muted); min-width: 0; }
.status { font-size: .85rem; color: var(--muted); }
.status.err { color: var(--red); }
.status.ok { color: var(--ok); }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .76rem; color: var(--muted); font-weight: 700; }

@media (max-width: 620px) { h1 { font-size: 1.75rem; } .topbar nav { gap: 6px 14px; } }

/* 날짜 목록 (메인, 준비 일정) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline > li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { font-family: var(--f-num); font-size: .88rem; color: var(--muted); display: grid; align-content: start; gap: 2px; }
.timeline .when small { font-family: var(--f-body); font-size: .72rem; }
.timeline .what { min-width: 0; font-weight: 700; }
.timeline .what ul { margin: 2px 0 0; padding: 0; list-style: none; font-weight: 400; color: var(--muted); font-size: .86rem; }
.timeline > li.past { opacity: .5; }
.timeline > li.next .when { color: var(--red); font-weight: 700; }
.timeline > li.next .what > span::after { content: "다음 모임"; margin-left: 8px; font-size: .72rem; color: var(--red); border: 1px solid var(--red); border-radius: 999px; padding: 1px 7px; vertical-align: 2px; font-weight: 500; }
.timeline > li.hl .what > span { color: var(--accent); }

/* 표 형태의 일정·명단 */
.grid-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.grid-table th, .grid-table td { white-space: normal; vertical-align: top; text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.grid-table th { background: var(--bg); }
.section-head { display: grid; gap: 4px; }
