:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --line: #d8dee8;
  --brand: #1456a0;
  --brand-dark: #0d3f78;
  --danger: #a11616;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

header div,
nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand {
  min-width: 0;
}

.auth-brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 auto;
}

.auth-brand span {
  display: grid;
  gap: 2px;
}

.auth-brand strong {
  color: var(--text);
}

header span,
small,
.empty {
  color: var(--muted);
}

nav a,
a {
  color: var(--brand);
  text-decoration: none;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  overflow: auto;
}

.narrow {
  max-width: 440px;
  margin: 56px auto;
}

.hero {
  margin-bottom: 22px;
}

.notice {
  display: inline-block;
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid #b8d7f0;
  border-radius: 6px;
  background: #eef7ff;
  color: #155f9f;
}

.session-expired-overlay[hidden] {
  display: none;
}

.session-expired-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
}

.session-expired-dialog {
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.session-expired-kicker {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.session-expired-dialog h1 {
  margin-bottom: 10px;
  font-size: 30px;
}

.session-expired-dialog p {
  color: var(--muted);
}

.session-expired-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.session-expired-action:hover {
  background: var(--brand-dark);
  color: #fff;
}

body.session-expired {
  overflow: hidden;
}

body.session-expired header,
body.session-expired main {
  pointer-events: none;
  user-select: none;
  filter: blur(1px);
}

h1 {
  margin: 0 0 14px;
  font-size: 26px;
}

h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.form {
  display: grid;
  gap: 12px;
}

.register-panel {
  max-width: 760px;
  margin: 36px auto;
}

.register-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 18px 0 22px;
  list-style: none !important;
}

.register-steps > li {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.register-steps > li::marker {
  content: "";
}

.register-steps span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ece8df;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.register-steps li.active {
  border-color: rgba(47, 128, 201, 0.38);
  background: #e8f4fd;
  color: var(--brand);
}

.register-steps li.active span {
  background: var(--brand);
  color: #fff;
}

.register-steps li.current {
  box-shadow: 0 0 0 2px rgba(47, 128, 201, 0.12);
}

.register-steps strong {
  font-size: 15px;
}

.register-flow-form {
  gap: 18px;
}

.register-step-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.register-step-block h2 {
  margin: 0;
}

.register-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.register-form-variant {
  padding: 14px;
  border: 1px solid #d6e8f8;
  border-radius: 8px;
  background: #f7fbff;
}

.register-step-block[hidden],
.register-flow-form [hidden],
.register-submit[hidden],
.register-nav-actions button[hidden] {
  display: none !important;
}

.register-final-summary {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.register-final-summary span {
  color: var(--muted);
}

.register-nav-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.terms-box {
  max-height: 240px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  line-height: 1.8;
}

.terms-agree {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.terms-agree input {
  width: 18px;
  height: 18px;
}

.terms-hint {
  margin: 0;
  color: var(--muted);
}

.segmented-choice {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.segmented-choice label {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 800;
}

.register-flow-form .target-field {
  display: none;
}

.register-target .register-flow-form .target-field {
  display: grid;
}

.register-target .register-flow-form .general-field {
  display: none;
}

.compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
  margin-bottom: 16px;
}

.field-label,
.form label,
.inline-edit label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

input,
select,
button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
}

button {
  cursor: pointer;
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

button:hover {
  background: var(--brand-dark);
}

nav form,
.actions form {
  display: inline-flex;
  gap: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.account-panel {
  margin-top: 18px;
}

.auth-link {
  margin: 14px 0 0;
}

.card {
  display: block;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.card:hover {
  border-color: var(--brand);
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.permission-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.permission-options {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  padding: 10px 0 2px;
}

.permission-options label,
.inline-edit label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.permission-grid button {
  justify-self: start;
}

.approval-form {
  display: grid;
  gap: 10px;
  min-width: 360px;
}

.compact-options {
  grid-column: auto;
  padding: 0;
}

.temporary-password {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafb;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.full {
  grid-column: 1 / -1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.actions {
  min-width: 220px;
}

.inline-edit {
  display: grid;
  gap: 8px;
}

code {
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 760px) {
  header,
  header div,
  nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

.demo-site {
  --bg: #f3f8fd;
  --panel: #ffffff;
  --text: #102033;
  --muted: #607286;
  --line: #d6e4f2;
  --brand: #2f80c9;
  --brand-dark: #155f9f;
  --accent: #3ba5df;
  --gold: #82bde8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(243, 248, 253, 0.97)),
    radial-gradient(circle at 16% 4%, rgba(59, 165, 223, 0.18), transparent 32%),
    #f3f8fd;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(47, 128, 201, 0.16);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.brand-mark-logo {
  width: 48px;
  height: 48px;
  padding: 3px;
  border: 1px solid rgba(47, 128, 201, 0.18);
  background: #fff;
}

.brand-mark-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chooser-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
}

.site-brand span:last-child {
  display: grid;
  gap: 2px;
}

.site-brand small {
  font-size: 12px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 700;
}

.site-nav a.active,
.site-nav a:hover {
  background: #e8f4fd;
  color: var(--brand);
}

.tour-shell {
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 150px);
}

.tour-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 0;
}

.tour-head h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 4vw, 64px);
}

.tour-head p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-weight: 700;
}

.tour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 260px;
}

.tour-frame {
  width: 100%;
  min-height: 680px;
  height: calc(100vh - 270px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.site-main {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
}

.desktop-mode .crm-main {
  width: calc(100vw - 24px);
  max-width: none;
}

.hub-hero {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 150px);
  padding: 34px 0;
}

.hub-hero-media {
  min-height: 520px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 128, 201, 0.86), rgba(9, 76, 67, 0.54)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 2px, transparent 2px 96px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.14) 0 2px, transparent 2px 84px),
    linear-gradient(150deg, #82bde8, #2f80c9 42%, #155f9f);
  position: relative;
  overflow: hidden;
}

.hub-hero-media::after {
  content: "";
  position: absolute;
  inset: 38px;
  border: 2px solid rgba(255,255,255,0.56);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255,255,255,0.55) 47% 49%, transparent 49%),
    linear-gradient(0deg, transparent 58%, rgba(255,255,255,0.48) 58% 60%, transparent 60%);
}

.hub-photo-card {
  position: absolute;
  left: 34px;
  bottom: 34px;
  z-index: 2;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 68px));
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.hub-photo-card span {
  color: var(--accent);
  font-weight: 900;
}

.hub-photo-card strong {
  font-size: 28px;
}

.hub-hero-copy h1,
.page-heading h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1;
  margin: 0 0 18px;
}

.hub-hero-copy p:not(.eyebrow),
.page-heading p:not(.eyebrow) {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.section-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 7px;
  font-weight: 800;
}

.primary-action {
  background: var(--brand);
  color: #fff;
}

.secondary-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

/* ── 首頁滿意度帶（2026-09-11）：取代原四格數據列，只留滿意度，環形量表＋波紋底圖 ── */
.satisfaction-band {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px 40px;
  margin: 0 0 28px;
  padding: 30px 40px;
  border-radius: 8px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(120deg, #0d3f78 0%, #1456a0 46%, #1f7fb8 78%, #2fa2c9 100%);
  box-shadow: 0 24px 60px rgba(13, 63, 120, 0.22);
}
.satisfaction-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.satisfaction-waves path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.5;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: satisfaction-wave 2.6s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
}
.satisfaction-waves path:nth-child(2) { stroke-width: 1; animation-delay: 0.25s; opacity: 0.8; }
.satisfaction-waves path:nth-child(3) { stroke-width: 0.8; animation-delay: 0.5s; opacity: 0.6; }
.satisfaction-waves path:nth-child(4) { stroke-width: 1; animation-delay: 0.12s; opacity: 0.55; }
@keyframes satisfaction-wave { to { stroke-dashoffset: 0; } }
.satisfaction-gauge {
  position: relative;
  width: 168px;
  height: 168px;
  flex: none;
}
.satisfaction-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.25));
}
.satisfaction-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 10;
}
.satisfaction-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  animation: satisfaction-fill 1.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
@keyframes satisfaction-fill { from { stroke-dashoffset: 364.42; } }
.satisfaction-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 52px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.satisfaction-value strong { font-size: 52px; line-height: 1; }
.satisfaction-value span { font-size: 20px; margin-left: 2px; color: rgba(255, 255, 255, 0.85); }
.satisfaction-copy { position: relative; min-width: 0; }
.satisfaction-copy .eyebrow { margin: 0 0 4px; color: rgba(255, 255, 255, 0.72); letter-spacing: 0.18em; text-transform: uppercase; font-size: 12px; font-weight: 800; }
.satisfaction-copy h2 { margin: 0 0 8px; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.1; }
.satisfaction-mood { margin: 0 0 6px; font-size: 15px; color: rgba(255, 255, 255, 0.9); }
.satisfaction-mood em { font-style: normal; font-weight: 900; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35); }
.satisfaction-note { margin: 0; font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, 0.78); max-width: 560px; }
@media (prefers-reduced-motion: reduce) {
  .satisfaction-waves path, .satisfaction-fill { animation: none; }
  .satisfaction-waves path { stroke-dashoffset: 0; }
}
.mobile-mode .satisfaction-band { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px 20px; gap: 14px; }
.mobile-mode .satisfaction-gauge { width: 150px; height: 150px; }
.mobile-mode .satisfaction-value { padding-top: 46px; }
.mobile-mode .satisfaction-value strong { font-size: 46px; }
.mobile-mode .satisfaction-note { max-width: none; }

.content-band,
.page-heading,
.complete-panel {
  margin: 28px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
}

.split-band {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 24px;
}

.mini-map-stack,
.space-layout {
  display: grid;
  gap: 18px;
}

.space-layout {
  grid-template-columns: 1fr 1fr;
}

.desktop-mode .spaces-showcase {
  grid-template-columns: 1fr;
  gap: 104px;
  align-items: center;
  margin: 36px 0 60px;
  padding: 46px 0 76px;
  perspective: 1600px;
  overflow: visible;
}

.desktop-mode .spaces-showcase .floor-map {
  width: min(980px, 92%);
  min-height: 580px;
  transform: rotateX(34deg) rotateZ(-8deg) translateZ(0);
  transform-style: preserve-3d;
  transform-origin: center center;
  box-shadow: 0 38px 70px rgba(20, 34, 31, 0.20);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.desktop-mode .spaces-showcase .floor-map:nth-child(1) {
  justify-self: end;
  margin-right: 9%;
}

.desktop-mode .spaces-showcase .floor-map:nth-child(2) {
  justify-self: start;
  margin-left: 7%;
}

.desktop-mode .spaces-showcase .floor-map::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border-radius: 8px;
  background: rgba(47, 128, 201, 0.08);
  transform: translate3d(18px, 26px, -32px);
}

.desktop-mode .spaces-showcase .floor-map:hover {
  transform: rotateX(30deg) rotateZ(-7deg) translateY(-10px) translateZ(18px);
  box-shadow: 0 48px 86px rgba(20, 34, 31, 0.24);
}

.desktop-mode .spaces-showcase .floor-grid {
  grid-auto-rows: minmax(52px, 1fr);
  min-height: 500px;
}

.desktop-mode .spaces-showcase .space-popover {
  transform: rotateZ(8deg) rotateX(-34deg) translate(14px, -50%);
}

.desktop-mode .spaces-showcase .space-tile:nth-child(3n) .space-popover {
  transform: rotateZ(8deg) rotateX(-34deg) translate(-14px, -50%);
}

.desktop-mode .spaces-showcase .space-tile:hover .space-popover,
.desktop-mode .spaces-showcase .space-tile:focus-visible .space-popover {
  transform: rotateZ(7deg) rotateX(-30deg) translate(0, -50%);
}

.desktop-mode .spaces-showcase .space-tile:nth-child(3n):hover .space-popover,
.desktop-mode .spaces-showcase .space-tile:nth-child(3n):focus-visible .space-popover {
  transform: rotateZ(7deg) rotateX(-30deg) translate(0, -50%);
}

/* The map stays in 3D; the information card is rendered in a screen-level
   layer so perspective from the map can never tilt its content. */
.desktop-mode .spaces-showcase .space-popover {
  display: none;
}

.desktop-mode .space-popover-screen {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 100;
  display: block;
  max-height: calc(100vh - 28px);
  overflow: auto;
  opacity: 1;
  pointer-events: none;
  transform: none;
  transform-origin: center;
  transition: opacity 140ms ease;
}

.floor-map {
  min-height: 250px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  position: relative;
  overflow: visible;
  pointer-events: none;
}

.floor-map-head,
.section-title-row {
  justify-content: space-between;
  margin-bottom: 12px;
}

.floor-map-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.floor-map-head span {
  color: var(--muted);
}

.home-venue-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  min-width: 0;
}

.home-floor-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 360px;
  max-height: 360px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  overflow: hidden;
}

.home-floor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-floor-head strong {
  font-size: 26px;
}

.home-floor-head span {
  color: var(--muted);
  font-weight: 800;
}

.home-floor-tiles {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 48px;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.home-floor-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(47, 128, 201, 0.22);
  border-radius: 7px;
  background: #e8f4fd;
  color: var(--text);
  overflow: hidden;
}

.home-floor-tile strong {
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-floor-tile span {
  color: var(--brand);
  font-weight: 900;
}

.floor-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(48px, 1fr);
  gap: 8px;
  min-height: 360px;
  pointer-events: none;
}

.space-tile {
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(47, 128, 201, 0.28);
  border-radius: 6px;
  background: #e8f4fd;
  color: var(--text);
  font-weight: 800;
  position: relative;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
  pointer-events: auto;
  z-index: 1;
}

.space-tile:hover,
.space-tile:focus-visible {
  border-color: var(--brand);
  background: #f5fffc;
  box-shadow: 0 16px 34px rgba(47, 128, 201, 0.18);
  transform: translateY(-12px) translateZ(26px);
  z-index: 20;
}

.space-tile small {
  color: var(--brand);
}

.space-tile span,
.space-tile small {
  overflow-wrap: anywhere;
}

.space-tile em {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(96, 114, 134, 0.13);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.space-popover {
  position: absolute;
  left: calc(100% + 18px);
  top: 50%;
  width: min(330px, 46vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(20, 34, 31, 0.18);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transform-origin: left center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.space-tile:nth-child(3n) .space-popover {
  left: auto;
  right: calc(100% + 18px);
  transform-origin: right center;
  transform: translate(-8px, -50%);
}

.space-tile:hover .space-popover,
.space-tile:focus-visible .space-popover {
  opacity: 1;
  transform: translate(0, -50%);
}

.space-tile:nth-child(3n):hover .space-popover,
.space-tile:nth-child(3n):focus-visible .space-popover {
  transform: translate(0, -50%);
}

.space-popover-image {
  overflow: hidden;
  height: 118px;
  margin-bottom: 10px;
  border-radius: 6px;
  background: #e8f4fd;
}

.space-popover-image img,
.venue-admin-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 110px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(47, 128, 201, 0.88), rgba(200, 148, 50, 0.48)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 2px, transparent 2px 42px);
  color: #fff;
}

.venue-placeholder span {
  font-size: 24px;
  font-weight: 900;
}

.space-popover dl {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.space-popover dl div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.venue-venue_5f_lounge {
  grid-column: 6 / 10;
  grid-row: 3 / 7;
}

.venue-venue_5f_kitchen {
  grid-column: 4 / 8;
  grid-row: 7 / 9;
}

.venue-venue_5f_studio {
  grid-column: 10 / 13;
  grid-row: 1 / 4;
}

.venue-venue_5f_classroom {
  grid-column: 10 / 13;
  grid-row: 4 / 6;
}

.venue-venue_5f_mixing {
  grid-column: 11 / 13;
  grid-row: 7 / 8;
}

.venue-venue_5f_recording_a {
  grid-column: 12 / 13;
  grid-row: 6 / 7;
}

.venue-venue_5f_recording_b {
  grid-column: 10 / 12;
  grid-row: 6 / 7;
}

.venue-venue_6f_living {
  grid-column: 6 / 10;
  grid-row: 3 / 6;
}

.venue-venue_6f_classroom {
  grid-column: 5 / 8;
  grid-row: 6 / 8;
}

.venue-venue_6f_garden {
  grid-column: 10 / 13;
  grid-row: 2 / 8;
}

.space-tile.closed,
.calendar-grid .busy {
  border-color: rgba(96, 114, 134, 0.28);
  background:
    repeating-linear-gradient(135deg, rgba(96, 114, 134, 0.08) 0 8px, transparent 8px 16px),
    #eef4fa;
  color: var(--muted);
}

.activity-list,
.compact-bookings {
  display: grid;
  gap: 10px;
}

.compact-booking-public {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compact-booking-public strong {
  color: var(--text);
}

.compact-booking-public span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.member-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  margin: 24px 0;
}

.mobile-member-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 10px;
  margin: 14px 0 18px;
}

.mobile-member-actions button {
  min-height: 48px;
  border: 1px solid #b8d7f0;
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-weight: 900;
}

body.member-sheet-open {
  overflow: hidden;
}

body.member-sheet-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 79;
  background: rgba(16, 32, 51, 0.48);
  backdrop-filter: blur(3px);
}

.member-dashboard .profile-card.member-sheet {
  display: none;
}

.member-dashboard .profile-card.member-sheet.is-open {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 80;
  display: grid;
  align-content: start;
  width: min(680px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border-color: #b8d7f0;
  box-shadow: 0 24px 80px rgba(22, 58, 95, 0.28);
  transform: translate(-50%, -50%);
}

.member-sheet-close {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid #b8d7f0;
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-size: 15px;
  font-weight: 900;
}

.upcoming-booking,
.profile-card,
.member-detail-panel {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.upcoming-booking {
  display: grid;
  gap: 8px;
}

.upcoming-booking span,
.profile-card .empty {
  color: var(--muted);
}

.upcoming-booking strong {
  font-size: 24px;
}

.booking-caution {
  position: absolute;
  left: 18px;
  right: 18px;
  top: calc(100% + 10px);
  z-index: 30;
  padding: 12px;
  border: 1px solid #f3d08b;
  border-radius: 8px;
  background: #fff7e6;
  color: #6d4b00;
  box-shadow: 0 16px 32px rgba(20, 34, 31, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.upcoming-booking:hover .booking-caution,
.upcoming-booking:focus .booking-caution {
  opacity: 1;
  transform: translateY(0);
}

.member-profile-form {
  display: grid;
  gap: 10px;
}

.member-profile-form label,
.member-note-form {
  display: grid;
  gap: 6px;
}

.member-detail summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 900;
}

.member-detail-panel {
  width: min(640px, 78vw);
  margin-top: 10px;
  box-shadow: 0 18px 42px rgba(20, 34, 31, 0.16);
}

.member-note-form button {
  width: fit-content;
}

.rental-rules-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  margin: 34px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rental-rules-panel h2 {
  font-size: 30px;
}

.rental-rules-panel p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.rental-rules-panel aside {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  background: #e8f4fd;
}

.rental-rules-panel aside span,
.rental-rules-panel aside small {
  color: var(--muted);
}

.rental-rules-panel aside strong {
  color: var(--brand);
  font-size: 28px;
}

.rental-policy-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin: 14px 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.rental-policy-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.rental-policy-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.policy-ratio-notice {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #b8d7f0;
  border-radius: 8px;
  background: #eef7ff;
  color: #155f9f;
}

.policy-ratio-notice.warning {
  border-color: #e3b5ae;
  background: #f9e8e5;
  color: #8f2d25;
}

.policy-ratio-notice span {
  color: inherit;
}

.policy-warning-modal {
  max-width: 720px;
  margin: 56px auto;
  padding: 30px;
  border: 2px solid #e3b5ae;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(143, 45, 37, 0.16);
}

.policy-warning-modal h1 {
  color: #8f2d25;
}

.policy-warning-modal p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.activity-item,
.compact-bookings a {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.activity-item time {
  color: var(--accent);
  font-weight: 900;
}

.activity-item div,
.compact-bookings a {
  color: var(--text);
}

.activity-item span,
.compact-bookings span {
  display: block;
  color: var(--muted);
}

.activity-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.activity-create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.activity-create-form .wide-field,
.activity-create-form button {
  grid-column: 1 / -1;
}

.activity-create-form button {
  justify-self: start;
}

.activity-admin-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

.activity-admin-row + .activity-admin-row {
  margin-top: 10px;
}

.activity-admin-row summary {
  display: grid;
  grid-template-columns: 88px 120px 1.2fr 1.2fr auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.activity-admin-row summary::-webkit-details-marker {
  display: none;
}

.activity-admin-row summary time,
.activity-admin-row summary span,
.activity-admin-row summary small {
  color: var(--muted);
  font-weight: 800;
}

.activity-admin-row[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.visibility-indicator {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.visibility-indicator.visible {
  background: #e8f6ee;
  color: #155f9f;
}

.visibility-indicator.hidden {
  background: #f1f0ec;
  color: var(--muted);
}

.activity-edit-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  padding: 18px 16px 20px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.activity-edit-head,
.activity-edit-card .wide-field {
  grid-column: 1 / -1;
}

.activity-edit-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.activity-edit-card input,
.activity-edit-card textarea,
.activity-edit-card select {
  width: 100%;
}

.activity-edit-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.activity-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-detail {
  max-width: 980px;
  margin: 34px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.activity-detail h1 {
  margin-bottom: 8px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
}

.activity-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
}

.activity-detail-image {
  overflow: hidden;
  margin: 20px 0;
  border-radius: 8px;
  background: #e8f4fd;
}

.activity-detail-image img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.activity-placeholder {
  display: grid;
  min-height: 360px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(47, 128, 201, 0.86), rgba(183, 55, 47, 0.56)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 2px, transparent 2px 76px);
  color: #fff;
}

.activity-placeholder span {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  font-size: 24px;
  font-weight: 900;
}

.activity-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.activity-detail-meta div {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: #fff;
}

.activity-detail-meta span {
  color: var(--muted);
}

.activity-body {
  margin: 20px 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.9;
}

.activity-register {
  width: fit-content;
}

.space-cards,
.identity-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.venue-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.space-card,
.identity-card,
.kpi-card,
.venue-admin-card,
.crm-panel,
.availability-panel,
.booking-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.venue-admin-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.venue-admin-card strong,
.venue-admin-preview,
.venue-admin-card label:nth-of-type(1),
.venue-admin-card label:nth-of-type(2),
.venue-admin-card label:nth-of-type(4),
.venue-admin-card label:nth-of-type(6),
.venue-admin-card label:nth-of-type(7),
.venue-admin-card .time-rule-fieldset,
.venue-admin-card button {
  grid-column: 1 / -1;
}

.venue-admin-preview {
  overflow: hidden;
  height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8f4fd;
}

.venue-admin-card input,
.venue-admin-card textarea,
.venue-admin-card select {
  width: 100%;
  min-width: 0;
}

.venue-admin-card input[type="file"] {
  max-width: 100%;
  white-space: normal;
}

.venue-admin-card input[type="radio"],
.venue-admin-card input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0;
}

.venue-admin-card button {
  justify-self: start;
}

.danger-button {
  border-color: #b42318;
  background: #fff5f5;
  color: #b42318;
}

.identity-category-block {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 2px solid #cfe3f5;
  border-radius: 8px;
  background: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(47, 128, 201, 0.08);
}

.identity-category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #b8d7f0;
  border-radius: 8px;
  background: #e8f4fd;
}

.identity-category-header h2,
.identity-category-header p {
  margin: 0;
}

.identity-category-header span {
  max-width: 360px;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.identity-policy-panel {
  padding: 14px;
  border: 1px solid rgba(47, 128, 201, 0.18);
  border-radius: 8px;
  background: #f6fbff;
}

.identity-policy-panel summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 900;
}

.identity-policy-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.identity-policy-bulk {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.identity-policy-bulk legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 900;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.identity-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.identity-policy-venue {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.identity-policy-venue strong {
  align-self: center;
}

.identity-create-form,
.identity-edit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.identity-management-list {
  display: grid;
  gap: 12px;
}

.identity-management-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.identity-management-card summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
}

.identity-management-card summary span,
.identity-management-card summary small {
  color: var(--muted);
}

.identity-edit-form {
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.identity-create-form .wide-field,
.identity-edit-form .wide-field,
.identity-rate-matrix,
.identity-actions {
  grid-column: 1 / -1;
}

.identity-rate-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.identity-rate-matrix strong {
  grid-column: 1 / -1;
}

.identity-rate-matrix label {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
  align-items: center;
  color: var(--ink);
}

.identity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#identities.crm-panel {
  overflow: visible;
}

.identity-parent-card {
  gap: 16px;
}

.identity-child-list {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px dashed #9cc7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.identity-create-form {
  grid-template-columns: minmax(240px, 0.75fr) minmax(360px, 1fr) auto;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.identity-card-row {
  display: grid;
  grid-template-columns: minmax(320px, 0.75fr) minmax(560px, 1.25fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid #b8d7f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 88, 146, 0.08);
}

.identity-child-card {
  position: relative;
}

.identity-child-card::before {
  content: "身份";
  position: absolute;
  top: -10px;
  left: 14px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.identity-card-row.disabled-identity {
  background: #f7f8fa;
}

.identity-card-main {
  display: grid;
  gap: 8px;
}

.identity-card-main h3 {
  margin: 0;
  font-size: 22px;
}

.identity-card-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.identity-card-main small {
  font-weight: 800;
}

.identity-category-pill {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f4fd;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.identity-card-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(160px, 0.35fr);
  gap: 12px;
}

.identity-card-form label,
.identity-create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.identity-card-form .wide-field,
.identity-card-form .identity-actions {
  grid-column: 1 / -1;
}

.identity-rate-dialog {
  width: min(920px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fff;
  box-shadow: 0 28px 80px rgba(12, 32, 55, 0.24);
}

.identity-rate-dialog::backdrop {
  background: rgba(12, 32, 55, 0.48);
}

.identity-rate-dialog-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.dialog-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.dialog-title-row h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.dialog-close {
  border-color: #2f80c9;
  background: #fff;
  color: #1456a0;
  font-weight: 900;
}

.dialog-close:hover {
  background: #e8f4fd;
  color: #0b3f73;
}

.identity-rate-dialog .identity-rate-matrix {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  max-height: 430px;
  overflow: auto;
  background: #f8fbfd;
}

.identity-rate-dialog .identity-rate-matrix label {
  grid-template-columns: minmax(0, 1fr) 130px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.venue-map-editor {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.venue-editor-floors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.venue-editor-canvas {
  position: relative;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(47, 128, 201, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 128, 201, 0.08) 1px, transparent 1px),
    #fff;
  background-size: calc(100% / 12) calc(100% / 10);
  overflow: hidden;
  touch-action: none;
}

.venue-editor-tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 7px;
  border: 2px solid rgba(47, 128, 201, 0.45);
  border-radius: 8px;
  background: rgba(234, 244, 241, 0.94);
  cursor: move;
  overflow: hidden;
  user-select: none;
}

.venue-editor-tile strong {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--text);
  font-size: clamp(10px, 1.05vw, 15px);
  font-weight: 900;
  line-height: 1.18;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.resize-handle {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--brand);
  border-bottom: 3px solid var(--brand);
  cursor: nwse-resize;
}

.floor-pill,
.status-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e8f4fd;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.space-card dl,
.identity-card dl,
.summary-list {
  display: grid;
  gap: 8px;
}

.space-card dl div,
.identity-card dl div,
.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 800;
}

.booking-shell {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.booking-form label,
.venue-admin-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.booking-form textarea,
.booking-form button,
.booking-form label:nth-last-child(2) {
  grid-column: 1 / -1;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  resize: vertical;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.calendar-grid span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 6px;
  background: #e8f6ee;
  color: #155f9f;
  font-weight: 800;
}

.complete-panel {
  max-width: 720px;
  margin: 56px auto;
}

.crm-shell {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: start;
  margin: 28px 0;
}

.crm-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.crm-sidebar strong {
  margin-bottom: 10px;
  font-size: 20px;
  letter-spacing: 0.04em;
}

/* 第一層：分組標題（深色底色塊，與子項明顯區隔） */
.crm-sidebar .crm-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #10263c;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* 第二層：子項連結（縮排＋左側導引線） */
.crm-sidebar a {
  position: relative;
  margin-left: 14px;
  padding: 9px 10px 9px 16px;
  border-left: 2px solid #dbe3ea;
  border-radius: 0 8px 8px 0;
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.3;
}

.crm-sidebar a:hover {
  background: #eef5f3;
  border-left-color: #9fb6c9;
}

.crm-sidebar a.active {
  background: #dff0eb;
  border-left-color: var(--brand);
  color: var(--brand);
}

.crm-sidebar a.active::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--brand);
}

/* 「營運總覽」這類不屬於任何分組的第一層連結：不縮排 */
.crm-sidebar > a:first-of-type {
  margin-left: 0;
  border-left: none;
  border-radius: 8px;
  font-size: 15px;
}
.crm-sidebar > a:first-of-type.active::before { display: none; }

.crm-content {
  display: block;
  min-width: 0;
}

.crm-panel {
  overflow-x: auto;
  display: block;
}

.crm-calendar-panel {
  display: grid;
  gap: 18px;
}

.crm-calendar-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.crm-calendar-controls .calendar-jump-form input[type="month"] {
  min-width: 170px;
  border: 0;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.closure-admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  gap: 14px;
}

.closure-card,
.closure-date-list,
.operations-day-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.closure-card {
  display: grid;
  gap: 12px;
}

.weekday-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(74px, 1fr));
  gap: 8px;
}

.weekday-checkbox-grid label {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(47, 128, 201, 0.22);
  border-radius: 8px;
  background: #f6fbff;
  font-weight: 900;
}

.closure-date-list {
  display: grid;
  gap: 8px;
}

.closure-date-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(47, 128, 201, 0.16);
  border-radius: 8px;
  background: #f6fbff;
}

.operations-day-list {
  display: grid;
  gap: 12px;
}

.crm-calendar-toolbar,
.crm-calendar-toolbar-actions,
.crm-calendar-today {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-calendar-toolbar {
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid rgba(47, 128, 201, 0.22);
  border-radius: 8px;
  background: #f4f9ff;
}

.crm-calendar-today span {
  color: var(--muted);
  font-weight: 800;
}

.crm-calendar-today strong {
  color: var(--brand);
  font-size: 20px;
}

.calendar-nav.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.calendar-nav.disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.operations-calendar-weekdays,
.operations-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.operations-calendar-weekdays {
  margin-top: 4px;
  text-align: center;
  color: var(--muted);
  font-weight: 900;
}

.operations-calendar-weekdays span {
  padding: 9px 4px;
}

.operations-calendar-grid {
  overflow: hidden;
  border-top: 1px solid rgba(47, 128, 201, 0.2);
  border-left: 1px solid rgba(47, 128, 201, 0.2);
  border-radius: 8px;
}

.operations-calendar-blank,
.operations-calendar-day {
  min-width: 0;
  min-height: 150px;
  padding: 9px;
  border-right: 1px solid rgba(47, 128, 201, 0.2);
  border-bottom: 1px solid rgba(47, 128, 201, 0.2);
  background: #fff;
}

.operations-calendar-blank {
  background: #f5f7fa;
}

.operations-calendar-day.is-past {
  background: #fafbfd;
}

.operations-calendar-day.is-closed {
  background: #f1f3f6;
}

.operations-calendar-day.is-today {
  position: relative;
  z-index: 1;
  background: #edf7ff;
  box-shadow: inset 0 0 0 3px var(--brand);
}

.operations-calendar-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.operations-calendar-day-head > strong {
  font-size: 18px;
}

.operations-calendar-events {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.calendar-operation {
  display: flex;
  gap: 5px;
  min-width: 0;
  padding: 5px 6px;
  border-left: 3px solid var(--brand);
  border-radius: 4px;
  background: #eef7ff;
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
}

.calendar-operation.activity {
  border-left-color: #c94f8b;
  background: #fff1f7;
}

.calendar-operation time {
  flex: 0 0 auto;
  font-weight: 900;
}

.calendar-operation span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-closure-reason,
.calendar-no-events {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.operations-day-card {
  display: grid;
  gap: 12px;
}

.operations-day-card.is-closed {
  border-color: #8b9bb0;
  background: #f7f9fc;
}

.operations-day-card.is-today {
  border-color: var(--brand);
  background: linear-gradient(180deg, #f1f8ff 0%, #ffffff 78%);
  box-shadow: 0 0 0 3px rgba(47, 128, 201, 0.14);
}

.operations-day-card.is-today.is-closed {
  border-color: var(--brand);
  background: linear-gradient(180deg, #eef7ff 0%, #f7f9fc 78%);
}

.operations-day-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.operations-day-head div {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.operations-day-head strong {
  font-size: 20px;
}

.operations-day-head span {
  color: var(--muted);
  font-weight: 900;
}

.operation-badge {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.operation-badge.open {
  background: #e8f4fd;
  color: var(--brand);
}

.operation-badge.closed {
  background: #e2e8f0;
  color: #475467;
}

.operation-badge.today {
  background: var(--brand);
  color: #fff;
}

.operations-day-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.operations-day-columns section {
  display: grid;
  gap: 8px;
  align-content: start;
}

.operations-day-columns h3 {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.operation-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.operation-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.operation-item.booking-status-pending {
  border-left-color: #f59e0b;
}

.operation-item.booking-status-approved,
.operation-item.booking-status-checked_in {
  border-left-color: #2f80c9;
}

.operation-item.booking-status-rejected {
  border-left-color: #d55f5a;
}

.operation-item.booking-status-draft {
  border-left-color: #94a3b8;
}

#members.crm-panel {
  overflow: visible;
  width: calc(100vw - 280px);
  max-width: none;
  margin-right: calc(50% - 50vw + 12px);
}

.crm-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 8px;
}

#members .pending-member-table table {
  min-width: 1060px;
}

#members .member-table table {
  min-width: 1760px;
  table-layout: fixed;
}

#members .member-table th:nth-child(1),
#members .member-table td:nth-child(1) {
  width: 145px;
}

#members .member-table th:nth-child(2),
#members .member-table td:nth-child(2) {
  width: 170px;
}

#members .member-table th:nth-child(3),
#members .member-table td:nth-child(3) {
  width: 250px;
}

#members .member-table th:nth-child(4),
#members .member-table td:nth-child(4) {
  width: 90px;
}

#members .member-table th:nth-child(5),
#members .member-table td:nth-child(5) {
  width: 690px;
}

#members .member-table th:nth-child(6),
#members .member-table td:nth-child(6) {
  width: 415px;
}

#members .member-table td {
  overflow-wrap: anywhere;
}

#members .actions {
  min-width: 340px;
}

#members .actions form {
  margin: 0 6px 8px 0;
}

#members .actions > form:not(.inline-identity-form) {
  display: inline-block;
}

#members .inline-identity-form {
  grid-template-columns: minmax(220px, 1fr) 92px;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
}

#members .inline-identity-form select,
#members .inline-identity-form button {
  min-height: 42px;
}

#members .member-detail-panel {
  width: 100%;
  min-width: 0;
  box-shadow: none;
}

.kpi-card {
  display: grid;
  gap: 10px;
}

.kpi-card strong {
  font-size: 30px;
}

progress {
  width: 100%;
  height: 10px;
  accent-color: var(--brand);
}

.status-badge.pending {
  background: #fff4d6;
  color: #8b6200;
}

.status-badge.status-pending,
.member-booking-card .status-badge.status-pending {
  background: #fff4d6;
  color: #8b6200;
}

.status-badge.approved,
.status-badge.checked_in,
.status-badge.completed {
  background: #e8f6ee;
  color: #155f9f;
}

.status-badge.status-approved,
.member-booking-card .status-badge.status-approved {
  background: #e8f6ee;
  color: #155f9f;
}

.status-badge.status-checked_in,
.member-booking-card .status-badge.status-checked_in {
  background: #e8f4fd;
  color: #1456a0;
}

.status-badge.status-completed,
.member-booking-card .status-badge.status-completed {
  background: #eef2f7;
  color: #475467;
}

.status-badge.status-needs_changes,
.member-booking-card .status-badge.status-needs_changes {
  background: #f3e8ff;
  color: #6b21a8;
}

.status-badge.rejected {
  background: #f9e8e5;
  color: #8f2d25;
}

.status-badge.status-rejected,
.member-booking-card .status-badge.status-rejected {
  background: #f9e8e5;
  color: #8f2d25;
}

.booking-review-list,
.member-booking-list {
  display: grid;
  gap: 12px;
}

.booking-review-card,
.member-booking-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.booking-review-card summary,
.member-booking-card summary {
  display: grid;
  grid-template-columns: auto minmax(130px, 0.8fr) minmax(200px, 1.5fr) minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.member-booking-card summary {
  grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.5fr) minmax(160px, 1fr) auto;
}

.booking-review-card summary::-webkit-details-marker,
.member-booking-card summary::-webkit-details-marker {
  display: none;
}

/* 展開中的那一筆：粗外框＋色底＋左側標示條，一眼看出目前開的是哪一筆 */
.booking-review-card[open],
.member-booking-card[open] {
  box-shadow: 0 18px 48px rgba(22, 58, 95, 0.18);
  border-width: 2px;
  border-color: var(--brand, #1c4e80);
  background: #f7fbff;
}

.booking-review-card[open] > summary,
.member-booking-card[open] > summary {
  background: #e8f2fb;
  border-left: 6px solid var(--brand, #1c4e80);
  border-bottom: 1px solid #cfe0ef;
}

/* KPI 分類色框：自辦＝綠、租借＝藍（原色）、機關使用＝橘、未分類＝灰虛線 */
.booking-review-card.kpi-cat-self { border-color: #2f8f5b; }
.booking-review-card.kpi-cat-self[open] { border-color: #2f8f5b; background: #f4fbf6; }
.booking-review-card.kpi-cat-self[open] > summary { background: #e8f6ec; border-left-color: #2f8f5b; }
.booking-review-card.kpi-cat-rental { border-color: #1c4e80; }
.booking-review-card.kpi-cat-agency { border-color: #d08214; }
.booking-review-card.kpi-cat-agency[open] { border-color: #d08214; background: #fffaf2; }
.booking-review-card.kpi-cat-agency[open] > summary { background: #fdf1de; border-left-color: #d08214; }
.booking-review-card.kpi-cat-none { border-style: dashed; border-color: #b0bcc7; }
.booking-review-card.kpi-cat-none[open] > summary { border-left-color: #b0bcc7; }

/* 使用率卡片：可點擊展開細項彈窗。
   注意：這是 <button>，全域 button 規則會給它藍底白字——必須明確蓋回白底深字，
   否則會出現「白底白字、字消失」（2026-08-24 使用者回報過）。 */
.kpi-card.usage-card {
  text-align: left;
  font: inherit;
  cursor: pointer;
  width: 100%;
  background: #fff;
  color: var(--ink, #1f2933);
  border: 1px solid var(--line, #e3e8ee);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kpi-card.usage-card:hover { background: #fff; color: var(--ink, #1f2933); }
.kpi-card.usage-card span { color: var(--muted, #62707c); }
.kpi-card.usage-card small { color: var(--muted, #62707c); }

.kpi-card.usage-card:hover {
  border-color: var(--brand, #1c4e80);
  box-shadow: 0 10px 24px rgba(22, 58, 95, 0.12);
}

.usage-detail-dialog { width: min(760px, 94vw); }
.usage-basis { margin: 0 0 14px; color: #46535e; font-size: 14px; }

.usage-metric-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.usage-metric {
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fbfcfd;
}

.usage-group-title { margin: 0 0 8px; font-size: 13px; color: #46535e; font-weight: 800; }
.usage-metric.primary { border-color: #1c4e80; background: #f2f8fd; }
.usage-metric h4 em { font-style: normal; font-size: 11px; background: #1c4e80; color: #fff; padding: 2px 6px; border-radius: 999px; margin-left: 6px; }
.usage-metric h4 { margin: 0 0 6px; font-size: 13px; color: #1c4e80; }
.usage-metric-figure { margin: 0 0 6px; font-size: 26px; font-weight: 900; color: #16324f; }
.usage-metric-note { margin: 0; font-size: 12px; line-height: 1.7; color: #8a97a3; }

.usage-space-title { margin: 0 0 8px; font-size: 14px; color: #46535e; }
.usage-space-list { display: flex; flex-direction: column; gap: 6px; }

.usage-space-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.3fr) minmax(80px, 2fr) 62px 74px auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.usage-space-row:hover { border-color: var(--brand, #1c4e80); background: #f4f7fa; }
.usage-space-row.open { border-color: var(--brand, #1c4e80); background: #eef4fa; }
.usage-space-name { font-weight: 700; color: #16324f; }
.usage-space-bar { height: 8px; border-radius: 999px; background: #e7ecf1; overflow: hidden; }
.usage-space-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand, #1c4e80); }
.usage-space-percent { font-weight: 800; color: #1c4e80; text-align: right; }
.usage-space-hours { color: #8a97a3; text-align: right; }
.usage-space-go { color: #1c4e80; white-space: nowrap; }

.usage-space-detail {
  border: 1px dashed #ccd4dc;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  margin: -8px 0 4px;
  padding: 12px 14px;
  background: #fbfcfd;
}

.usage-space-detail dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.usage-space-detail dl div { display: flex; gap: 8px; align-items: baseline; }
.usage-space-detail dt { color: #8a97a3; font-size: 12px; white-space: nowrap; }
.usage-space-detail dd { margin: 0; font-size: 13px; color: #46535e; }

@media (max-width: 640px) {
  .usage-space-row { grid-template-columns: 1fr auto auto; }
  .usage-space-bar, .usage-space-go { display: none; }
}

/* 總覽的分類場次卡：左側色條對應審核卡的分類色 */
.kpi-card.kpi-cat-card { border-left: 5px solid #b0bcc7; }
.kpi-card.kpi-cat-card.self { border-left-color: #2f8f5b; }
.kpi-card.kpi-cat-card.rental { border-left-color: #1c4e80; }
.kpi-card.kpi-cat-card.agency { border-left-color: #d08214; }
.kpi-card.kpi-cat-card.none { border-left-color: #b0bcc7; border-left-style: dashed; }
.kpi-card.kpi-cat-card.breach { border-left-color: #b3261e; }

/* 未履約的租借卡：紅色外框＋淡紅底，跟分類色一起表明「不列入統計」 */
.booking-review-card.is-breach { border-color: #b3261e; border-style: solid; }
.booking-review-card.is-breach[open] { border-color: #b3261e; background: #fdf5f4; }
.booking-review-card.is-breach[open] > summary { background: #fbeceb; border-left-color: #b3261e; }
.booking-review-card.is-breach .kpi-category-chip { background: #fbeceb; color: #b3261e; }

.kpi-card.kpi-cat-card.cancel { border-left-color: #d08214; }
.kpi-card.kpi-cat-card.noshow { border-left-color: #b3261e; }

.kpi-breach-select {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: #b3261e;
  font-weight: 700;
}

.kpi-breach-select select {
  padding: 7px 9px;
  border: 1px solid #e5b6b2;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
  color: #46535e;
}

.kpi-category-chip {
  justify-self: end;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f7;
  color: #46535e;
  white-space: nowrap;
}

.kpi-cat-self .kpi-category-chip { background: #e8f6ec; color: #2f8f5b; }
.kpi-cat-rental .kpi-category-chip { background: #e8f2fb; color: #1c4e80; }
.kpi-cat-agency .kpi-category-chip { background: #fdf1de; color: #9a5f06; }
.kpi-cat-none .kpi-category-chip { background: #f2f4f6; color: #8a97a3; }

.kpi-category-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px dashed #ccd4dc;
  border-radius: 10px;
  background: #fbfcfd;
}

.kpi-category-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: #46535e;
}

.kpi-category-form select {
  padding: 7px 9px;
  border: 1px solid #ccd4dc;
  border-radius: 8px;
  font: inherit;
}

.kpi-category-warn { color: #b3261e; font-size: 12px; }
.kpi-category-readonly { margin: 12px 0; color: #62707c; font-size: 13px; }

/* 彈窗關閉鈕：全域 button 是白字藍底，這裡要明確指定文字色，否則白底白字變成空洞 */
.day-schedule-close,
.usage-detail-dialog .day-schedule-close,
.booking-info-dialog .day-schedule-close {
  background: #fff;
  color: #46535e;
  border: 1px solid #ccd4dc;
  border-radius: 8px;
  padding: 6px 12px;
  min-height: 34px;
  font-weight: 700;
  cursor: pointer;
}

.day-schedule-close:hover,
.usage-detail-dialog .day-schedule-close:hover,
.booking-info-dialog .day-schedule-close:hover {
  background: #f4f7fa;
  color: #1c4e80;
  border-color: #1c4e80;
}

/* 彈窗標題列固定在頂端，捲動長內容時關閉鈕不會跑掉 */
.day-schedule-dialog .day-schedule-head {
  position: sticky;
  top: -20px;
  z-index: 3;
  background: #fff;
  padding: 6px 0 10px;
  margin: -6px 0 10px;
  border-bottom: 1px solid #eef2f6;
}

/* ── 營運日曆的租借彈窗：把審核卡重排成適合彈窗寬度的版型 ── */
.booking-info-dialog { width: min(940px, 96vw); max-height: 88vh; }
.booking-info-dialog .booking-review-card {
  border: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}
.booking-info-dialog .booking-review-card > summary { display: none; }
.booking-info-dialog .booking-review-body { padding: 0; }

/* 兩欄資訊在彈窗內改單欄，避免被擠爆 */
.booking-info-dialog .booking-detail-grid { display: block; }
.booking-info-dialog .summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px 16px;
  margin-bottom: 12px;
}
.booking-info-dialog .booking-needs-panel { margin-bottom: 12px; }

/* 表格在彈窗內可橫向捲動，不撐破版面 */
.booking-info-dialog .review-items-block,
.booking-info-dialog .booking-edit-block { overflow-x: auto; }
.booking-info-dialog .review-items-table,
.booking-info-dialog .booking-edit-items { min-width: 560px; }

/* 表單與動作區在彈窗內改為單欄堆疊 */
.booking-info-dialog .review-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.booking-info-dialog .kpi-category-form,
.booking-info-dialog .fee-tier-form,
.booking-info-dialog .booking-edit-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.booking-info-dialog .booking-info-strip { flex-wrap: wrap; }

/* ── 費用區塊：總金額大字在上，計算過程收合 ── */
.fee-hero {
  border: 1px solid #cfe0ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5fafe 0%, #e9f2fb 100%);
  padding: 16px 18px;
  margin: 12px 0;
}

.fee-hero-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
}

.fee-hero-left { display: flex; flex-direction: column; gap: 2px; }
.fee-hero-label { font-size: 13px; color: #46535e; font-weight: 700; letter-spacing: 0.05em; }
.fee-hero-amount {
  font-size: 40px;
  font-weight: 900;
  color: #16324f;
  line-height: 1.1;
  letter-spacing: -1px;
}
.fee-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: #62707c;
  line-height: 1.7;
  text-align: right;
}
.fee-hero-meta strong { color: #1c4e80; }

.fee-detail { margin-top: 14px; }
.fee-detail > summary.fee-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  background: #1c4e80;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 9px 18px;
  border: 0;
}
.fee-detail > summary.fee-detail-btn::-webkit-details-marker { display: none; }
.fee-detail > summary.fee-detail-btn::before { content: "\25B8"; font-size: 0.9em; }
.fee-detail[open] > summary.fee-detail-btn::before { content: "\25BE"; }
.fee-detail > summary.fee-detail-btn:hover { background: #16324f; }
.fee-detail .fee-breakdown {
  margin-top: 12px;
  background: #fff;
  border: 1px solid #cfe0ef;
  border-radius: 10px;
  padding: 12px 14px;
}
.fee-detail .fee-breakdown ul { margin: 6px 0; padding-left: 20px; }

.booking-edit-block { border: 0; padding: 0; background: transparent; }
.booking-edit-block > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  background: #fff;
  color: #1c4e80;
  border: 1.5px solid #1c4e80;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 700;
}
.booking-edit-block > summary::-webkit-details-marker { display: none; }
.booking-edit-block > summary::before { content: "\270E"; }
.booking-edit-block > summary:hover { background: #eef4fa; }
.booking-edit-block[open] > summary { margin-bottom: 12px; }
.booking-edit-block[open] {
  border: 1px dashed #b8c4cf;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fbfcfd;
}

@media (max-width: 700px) {
  .fee-hero-top { flex-direction: column; align-items: flex-start; }
  .fee-hero-meta { text-align: left; }
  .fee-hero-amount { font-size: 30px; }
}

.review-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 6px 10px;
  border: 1px solid #b8d7f0;
  border-radius: 999px;
  background: #e8f4fd;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

/* 狀態膠囊顏色：不再侷限在審核卡內——租借審核列表列（.booking-row）與其他清單同樣生效，
   待審核（黃）與已核准（綠）一眼可分 */
.review-status.status-draft {
  background: #eef2f7;
  color: #475467;
  border-color: #cbd5e1;
}

.review-status.status-pending,
.review-status.status-member_replied {
  background: #fff4d6;
  color: #8b6200;
  border-color: #f1c84b;
}

.review-status.status-approved {
  background: #e8f6ee;
  color: #1f7a34;
  border-color: #68c39a;
}

.review-status.status-checked_in {
  background: #e8f4fd;
  color: #1456a0;
  border-color: #6db5ee;
}

.review-status.status-completed {
  background: #eef2f7;
  color: #475467;
  border-color: #cbd5e1;
}

.review-status.status-needs_changes {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #c084fc;
}

.review-status.status-rejected {
  background: #f9e8e5;
  color: #8f2d25;
  border-color: #e29a91;
}

.locked-field {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #b8d7f0;
  border-radius: 6px;
  background: #f7fbff;
  color: var(--text);
  font-weight: 900;
}

.booking-review-body,
.member-booking-detail {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #f8fbfe;
}

.booking-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 16px;
}

.booking-needs-panel,
.booking-message-thread,
.booking-question-form,
.review-message-form,
.page-settings-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.booking-needs-panel h3,
.booking-message-thread h3 {
  margin-top: 0;
}

.booking-message-thread {
  display: grid;
  gap: 10px;
}

.booking-message {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: #eef7ff;
}

.booking-message.member {
  background: #f4f9ed;
}

.booking-message time,
.booking-review-card time,
.member-booking-card time {
  color: var(--muted);
  font-size: 13px;
}

.attachment-link {
  width: fit-content;
  color: var(--brand);
  font-weight: 900;
}

.review-action-grid {
  display: grid;
  grid-template-columns: 0.6fr 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.review-message-form,
.booking-question-form {
  display: grid;
  gap: 10px;
}

.review-message-form textarea,
.booking-question-form textarea {
  width: 100%;
}

.inline-identity-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px;
}

.member-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 32, 55, 0.48);
}

.member-alert-dialog {
  position: relative;
  width: min(720px, 100%);
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0,0,0,0.24);
}

.member-alert-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.member-alert-list,
.member-alert-banner div {
  display: grid;
  gap: 8px;
}

.member-alert-list a,
.member-alert-banner a {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e8;
  color: var(--text);
}

.member-alert-banner {
  display: grid;
  gap: 12px;
  width: min(1240px, calc(100% - 36px));
  margin: 18px auto;
  padding: 18px;
  border: 2px solid #e0b15f;
  border-radius: 8px;
  background: #fff8e8;
}

.page-settings-form {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.settings-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 8px;
  background: #fff;
}

.settings-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.settings-group-head strong {
  font-size: 18px;
}

.settings-group-head span {
  color: var(--muted);
  font-size: 14px;
}

.settings-group label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.settings-group textarea,
.settings-group input {
  width: 100%;
}

.settings-booking {
  border-left-color: #2f80c9;
  background: #f7fbff;
}

.settings-member {
  border-left-color: #2e9c70;
  background: #f6fcf8;
}

.settings-registration {
  border-left-color: #8f7bd9;
  background: #faf8ff;
}

.settings-footer {
  border-left-color: #d9872d;
  background: #fffaf2;
}

.settings-policy {
  border-left-color: #cc4c3c;
  background: #fff8f6;
}

.settings-submit {
  justify-self: start;
  min-width: 160px;
}

.time-rule-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfe;
}

.time-rule-fieldset legend {
  padding: 0 6px;
  color: var(--brand-dark);
  font-weight: 900;
}

.time-rule-fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: auto;
  padding: 0;
  color: var(--text);
  font-weight: 800;
}

.time-rule-fieldset select,
.time-rule-fieldset .period-checkbox-grid {
  grid-column: 1 / -1;
}

.period-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.period-checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(47, 128, 201, 0.24);
  border-radius: 8px;
  background: #fff;
}

.period-checkbox small {
  grid-column: 2;
}

.period-checkbox small {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  width: min(1240px, calc(100% - 36px));
  margin: 28px auto;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.mode-switch {
  border: 1px solid var(--line);
  background: #fff;
}

.chooser-page {
  min-height: 100vh;
}

.interface-chooser {
  display: grid;
  min-height: 100vh;
  place-items: center;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.chooser-card {
  width: 100%;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 26px 80px rgba(18, 32, 29, 0.12);
}

.chooser-card h1 {
  margin: 14px 0;
  font-size: clamp(36px, 6vw, 64px);
}

.chooser-card p:not(.eyebrow) {
  max-width: 700px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
}

.chooser-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
}

.chooser-option {
  display: grid;
  gap: 10px;
  min-height: 160px;
  padding: 22px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.chooser-option strong {
  font-size: 28px;
}

.chooser-option span {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.mobile-option {
  border-color: var(--brand);
  background: #e8f4fd;
}

.booking-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.booking-progress li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.booking-progress span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #ece8df;
  color: var(--muted);
  font-size: 14px;
}

.booking-progress .active {
  border-color: rgba(47, 128, 201, 0.38);
  background: #e8f4fd;
  color: var(--brand);
}

.booking-progress .active span {
  background: var(--brand);
  color: #fff;
}

.booking-step-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.date-picker-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}

.date-picker-form input {
  width: 100%;
}

.identity-window-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6fbff;
  color: var(--muted);
  font-weight: 700;
}

.identity-window-note.available {
  border-color: rgba(47, 128, 201, 0.34);
  background: #e8f4fd;
  color: var(--brand);
}

.identity-window-note.limited,
.time-choice.identity-limited {
  border-color: #e0b15f;
  background: #fff8e8;
  color: #855b14;
}

.time-choice.user-available {
  border-color: rgba(47, 128, 201, 0.5);
  background: #e8f4fd;
}

.booking-calendar {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  max-width: 100%;
  overflow: visible;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.calendar-jump-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.calendar-jump-form label {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(47, 128, 201, 0.28);
  border-radius: 8px;
  background: #e8f4fd;
  color: var(--brand-dark);
  font-weight: 900;
}

.calendar-jump-form span {
  font-size: 13px;
}

.calendar-jump-form select {
  min-width: 76px;
  border: 0;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.calendar-jump-form button {
  padding: 8px 12px;
}

.calendar-nav {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
}

.calendar-nav.disabled {
  opacity: 0.45;
  background: #f1f0ec;
}

.calendar-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.calendar-weekdays span {
  text-align: center;
  color: var(--muted);
  font-weight: 900;
}

.month-cell {
  position: relative;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  overflow: visible;
}

.month-cell strong {
  font-size: 22px;
}

.month-cell span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.month-cell .calendar-label-pair,
.month-cell .slot-count {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 4px;
  align-items: baseline;
}

.month-cell .calendar-label-pair span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.month-cell > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.month-cell.empty {
  visibility: hidden;
}

.month-cell.disabled {
  opacity: 0.42;
  background: #f1f0ec;
}

.month-cell.day-open {
  border-color: rgba(47, 128, 201, 0.34);
  background: #e8f4fd;
}

.month-cell.day-partial {
  border-color: #e0b15f;
  background: #fff8e8;
}

.month-cell.day-full {
  border-color: #d55f5a;
  background: #fdebea;
}

.month-cell.day-closed {
  border-color: #8b9bb0;
  background: #edf2f7;
  color: #475467;
}

.month-cell.user-limited {
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(133, 91, 20, 0.10) 8px 16px);
}

.month-cell.selected {
  outline: 3px solid rgba(47, 128, 201, 0.35);
}

.day-timeline {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  display: none;
  width: min(360px, 82vw);
  transform: translateX(-50%);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(16, 32, 51, 0.18);
  color: var(--text);
}

.month-cell:hover .day-timeline,
.month-cell:focus .day-timeline {
  display: grid;
  gap: 8px;
}

.day-timeline b {
  font-size: 14px;
}

.day-timeline div {
  display: grid;
  gap: 4px;
}

.day-timeline span {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 12px;
}

.day-timeline span.free {
  background: #e8f4fd;
  color: var(--brand-dark);
}

.day-timeline span.busy {
  background: #fdebea;
  color: #9b2c27;
}

.day-timeline span.closed {
  background: #edf2f7;
  color: #475467;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend span::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.legend-open::before {
  background: #e8f4fd;
}

.legend-partial::before {
  background: #fff8e8;
}

.legend-full::before {
  background: #fdebea;
}

.legend-closed::before {
  background: #edf2f7;
  border-color: #8b9bb0;
}

.legend-limited::before {
  background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(133, 91, 20, 0.14) 5px 10px), #fff;
}

.step-context {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
}

.booking-space-grid,
.date-choice-grid,
.time-choice-grid {
  display: grid;
  gap: 12px;
}

.booking-space-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.date-choice-grid,
.time-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.booking-space-choice,
.date-choice,
.time-choice,
.mobile-space-option {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(47, 128, 201, 0.24);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--text);
}

.booking-space-choice span,
.mobile-space-option span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e0f0ec;
  color: var(--brand);
  font-weight: 900;
}

.booking-space-choice strong,
.date-choice span,
.time-choice strong,
.mobile-space-option strong {
  font-size: 22px;
}

.booking-space-choice p,
.booking-space-choice small,
.date-choice small,
.time-choice small,
.mobile-space-option small {
  color: var(--muted);
}

.time-choice.disabled {
  border-color: #e3b5ae;
  background: #f9e8e5;
  color: #8f2d25;
}

.booking-summary-card {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.booking-summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.booking-summary-card strong {
  margin-bottom: 8px;
}

.mobile-quick-actions,
.mobile-space-list {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.mobile-quick-actions a {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 18px;
  border: 2px solid rgba(47, 128, 201, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.mobile-quick-actions strong {
  font-size: 24px;
}

.mobile-quick-actions span {
  color: var(--muted);
}

.mobile-mode .site-main {
  width: min(760px, calc(100% - 20px));
}

.mobile-mode .site-header {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
}

.mobile-mode .site-brand {
  flex: 0 0 auto;
  gap: 8px;
}

.mobile-mode .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.mobile-mode .brand-mark-logo {
  width: 38px;
  height: 38px;
  padding: 2px;
  border-radius: 7px;
}

.mobile-mode .site-brand strong {
  font-size: 14px;
  white-space: nowrap;
}

.mobile-mode .site-brand small {
  display: none;
}

.mobile-mode .site-nav {
  flex: 1 1 auto;
  width: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 3px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-mode .site-nav::-webkit-scrollbar {
  display: none;
}

.mobile-mode .site-nav a {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 14px;
  white-space: nowrap;
}

.mobile-mode .site-nav a[href="/mobile"],
.mobile-mode .site-nav a[href="/mobile/booking"],
.mobile-mode .site-nav a[href="/mobile/member"] {
  font-weight: 900;
}

.mobile-mode .hub-hero {
  display: block;
  min-height: auto;
  padding: 18px 0;
}

.mobile-mode .hub-hero-media {
  min-height: 260px;
  margin-bottom: 18px;
}

.mobile-mode .hub-photo-card {
  left: 16px;
  bottom: 16px;
  width: calc(100% - 32px);
  padding: 16px;
}

.mobile-mode .hub-hero-copy h1,
.mobile-mode .page-heading h1 {
  font-size: 42px;
}

.mobile-mode .hub-hero-copy p:not(.eyebrow),
.mobile-mode .page-heading p:not(.eyebrow) {
  font-size: 20px;
}

.mobile-mode .home-venue-cards,
.mobile-mode .home-floor-tiles,
.mobile-mode .member-dashboard,
.mobile-mode .member-booking-card summary {
  grid-template-columns: 1fr;
}

.mobile-mode.member-sheet-open {
  overflow: hidden;
}

.mobile-mode .mobile-member-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 18px;
}

.mobile-mode .mobile-member-actions button {
  min-height: 58px;
  border: 1px solid #b8d7f0;
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-size: 17px;
  font-weight: 900;
}

.mobile-mode .member-dashboard .profile-card.member-sheet {
  display: none;
}

.mobile-mode .member-dashboard .profile-card.member-sheet.is-open {
  position: fixed;
  inset: 12px;
  z-index: 90;
  display: grid;
  align-content: start;
  max-width: none;
  width: auto;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 18px;
  border-color: #b8d7f0;
  box-shadow: 0 24px 80px rgba(22, 58, 95, 0.28);
  transform: none;
}

.mobile-mode .member-sheet-close {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid #b8d7f0;
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-size: 15px;
  font-weight: 900;
}

.mobile-mode .crm-panel,
.mobile-mode .profile-card,
.mobile-mode .upcoming-booking,
.mobile-mode .member-alert-banner,
.mobile-mode .member-booking-card,
.mobile-mode .member-booking-detail,
.mobile-mode .booking-message-thread,
.mobile-mode .booking-question-form {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.mobile-mode .member-booking-card summary {
  gap: 6px;
  padding: 14px;
}

.mobile-mode .member-booking-card summary > *,
.mobile-mode .member-booking-detail *,
.mobile-mode .booking-message * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mobile-mode .member-booking-detail {
  padding: 12px;
}

.mobile-mode .summary-list {
  grid-template-columns: 1fr;
}

.mobile-mode .summary-list div {
  grid-template-columns: 1fr;
  gap: 4px;
}

.mobile-mode .booking-question-form input[type="file"] {
  width: 100%;
  max-width: 100%;
  font-size: 13px;
}

.mobile-mode .member-detail-panel {
  width: 100%;
}

.mobile-mode .booking-shell {
  grid-template-columns: 1fr;
}

.mobile-mode .availability-panel {
  display: none;
}

.mobile-mode .booking-progress {
  grid-template-columns: 1fr 1fr;
}

.mobile-mode .booking-progress li {
  min-height: 54px;
  font-size: 18px;
}

.mobile-mode .booking-step-panel {
  padding: 16px;
}

.mobile-mode .booking-step-panel h2 {
  font-size: 22px;
}

.mobile-mode .booking-step-panel p,
.mobile-mode .identity-window-note {
  font-size: 16px;
  line-height: 1.55;
}

.mobile-mode .booking-space-grid,
.mobile-mode .date-choice-grid,
.mobile-mode .time-choice-grid,
.mobile-mode .booking-form {
  grid-template-columns: 1fr;
}

.mobile-mode .booking-space-choice,
.mobile-mode .date-choice,
.mobile-mode .time-choice,
.mobile-mode .mobile-space-option {
  min-height: 112px;
  padding: 18px;
}

.mobile-mode input,
.mobile-mode select,
.mobile-mode button,
.mobile-mode textarea {
  min-height: 52px;
  font-size: 18px;
}

.mobile-mode .booking-calendar {
  gap: 10px;
  margin: 16px 0 4px;
  overflow: visible;
}

.mobile-mode .calendar-toolbar {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-mode .calendar-jump-form {
  grid-column: 1 / -1;
  order: -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-mode .calendar-jump-form label {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 7px 8px;
}

.mobile-mode .calendar-jump-form select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  font-size: 17px;
}

.mobile-mode .calendar-jump-form button {
  grid-column: 1 / -1;
  width: fit-content;
  justify-self: center;
  min-height: 44px;
  padding: 8px 18px;
  font-size: 17px;
}

.mobile-mode .calendar-nav {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px;
}

.mobile-mode .calendar-weekdays,
.mobile-mode .month-grid {
  gap: 5px;
}

.mobile-mode .calendar-weekdays span {
  font-size: 15px;
}

.mobile-mode .month-cell {
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 3px;
  min-height: 94px;
  padding: 6px 2px;
  border-radius: 7px;
  text-align: center;
  overflow: hidden;
}

.mobile-mode .month-cell strong {
  font-size: 20px;
  line-height: 1;
}

.mobile-mode .month-cell > .calendar-label-pair,
.mobile-mode .month-cell > .calendar-label-text {
  display: grid;
  align-content: start;
  justify-items: center;
  min-height: 24px;
  margin: 0;
  font-size: 11px;
  line-height: 1.15;
}

.mobile-mode .month-cell > .calendar-label-pair > span {
  display: block;
  min-height: 0;
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.mobile-mode .month-cell > small {
  align-self: end;
  font-size: 10px;
  line-height: 1.15;
}

.mobile-mode .month-cell > .slot-count {
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 1px;
  min-height: 25px;
}

.mobile-mode .month-cell > .slot-count > span {
  display: block;
  min-height: 0;
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.mobile-mode .month-cell > .slot-count > span:last-child {
  font-size: 9px;
}

.mobile-mode .day-timeline {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 18px;
  width: auto;
  max-height: 48vh;
  overflow: auto;
  transform: none;
}

.mobile-mode .month-cell:focus .day-timeline,
.mobile-mode .month-cell:active .day-timeline {
  display: grid;
  gap: 8px;
}

.mobile-mode .calendar-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  font-size: 13px;
}

.mobile-mode .booking-form button {
  min-height: 58px;
  font-size: 20px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .hub-hero,
  .split-band,
  .space-layout,
  .booking-shell,
  .crm-shell {
    grid-template-columns: 1fr;
  }

  .hub-hero {
    min-height: auto;
  }

  .hub-hero-media {
    min-height: 360px;
  }

  .booking-form {
    grid-template-columns: 1fr;
  }

  .crm-sidebar {
    position: static;
  }

  .tour-head {
    display: grid;
    align-items: start;
  }

  .tour-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .tour-actions a {
    flex: 1;
    justify-content: center;
  }

  .tour-frame {
    min-height: 560px;
    height: 68vh;
  }

  .chooser-actions {
    grid-template-columns: 1fr;
  }

  .activity-create-form,
  .activity-detail-meta,
  .rental-rules-panel,
  .rental-policy-form,
  .booking-detail-grid,
  .review-action-grid,
  .page-settings-form,
  .member-dashboard,
  .segmented-choice {
    grid-template-columns: 1fr;
  }

  .booking-review-card summary,
  .member-booking-card summary {
    grid-template-columns: 1fr;
  }

  .inline-identity-form {
    grid-template-columns: 1fr;
  }

  .venue-admin-grid,
  .venue-admin-card,
  .time-rule-fieldset,
  .period-checkbox-grid,
  .identity-create-form,
  .identity-policy-bulk,
  .identity-policy-grid,
  .identity-policy-venue,
  .identity-card-row,
  .identity-card-form {
    grid-template-columns: 1fr;
  }

  #members.crm-panel {
    width: auto;
    margin-right: 0;
  }

  .identity-category-header {
    display: grid;
  }

  .identity-category-header span {
    max-width: none;
    text-align: left;
  }

  .period-checkbox small {
    grid-column: 1 / -1;
  }

  .desktop-mode .spaces-showcase .floor-map {
    transform: none;
    min-height: 250px;
  }

  .space-tile {
    grid-column: auto;
    grid-row: auto;
  }

  .space-popover {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .activity-item,
  .compact-bookings a {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    display: grid;
  }

  .satisfaction-band { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px 20px; }

  .register-steps,
  .register-field-grid {
    grid-template-columns: 1fr;
  }

  .register-steps li {
    min-height: auto;
  }

  .month-cell > .calendar-label-pair,
  .month-cell > .slot-count {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.18;
  }

  .month-cell > .slot-count {
    align-items: flex-start;
  }

  .crm-calendar-controls,
  .closure-admin-grid,
  .operations-day-columns,
  .closure-date-item,
  .weekday-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .floor-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hub-hero-copy h1,
  .page-heading h1 {
    font-size: 42px;
  }
}

/* ── 營運日曆：匯出／匯入工具列 ── */
.calendar-export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
}
.calendar-import-box {
  flex: 1 1 320px;
  border: 1px solid #d7dde5;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
}
.calendar-import-box summary { cursor: pointer; font-weight: 700; }
.calendar-import-form { display: grid; gap: 8px; margin-top: 8px; }
.calendar-import-form input[type="file"] { font-size: 14px; }

/* ── CRM 側欄：現場問卷入口卡片 ── */
.kiosk-entry-card {
  margin-top: 16px;
  border: 1.5px solid #1c4e80;
  border-radius: 12px;
  padding: 12px;
  background: #f6f9fc;
  display: grid;
  gap: 8px;
}
.kiosk-entry-card strong { font-size: 13px; color: #1c4e80; }
.kiosk-entry-btn {
  display: block;
  text-align: center;
  background: #1c4e80;
  color: #fff !important;
  border-radius: 9px;
  padding: 10px;
  font-weight: 700;
  text-decoration: none;
}
.kiosk-entry-card small { font-size: 11px; color: #62707c; word-break: break-all; user-select: all; }

/* ── 營業時間設定 ── */
.business-hours-card { grid-column: 1 / -1; }
.business-hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 16px; }
.business-hours-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.business-hours-row strong { width: 44px; }
.business-hours-row input[type="time"] { border: 1px solid #cfd6dc; border-radius: 8px; padding: 6px 8px; font: inherit; }
.business-hours-row.extended-row { flex-wrap: wrap; }

/* ── 管理員階層與頁面標籤 ── */
.founder-badge { font-size: 11px; background: #f0b429; color: #10263c; border-radius: 6px; padding: 2px 8px; font-weight: 700; vertical-align: 1px; }
.page-tag { font-style: normal; font-size: 11px; background: #1c4e80; color: #fff; border-radius: 6px; padding: 2px 8px; margin-right: 8px; vertical-align: 1px; }
.todo-tag { font-style: normal; font-size: 11px; background: #fbeae3; color: #b3563c; border-radius: 6px; padding: 2px 8px; margin-left: 8px; }
.extended-hours-check, .auto-sync-check { display: block; margin: 8px 0; font-size: 13.5px; color: #43525f; }

/* ── 申請單（購物車式租借）：前台申請車與項目摘要 ── */
.booking-cart-panel { border: 1.5px solid #1c4e80; border-radius: 14px; background: #f4f9fe; padding: 14px 16px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.booking-cart-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.booking-cart-head strong { color: #10263c; font-size: 15.5px; }
.booking-cart-head span { color: #43525f; font-size: 13px; }
.booking-cart-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border: 1px solid #d7e3ee; border-radius: 10px; padding: 9px 12px; }
.booking-cart-item strong { font-size: 14px; color: #10263c; }
.booking-cart-item span { font-size: 13.5px; color: #33475a; }
.booking-cart-remove { margin-left: auto; font-size: 12.5px; color: #b3563c; text-decoration: none; border: 1px solid #e5c4b8; border-radius: 8px; padding: 4px 10px; }
.booking-cart-remove:hover { background: #fbeae3; }
.booking-cart-checkout { text-align: center; }
.booking-space-choice.in-cart { opacity: 0.75; border-style: dashed; cursor: default; }
.time-submit-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.time-submit-add { border: 1.5px solid #1c4e80; border-radius: 10px; background: #fff; color: #1c4e80; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.time-submit-add:hover { background: #eef5fb; }
.booking-items-summary { margin: 14px 0 18px; }
.booking-items-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; border: 1px solid #dbe3ea; border-radius: 10px; overflow: hidden; }
.booking-items-table th, .booking-items-table td { border-bottom: 1px solid #e7edf3; padding: 8px 10px; text-align: left; vertical-align: top; }
.booking-items-table thead th { background: #10263c; color: #fff; font-size: 12.5px; }
.booking-items-table tfoot td { background: #f4f7fa; font-weight: 700; }
.booking-items-table small { color: #6b7a89; }
.booking-add-more { display: inline-block; margin-top: 10px; font-size: 13.5px; color: #1c4e80; text-decoration: none; border: 1px dashed #1c4e80; border-radius: 8px; padding: 7px 12px; }
.booking-add-more:hover { background: #eef5fb; }

/* ── 申請單：會員中心項目列表 ── */
.group-items-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.group-item-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #f7fafc; border: 1px solid #e2e9f0; border-radius: 8px; padding: 8px 10px; font-size: 13.5px; }
.group-item-row strong { font-weight: 700; color: #10263c; }
.group-item-row.linked { opacity: 0.8; }
.group-item-row .status-badge { margin-left: auto; }
.group-item-note { font-size: 12px; color: #6b7a89; }

/* ── 申請單：CRM 逐項准駁表 ── */
.review-items-block { margin: 14px 0; }
.review-items-block h3 { margin: 0 0 8px; font-size: 14.5px; color: #10263c; }
.review-items-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; border: 1px solid #dbe3ea; }
.review-items-table th, .review-items-table td { border-bottom: 1px solid #e7edf3; padding: 8px 10px; text-align: left; vertical-align: middle; }
.review-items-table thead th { background: #f0f4f8; color: #33475a; font-size: 12.5px; }
.review-items-table tr.linked-item td { background: transparent; color: inherit; }
.review-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.review-item-actions form { display: inline; }
.review-item-actions button { font: inherit; font-size: 12.5px; font-weight: 700; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.mini-approve { border: 1px solid #68c39a; background: #e8f6ee; color: #116149; }
.mini-approve:hover { background: #d7efe2; }
.mini-reject { border: 1px solid #e5a293; background: #fdf0ec; color: #a13f26; }
.mini-reject:hover { background: #f9e0d8; }
.mini-reset { border: 1px solid #cbd5e1; background: #f4f6f8; color: #475467; }
.mini-reset:hover { background: #e9edf2; }
.status-badge.status-partial, .review-status.status-partial { background: #fdf3e0; color: #9a5b00; border: 1px solid #eec06a; }
.status-badge.status-member_replied { background: #fff4d6; color: #8b6200; border: 1px solid #f1c84b; }

/* ── 營業時間與休館設定頁 ── */
.hours-settings-panel { display: flex; flex-direction: column; gap: 18px; }
.hours-schedule-card, .hours-closure-card { border: 1px solid #dbe3ea; border-radius: 14px; background: #fff; padding: 16px 18px; }
.hours-week-table { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: 14px; }
.hours-week-table th, .hours-week-table td { border-bottom: 1px solid #e7edf3; padding: 9px 10px; text-align: left; vertical-align: middle; }
.hours-week-table thead th { background: #10263c; color: #fff; font-size: 12.5px; }
.hours-day-label strong { font-size: 14.5px; color: #10263c; }
.hours-closed-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: #43525f; cursor: pointer; }
.hours-time-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hours-time-cell input[type="time"] { border: 1px solid #cfd6dc; border-radius: 8px; padding: 6px 8px; font: inherit; }
.hours-tilde { color: #6b7a89; }
.hours-closed-hint { display: none; font-style: normal; font-size: 13px; color: #b3563c; }
.hours-week-row.is-closed-day { background: #fbf6f4; }
.hours-week-row.is-closed-day .hours-time-cell input, .hours-week-row.is-closed-day .hours-tilde { display: none; }
.hours-week-row.is-closed-day .hours-closed-hint { display: inline; }
.hours-ext-head { margin-top: 16px; }
.hours-ext-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; font-size: 14px; }
.hours-ext-row input[type="time"] { border: 1px solid #cfd6dc; border-radius: 8px; padding: 6px 8px; font: inherit; }
.hours-save-btn { margin-top: 14px; }
.hours-closure-add { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.hours-closure-add label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #43525f; }
.hours-closure-add input { border: 1px solid #cfd6dc; border-radius: 8px; padding: 7px 9px; font: inherit; }
.hours-closure-add button { font: inherit; font-weight: 700; border: 0; border-radius: 10px; background: #1c4e80; color: #fff; padding: 9px 16px; cursor: pointer; }
@media (max-width: 720px) {
  .hours-time-cell { gap: 6px; }
  .review-items-table, .booking-items-table { font-size: 12.5px; }
  .time-submit-row { flex-direction: column; }
}

/* ── 頁尾版權宣告 ── */
.site-footer-copyright { flex-basis: 100%; text-align: center; font-size: 12.5px; color: #8494a3; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }

/* ── 租借審核：排序與狀態篩選列 ── */
.booking-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: #f4f7fa; border: 1px solid #dbe3ea; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.booking-filter-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.booking-filter-label { font-size: 12.5px; font-weight: 800; color: #43525f; margin-right: 2px; }
.booking-filter-chip { font-size: 13px; font-weight: 700; color: #33475a; text-decoration: none; border: 1px solid #cfd9e2; border-radius: 999px; background: #fff; padding: 5px 12px; }
.booking-filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.booking-filter-chip.active { background: #10263c; border-color: #10263c; color: #fff; }
.booking-filter-chip.tag-pending.active { background: #8b6200; border-color: #8b6200; }
.booking-filter-chip.tag-approved.active { background: #116149; border-color: #116149; }
.booking-filter-chip.tag-rejected.active { background: #a13f26; border-color: #a13f26; }
.booking-filter-count { margin-left: auto; font-size: 12.5px; color: #6b7a89; }

/* ── 租借審核：創始管理員整筆刪除 ── */
.review-delete-row { display: flex; justify-content: flex-end; border-top: 1px dashed #e5c4b8; margin-top: 14px; padding-top: 12px; }
.review-delete-btn { font-size: 12.5px; }

/* ── 租用資訊條：日期＋空間時段凸顯（CRM 審核卡／會員中心／完成頁共用） ── */
.booking-info-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; background: #eef5fb; border: 1.5px solid #b9d2e8; border-left: 5px solid #1c4e80; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.bis-date { font-size: 17px; font-weight: 900; color: #10263c; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.bis-icon { font-size: 16px; }
.bis-items { display: flex; flex-wrap: wrap; gap: 8px; }
.bis-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #1c4e80; border-radius: 10px; padding: 6px 12px; font-size: 13.5px; }
.bis-chip em { font-style: normal; font-weight: 700; color: #10263c; }
.bis-chip b { font-variant-numeric: tabular-nums; color: #1c4e80; font-size: 14.5px; }
.bis-chip.linked { border-style: dashed; border-color: #8ba7c0; opacity: 0.85; }
.bis-chip.linked small { font-size: 11px; color: #6b7a89; }
.booking-summary-when { font-weight: 800; color: #10263c !important; font-variant-numeric: tabular-nums; }
.upcoming-booking .booking-info-strip { margin: 10px 0 0; background: #fff; }
@media (max-width: 720px) {
  .booking-info-strip { flex-direction: column; align-items: flex-start; gap: 8px; }
  .bis-date { font-size: 16px; }
}

/* ── 試營運收費暫行方案：費用計算明細 ── */
.fee-breakdown { background: #f7f9fb; border: 1px solid #e3e8ee; border-radius: 10px; padding: 12px 16px; margin: 10px 0; font-size: 0.9em; line-height: 1.7; }
.fee-breakdown-title { margin: 0 0 6px; font-weight: 700; color: #1c4e80; }
.fee-breakdown ul { margin: 0 0 8px; padding-left: 20px; }
.fee-breakdown li { margin: 2px 0; }
.fee-breakdown p { margin: 4px 0; }
.fee-breakdown-note { color: #8a97a3; font-size: 0.92em; }


/* ═══ 2026-08-22 租借審核重設計／會員管理重設計 ═══ */

/* 彈窗基底（審核頁的處理彈窗也用同一套；日曆頁另有內嵌樣式，重複無害） */
.day-schedule-dialog { border: 0; border-radius: 14px; padding: 20px 24px; width: min(680px, 92vw); max-height: 84vh; overflow: auto; box-shadow: 0 18px 50px rgba(15, 30, 45, 0.3); }
.day-schedule-dialog::backdrop { background: rgba(15, 30, 45, 0.45); }
.booking-info-dialog { width: min(980px, 96vw); max-height: 90vh; }

/* 待處理區 */
.pending-zone { border: 2px solid #d08214; border-radius: 14px; background: linear-gradient(180deg, #fffdf7 0%, #fdf4e3 100%); padding: 14px 18px 16px; margin-bottom: 18px; }
.pending-zone-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 10px; }
.pending-zone-head h2 { margin: 0; font-size: 17px; color: #7a5104; display: inline-flex; align-items: center; gap: 8px; }
.pending-zone-head span { color: #8a6414; font-size: 12.5px; }
.pending-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: #d08214; color: #fff; font-size: 14px; }
#pending-empty-note { margin: 4px 0 0; }

/* 列表列（點擊開彈窗） */
.booking-row-list { display: flex; flex-direction: column; gap: 8px; }
.booking-row { display: grid; grid-template-columns: auto minmax(200px, 1.6fr) minmax(150px, 1fr) minmax(120px, auto) auto auto; gap: 8px 14px; align-items: center; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-left-width: 5px; border-radius: 10px; background: #fff; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.booking-row:hover { border-color: var(--brand); box-shadow: 0 8px 20px rgba(22, 58, 95, 0.1); background: #f7fbff; color: inherit; }
.booking-row.kpi-cat-self { border-left-color: #2f8f5b; }
.booking-row.kpi-cat-rental { border-left-color: #1c4e80; }
.booking-row.kpi-cat-agency { border-left-color: #d08214; }
.booking-row.kpi-cat-unknown { border-left-color: #7b5ea7; }
.booking-row.kpi-cat-none { border-left-color: #b0bcc7; border-left-style: dashed; }
.booking-row.is-breach { border-left-color: #b3261e; }
.booking-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.booking-row-main strong { color: #16324f; }
.booking-row-event { color: #46535e; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-row-when { display: flex; flex-direction: column; gap: 2px; color: #46535e; font-size: 13px; }
.booking-row-when small { color: #8a97a3; }
.booking-row-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.booking-row-flag { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.booking-row-flag.flag-review { background: #fbeceb; color: #b3261e; }
.booking-row-flag.flag-setup { background: #fdf1de; color: #9a5f06; }
.booking-row-flag.flag-done { background: #e8f6ec; color: #2f8f5b; }
.booking-row-go { color: var(--brand); font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) {
  .booking-row { grid-template-columns: auto 1fr auto; }
  .booking-row-when, .kpi-category-chip { display: none; }
}

/* 統一儲存表單 */
.booking-unified-form { border: 2px solid #1c4e80; border-radius: 12px; background: #f7fbff; padding: 14px 16px; }
.unified-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.unified-head h3 { margin: 0; font-size: 15px; color: #16324f; }
.unified-gate-warn { font-size: 12.5px; font-weight: 800; color: #b3261e; background: #fbeceb; padding: 4px 12px; border-radius: 999px; }
.unified-gate-ok { font-size: 12.5px; font-weight: 800; color: #2f8f5b; background: #e8f6ec; padding: 4px 12px; border-radius: 999px; }
.unified-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; margin-bottom: 12px; }
.unified-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: #46535e; }
.unified-grid label[hidden] { display: none; } /* 差異說明欄只在選「履約與預約不符」時出現（flex 會蓋掉 hidden，需明寫） */
.unified-grid select { padding: 8px 10px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; font-weight: 400; }
.req-star { color: #b3261e; font-size: 11px; font-weight: 800; }
.unified-readonly { margin: 0; align-self: end; color: #62707c; font-size: 13px; }
.unified-items { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; border: 1px solid #dde5ec; border-radius: 8px; overflow: hidden; }
.unified-items th { background: #eef3f8; color: #46535e; font-size: 12px; padding: 7px 10px; text-align: left; }
.unified-items td { border-top: 1px solid #eef2f6; padding: 8px 10px; }
/* 連動使用列：與主項目同樣正常顯示（不淡化），只靠「連動使用」小字區分 */
.unified-items tr.linked-item td { color: inherit; background: transparent; }
.unified-items tr.linked-item td small { color: #6b7a89; }
.classroom-use-select { font: inherit; font-size: 13px; padding: 6px 28px 6px 10px; border: 1px solid #cfd8e0; border-radius: 10px; background: #fff; color: #1f2933; }
.unified-status-select { padding: 6px 8px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; font-size: 13px; }
.waive-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #46535e; white-space: nowrap; }
.unified-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.unified-save-btn { padding: 10px 22px; font-size: 15px; }
.unified-approve-btn { padding: 10px 18px; font-size: 14px; font-weight: 800; border: 0; border-radius: 8px; background: #2f8f5b; color: #fff; cursor: pointer; }
.unified-approve-btn:hover { background: #257247; }
.unified-hint { flex-basis: 100%; color: #8a97a3; font-size: 12px; line-height: 1.6; }

/* 操作回饋浮動提示 */
.booking-toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 9999; background: #16324f; color: #fff; font-size: 14px; font-weight: 700; padding: 11px 22px; border-radius: 999px; box-shadow: 0 10px 30px rgba(15, 30, 45, 0.35); animation: toast-in 0.18s ease; }
.booking-toast.bad { background: #b3261e; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* CRM 進入待處理提示 */
.crm-pending-notice { width: min(460px, 92vw); text-align: center; padding: 28px 30px; }
.crm-pending-notice .pending-notice-icon { font-size: 44px; margin-bottom: 6px; }
.crm-pending-notice h2 { margin: 0 0 8px; font-size: 19px; color: #16324f; }
.crm-pending-notice h2 strong { color: #b3261e; font-size: 26px; }
.crm-pending-notice p { margin: 0 0 18px; color: #62707c; font-size: 13.5px; line-height: 1.8; }
.pending-notice-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pending-notice-actions .primary-action { padding: 10px 22px; }
.pending-notice-actions .secondary-action { padding: 10px 18px; border: 1px solid #ccd4dc; border-radius: 8px; background: #fff; color: #46535e; font: inherit; cursor: pointer; }

/* KPI 分類「不知道」配色 */
.kpi-card.kpi-cat-card.unknown { border-left-color: #7b5ea7; }
.booking-review-card.kpi-cat-unknown { border-color: #7b5ea7; }
.booking-review-card.kpi-cat-unknown[open] > summary { border-left-color: #7b5ea7; }
.kpi-cat-unknown .kpi-category-chip { background: #efe9f7; color: #5d4485; }

/* ── 會員管理卡片化 ── */
.member-list-title { margin: 20px 0 10px; font-size: 16px; color: #16324f; }
.member-card-list { display: flex; flex-direction: column; gap: 14px; }
.member-card { border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 12px; background: #fff; padding: 14px 18px; }
.member-card.disabled { border-left-color: #b0bcc7; background: #f7f8f9; opacity: 0.9; }
.member-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 14px; margin-bottom: 10px; }
.member-card-title strong { font-size: 16px; color: #16324f; margin-right: 8px; }
.member-card-title small { color: #8a97a3; }
.member-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.member-card-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 18px; border-top: 1px dashed #e3e8ee; padding-top: 10px; margin-bottom: 10px; }
.member-card-info div { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.member-card-info dt { color: #8a97a3; font-size: 12px; white-space: nowrap; }
.member-card-info dd { margin: 0; color: #333e48; overflow-wrap: anywhere; }
.member-card-collapsibles { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.member-collapse { border: 1px solid #e7ecf1; border-radius: 8px; background: #fbfcfd; padding: 8px 12px; }
.member-collapse > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #1c4e80; list-style: none; }
.member-collapse > summary::-webkit-details-marker { display: none; }
.member-collapse[open] { padding-bottom: 12px; }
.member-collapse .member-note-form { margin-top: 8px; }
.member-collapse .member-note-form textarea { width: 100%; box-sizing: border-box; }
.member-card-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; border-top: 1px dashed #e3e8ee; padding-top: 12px; }
.member-action-group { display: flex; flex-direction: column; gap: 6px; }
.member-action-label { font-size: 11.5px; font-weight: 800; color: #8a97a3; letter-spacing: 0.04em; }
.member-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.member-ghost-btn { padding: 8px 12px; border: 1px solid #ccd4dc; border-radius: 8px; background: #fff; color: #46535e; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.member-ghost-btn:hover { border-color: var(--brand); color: var(--brand); background: #f4f7fa; }
.member-danger-btn { padding: 8px 12px; border: 1px solid #e5b6b2; border-radius: 8px; background: #fff; color: #b3261e; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.member-danger-btn:hover { background: #fbeeec; color: #b3261e; }

/* 待審核註冊卡片 */
.member-pending-zone .member-reg-list { display: flex; flex-direction: column; gap: 8px; }
.member-reg-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; border: 1px solid #ecd9b8; border-radius: 10px; background: #fff; padding: 10px 14px; }
.member-reg-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member-reg-info strong { color: #16324f; font-size: 15px; }
.member-reg-info small { color: #8a97a3; font-size: 12.5px; }
.member-reg-type { display: inline-block; width: fit-content; font-size: 11.5px; font-weight: 800; color: #1c4e80; background: #e8f2fb; border-radius: 999px; padding: 2px 10px; margin: 2px 0; }
.member-reg-actions { display: flex; gap: 8px; }
.member-reg-actions .primary-action { padding: 9px 16px; font-size: 13.5px; }
.member-staff-identity { margin-top: 22px; border: 1px solid #e7ecf1; border-radius: 10px; background: #fbfcfd; padding: 10px 14px; }
.member-staff-identity > summary { cursor: pointer; font-weight: 700; color: #1c4e80; font-size: 14px; }

/* ── 2026-08-24 權限 v2／營運總覽區間查詢／日曆分類顏色 ───────────────── */

/* 側欄角色標籤（管理員／主管管理員／機關瀏覽／超級管理員） */
.crm-role-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8eef5;
  color: #1c4e80;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* 租借處理卡：標題與紅字「＊核准必填」同一行、同一層級，選單高度才會對齊 */
.unified-label-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 17px;
}

/* 營運總覽：統計區間查詢列 */
.stats-range-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  background: #fbfcfd;
}
.stats-range-title { font-size: 13px; font-weight: 800; color: #46535e; }
.stats-range-radio { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; color: #46535e; cursor: pointer; }
.stats-range-field { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: #46535e; }
.stats-range-field input { padding: 7px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; }
.stats-range-bar .primary-action { padding: 8px 16px; font-size: 13px; }
.stats-range-reset { font-size: 13px; color: #1c4e80; }

/* 營運日曆：依 KPI 分類（自辦／租借／機關使用／不知道）與未履約上色 */
.kpi-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 0 0 12px;
  font-size: 12px;
  color: #62707c;
}
.kpi-cal-legend-title { font-weight: 700; }
.kpi-cal-legend-item {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border-left: 4px solid transparent;
  font-weight: 700;
}
.calendar-operation.kpi-cal-self, .kpi-cal-legend-item.kpi-cal-self { border-left-color: #2f8f5b; background: #e6f2e8; color: #1f5c33; }
.calendar-operation.kpi-cal-rental, .kpi-cal-legend-item.kpi-cal-rental { border-left-color: #1c4e80; background: #e8eef5; color: #1c4e80; }
.calendar-operation.kpi-cal-agency, .kpi-cal-legend-item.kpi-cal-agency { border-left-color: #d08214; background: #f9efdd; color: #8a5a08; }
.calendar-operation.kpi-cal-unknown, .kpi-cal-legend-item.kpi-cal-unknown { border-left-color: #7b5ea7; background: #efe9f7; color: #5a4382; }
.calendar-operation.kpi-cal-none, .kpi-cal-legend-item.kpi-cal-none { border-left-color: #9aa6b1; background: #f0f2f4; color: #62707c; }
.calendar-operation.kpi-cal-breach, .kpi-cal-legend-item.kpi-cal-breach { border-left-color: #b3261e; background: #f7e6e4; color: #b3261e; }

/* 日行程彈窗的租借列：同一套分類色（左邊框）＋分類小標籤 */
.day-schedule-item.kpi-cal-self { border-left: 4px solid #2f8f5b; }
.day-schedule-item.kpi-cal-rental { border-left: 4px solid #1c4e80; }
.day-schedule-item.kpi-cal-agency { border-left: 4px solid #d08214; }
.day-schedule-item.kpi-cal-unknown { border-left: 4px solid #7b5ea7; }
.day-schedule-item.kpi-cal-none { border-left: 4px solid #cbd4dc; }
.day-schedule-item.kpi-cal-breach { border-left: 4px solid #b3261e; }
.kpi-cal-tag {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0f2f4;
  color: #62707c;
  white-space: nowrap;
}
.day-schedule-item.kpi-cal-self .kpi-cal-tag { background: #e6f2e8; color: #1f5c33; }
.day-schedule-item.kpi-cal-rental .kpi-cal-tag { background: #e8eef5; color: #1c4e80; }
.day-schedule-item.kpi-cal-agency .kpi-cal-tag { background: #f9efdd; color: #8a5a08; }
.day-schedule-item.kpi-cal-unknown .kpi-cal-tag { background: #efe9f7; color: #5a4382; }
.day-schedule-item.kpi-cal-breach .kpi-cal-tag { background: #f7e6e4; color: #b3261e; }

/* 機關瀏覽帳號的「您無操作權限」提示彈窗 */
#no-perm-notice {
  border: 0;
  border-radius: 14px;
  padding: 22px 26px;
  max-width: 360px;
  box-shadow: 0 18px 48px rgba(15, 34, 52, 0.28);
  text-align: center;
}
#no-perm-notice::backdrop { background: rgba(15, 34, 52, 0.45); }
#no-perm-notice h3 { margin: 0 0 8px; font-size: 16px; color: #b3261e; }
#no-perm-notice p { margin: 0 0 14px; font-size: 13px; color: #46535e; line-height: 1.7; }
#no-perm-notice button { padding: 9px 22px; border: 0; border-radius: 8px; background: #1c4e80; color: #fff; font: inherit; cursor: pointer; }

/* ── 2026-08-24b 會員卡收合＋列表膠囊配色＋機關可匯出日曆 ── */

/* 會員卡：預設只露出基本資訊一行，完整資料與操作收在展開區 */
.member-card-basic {
  margin: 0;
  padding: 8px 0 0;
  color: #62707c;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-more { margin-top: 10px; border-top: 1px dashed #e3e8ee; }
.member-more > summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 0 2px;
  color: #1c4e80;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
}
.member-more > summary::-webkit-details-marker { display: none; }
.member-more > summary::before { content: "▸ "; }
.member-more[open] > summary::before { content: "▾ "; }
.member-more[open] > summary { padding-bottom: 8px; }

/* ── 2026-08-24c 履約不符／卡位預約／編輯增減空間 ── */

/* 履約與預約不符：深橘紅（有使用、照常計統計，但與預約不同） */
.calendar-operation.kpi-cal-mismatch, .kpi-cal-legend-item.kpi-cal-mismatch { border-left-color: #c2410c; background: #fdeee4; color: #9a3412; }
.day-schedule-item.kpi-cal-mismatch { border-left: 4px solid #c2410c; }
.day-schedule-item.kpi-cal-mismatch .kpi-cal-tag { background: #fdeee4; color: #9a3412; }
.kpi-card.kpi-cat-card.mismatch { border-left-color: #c2410c; }

/* 卡位預約：青色虛線（先占時段、尚未定案） */
.calendar-operation.kpi-cal-hold, .kpi-cal-legend-item.kpi-cal-hold { border-left-color: #0e7490; border-left-style: dashed; background: #e6f7fa; color: #0e7490; }
.day-schedule-item.kpi-cal-hold { border-left: 4px dashed #0e7490; }
.day-schedule-item.kpi-cal-hold .kpi-cal-tag { background: #e6f7fa; color: #0e7490; }
.hold-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px dashed #0e7490;
  border-radius: 999px;
  background: #e6f7fa;
  color: #0e7490;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.crm-manual-hold { display: flex; flex-direction: row !important; gap: 8px; align-items: center; font-weight: 700; color: #0e7490; }

/* 統一表單：不符差異說明欄（選「履約與預約不符」才顯示） */
.unified-breach-note { grid-column: 1 / -1; }
.unified-breach-note textarea { padding: 8px 10px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; font-weight: 400; resize: vertical; }

/* 修改租借內容：移除勾選與新增列 */
.edit-remove-check { display: inline-flex; gap: 5px; align-items: center; font-size: 0.85em; color: #b3261e; cursor: pointer; white-space: nowrap; }
.booking-edit-items tr.edit-add-row { background: #f7fbf8; }
.booking-edit-items tr.edit-add-row td:first-child small { color: #1f7a34; font-weight: 800; }

/* ── 2026-08-24d 營運日曆：同一張申請單合併成一條 ── */
.day-schedule-count { display: block; color: #8a97a3; font-size: 0.82em; font-weight: 400; }
.calendar-operation.booking-status-partial { border-left-style: double; }

/* ══════════════════════════════════════════════════════════════════════
   可點擊卡片統一引導（2026-09）
   凡是「按下去會開東西／前往別頁／展開」的卡片，一律加 class="tap-card"，
   並用 data-tap 指定提示字（例：data-tap="查看明細"）。
   - 預設：提示膠囊在流內、靠卡片右下（不會蓋到內容）
   - .tap-side：膠囊絕對定位在右側垂直置中（給一列式的項目用，會自動留右邊距）
   - .tap-corner：小膠囊在右下角（給小方塊／樓層圖磚用）
   - 展開式卡片（details）：summary 內放 <span class="tap-hint"></span>，展開後自動變「收合」
   滑過／鍵盤聚焦：卡片微浮起、外框變品牌色、膠囊反白。不可點的卡片不加 class，維持平面。
   ══════════════════════════════════════════════════════════════════════ */
.tap-card { position: relative; cursor: pointer; border-color: #b7cbdf; } /* 靜態時外框就帶一點品牌藍，跟不可點的灰框卡片區隔 */
:where(.tap-card) { transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.tap-card::after, .tap-hint::before {
  content: attr(data-tap) " →";
  display: inline-flex; align-items: center; gap: 4px;
  justify-self: end; align-self: end; margin-left: auto;
  font-size: 12px; font-weight: 800; line-height: 1; font-style: normal; letter-spacing: 0.02em;
  color: var(--brand, #1c4e80); background: #e8eef5; border: 1px solid #c9d8e6;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  transition: background 0.15s ease, color 0.15s ease;
}
:where(.tap-card):hover, :where(.tap-card):focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(22, 58, 95, 0.16);
  border-color: var(--brand, #1c4e80);
}
.tap-card:hover::after, .tap-card:focus-visible::after,
details:not([open]) > summary.tap-card:hover .tap-hint::before, .tap-card:hover .tap-hint::before {
  background: var(--brand, #1c4e80); color: #fff; border-color: var(--brand, #1c4e80);
}
.tap-card:focus-visible { outline: 3px solid rgba(28, 78, 128, 0.35); outline-offset: 2px; }
/* 一列式：膠囊靠右垂直置中，內容自動留右邊距 */
.tap-card.tap-side { padding-right: 112px !important; }
.tap-card.tap-side::after { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin: 0; }
/* 小方塊：右下角小膠囊 */
.tap-card.tap-corner::after { position: absolute; right: 6px; bottom: 6px; margin: 0; padding: 3px 7px; font-size: 10.5px; }
/* 展開式卡片：summary 內的 .tap-hint 由 CSS 給字，展開後變「收合」 */
.tap-hint { display: inline-flex; margin-left: auto; }
.tap-hint::before { content: "展開 ▾"; }
details[open] > summary .tap-hint::before { content: "收合 ▴"; background: var(--brand, #1c4e80); color: #fff; border-color: var(--brand, #1c4e80); }
/* 已在購物車的空間卡不可再點：不顯示提示 */
.booking-space-choice.in-cart::after { display: none; }
/* 審核卡／會員租借卡 summary：多一欄放提示 */
.booking-review-card summary { grid-template-columns: auto minmax(130px, 0.8fr) minmax(200px, 1.5fr) minmax(150px, 1fr) auto auto; }
.member-booking-card summary { grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.5fr) minmax(160px, 1fr) auto auto; }
/* 首頁樓層磚：名稱靠左、人數靠右、提示最右 */
.home-floor-tile.tap-card span { margin-left: auto; margin-right: 12px; }
.unified-self-note { color: #2f8f5b; font-weight: 700; font-size: 12px; }
.unified-grid .unified-self-note[hidden], .unified-grid .req-star[hidden] { display: none; }

/* ══ 審核卡改版（2026-09，現場人員回饋）：待辦清單置頂＋摘要列＋三步驟表單 ══ */
.review-todo { border: 1.5px solid #e3e8ee; border-radius: 12px; padding: 12px 16px; margin-bottom: 0; background: #fff; }
.review-todo.todo { border-color: #e0a63b; background: #fffaf0; }
.review-todo.ok { border-color: #2f8f5b; background: #f2faf5; }
.review-todo.done { border-color: #b0bcc7; background: #f7f8f9; }
.review-todo-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 10px; }
.review-todo-head strong { font-size: 16px; color: #16324f; }
.review-todo.todo .review-todo-head strong { color: #9a5f06; }
.review-todo.ok .review-todo-head strong { color: #1f5c33; }
.review-todo-head span { color: #8a97a3; font-size: 12.5px; }
.review-todo-list { display: flex; flex-wrap: wrap; gap: 8px; }
.todo-item { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 999px; border: 1.5px solid #d9dfe5; background: #fff; font: inherit; text-align: left; cursor: pointer; color: #1f2933; transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease; }
.todo-item:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22, 58, 95, 0.14); border-color: var(--brand, #1c4e80); }
.todo-item .todo-mark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 900; font-size: 13px; flex: none; }
.todo-item .todo-text { display: flex; flex-direction: column; line-height: 1.25; }
.todo-item .todo-text b { font-size: 13.5px; }
.todo-item .todo-text small { font-size: 11.5px; color: #62707c; }
.todo-item.is-todo { border-color: #e0a63b; background: #fff; }
.todo-item.is-todo .todo-mark { background: #b3261e; color: #fff; }
.todo-item.is-todo .todo-text b { color: #b3261e; }
.todo-item.is-done .todo-mark { background: #2f8f5b; color: #fff; }
.todo-item.is-done { opacity: 0.85; }
.todo-item.is-waiting .todo-mark { background: #e8eef5; color: #1c4e80; }
.todo-item.is-optional .todo-mark { background: #eef1f4; color: #62707c; }
.todo-item.is-locked:not(.is-done) { border-style: dashed; }
.review-meta-line { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; padding: 10px 14px; margin: -14px 0 -10px; background: #f6f8fa; border-radius: 10px; font-size: 14px; color: #1f2933; }
.review-meta-line b { color: #8a97a3; font-weight: 700; font-size: 12px; margin-right: 6px; }
.review-meta-line .review-meta-fee { font-weight: 800; color: #16324f; font-size: 15px; }
.review-meta-line .review-meta-fee small { font-weight: 500; color: #62707c; font-size: 12px; margin-left: 4px; }
.review-meta-more { margin: -6px 0 0; }
.review-meta-more > summary { cursor: pointer; color: var(--brand, #1c4e80); font-weight: 700; font-size: 13.5px; padding: 6px 2px; list-style: none; }
.review-meta-more > summary::-webkit-details-marker { display: none; }
.review-meta-more > summary::before { content: "▸ "; }
.review-meta-more[open] > summary::before { content: "▾ "; }
.review-meta-more .booking-detail-grid { margin-top: 8px; }
.fee-detail-inline { margin-top: 10px; }
.unified-hint-inline { color: #8a97a3; font-size: 12.5px; }
.unified-step { border: 1px solid #e3e8ee; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.unified-step.is-future { background: #fafbfc; border-style: dashed; }
.unified-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.unified-step-head h4 { margin: 0; font-size: 15px; color: #16324f; }
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand, #1c4e80); color: #fff; font-weight: 900; font-size: 13px; flex: none; }
.step-state { margin-left: auto; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.step-state.ok { background: #e8f6ec; color: #2f8f5b; }
.step-state.todo { background: #fbeceb; color: #b3261e; }
.step-state.later { background: #eef1f4; color: #62707c; }
.unified-step .unified-grid { margin-bottom: 0; }
.unified-step .unified-items { margin-top: 0; }
.unified-items tr.is-pending td { background: #fffaf0; }
.unified-status-select.status-pending { border-color: #e0a63b; background: #fffaf0; font-weight: 700; }
.unified-optional { color: #8a97a3; font-size: 11.5px; font-weight: 500; }
.unified-hint { margin: 8px 0 0; }
.field-flash { animation: field-flash 2.2s ease; border-radius: 10px; }
@keyframes field-flash { 0% { box-shadow: 0 0 0 4px rgba(224, 166, 59, 0.9); background: #fff4d6; } 100% { box-shadow: 0 0 0 0 rgba(224, 166, 59, 0); background: transparent; } }


/* ══════════════════════════════════════════════════════════════════════
   內容模組（2026-09-04）：首頁輪播與版型二、活動資訊／最新消息／Hashtag 前台、
   CRM 區塊式編輯器與輪播管理。前綴 ct-（content）；輪播 home-carousel。
   ══════════════════════════════════════════════════════════════════════ */

/* ── 預覽提示（未公開內容／版型預覽） ── */
.ct-preview-banner {
  margin: 14px 0 0;
  padding: 10px 14px;
  border: 1px solid #f0c36d;
  border-left-width: 6px;
  border-radius: 8px;
  background: #fff8e6;
  color: #6b4b00;
  font-weight: 700;
}

/* ── 首頁版型二：滿版輪播 ── */
.home-carousel {
  position: relative;
  margin: 20px 0 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0f2740;
  outline: none;
}
.home-carousel:focus-visible { box-shadow: 0 0 0 4px rgba(20, 86, 160, 0.35); }
.home-carousel-track {
  position: relative;
  aspect-ratio: 12 / 5;
  min-height: 260px;
  max-height: 620px;
}
.home-carousel-slide {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.home-carousel-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.6s ease; z-index: 1; }
.home-carousel-slide picture, .home-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-carousel-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: grid;
  gap: 4px;
  padding: clamp(18px, 4vw, 40px) clamp(18px, 5vw, 56px);
  padding-right: clamp(80px, 12vw, 160px);
  background: linear-gradient(0deg, rgba(8, 22, 38, 0.82), rgba(8, 22, 38, 0.35) 65%, transparent);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.home-carousel-caption strong { font-size: clamp(22px, 3.4vw, 40px); line-height: 1.15; }
.home-carousel-caption span { font-size: clamp(14px, 1.6vw, 18px); opacity: 0.95; }
.home-carousel-caption em {
  justify-self: start;
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 900;
  font-size: 14px;
  text-shadow: none;
}
.home-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand-dark);
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.85;
}
.home-carousel-arrow:hover { background: #fff; color: var(--brand); opacity: 1; }
.home-carousel-arrow.prev { left: 14px; }
.home-carousel-arrow.next { right: 14px; }
.home-carousel-dots {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.home-carousel-dots button {
  width: 11px;
  height: 11px;
  min-height: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.home-carousel-dots button.is-active { background: #fff; }
.home-carousel-compact .home-carousel-track { aspect-ratio: 4 / 3; min-height: 200px; max-height: 420px; }
.home-carousel-compact .home-carousel-arrow { width: 36px; height: 36px; font-size: 22px; }
.home-carousel-compact .home-carousel-caption { padding: 14px 16px; padding-right: 60px; }
.home-carousel-compact .home-carousel-caption strong { font-size: 20px; }
.home-carousel-compact .home-carousel-caption span { font-size: 14px; }
.home-carousel-compact .home-carousel-dots { right: 12px; bottom: 10px; }

/* 版型二的精簡標語列（取代原 hero） */
.home-intro-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  margin: 22px 0 28px;
  padding: 22px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}
.home-intro-copy { min-width: 0; flex: 1 1 420px; }
.home-intro-copy h1 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.home-intro-copy p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.home-intro-copy .eyebrow { margin-bottom: 6px; }
.home-intro-bar .hero-actions { flex: 0 0 auto; }
.mobile-mode .home-intro-bar { padding: 16px; margin: 14px 0 18px; }
.mobile-mode .home-intro-copy h1 { font-size: 30px; }
.mobile-mode .home-intro-bar .hero-actions { width: 100%; }
.mobile-mode .home-intro-bar .hero-actions a { flex: 1 1 0; }

/* ── 首頁區塊標題右側連結 ── */
.ct-more-link { margin-left: auto; font-weight: 800; }
.ct-home-band .section-title-row { margin-bottom: 16px; }
.ct-grid-home { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ct-grid-home .ct-card { max-width: 520px; }

/* ── 活動／消息卡片格 ── */
.ct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.ct-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
.ct-card::after { position: absolute; right: 12px; bottom: 12px; margin: 0; }
.ct-card-media {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #e8f0f8;
}
.ct-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-card-media .ct-cover-placeholder { width: 100%; height: 100%; min-height: 0; }
.ct-card-media .ct-status { position: absolute; left: 12px; top: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.ct-pin {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #b3261e;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.ct-pin-inline {
  justify-self: start;
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fde8e6;
  color: #b3261e;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  vertical-align: middle;
}
.ct-card-body { display: grid; gap: 6px; padding: 16px 16px 48px; align-content: start; }
.ct-card-body time { color: var(--accent); font-weight: 900; font-size: 14px; }
.ct-card-body strong { font-size: 19px; line-height: 1.35; }
.ct-card-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.ct-card-body small { color: var(--muted); }
.ct-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ct-cover-placeholder {
  display: grid;
  place-items: center;
  min-height: 160px;
  background:
    linear-gradient(135deg, rgba(47, 128, 201, 0.86), rgba(183, 55, 47, 0.56)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 2px, transparent 2px 76px);
  color: #fff;
}
.ct-cover-placeholder span {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  font-size: 20px;
  font-weight: 900;
}

/* 狀態膠囊（活動狀態自動判斷／消息分類） */
.ct-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8eef5;
  color: #1c4e80;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.ct-status-open { background: #2f8f5b; color: #fff; }
.ct-status-upcoming { background: #1c4e80; color: #fff; }
.ct-status-scheduled { background: #0e7490; color: #fff; }
.ct-status-ongoing { background: #d08214; color: #fff; }
.ct-status-full { background: #c2410c; color: #fff; }
.ct-status-closed { background: #667085; color: #fff; }
.ct-status-finished { background: #e3e8ee; color: #46535e; }
.ct-status-canceled { background: #b3261e; color: #fff; }
.ct-status-planning { background: #7b5ea7; color: #fff; }
.ct-news-notice { background: #1c4e80; color: #fff; }
.ct-news-news { background: #2f8f5b; color: #fff; }
.ct-news-story { background: #d08214; color: #fff; }

/* Hashtag 膠囊 */
.ct-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid #c9d8e6;
  border-radius: 999px;
  background: #f3f7fb;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
}
a.ct-tag:hover, .ct-tag.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 首頁最新消息精簡列 */
.ct-news-list { display: grid; gap: 8px; }
.ct-news-row {
  display: grid;
  grid-template-columns: 110px auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.ct-news-row time { color: var(--accent); font-weight: 900; }
.ct-news-row strong { font-size: 16px; }
.mobile-mode .ct-news-row { grid-template-columns: 1fr auto; }
.mobile-mode .ct-news-row time { grid-column: 1; }
.mobile-mode .ct-news-row .ct-status { grid-column: 2; grid-row: 1; justify-self: end; }
.mobile-mode .ct-news-row strong { grid-column: 1 / -1; }

/* ── 列表頁：標題區、篩選、分頁 ── */
.ct-heading { position: relative; }
.ct-heading h1 { font-size: clamp(34px, 5vw, 56px); }
.ct-heading-links { display: flex; gap: 16px; margin-top: 10px; font-weight: 800; }
.ct-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.ct-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-tabs a {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}
.ct-tabs a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ct-search { display: flex; gap: 6px; }
.ct-search input { min-width: 220px; }
.ct-search button { white-space: nowrap; }
.ct-tag-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.ct-empty { padding: 40px 20px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
.ct-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0; }
.ct-pagination a, .ct-pagination span {
  display: inline-flex;
  align-items: center;
  min-width: 40px;
  min-height: 40px;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}
.ct-pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.mobile-mode .ct-search { width: 100%; }
.mobile-mode .ct-search input { flex: 1; min-width: 0; }

/* ── 詳細頁 ── */
.ct-article {
  max-width: 900px;
  margin: 28px auto;
  padding: 28px clamp(18px, 4vw, 40px) 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.ct-article-activity { max-width: 900px; }
.ct-breadcrumb { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.ct-neighbors, .ct-pagination { flex-direction: row; align-items: stretch; }
@media (max-width: 760px) { .ct-breadcrumb { flex-direction: row; } .ct-pagination { flex-direction: row; } }
.ct-article-head { display: block; padding: 0; border: 0; background: transparent; }
.ct-article-head span { color: inherit; }
.ct-article-head h1 { margin: 0 0 10px; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.2; }
.ct-subtitle { margin: 0 0 14px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.ct-article-tags, .ct-article-head div { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; margin-bottom: 20px; }
.ct-date { color: var(--accent); font-weight: 900; }
.ct-cover { overflow: hidden; margin: 0 0 20px; border-radius: 10px; background: #e8f4fd; }
.ct-cover img { display: block; width: 100%; aspect-ratio: 2 / 1; max-height: 620px; object-fit: cover; }
.ct-cover .ct-cover-placeholder { min-height: 260px; }
.ct-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.ct-meta div { display: grid; gap: 4px; padding: 14px 16px; background: #f8fbfe; }
.ct-meta dt { color: var(--muted); font-size: 13px; font-weight: 800; }
.ct-meta dd { margin: 0; font-size: 17px; font-weight: 800; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.ct-register { min-width: 180px; font-size: 17px; }
.ct-register.is-disabled { cursor: not-allowed; color: var(--muted); }
.ct-body { font-size: 17px; line-height: 1.9; }
.ct-body > * + * { margin-top: 1em; }
.ct-body h2 { margin: 1.6em 0 0.5em; padding-left: 12px; border-left: 5px solid var(--brand); font-size: 24px; line-height: 1.35; }
.ct-body h3 { margin: 1.3em 0 0.4em; font-size: 20px; }
.ct-body p { margin: 0; }
.ct-body a { text-decoration: underline; text-underline-offset: 3px; }
.ct-body ul, .ct-body ol { padding-left: 1.6em; }
.ct-body li + li { margin-top: 0.3em; }
.ct-body blockquote {
  margin: 1.2em 0;
  padding: 14px 20px;
  border-left: 5px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #f3f8fc;
  font-size: 18px;
}
.ct-body blockquote p { margin: 0; }
.ct-body blockquote cite { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; font-style: normal; }
.ct-body hr { margin: 1.6em 0; border: 0; border-top: 1px solid var(--line); }
.ct-callout {
  padding: 14px 18px;
  border: 1px solid #f0c36d;
  border-left-width: 6px;
  border-radius: 8px;
  background: #fff8e6;
}
.ct-figure { margin: 1.4em 0; }
.ct-figure img { display: block; width: 100%; height: auto; border-radius: 8px; }
.ct-figure-medium img { max-width: 70%; margin: 0 auto; }
.ct-figure-small img { max-width: 45%; margin: 0 auto; }
.ct-figure figcaption, .ct-video figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; text-align: center; }
.ct-video { margin: 1.4em 0; }
.ct-video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #000; }
.ct-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ct-button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ct-notes { margin: 30px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfe; }
.ct-notes h2 { margin: 0 0 10px; font-size: 18px; }
.ct-notes ol { margin: 0; padding-left: 1.4em; line-height: 1.8; }
.ct-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.ct-share span { color: var(--muted); font-weight: 800; margin-right: 4px; }
.ct-share a, .ct-share button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.ct-share a:hover, .ct-share button:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.ct-share-line { color: #06c755 !important; }
.ct-share-fb { color: #1877f2 !important; }
.ct-neighbors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 0; }
.ct-neighbor { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.ct-neighbor small { color: var(--muted); font-weight: 800; }
.ct-neighbor.next { text-align: right; }
.ct-neighbor:hover { border-color: var(--brand); }
.ct-related { max-width: 900px; margin: 0 auto 28px; }
.mobile-mode .ct-article { margin: 14px 0; padding: 18px 16px 24px; }
.mobile-mode .ct-body { font-size: 16px; }
.mobile-mode .ct-neighbors { grid-template-columns: 1fr; }
.mobile-mode .ct-neighbor.next { text-align: left; }
.mobile-mode .ct-figure-medium img, .mobile-mode .ct-figure-small img { max-width: 100%; }
.mobile-mode .ct-grid { grid-template-columns: 1fr; }
.mobile-mode .ct-meta { grid-template-columns: 1fr 1fr; }

/* ══ CRM：內容管理共用 ══ */
.ct-admin .section-title-row { justify-content: space-between; margin-bottom: 14px; }
.ct-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ct-admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.ct-admin-tabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font-weight: 800; }
.ct-admin-tabs a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ct-admin-list { display: grid; gap: 10px; }
.ct-admin-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.ct-admin-row:target { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 86, 160, 0.18); }
.ct-admin-thumb { aspect-ratio: 2 / 1; overflow: hidden; border-radius: 6px; background: #eef3f8; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.ct-admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-admin-main { display: grid; gap: 4px; min-width: 0; }
.ct-admin-title strong { font-size: 17px; }
.ct-admin-sub { color: var(--muted); font-size: 14px; }
.ct-admin-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-admin-cat { padding: 3px 9px; border-radius: 6px; background: #eef3f8; color: var(--muted); font-size: 12.5px; font-weight: 800; }
.ct-admin-state { display: grid; gap: 6px; justify-items: start; }
.ct-vis { display: inline-flex; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.ct-vis-visible { background: #e7f6ee; color: #1f7a45; }
.ct-vis-hidden { background: #eef0f3; color: #5b6570; }
.ct-vis-scheduled { background: #e8eef5; color: #1c4e80; }
.ct-vis-expired { background: #fde8e6; color: #b3261e; }
.ct-admin-ops { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ct-admin-ops form { display: inline-flex; margin: 0; }
.ct-small-btn, .ct-admin-ops .secondary-action, .ct-admin-ops .danger-button { min-height: 34px; padding: 6px 12px; font-size: 14px; font-weight: 800; border-radius: 7px; }
button.secondary-action { background: #fff; color: var(--text); border: 1px solid var(--line); }
button.secondary-action:hover { background: #f3f7fb; color: var(--text); }
button.danger-button:hover { background: #fde8e6; color: #b42318; }
.ct-icon-btn {
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  line-height: 1;
}
.ct-icon-btn:hover { background: #f3f7fb; color: var(--brand); }
.ct-icon-btn:disabled { opacity: 0.35; cursor: default; }
.ct-icon-btn:disabled:hover { background: #fff; color: var(--text); }
.ct-icon-danger:hover { background: #fde8e6; color: #b3261e; border-color: #f2b8b5; }

/* 表單 */
.ct-form { display: grid; gap: 14px; }
.ct-form .settings-group { gap: 14px; }
.ct-form-grid { display: grid; gap: 12px; }
.ct-form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ct-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ct-form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ct-field { display: grid; gap: 6px; min-width: 0; color: var(--text); }
.ct-field-label { color: var(--muted); font-weight: 800; font-size: 14px; }
.ct-field-hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.ct-field-wide { display: grid; gap: 6px; grid-column: 1 / -1; }
.ct-field input, .ct-field select, .ct-field textarea { width: 100%; min-width: 0; }
.ct-field input[type="file"] { padding: 6px; }
.ct-check { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; color: var(--text); font-weight: 600; }
.ct-check input[type="checkbox"], .ct-check input[type="radio"] { width: 18px; height: 18px; min-height: 0; margin: 0; }
.ct-slug { display: flex; align-items: center; gap: 0; }
.ct-slug > span { padding: 0 8px; min-height: 38px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-right: 0; border-radius: 6px 0 0 6px; background: #f3f7fb; color: var(--muted); font-weight: 800; white-space: nowrap; }
.ct-slug input { border-radius: 0 6px 6px 0; }
.ct-form-actions { display: flex; flex-wrap: wrap; gap: 10px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(0deg, var(--bg) 70%, transparent); }
.ct-form-actions .primary-action { min-width: 160px; font-size: 16px; }
.ct-inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ct-inline-form input { flex: 1 1 200px; }

/* 封面圖（2:1，瀏覽器端裁切＋雙尺寸） */
.ct-cover-field { display: grid; gap: 12px; }
.ct-cover-current { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ct-cover-current img { width: 240px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #eef3f8; }
.ct-cover-current-info { display: grid; gap: 4px; }
.ct-cover-current-info small { color: var(--muted); }
.ct-cover-pick { display: grid; }
.ct-cover-drop { position: relative; display: grid; gap: 4px; padding: 16px 18px; border: 2px dashed #b8c8d8; border-radius: 10px; background: #f8fbfe; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.ct-cover-drop:hover, .ct-cover-drop:focus-within { border-color: var(--brand); background: #eef5fc; }
.ct-cover-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ct-cover-drop-title { font-weight: 900; color: var(--brand); }
.ct-cover-drop small { color: var(--muted); font-size: 12.5px; }
.ct-crop { display: grid; gap: 8px; }
.ct-crop[hidden], .ct-cover-current[hidden] { display: none; }
.ct-crop canvas { display: block; width: 100%; max-width: 720px; aspect-ratio: 2 / 1; border-radius: 8px; border: 1px solid var(--line); background: #111; touch-action: none; }
.ct-crop canvas.is-draggable { cursor: grab; }
.ct-crop canvas.is-draggable:active { cursor: grabbing; }
.ct-crop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ct-link-btn { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ct-link-btn:hover { color: var(--brand-dark); }

/* Hashtag 選擇 */
.ct-tagpicker { display: grid; gap: 10px; }
.ct-tagpicker-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-tagchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border: 1px solid #c9d8e6; border-radius: 999px; background: #f3f7fb; font-weight: 800; cursor: pointer; }
.ct-tagchip:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.ct-tagchip.is-hidden { opacity: 0.6; }
.ct-tagchip input { width: 16px; height: 16px; min-height: 0; margin: 0; }
.ct-tagpicker-add { display: flex; gap: 8px; }
.ct-tagpicker-add input { flex: 1 1 240px; max-width: 360px; }

/* 重複列（連結／注意事項） */
.ct-repeater { display: grid; gap: 8px; }
.ct-repeater-rows { display: grid; gap: 8px; }
.ct-repeater-row { display: grid; grid-template-columns: minmax(140px, 0.6fr) minmax(200px, 1.4fr) auto; gap: 8px; align-items: center; }
.ct-repeater-row-note { grid-template-columns: 1fr auto; }
.ct-repeater .secondary-action { justify-self: start; }

/* 區塊式編輯器 */
.ct-editor { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfe; }
.ct-editor-blocks { display: grid; gap: 10px; }
.ct-editor-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px dashed #c9d8e6; }
.ct-editor-add span { color: var(--muted); font-weight: 800; font-size: 14px; margin-right: 4px; }
.ct-editor-add button { min-height: 32px; padding: 4px 12px; border: 1px solid #c9d8e6; border-radius: 999px; background: #fff; color: var(--brand-dark); font-size: 14px; font-weight: 800; }
.ct-editor-add button:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.ct-block { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.ct-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 12px; border-bottom: 1px solid #edf1f5; background: #fbfcfd; }
.ct-block-type { color: var(--muted); font-size: 12.5px; font-weight: 900; letter-spacing: 0.04em; }
.ct-block-tools { display: flex; gap: 4px; }
.ct-block-tools .ct-icon-btn { width: 28px; height: 28px; }
.ct-block-body { display: grid; gap: 10px; padding: 12px; }
.ct-block-field { display: grid; gap: 4px; }
.ct-block-field > span { color: var(--muted); font-size: 12.5px; font-weight: 800; }
.ct-block-field input, .ct-block-field select, .ct-block-field textarea { width: 100%; }
.ct-block[data-type="divider"] .ct-block-body { padding: 8px 12px; }
.ct-block[data-type="divider"] hr { margin: 6px 0; border: 0; border-top: 2px dashed var(--line); }
.ct-rich-toolbar { display: flex; flex-wrap: wrap; gap: 4px; }
.ct-rich-btn { min-height: 30px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font-size: 13px; font-weight: 800; }
.ct-rich-btn:hover { background: #f3f7fb; color: var(--brand); }
.ct-rich-bold { font-weight: 900; }
.ct-rich-italic { font-style: italic; }
.ct-rich-underline { text-decoration: underline; }
.ct-rich { min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 16px; line-height: 1.7; outline: none; }
.ct-rich:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 86, 160, 0.15); }
.ct-rich:empty::before { content: "輸入文字…（Enter 新段落、Shift+Enter 換行）"; color: #9aa4b1; }
.ct-rich a { text-decoration: underline; }
.ct-block[data-type="callout"] .ct-rich { border-left: 6px solid #f0c36d; background: #fff8e6; }
.ct-block-preview { min-height: 60px; display: grid; place-items: center; border: 1px dashed #c9d8e6; border-radius: 6px; background: #f8fbfe; overflow: hidden; }
.ct-block-preview img { display: block; max-width: 100%; max-height: 260px; }

/* Hashtag 管理 */
.ct-tag-admin-list { display: grid; gap: 8px; }
.ct-tag-admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ct-tag-admin-row.is-hidden { opacity: 0.65; }
.ct-tag-admin-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 520px; margin: 0; }
.ct-tag-admin-edit input[name="label"] { flex: 1 1 160px; max-width: 260px; }
.ct-tag-admin-edit .ct-slug input { width: 180px; }
.ct-tag-admin-edit small { color: var(--muted); white-space: nowrap; }
.ct-tag-admin-ops { display: flex; gap: 6px; margin-left: auto; }
.ct-tag-admin-ops form { margin: 0; display: inline-flex; }

/* 首頁版型選項 */
.ct-layout-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ct-layout-option { position: relative; display: grid; gap: 6px; padding: 16px 16px 16px 46px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; color: var(--text); }
.ct-layout-option.is-active, .ct-layout-option:has(input:checked) { border-color: var(--brand); background: #f3f8fd; }
.ct-layout-option input { position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; min-height: 0; margin: 0; }
.ct-layout-option strong { font-size: 17px; }
.ct-layout-option span { color: var(--muted); font-size: 14px; line-height: 1.6; }
.ct-layout-option a { font-weight: 800; }

/* 輪播圖管理 */
.ct-slides-admin { margin-top: 18px; }
.ct-slide-row { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ct-slide-row + .ct-slide-row { margin-top: 10px; }
.ct-slide-row summary { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 14px; cursor: pointer; list-style: none; }
.ct-slide-row summary::-webkit-details-marker { display: none; }
.ct-slide-row summary img { width: 132px; aspect-ratio: 12 / 5; object-fit: cover; border-radius: 6px; background: #eef3f8; }
.ct-slide-summary { display: grid; gap: 3px; min-width: 0; }
.ct-slide-summary small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-slide-ops { display: flex; gap: 6px; }
.ct-slide-ops form { margin: 0; display: inline-flex; }
.ct-slide-create summary { grid-template-columns: 1fr auto; }
.ct-slide-create summary span { color: var(--muted); font-size: 13px; }
.ct-slide-form { padding: 14px; border-top: 1px solid var(--line); }
.ct-slide-previews { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ct-slide-previews img { width: 260px; aspect-ratio: 12 / 5; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ct-slide-previews img.is-mobile { width: 120px; aspect-ratio: 4 / 3; }
.ct-linktype { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 6px; }

@media (max-width: 900px) {
  .ct-form-grid-3, .ct-form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-admin-row { grid-template-columns: 80px minmax(0, 1fr); }
  .ct-admin-state { grid-column: 2; grid-auto-flow: column; }
  .ct-admin-ops { grid-column: 1 / -1; justify-content: flex-start; }
  .ct-layout-options { grid-template-columns: 1fr; }
  .ct-slide-row summary { grid-template-columns: 100px minmax(0, 1fr); }
  .ct-slide-row summary .ct-vis, .ct-slide-ops { grid-column: 2; }
}
@media (max-width: 640px) {
  .ct-form-grid-2, .ct-form-grid-3, .ct-form-grid-4 { grid-template-columns: 1fr; }
  .ct-repeater-row { grid-template-columns: 1fr auto; }
  .ct-repeater-row input[name="link_url"] { grid-column: 1 / -1; }
  .home-carousel-track { aspect-ratio: 4 / 3; }
  .home-carousel-caption { padding: 14px 16px; padding-right: 60px; }
  .home-carousel-caption strong { font-size: 20px; }
  .home-carousel-arrow { width: 36px; height: 36px; font-size: 22px; }
  .ct-neighbors { grid-template-columns: 1fr; }
  .ct-grid { grid-template-columns: 1fr; }
}

/* ── 頁首品牌（2026-09-04）：客委會完整 Logo ＋ 分隔線 ＋ 站名「客聚 Taipei Hakka Hub」 ── */
.site-brand-agency { gap: 14px; }
.agency-logo {
  display: block;
  height: 54px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.site-brand-divider {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--line);
}
.site-brand-name { display: grid; gap: 2px; }
.site-brand-name strong { font-size: 22px; line-height: 1.1; letter-spacing: 0.04em; }
.site-brand-name small { font-size: 12px; color: var(--muted); }
.chooser-agency-logo { height: 64px; margin: 0 auto 10px; }
.mobile-mode .site-brand-agency { gap: 8px; }
.mobile-mode .agency-logo { height: 34px; }
.mobile-mode .site-brand-divider { height: 26px; }
.mobile-mode .site-brand-name strong { font-size: 15px; white-space: nowrap; }
.mobile-mode .site-brand-name small { display: none; }
@media (max-width: 760px) {
  .agency-logo { height: 36px; }
  .site-brand-divider { height: 26px; }
}

/* ══ 頁面文字管理改版（2026-09-04）：三欄（頁面分頁／欄位／即時預覽） ══ */
.stp .section-title-row span { color: var(--muted); font-size: 14px; }
.stp-layout { display: grid; grid-template-columns: 200px minmax(420px, 1fr) minmax(480px, 1.05fr); gap: 16px; align-items: start; }
.stp-nav { position: sticky; top: 12px; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.stp-nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 800; }
.stp-nav a small { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: #eef3f8; color: var(--muted); font-size: 12px; text-align: center; }
.stp-nav a:hover { background: #f3f7fb; }
.stp-nav a.is-active { background: var(--brand); color: #fff; }
.stp-nav a.is-active small { background: rgba(255,255,255,0.25); color: #fff; }
.stp-nav-history { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 12px !important; border-radius: 0 0 8px 8px !important; }
.stp-search { display: grid; gap: 4px; margin-bottom: 8px; }
.stp-search span { color: var(--muted); font-size: 12.5px; font-weight: 800; }
.stp-search input { width: 100%; }
.stp-main { min-width: 0; display: grid; gap: 14px; }
.stp-search-summary { padding: 10px 14px; border: 1px solid #f0c36d; border-left-width: 6px; border-radius: 8px; background: #fff8e6; color: #6b4b00; font-weight: 800; }
.stp-page { display: grid; gap: 12px; }
.stp-form { display: grid; gap: 12px; }
.stp-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-left: 6px solid var(--brand); border-radius: 10px; background: #f7fbff; }
.stp-page-head h2 { margin: 0 0 4px; font-size: 20px; }
.stp-page-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.stp-field { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; scroll-margin-top: 12px; }
.stp-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 86, 160, 0.14); }
.stp-field-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.stp-field-head h3 { margin: 0; font-size: 17px; }
.stp-field-head code { display: block; margin-top: 2px; color: #9aa4b1; font-size: 11.5px; }
.stp-devices { flex: 0 0 auto; padding: 3px 9px; border-radius: 6px; background: #eef3f8; color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.stp-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 10px 12px; border-radius: 8px; background: #f8fbfe; }
.stp-meta div { display: grid; gap: 2px; min-width: 0; }
.stp-meta dt { color: var(--muted); font-size: 11.5px; font-weight: 900; letter-spacing: 0.04em; }
.stp-meta dd { margin: 0; font-size: 13px; line-height: 1.5; }
.stp-input { width: 100%; font-size: 15px; line-height: 1.6; }
textarea.stp-input { resize: vertical; }
.stp-field-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stp-count { color: var(--muted); font-size: 12.5px; }
.stp-count b { color: var(--text); }
.stp-preview-state { flex: 1 1 200px; color: #b26a00; font-size: 12.5px; }
.stp-save { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 0; background: linear-gradient(0deg, var(--bg) 70%, transparent); }
.stp-dirty { padding: 4px 10px; border-radius: 999px; background: #fff8e6; color: #6b4b00; font-size: 13px; font-weight: 800; }
.stp-preview { position: sticky; top: 12px; display: grid; gap: 8px; min-width: 0; }
.stp-preview-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.stp-preview-bar strong { margin-right: auto; }
.stp-device { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stp-device button { min-height: 30px; padding: 2px 12px; border: 0; border-radius: 0; background: #fff; color: var(--text); font-size: 13px; font-weight: 800; }
.stp-device button.is-active { background: var(--brand); color: #fff; }
.stp-open { font-size: 13px; font-weight: 800; }
.stp-preview-note { margin: 0; padding: 8px 12px; border: 1px solid #f0c36d; border-radius: 8px; background: #fff8e6; color: #6b4b00; font-size: 13px; }
.stp-frame-wrap { position: relative; height: calc(100vh - 110px); min-height: 520px; border: 1px solid var(--line); border-radius: 10px; background: #e9eef4; overflow: hidden; }
.stp-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; transform-origin: 0 0; }
.stp-frame-wrap[data-device-mode="mobile"] iframe { width: 390px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
/* 修改紀錄 */
.stp-batch { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.stp-batch > header { display: flex; align-items: baseline; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.stp-batch > header span { color: var(--muted); }
.stp-batch > header small { margin-left: auto; color: var(--muted); }
.stp-history-row { border: 1px solid #eef1f5; border-radius: 8px; padding: 6px 10px; }
.stp-history-row summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.stp-history-row summary::-webkit-details-marker { display: none; }
.stp-history-key { font-weight: 800; }
.stp-history-row summary em { padding: 1px 7px; border-radius: 999px; background: #e8eef5; color: var(--brand-dark); font-size: 12px; font-style: normal; font-weight: 800; }
.stp-history-brief { color: var(--muted); font-size: 13px; }
.stp-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.stp-diff > div { display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px; background: #f8fbfe; font-size: 13.5px; line-height: 1.6; }
.stp-diff > div:last-child { background: #f1f9f4; }
.stp-diff dt { color: var(--muted); font-size: 11.5px; font-weight: 900; }
.stp-diff dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.stp-history-row form { margin: 4px 0 2px; }
@media (max-width: 1240px) {
  .stp-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .stp-preview { grid-column: 1 / -1; position: static; }
  .stp-frame-wrap { height: 640px; }
}
@media (max-width: 760px) {
  .stp-layout { grid-template-columns: 1fr; }
  .stp-nav { position: static; }
  .stp-meta { grid-template-columns: 1fr; }
}
/* 前台：會員中心提示、租用規則區塊 */
.member-supplement-hint { margin: 0 0 12px; border-left: 4px solid #d08214; }
.member-question-hint { display: block; margin: -4px 0 6px; color: var(--muted); }
.rental-rules-body { font-size: 15px; line-height: 1.8; }
.rental-rules-body > * + * { margin-top: 0.7em; }
.rental-rules-body h2 { margin: 1em 0 0.3em; padding-left: 10px; border-left: 4px solid var(--brand); font-size: 18px; }
.terms-box .ct-callout, .terms-box blockquote { margin: 0.8em 0; }
.terms-box h2 { font-size: 17px; margin: 1em 0 0.3em; }
.terms-box p { margin: 0 0 0.6em; }
.stp [hidden] { display: none !important; }

/* ══ 刪除紀錄（回收桶）＋ 使用紀錄（2026-09-11，src/records.js）══ */
.rc-filter { align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.rc-filter input[type="search"] { min-width: 240px; }
.rc-list, .rc-usage-list { display: grid; gap: 10px; }
.rc-row, .rc-usage-card { border: 1.5px solid #d9dfe5; border-radius: 12px; background: #fff; overflow: hidden; }
.rc-row summary, .rc-usage-card summary {
  display: grid; grid-template-columns: auto auto minmax(200px, 1.6fr) auto auto auto;
  gap: 8px 14px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none;
}
.rc-row summary::-webkit-details-marker, .rc-usage-card summary::-webkit-details-marker { display: none; }
.rc-row[open], .rc-usage-card[open] { border-color: var(--brand, #1c4e80); box-shadow: 0 16px 40px rgba(22, 58, 95, 0.16); background: #f7fbff; }
.rc-row[open] > summary, .rc-usage-card[open] > summary { background: #e8f2fb; border-left: 6px solid var(--brand, #1c4e80); border-bottom: 1px solid #cfe0ef; }
.rc-row summary strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; }
.rc-row-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-row summary time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rc-row-reason { padding: 2px 9px; border-radius: 999px; background: #fbeceb; color: #b3261e; font-size: 12px; font-weight: 800; white-space: nowrap; }
.rc-row summary small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rc-row-body, .rc-usage-body { padding: 14px 16px 16px; display: grid; gap: 12px; }
.rc-row-body .summary-list { margin: 0; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-top: 1px dashed #d9dfe5; padding-top: 12px; }
.rc-actions form { margin: 0; }
/* 使用紀錄卡 */
.rc-usage-card summary { grid-template-columns: auto auto minmax(220px, 2fr) auto auto auto; }
.rc-usage-card summary time { font-weight: 800; font-size: 13.5px; line-height: 1.3; white-space: nowrap; }
.rc-usage-card summary time small { color: var(--muted); font-weight: 600; }
.rc-usage-main { min-width: 0; display: grid; gap: 2px; }
.rc-usage-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-usage-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-usage-actual { font-weight: 800; white-space: nowrap; font-size: 13.5px; }
.rc-usage-actual i { font-style: normal; color: var(--muted); font-weight: 600; }
.rc-usage-card.usage-completed { border-color: #2f8f5b; }
.rc-usage-card.usage-completed[open] > summary { background: #e8f6ec; border-left-color: #2f8f5b; }
.rc-usage-card.usage-checked_in { border-color: #1c4e80; }
.rc-usage-card.usage-today { border-color: #d08214; }
.rc-usage-card.usage-today[open] > summary { background: #fdf1de; border-left-color: #d08214; }
.rc-usage-card.usage-unmarked { border-style: dashed; border-color: #c2872a; }
.rc-usage-card.usage-cancel, .rc-usage-card.usage-noshow { border-color: #b3261e; opacity: 0.92; }
.rc-usage-card.usage-cancel[open] > summary, .rc-usage-card.usage-noshow[open] > summary { background: #fbeceb; border-left-color: #b3261e; }
.rc-usage-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rc-usage-quick .calendar-nav { margin-left: auto; }
.rc-quick-form { margin: 0; }
.rc-quick-form button { font-size: 13.5px; padding: 8px 14px; }
.rc-usage-form { border: 1px solid #dce5ee; border-radius: 10px; padding: 12px 14px; background: #fff; display: grid; gap: 10px; }
.rc-usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rc-usage-grid label { display: grid; gap: 5px; font-size: 13px; color: #46535e; }
.rc-usage-grid label > span { font-weight: 700; }
.rc-usage-grid input, .rc-usage-grid select, .rc-usage-grid textarea { padding: 7px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; width: 100%; }
.rc-usage-grid .rc-breach-note, .rc-usage-grid .rc-usage-note { grid-column: 1 / -1; }
.rc-usage-grid .rc-breach-note[hidden] { display: none; }
.rc-usage-save { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.rc-usage-save small { color: var(--muted); font-size: 12px; }
.rc-filter-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 6px 0 10px; }
.rc-filter-bar label { display: grid; gap: 4px; font-size: 12.5px; color: #46535e; font-weight: 700; }
.rc-filter-bar input, .rc-filter-bar select { padding: 7px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; }
.rc-filter-bar button, .rc-filter-bar a { padding: 8px 12px; }
.rc-today { border-color: #1c4e80; background: linear-gradient(180deg, #f7fbff 0%, #e8f2fb 100%); }
.rc-today .pending-zone-head h2 { color: #16324f; }
/* 租借卡上的唯讀使用狀況摘要 */
.rc-usage-inline { border: 1px solid #dce5ee; border-radius: 10px; padding: 10px 14px; background: #fff; margin: 12px 0; }
.rc-usage-inline.is-future { background: #f8fafc; border-style: dashed; }
.rc-usage-inline-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.rc-usage-inline-head h4 { margin: 0; font-size: 14px; color: #16324f; }
.rc-usage-inline-grid { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 8px; font-size: 13.5px; }
.rc-usage-inline-grid > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-usage-inline-grid b { color: var(--muted); font-size: 12px; font-weight: 800; }
.rc-usage-inline-grid small { color: var(--muted); }
.rc-usage-inline-note { width: 100%; }
/* 租借卡的刪除區：改為需選原因 */
.booking-review-card .review-delete-row > summary { display: block; padding: 0; cursor: pointer; font-size: 12.5px; color: #8a97a3; list-style: none; }
.review-delete-row summary::-webkit-details-marker { display: none; }
.review-delete-row summary::before { content: "▸ "; }
.review-delete-row[open] summary::before { content: "▾ "; }
.review-delete-row { display: block; }
.review-delete-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-top: 8px; }
.review-delete-form label { display: grid; gap: 4px; font-size: 12.5px; color: #46535e; }
.review-delete-form select, .review-delete-form input { padding: 7px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; }
.review-delete-form input { min-width: 240px; }
@media (max-width: 760px) {
  .rc-row summary, .rc-usage-card summary { grid-template-columns: auto 1fr; }
  .rc-row summary small, .rc-usage-card .rc-usage-actual { grid-column: 1 / -1; }
  .rc-usage-quick .calendar-nav { margin-left: 0; }
  .review-delete-form input { min-width: 0; width: 100%; }
}

/* ══ 活動編輯頁改版（2026-09-11）：左導覽＋表單＋右預覽、舉辦時間元件 ══ */
.ct-admin-form [hidden] { display: none !important; }
.crm-panel.ct-admin-form { overflow: visible; } /* overflow-x:auto 會讓右側預覽與左導覽的 sticky 失效 */
.ct-form-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.ct-form-nav { position: sticky; top: 92px; display: grid; gap: 4px; }
.ct-form-nav a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 800; font-size: 14px; text-decoration: none; border-left: 3px solid transparent; }
.ct-form-nav a span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e8eef5; color: var(--brand-dark); font-size: 12px; }
.ct-form-nav a:hover { background: #f3f7fb; color: var(--text); }
.ct-form-nav a.is-active { background: #e8f2fb; color: var(--brand-dark); border-left-color: var(--brand); }
.ct-form-nav a.is-active span { background: var(--brand); color: #fff; }
.ct-form-nav-submit { margin-top: 12px; width: 100%; }
.ct-admin-form .ct-form { gap: 18px; }
.ct-sec { display: grid; gap: 14px; padding: 20px 22px 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; scroll-margin-top: 90px; }
.ct-sec-head { display: flex; align-items: flex-start; justify-content: flex-start; gap: 12px; padding: 0 0 12px; border: 0; border-bottom: 1px solid #e9eef4; background: none; }
.ct-sec-head > div { display: grid; gap: 0; align-items: start; }
.ct-form-nav, .ct-form-nav a { align-items: center; }
.ct-sec-no { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; font-size: 14px; }
.ct-sec-head h2 { margin: 0 0 3px; font-size: 18px; }
.ct-sec-head p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.ct-input-lg { font-size: 18px; font-weight: 700; padding: 10px 12px; }
.ct-subgroup { display: grid; gap: 6px; }
.ct-inline-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ct-inline-fields label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.ct-inline-fields input { min-height: 38px; }
.ct-inline-fields .ct-field-hint { flex-basis: 100%; }
/* 右側預覽 */
.ct-form-aside { position: sticky; top: 92px; }
.ct-preview { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ct-preview-head { display: grid; gap: 2px; }
.ct-preview-head strong { font-size: 14px; }
.ct-preview-head small { color: var(--muted); font-size: 12px; }
.ct-card-preview { pointer-events: none; box-shadow: 0 10px 28px rgba(22, 58, 95, 0.12); }
.ct-card-preview::after { display: none; }
.ct-card-preview .ct-card-body { padding-bottom: 16px; }
.ct-card-preview .ct-card-body strong { font-size: 17px; }
.ct-card-preview .ct-status:empty { display: none; }
.ct-preview-facts { display: grid; gap: 6px; margin: 0; font-size: 13px; }
.ct-preview-facts div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ct-preview-facts dt { color: var(--muted); font-weight: 800; white-space: nowrap; }
.ct-preview-facts dd { margin: 0; text-align: right; }
/* 舉辦時間元件 */
.ct-schedule { display: grid; gap: 14px; }
.ct-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ct-seg button { display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; }
.ct-seg button strong { font-size: 15px; color: var(--text); }
.ct-seg button small { color: var(--muted); font-size: 12px; }
.ct-seg button:hover { border-color: #9db8d2; }
.ct-seg button.is-active { border-color: var(--brand); background: #e8f2fb; box-shadow: inset 0 0 0 1px var(--brand); }
.ct-seg button.is-active strong { color: var(--brand-dark); }
.ct-schedule-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.ct-cal { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.ct-cal-head { display: flex; align-items: center; gap: 6px; }
.ct-cal-title { display: none; }
.ct-cal-head select { min-height: 32px; padding: 4px 6px; font-size: 14px; font-weight: 800; }
.ct-cal-head select[data-cal-month] { margin-left: auto; }
.ct-cal-nav { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 18px; font-weight: 900; cursor: pointer; color: var(--brand); }
.ct-cal-nav:hover { background: #eef5fc; }
.ct-cal-weekdays, .ct-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ct-cal-weekdays span { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 2px 0; }
.ct-cal-weekdays span:first-child, .ct-cal-weekdays span:last-child { color: #c2410c; }
.ct-cal-day { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 1px solid transparent; border-radius: 8px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--text); }
.ct-cal-day:hover { border-color: #9db8d2; background: #eef5fc; }
.ct-cal-day.is-past { color: #a3adb8; }
.ct-cal-day.is-today { box-shadow: inset 0 0 0 1.5px #d08214; }
.ct-cal-day.is-selected { background: var(--brand); color: #fff; border-color: var(--brand); }
.ct-cal-day.is-range-start { border-radius: 8px 2px 2px 8px; }
.ct-cal-day.is-range-end { border-radius: 2px 8px 8px 2px; }
.ct-cal-day .ct-cal-dot { position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #ffd166; }
.ct-cal-pad { aspect-ratio: 1; }
.ct-schedule-side { display: grid; gap: 14px; min-width: 0; }
.ct-pane-hint { margin: 0; padding: 10px 12px; border-radius: 8px; background: #f3f7fb; color: #46535e; font-size: 13.5px; }
.ct-gen { display: grid; gap: 8px; padding: 12px; border: 1px dashed #b8c8d8; border-radius: 10px; background: #fbfdff; }
.ct-gen strong { font-size: 14px; }
.ct-gen-wd { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-gen-wd label { position: relative; cursor: pointer; }
.ct-gen-wd input { position: absolute; opacity: 0; width: 0; height: 0; }
.ct-gen-wd span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 800; font-size: 13.5px; }
.ct-gen-wd input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.ct-gen-wd input:focus-visible + span { outline: 2px solid #d08214; outline-offset: 1px; }
.ct-gen-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ct-gen-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; }
.ct-gen-row input[type="date"] { min-height: 34px; width: auto; padding: 4px 8px; }
.ct-gen-row input[type="number"] { width: 64px; min-height: 34px; padding: 4px 8px; }
.ct-session-head { display: flex; align-items: baseline; gap: 10px; }
.ct-session-head span { color: var(--muted); font-size: 13px; }
.ct-session-head .ct-link-btn { margin-left: auto; }
.ct-schedule .ct-session-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.ct-schedule .ct-session-list:empty::after { content: "還沒有場次。"; display: block; padding: 10px 12px; color: var(--muted); font-size: 13px; }
.ct-session-row { display: grid; grid-template-columns: 26px auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e9eef4; border-radius: 8px; background: #fff; font-size: 13.5px; }
.ct-session-row.has-exception { border-color: #ffd166; background: #fffbea; }
.ct-session-row.is-open { border-color: var(--brand); }
.ct-session-idx { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e8eef5; color: var(--brand-dark); font-size: 11.5px; font-weight: 900; }
.ct-session-row strong { white-space: nowrap; }
.ct-session-row > small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-session-exception { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 4px 2px; border-top: 1px dashed #e9eef4; }
.ct-session-exception label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.ct-session-exception select, .ct-session-exception input { min-height: 32px; padding: 3px 6px; font-size: 13.5px; }
.ct-session-note-field { flex: 1 1 220px; }
.ct-session-note-field input { flex: 1; }
.ct-time-block { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ct-time-block strong { font-size: 14px; }
.ct-time-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ct-time-row select { min-height: 38px; width: auto; min-width: 96px; font-weight: 700; }
.ct-time-row.is-muted { opacity: 0.45; }
.ct-quick-times { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-quick-times button { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #f3f7fb; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--brand-dark); cursor: pointer; }
.ct-quick-times button:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.ct-schedule-summary { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 10px; background: #e8f2fb; color: var(--brand-dark); font-size: 15px; }
.ct-schedule-summary strong { font-weight: 800; }
/* 前台：系列場次表 */
.ct-sessions { margin: 0 0 22px; }
.ct-sessions h2 { margin: 0 0 10px; font-size: 20px; }
.ct-article .ct-session-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ct-article .ct-session-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ct-article .ct-session-list li.is-past { opacity: 0.6; }
.ct-article .ct-session-list li.is-next { border-color: var(--brand); background: #eef5fc; }
.ct-session-no { color: var(--muted); font-size: 13px; font-weight: 800; min-width: 52px; }
.ct-article .ct-session-list time { font-weight: 800; }
.ct-session-time { color: var(--text); }
.ct-session-time em { font-style: normal; color: #c2410c; font-size: 12.5px; }
.ct-session-note { color: var(--muted); font-size: 13.5px; }
.ct-session-flag { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; }
.ct-session-flag.is-done { background: #e3e8ee; color: #46535e; }
@media (max-width: 1360px) {
  .ct-form-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .ct-form-nav { grid-column: 1 / -1; position: sticky; top: 64px; z-index: 3; grid-auto-flow: column; grid-auto-columns: max-content; justify-content: start; gap: 6px; padding: 8px 0; background: var(--bg); overflow-x: auto; }
  .ct-form-nav a { border-left: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; }
  .ct-form-nav a.is-active { border-bottom-color: var(--brand); }
  .ct-form-nav-submit { margin: 0 0 0 auto; width: auto; }
}
@media (max-width: 1080px) {
  .ct-form-layout { grid-template-columns: 1fr; }
  .ct-form-aside { position: static; }
  .ct-schedule-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ct-seg { grid-template-columns: 1fr; }
  .ct-session-row { grid-template-columns: 26px auto minmax(0, 1fr); }
  .ct-session-row .ct-link-btn, .ct-session-row .ct-icon-btn { grid-column: auto; }
}

/* ══ 營運總覽（2026-09-14 併入）：統計口徑切換（依時段區分／以小時區分）與依時段區分區塊 ══ */
.stats-basis-bar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 12px 0 4px; }
.stats-basis-title { align-self: center; font-weight: 800; color: #16324f; font-size: 13.5px; margin-right: 4px; }
.stats-basis-btn { display: flex; flex-direction: column; gap: 2px; padding: 9px 16px; border: 1.5px solid #cfd8e0; border-radius: 12px; background: #fff; color: #1f2933; text-decoration: none; font-weight: 800; font-size: 14px; min-width: 180px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.stats-basis-btn small { font-weight: 500; font-size: 11.5px; color: #8a97a3; }
.stats-basis-btn:hover { border-color: var(--brand, #1c4e80); box-shadow: 0 8px 20px rgba(22, 58, 95, 0.12); }
.stats-basis-btn.active { border-color: var(--brand, #1c4e80); background: #e8eef5; color: var(--brand, #1c4e80); box-shadow: inset 0 0 0 1px var(--brand, #1c4e80); }
.stats-basis-btn.active small { color: #1c4e80; }
.pb-scheme-title { margin: 14px 0 6px; font-size: 0.95em; color: #16324f; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pb-scheme-title small { font-weight: 500; color: #8a97a3; font-size: 12px; }
.pb-detail { margin-top: 12px; border: 1px solid #e3e8ee; border-radius: 12px; background: #fff; }
.pb-detail > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; color: var(--brand, #1c4e80); }
.pb-table-wrap { overflow-x: auto; padding: 0 10px 10px; }
.pb-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pb-table th, .pb-table td { border: 1px solid #e3e8ee; padding: 6px 8px; text-align: left; vertical-align: top; }
.pb-table th { background: #f4f7fa; color: #46535e; font-size: 12px; white-space: nowrap; }
.pb-table td small { color: #8a97a3; }
.pb-table td.pb-empty { color: #c0c8d0; text-align: center; }
.pb-table progress { width: 90px; height: 8px; vertical-align: middle; margin-left: 6px; }
.usage-actual { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e3e8ee; }
.usage-actual .unified-label-row { font-size: 13px; font-weight: 700; color: #46535e; margin-bottom: 6px; }
.usage-actual-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.usage-actual-table th, .usage-actual-table td { padding: 6px 8px; border-bottom: 1px solid #eef1f4; text-align: left; vertical-align: middle; }
.usage-actual-table th { font-size: 12px; color: #8a97a3; font-weight: 700; }
.usage-actual-table input[type="time"] { padding: 5px 8px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; }
.usage-actual-table small { color: #8a97a3; font-size: 11.5px; }


/* ══ 2026-09-14：系列堂次（前台）、租借卡提前取消、使用紀錄布置撤場欄 ══ */
.ct-sessions h2 small { margin-left: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ct-session-when { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ct-article .ct-session-list li { padding: 10px 14px; }
.ct-session-btn { margin-left: auto; min-height: 34px; padding: 6px 14px; font-size: 14px; }
.ct-session-btn.is-disabled { opacity: 0.55; pointer-events: none; }
.ct-session-flag + .ct-session-btn { margin-left: 0; }
.ct-unit-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #46535e; }
.ct-unit-pick select { min-height: 30px; padding: 2px 6px; font-size: 13px; }
.ct-session-url-field { flex: 1 1 100%; }
.ct-session-url-field input { flex: 1; }
.rc-cancel-row { margin: 12px 0; padding: 10px 14px; border: 1px dashed #d9dfe5; border-radius: 10px; background: #fbfcfd; }
.booking-review-card .rc-cancel-row > summary { display: block; padding: 0; cursor: pointer; font-size: 13px; color: #8a97a3; list-style: none; }
.rc-cancel-row summary::-webkit-details-marker { display: none; }
.rc-cancel-row summary::before { content: "▸ "; }
.rc-cancel-row[open] summary::before { content: "▾ "; }
.rc-cancel-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; margin-top: 8px; }
.rc-cancel-form label { display: grid; gap: 4px; font-size: 12.5px; color: #46535e; flex: 1 1 260px; }
.rc-cancel-form input { padding: 7px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; }
.rc-cancel-row.is-cancelled { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-style: solid; border-color: #b3261e; background: #fbeceb; }
.rc-cancel-row.is-cancelled small { color: #7a2620; }
.rc-cancel-row.is-cancelled form { margin: 0 0 0 auto; }
.rc-cancel-badge { padding: 3px 10px; border-radius: 999px; background: #b3261e; color: #fff; font-size: 12.5px; font-weight: 800; }
.rc-usage-items select { min-height: 32px; padding: 3px 6px; font-size: 13px; }
.rc-usage-items-hint { margin: -4px 0 0; }

/* ══ 2026-09-21：客家標記、館方建單彈窗、內部備註時間軸 ══ */
.hakka-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #2f8f5b; color: #fff; font-size: 11px; font-style: normal; font-weight: 800; vertical-align: middle; }
.pb-hakka { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #e7f6ee; color: #1f7a45; font-size: 11px; font-style: normal; font-weight: 800; }
.unified-hakka { display: grid; gap: 4px; padding: 8px 10px; border: 1px dashed #b8d6c4; border-radius: 8px; background: #f2faf5; font-size: 13.5px; font-weight: 700; color: #1f5c33; }
.unified-hakka label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.unified-hakka input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }
.unified-hakka small { font-weight: 500; color: #46535e; font-size: 0.85em; line-height: 1.4; }
.hakka-chip.youth-chip { background: #1c6fb0; }
.pb-youth { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #e6f0fa; color: #1c4e80; font-size: 11px; font-style: normal; font-weight: 800; }
.pb-breakdown { margin-top: 10px; }
.sb-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 4px; }
.sb-flags .ct-field-hint { flex-basis: 100%; }
.day-schedule-head-actions { display: inline-flex; align-items: center; gap: 8px; }
.day-add-btn { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.sb-dialog { width: min(860px, 94vw); }
.sb-form { display: grid; gap: 14px; }
.sb-sec { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid #e3e8ee; border-radius: 12px; background: #fff; }
.sb-sec h3 { margin: 0; font-size: 14.5px; color: #16324f; }
.sb-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sb-inline label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.sb-inline input[type="date"] { min-height: 36px; padding: 5px 8px; }
.sb-rows { display: grid; gap: 6px; }
.sb-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) auto auto auto auto; align-items: center; gap: 8px; }
.sb-row select { min-height: 36px; padding: 5px 8px; font: inherit; }
.sb-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sb-grid-3 label, .sb-wide { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: #46535e; }
.sb-grid-3 input, .sb-grid-3 select, .sb-wide input, .sb-wide textarea { min-height: 36px; padding: 6px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; font-weight: 500; }
.sb-member { display: grid; gap: 6px; position: relative; }
.sb-member > label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: #46535e; }
.sb-member input[type="search"] { min-height: 36px; padding: 6px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; }
.sb-suggest { display: grid; gap: 2px; padding: 6px; border: 1px solid #ccd4dc; border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(22, 58, 95, 0.16); }
.sb-suggest button { display: grid; gap: 2px; text-align: left; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.sb-suggest button:hover { background: #eef5fc; }
.sb-suggest small { color: var(--muted); font-size: 12px; }
.sb-suggest .empty { margin: 0; padding: 6px 10px; }
.sb-member-picked[hidden], .sb-suggest[hidden], .sb-grid-3 label[hidden] { display: none; }
.sb-grid-3 select, .sb-grid-3 input { min-width: 0; width: 100%; }
.sb-member-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; border-radius: 8px; background: #e7f6ee; color: #1f5c33; font-size: 13px; font-weight: 700; }
.sb-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sb-notes { margin: 12px 0; padding: 12px 14px; border: 1px solid #ffe08a; border-radius: 10px; background: #fffbea; }
.sb-notes-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 8px; }
.sb-notes-head h3 { margin: 0; font-size: 14.5px; color: #7a5104; }
.sb-notes-head small { color: #8a6a1f; font-size: 12px; }
.sb-notes-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.sb-notes-list li { padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid #f1e2b0; }
.sb-note-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12.5px; color: #46535e; }
.sb-note-meta time { color: var(--muted); }
.sb-note-meta form { margin: 0 0 0 auto; }
.sb-note-del { color: #b3261e; font-size: 12px; }
.sb-notes-list p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.sb-note-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.sb-note-form textarea { min-height: 44px; padding: 7px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; }
.sb-notes .empty { margin: 0 0 8px; }
@media (max-width: 760px) {
  .sb-row { grid-template-columns: 1fr 1fr; }
  .sb-row select:first-child { grid-column: 1 / -1; }
  .sb-grid-3 { grid-template-columns: 1fr; }
  .sb-note-form { grid-template-columns: 1fr; }
}

/* ══ 月報表（營運總覽・依時段區分）2026-09-16 ══ */
.rpt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.rpt-wrap { overflow-x: auto; border: 1px solid #cfd8e0; border-radius: 10px; background: #fff; }
.rpt-table { width: 100%; min-width: 1100px; border-collapse: collapse; font-size: 12.5px; }
.rpt-table th, .rpt-table td { border: 1px solid #cfd8e0; padding: 5px 7px; vertical-align: middle; text-align: center; }
.rpt-table th { background: #f4f7fa; color: #16324f; font-size: 12.5px; font-weight: 800; }
.rpt-table th small { font-weight: 500; color: #62707c; }
.rpt-table td.rpt-name { text-align: left; min-width: 160px; }
.rpt-table td.rpt-name small { color: #8a97a3; }
.rpt-table td.rpt-venues { text-align: left; }
.rpt-table td.rpt-date { font-weight: 800; white-space: nowrap; }
.rpt-table td.rpt-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rpt-table td.rpt-time .rpt-rental { color: #8a97a3; font-size: 11px; }
.rpt-table td.rpt-method .rpt-calc { color: #8a97a3; font-size: 11px; white-space: nowrap; }
.rpt-table td.rpt-num { font-variant-numeric: tabular-nums; }
.rpt-table td.rpt-x { color: #666; font-weight: 700; }
.rpt-table td.rpt-method small { color: #62707c; }
.rpt-table .rpt-dim { color: #c0c8d0; }
.rpt-table .rpt-missing { color: #b3261e; font-weight: 700; }
.rpt-table tfoot td { background: #f4f7fa; font-weight: 800; }
.rpt-table tfoot td.rpt-total-label { text-align: right; }
.rpt-chip { display: inline-block; margin: 2px 3px 2px 0; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ══ 工作人員功能權限：分群開關面板＋說明卡（2026-09-21） ══ */
.sp-howto { margin: 0 0 10px; color: #62707c; font-size: 0.82em; line-height: 1.7; }
.sp-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; align-items: start; }
.sp-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sp-group { border: 1px solid #e3e8ee; border-radius: 12px; background: #fbfcfd; overflow: hidden; }
@media (max-width: 1180px) { .sp-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-group-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; padding: 9px 12px; background: #f1f4f7; border-bottom: 1px solid #e3e8ee; }
.sp-group-head strong { display: block; font-size: 0.9em; color: #16324f; white-space: nowrap; }
.sp-group-head small { display: block; color: #8a97a3; font-size: 0.74em; margin-top: 1px; }
.sp-group-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sp-count { font-size: 0.76em; color: #46535e; background: #fff; border: 1px solid #dfe5eb; border-radius: 999px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.sp-mini { padding: 3px 9px; border: 1px solid #ccd4dc; border-radius: 999px; background: #fff; color: #46535e; font: inherit; font-size: 0.74em; cursor: pointer; }
.sp-mini:hover { border-color: #1c4e80; color: #1c4e80; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid #edf1f4; background: #fff; }
.sp-row:first-of-type { border-top: 0; }
.sp-row:hover { background: #f7f9fb; }
.sp-main { min-width: 0; flex: 1; }
.sp-name { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.9em; font-weight: 700; color: #1f2d3a; cursor: help; text-align: left; }
button.sp-name:hover, button.sp-name:focus-visible, button.sp-name[aria-expanded="true"] { color: #1c4e80; background: none; box-shadow: none; transform: none; outline: none; }
.sp-i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #b7c3ce; color: #6b7a88; font-size: 10px; font-style: italic; font-family: Georgia, serif; line-height: 1; flex-shrink: 0; }
.sp-name:hover .sp-i, .sp-name[aria-expanded="true"] .sp-i { background: #1c4e80; border-color: #1c4e80; color: #fff; }
.sp-desc { display: block; color: #7b8894; font-size: 0.76em; line-height: 1.5; margin-top: 2px; }
.sp-cells { display: flex; gap: 14px; flex-shrink: 0; }
.sp-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; }
.sp-cell-label { font-size: 0.7em; color: #8a97a3; letter-spacing: 0.02em; }
.sp-cell.is-na .sp-cell-label { color: #c3ccd4; }
.sp-na { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 26px; color: #c3ccd4; font-size: 0.9em; }
.sp-panel.is-readonly .sp-row:hover { background: #fff; }

/* 開關（ON 綠／OFF 灰，滑塊會跑） */
.sw { position: relative; display: inline-block; width: 52px; height: 26px; cursor: pointer; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.sw-track { position: absolute; inset: 0; border-radius: 999px; background: #e3e7ec; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(0, 0, 0, 0.04); transition: background 0.18s ease, box-shadow 0.18s ease; }
.sw-track b { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; font-style: normal; transition: opacity 0.15s ease; user-select: none; }
.sw-on { left: 8px; color: #fff; opacity: 0; }
.sw-off { right: 7px; color: #9aa6b1; opacity: 1; }
.sw-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04); transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1); }
.sw input:checked + .sw-track { background: linear-gradient(180deg, #3ccf5a, #22b13f); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(34, 177, 63, 0.25); }
.sw input:checked + .sw-track .sw-on { opacity: 1; }
.sw input:checked + .sw-track .sw-off { opacity: 0; }
.sw input:checked + .sw-track .sw-knob { transform: translateX(26px); }
.sw input:focus-visible + .sw-track { outline: 2px solid #1c4e80; outline-offset: 2px; }
.sw.is-disabled, .sw input:disabled { cursor: default; }
.sw input:disabled + .sw-track { opacity: 0.55; }
.sw.is-linked .sw-track { box-shadow: 0 0 0 3px rgba(28, 78, 128, 0.28); }

/* 說明卡 */
.sp-pop { position: absolute; z-index: 60; background: #fff; border: 1px solid #d5dde5; border-radius: 12px; box-shadow: 0 12px 32px rgba(22, 50, 79, 0.18); padding: 12px 14px; font-size: 13px; line-height: 1.6; color: #2b3a47; }
.sp-pop[hidden] { display: none; }
.sp-pop::before { content: ""; position: absolute; left: 18px; top: -6px; width: 10px; height: 10px; background: #fff; border-left: 1px solid #d5dde5; border-top: 1px solid #d5dde5; transform: rotate(45deg); }
.sp-pop.is-above::before { top: auto; bottom: -6px; transform: rotate(225deg); }
.sp-pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.sp-pop-head strong { font-size: 14px; color: #16324f; }
.sp-pop-head span { font-size: 11px; color: #8a97a3; white-space: nowrap; }
.sp-pop-summary { margin: 0 0 8px; color: #46535e; }
.sp-pop-sec { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e3e8ee; }
.sp-pop-sec h5 { margin: 0 0 4px; font-size: 11.5px; color: #8a97a3; font-weight: 700; letter-spacing: 0.02em; }
.sp-pop-view h5 { color: #1c4e80; }
.sp-pop-op h5 { color: #1f8a3a; }
.sp-pop-notes h5 { color: #b3261e; }
.sp-pop-sec ul { margin: 0; padding-left: 18px; }
.sp-pop-sec li { margin: 1px 0; }
.sp-pop-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-pop-chips span { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #eef3f8; color: #1c4e80; font-size: 11.5px; }
@media (max-width: 640px) {
  .sp-panel { grid-template-columns: 1fr; }
  .sp-row { align-items: flex-start; }
  .sp-cells { gap: 10px; }
}

/* ══ 身份管理：收費方案卡＋試行／制式分頁（2026-09-21） ══ */
.fs-wrap { background: #fff; border: 1px solid #e3e8ee; border-radius: 14px; padding: 16px 20px; margin-bottom: 16px; }
.fs-wrap.fs-readonly { padding: 12px 20px; }
.fs-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.fs-head strong { font-size: 1.02em; color: #16324f; }
.fs-head span { color: #62707c; font-size: 0.83em; line-height: 1.6; }
.fs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.fs-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid #dfe5eb; border-radius: 12px; background: #fbfcfd; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.fs-card:hover { border-color: #9fb3c6; }
.fs-card > input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.fs-card-check { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 2px solid #b7c3ce; background: #fff; position: relative; }
.fs-card > input[type="radio"]:checked ~ .fs-card-check { border-color: #1c4e80; background: #1c4e80; }
.fs-card > input[type="radio"]:checked ~ .fs-card-check::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fs-card > input[type="radio"]:focus-visible ~ .fs-card-check { outline: 2px solid #1c4e80; outline-offset: 2px; }
.fs-card:has(> input[type="radio"]:checked) { border-color: #1c4e80; background: #fff; box-shadow: 0 0 0 3px rgba(28, 78, 128, 0.12); }
.fs-card-body { display: block; min-width: 0; flex: 1; }
.fs-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fs-card-head strong { font-size: 1.02em; color: #16324f; }
.fs-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #eef1f4; color: #8a97a3; font-size: 0.72em; font-style: normal; font-weight: 700; }
.fs-card.is-active .fs-badge, .fs-tab .fs-badge { background: #e6f2e8; color: #1f7a34; }
.fs-card-sub { display: block; color: #62707c; font-size: 0.82em; margin: 2px 0 6px; }
.fs-card-list { margin: 0; padding-left: 18px; color: #46535e; font-size: 0.84em; line-height: 1.65; }
.fs-card-list li + li { margin-top: 2px; }
.fs-deposit { display: grid; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e3e8ee; font-size: 0.84em; color: #46535e; font-weight: 700; }
.fs-deposit input { max-width: 200px; padding: 7px 10px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; font-weight: 500; }
.fs-deposit small { color: #8a97a3; font-weight: 500; }
.fs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.fs-actions small { color: #8a97a3; font-size: 0.82em; }
.fs-tabs { display: flex; gap: 6px; margin: 4px 0 0; border-bottom: 2px solid #e3e8ee; }
.fs-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: -2px; border: 0; border-bottom: 2px solid transparent; background: none; color: #62707c; font: inherit; font-size: 0.95em; font-weight: 700; cursor: pointer; }
.fs-tab:hover { color: #1c4e80; background: none; }
.fs-tab.is-on { color: #1c4e80; border-bottom-color: #1c4e80; background: none; }
.fs-tabpanel { padding-top: 16px; }
.fs-tabpanel[hidden] { display: none; }
.fs-h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 14px 0 8px; font-size: 1em; color: #16324f; }
.fs-h2:first-child { margin-top: 0; }
.fs-h2 small { color: #8a97a3; font-size: 0.8em; font-weight: 500; }
.fs-class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.fs-class-card { border: 1px solid #e3e8ee; border-radius: 12px; padding: 12px 14px; background: #fff; display: grid; gap: 8px; }
.fs-class-general { border-top: 4px solid #1c4e80; }
.fs-class-discount { border-top: 4px solid #2f8f4e; }
.fs-class-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fs-class-head strong { font-size: 1.02em; color: #16324f; }
.fs-count { font-size: 0.76em; color: #46535e; background: #f1f4f7; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.fs-class-card p, .fs-tier-row p { margin: 0; color: #46535e; font-size: 0.88em; line-height: 1.6; }
.fs-class-card small { color: #8a97a3; font-size: 0.8em; line-height: 1.6; }
.fs-class-card textarea, .fs-tier-row textarea { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid #ccd4dc; border-radius: 8px; font: inherit; font-size: 0.88em; line-height: 1.5; resize: vertical; }
.fs-tier-list { display: grid; gap: 8px; }
.fs-tier-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 120px; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid #e3e8ee; border-radius: 10px; background: #fff; }
.fs-tier-name { display: grid; gap: 2px; }
.fs-tier-name strong { font-size: 0.95em; color: #16324f; }
.fs-tier-name small { color: #8a97a3; font-size: 0.76em; }
.fs-tier-fee { text-align: right; font-size: 0.84em; font-weight: 700; color: #46535e; white-space: nowrap; }
.fs-tier-exempt .fs-tier-fee, .fs-tier-exempt_self .fs-tier-fee { color: #1c4e80; }
.fs-tier-discount .fs-tier-fee { color: #1f7a34; }
.fs-table-wrap { overflow-x: auto; border: 1px solid #e3e8ee; border-radius: 10px; background: #fff; }
.fs-table { width: 100%; border-collapse: collapse; font-size: 0.88em; }
.fs-table th, .fs-table td { padding: 8px 12px; border-bottom: 1px solid #edf1f4; text-align: left; }
.fs-table th { background: #f4f7fa; color: #16324f; font-size: 0.92em; }
.fs-table tr:last-child td { border-bottom: 0; }
.fs-note { color: #8a97a3; font-size: 0.82em; line-height: 1.7; margin: 8px 0 0; }
.fs-note-top { margin: 0 0 12px; }
@media (max-width: 720px) {
  .fs-tier-row { grid-template-columns: 1fr; gap: 6px; }
  .fs-tier-fee { text-align: left; }
}

/* ══ 營運日曆租借卡：總覽＋審核／使用登記側欄（2026-09-21） ══ */
.booking-info-dialog.is-wide { width: min(1500px, 97vw); }
.booking-info-dialog .booking-review-body.cal-body, .cal-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; align-items: start; }
.booking-info-dialog .cal-body.is-split, .cal-body.is-split { grid-template-columns: minmax(340px, 5fr) minmax(440px, 7fr); }
.cal-overview > * + * { margin-top: 14px; }
.cal-overview { min-width: 0; }
.cal-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #dfe5eb; }
.cal-action-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid #dfe5eb; border-radius: 12px; background: #fff; color: #1f2d3a; font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.cal-action-btn:hover { border-color: #1c4e80; background: #f7f9fc; color: #1c4e80; }
.cal-action-btn.is-on { border-color: #1c4e80; background: #1c4e80; color: #fff; box-shadow: 0 6px 16px rgba(28, 78, 128, 0.25); }
.cal-action-btn b { display: block; font-size: 1em; }
.cal-action-btn small { display: block; font-size: 0.74em; opacity: 0.8; line-height: 1.4; margin-top: 2px; }
.cal-action-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #eef3f8; color: #1c4e80; font-size: 18px; }
.cal-action-btn.is-on .cal-action-icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.cal-side { min-width: 0; border-left: 1px solid #e3e8ee; padding-left: 20px; position: sticky; top: 0; align-self: start; max-height: calc(90vh - 90px); overflow: auto; }
.cal-side[hidden] { display: none; }
.cal-side-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid #1c4e80; }
.cal-side-head strong { font-size: 1.05em; color: #16324f; }
.cal-side-close { padding: 5px 11px; border: 1px solid #ccd4dc; border-radius: 999px; background: #fff; color: #46535e; font: inherit; font-size: 0.82em; cursor: pointer; }
.cal-side-close:hover { border-color: #1c4e80; color: #1c4e80; background: #fff; }
.cal-pane[hidden] { display: none; }
.cal-pane .booking-unified-form, .cal-pane .booking-edit-block, .cal-pane .booking-message-thread, .cal-pane .review-action-grid, .cal-pane .review-delete-row { margin-top: 0; }
.cal-pane .booking-edit-block { margin-top: 12px; }
.cal-pane .booking-message-thread { margin-top: 14px; }
.cal-usage-wait { padding: 16px 18px; border: 1px dashed #ccd4dc; border-radius: 12px; background: #fbfcfd; color: #46535e; }
.cal-usage-wait strong { display: block; margin-bottom: 4px; color: #16324f; }
.cal-usage-wait p { margin: 0; font-size: 0.9em; line-height: 1.6; }
.cal-usage-state { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 0.9em; color: #46535e; }
.cal-usage-body .rc-usage-quick { margin-bottom: 10px; }
@media (max-width: 960px) {
  .cal-body.is-split { grid-template-columns: 1fr; }
  .cal-side { border-left: 0; padding-left: 0; border-top: 2px solid #1c4e80; padding-top: 12px; position: static; max-height: none; }
  .booking-info-dialog.is-wide { width: min(980px, 96vw); }
}

/* ══ CRM 首頁數據：期間選單＋預覽（2026-09-21） ══ */
.hd-now { display: flex; align-items: center; gap: 18px; padding: 16px 20px; margin-bottom: 16px; border: 1px solid #e3e8ee; border-radius: 14px; background: linear-gradient(135deg, #f7fbff, #eef5fb); }
.hd-now-gauge { flex-shrink: 0; width: 108px; height: 108px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; border: 6px solid #1c4e80; box-shadow: 0 8px 20px rgba(28, 78, 128, 0.18); }
.hd-now-gauge strong { font-size: 1.7em; line-height: 1; color: #16324f; }
.hd-now-gauge span { font-size: 0.74em; color: #62707c; margin-top: 4px; }
.hd-now-text { min-width: 0; }
.hd-now-text b { display: block; font-size: 0.82em; color: #8a97a3; letter-spacing: 0.04em; }
.hd-now-text p { margin: 2px 0 6px; font-size: 1.02em; font-weight: 700; color: #16324f; }
.hd-now-text small { display: block; color: #62707c; font-size: 0.8em; line-height: 1.6; }
.hd-form .settings-group { display: grid; gap: 14px; }
.hd-mode-select { display: grid; gap: 6px; font-weight: 700; color: #46535e; font-size: 0.9em; max-width: 620px; }
.hd-mode-select select { padding: 10px 12px; border: 1px solid #ccd4dc; border-radius: 10px; font: inherit; font-size: 1.02em; background: #fff; }
.hd-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.hd-preview-card { display: grid; gap: 4px; padding: 12px 14px; border: 2px solid #e3e8ee; border-radius: 12px; background: #fbfcfd; }
.hd-preview-card.is-on { border-color: #1c4e80; background: #fff; box-shadow: 0 0 0 3px rgba(28, 78, 128, 0.12); }
.hd-preview-label { font-size: 0.86em; font-weight: 700; color: #46535e; display: flex; gap: 6px; align-items: baseline; }
.hd-preview-label small { color: #8a97a3; font-weight: 500; }
.hd-preview-card strong { font-size: 1.6em; color: #16324f; line-height: 1.1; }
.hd-preview-card.is-on strong { color: #1c4e80; }
.hd-preview-card small { color: #8a97a3; font-size: 0.76em; line-height: 1.5; }
.hd-manual { display: grid; gap: 6px; max-width: 360px; font-weight: 700; color: #46535e; font-size: 0.9em; }
.hd-manual input { padding: 9px 12px; border: 1px solid #ccd4dc; border-radius: 10px; font: inherit; font-size: 1.05em; max-width: 160px; }
.hd-manual small { color: #8a97a3; font-weight: 500; font-size: 0.86em; }
@media (max-width: 640px) { .hd-now { flex-direction: column; align-items: flex-start; } }

/* ══ 租借卡「使用狀況」摘要（2026-09-21 改版） ══ */
.us-card { border: 1px solid #dce5ee; border-radius: 12px; padding: 12px 14px; background: #fff; margin: 12px 0; }
.us-card.is-future { background: #f8fafc; border-style: dashed; }
.us-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.us-head h4 { margin: 0; font-size: 14px; color: #16324f; }
.us-head .status-badge { font-size: 12px; }
.us-link { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #1c4e80; text-decoration: none; padding: 5px 10px; border: 1px solid #ccd4dc; border-radius: 8px; background: #fff; }
.us-link:hover { border-color: #1c4e80; }
.us-future { font-size: 12.5px; color: #8a97a3; }
.us-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 10px 0 0; }
.us-item { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 6px; align-items: baseline; font-size: 13.5px; color: #1f2d3a; }
.us-item dt { color: #8a97a3; font-size: 12px; font-weight: 800; }
.us-item dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.us-item dd small { display: block; color: #62707c; font-size: 12px; }
.us-item.us-wide { grid-column: 1 / -1; }
.us-dim { color: #9aa6b1; }
.us-warn { color: #b3261e; }
@media (max-width: 600px) { .us-grid { grid-template-columns: 1fr; } }

.rc-usage-grid label > span small { display: block; font-weight: 500; color: #8a97a3; font-size: 11px; line-height: 1.3; }

/* ══ 手機版外殼（2026-09-21）：☰ 抽屜選單、CRM 側欄抽屜＋底部分頁列、彈窗全螢幕、逐日行程清單 ══ */
/* 桌機：手機專用元件一律隱藏（display:none 的元素不佔 grid 格，不影響原本兩欄版面） */
.site-menu-btn, .site-nav-head, .crm-mbar, .crm-tabbar, .crm-sidebar-head, .ops-agenda, .cal-side-back, .drawer-backdrop { display: none; }
.site-menu-icon { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 20px; height: 20px; }
.site-menu-icon i { display: block; height: 2px; border-radius: 2px; background: currentColor; }

@media (max-width: 760px) {
  /* ── 頁首：品牌＋☰ 一列固定 56px；nav 變成右側抽屜（預設收合） ── */
  /* backdrop-filter 會讓 position:fixed 的子元素改以頁首為定位基準，抽屜會被卡在頁首裡 → 手機版改用不透明底色 */
  .site-header, .mobile-mode .site-header { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 6px 12px; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .site-header .site-brand { flex: 1 1 auto; min-width: 0; }
  .site-brand-name small { display: none; }
  .agency-logo { height: 34px; }
  .site-menu-btn { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 40px; padding: 6px 12px; border: 1px solid #c8d4e0; border-radius: 10px; background: #fff; color: var(--brand); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
  .site-menu-btn[aria-expanded="true"] { background: #e8f4fd; border-color: var(--brand); }
  .site-nav, .mobile-mode .site-nav { position: fixed; top: 0; right: 0; bottom: 0; z-index: 130; width: min(320px, 86vw); display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 2px; padding: 0 12px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; box-shadow: -12px 0 40px rgba(15, 30, 45, 0.25); transform: translateX(105%); transition: transform 0.22s ease; }
  .site-nav.is-open { transform: none; }
  .site-nav-head, .crm-sidebar-head { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; margin: 0 -12px 8px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); background: #f4f8fc; position: sticky; top: 0; z-index: 2; }
  .site-nav-head strong, .crm-sidebar-head strong { margin: 0; font-size: 16px; letter-spacing: 0; color: #16324f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-nav-close { flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid #c8d4e0; border-radius: 10px; background: #fff; color: #46535e; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
  .site-nav a, .mobile-mode .site-nav a { display: flex; align-items: center; flex: 0 0 auto; min-height: 50px; padding: 10px 14px; border-radius: 10px; font-size: 17px; font-weight: 800; white-space: nowrap; }
  .site-nav a.mode-switch { margin-top: auto; justify-content: center; border: 1px solid #c8d4e0; }
  .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 120; background: rgba(15, 30, 45, 0.45); }
  .drawer-backdrop[hidden] { display: none; }
  body.drawer-open { overflow: hidden; }
  /* 頁首本身是 sticky＋z-index 的堆疊環境，nav 抽屜在它裡面：開抽屜時把頁首整層抬到遮罩之上，並用偽元素把頁首其餘部分一起壓暗 */
  body.drawer-open .site-header { z-index: 125; position: sticky; }
  body.drawer-open .site-header::after { content: ""; position: absolute; inset: 0; background: rgba(15, 30, 45, 0.45); pointer-events: none; }

  /* ── 前台電腦版在窄螢幕：首頁場地卡與消息列改單欄（原本只有 mobile-mode 有這組規則） ── */
  .home-venue-cards { grid-template-columns: 1fr; }
  .ct-news-row { grid-template-columns: 1fr auto; }
  .ct-news-row time { grid-column: 1; }
  .ct-news-row .ct-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .ct-news-row strong { grid-column: 1 / -1; }

  .member-booking-card, .member-booking-detail, .booking-message-thread, .booking-question-form, .profile-card, .upcoming-booking, .member-alert-banner { max-width: 100%; min-width: 0; overflow: hidden; }
  .member-booking-card summary > *, .member-booking-detail *, .booking-message * { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
  .summary-list, .summary-list div { grid-template-columns: 1fr; }

  /* ── CRM：側欄→左側抽屜、上方標題列、底部分頁列 ── */
  .desktop-mode .crm-main { width: calc(100% - 20px); }
  body.crm-page .site-main { padding-bottom: 8px; }
  body.crm-page .site-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .crm-shell { grid-template-columns: 1fr; gap: 12px; margin: 10px 0 16px; }
  .crm-mbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 56px; z-index: 25; margin: 0 -10px; padding: 8px 12px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .crm-menu-btn { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 10px; background: #10263c; color: #fff; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }
  .crm-menu-btn[aria-expanded="true"] { background: var(--brand); }
  .crm-mbar-title { flex: 1 1 auto; min-width: 0; font-size: 16px; color: #16324f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crm-mbar-home { flex: 0 0 auto; font-size: 13px; font-weight: 800; color: var(--brand); white-space: nowrap; }
  .crm-sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 130; width: min(320px, 86vw); max-height: none; margin: 0; padding: 0 12px calc(24px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: 12px 0 40px rgba(15, 30, 45, 0.25); transform: translateX(-105%); transition: transform 0.22s ease; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .crm-sidebar.is-open { transform: none; }
  .crm-sidebar > strong { display: none; }
  .crm-sidebar .crm-role-tag { margin: 6px 0 4px; }
  .crm-sidebar a { display: flex; align-items: center; min-height: 46px; font-size: 15.5px; }
  .crm-sidebar > a:first-of-type { min-height: 48px; }
  .crm-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 30, 45, 0.08); }
  .crm-tabbar a, .crm-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 6px 2px; border: 0; border-radius: 10px; background: transparent; color: #62707c; font: inherit; font-size: 11.5px; font-weight: 800; line-height: 1.1; text-decoration: none; cursor: pointer; white-space: nowrap; }
  .crm-tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .crm-tabbar a.active { color: var(--brand); background: #e8f4fd; }
  .crm-tabbar button:hover, .crm-tabbar a:hover { color: var(--brand); background: #f1f6fb; }
  body.drawer-open .crm-tabbar { z-index: 100; }

  /* ── CRM 內容：標題列、篩選列、清單列改單欄 ── */
  .crm-content .section-title-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .crm-content .section-title-row h1 { font-size: 22px; margin: 0; }
  .crm-content .section-title-row > span { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
  .crm-panel { padding: 14px 12px; }
  .stats-range-bar, .booking-filter-bar, .rc-filter-bar { gap: 8px 10px; padding: 10px 12px; }
  .booking-filter-count { flex-basis: 100%; }
  .booking-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; }
  .booking-row-main { flex: 1 1 60%; }
  .booking-row-event { white-space: normal; }
  .booking-row-go { order: 3; }
  .booking-row-when { order: 4; flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
  .booking-row-flags { order: 5; }
  .booking-row .kpi-category-chip { order: 6; }
  .pending-zone { padding: 12px 12px 14px; }
  .crm-manual-booking { padding: 10px 12px; }
  .crm-manual-booking-form { grid-template-columns: 1fr 1fr; }
  .crm-manual-booking-form .crm-manual-note, .crm-manual-booking-form .crm-manual-hold, .crm-manual-booking-form button { grid-column: 1 / -1; }

  /* ── 營運日曆：月曆格子藏起來，改用逐日行程清單 ── */
  .crm-calendar-panel .operations-calendar-weekdays, .crm-calendar-panel .operations-calendar-grid, .crm-calendar-panel .kpi-cal-legend { display: none; }
  .crm-calendar-toolbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .crm-calendar-toolbar-actions { flex-wrap: wrap; }
  .crm-calendar-controls { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
  .crm-calendar-controls .calendar-jump-form { grid-column: 1 / -1; order: -1; display: flex; gap: 8px; align-items: center; }
  .crm-calendar-controls .calendar-jump-form label { flex: 1 1 auto; }
  .crm-calendar-controls .calendar-jump-form input[type="month"] { width: 100%; min-width: 0; font-size: 17px; }
  .crm-calendar-controls .calendar-nav { text-align: center; justify-content: center; }
  .calendar-export-bar { gap: 8px; }
  .calendar-export-bar .calendar-nav { flex: 1 1 45%; text-align: center; }
  .calendar-import-box { flex-basis: 100%; }
  .ops-agenda { display: block; margin-top: 12px; }
  .ops-agenda-hint { margin: 0 0 10px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
  .ops-agenda-day { border: 1px solid #e3e8ee; border-radius: 12px; background: #fff; padding: 8px 10px 10px; margin-bottom: 8px; scroll-margin-top: 120px; }
  .ops-agenda-day.is-today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(20, 86, 160, 0.12); }
  .ops-agenda-day.is-past { opacity: 0.78; }
  .ops-agenda-day.is-closed { background: #f4f6f8; }
  .ops-agenda-day.is-empty { padding: 6px 10px; }
  .ops-agenda-head { display: flex; align-items: center; gap: 8px; }
  .ops-agenda-head strong { font-size: 22px; line-height: 1; color: #16324f; min-width: 30px; }
  .ops-agenda-day.is-today .ops-agenda-head strong { color: var(--brand); }
  .ops-agenda-date { font-size: 13px; font-weight: 800; color: #46535e; }
  .ops-agenda-head .operation-badge { font-style: normal; }
  .ops-agenda-all { margin-left: auto; padding: 6px 10px; border: 1px solid #c8d4e0; border-radius: 999px; background: #fff; color: var(--brand); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
  .ops-agenda-closure { margin: 6px 0 0 38px; font-size: 12.5px; color: #62707c; }
  .ops-agenda-empty { margin: 2px 0 0 38px; font-size: 12.5px; color: #9aa6b1; }
  .ops-agenda-item { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; overflow: hidden; margin-top: 8px; padding: 9px 10px; border: 1px solid #e3e8ee; border-left-width: 5px; border-radius: 10px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  /* 多時段：每個時段各自一行往下排（不橫向串接，才不會把標題欄擠成直排、撐出橫向捲軸） */
  .ops-agenda-item time { grid-row: 1 / span 3; align-self: start; display: grid; gap: 2px; font-size: 13px; font-weight: 800; color: var(--brand); white-space: nowrap; padding-top: 2px; }
  .ops-agenda-item time span { display: block; line-height: 1.4; }
  .ops-agenda, .ops-agenda-day { min-width: 0; max-width: 100%; overflow: hidden; }
  .ops-agenda-item b { font-size: 15px; color: #16324f; overflow-wrap: anywhere; }
  .ops-agenda-item small { font-size: 12px; color: #62707c; overflow-wrap: anywhere; }
  .ops-agenda-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
  .ops-agenda-tags em { font-size: 11px; }
  .ops-agenda-item.activity { border-left-color: #7a4bd3; background: #faf7ff; }
  .ops-agenda-item.activity time { color: #6a3fc0; }
  .ops-agenda-item.booking-status-rejected, .ops-agenda-item.booking-status-cancelled { opacity: 0.6; }
  .ops-agenda-item.kpi-cal-self { border-left-color: #2f8f5b; }
  .ops-agenda-item.kpi-cal-rental { border-left-color: #1c4e80; }
  .ops-agenda-item.kpi-cal-agency { border-left-color: #d08214; }
  .ops-agenda-item.kpi-cal-unknown { border-left-color: #8a97a3; }
  .ops-agenda-item.kpi-cal-breach { border-left-color: #b3261e; }
  .ops-agenda-item.kpi-cal-hold { border-left-style: dashed; }

  /* ── 彈窗：手機一律全螢幕（蓋過各頁內嵌的 .day-schedule-dialog 寬度設定） ── */
  .crm-main dialog.day-schedule-dialog, .crm-main dialog.booking-info-dialog, .crm-main dialog.booking-info-dialog.is-wide, .crm-main dialog.usage-detail-dialog, .crm-main dialog.identity-rate-dialog {
    width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; border-radius: 0; box-sizing: border-box; padding: 10px 12px calc(28px + env(safe-area-inset-bottom));
  }
  .crm-main dialog.crm-pending-notice { width: min(420px, 92vw); height: fit-content; max-height: 84vh; margin: auto; border-radius: 14px; padding: 20px 18px; }
  .crm-main dialog.booking-info-dialog .day-schedule-head { top: -10px; margin: -10px 0 10px; padding: 10px 0; }
  .crm-main .day-schedule-head { flex-wrap: wrap; gap: 8px; }
  .crm-main .day-schedule-head strong { font-size: 15px; overflow-wrap: anywhere; }
  .crm-main .day-schedule-head-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .crm-main .day-schedule-close { min-height: 40px; }
  .crm-main .day-schedule-item time { min-width: 0; }
  .crm-main .day-schedule-venue { min-width: 0; }
  /* 日曆版租借卡：手機上開面板＝整頁切換（總覽隱藏、面板全寬、上方「‹ 總覽」返回） */
  .crm-main .cal-body.is-split { grid-template-columns: 1fr; }
  .crm-main .cal-body.is-split .cal-overview { display: none; }
  .crm-main .cal-side { border: 0; padding: 0; position: static; max-height: none; overflow: visible; }
  .crm-main .cal-side-head { position: sticky; top: 42px; z-index: 4; background: #fff; padding: 6px 0 8px; justify-content: flex-start; }
  .cal-side-back { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px 4px 8px; border: 1px solid #c8d4e0; border-radius: 999px; background: #fff; color: var(--brand); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
  .crm-main .cal-side-close { display: none; }
  .crm-main .cal-actions { grid-template-columns: 1fr; }
  .crm-main .review-todo-list { flex-direction: column; }
  .crm-main .review-todo-list .todo-item { width: 100%; }
  .crm-main .review-meta-line { gap: 4px 14px; }
  .crm-main .unified-actions button { width: 100%; }
  .crm-main .booking-info-dialog .summary-list { grid-template-columns: 1fr; }
  .crm-main .booking-info-dialog .review-items-table, .crm-main .booking-info-dialog .booking-edit-items { min-width: 560px; }

  /* ── 項目表格（審核／使用登記）：手機改成一列一卡、欄名用 data-label 顯示 ── */
  .crm-main table.unified-items, .crm-main table.rc-usage-items { display: block; width: 100%; min-width: 0 !important; border: 0; }
  .crm-main table.unified-items thead, .crm-main table.rc-usage-items thead { display: none; }
  .crm-main table.unified-items tbody, .crm-main table.rc-usage-items tbody { display: block; }
  .crm-main table.unified-items tr, .crm-main table.rc-usage-items tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid #e3e8ee; border-radius: 10px; background: #fff; }
  .crm-main table.unified-items tr.is-pending { border-color: #e0a63b; background: #fffaf0; }
  .crm-main table.unified-items tr.linked-item, .crm-main table.rc-usage-items tr.linked-item { background: #f7f9fb; }
  .crm-main table.unified-items td, .crm-main table.rc-usage-items td { display: block; padding: 0; border: 0; min-width: 0; }
  .crm-main table.unified-items td::before, .crm-main table.rc-usage-items td::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 11px; font-weight: 800; color: #8a97a3; }
  .crm-main table.unified-items td[data-label="項目"], .crm-main table.unified-items td[data-label="狀態"], .crm-main table.rc-usage-items td[data-label="項目"], .crm-main table.rc-usage-items td[data-label="狀態"], .crm-main table.rc-usage-items td[colspan] { grid-column: 1 / -1; }
  .crm-main table.unified-items td select, .crm-main table.rc-usage-items td input { width: 100%; min-height: 44px; font-size: 16px; }

  /* ── 使用紀錄／今日場次卡片 ── */
  .rc-usage-card summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px; }
  .rc-usage-card summary .rc-usage-main { flex: 1 1 100%; order: 3; }
  .rc-usage-card summary .rc-usage-main strong { font-size: 16px; }
  .rc-usage-card summary time { order: 2; }
  .rc-usage-card summary .review-status { order: 1; }
  .rc-usage-card summary .kpi-category-chip { order: 4; }
  .rc-usage-card summary .rc-usage-actual { order: 5; }
  .rc-usage-card summary .tap-hint { order: 6; margin-left: auto; }
  .rc-usage-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .rc-usage-quick form { display: contents; }
  .rc-usage-quick button { width: 100%; min-height: 48px; font-size: 15px; }
  .rc-usage-quick .calendar-nav, .rc-usage-quick .empty, .rc-usage-quick .danger-button { grid-column: 1 / -1; margin-left: 0; text-align: center; }
  .rc-usage-grid { grid-template-columns: 1fr 1fr; }
  .rc-usage-grid label { font-size: 14px; }
  .rc-usage-grid input, .rc-usage-grid select, .rc-usage-grid textarea { min-height: 46px; font-size: 16px; }
  .rc-usage-grid label:first-child, .rc-usage-grid label:has(input[name="actual_attendees"]) { grid-column: 1 / -1; }
  .rc-usage-save { display: grid; gap: 6px; }
  .rc-usage-save .primary-action { width: 100%; min-height: 52px; font-size: 17px; }
  .cal-usage-body .rc-usage-quick { grid-template-columns: 1fr; }

  /* ── 營運總覽：卡片單欄、表格可橫向捲動 ── */
  .crm-content .kpi-grid, .crm-content .pb-cards, .crm-content .kpi-cards { grid-template-columns: 1fr; }
  .crm-content .rpt-table-wrap, .crm-content .pb-report-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .crm-content table:not(.unified-items):not(.rc-usage-items) { font-size: 12.5px; }
}

/* 手機殼元件都是 <button>：蓋掉全域 button / button:hover 的品牌藍底白字（含觸控後殘留的 hover） */
button.site-menu-btn, button.site-menu-btn:hover, button.site-menu-btn:focus { background: #fff; color: var(--brand); border-color: #c8d4e0; }
button.site-menu-btn[aria-expanded="true"], button.site-menu-btn[aria-expanded="true"]:hover { background: #e8f4fd; border-color: var(--brand); }
button.site-nav-close, button.site-nav-close:hover, button.site-nav-close:focus { background: #fff; color: #46535e; border-color: #c8d4e0; }
button.crm-menu-btn, button.crm-menu-btn:hover, button.crm-menu-btn:focus { background: #10263c; color: #fff; }
button.crm-menu-btn[aria-expanded="true"] { background: var(--brand); }
.crm-tabbar button, .crm-tabbar button:hover, .crm-tabbar button:focus { background: transparent; color: #62707c; border: 0; }
.crm-tabbar button:hover { color: var(--brand); background: #f1f6fb; }
button.ops-agenda-all, button.ops-agenda-all:hover { background: #fff; color: var(--brand); border-color: #c8d4e0; }
button.ops-agenda-item, button.ops-agenda-item:hover, button.ops-agenda-item:focus { background: #fff; color: inherit; }
button.ops-agenda-item:hover { border-color: var(--brand); background: #f7fbff; }
button.ops-agenda-item.activity, button.ops-agenda-item.activity:hover { background: #faf7ff; }
button.cal-side-back, button.cal-side-back:hover { background: #fff; color: var(--brand); border-color: #c8d4e0; }

/* ══ 空間詳細資訊卡（2026-09-23）：空間頁點卡片 → 相簿輪播＋資料＋介紹＋設備標籤＋影片＋外部連結＋立即租借 ══ */
.venue-detail-dialog { width: min(960px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(15, 30, 45, 0.35); }
.venue-detail-dialog::backdrop { background: rgba(15, 30, 45, 0.55); backdrop-filter: blur(3px); }
.vd-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; max-height: 92vh; background: #fff; }
.vd-close { position: absolute; top: 12px; right: 12px; z-index: 5; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #16324f; font: inherit; font-size: 18px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 14px rgba(15, 30, 45, 0.2); }
button.vd-close:hover { background: #fff; color: var(--brand); }
.vd-media { grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: #0f2236; overflow: auto; min-height: 0; }
.vd-gallery { position: relative; overflow: hidden; border-radius: 12px; background: #16324f; aspect-ratio: 4 / 3; flex: 0 0 auto; }
.vd-slides { display: flex; height: 100%; transition: transform 0.28s ease; }
.vd-slide { flex: 0 0 100%; margin: 0; height: 100%; position: relative; }
.vd-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vd-slide-empty .venue-placeholder { height: 100%; min-height: 0; }
.vd-slide-empty figcaption { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: 13px; font-weight: 700; }
.vd-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.88); color: #16324f; font: inherit; font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
button.vd-nav:hover { background: #fff; color: var(--brand); }
.vd-prev { left: 10px; } .vd-next { right: 10px; }
.vd-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.vd-dots button { width: 9px; height: 9px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.55); cursor: pointer; }
.vd-dots button.is-on, .vd-dots button:hover { background: #fff; }
.vd-counter { position: absolute; top: 10px; left: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 12.5px; font-weight: 800; }
.vd-video { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; flex: 0 0 auto; }
.vd-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vd-body { min-height: 0; overflow: auto; padding: 26px 26px 12px; }
.vd-body .eyebrow { margin: 0 0 4px; }
.vd-body h2 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; color: #16324f; }
.vd-purpose { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.vd-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7fbff; }
.vd-meta div { display: grid; gap: 2px; min-width: 0; }
.vd-meta dt { font-size: 12px; font-weight: 800; color: #8a97a3; }
.vd-meta dd { margin: 0; font-size: 15px; font-weight: 800; color: #1f2d3a; overflow-wrap: anywhere; }
.vd-intro { margin: 0 0 16px; font-size: 15px; line-height: 1.8; color: #2b3a48; }
.vd-section h3 { margin: 0 0 8px; font-size: 13px; font-weight: 900; letter-spacing: 0.06em; color: #46535e; }
.vd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.vd-tags li { padding: 5px 11px; border: 1px solid #c8dcef; border-radius: 999px; background: #eef5fb; color: #1c4e80; font-size: 13px; font-weight: 800; }
.vd-links { display: grid; gap: 8px; margin: 0 0 12px; }
.vd-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--brand); font-weight: 800; text-decoration: none; }
.vd-link:hover { border-color: var(--brand); background: #f7fbff; }
.vd-cta { display: flex; gap: 10px; align-items: center; padding: 14px 26px 18px; border-top: 1px solid var(--line); background: #fff; }
.vd-book { flex: 1 1 auto; min-height: 50px; font-size: 17px; font-weight: 900; }
.vd-book.is-disabled { background: #e6ebf0; color: #8a97a3; border-color: #e6ebf0; cursor: not-allowed; }
.vd-cta .secondary-action { flex: 0 0 auto; }
.space-tile { cursor: pointer; }
@media (max-width: 900px) {
  /* 窄螢幕：整張卡片一欄往下捲（相簿→影片→資料→介紹），「立即租借」固定在底部 */
  .vd-shell { display: flex; flex-direction: column; max-height: 92vh; overflow: auto; -webkit-overflow-scrolling: touch; }
  .vd-media { flex: 0 0 auto; overflow: visible; padding: 10px; }
  .vd-gallery { aspect-ratio: 16 / 10; }
  .vd-body { flex: 1 0 auto; overflow: visible; padding: 18px 18px 10px; }
  .vd-body h2 { font-size: 24px; }
  .vd-cta { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -8px 20px rgba(15, 30, 45, 0.08); }
}
@media (max-width: 760px) {
  dialog.venue-detail-dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .vd-shell { max-height: none; height: 100vh; height: 100dvh; }
  .vd-cta { flex-direction: column; align-items: stretch; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .vd-cta .secondary-action { width: 100%; }
  .vd-meta { grid-template-columns: 1fr 1fr; }
}

/* CRM 場地管理：詳細資訊卡欄位 */
.venue-detail-fields { grid-column: 1 / -1; border: 1px dashed #b8c4cf; border-radius: 10px; padding: 8px 12px; background: #fbfcfd; }
.venue-detail-fields > summary { cursor: pointer; font-weight: 800; color: #1c4e80; font-size: 14px; padding: 4px 0; }
.venue-detail-fields[open] > summary { margin-bottom: 8px; }
.venue-detail-fields label { display: grid; gap: 4px; margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #46535e; }
.venue-detail-fields input, .venue-detail-fields textarea { font-weight: 400; }
.venue-gallery-admin { display: grid; gap: 8px; margin: 0 0 12px; }
.venue-gallery-label { font-size: 13px; font-weight: 700; color: #46535e; }
.venue-gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.venue-gallery-thumb { display: grid; gap: 4px; margin: 0 !important; font-size: 12px; font-weight: 600; }
.venue-gallery-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.venue-gallery-thumb span { display: inline-flex; align-items: center; gap: 4px; }
.venue-admin-card .venue-gallery-thumbs label { grid-column: auto; }
.venue-admin-card .venue-gallery-thumbs img { width: 100%; }
/* ══ 2026-09-23 滿意度雙軌呈現／首頁數據兩步驟／場地可見範圍 ══ */
/* 營運總覽：現場滿意度問卷（兩種口徑並列） */
.sat-grid { grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); align-items: stretch; }
.sat-group { position: relative; display: grid; gap: 12px; padding: 30px 14px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcfd; min-width: 0; }
.sat-group-a { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sat-group-b { background: #eef4fa; border-color: #c9d9e8; }
.sat-group-tag { position: absolute; top: 10px; left: 14px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; font-style: normal; color: #fff; background: #8fa7bd; border-radius: 6px; padding: 2px 9px; }
.sat-group-b .sat-group-tag { background: #1c4e80; }
.kpi-card.sat-card { border-left: 5px solid #8fa7bd; background: #fff; }
.kpi-card.sat-card.sat-b { border-left-color: #1c4e80; }
.kpi-card.sat-card strong { font-size: 26px; }
.kpi-card.sat-card.sat-b strong { font-size: 32px; color: #1c4e80; }
@media (max-width: 900px) { .sat-grid { grid-template-columns: 1fr; } }

/* CRM 首頁數據：兩步驟 */
.hd-step { position: relative; }
.hd-preview-card.is-dim { opacity: 0.45; }
.hd-metric-card.is-agency { background: #eef4fa; border-color: #c9d9e8; }
.hd-metric-card.is-agency.is-on { border-color: #1c4e80; }
.hd-valuebox { border: 1px dashed #ccd4dc; border-radius: 12px; padding: 10px 14px; background: #fbfcfd; max-width: 620px; }
.hd-valuebox summary { cursor: pointer; font-size: 0.9em; color: #46535e; font-weight: 700; }
.hd-valuebox summary b { color: #16324f; }
.hd-valuebox[open] summary { margin-bottom: 8px; }
.hd-valuebox.is-manual { border-style: solid; border-color: #1c4e80; background: #fff; }
.hd-valuebox.is-manual summary { display: none; }
.hd-valuebox .hd-manual span { display: block; }

/* 場地可見範圍：限機關與場館方 */
.venue-restricted-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #fff1dc; color: #9a5b00; border: 1px solid #f0c98a; font-size: 11px; font-style: normal; font-weight: 800; letter-spacing: 0.02em; vertical-align: middle; white-space: nowrap; }
.space-tile .venue-restricted-tag { width: fit-content; margin-left: 0; }
.venue-admin-card label:nth-of-type(9) { grid-column: 1 / -1; }
.venue-admin-card .field-hint { font-size: 12px; color: var(--muted); line-height: 1.6; font-weight: 400; }

/* 空間詳細資訊卡：媒體分頁（照片／360° 環景／影片）與內嵌環景 */
.vd-tabs { display: flex; gap: 6px; padding: 2px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); }
.vd-tabs button, .vd-tabs button:hover { flex: 1 1 0; min-height: 38px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, 0.78); font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.vd-tabs button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.vd-tabs button.is-on, .vd-tabs button.is-on:hover { background: #fff; color: #16324f; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.vd-panel[hidden] { display: none; }
.vd-tour { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.vd-tour iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vd-tour-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin-top: 8px; color: rgba(255, 255, 255, 0.72); font-size: 12.5px; }
.vd-tour-bar a { color: #fff; font-weight: 800; text-decoration: none; padding: 5px 10px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; }
.vd-tour-bar a:hover { background: rgba(255, 255, 255, 0.12); }
@media (max-width: 900px) {
  .vd-tabs button { font-size: 12.5px; padding: 6px 6px; }
  .vd-tour { aspect-ratio: 16 / 11; }
}

/* 首頁數據：卡片即選項（2026-09-23 改回用點的；radio 藏在卡片裡） */
.hd-pick { position: relative; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.hd-pick input[type="radio"] { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.hd-pick:hover { border-color: #9fb6c9; background: #fff; }
.hd-pick:focus-within { outline: 3px solid rgba(28, 78, 128, 0.28); outline-offset: 2px; }
.hd-pick::after { content: "✓"; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: #1c4e80; color: #fff; font-size: 13px; font-weight: 900; line-height: 22px; text-align: center; opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; }
.hd-pick.is-on::after { opacity: 1; transform: scale(1); }
.hd-pick.is-dim { opacity: 0.45; }
.hd-metric-preview { display: grid; gap: 12px; }
.hd-metric-group { display: grid; gap: 6px; }
.hd-metric-group-title { font-size: 12px; font-weight: 800; color: #62707c; letter-spacing: 0.05em; }
.hd-manual-card { border-style: dashed; }
.hd-manual-card.is-on { border-style: solid; }

/* ══ 操作提示 toast：樣式已移到 src/toast.js（與腳本一起輸出，問卷填答頁等沒載入本檔的頁面也能用）══ */

/* 滿意度數字可到小數點後兩位（2026-09-23）：字多時縮小以免撐出環形量表 */
.satisfaction-value.is-mid strong { font-size: 44px; }
.satisfaction-value.is-long strong { font-size: 36px; }
.satisfaction-value.is-long span { font-size: 16px; }
.mobile-mode .satisfaction-value.is-mid strong { font-size: 38px; }
.mobile-mode .satisfaction-value.is-long strong { font-size: 31px; }
.hd-now-gauge strong { font-size: 1.7em; }
.hd-now-gauge strong.is-long { font-size: 1.25em; }

/* ══ CRM 場地管理卡片式三層（2026-09-23）：/crm/venues → /crm/venues/:id → /crm/venues/:id/:section ══ */
.va-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.va-crumbs a { color: var(--brand); text-decoration: none; }
.va-crumbs a:hover { text-decoration: underline; }
.va-crumbs i { font-style: normal; color: #a3adb8; }
.va-crumbs span { color: var(--text); font-weight: 900; }
.va-home .section-title-row span, .va-edit .section-title-row span, .va-venue .section-title-row span { flex: 1 1 100%; margin-top: -6px; font-size: 13px; color: var(--muted); line-height: 1.6; }
/* 第一層：全館設定小卡 */
.va-global { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.va-gcard { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfe; color: var(--text); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.va-gcard:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(20, 86, 160, 0.12); transform: translateY(-1px); }
.va-gicon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #e8f4fd; font-size: 20px; }
.va-gtext { display: grid; gap: 2px; min-width: 0; }
.va-gtext b { font-size: 14.5px; font-weight: 900; }
.va-gtext small { font-size: 12px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.va-gcard > i { margin-left: auto; font-style: normal; font-size: 18px; color: #a3adb8; }
/* 第一層：樓層分組與空間卡 */
.va-floor { display: flex; align-items: baseline; gap: 8px; margin: 24px 0 10px; font-size: 1.08em; color: var(--brand-dark); }
.va-floor small { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.va-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.va-grid .empty { grid-column: 1 / -1; margin: 0; }
.va-card { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); text-decoration: none; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.va-card:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(20, 86, 160, 0.14); transform: translateY(-2px); }
.va-card-media { position: relative; aspect-ratio: 16 / 10; background: #e8f4fd; overflow: hidden; }
.va-card-media img, .va-hero-media img, .va-cover-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.va-card-media .venue-placeholder, .va-hero-media .venue-placeholder, .va-cover-preview .venue-placeholder { min-height: 0; }
.va-card-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.va-badge, .va-state { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; font-size: 11px; font-style: normal; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; line-height: 1.6; }
.va-badge.is-open { background: #e6f6ec; color: #1b7a3d; border-color: #bfe6cc; }
.va-badge.is-closed { background: #fde8e6; color: #b42318; border-color: #f4bfb9; }
.va-badge.is-trial { background: #eef1f5; color: #4b5866; border-color: #d6dde5; }
.va-badge.is-restricted { background: #fff1dc; color: #9a5b00; border-color: #f0c98a; }
.va-card-body { display: grid; gap: 4px; min-width: 0; padding: 12px 14px 6px; }
.va-card-body strong { font-size: 15.5px; font-weight: 900; }
.va-card-meta { font-size: 12.5px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.va-progress { height: 6px; margin-top: 6px; border-radius: 999px; background: #e4eaf1; overflow: hidden; }
.va-progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #2f8f5b); }
.va-progress-text { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.5; }
.va-card-go { padding: 6px 14px 12px; font-size: 13px; font-weight: 800; color: var(--brand); }
/* 第二層：空間總覽 */
.va-hero { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.va-hero-media { aspect-ratio: 4 / 3; border-radius: 12px; background: #e8f4fd; overflow: hidden; border: 1px solid var(--line); }
.va-hero-body { display: grid; gap: 8px; align-content: start; min-width: 0; }
.va-hero-body .eyebrow { margin: 0; }
.va-hero-body h1 { margin: 0; font-size: 1.5em; line-height: 1.3; }
.va-hero-body h1 small { display: inline-block; margin-left: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.va-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.va-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.va-hero-actions .secondary-action { min-height: 38px; padding: 6px 14px; font-size: 13.5px; }
.va-venue .notice { margin-top: 14px; }
.va-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-top: 18px; }
.va-sec { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.va-sec:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(20, 86, 160, 0.14); transform: translateY(-2px); }
.va-sec.is-danger { border-color: #f0c2bd; background: #fffafa; }
.va-sec.is-danger:hover { border-color: #b42318; box-shadow: 0 10px 26px rgba(180, 35, 24, 0.12); }
.va-sec-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.va-sec-icon { font-size: 19px; line-height: 1; }
.va-sec-head b { font-size: 15.5px; font-weight: 900; }
.va-sec-head .va-state { margin-left: auto; }
.va-state.is-ok { background: #e6f6ec; color: #1b7a3d; border-color: #bfe6cc; }
.va-state.is-todo { background: #fff1dc; color: #9a5b00; border-color: #f0c98a; }
.va-state.is-readonly { background: #eef1f5; color: #4b5866; border-color: #d6dde5; }
.va-state.is-danger { background: #fde8e6; color: #b42318; border-color: #f4bfb9; }
.va-sec-lines { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); font-weight: 600; line-height: 1.55; }
.va-sec-lines li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.va-sec-go { font-size: 13px; font-weight: 800; color: var(--brand); }
.va-sec.is-danger .va-sec-go { color: #b42318; }
/* 第三層：分區編輯表單 */
.va-h1-venue { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.va-form { display: grid; gap: 16px; max-width: 960px; margin-top: 14px; }
.va-form > label, .va-form-grid > label, .va-block > label, .va-cover-fields > label { display: grid; gap: 6px; min-width: 0; font-size: 14px; font-weight: 700; color: #46535e; }
.va-form input, .va-form select, .va-form textarea { width: 100%; min-width: 0; font-weight: 400; color: var(--text); }
.va-form input[type="file"] { max-width: 100%; white-space: normal; }
.va-form input[type="checkbox"], .va-form input[type="radio"] { width: 18px; min-width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; }
.va-form .period-checkbox input[type="checkbox"] { width: 18px; }
.va-form input[readonly], .va-form select:disabled, .va-form input:disabled, .va-form textarea:disabled { background: #f3f5f8; color: #6b7785; }
.va-form .field-hint { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.6; }
.va-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.va-block { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.va-block h3 { margin: 0; font-size: 15.5px; font-weight: 900; color: var(--brand-dark); }
.va-block h3 small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--muted); line-height: 1.6; }
.va-block.is-danger { border-color: #f0c2bd; background: #fffafa; }
.va-block.is-danger h3 { color: #b42318; }
.va-block .empty { margin: 0; font-size: 13px; }
.va-cover-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: start; }
.va-cover-preview { aspect-ratio: 4 / 3; border-radius: 10px; border: 1px solid var(--line); background: #e8f4fd; overflow: hidden; }
.va-cover-fields { display: grid; gap: 10px; }
.va-check { display: flex !important; align-items: center; gap: 8px; font-weight: 700; }
.va-check input[type="checkbox"] { width: 18px; min-width: 18px; }
.va-form .time-rule-fieldset { margin: 0; }
.va-form .time-rule-fieldset input[type="radio"] { width: 16px; min-width: 16px; height: 16px; margin: 0; }
.va-form .venue-gallery-thumbs label { font-weight: 600; }
.va-tags-preview { margin: -6px 0 0; }
.va-tags-preview:empty::before { content: "（還沒有設備／設施）"; font-size: 13px; color: var(--muted); }
.va-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.va-actions .primary-action, .va-actions .secondary-action { min-height: 42px; }
.va-actions .empty { margin: 0; font-size: 13.5px; }
.va-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.va-table th, .va-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.va-table th { background: #f3f7fb; font-size: 13px; color: #46535e; }
.va-table tbody tr:last-child td { border-bottom: 0; }
.va-layout .venue-map-editor { margin-top: 14px; }
@media (max-width: 760px) {
  nav.va-crumbs { flex-direction: row; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; }
  .va-global { grid-template-columns: 1fr; }
  .va-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .va-card-body { padding: 10px 10px 4px; }
  .va-card-body strong { font-size: 14px; }
  .va-card-meta, .va-progress-text { font-size: 11.5px; white-space: normal; }
  .va-card-go { padding: 4px 10px 10px; font-size: 12.5px; }
  .va-hero { grid-template-columns: 1fr; gap: 12px; }
  .va-hero-media { max-height: 220px; }
  .va-hero-body h1 { font-size: 1.3em; }
  .va-hero-actions .secondary-action { flex: 1 1 auto; }
  .va-sections { grid-template-columns: 1fr; gap: 10px; }
  .va-sec-lines li { white-space: normal; }
  .va-form-grid, .va-cover-row { grid-template-columns: 1fr; }
  .va-cover-preview { max-width: 240px; }
  .va-actions .primary-action, .va-actions .secondary-action { flex: 1 1 auto; }
  .va-table { font-size: 13px; }
  .va-table th, .va-table td { padding: 7px 6px; }
}

/* ══ 頁尾改版（2026-09-24）══
   順序（各尺寸一致）：場館地址（Google Map／Apple Map 導航）→ 營業時間 → 聯絡方式 → 網站聲明（最右邊）；最下方版權列。
   桌機 ≥1241px 四欄；761–1240px 兩欄 2×2；手機（≤760px 或 /mobile）卡片式，≤560px 直排；聲明卡片在手機由下往上滑出。 */
.site-footer {
  display: block;
  width: auto;
  margin: 44px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}
.site-footer::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--brand), var(--accent, #3ba5df) 55%, rgba(59, 165, 223, 0)); }
.sf-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 0.9fr);
  gap: 24px 36px;
  align-items: start;
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 24px;
}
.sf-icon { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sf-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-footer .sf-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  margin: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.sf-link .sf-icon { width: 16px; height: 16px; color: var(--brand); }
.sf-link:hover, .sf-link:focus-visible { color: var(--brand-dark); }
.sf-link:hover > span:not(.sf-chev) { text-decoration: underline; text-underline-offset: 3px; }
.sf-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sf-chev { position: relative; top: -1px; color: #9aabbd; font-size: 19px; line-height: 1; transition: transform 0.15s ease, color 0.15s ease; }
.sf-link:hover .sf-chev { color: var(--brand); transform: translateX(3px); }
/* 場館地址＋導航 */
.sf-address { margin: 0 0 12px; color: #33475b; font-size: 15px; line-height: 1.65; }
.sf-nowrap { white-space: nowrap; }
.sf-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid #c9dcef;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}
.sf-nav-btn .sf-icon { width: 14px; height: 14px; color: var(--brand); }
.sf-nav-btn:hover, .sf-nav-btn:focus-visible { border-color: var(--brand); background: var(--brand); color: #fff; }
.sf-nav-btn:hover .sf-icon, .sf-nav-btn:focus-visible .sf-icon { color: #fff; }
.sf-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6eef6;
  color: var(--brand-dark);
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.sf-title .sf-icon { color: var(--brand); }
.sf-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sf-row { display: flex; align-items: baseline; color: #33475b; font-size: 15px; line-height: 1.55; }
.sf-row > .sf-k, .sf-row > .sf-sep { flex: 0 0 auto; }
.sf-row > .sf-v { flex: 1 1 auto; min-width: 0; }
.sf-row[hidden], .sf-line-btn[hidden] { display: none; }
.sf-k { color: var(--text); font-weight: 800; }
.sf-sep { margin: 0 0.3em; color: #a9b8c7; font-weight: 400; }
.sf-v { font-variant-numeric: tabular-nums; }
a.sf-tel { color: inherit; text-decoration: none; }
a.sf-tel:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
/* 聯絡方式：標籤分散對齊到同寬（「市　話｜」與「Line客服｜」的｜上下對齊），內容欄也對齊。
   用 subgrid 讓各行共用同一組欄寬；不支援 subgrid 的舊瀏覽器退回固定 4.6em 標籤寬。 */
.sf-contact .sf-rows { grid-template-columns: max-content auto minmax(0, 1fr); }
.sf-contact .sf-row { display: grid; grid-column: 1 / -1; grid-template-columns: 4.6em auto minmax(0, 1fr); grid-template-columns: subgrid; align-items: baseline; }
.sf-contact .sf-row[hidden] { display: none; }
.sf-contact .sf-k { text-align: justify; text-align-last: justify; text-justify: inter-character; }
.sf-contact .sf-row > .sf-v { justify-self: start; }
/* 休館：紅字＋淡紅底，提醒效果 */
.sf-row.is-closed { justify-self: start; margin-left: -10px; padding: 3px 10px; border-radius: 8px; background: #fdeeee; box-shadow: inset 0 0 0 1px #f6d0d2; }
.sf-row.is-closed .sf-k, .sf-row.is-closed .sf-v { color: #c0262d; }
.sf-row.is-closed .sf-sep { color: #e4a0a3; }
.sf-line-btn {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  padding: 1px 11px;
  border-radius: 999px;
  background: #06c755;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.75;
  white-space: nowrap;
  text-decoration: none;
}
.sf-line-btn:hover, .sf-line-btn:focus-visible { background: #05a847; color: #fff; }
/* 信箱：只給按鈕（原始碼不出現 email），點了開郵件程式 */
.site-footer .sf-mail-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 0;
  margin: 0;
  padding: 1px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.75;
  white-space: nowrap;
  cursor: pointer;
}
.site-footer .sf-mail-btn .sf-icon { width: 14px; height: 14px; }
.site-footer .sf-mail-btn:hover, .site-footer .sf-mail-btn:focus-visible { background: var(--brand-dark); }
.thh-toast .sf-copy-btn { min-height: 0; margin-left: 4px; padding: 1px 9px; border: 1px solid currentColor; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.site-footer .site-footer-copyright {
  flex-basis: auto;
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 14px 0 22px;
  border-top: 1px solid #e6eef6;
  color: #8494a3;
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}
/* 聲明彈出卡片 */
.sf-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: min(86vh, 880px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 30px 80px rgba(15, 30, 45, 0.35);
  overflow: hidden;
}
.sf-dialog[open] { display: flex; flex-direction: column; }
.sf-dialog::backdrop { background: rgba(15, 30, 45, 0.55); backdrop-filter: blur(3px); }
.sf-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f3f8fd, #fff); }
.sf-dialog-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font-size: 19px; line-height: 1.4; }
.sf-dialog-head .sf-icon { width: 22px; height: 22px; color: var(--brand); }
.sf-dialog .sf-dialog-x { flex: 0 0 auto; width: 38px; height: 38px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: #eef4fa; color: #16324f; font-size: 16px; font-weight: 900; cursor: pointer; }
.sf-dialog .sf-dialog-x:hover, .sf-dialog .sf-dialog-x:focus-visible { background: #dde9f5; color: var(--brand); }
.sf-dialog-body { flex: 1 1 auto; min-height: 0; padding: 18px 26px 22px; overflow: auto; overscroll-behavior: contain; font-size: 15.5px; line-height: 1.85; }
.sf-dialog-body.ct-body > * + * { margin-top: 0.7em; }
.sf-dialog-body.ct-body h2 { margin: 1.3em 0 0.45em; border-left-width: 4px; font-size: 17px; }
.sf-dialog-body.ct-body > h2:first-child { margin-top: 0; }
.sf-dialog-foot { display: flex; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.sf-dialog-foot .primary-action { min-width: 120px; border: 0; cursor: pointer; }
.mobile-mode .sf-dialog-foot .primary-action { min-height: 48px; font-size: 16px; }
body:has(dialog.sf-dialog[open]) { overflow: hidden; }

/* 中型寬度（平板橫向／小筆電）：改 2×2（場館地址｜營業時間，聯絡方式｜網站聲明），避免各欄被擠斷 */
@media (min-width: 761px) and (max-width: 1240px) {
  .sf-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 40px; }
}
/* 手機版頁尾：/mobile（任何寬度）與窄螢幕共用 */
.mobile-mode .site-footer { margin-top: 32px; }
.mobile-mode .sf-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; width: min(760px, calc(100% - 20px)); padding: 18px 0 16px; }
.mobile-mode .sf-list { gap: 0; }
.mobile-mode .sf-list > li + li { border-top: 1px solid #e6eef6; }
.mobile-mode .site-footer .sf-mail-btn, .mobile-mode .sf-line-btn { padding: 3px 12px; font-size: 13.5px; }
.mobile-mode .sf-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mobile-mode .sf-nav-btn { min-height: 44px; padding: 8px 10px; font-size: 14px; }
.mobile-mode .sf-block { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #f7fbff; }
.mobile-mode .sf-title { margin-bottom: 10px; padding-bottom: 8px; }
.mobile-mode .site-footer .sf-link { min-height: 46px; gap: 10px; font-size: 16px; }
.mobile-mode .sf-chev { margin-left: auto; }
.mobile-mode .sf-address { margin-bottom: 12px; }
.mobile-mode a.sf-tel { color: var(--brand-dark); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(47, 128, 201, 0.35); text-underline-offset: 3px; }
.mobile-mode .site-footer .site-footer-copyright { width: min(760px, calc(100% - 20px)); padding-bottom: 18px; }
@media (max-width: 760px) {
  .site-footer { margin-top: 32px; }
  .sf-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; width: calc(100% - 24px); padding: 18px 0 16px; }
  .sf-list { gap: 0; }
  .sf-list > li + li { border-top: 1px solid #e6eef6; }
  .site-footer .sf-mail-btn, .sf-line-btn { padding: 3px 12px; font-size: 13.5px; }
  .sf-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sf-nav-btn { min-height: 44px; padding: 8px 10px; font-size: 14px; }
  .sf-block { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #f7fbff; }
  .sf-title { margin-bottom: 10px; padding-bottom: 8px; }
  .site-footer .sf-link { min-height: 46px; gap: 10px; font-size: 16px; }
  .sf-chev { margin-left: auto; }
  .sf-address { margin-bottom: 12px; }
  a.sf-tel { color: var(--brand-dark); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(47, 128, 201, 0.35); text-underline-offset: 3px; }
  .site-footer .site-footer-copyright { width: calc(100% - 24px); padding-bottom: 18px; }
}
@media (max-width: 560px) {
  .sf-inner, .mobile-mode .sf-inner { grid-template-columns: minmax(0, 1fr); }
  .sf-dialog { width: 100vw; max-width: 100vw; max-height: 88vh; max-height: 88dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .sf-dialog-head { padding: 12px 10px 10px 18px; }
  .sf-dialog-head h2 { font-size: 17.5px; }
  .sf-dialog-body { padding: 14px 18px 18px; font-size: 15px; }
  .sf-dialog-foot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
  .sf-dialog-foot .primary-action { width: 100%; }
}

/* 頁面文字管理：電話欄位（號碼＋顯示格式） */
.stp-tel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 10px; align-items: end; }
.stp-tel-format { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.stp-tel-format select { width: 100%; font-size: 14px; }
.stp-tel-out { margin: 0; color: #43525f; font-size: 13px; }
.stp-tel-out b { color: #16324f; font-size: 14.5px; }
.stp-tel-bad { color: var(--danger, #a11616); font-weight: 700; }
@media (max-width: 720px) { .stp-tel { grid-template-columns: 1fr; } }

/* ══ 首頁改版（2026-09-24）：指標帶雙量表（滿意度＋客家青年使用比例）、常用服務＋5F／6F 空間一覽、資訊區分頁 ══ */
.home-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 指標帶 ── */
.satisfaction-band.metrics-band { grid-template-columns: minmax(0, 1fr); gap: 0; }
.satisfaction-band.metrics-band.is-dual { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); column-gap: 40px; }
.metrics-band .metric-item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 30px; min-width: 0; }
.metrics-band .metric-divider { position: relative; align-self: stretch; margin: 4px 0; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.42) 22%, rgba(255, 255, 255, 0.42) 78%, transparent); }
/* 數字在環內置中：整組（數字＋%）用 flex 垂直水平置中、% 對齊數字基線（原本靠 padding-top 往下推，字縮小就偏上） */
.metrics-band .satisfaction-value,
.mobile-mode .metrics-band .satisfaction-value { align-items: center; justify-content: center; padding: 0; }
.metrics-band .sv-num { display: inline-flex; align-items: baseline; line-height: 1; transform: translateY(0.04em); }
.metrics-band .sv-num strong { line-height: 1; }
.metrics-band .satisfaction-mood { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; line-height: 1.6; }
.metrics-band .satisfaction-mood em { flex: none; }
.metrics-band .mood-sep { font-style: normal; }
.metrics-band .satisfaction-note { text-wrap: pretty; }
.metrics-band.is-dual .satisfaction-note { max-width: none; }
.metrics-band.is-dual .satisfaction-gauge { width: 156px; height: 156px; }
.metrics-band.is-dual .satisfaction-value strong { font-size: 48px; }
.metrics-band.is-dual .satisfaction-value.is-mid strong { font-size: 41px; }
.metrics-band.is-dual .satisfaction-value.is-long strong { font-size: 34px; }
.metrics-band.is-dual .satisfaction-value span { font-size: 18px; }
.metrics-band.is-dual .satisfaction-value.is-long span { font-size: 15px; }
.metrics-band.is-dual .satisfaction-copy h2 { font-size: clamp(24px, 2.4vw, 32px); }
.metrics-band .metric-youth .satisfaction-mood em { background: rgba(134, 227, 187, 0.22); border-color: rgba(134, 227, 187, 0.6); }

@media (max-width: 1100px) {
  .satisfaction-band.metrics-band.is-dual { column-gap: 26px; padding: 26px 26px; }
  .metrics-band.is-dual .metric-item { gap: 14px 20px; }
  .metrics-band.is-dual .satisfaction-gauge { width: 132px; height: 132px; }
  .metrics-band.is-dual .satisfaction-value strong { font-size: 40px; }
  .metrics-band.is-dual .satisfaction-value.is-mid strong { font-size: 34px; }
  .metrics-band.is-dual .satisfaction-value.is-long strong { font-size: 28px; }
  .metrics-band.is-dual .satisfaction-value span { font-size: 15px; }
  .metrics-band.is-dual .satisfaction-note { font-size: 13px; }
}
@media (max-width: 860px) and (min-width: 641px) {
  .satisfaction-band.metrics-band.is-dual { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .metrics-band.is-dual .metric-divider { height: 1px; margin: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42) 15%, rgba(255, 255, 255, 0.42) 85%, transparent); }
}
/* 手機版（/mobile）與窄螢幕：兩個量表左右兩欄、上下排列的精簡版 */
.mobile-mode .metrics-band .metric-item { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; }
.mobile-mode .metrics-band .satisfaction-mood { justify-content: center; }
.mobile-mode .satisfaction-band.metrics-band.is-dual { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); column-gap: 12px; padding: 22px 12px; justify-items: stretch; }
.mobile-mode .metrics-band.is-dual .metric-item { gap: 10px; align-content: start; }
.mobile-mode .metrics-band.is-dual .satisfaction-gauge { width: 118px; height: 118px; }
.mobile-mode .metrics-band.is-dual .satisfaction-value strong { font-size: 34px; }
.mobile-mode .metrics-band.is-dual .satisfaction-value.is-mid strong { font-size: 29px; }
.mobile-mode .metrics-band.is-dual .satisfaction-value.is-long strong { font-size: 24px; }
.mobile-mode .metrics-band.is-dual .satisfaction-value span { font-size: 13px; }
.mobile-mode .metrics-band.is-dual .satisfaction-copy .eyebrow { font-size: 10px; letter-spacing: 0.12em; margin-bottom: 2px; }
.mobile-mode .metrics-band.is-dual .satisfaction-copy h2 { font-size: 17px; margin-bottom: 6px; }
.mobile-mode .metrics-band.is-dual .satisfaction-mood { flex-direction: column; gap: 4px; font-size: 12px; margin: 0; }
.mobile-mode .metrics-band.is-dual .satisfaction-mood em { font-size: 12px; padding: 1px 9px; }
.mobile-mode .metrics-band.is-dual .satisfaction-mood span { color: rgba(255, 255, 255, 0.8); line-height: 1.45; }
.mobile-mode .metrics-band.is-dual .satisfaction-note { display: none; }
.mobile-mode .metrics-band.is-dual .mood-sep { display: none; }
@media (max-width: 640px) {
  .metrics-band .metric-item { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; }
  .metrics-band .satisfaction-mood { justify-content: center; }
  .satisfaction-band.metrics-band.is-dual { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); column-gap: 12px; padding: 22px 12px; justify-items: stretch; }
  .metrics-band.is-dual .metric-item { gap: 10px; align-content: start; }
  .metrics-band.is-dual .satisfaction-gauge { width: 118px; height: 118px; }
  .metrics-band.is-dual .satisfaction-value strong { font-size: 34px; }
  .metrics-band.is-dual .satisfaction-value.is-mid strong { font-size: 29px; }
  .metrics-band.is-dual .satisfaction-value.is-long strong { font-size: 24px; }
  .metrics-band.is-dual .satisfaction-value span { font-size: 13px; }
  .metrics-band.is-dual .satisfaction-copy .eyebrow { font-size: 10px; letter-spacing: 0.12em; margin-bottom: 2px; }
  .metrics-band.is-dual .satisfaction-copy h2 { font-size: 17px; margin-bottom: 6px; }
  .metrics-band.is-dual .satisfaction-mood { flex-direction: column; gap: 4px; font-size: 12px; margin: 0; }
  .metrics-band.is-dual .satisfaction-mood em { font-size: 12px; padding: 1px 9px; }
  .metrics-band.is-dual .satisfaction-mood span { color: rgba(255, 255, 255, 0.8); line-height: 1.45; }
  .metrics-band.is-dual .satisfaction-note { display: none; }
  .metrics-band.is-dual .mood-sep { display: none; }
}

/* ── 常用服務＋5F／6F 空間一覽 ── */
.home-guide-band { display: grid; grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.62fr); gap: 26px 34px; align-items: start; }
.home-guide, .home-spaces { min-width: 0; }
.home-block-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.home-block-head .eyebrow { margin: 0 0 4px; }
.home-block-head h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.home-guide-tagline, .home-spaces-intro { margin: -2px 0 14px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.home-spaces-intro:empty { display: none; }
.home-guide-links { display: grid; gap: 10px; }
.home-guide-link {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 14px; align-items: center; gap: 14px;
  padding: 13px 16px; border: 1px solid #c9d8e6; border-radius: 10px; background: #fff; color: var(--text); text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.home-guide-link:hover, .home-guide-link:focus-visible { transform: translateY(-1px); border-color: var(--brand); box-shadow: 0 10px 24px rgba(22, 58, 95, 0.13); }
.home-guide-link:focus-visible { outline: 3px solid rgba(28, 78, 128, 0.35); outline-offset: 2px; }
.home-guide-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #e8f1fb; color: var(--brand); font-style: normal; }
.home-guide-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-guide-text { display: grid; gap: 2px; min-width: 0; }
.home-guide-text strong { font-size: 17px; line-height: 1.3; }
.home-guide-text small { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.home-guide-go { color: var(--brand); font-size: 22px; line-height: 1; font-weight: 700; }
/* 第一個入口（租借場地）是主要行動：品牌藍實心 */
.home-guide-link:first-child { background: var(--brand); border-color: var(--brand); color: #fff; }
.home-guide-link:first-child:hover, .home-guide-link:first-child:focus-visible { background: var(--brand-dark); border-color: var(--brand-dark); }
.home-guide-link:first-child .home-guide-icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.home-guide-link:first-child .home-guide-text small { color: rgba(255, 255, 255, 0.84); }
.home-guide-link:first-child .home-guide-go { color: #fff; }
.home-spaces-more { min-height: 38px; padding: 8px 14px; border: 1px solid #c9d8e6; background: #fff; color: var(--brand); text-decoration: none; }
.home-spaces-more:hover, .home-spaces-more:focus-visible { background: var(--brand); border-color: var(--brand); color: #fff; }

.home-guide-band .home-venue-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.home-guide-band .home-floor-card { min-height: 0; max-height: none; grid-template-rows: auto auto; align-content: start; padding: 14px; overflow: visible; }
.home-guide-band .home-floor-head { align-items: baseline; margin-bottom: 10px; }
.home-guide-band .home-floor-head strong { font-size: 22px; }
.home-guide-band .home-floor-head span { font-size: 13px; }
.home-guide-band .home-floor-tiles { grid-auto-rows: auto; gap: 6px; overflow: visible; }
.home-guide-band .home-floor-tile {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; align-items: center; gap: 12px;
  min-height: 44px; padding: 8px 12px; text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.home-guide-band .home-floor-tile:hover, .home-guide-band .home-floor-tile:focus-visible { border-color: var(--brand); background: #fff; box-shadow: 0 6px 16px rgba(22, 58, 95, 0.12); }
.home-guide-band .home-floor-tile:focus-visible { outline: 3px solid rgba(28, 78, 128, 0.35); outline-offset: 2px; }
.home-guide-band .home-floor-tile span.home-floor-name { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text); font-weight: inherit; margin: 0; }
.home-floor-name strong { min-width: 0; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-floor-name em { flex: none; font-style: normal; font-size: 11px; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 999px; }
.home-floor-paused { color: #9a5b00; background: #fff4de; border: 1px solid #f1d49b; }
/* 人數欄：「可容納」｜數字（固定寬度靠右）｜「人」，每列同一條格線，上下對齊 */
.home-guide-band .home-floor-tile span.home-floor-cap { display: grid; grid-template-columns: auto calc(var(--cap-digits, 2) * 1ch + 0.15ch) auto; align-items: baseline; column-gap: 4px; margin: 0; font-size: 17px; color: var(--brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-floor-cap small { font-size: 12px; font-weight: 700; color: var(--muted); }
.home-floor-cap b { font-weight: 900; text-align: right; }
.home-floor-go { font-style: normal; color: var(--brand); font-size: 19px; font-weight: 700; line-height: 1; justify-self: end; }

@media (max-width: 1080px) {
  .home-guide-band { grid-template-columns: minmax(0, 1fr); }
  .home-guide-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-guide-band .home-venue-cards { grid-template-columns: minmax(0, 1fr); }
}
.mobile-mode .home-guide-band { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; gap: 22px; }
.mobile-mode .home-guide-band .home-venue-cards { grid-template-columns: minmax(0, 1fr); }
/* 手機：常用服務 2×2 方塊（圖示在上） */
.mobile-mode .home-guide-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mobile-mode .home-guide-link { grid-template-columns: 1fr; justify-items: start; align-content: start; gap: 10px; padding: 14px; }
.mobile-mode .home-guide-link .home-guide-go { display: none; }
.mobile-mode .home-guide-icon { width: 40px; height: 40px; }
.mobile-mode .home-guide-text strong { font-size: 17px; }
.mobile-mode .home-guide-text small { font-size: 13px; }
.mobile-mode .home-block-head h2 { font-size: 22px; }
.mobile-mode .home-spaces-more { min-height: 36px; padding: 6px 12px; font-size: 14px; }
@media (max-width: 640px) {
  .home-guide-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-guide-link { grid-template-columns: 1fr; justify-items: start; align-content: start; gap: 10px; padding: 14px; }
  .home-guide-link .home-guide-go { display: none; }
}

/* ── 資訊區：最新消息／近期活動／市政宣導分頁 ── */
.home-info-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.home-info-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #dbe5ef; border-radius: 999px; background: #eef3f8; }
.home-info-tabs button { min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: #4a5a6a; font-size: 15.5px; font-weight: 800; white-space: nowrap; }
.home-info-tabs button:hover { background: #fff; color: var(--brand); }
.home-info-tabs button[aria-selected="true"], .home-info-tabs button[aria-selected="true"]:hover { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(20, 86, 160, 0.25); }
.home-info-tabs button:focus-visible { outline: 3px solid rgba(28, 78, 128, 0.35); outline-offset: 2px; }
/* 只剩一個分頁有內容：當成一般區塊標題 */
.home-info-tabs.is-single { padding: 0; border-color: transparent; background: transparent; }
.home-info-tabs.is-single button, .home-info-tabs.is-single button:hover, .home-info-tabs.is-single button[aria-selected="true"] { padding: 0; min-height: 0; background: transparent; color: var(--text); box-shadow: none; font-size: 22px; cursor: default; }
.home-info-pane[hidden] { display: none; }
.news-policy-chip, .ct-news-policy { background: #7a4fb5; color: #fff; }
.mobile-mode .home-info-band { padding: 18px 16px; }
.mobile-mode .home-info-tabs:not(.is-single) { display: flex; width: 100%; }
.mobile-mode .home-info-tabs:not(.is-single) button { flex: 1 1 0; padding: 8px 6px; font-size: 14.5px; }
.mobile-mode .home-info-head .ct-more-link { margin-left: auto; }
@media (max-width: 640px) {
  .home-info-tabs:not(.is-single) { display: flex; width: 100%; }
  .home-info-tabs:not(.is-single) button { flex: 1 1 0; padding: 8px 6px; font-size: 14.5px; }
}
/* 版型二：輪播下方直接接指標帶，留一點間距（原本中間有標語列） */
.home-sr + .satisfaction-band { margin-top: 22px; }
.mobile-mode .home-sr + .satisfaction-band { margin-top: 14px; }
/* CRM 首頁數據：兩個量表各自一段標題 */
.hd-section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 30px 0 12px; padding-top: 20px; border-top: 1px solid #e3e8ee; font-size: 20px; color: #16324f; }
.hd-section-title small { font-size: 13px; font-weight: 600; color: #8a97a3; }
.section-title-row + .hd-section-title, .notice + .hd-section-title { margin-top: 6px; padding-top: 0; border-top: 0; }
.hy-now-gauge { border-color: #2f8f5b; box-shadow: 0 8px 20px rgba(47, 143, 91, 0.18); }
.hy-now-gauge.is-off { border-color: #c3ccd5; box-shadow: none; }
.hy-now-gauge strong.is-long { font-size: 1.25em; }

/* ── 收費標準依租借日期＋手動金額（2026-09-26）── */
.fee-breakdown-basis { margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; background: #fff7e0; color: #7a5104; font-size: 12.5px; }
.fee-breakdown-manual { margin: 6px 0 0; color: #1c4e80; }
.fee-breakdown-manual small { margin-left: 4px; color: var(--muted); }
.fee-manual { margin-top: 10px; padding: 10px 12px; border: 1px dashed #b8c4cf; border-radius: 10px; background: #fafcfe; }
.fee-manual-title { margin: 0 0 6px; font-weight: 700; font-size: 13.5px; }
.fee-manual-title small { font-weight: 400; color: var(--muted); }
.fee-manual-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 4px 0; }
.fee-manual-form label { display: grid; gap: 3px; font-size: 12.5px; color: #46535e; }
.fee-manual-form input[name="amount"] { width: 9em; }
.fee-manual-form input[name="note"] { width: min(22em, 70vw); }
.fs-basis { display: grid; gap: 4px; margin-top: 10px; font-size: 12.5px; color: #46535e; }
.fs-basis input { width: 100%; }
.fs-radio { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; }
.fs-radio input[type="radio"] { width: 16px; min-width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; }
.fs-radio input[type="date"] { min-height: 32px; padding: 3px 6px; }
.fs-log { margin-top: 12px; font-size: 13px; }
.fs-log ul { display: grid; gap: 6px; margin: 8px 0 0; padding-left: 18px; }
.fs-log time { margin-right: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fs-log em { margin-left: 6px; color: var(--muted); font-size: 12px; font-style: normal; }
.fs-log small { display: block; color: #7a5104; }

/* 首頁滿意度等級標籤（2026-09-26）：「非常滿意」亮綠實心＋光暈、「滿意」綠色實心；普通／待加強維持原本半透明白 */
.satisfaction-mood em.mood-chip.is-great { background: #3ddc84; border-color: #b6f5d2; color: #053d22; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.28), 0 6px 18px rgba(4, 60, 32, 0.35); text-shadow: none; }
.satisfaction-mood em.mood-chip.is-good { background: #1f9d5c; border-color: #6fdca2; color: #fff; box-shadow: 0 4px 12px rgba(4, 60, 32, 0.3); }

/* CRM 首頁數據：滿意度「建議顯示組合」（2026-09-26） */
.hd-suggest { display: grid; gap: 8px; margin: 0 0 16px; padding: 14px 18px; border: 1px solid #b9e3c9; border-left: 5px solid #1f9d5c; border-radius: 14px; background: linear-gradient(135deg, #f3fbf6, #eaf6ef); }
.hd-suggest.is-current { border-color: #d3e6da; border-left-color: #8fbfa1; background: #f7faf8; }
.hd-suggest.is-few { border-color: #f1d49b; border-left-color: #d08214; background: #fffaf0; }
.hd-suggest.is-empty { border-color: #e3e8ee; border-left-color: #c3ccd5; background: #f7f9fb; }
.hd-suggest-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.hd-suggest-badge { font-size: 12.5px; font-weight: 800; color: #1f7a4a; letter-spacing: 0.04em; }
.hd-suggest.is-few .hd-suggest-badge { color: #9a5b00; }
.hd-suggest-head strong { display: inline-flex; align-items: baseline; gap: 10px; font-size: 18px; color: #16324f; }
.hd-suggest-head strong b { font-size: 26px; line-height: 1; color: #1f9d5c; }
.hd-suggest.is-few .hd-suggest-head strong b { color: #b36b00; }
.hd-suggest-rule { font-style: normal; font-size: 12px; font-weight: 800; line-height: 1.4; padding: 3px 9px; border-radius: 999px; background: #e3f4ea; color: #1f7a4a; border: 1px solid #b9e3c9; }
.hd-suggest-rule.is-long { background: #1f9d5c; color: #fff; border-color: #1f9d5c; }
.hd-suggest-rule.is-few { background: #fff4de; color: #9a5b00; border-color: #f1d49b; }
.hd-suggest-reason { margin: 0; color: #46535e; font-size: 14px; line-height: 1.7; }
.hd-suggest-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hd-suggest-actions button { min-height: 38px; padding: 8px 14px; }
.hd-suggest-actions small { color: #62707c; font-size: 13px; }
.hd-suggest-ok { font-weight: 800; color: #1f7a4a; }
.hd-suggest-rank summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #46535e; }
.hd-suggest-rank ol { display: grid; gap: 4px; margin: 8px 0 6px; padding-left: 22px; }
.hd-suggest-rank li { font-size: 13.5px; color: #46535e; }
.hd-suggest-rank li span { display: inline-block; min-width: 15em; }
.hd-suggest-rank li b { display: inline-block; min-width: 5em; color: #16324f; }
.hd-suggest-rank li small { color: #8a97a3; }
.hd-suggest-rank li.is-pick span, .hd-suggest-rank li.is-pick b { color: #1f7a4a; font-weight: 800; }
.hd-suggest-rank li.is-few span, .hd-suggest-rank li.is-few b { color: #a3adb7; font-weight: 500; }
.hd-suggest-rank p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: #8a97a3; }
/* 第一步／第二步卡片上的「建議」小標 */
.hd-pick.is-suggested::before { content: "建議"; position: absolute; top: -9px; left: 12px; padding: 1px 8px; border-radius: 999px; background: #1f9d5c; color: #fff; font-size: 11px; font-weight: 800; line-height: 1.6; box-shadow: 0 2px 6px rgba(31, 157, 92, 0.3); }


/* ── 營運日曆手機版：連續長條＋右下角「今日」（2026-09-26）──
   不再分月翻頁：藏掉上/下個月與月份跳轉，各月份以深色月份標題（黏在頂端）隔開，右下角常駐「今日」按鈕 */
.ops-today-fab { display: none; }
@media (max-width: 760px) {
  .crm-calendar-panel .crm-calendar-controls, .crm-calendar-panel .crm-calendar-toolbar-actions { display: none; }
  .crm-main .crm-calendar-panel, .crm-calendar-panel .ops-agenda { overflow: visible; overflow-x: clip; }
  .ops-agenda-day.is-empty { display: flex; align-items: center; padding: 4px 10px; margin-bottom: 6px; background: #fbfcfd; }
  .ops-agenda-day.is-empty .ops-agenda-head { flex: 1 1 auto; min-width: 0; }
  .ops-agenda-day.is-empty .ops-agenda-head strong { font-size: 17px; color: #62707c; }
  .ops-agenda-day.is-empty .ops-agenda-date::after { content: "・無行程"; font-weight: 600; color: #9aa6b1; }
  .ops-agenda-day.is-empty .ops-agenda-empty { display: none; }
  .ops-agenda-day.is-empty button.ops-agenda-all { padding: 4px 10px; font-size: 12px; }
  .ops-agenda-months { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .ops-agenda-month { min-width: 0; }
  .ops-agenda-month-head { position: sticky; top: 113px; z-index: 6; display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 9px 14px; border-radius: 10px; background: #16324f; color: #fff; font-size: 16px; font-weight: 900; letter-spacing: 0.04em; box-shadow: 0 4px 12px rgba(15, 30, 45, 0.18); }
  .ops-agenda-month-head em { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }
  .ops-agenda-month-empty { margin: 4px 0 0; padding: 14px; border: 1px dashed #d5dde5; border-radius: 10px; text-align: center; font-size: 13px; color: #9aa6b1; }
  .ops-agenda-day { scroll-margin-top: 170px; }
  button.ops-agenda-more, button.ops-agenda-more:hover, button.ops-agenda-more:focus { display: block; width: 100%; margin: 0 0 12px; padding: 11px; border: 1px dashed #b8c4cf; border-radius: 10px; background: #f7f9fb; color: var(--brand); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
  button.ops-agenda-more[hidden] { display: none; }
  .ops-agenda-sentinel { padding: 16px 0 8px; text-align: center; font-size: 12.5px; color: #9aa6b1; }
  .ops-agenda-sentinel[hidden] { display: none; }
  .ops-agenda-sentinel.is-error { color: #b3261e; font-weight: 800; cursor: pointer; }
  .crm-calendar-panel { padding-bottom: 72px; }
  button.ops-today-fab, button.ops-today-fab:hover, button.ops-today-fab:focus { display: inline-flex; align-items: center; gap: 6px; position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 90; min-height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: var(--brand, #1456a0); color: #fff; font: inherit; font-size: 15px; font-weight: 900; box-shadow: 0 8px 22px rgba(20, 86, 160, 0.35); cursor: pointer; transition: opacity 0.2s; }
  .ops-today-fab-arrow { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); font-size: 14px; line-height: 1; }
  button.ops-today-fab.is-here { opacity: 0.8; }
}
