:root {
  color-scheme: light;
  --forest: #1c3e2f;
  --forest-dark: #142e22;
  --cream: #f7f7f5;
  --text: #24372d;
  --muted: #5b6a60;
  --line: #e1e8e0;
  --white: #fff;
  --green-bg: #e3efe6;
  --green-fg: #1d5437;
  --orange-bg: #fce9df;
  --orange-fg: #9d3b1c;
  --gray-bg: #efefed;
  --gray-fg: #505952;
  --blue-bg: #e6edf7;
  --blue-fg: #355c86;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 285px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .56; }
a { color: inherit; }
p, h1, h2, h3, dl, dd { margin: 0; }
button, a { -webkit-tap-highlight-color: #1c3e2f24; }
:focus-visible { outline: 3px solid #a44f27; outline-offset: 3px; }

.shell { width: min(1112px, 100% - 48px); margin-inline: auto; }
.site-head { border-bottom: 1px solid #e7ebe4; background: #fbfcf9; }
.head-inner { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; font-size: 20px; font-weight: 760; color: var(--forest); letter-spacing: .04em; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #f5f4df; background: var(--forest); flex: none; }
.brand-sub { margin-left: .18em; }
.head-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--forest); white-space: nowrap; }
.head-label i { width: 7px; height: 7px; border-radius: 50%; background: #417254; }

.hero {
  position: relative; display: flex; align-items: center; isolation: isolate; overflow: hidden;
  margin: 24px 0 20px; min-height: 242px; padding: 34px 48px; border-radius: 24px;
  color: #fffaf0; background: #273b24 url("study-room.webp") center 59% / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #142818db 0%, #182a1c60 55%, transparent 90%); }
.hero-kicker { color: #e1e8d5; font-size: 13px; letter-spacing: .21em; font-weight: 620; margin-bottom: 12px; }
.hero h1 { font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif; font-size: clamp(33px, 5.4vw, 52px); line-height: 1.17; letter-spacing: .035em; font-weight: 700; }
.hero-copy { color: #f4f1e7; font-size: 15px; margin-top: 15px; line-height: 1.75; }

.board { overflow: clip; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 26px #1b3a2910; }
.store-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; background: #eff3ed; }
.store-tabs button { min-height: 46px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 690; }
.store-tabs button[aria-pressed="true"] { background: var(--forest); color: #fff; box-shadow: 0 3px 8px #1c3e2f20; }
.store-tabs button[aria-pressed="false"]:hover { background: #e3ebe1; }
.board-body { padding: 26px 28px 31px; }
.board-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.board-heading h2 { color: var(--forest); font-size: 25px; line-height: 1.3; }
.updated { color: var(--muted); font-size: 13px; margin-top: 6px; }
.availability { display: flex; align-items: baseline; gap: 6px; color: var(--forest); background: #edf4eb; border: 1px solid #dfebdf; border-radius: 12px; padding: 8px 12px; white-space: nowrap; font-size: 13px; }
.availability strong { font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.board-tools { display: flex; justify-content: space-between; align-items: center; gap: 11px 17px; flex-wrap: wrap; padding-block: 18px 16px; border-bottom: 1px solid #e9eee8; }
.filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.filters button { background: #fff; border: 1px solid #dfe8df; color: #3d5245; min-height: 42px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 630; white-space: nowrap; }
.filters button:hover { border-color: #62856d; }
.filters button[aria-pressed="true"] { color: var(--forest); border-color: #a7c3ac; background: #e7f0e6; }
.legend { list-style: none; display: flex; gap: 9px 15px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0; padding: 0; }
.legend li { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; flex: none; border-radius: 50%; background: #888e88; }
.dot.available { background: #296546; }
.dot.soon { background: #d95427; }
.dot.hold, .dot.maintenance { background: #4b78a9; }
.seat-group { margin-top: 20px; }
.seat-group + .seat-group { margin-top: 23px; }
.seat-group h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--forest); margin-bottom: 10px; }
.seat-group h3 i { width: 4px; height: 14px; border-radius: 9px; background: #65846c; }
.seat-group h3 span { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.seat-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; }
.seat { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; min-height: 73px; padding: 8px 12px; text-align: left; border: 1px solid transparent; border-radius: 11px; }
.seat.available { color: var(--green-fg); background: var(--green-bg); border-color: #cee4d2; }
.seat.soon { color: var(--orange-fg); background: var(--orange-bg); border-color: #f3d6c6; }
.seat.occupied { color: var(--gray-fg); background: var(--gray-bg); border-color: #e8e9e6; }
.seat.hold, .seat.maintenance { color: var(--blue-fg); background: var(--blue-bg); border-color: #d9e3f0; }
button.seat { transition: box-shadow .16s, border-color .16s, transform .16s; }
button.seat:hover { box-shadow: 0 2px 8px #1b3a291b; border-color: currentColor; }
button.seat:active { transform: scale(.97); }
.seat-number { letter-spacing: .015em; font-size: clamp(13px, 2.9vw, 20px); line-height: 1.08; font-variant-numeric: tabular-nums; font-weight: 790; overflow-wrap: anywhere; }
.seat-caption { font-size: 12px; line-height: 1.2; font-weight: 590; }
.notice { border: 1px solid #e4e8d1; background: #f5f5e9; color: #48553a; padding: 11px 13px; border-radius: 10px; margin-top: 14px; font-size: 13px; line-height: 1.65; }
.notice.error { background: #fff3eb; border-color: #f3d9c9; color: #8c3e22; }
.inline-btn { padding: 3px 5px; min-height: 34px; color: inherit; border: 0; background: transparent; font-size: inherit; font-weight: 700; text-decoration: underline; }
.empty { text-align: center; color: var(--muted); line-height: 1.7; padding: 32px 10px 14px; font-size: 14px; }
.footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 9px; min-height: 65px; color: var(--muted); font-size: 12px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer a { display: flex; align-items: center; min-height: 44px; padding-inline: 5px; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 13px; border: 1px solid transparent; border-radius: 10px; text-align: center; text-decoration: none; font-size: 14px; line-height: 1.4; font-weight: 670; }
.btn.primary { color: #fff; background: var(--forest); }
.btn.primary:hover:not(:disabled) { background: var(--forest-dark); }
.btn.secondary { color: var(--forest); border-color: #cadccc; background: #eff5ed; }
.btn.secondary:hover:not(:disabled) { background: #e2eee1; }
.btn.text { color: var(--forest); background: transparent; }
.btn.text:hover { background: #ebf0e8; }
.btn.danger { color: #9d3a20; background: #fff0e9; border-color: #f4d9cb; }
.full { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.subtle { color: var(--muted); line-height: 1.65; font-size: 13px; }
.stack { display: grid; align-content: start; gap: 12px; }
.stack label, label.stack, .form-grid label { display: grid; gap: 6px; color: #405146; font-weight: 640; font-size: 13px; }
input:not([type="checkbox"]), textarea, select { width: 100%; min-width: 0; color: var(--text); font-size: 16px; line-height: 1.45; font-weight: 450; background: #fcfdfa; border: 1px solid #cbd8cc; border-radius: 9px; padding: 9px 10px; }
input:not([type="checkbox"]), select { min-height: 44px; }
textarea { display: block; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6b786e; opacity: 1; }
.form-error { font-size: 13px; color: #a63c20; }

dialog { padding: 24px; width: min(480px, 100% - 32px); max-height: min(85vh, 85dvh); border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--text); box-shadow: 0 16px 52px #0e261d39; }
dialog[open] { animation: arrive .18s ease-out; }
dialog::backdrop { background: #11251dc0; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.dialog-head h2 { color: var(--forest); font-size: 28px; line-height: 1.2; }
.dialog-kicker { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .1em; margin-bottom: 5px; }
.icon-btn { flex: none; border-radius: 50%; min-width: 44px; min-height: 44px; background: #f0f3ef; border: 0; color: var(--forest); font-size: 25px; line-height: 1; }
.selection-state { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 6px 10px; font-size: 13px; font-weight: 650; color: var(--green-fg); background: var(--green-bg); }
.selection-state.soon { color: var(--orange-fg); background: var(--orange-bg); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.detail-grid > div { border: 1px solid #e4eae2; background: #f7f9f5; border-radius: 10px; padding: 9px 10px; min-width: 0; }
.detail-grid dt { color: var(--muted); font-size: 12px; }
.detail-grid dd { color: var(--forest); font-size: 14px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; margin-top: 2px; }
.dialog-section { margin-top: 15px; margin-bottom: 7px; color: var(--forest); font-size: 14px; }
.dialog-section ~ .btn { margin-top: 14px; }
.price-list { display: flex; gap: 6px; flex-wrap: wrap; }
.price-list div { display: flex; gap: 5px; align-items: baseline; font-size: 13px; border-radius: 8px; padding: 5px 8px; background: #f1f3ec; color: var(--muted); }
.price-list dd { color: var(--forest); font-weight: 720; }
.contact { border-top: 1px solid var(--line); margin-top: 14px; text-align: center; padding-top: 12px; display: grid; justify-items: center; gap: 7px; font-size: 13px; color: #455a4c; }
.contact img, .qr-preview { display: block; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid #dbe5db; padding: 4px; }
.poster-dialog { width: min(530px, 100% - 24px); }
.poster-pages { display: grid; gap: 17px; margin-top: 10px; }
.poster-pages > div { display: grid; gap: 8px; }
.poster-img { display: block; width: 100%; border-radius: 11px; border: 1px solid var(--line); }
.copy-helper { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.toast { position: fixed; z-index: 4; max-width: min(440px, 100% - 32px); left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); border-radius: 11px; padding: 10px 14px; background: var(--forest-dark); color: white; box-shadow: 0 3px 16px #142e2238; font-size: 13px; text-align: center; }

.admin { margin-top: 24px; min-height: min(55vh, 550px); }
.login-card, .admin-panel { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.login-card { max-width: 426px; margin: 42px auto; box-shadow: 0 6px 24px #1b3a2910; }
.login-card h1, .admin-heading h1 { color: var(--forest); font-size: clamp(23px, 5.5vw, 31px); }
.login-card form { margin-top: 18px; }
.return-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 7px; color: var(--forest); font-size: 13px; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 17px; }
.admin-tabs { border: 1px solid var(--line); border-radius: 15px; }
.admin-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; margin: 13px 0; }
.draft-label { color: var(--muted); font-size: 12px; }
.admin-notice { margin: 0 0 13px; }
.admin-panel h2 { color: var(--forest); font-size: 20px; margin-bottom: 8px; }
.admin-panel > .subtle, .admin-panel > .stack, .admin-panel > button { margin-top: 10px; }
.admin-panel form { margin-top: 10px; }
.admin-panel .actions + .subtle { margin-top: 7px; }
.admin-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.form-grid .wide { grid-column: 1 / -1; }
.stack label.checkbox { display: flex; align-items: center; min-height: 36px; gap: 7px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--forest); }
.admin-seat-map { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 13px; }
.import-actions { margin-top: 10px; }
.diff { margin-top: 15px; }
.diff-summary { display: flex; flex-wrap: wrap; gap: 7px; }
.diff-summary span { padding: 4px 8px; background: #f1f2ed; border-radius: 7px; font-size: 12px; color: var(--muted); }
.diff-summary .count-add { background: var(--green-bg); color: var(--green-fg); }
.diff-summary .count-edit { background: var(--orange-bg); color: var(--orange-fg); }
.import-issues { padding-left: 19px; font-size: 13px; line-height: 1.65; color: var(--orange-fg); }
.diff-table { overflow-x: auto; margin-top: 9px; border: 1px solid var(--line); border-radius: 10px; }
.diff-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.diff-table th, .diff-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.diff-table thead { background: #f5f7f1; }
.diff-table tbody tr:last-child > * { border-bottom: 0; }
.diff-table small { display: block; margin-top: 3px; }
.diff-table .added td:last-child, .diff-table .added small { color: var(--green-fg); }
.diff-table .changed td:last-child, .diff-table .changed small { color: var(--orange-fg); }
.share-link { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.qr-preview { margin-top: 8px; }

@media (max-width: 890px) {
  .seat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 28px); }
  .head-inner { min-height: 57px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .head-label { font-size: 12px; }
  .hero { margin: 13px 0 13px; min-height: 191px; padding: 20px; border-radius: 17px; background-position: 59% 56%; }
  .hero::before { background: linear-gradient(90deg, #132519df 0%, #17291bb3 51%, #17291b20 100%); }
  .hero-kicker { font-size: 11px; margin-bottom: 10px; }
  .hero h1 { font-size: clamp(27px, 8vw, 39px); }
  .hero-copy { font-size: 13px; margin-top: 10px; }
  .hero-copy span { display: block; }
  .board { border-radius: 15px; }
  .store-tabs { padding: 5px; gap: 4px; }
  .store-tabs button { border-radius: 10px; font-size: 14px; min-height: 44px; padding-inline: 4px; }
  .board-body { padding: 17px 11px 22px; }
  .board-heading h2 { font-size: 22px; }
  .updated { margin-top: 4px; font-size: 12px; }
  .availability { padding: 6px 8px; }
  .availability strong { font-size: 24px; }
  .board-tools { padding-block: 13px 12px; gap: 12px; }
  .filters { gap: 5px; }
  .filters button { padding-inline: 9px; font-size: 12px; min-height: 41px; }
  .legend { gap: 7px 10px; font-size: 11px; }
  .seat-group { margin-top: 15px; }
  .seat-group + .seat-group { margin-top: 17px; }
  .seat-group h3 { font-size: 15px; margin-bottom: 8px; }
  .seat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .seat { min-height: 64px; gap: 4px; padding: 6px 5px; border-radius: 8px; text-align: center; }
  .seat-number { font-size: clamp(14px, 4.2vw, 19px); }
  .seat-caption { font-size: 11px; white-space: normal; }
  .footer { min-height: 55px; }
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 19px 19px 0 0; max-height: min(88vh, 88dvh); box-shadow: 0 -10px 40px #0e261d37; }
  .poster-dialog { width: 100%; }
  .admin { margin-top: 16px; }
  .admin-panel, .login-card { padding: 15px; }
  .admin-columns { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diff-table th, .diff-table td { padding: 6px; font-size: 12px; }
}
@media (max-width: 340px) {
  .shell { width: calc(100% - 18px); }
  .seat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
