* { box-sizing: border-box; }
/* UnderDog CIS 色彩：Pantone 432C #333F48（深炭灰）、431C #5B6770（中灰藍）、7543C #98A4AE（淺鋼灰） */
:root {
  --bg: #f1f2f3;
  --card: #fff;
  --ink: #2b343c;
  --muted: #6b7680;
  --line: #dfe3e6;
  --brand-dark: #333f48;
  --brand-mid: #5b6770;
  --brand-light: #98a4ae;
  --primary: #333f48;
  --primary-dark: #20282e;
  --free: #e8f5e9;
  --free-ink: #2e7d32;
  --booked: #dbeafe;
  --booked-ink: #1d4ed8;
  --seasonal: #ede9fe;
  --seasonal-ink: #6d28d9;
  --machine: #ccfbf1;
  --machine-ink: #0f766e;
  --tutoring: #ffedd5;
  --tutoring-ink: #c2410c;
  --pending: #fef9c3;
  --pending-ink: #a16207;
  --blocked: #f3f4f6;
  --blocked-ink: #6b7280;
  --danger: #dc2626;
  --ok: #16a34a;
}
body { margin: 0; font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.4rem; margin: 18px 0 8px; color: var(--brand-dark); letter-spacing: .5px; }
h2 { font-size: 1.1rem; margin: 22px 0 10px; color: var(--brand-dark); }
h3 { font-size: 1rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 640px; }
.muted { color: var(--muted); font-weight: normal; font-size: .9em; }
.sub { color: var(--muted); margin-top: 0; }
.error { color: var(--danger); }
.success-text { color: var(--ok); }
.warn-text { color: var(--danger); }

/* topbar：前台亮色（CIS 淺灰底＋深灰字），後台深炭灰 */
.topbar { background: #fff; color: var(--ink); border-bottom: 3px solid var(--brand-dark); box-shadow: 0 1px 6px rgba(51,63,72,.08); }
.topbar.admin { background: var(--brand-dark); border-bottom: 3px solid var(--brand-light); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 16px; gap: 8px; }
.brand { color: var(--ink); font-weight: 800; font-size: 1.02rem; display: flex; align-items: center; gap: 10px; letter-spacing: .5px; }
.brand img.logo-h { height: 40px; width: auto; display: block; }
.brand img.logo-badge-sm { height: 30px; width: auto; display: block; }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.topbar nav a { color: var(--brand-mid); font-weight: 500; }
.topbar nav a:hover { color: var(--brand-dark); text-decoration: none; }
.topbar nav a.muted { color: var(--brand-light); }
.topbar nav a.member-link { color: var(--brand-dark); font-weight: 700; }

/* 前台導覽列：主連結＋右側漢堡選單 */
.topbar { position: relative; }
.main-links { display: flex; gap: 18px; align-items: center; margin-left: auto; margin-right: 14px; }
.main-links a { color: var(--brand-mid); font-weight: 500; }
.main-links a:hover { color: var(--brand-dark); text-decoration: none; }
.main-links a.nav-cta { background: var(--brand-dark); color: #fff; padding: 7px 16px; border-radius: 8px; font-weight: 700; }
.main-links a.nav-cta:hover { background: var(--primary-dark); }
.menu-btn { width: 40px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--brand-dark); border-radius: 2px; transition: transform .18s, opacity .18s; }
.menu-btn:hover { background: #f3f4f6; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-drop { display: none; position: absolute; right: 12px; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(51,63,72,.15); min-width: 230px; padding: 8px; z-index: 100; }
.menu-drop.open { display: block; }
.menu-drop a, .menu-item-btn { display: block; width: 100%; text-align: left; padding: 10px 14px; border-radius: 8px; color: var(--ink); font-size: .95rem; border: none; background: none; cursor: pointer; font-family: inherit; }
.menu-drop a:hover, .menu-item-btn:hover { background: #f1f2f3; text-decoration: none; }
.menu-drop hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-user { padding: 10px 14px 4px; font-weight: 700; color: var(--brand-dark); font-size: .92rem; }
.menu-drop .mobile-only { display: none; }

/* 後台導覽列（深底）：主連結白字、漢堡深色 */
.topbar.admin .main-links a { color: #ccd4da; }
.topbar.admin .main-links a:hover { color: #fff; }
.topbar.admin .menu-btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }
.topbar.admin .menu-btn span { background: #fff; }
.topbar.admin .menu-btn:hover { background: rgba(255,255,255,.22); }
@media (max-width: 760px) {
  .main-links { display: none; }
  .menu-drop .mobile-only { display: block; }
}
.topbar.admin .brand { color: #fff; }
.topbar.admin nav a { color: #ccd4da; }
.topbar.admin nav a:hover { color: #fff; }
.topbar.admin nav a.muted { color: #8b98a2; }
.topbar.admin .linklike { color: #ccd4da; }
input.readonly { background: #f3f4f6; color: #6b7280; }
.footer { text-align: center; color: var(--muted); padding: 30px 0 20px; font-size: .85rem; }
.footer img { height: 44px; opacity: .5; display: block; margin: 0 auto 8px; }

/* cards & forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(51,63,72,.05); margin: 12px 0; overflow: hidden; }
.card.pad, .card .form, details.card { padding: 14px 16px; }
.form label { display: block; margin: 10px 0; font-size: .9rem; color: #374151; }
.form input, .form select, .form textarea { display: block; width: 100%; padding: 8px 10px; margin-top: 4px; border: 1px solid #d1d5db; border-radius: 8px; font-size: .95rem; font-family: inherit; }
.form.inline { display: flex; gap: 10px; align-items: center; }
.form.inline input { margin: 0; }
.form.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form .wide { grid-column: 1 / -1; }
.form .chk { display: flex; align-items: center; gap: 6px; }
.form .chk input { width: auto; display: inline; margin: 0; }
textarea { resize: vertical; }
.filter-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 12px 16px; }
.filter-form label { margin: 0; }
.filter-form input, .filter-form select { width: auto; min-width: 110px; }

.btn { display: inline-block; padding: 8px 16px; border: 1px solid #d1d5db; background: #fff; color: var(--ink); border-radius: 8px; cursor: pointer; font-size: .9rem; font-family: inherit; }
.btn:hover { background: #f3f4f6; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: #fca5a5; }
.btn.ok { color: var(--ok); border-color: #86efac; }
.btn.sm { padding: 4px 10px; font-size: .82rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linklike { background: none; border: none; color: #e5e7eb; cursor: pointer; font-family: inherit; font-size: .9rem; }
.inline-form { display: inline; }

/* toolbar / tabs */
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.tabs { display: flex; gap: 6px; }
.tab { padding: 7px 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 500; }
.tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab:hover { text-decoration: none; }
.weeknav { display: flex; gap: 6px; align-items: center; }
.weeknav input[type=date] { padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit; }

/* schedule grid */
.grid-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
table.grid { border-collapse: collapse; width: 100%; min-width: 700px; }
table.grid th, table.grid td { border: 1px solid var(--line); text-align: center; font-size: .85rem; }
table.grid th { background: #f9fafb; padding: 8px 4px; }
table.grid th.today { background: #e4e8eb; color: var(--brand-dark); }
table.grid .datelabel { font-weight: normal; color: var(--muted); font-size: .8rem; }
table.grid .timecol { width: 64px; background: #f9fafb; color: var(--muted); font-size: .8rem; }
.cell { height: 38px; padding: 2px 4px; }
.cell a { display: block; width: 100%; height: 100%; line-height: 32px; }
.cell small { display: block; font-size: .72rem; opacity: .85; line-height: 1.2; }
.cell.free { background: var(--free); }
.cell.free a { color: var(--free-ink); }
.cell.free a:hover { text-decoration: none; font-weight: bold; }
.cell.closed { background: #fafafa; color: #d1d5db; }
.cell.temp, .cell.booked { background: var(--booked); color: var(--booked-ink); }
.cell.taken, .lg.taken { background: #eceef1; color: #9ca3af; }
.cell.contact, .lg.contact { background: #e0f2fe; color: #0369a1; font-size: .78rem; }
.cell.contact a { color: #0369a1; display: block; width: 100%; height: 100%; line-height: 32px; }
.cell.contact a:hover { text-decoration: none; font-weight: bold; }
.cell.seasonal { background: var(--seasonal); color: var(--seasonal-ink); }
.cell.machine { background: var(--machine); color: var(--machine-ink); }
.cell.tutoring { background: var(--tutoring); color: var(--tutoring-ink); }
.cell.pending { background: var(--pending); color: var(--pending-ink); }
.cell.blocked { background: var(--blocked); color: var(--blocked-ink); text-decoration: line-through; }
.cell.clickable { cursor: pointer; }
table.grid.adm .cell { height: 46px; }
table.grid.adm .cell.free { color: #a5d6a7; font-size: 1.1rem; }
table.grid.adm .cell.free:hover { color: var(--free-ink); font-weight: bold; }

.legend { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; font-size: .82rem; }
.lg { padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line); }
.lg.free { background: var(--free); color: var(--free-ink); }
.lg.booked { background: var(--booked); color: var(--booked-ink); }
.lg.seasonal { background: var(--seasonal); color: var(--seasonal-ink); }
.lg.machine { background: var(--machine); color: var(--machine-ink); }
.lg.tutoring { background: var(--tutoring); color: var(--tutoring-ink); }
.lg.pending { background: var(--pending); color: var(--pending-ink); }
.lg.blocked { background: var(--blocked); color: var(--blocked-ink); }

/* lists */
table.list { border-collapse: collapse; width: 100%; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: .88rem; vertical-align: top; }
table.list th { background: #f9fafb; color: #374151; white-space: nowrap; }
table.list tr.dim { opacity: .5; }
table.list tr.subrow td { background: #fafafa; padding: 4px 10px; }
.actions { white-space: nowrap; }
.actions form { display: inline-block; margin: 1px 2px; }
.notecell { max-width: 180px; font-size: .8rem; color: var(--muted); }

/* badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; background: #f3f4f6; color: #374151; white-space: nowrap; }
.badge.pay-unpaid { background: #fee2e2; color: #b91c1c; }
.badge.pay-unchecked { background: #ffedd5; color: #c2410c; }
.badge.pay-verified { background: #dcfce7; color: #15803d; }
.badge.pay-free { background: #f3f4f6; color: #6b7280; }
.badge.pay-refunded { background: #e0e7ff; color: #4338ca; }
.badge.st-pending { background: var(--pending); color: var(--pending-ink); }
.badge.st-confirmed { background: #dcfce7; color: #15803d; }
.badge.st-cancelled { background: #f3f4f6; color: #9ca3af; }
.badge.kd-temp { background: var(--booked); color: var(--booked-ink); }
.badge.kd-seasonal { background: var(--seasonal); color: var(--seasonal-ink); }
.badge.kd-machine { background: var(--machine); color: var(--machine-ink); }
.badge.kd-tutoring { background: var(--tutoring); color: var(--tutoring-ink); }
.badge.kd-blocked { background: var(--blocked); color: var(--blocked-ink); }

/* misc */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.stat { flex: 1; min-width: 140px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--ink); }
.stat:hover { text-decoration: none; border-color: var(--primary); }
.stat .num { font-size: 1.8rem; font-weight: bold; }
.stat.has-tip { cursor: help; }
a.stat { text-decoration: none; }
a.stat.has-tip { cursor: pointer; }
.stat.has-tip:hover { border-color: var(--brand-mid); background: #f8fafb; }
.tipbox { position: absolute; z-index: 200; max-width: 340px; background: #20282e; color: #f1f2f3; font-size: .82rem; line-height: 1.7; padding: 10px 13px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.28); white-space: pre-line; pointer-events: none; opacity: 0; transition: opacity .12s; display: none; }
.tipbox.show { display: block; opacity: 1; }
.status-legend { font-size: .85rem; line-height: 2; }
.mini-sel { padding: 3px 4px; font-size: .8rem; border: 1px solid #d1d5db; border-radius: 6px; max-width: 92px; }
.stat.warn .num { color: var(--pending-ink); }
.stat.alert .num { color: var(--danger); }
.page-head { margin-top: 16px; }
.book-summary div { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.book-summary div:last-child { border-bottom: none; }
.book-summary .label { display: inline-block; width: 90px; color: var(--muted); }
.book-summary { padding: 6px 16px; }
.price-box { background: #eef1f3; border: 1px solid #c9d1d7; padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.price-box strong { font-size: 1.2rem; color: var(--brand-dark); }
.bkid { color: var(--muted); font-size: .9em; }
.notice-card { padding: 14px 16px; background: #fffbeb; border-color: #fde68a; }
.success-card { padding: 14px 16px; background: #f0fdf4; border-color: #86efac; }
.doorpw { font-size: 1.3rem; letter-spacing: 2px; color: var(--brand-dark); }
.bankinfo { white-space: pre-wrap; background: #f9fafb; padding: 10px 14px; border-radius: 8px; }
.announce { white-space: pre-wrap; font-family: inherit; margin: 0; line-height: 1.7; }
.announce.sm { font-size: .82rem; }
.login-wrap { display: flex; min-height: 80vh; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 380px; padding: 24px; text-align: center; }
.login-card .form { text-align: left; }
details > summary.btn { list-style: none; display: inline-block; }
details > summary.btn::-webkit-details-marker { display: none; }

/* modal */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 12px; }
.modal-bg.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 18px 22px; width: 100%; max-width: 620px; }
.modal h2 { margin-top: 0; }
.modal-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.modal-actions .spacer { flex: 1; }

/* home / intro：CIS 淺灰識別底＋徽章 Logo */
.hero { background: linear-gradient(170deg, #e9ebed 0%, #dfe3e6 55%, #cfd5d9 100%); color: var(--ink); text-align: center; padding: 44px 16px 52px; border-bottom: 1px solid var(--line); }
.hero-badge img { height: 170px; width: auto; }
.hero h1 { font-size: 2rem; margin: 14px 0 4px; color: var(--brand-dark); letter-spacing: 2px; }
.hero-sub { font-size: 1.12rem; color: var(--brand-mid); margin: 4px 0; font-weight: bold; }
.hero-desc { color: var(--muted); margin: 6px 0 22px; }
.hero-cta { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; font-size: 1.05rem; padding: 12px 30px; letter-spacing: 1px; }
.hero-cta:hover { background: var(--primary-dark); color: #fff; }
.feature-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0; }
.feature { flex: 1; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.feature .f-icon { font-size: 1.8rem; }
.feature h3 { margin: 8px 0 6px; }
.feature p { color: var(--muted); font-size: .9rem; margin: 0; line-height: 1.6; }
.price-table th { text-align: center; }
.price-table td:nth-child(2), .price-table td:nth-child(3) { text-align: center; font-weight: bold; color: var(--primary-dark); white-space: nowrap; }
.pad-x { padding: 0 16px 12px; }
.rules { margin: 4px 0; padding-left: 22px; line-height: 1.9; }
.venue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.venue-info p { line-height: 1.7; }
.prewrap { white-space: pre-wrap; }
.mapbox { min-height: 260px; }
.mapbox iframe { width: 100%; height: 100%; min-height: 260px; border: 0; display: block; }
.map-load { width: 100%; height: 100%; min-height: 260px; border: 0; background: #e9ebed; cursor: pointer; font-family: inherit; font-size: 1rem; color: var(--brand-mid); line-height: 1.8; }
.map-load:hover { background: #dfe3e6; }
.center { text-align: center; }
.btn.big { font-size: 1.05rem; padding: 12px 28px; }
.line-btn { background: #06c755; border-color: #06c755; color: #fff; font-weight: bold; }
.line-btn:hover { background: #05a648; color: #fff; }
.line-float { position: fixed; right: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%; background: #06c755; color: #fff; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 90; }
.line-float:hover { background: #05a648; text-decoration: none; transform: scale(1.06); }
.price-hint { background: #eef1f3; border: 1px solid #c9d1d7; border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; font-size: .9rem; }
.venue-tabs { margin: 0 0 12px; }
.rules-box { background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 12px 0; font-size: .88rem; }
.rules-box summary { cursor: pointer; color: var(--primary-dark); }
.chk.agree { font-size: .88rem; line-height: 1.5; }
.court-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; border-bottom: 1px dashed var(--line); padding: 8px 0; }
.court-row label { margin: 0; }
.court-row input, .court-row select { width: auto; min-width: 90px; }
.court-row input[name=name] { min-width: 150px; }
.court-row .court-id { font-weight: bold; font-size: 1.1rem; width: 28px; }
.venue-form { margin-bottom: 8px; }
.stats-result .stat { flex: 0 1 240px; max-width: 300px; }
.contract-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-dark); color: #fff; font-size: .78rem; font-weight: bold; margin-right: 4px; }
.date-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.date-chk { display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; background: #fff; cursor: pointer; }
.date-chk input { margin: 0; }
.date-chk.closed { background: #eceef1; color: #9ca3af; }
.calc-box { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 18px; background: #f1f2f3; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 8px 0; font-size: .92rem; }
.calc-box .calc-total { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-size: 1.05rem; }
.calc-box .calc-total strong { color: var(--brand-dark); font-size: 1.2rem; }
.renewal-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .92rem; }
.renewal-bar .spacer { flex: 1; }
.renewal-bar .done-step { color: var(--muted); text-decoration: line-through; }
.perm-table { margin-bottom: 18px; }
.perm-table td:nth-child(n+2), .perm-table th:nth-child(n+2) { text-align: center; }

/* reports */
.report-table th, .report-table td { text-align: right; white-space: nowrap; }
.report-table th:first-child, .report-table td:first-child { text-align: left; }
.report-table .vhead { text-align: center; border-left: 2px solid var(--line); }
.report-table td:nth-child(3n+2) { border-left: 2px solid var(--line); }
.ok-text { color: #15803d; }
.warn-cell { color: #c2410c; }
.total-cell { background: #eef1f3; border-left: 2px solid var(--line); }
.tfoot-row td { background: #f9fafb; border-top: 2px solid #d1d5db; }
.filter-form .tabs button.tab { cursor: pointer; }
.hours-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0; font-size: .9rem; }
.hours-row input { width: 64px; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 8px; }

/* venue quick cards & courses */
.venue-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.venue-card { display: flex; gap: 14px; align-items: center; padding: 18px; color: var(--ink); }
.venue-card:hover { text-decoration: none; border-color: var(--primary); }
.venue-card h3 { margin: 0 0 4px; }
.venue-card p { margin: 0 0 6px; font-size: .88rem; }
.venue-card .vc-icon { font-size: 2.2rem; }
.venue-card .vc-cta { color: var(--primary); font-weight: bold; font-size: .9rem; }
.venue-card.coming { opacity: .75; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 8px; }
.course-card { padding: 16px 18px; }
.course-card h3 { margin: 0 0 8px; }
.course-meta div { font-size: .88rem; padding: 2px 0; }
.course-meta .label { display: inline-block; width: 44px; color: var(--muted); }
.course-desc { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.reg-box summary { list-style: none; }
.reg-box summary::-webkit-details-marker { display: none; }
.reg-form { display: flex; gap: 6px; align-items: center; }
.reg-form select, .reg-form input { padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: .82rem; }
.reg-form input { width: 110px; }
code { background: #f3f4f6; padding: 1px 6px; border-radius: 4px; font-size: .85em; }

/* peak/off-peak cells & day tags */
.cell.free a { font-weight: 600; }
.cell.free.peakcell, .lg.peakcell { background: #fff3e0; }
.cell.free.peakcell a { color: #c2410c; }
.day-tag { font-size: .68rem; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 0 6px; display: inline-block; margin-top: 2px; }
.day-tag.special { background: #fee2e2; color: #b91c1c; font-weight: bold; }
.holiday-note { background: #fee2e2; border: 1px solid #fecaca; color: #7f1d1d; border-radius: 8px; padding: 8px 12px; margin: 10px 0; font-size: .9rem; }

/* seasonal packages & pay-with */
.seasonal-pkg { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pkg-price { font-size: 1.4rem; font-weight: bold; color: var(--brand-dark); margin-top: 6px; }
.pay-with { background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.pay-with .chk { margin: 6px 0; }

/* special day bar */
.special-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: .88rem; }
.special-bar.on { background: #fef2f2; border-color: #fecaca; }
.special-bar select { padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 6px; }

/* CRM kanban & timeline */
.kanban { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; align-items: start; }
.kcol { background: #eef0f3; border-radius: 10px; padding: 8px; min-height: 120px; }
.kcol.over { outline: 2px dashed var(--primary); }
.kcol-head { font-weight: bold; font-size: .85rem; padding: 2px 4px 8px; }
.kcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; color: var(--ink); font-size: .82rem; cursor: grab; }
.kcard:hover { text-decoration: none; border-color: var(--primary); }
.kcard.stale { border: 2px solid var(--danger); }
.kname { font-weight: bold; font-size: .88rem; }
.kmeta { color: var(--muted); margin-top: 2px; }
.kfoot { display: flex; justify-content: space-between; margin-top: 6px; font-size: .76rem; color: #4b5563; }
.proc-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.proc-row .form.inline { gap: 6px; }
.proc-row select, .proc-row input { padding: 6px 8px; }
.timeline { border-left: 2px solid var(--line); padding-left: 14px; }
.tl-item { position: relative; padding: 6px 0 10px; }
.tl-item::before { content: ''; position: absolute; left: -19px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.tl-item.auto::before { background: #9ca3af; }
.tl-time { font-size: .78rem; color: var(--muted); }
.tl-content { font-size: .9rem; margin-top: 2px; }
@media (max-width: 900px) { .kanban { display: flex; overflow-x: auto; } .kcol { min-width: 170px; } }

/* photo gallery */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.photo-item { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.photo-item img { width: 100%; height: 170px; object-fit: cover; display: block; }
.photo-item figcaption { padding: 6px 10px; font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 6px; }

@media (max-width: 640px) {
  .venue-grid { grid-template-columns: 1fr; }
  .form.grid2 { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  h1 { font-size: 1.2rem; }
}
