:root {
  --bg: #f6f3ec;
  --card: #ffffff;
  --text: #1f2a24;
  --muted: #66706a;
  --line: #e2ddd2;
  --accent: #1f6b45;
  --accent-text: #ffffff;
  --danger: #b3261e;
  --none: #c62828;
  --some: #c77700;
  --good: #2e7d32;
  --full: #6b6f73;
  --none-bg: #fdecea;
  --some-bg: #fff4e0;
  --good-bg: #e8f5e9;
  --full-bg: #eceff1;
  --urgent-bg: #fff4e0;
  --urgent-line: #f0c36d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121714;
    --card: #1b221e;
    --text: #e8ede9;
    --muted: #9aa59e;
    --line: #2c3530;
    --accent: #4caf7d;
    --accent-text: #0d1a12;
    --danger: #ef6f66;
    --none: #ff7a6e;
    --some: #f2b14c;
    --good: #6fcf7a;
    --full: #a3a9ad;
    --none-bg: #3a1d1b;
    --some-bg: #3a2b12;
    --good-bg: #183020;
    --full-bg: #262b2e;
    --urgent-bg: #33270f;
    --urgent-line: #7a5a1c;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 640px; margin: 0 auto; padding: 16px; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .6em 0 .3em; }
h2 { font-size: 1.2rem; margin: 1.4em 0 .5em; }
.muted, small, .opt { color: var(--muted); }
small { display: block; font-size: .85rem; margin-top: 4px; }

.hero { text-align: center; padding: 8px 0 4px; }
.night {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  padding: 18px 0 0;
  margin: 0 0 8px;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff9 50%, transparent),
    radial-gradient(1px 1px at 28% 42%, #fff8 50%, transparent),
    radial-gradient(1.5px 1.5px at 82% 14%, #fffa 50%, transparent),
    radial-gradient(1px 1px at 90% 48%, #fff7 50%, transparent),
    radial-gradient(1px 1px at 68% 30%, #fff6 50%, transparent),
    radial-gradient(1px 1px at 8% 62%, #fff6 50%, transparent),
    radial-gradient(60% 18% at 50% 100%, #f5d48a40, transparent),
    linear-gradient(#06102a, #10265a 70%, #1a3570);
}
.night img { display: block; height: 300px; width: auto; margin: 0 auto; filter: brightness(1.2) saturate(1.1) drop-shadow(0 0 14px #ffd98a66); }
.place { color: var(--muted); margin: .2em 0 .8em; }
.kicker { font-size: 1.7rem; line-height: 1.15; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--none); margin: .4em 0 0; }
.hero h1 { color: var(--accent); font-size: 1.25rem; margin-top: .3em; }
.hero .intro { margin-bottom: .4em; }
.hero .lead { margin-top: .4em; }

.notice { background: var(--good-bg); border: 2px solid var(--accent); border-radius: 14px; padding: 12px 16px; margin: 16px 0; }
.notice h2 { margin: 0 0 .3em; font-size: 1.1rem; color: var(--accent); }
.notice p { margin: 0; font-size: .97rem; }
.tasks { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tasks li { font-size: .9rem; border: 1.5px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 3px 12px; }

.plan h2 { margin: 0 0 .6em; color: var(--none); font-size: 1.1rem; }
.plan ol { list-style: none; padding: 0; margin: 0 0 0 6px; border-left: 3px solid var(--accent); }
.plan li { display: grid; grid-template-columns: 6.2em 1fr; gap: 8px; font-size: .95rem; line-height: 1.4; padding: 6px 8px 6px 14px; position: relative; }
.plan li::before { content: ""; position: absolute; left: -7px; top: 12px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.plan li.highlight { background: var(--some-bg); border-radius: 0 8px 8px 0; }
.plan li.highlight::before { background: var(--some); }
.plan .when { font-weight: 700; white-space: nowrap; }
.push-card h2 { margin: 0 0 .3em; font-size: 1.1rem; }
.push-card p { margin: .2em 0 .6em; font-size: .95rem; }
.push-card .btn { margin-right: 6px; }
[hidden] { display: none !important; }
.thanks { text-align: center; font-size: 1.5rem; font-weight: 700; color: var(--none); margin: 24px 0 0; }

.urgent {
  display: block;
  background: var(--urgent-bg);
  border: 1px solid var(--urgent-line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 16px 0;
  color: var(--text);
  text-decoration: none;
}

.slots { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.slot, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.card { margin: 16px 0; }
.slot p { margin: .4em 0; }
.slot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.day { font-weight: 650; }
.time { color: var(--muted); }
.is-cancelled .day, .is-cancelled .time { text-decoration: line-through; color: var(--muted); }
.reason { color: var(--danger); font-weight: 600; }
.past { opacity: .7; }
.count { font-size: .95rem; }
.names { color: var(--muted); }
.note { font-size: .95rem; }

.badge {
  flex-shrink: 0;
  font-size: .8rem;
  font-weight: 650;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before { content: "● "; }
.badge.none { color: var(--none); background: var(--none-bg); }
.badge.some { color: var(--some); background: var(--some-bg); }
.badge.good { color: var(--good); background: var(--good-bg); }
.badge.full, .badge.cancelled { color: var(--full); background: var(--full-bg); }

.bar { position: relative; height: 8px; background: var(--full-bg); border-radius: 99px; margin: 12px 0 6px; }
.bar .fill { height: 100%; border-radius: 99px; }
.fill.none { background: var(--none); }
.fill.some { background: var(--some); }
.fill.good { background: var(--good); }
.fill.full, .fill.cancelled { background: var(--full); }
.bar .wish { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .45; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-top: 6px;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.disabled { background: var(--full-bg); color: var(--full); border-color: var(--line); cursor: default; }
.btn.small { padding: 5px 12px; font-size: .9rem; }
.link-btn { background: none; border: 0; color: var(--danger); cursor: pointer; font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.actions form { margin: 0; }

.form label { display: block; margin: 12px 0; font-weight: 600; }
.form label small, .form .opt { font-weight: 400; }
.form input:not([type=checkbox]), .form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .95rem; }
.form .check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row label { margin: 0; }
.row-form { display: flex; gap: 8px; align-items: flex-end; }
.row-form label { flex: 1; margin: 0; }
.hp { position: absolute; left: -9999px; }

.alert { border-radius: 12px; padding: 4px 14px; margin: 16px 0; background: var(--full-bg); }
.alert.success { background: var(--good-bg); }
.alert.error { background: var(--none-bg); color: var(--none); }
.link { word-break: break-all; font-family: ui-monospace, monospace; font-size: .9rem; }
.empty { color: var(--muted); }

.admin-top { display: flex; justify-content: space-between; align-items: center; }
.helpers { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 10px 0; }
.helpers th, .helpers td { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--line); word-break: break-word; }
.helpers th { color: var(--muted); font-weight: 500; }
details.inline summary { list-style: none; }
details.inline summary::-webkit-details-marker { display: none; }
.cancel-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cancel-form input { flex: 1; min-width: 180px; padding: 6px 10px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }

footer { text-align: center; font-size: .85rem; color: var(--muted); padding: 24px 16px 40px; }
footer a { color: var(--muted); }
footer .legal { margin: 0 0 .5em; }

/* Aushang */
.poster-page { background: #fff; color: #1f2a24; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster-hint { max-width: 640px; margin: 0 auto; padding: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.poster {
  max-width: 180mm;
  margin: 0 auto;
  padding: 10mm;
  text-align: center;
  font-size: 20px;
}
.poster-tree { font-size: 34px; line-height: 1; }
.poster-kicker { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #b3261e; margin: 4px 0 0; }
.poster h1 { font-size: 26px; line-height: 1.15; color: #1f6b45; margin: 2mm 0 3mm; }
.poster-intro { font-size: 18px; line-height: 1.4; max-width: 180mm; margin: 0 auto 3mm; }
.poster-lead { font-size: 18px; line-height: 1.4; max-width: 180mm; margin: 0 auto; }
.poster-tasks { list-style: none; padding: 0; margin: 4mm auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 160mm; }
.poster-tasks li { font-size: 16px; border: 2px solid #1f6b45; color: #1f6b45; border-radius: 999px; padding: 3px 12px; }
.poster-cols { display: grid; grid-template-columns: 1fr 76mm; gap: 7mm; align-items: center; margin-top: 5mm; text-align: left; }
.poster-plan h2 { font-size: 22px; color: #b3261e; margin: 0 0 3mm; }
.poster-plan ol { list-style: none; padding: 0; margin: 0; border-left: 3px solid #1f6b45; }
.poster-plan li { display: grid; grid-template-columns: 24mm 1fr; gap: 2mm; font-size: 16px; line-height: 1.3; padding: 1.6mm 0 1.6mm 4mm; position: relative; }
.poster-plan li::before { content: ""; position: absolute; left: -7px; top: 3.6mm; width: 11px; height: 11px; border-radius: 50%; background: #1f6b45; }
.poster-plan li.highlight { background: #fff4e0; border-radius: 0 8px 8px 0; }
.poster-plan li.highlight::before { background: #c77700; }
.poster-plan .when { font-weight: 700; white-space: nowrap; }
.poster-scan { text-align: center; }
.poster-qr { width: 64mm; height: 64mm; max-width: 100%; margin: 0 auto 3mm; display: block; }
.poster-cta { font-size: 16px; font-weight: 700; margin: 0; }
.poster-url { font-family: ui-monospace, monospace; font-size: 18px; margin: 2px 0 0; }
.poster-thanks { font-size: 24px; font-weight: 700; color: #b3261e; margin: 2mm 0 0; }
.poster-notice { margin-top: 5mm; border: 2.5px solid #1f6b45; background: #e8f5e9; border-radius: 12px; padding: 3mm 6mm; text-align: center; }
.poster-legal { font-size: 12px; color: #666; margin: 2mm 0 0; }
.poster-notice-title { display: block; font-size: 21px; color: #1f6b45; }
.poster-notice p { font-size: 16px; line-height: 1.4; margin: 1.5mm 0 0; }
@media print {
  @page { size: A4; margin: 8mm 10mm; }
  .no-print { display: none !important; }
  .poster { padding: 0; }
}
