:root {
  color-scheme: light;
  --bg: #eff2ee;
  --surface: #fff;
  --ink: #192b26;
  --muted: #576a62;
  --line: #dce5de;
  --nav: #142c28;
  --accent: #225c4a;
  --soft: #e4f0e7;
  --gold: #8a561a;
  font: 16px/1.55 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.45rem); line-height: 1.25; letter-spacing: -.04em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { overflow-wrap: anywhere; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--accent); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #4b9e77; outline-offset: 2px; }
[hidden] { display: none !important; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
.sidebar { background: var(--nav); color: #fff; display: flex; flex-direction: column; gap: 2.4rem; padding: 1.65rem 1rem; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand > div { min-width: 0; }
.brand strong { display: block; font-size: 1.07rem; letter-spacing: .025em; }
.brand small { display: block; color: #b8d0c6; font-size: .8rem; white-space: nowrap; }
.mark { flex: none; width: 2.45rem; height: 2.45rem; border-radius: .78rem; background: #c4e0bd; color: #183b2e; display: grid; place-items: center; font-family: "Songti SC", serif; font-size: 1.37rem; font-weight: 750; }
.nav { display: grid; gap: .36rem; }
.nav button, .signout { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; border: 0; background: transparent; color: #d3e5de; font-size: .92rem; padding: .67rem .78rem; border-radius: .55rem; white-space: nowrap; }
.nav button:hover, .signout:hover { background: #203d36; }
.nav button[aria-current=page] { background: #31594c; color: white; }
.nav-icon { width: 1.1rem; text-align: center; font-size: 1.1rem; line-height: 1; }
.user { margin-top: auto; border-top: 1px solid #37534a; padding: .9rem .25rem 0; display: grid; gap: .3rem; }
.user-name { padding: 0 .5rem; overflow-wrap: anywhere; font-size: .88rem; color: #bbd2c8; }
.main { min-width: 0; width: 100%; max-width: 94rem; padding: 2.5rem clamp(1rem, 3vw, 2.9rem) 4rem; margin-inline: auto; }
.page-head, .panel-head, .toolbar, .actions, .line { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.page-head { margin-bottom: 1.55rem; align-items: end; }
.subtitle { color: var(--muted); margin-top: .35rem; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.15rem; }
.roster-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); padding: .9rem 1rem; border-radius: .82rem; min-width: 0; }
.stat small { color: var(--muted); font-size: .87rem; }
.stat strong { display: block; margin-top: .2rem; font-size: clamp(1.2rem, 3vw, 1.9rem); line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat:first-child { background: #dfece0; border-color: #cfded0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: .88rem; margin-bottom: 1rem; min-width: 0; overflow: hidden; }
.panel-head, .toolbar { padding: .95rem 1rem; border-bottom: 1px solid var(--line); }
.panel-body { padding: 1rem; }
.toolbar { justify-content: flex-start; }
.toolbar input[type=search] { flex: 1 1 15rem; }
.toolbar select, .toolbar input[type=number] { width: auto; }
.toolbar input[type=number] { max-width: 8rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.5rem; padding: .43rem .8rem; font-size: .91rem; border: 1px solid var(--line); border-radius: .5rem; color: var(--ink); background: white; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f3f8f4; }
#delete-member { color: #8a3831; }
.btn.primary { color: white; background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #194735; }
.link { border: 0; background: transparent; color: var(--accent); padding: 0; font-weight: 700; text-align: left; }
.link:hover { text-decoration: underline; text-underline-offset: .2em; }
input, textarea, select { min-width: 0; width: 100%; padding: .5rem .65rem; min-height: 2.6rem; border: 1px solid #cddad2; border-radius: .46rem; background: white; color: var(--ink); }
select { appearance: none; padding-right: 1.8rem; background-image: linear-gradient(45deg, transparent 50%, #53685d 50%), linear-gradient(135deg, #53685d 50%, transparent 50%); background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; min-height: 5.3rem; }
label { font-size: .88rem; font-weight: 650; display: grid; gap: .3rem; min-width: 0; }
label.check { display: flex; gap: .5rem; align-items: center; }
input[type=checkbox] { width: 1rem; min-height: 1rem; accent-color: var(--accent); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .7rem .95rem; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
th { color: var(--muted); background: #f7f9f7; font-size: .84rem; font-weight: 650; white-space: nowrap; }
td { font-size: .91rem; }
td:first-child { min-width: 5rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faf8; }
tfoot td { color: var(--muted); }
.sub { display: block; font-size: .78rem; color: var(--muted); }
.badge { display: inline-block; border-radius: 99px; font-size: .82rem; padding: .14rem .58rem; background: #eef1ef; color: #465b50; white-space: nowrap; }
.badge.green { background: #e2f1e7; color: #205a3e; }
.badge.pink { background: #fce7f0; color: #873450; }
.badge.blue { background: #e4eefb; color: #244c7d; }
.badge.gold { background: #f9eddc; color: var(--gold); }
.badge.red { background: #f8e9e7; color: #8a3b36; }
.empty, .loading { color: var(--muted); padding: 1.5rem; text-align: center; }
.stack { display: grid; gap: .85rem; }
.form-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem; }
.wide { grid-column: 1 / -1; }
.detail-grid dl { margin: 0; }
.detail-grid dt { font-size: .8rem; color: var(--muted); }
.detail-grid dd { margin: .2rem 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.record { border: 1px solid var(--line); border-radius: .6rem; padding: .75rem; }
.record p { margin-top: .4rem; white-space: pre-wrap; }
.hero { border: 1px solid #ccdcd1; background: #e3eee4; padding: clamp(1rem, 3vw, 1.6rem); margin: 1rem 0; border-radius: .9rem; }
.hero h1 { margin: .35rem 0; }
.hero .line { align-items: flex-end; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: #dce9de; }
.login-card { width: min(100%, 27rem); background: white; border-radius: 1.1rem; padding: clamp(1.4rem, 6vw, 2.3rem); box-shadow: 0 1.4rem 4rem #183a2820; }
.login-card .brand { margin-bottom: 1.4rem; }
.login-card .brand small { color: var(--muted); }
.login-card h1 { margin-bottom: 1rem; font-size: 1.8rem; }
.form-error { color: #8a3831; font-size: .9rem; min-height: 0; margin-bottom: .3rem; }
.form-error:empty { display: none; }
dialog { width: min(44rem, calc(100% - 1.4rem)); max-height: calc(100dvh - 2rem); border: 1px solid var(--line); border-radius: .85rem; padding: 0; color: var(--ink); }
dialog::backdrop { background: #132c26a0; }
.dialog-head, .dialog-foot { padding: .9rem 1rem; border-bottom: 1px solid var(--line); background: white; }
.dialog-head { position: sticky; top: 0; z-index: 2; }
.dialog-foot { position: sticky; bottom: 0; border-top: 1px solid var(--line); border-bottom: 0; justify-content: end; }
.dialog-body { padding: 1rem; }
.notice-description { white-space: pre-wrap; }
.notice-files { list-style: none; padding: 0; margin: .35rem 0 0; }
.notice-files li { padding: .55rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.notice-files li:last-child { border-bottom: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .8rem; }
.photo-tile { display: grid; gap: .45rem; min-width: 0; padding: 0 0 .5rem; overflow: hidden;
  border: 1px solid var(--line); border-radius: .6rem; background: white; color: var(--ink); text-align: left; }
.photo-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); }
.photo-tile span { padding-inline: .55rem; overflow-wrap: anywhere; font-size: .875rem; }
.photo-preview { display: block; width: 100%; max-height: 65vh; object-fit: contain; background: var(--bg); }
.attendees { max-height: 19rem; overflow: auto; border: 1px solid var(--line); border-radius: .6rem; }
.attendee { display: grid; grid-template-columns: minmax(0, 1fr) 7.2rem; align-items: center; gap: .65rem; padding: .5rem .65rem; border-bottom: 1px solid var(--line); }
.attendee:last-child { border-bottom: 0; }
.attendee select { font-size: .84rem; }
#notice { position: fixed; bottom: 1rem; right: 1rem; z-index: 5; max-width: calc(100vw - 2rem); background: var(--nav); color: white; padding: .65rem 1rem; border-radius: .6rem; }
.shift-search { border-bottom: 0; }
.shift-year { margin-top: 1.65rem; }
.shift-year h2 { margin-bottom: .7rem; font-size: 1.35rem; }
.shift-periods { list-style: none; margin: 0 0 0 .35rem; padding: 0 0 0 1rem; border-left: 2px solid #b9d1c2; }
.shift-period { position: relative; padding-bottom: .7rem; }
.shift-period:last-child { padding-bottom: 0; }
.shift-period::before { content: ""; position: absolute; left: -1.32rem; top: 1.38rem; width: .54rem; height: .54rem; border-radius: 50%; background: var(--accent); }
.shift-card { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; padding: .8rem; }
.shift-date { padding: .22rem .2rem; }
.shift-date p, .shift-company, .shift-empty { color: var(--muted); font-size: .875rem; }
.shift-lanes { display: flex; gap: .55rem; }
.shift-lane { flex: 1; min-width: 0; border-radius: .52rem; padding: .65rem .75rem; overflow-wrap: anywhere; }
.shift-president { background: #e6f1e8; }
.shift-secretary { background: #f6efe3; }
.shift-lane h4 { margin: 0 0 .35rem; font-size: .875rem; color: var(--muted); }
.shift-lane ul { list-style: none; margin: 0; padding: 0; }
.shift-lane li + li { border-top: 1px solid #00000013; margin-top: .45rem; padding-top: .45rem; }
.shift-role { display: inline-block; margin-inline-start: .4rem; font-size: .8rem; color: var(--muted); }
@media (max-width: 1050px) {
  .roster-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 12rem minmax(0, 1fr); }
  .sidebar { padding-inline: .7rem; }
  .main { padding-top: 1.7rem; }
}
@media (max-width: 700px) {
  .layout { display: block; }
  .sidebar { height: auto; gap: .65rem; padding: .66rem .75rem .5rem; flex-flow: row wrap; align-items: center; z-index: 3; }
  .sidebar .brand { flex: 1; }
  .sidebar .brand small, .user-name { display: none; }
  .sidebar .mark { width: 2rem; height: 2rem; border-radius: .56rem; }
  .user { margin: 0; padding: 0; border: 0; }
  .signout { padding: .42rem .55rem; }
  .nav { display: flex; gap: .25rem; width: 100%; overflow: auto; order: 3; }
  .nav button { width: auto; padding: .42rem .56rem; font-size: .86rem; gap: .35rem; }
  .main { padding: 1.25rem .75rem 2.5rem; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .roster-summary .stat:last-child { grid-column: 1 / -1; }
  .stat { padding: .7rem; }
  .page-head { margin-bottom: .95rem; }
  .toolbar, .panel-head { padding: .75rem; }
  .toolbar input[type=search] { flex-basis: 100%; }
  .responsive-table th:nth-child(n+4), .responsive-table td:nth-child(n+4) { display: none; }
  .responsive-table th, .responsive-table td { padding-inline: .7rem; }
  .responsive-table .sub { margin-top: .18rem; }
  .form-grid { grid-template-columns: 1fr; }
  .shift-card { grid-template-columns: minmax(0, 1fr); gap: .5rem; padding: .65rem; }
  .shift-date { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
  .shift-lane { padding: .55rem; }
  .shift-role { margin-inline-start: 0; display: block; }
}
