/* 地藏菩薩殿 · 格位管理 — 色彩與間距依 Pixso 設計稿 */
:root {
  --bg-page: #faf7f2;
  --bg-panel: #fffdf8;
  --bg-card: #ffffff;
  --bg-muted: #f5f0e4;
  --border: #d2c3a5;
  --border-soft: rgba(210, 195, 165, 0.35);
  --accent: #b48c3c;
  --accent-hover: #9a7630;
  --text: #2d2012;
  --text-muted: #78644b;
  --empty-fill: #f5f0e4;
  --occupied-fill: rgba(42, 30, 15, 0.04);
  --occupied-stroke: rgba(185, 50, 45, 0.28);
  --expiring-fill: rgba(234, 179, 8, 0.08);
  --expiring-stroke: rgba(202, 138, 4, 0.45);
  --green-dot: #22c55e;
  --red-dot: #b9322d;
  --amber-dot: #eab308;
  --sidebar-w: 220px;
  --panel-w: 360px;
  --font-sans: "Inter", "Noto Sans TC", "Noto Sans SC", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-page);
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--accent);
}

.app-shell {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

/* —— 左側導航 —— */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.sidebar-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: linear-gradient(145deg, #c9a227 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sidebar-sub {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.sidebar-user {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem 0;
  line-height: 1.3;
}

.nav-main {
  flex: 1;
  min-height: 0;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 0.45rem;
}

.nav-group:last-child {
  margin-bottom: 0;
}

.nav-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem 0.1rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.nav-btn.active {
  background: rgba(180, 140, 60, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.nav-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  opacity: 0.85;
}

.nav-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* —— 主區 —— */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-page);
}

.main-header h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.main-header .hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.dot.green {
  background: var(--green-dot);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.dot.red {
  background: var(--red-dot);
  box-shadow: 0 0 0 2px rgba(185, 50, 45, 0.2);
}

.dot.amber {
  background: var(--amber-dot);
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.3);
}

.main-scroll {
  flex: 1;
  overflow: auto;
  padding: 1.5rem;
}

/* 統計卡片 */
.stat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  min-width: 10rem;
}

.stat-card .icon-box {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-card .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-card .value {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* 格位視覺編輯區 */
.editor-block {
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 1.25rem;
}

.editor-block .block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.editor-block .block-title {
  font-size: 0.9375rem;
  font-weight: 700;
}

.editor-block .block-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-muted);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-left label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.toolbar-left input.num {
  width: 3rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--bg-card);
  text-align: center;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.slot-price {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.2rem;
  line-height: 1.2;
  text-align: center;
}

.slot-merged .slot-price {
  font-size: 0.72rem;
  margin-top: 0.35rem;
}

.view-public .slot-price {
  font-size: 0.7rem;
}

.merge-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: rgba(180, 140, 60, 0.12);
}

.merge-mode-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 12rem;
}

.merge-mode-bar #btn-merge-apply {
  flex-shrink: 0;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--bg-muted);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffdf8;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
}

.grid-wrap {
  overflow: auto;
  max-width: 100%;
}

.grid-stage {
  display: inline-block;
  padding: 1rem;
  border-radius: 0.75rem;
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
}

.grid-labeled {
  display: grid;
  grid-template-columns: 2.25rem auto;
  grid-template-rows: 1.75rem auto;
  gap: 4px 6px;
  align-items: stretch;
}

.grid-corner {
  width: 2.25rem;
  height: 1.75rem;
}

.grid-col-headers {
  display: grid;
  gap: 6px;
}

.grid-row-headers {
  display: grid;
  gap: 6px;
}

.grid-axis-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.grid-axis-col {
  height: 1.75rem;
}

.grid-axis-row {
  width: 2.25rem;
  height: 72px;
}

.slot-code {
  position: absolute;
  top: 3px;
  left: 4px;
  z-index: 3;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  pointer-events: none;
  line-height: 1;
}

.slot-label-input {
  text-align: center;
  text-transform: uppercase;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(12, 72px);
  grid-template-rows: repeat(8, 72px);
  gap: 6px;
}

.slot-cell {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--empty-fill);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.15s, transform 0.1s;
}

/* 每格狀態燈：綠＝空位、紅＝已供養、黃＝即將到期（須置於 DOM 最後並拉高 z-index，避免被圖片區遮住） */
.slot-status-light {
  display: block;
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  z-index: 50;
  pointer-events: none;
  box-sizing: border-box;
  border: 2px solid #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 1px 4px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.slot-status-light--empty {
  background: #16a34a;
}

.slot-status-light--occupied {
  background: #b91c1c;
}

.slot-status-light--expiring {
  background: #ca8a04;
}

.slot-status-light--paid {
  background: #16a34a;
}

.slot-status-light--unpaid {
  background: #b91c1c;
}

.slot-grid > .slot-cell.slot-merged .slot-status-light {
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
}

/* 合併後填滿網格區域，成為一個「大牌」 */
.slot-grid > .slot-cell.slot-merged {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  border-radius: 8px;
  padding: 4px;
  justify-content: flex-start;
  background: linear-gradient(165deg, #fffdf8 0%, #f5efe4 45%, #ebe4d4 100%);
  border: 2px solid rgba(180, 140, 60, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 2px 8px rgba(45, 32, 18, 0.12),
    0 0 0 1px rgba(210, 195, 165, 0.5);
  overflow: hidden;
}

.slot-cell.slot-merged.state-occupied,
.slot-cell.slot-merged.state-expiring {
  background: linear-gradient(165deg, #fff9f0 0%, #f8f0e4 50%, #f0e8d8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 0 0 1px rgba(185, 50, 45, 0.12),
    0 3px 10px rgba(45, 32, 18, 0.1);
}

.slot-cell.slot-merged.state-expiring {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 0 0 1px rgba(202, 138, 4, 0.25),
    0 3px 10px rgba(45, 32, 18, 0.1);
}

.slot-plaque-badge {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(180, 140, 60, 0.35);
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1.2;
  z-index: 2;
  pointer-events: none;
}

.slot-plaque-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 3px;
}

.slot-plaque-photos {
  flex: 1 1 auto;
  min-height: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(45, 32, 18, 0.04);
}

.slot-plaque-photo {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slot-plaque-photo--receipt {
  opacity: 0.95;
  max-height: 40%;
  flex: 0 1 auto;
}

.slot-cell.slot-merged .slot-family {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 4px 0;
  line-height: 1.25;
  word-break: break-word;
  max-width: 100%;
}

.slot-cell.slot-merged .slot-icons {
  position: static;
  margin-top: auto;
  padding-bottom: 1px;
}

.slot-plaque-hint {
  font-size: 0.5rem;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 2px;
  line-height: 1.3;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-merge-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(180, 140, 60, 0.1);
  border: 1px solid rgba(180, 140, 60, 0.25);
  border-radius: 0.5rem;
}

.panel-merge-banner strong {
  color: var(--accent);
}

.panel-slot-active {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.375rem;
  background: rgba(180, 140, 60, 0.14);
  border: 1px solid var(--accent);
  font-size: 0.85rem;
}

.panel-slot-active-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.panel-slot-active strong {
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.panel-customer-hint {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.375rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  font-size: 0.78rem;
  line-height: 1.45;
}

.panel-customer-hint-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #1d4ed8;
}

.panel-customer-hint-name {
  margin-bottom: 0.35rem;
}

.panel-customer-hint-records {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1rem;
  color: var(--text-muted);
}

.panel-customer-fill-btn {
  margin-top: 0.25rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
}

.upload-zone.upload-zone--plaque {
  min-height: 7.5rem;
  border-width: 2px;
  background: rgba(255, 253, 248, 0.85);
}

.slot-cell:hover {
  box-shadow: 0 2px 8px rgba(45, 32, 18, 0.08);
}

.slot-cell.slot-merged:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 4px 14px rgba(45, 32, 18, 0.14),
    0 0 0 1px rgba(210, 195, 165, 0.55);
}

.slot-cell.selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  z-index: 1;
}

.slot-cell.locate-flash {
  outline: 3px solid #dc2626;
  outline-offset: 3px;
  z-index: 6;
  overflow: visible;
  animation: slot-locate-pulse 0.85s ease-in-out 6;
  box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.32), 0 8px 22px rgba(185, 28, 28, 0.35);
}

.slot-grid > .slot-cell.slot-merged.locate-flash {
  overflow: visible;
}

@keyframes slot-locate-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.5), 0 6px 16px rgba(185, 28, 28, 0.3);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(220, 38, 38, 0.16), 0 8px 26px rgba(185, 28, 28, 0.4);
  }
}

.slot-locate-pin {
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  z-index: 7;
  white-space: nowrap;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.45);
}

.slot-locate-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.5rem;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #991b1b;
  font-size: 0.85rem;
  line-height: 1.45;
}

.slot-locate-banner[hidden] {
  display: none;
}

.slot-locate-banner-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.slot-locate-banner strong {
  display: block;
  font-size: 0.8rem;
}

.slot-locate-banner span {
  font-size: 0.9rem;
  font-weight: 600;
}

.alert-row--clickable {
  cursor: pointer;
}

.alert-row--clickable:hover {
  border-color: var(--accent);
  background: rgba(180, 140, 60, 0.08);
}

.slot-cell.merge-select {
  outline: 2px dashed var(--accent);
}

.slot-cell.state-occupied {
  background: var(--occupied-fill);
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--occupied-stroke);
}

.slot-cell.state-expiring {
  background: var(--expiring-fill);
  box-shadow: inset 0 0 0 1px var(--expiring-stroke);
}

.slot-cell.state-unpaid {
  background: rgba(185, 28, 28, 0.14);
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.72);
}

.slot-cell.state-paid {
  background: rgba(22, 163, 74, 0.16);
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.72);
}

.slot-cell.slot-merged.state-unpaid {
  background: rgba(185, 28, 28, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 0 2px rgba(185, 28, 28, 0.65),
    0 3px 10px rgba(45, 32, 18, 0.1);
}

.slot-cell.slot-merged.state-paid {
  background: rgba(22, 163, 74, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 0 2px rgba(22, 163, 74, 0.65),
    0 3px 10px rgba(45, 32, 18, 0.1);
}

.slot-pay-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.2;
  z-index: 40;
  pointer-events: none;
}

.slot-pay-badge--paid {
  color: #15803d;
}

.slot-pay-badge--unpaid {
  color: #b91c1c;
}

.view-public .slot-pay-badge,
.view-print .slot-pay-badge {
  display: none;
}

.slot-bodhi {
  font-size: 0.5rem;
  text-align: center;
  line-height: 1.2;
  color: var(--text-muted);
  padding: 0 2px;
  max-height: 2.4em;
  overflow: hidden;
}

.slot-family {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

.slot-icons {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 2px;
  font-size: 0.55rem;
  color: var(--accent);
}

/* 即將到期提醒 */
.alert-block {
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(234, 179, 8, 0.35);
  background: rgba(254, 252, 232, 0.6);
}

.alert-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  font-size: 0.8125rem;
}

.alert-row--empty {
  justify-content: center;
  color: var(--text-muted);
  font-style: italic;
}

.alert-row .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* —— 右側編輯面板 —— */
aside.side-panel,
form.side-panel {
  width: var(--panel-w);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-left: 2px solid var(--border-soft);
  box-shadow: -8px 0 40px rgba(42, 30, 15, 0.22);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  z-index: 50;
  margin: 0;
}

aside.side-panel[hidden],
form.side-panel[hidden] {
  display: none !important;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.panel-header .title {
  font-weight: 700;
  font-size: 0.9375rem;
}

.panel-header .sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.status-pulse {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--green-dot);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.panel-close {
  padding: 0.375rem;
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.panel-close:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.status-pills {
  display: flex;
  gap: 0.5rem;
}

.status-pill {
  flex: 1;
  padding: 0.5rem 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.status-pill:hover {
  border-color: var(--accent);
}

.status-pill.active {
  border-color: var(--accent);
  background: rgba(180, 140, 60, 0.1);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-text {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-muted);
  color: var(--text);
}

.input-text:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(180, 140, 60, 0.15);
}

.divider-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.divider-label::before,
.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-label span {
  font-size: 0.75rem;
  color: rgba(180, 140, 60, 0.7);
}

.upload-zone {
  position: relative;
  width: 100%;
  border-radius: 8px;
  border: 2px dashed var(--border);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(180, 140, 60, 0.06);
}

.upload-zone.tall {
  height: 8rem;
}

.upload-zone.short {
  height: 6rem;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
}

.upload-inner .up-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  opacity: 0.7;
}

.upload-inner .up-text {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.upload-preview {
  max-width: 100%;
  max-height: 5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.panel-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.btn-save {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #fffdf8;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-save:hover {
  background: var(--accent-hover);
}

.pay-record {
  margin-top: 0.25rem;
  padding: 0.7rem 0.75rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-muted);
}

.pay-record-banner {
  margin-top: 0.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.375rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}

.pay-record-banner[data-paid="1"] {
  background: rgba(22, 163, 74, 0.16);
  color: #15803d;
}

.pay-record-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0.55rem 0 0.45rem;
}

.pay-tab {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 0.375rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-muted);
}

.pay-tab.is-on {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
  background: rgba(180, 140, 60, 0.1);
}

.pay-record-text {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.section-title-xs {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

/* 公開預覽頁 */
.view-public .sidebar,
.view-public .side-panel,
.view-public form.side-panel {
  display: none;
}

.view-public .main {
  max-width: 100%;
}

.public-hero {
  text-align: center;
  padding: 2rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fffdf8 0%, var(--bg-page) 100%);
}

.public-hero h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.public-hero .en {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

.public-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.5rem;
}

.public-stats .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

/* 模態 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 32, 18, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: var(--bg-card);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 1.25rem;
}

.modal h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.modal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.modal th,
.modal td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.flash {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--text);
  color: #fffdf8;
  font-size: 0.875rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.flash.ok {
  background: #166534;
}

.flash.err {
  background: #991b1b;
}

.print-only {
  display: none;
}

.print-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.print-toolbar-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.slot-print-status {
  display: none;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  margin-top: 0.15rem;
}

.slot-print-status--empty {
  color: #15803d;
}

.slot-print-status--occupied,
.slot-print-status--expiring {
  color: #991b1b;
}

.slot-print-legend {
  display: none;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.slot-print-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.view-print .slot-print-status,
.view-print .slot-print-legend {
  display: flex;
}

.view-print .slot-print-status {
  display: block;
}

.view-print .slot-family,
.view-print .slot-plaque-photos,
.view-print .slot-plaque-hint,
.view-print .slot-bodhi {
  display: none !important;
}

/* —— 室內平面圖 —— */
.floor-layout {
  display: flex;
  min-height: 100vh;
}

.floor-main {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1.5rem 2rem;
  overflow: auto;
}

.floor-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.floor-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 46rem;
}

.floor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin: 1.1rem 0 1rem;
}

.floor-mode {
  display: inline-flex;
  gap: 0.3rem;
}

.floor-mode .btn.is-on,
.floor-toolbar .btn.is-on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(180, 140, 60, 0.12);
  font-weight: 600;
}

.floor-size {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.floor-size input {
  width: 4.2rem;
  padding: 0.35rem 0.45rem;
}

.floor-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.floor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  gap: 1rem;
  align-items: start;
}

.floor-stage {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1.1rem 1.1rem 0.75rem;
  overflow: auto;
}

.floor-axis {
  display: grid;
  grid-template-columns: 1.6rem max-content;
  margin-bottom: 0.15rem;
}

.floor-corner {
  width: 1.6rem;
}

.floor-col-heads {
  display: grid;
  gap: 3px;
}

.floor-col-heads,
.floor-board {
  display: grid;
}

.floor-body {
  display: grid;
  grid-template-columns: 1.6rem max-content;
  gap: 0.15rem;
  align-items: start;
}

.floor-row-heads {
  display: grid;
  gap: 3px;
}

.floor-axis-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floor-board-wrap {
  position: relative;
  display: inline-block;
}

.floor-board {
  position: relative;
  width: max-content;
  min-height: 0;
  background: #f3eee4;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  touch-action: none;
  user-select: none;
  gap: 0;
}

.floor-board.is-edit {
  gap: 3px;
  background: var(--border);
}

.floor-canvas-handle {
  display: none;
  position: absolute;
  z-index: 8;
  padding: 0;
  border: 2px solid #fff;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(42, 30, 15, 0.2);
  cursor: pointer;
}

.floor-board-wrap.is-edit .floor-canvas-handle {
  display: block;
}

.floor-canvas-handle-e {
  top: 0;
  right: -9px;
  width: 12px;
  height: 100%;
  border-radius: 8px;
  cursor: ew-resize;
}

.floor-canvas-handle-s {
  left: 0;
  bottom: -9px;
  width: 100%;
  height: 12px;
  border-radius: 8px;
  cursor: ns-resize;
}

.floor-canvas-handle-se {
  right: -10px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: nwse-resize;
}

.floor-stage.is-preview .floor-axis,
.floor-stage.is-preview .floor-row-heads,
.floor-stage.is-preview .floor-corner {
  display: none;
}

.floor-stage.is-preview .floor-body {
  grid-template-columns: minmax(0, max-content);
}

.floor-cell {
  border: none;
  background: var(--bg-muted);
  min-height: 0;
  padding: 0;
  cursor: default;
}

.floor-board.is-edit .floor-cell {
  cursor: pointer;
}

.floor-board.is-edit .floor-cell:hover {
  background: #efe6d2;
}

.floor-cab {
  border: 2px solid var(--accent);
  border-radius: 0.4rem;
  min-width: 0;
  min-height: 0;
  padding: 0.35rem 0.45rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  cursor: pointer;
  z-index: 2;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(42, 30, 15, 0.12);
}

.floor-board.is-dragging {
  cursor: grabbing;
}

.floor-board.is-dragging .floor-cab {
  cursor: grabbing;
}

.floor-cab.is-on {
  outline: 2px solid var(--text);
  outline-offset: 1px;
  z-index: 3;
}

.floor-cab-name {
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.25;
  word-break: break-word;
}

.floor-cab-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.floor-handle {
  position: absolute;
  background: var(--accent);
  border-radius: 999px;
  z-index: 4;
}

.floor-cab {
  position: relative;
}

.floor-handle-e {
  width: 12px;
  height: 1.35rem;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.floor-handle-s {
  width: 1.35rem;
  height: 12px;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.floor-handle-se {
  width: 14px;
  height: 14px;
  right: -6px;
  bottom: -6px;
  border-radius: 2px;
  cursor: nwse-resize;
}

.floor-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.floor-side h2 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.floor-side-hint {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.floor-palette {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.floor-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0 0 1.1rem;
}

.floor-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--bg-page);
  cursor: pointer;
  color: inherit;
}

.floor-tool:disabled {
  opacity: 0.7;
  cursor: default;
}

.floor-tool.is-picking {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(180, 140, 60, 0.25);
}

.floor-tool-icon {
  width: 1.85rem;
  height: 1.15rem;
  border-radius: 0.15rem;
  border: 1px solid rgba(42, 30, 15, 0.2);
}

.floor-tool-label {
  font-size: 0.72rem;
  font-weight: 600;
}

.floor-tool-door .floor-tool-icon {
  background: #efe6d2;
  border: 2px solid #8b5a2b;
  border-radius: 0.7rem 0.7rem 0.12rem 0.12rem;
}

.floor-tool-wall .floor-tool-icon {
  background: #6b5340;
  border-color: #3f3228;
}

.floor-tool-window .floor-tool-icon {
  background: repeating-linear-gradient(90deg, #d7e7f2 0 6px, #8aaec4 6px 8px);
}

.floor-tool-pillar .floor-tool-icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: #c9b496;
}

.floor-tool-stairs .floor-tool-icon {
  background: repeating-linear-gradient(-45deg, #d8c7a6, #d8c7a6 4px, #b89a6a 4px, #b89a6a 8px);
}

.floor-tool-altar .floor-tool-icon {
  background: #e7d08a;
  border-color: #b48c3c;
}

.floor-tool-passage .floor-tool-icon {
  background: #f3efe6;
  border-style: dashed;
}

.floor-mark {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid #5c4a32;
  border-radius: 0.28rem;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
}

.floor-board.is-edit .floor-mark {
  cursor: grab;
}

.floor-mark.is-on {
  outline: 2px solid var(--text);
  outline-offset: 1px;
  z-index: 3;
}

.floor-mark-name {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.1rem;
  pointer-events: none;
}

.floor-mark-door {
  background: #efe6d2;
  border-color: #8b5a2b;
  border-radius: 1.1rem 1.1rem 0.2rem 0.2rem;
}

.floor-mark-door.is-v {
  border-radius: 0.2rem 1.1rem 1.1rem 0.2rem;
}

.floor-mark-wall {
  background: #6b5340;
  border-color: #3f3228;
  color: #f7f1e6;
}

.floor-mark-window {
  background: repeating-linear-gradient(90deg, #d7e7f2 0 10px, #8aaec4 10px 12px);
  border-color: #5b7d94;
  color: #2d4454;
}

.floor-mark-window.is-v {
  background: repeating-linear-gradient(180deg, #d7e7f2 0 10px, #8aaec4 10px 12px);
}

.floor-mark-pillar {
  background: #c9b496;
  border-color: #8a7354;
  border-radius: 50%;
}

.floor-mark-stairs {
  background: repeating-linear-gradient(-45deg, #e4d4b4, #e4d4b4 6px, #c4a574 6px, #c4a574 12px);
  border-color: #8a6b3c;
}

.floor-mark-altar {
  background: #e7d08a;
  border-color: #b48c3c;
}

.floor-mark-passage {
  background: #f6f1e6;
  border: 2px dashed #b7a07a;
  color: var(--text-muted);
}

.floor-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-page);
  border-radius: 0.5rem;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  color: inherit;
}

.floor-chip:disabled {
  cursor: default;
  opacity: 0.72;
}

.floor-chip.is-picking {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(180, 140, 60, 0.25);
}

.floor-chip-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.2rem;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.floor-chip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.floor-chip-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.floor-chip-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.floor-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0;
}

.floor-selected {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.floor-selected-name {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.floor-selected-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

@media (max-width: 960px) {
  .floor-workspace {
    grid-template-columns: 1fr;
  }
}

.panel-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45, 32, 18, 0.45);
  z-index: 70;
}

.panel-scrim[hidden],
.nav-scrim[hidden] {
  display: none !important;
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  position: fixed;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 65;
}

.mobile-nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45, 32, 18, 0.45);
  z-index: 55;
}

@media (max-width: 1200px) {
  .side-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    z-index: 80;
    box-shadow: -12px 0 40px rgba(42, 30, 15, 0.28);
  }

  .main {
    margin-right: 0;
  }

  .panel-scrim.is-on {
    display: block;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  body.panel-open .mobile-nav-toggle {
    display: none;
  }

  .main-header {
    padding-left: 3.4rem;
  }

  .fu-main,
  .h-layout > main,
  .inv-layout > main,
  .hall-layout > main,
  .online-layout > main,
  .expired-layout > main,
  .revenue-layout > main,
  .pos-layout > main,
  .floor-layout > main,
  .floor-main,
  .set-layout > main,
  .set-main {
    padding-left: 3.4rem;
  }

  .app-shell,
  .fu-layout,
  .h-layout,
  .inv-layout,
  .pos-layout,
  .hall-layout,
  .online-layout,
  .expired-layout,
  .revenue-layout,
  .floor-layout,
  .set-layout {
    overflow: visible;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 60;
    width: min(var(--sidebar-w), 86vw);
    transform: translateX(-110%);
    transition: transform 0.2s ease;
    overflow-y: auto;
    box-shadow: 8px 0 28px rgba(42, 30, 15, 0.18);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  body.nav-open .nav-scrim {
    display: block;
  }

  body.nav-open,
  body.panel-open {
    overflow: hidden;
  }

  .main,
  .fu-main,
  .h-main,
  .inv-main,
  .pos-main,
  .floor-main {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .main-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.75rem 3.4rem;
  }

  .main-header h1 {
    font-size: 1rem;
  }

  .legend-row {
    flex-wrap: wrap;
  }

  .main-scroll {
    padding: 1rem;
  }

  .stat-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .stat-card {
    min-width: 0;
    padding: 0.75rem;
  }

  .toolbar-left,
  .toolbar-actions {
    width: 100%;
  }

  .status-pills {
    flex-wrap: wrap;
  }

  form.side-panel,
  aside.side-panel {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    z-index: 80;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
}

@media print {
  .no-print,
  .print-toolbar,
  .sidebar,
  .side-panel,
  form.side-panel,
  .mobile-nav-toggle,
  .nav-scrim,
  .panel-scrim,
  .flash,
  .stat-cards,
  .alert-block,
  .toolbar,
  .merge-mode-bar,
  .block-head,
  .nav-main,
  .nav-footer,
  .public-stats-hint,
  .btn,
  button.btn,
  .slot-family,
  .slot-plaque-photos,
  .slot-plaque-hint,
  .slot-bodhi,
  .slot-icons,
  .slot-plaque-badge {
    display: none !important;
  }

  .print-only,
  .slot-print-legend,
  .slot-print-status {
    display: flex !important;
  }

  .slot-print-status {
    display: block !important;
  }

  body,
  .app-shell,
  .main,
  .main-scroll,
  .grid-wrap {
    background: #fff !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    box-shadow: none !important;
  }

  .app-shell {
    display: block;
  }

  .main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  .public-hero {
    padding: 0 0 0.5rem;
    border: none;
    background: none;
  }

  .public-hero h1 {
    font-size: 1.15rem;
  }

  .public-stats {
    padding: 0.35rem 0 0.5rem;
    gap: 1.25rem;
  }

  .public-stats .num {
    font-size: 1.1rem;
  }

  .editor-block {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .slot-cell.state-occupied,
  .slot-cell.state-expiring {
    background: #e5e5e5 !important;
    box-shadow: inset 0 0 0 2px #991b1b;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .slot-cell.state-occupied .slot-price,
  .slot-cell.state-expiring .slot-price {
    display: none !important;
  }

  .slot-status-light {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
