:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --card: rgba(30, 41, 59, 0.78);
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --emerald: #34d399;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --amber: #fbbf24;
  --amber-bg: rgba(245, 158, 11, 0.17);
  --orange: #fb923c;
  --orange-bg: rgba(249, 115, 22, 0.18);
  --rose: #fb7185;
  --rose-bg: rgba(244, 63, 94, 0.2);
  --cyan: #22d3ee;
  --cyan-bg: rgba(6, 182, 212, 0.16);
  --violet: #a78bfa;
  --violet-bg: rgba(124, 58, 237, 0.2);
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.36);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.16), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(167, 139, 250, 0.18), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, var(--bg) 48%, #020617 100%);
  color: var(--text);
}

body {
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(34px + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -14px 12px;
  padding: 13px 14px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.96);
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.34);
}

.eyebrow,
.subtitle,
p,
h1,
h2 {
  margin: 0;
}

.eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

h1 {
  margin-top: 4px;
  font-size: clamp(26px, 8vw, 44px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.brand-kicker {
  margin: 0;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.22em;
}

.brand-title {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: clamp(20px, 4vw, 34px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-shadow: 0 0 28px rgba(34, 211, 238, 0.2);
}

.brand-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.header-side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-bridge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(14, 165, 233, 0.1));
  color: #e0faff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.download-bridge-link:active {
  transform: scale(0.98);
}

.clock-card {
  flex: none;
  min-width: 260px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 10px 13px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.82), rgba(2, 6, 23, 0.58));
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.clock-card span,
.clock-card strong {
  display: block;
}

.clock-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.clock-card strong {
  margin-top: 5px;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  font-size: clamp(15px, 2.5vw, 22px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.ghost-button {
  flex: none;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 850;
}

.stats-strip {
  display: flex;
  gap: 10px;
  margin: 0 -14px 14px;
  padding: 0 14px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.stats-strip::-webkit-scrollbar {
  display: none;
}

.stat-card {
  flex: 0 0 112px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.82));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  scroll-snap-align: start;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.stat-card span,
.stat-card strong,
.stat-card em {
  display: block;
}

.stat-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.stat-card strong {
  margin-top: 9px;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.stat-card em {
  margin-top: 7px;
  color: #bae6fd;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.stat-card.clickable {
  cursor: pointer;
  touch-action: manipulation;
}

.stat-card.clickable:active {
  transform: scale(0.96);
}

.stat-card.active {
  border-color: rgba(34, 211, 238, 0.5);
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.24), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12), 0 14px 34px rgba(6, 182, 212, 0.14);
}

.stat-card.neutral strong {
  color: #e2e8f0;
}

.stat-card.cyan strong {
  color: var(--cyan);
}

.stat-card.emerald strong {
  color: var(--emerald);
}

.stat-card.rose strong,
.dangerText {
  color: var(--rose);
}

.stat-card.amber strong {
  color: var(--amber);
}

.region-tabs {
  position: relative;
  top: auto;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(16px);
}

.region-tab {
  min-height: 42px;
  border-radius: 16px;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.region-tab.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(167, 139, 250, 0.24));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.1);
}

.region-panel {
  margin-bottom: 16px;
}

.region-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.region-head h2 {
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.region-head p,
.region-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.region-head span {
  flex: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(148, 163, 184, 0.12);
}

.desk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.desk-grid.aggregated-grid {
  animation: gridSettle 180ms ease-out;
}

.desk-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(214, 198, 173, 0.9);
  border-radius: 26px;
  padding: 13px;
  background: #fffef9;
  color: #35291e;
  box-shadow: 0 12px 26px rgba(123, 91, 47, 0.1);
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 230px;
  transition:
    transform 150ms ease,
    opacity 150ms ease,
    border-color 150ms ease;
}

.desk-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
  background: radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.14), transparent 32%);
}

.desk-card > * {
  position: relative;
  z-index: 1;
}

.status-empty {
  min-height: 178px;
  border-style: dashed;
  border-color: #b8d8bd;
  background: #fffef9;
}

.status-preparing {
  border-color: #9ecfdb;
  background: #e8f5f7;
}

.status-normal {
  border-color: #9fd7ad;
  background: #eefaf0;
}

.status-ending {
  border-color: #eccb72;
  background: #fff5d8;
}

.status-urgent {
  border-color: #e7a45c;
  background: #ffefd9;
  animation: microShake 2s ease-in-out infinite;
}

.status-timeout {
  border-color: #e69991;
  background: #ffe9e5;
  animation: timeoutPulse 1.4s ease-in-out infinite;
}

.status-infinit {
  border-color: #b9b4e8;
  background: #f0edff;
}

.desk-card.is-paused {
  border-color: #b4a6d8;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(122, 97, 166, 0.08) 0,
      rgba(122, 97, 166, 0.08) 8px,
      rgba(255, 255, 255, 0.42) 8px,
      rgba(255, 255, 255, 0.42) 16px
    ),
    #f1edfb;
  animation: none;
}

.status-preparing .seat-time-value {
  color: #1f758e;
}

.status-normal .seat-time-value {
  color: #15803d;
}

.status-ending .seat-time-value,
.status-urgent .seat-time-value {
  color: #b46a00;
}

.status-timeout .seat-time-value {
  color: #c93631;
}

.status-infinit .seat-time-value,
.desk-card.is-paused .seat-time-value {
  color: #5b4aa0;
}

.desk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.desk-id {
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.status-pill {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(111, 98, 83, 0.08);
  color: #756753;
  font-size: 10px;
  font-weight: 950;
}

.empty-state {
  display: grid;
  min-height: 118px;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #a58a66;
  text-align: center;
}

.plus-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid #b8d8bd;
  border-radius: 22px;
  background: #f0fbf2;
  color: #31804b;
  font-size: 34px;
  line-height: 1;
  font-weight: 300;
}

.empty-state strong {
  font-size: 15px;
  font-weight: 950;
}

.empty-state span {
  color: #7d6e59;
  font-size: 11px;
}

.project-name {
  margin-top: 10px;
  color: #35291e;
  font-size: 13px;
  font-weight: 950;
}

.desk-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.desk-times span {
  min-width: 0;
  border-radius: 10px;
  padding: 6px 7px;
  background: rgba(2, 6, 23, 0.34);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 850;
}

.live-time {
  margin-top: 12px;
}

.live-time small,
.live-time strong {
  display: block;
}

.live-time small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.live-time strong {
  margin-top: 4px;
  color: #ffffff;
  font-size: clamp(22px, 7vw, 34px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.desk-note {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.desk-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.desk-actions.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.desk-actions.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.desk-actions.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.desk-actions.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.action {
  min-height: 36px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
  touch-action: manipulation;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    background 120ms ease;
}

.action:active,
.preset-button:active,
.sheet-cancel:active,
.confirm-cancel:active,
.confirm-submit:active,
.ghost-button:active,
.region-tab:active,
.records-toggle:active {
  transform: scale(0.95);
}

.action.plus {
  background: rgba(52, 211, 153, 0.16);
  color: #a7f3d0;
}

.action.note {
  background: rgba(34, 211, 238, 0.15);
  color: #a5f3fc;
}

.action.move {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.action.start {
  background: rgba(34, 211, 238, 0.24);
  color: #ffffff;
}

.action.pause {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.action.resume {
  background: rgba(34, 211, 238, 0.24);
  color: #cffafe;
}

.action.stop {
  background: rgba(244, 63, 94, 0.2);
  color: #fecdd3;
}

.action.finish {
  background: rgba(148, 163, 184, 0.16);
}

.action.finish.danger {
  grid-column: span 1;
  background: rgba(244, 63, 94, 0.22);
  color: #fecdd3;
}

.action.muted {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}

.sheet,
.confirm-box {
  width: min(560px, 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.97);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.56);
}

.sheet {
  padding: 10px 14px 14px;
}

.open-sheet {
  width: min(1080px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 14px;
  overscroll-behavior: contain;
}

.open-sheet .sheet-handle {
  margin-bottom: 10px;
}

.open-sheet .sheet-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.open-sheet .start-time-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) minmax(240px, 1fr);
  align-items: center;
  gap: 10px;
}

.open-sheet .start-time-head {
  display: block;
}

.open-sheet .start-mode-row,
.open-sheet .time-input-row {
  margin-top: 0;
}

.open-sheet .start-time-tip {
  grid-column: 1 / -1;
  margin-top: 0;
}

.open-sheet .preset-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.open-sheet .preset-button {
  min-height: 64px;
}

.open-sheet .sheet-cancel {
  position: sticky;
  bottom: 0;
  margin-top: 14px;
  box-shadow: 0 -8px 18px rgba(255, 250, 241, 0.88);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
}

.sheet-title span,
.sheet-title strong {
  display: block;
}

.sheet-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.sheet-title strong {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 950;
}

.preset-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.start-time-card {
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.5);
}

.start-time-head,
.start-mode-row,
.time-input-row {
  display: flex;
  align-items: center;
}

.start-time-head {
  justify-content: space-between;
  gap: 10px;
}

.start-time-head strong {
  font-size: 15px;
  font-weight: 950;
}

.start-time-head span {
  color: #bae6fd;
  font-size: 11px;
  font-weight: 850;
}

.start-mode-row {
  gap: 8px;
  margin-top: 12px;
}

.start-mode,
.time-nudge {
  min-height: 38px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 950;
  touch-action: manipulation;
}

.start-mode {
  flex: 1 1 0;
}

.start-mode.active {
  background: rgba(34, 211, 238, 0.22);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.16);
}

.time-input-row {
  gap: 8px;
  margin-top: 10px;
}

.time-nudge {
  width: 50px;
}

.time-input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 0 12px;
  background: rgba(2, 6, 23, 0.45);
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  text-align: center;
  color-scheme: dark;
}

.time-input:disabled {
  color: #94a3b8;
  opacity: 0.72;
}

.start-time-tip {
  margin-top: 9px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.5;
}

.preset-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.78);
  text-align: left;
}

.preset-button.disabled {
  opacity: 0.42;
}

.preset-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 20px;
}

.preset-copy strong,
.preset-copy small {
  display: block;
}

.preset-copy strong {
  font-size: 15px;
  font-weight: 950;
  line-height: 1.22;
}

.preset-label-main,
.preset-label-sub {
  display: block;
}

.preset-label-sub {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.preset-copy small,
.preset-button em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.preset-button em {
  color: #bae6fd;
  white-space: nowrap;
}

.sheet-cancel {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  font-weight: 950;
}

.confirm-box {
  padding: 20px;
}

.confirm-box h2 {
  font-size: 22px;
  font-weight: 950;
}

.confirm-box p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.settlement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.settlement-grid div {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.62);
}

.settlement-grid span,
.settlement-grid strong {
  display: block;
}

.settlement-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.settlement-grid strong {
  margin-top: 6px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.settlement-tip {
  border-radius: 14px;
  padding: 10px;
  background: rgba(251, 191, 36, 0.09);
}

.confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.confirm-cancel,
.confirm-submit {
  min-height: 46px;
  border-radius: 18px;
  font-weight: 950;
}

.confirm-cancel {
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

.confirm-submit {
  background: linear-gradient(135deg, #e11d48, #fb7185);
  color: #ffffff;
}

.records-drawer {
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.records-toggle {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 24px;
  padding: 0 14px;
  background: transparent;
}

.records-toggle span {
  font-size: 14px;
  font-weight: 950;
}

.records-toggle strong {
  color: var(--cyan);
  font-size: 12px;
}

.records-table-wrap {
  overflow-x: auto;
  padding: 0 12px 12px;
}

.records-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.records-table {
  min-width: 920px;
  width: 100%;
  border-collapse: collapse;
  color: #e2e8f0;
  font-size: 12px;
}

.records-table th,
.records-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  padding: 11px 9px;
  text-align: left;
  white-space: nowrap;
}

.records-table th {
  color: var(--muted);
  font-weight: 950;
}

.aggregate-empty {
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  padding: 28px 14px;
  background: rgba(15, 23, 42, 0.48);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

@keyframes gridSettle {
  0% {
    opacity: 0.72;
    transform: translate3d(0, 8px, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes microShake {
  0%,
  88%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  90% {
    transform: translate3d(-2px, 0, 0);
  }

  92% {
    transform: translate3d(2px, 0, 0);
  }

  94% {
    transform: translate3d(-1px, 0, 0);
  }

  96% {
    transform: translate3d(1px, 0, 0);
  }
}

@keyframes timeoutPulse {
  0%,
  100% {
    box-shadow: var(--shadow), 0 0 0 rgba(244, 63, 94, 0);
  }

  50% {
    box-shadow: var(--shadow), 0 0 0 6px rgba(244, 63, 94, 0.16), 0 0 38px rgba(244, 63, 94, 0.22);
  }
}

@media (max-width: 559px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: calc(11px + env(safe-area-inset-top));
    text-align: center;
  }

  .brand-title {
    font-size: clamp(21px, 6.1vw, 30px);
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .header-side {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .download-bridge-link {
    min-height: 40px;
    padding: 0 12px;
    font-size: 11px;
  }

  .clock-card {
    min-width: 0;
    width: 100%;
    padding: 9px 12px;
    text-align: center;
  }

  .clock-card strong {
    font-size: clamp(16px, 4.6vw, 21px);
  }
}

@media (min-width: 560px) {
  .desk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-card {
    flex-basis: 132px;
  }
}

@media (min-width: 900px) {
  .app-shell {
    padding-inline: 22px;
  }

  .app-header {
    margin-inline: -22px;
    padding-inline: 22px;
  }

  .stats-strip {
    margin-inline: 0;
    padding-inline: 0;
  }

  .stat-card {
    flex: 1 1 0;
  }

  .desk-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .desk-card {
    min-height: 230px;
    padding: 15px;
  }

  .modal-backdrop {
    align-items: center;
  }

  .open-sheet .preset-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .desk-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app-header,
  .region-tabs,
  .modal-backdrop {
    backdrop-filter: none;
  }

  .desk-card {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }

  .desk-card::before {
    opacity: 0.35;
  }

  .status-urgent {
    animation-duration: 2.6s;
  }

  .status-timeout {
    animation-duration: 2s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .desk-grid.aggregated-grid,
  .status-urgent,
  .status-timeout {
    animation: none;
  }

  .desk-card,
  .stat-card,
  .action {
    transition: none;
  }
}

.compat-shell {
  width: 100%;
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 34px;
  color: #f8fafc;
}

.compat-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -14px 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.96);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.34);
}

.compat-header .brand-kicker {
  color: #22d3ee;
}

.compat-header .brand-subtitle,
.compat-header .clock-card span {
  color: #94a3b8;
}

.compat-header .clock-card {
  flex: none;
  min-width: 260px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 10px 13px;
  background: rgba(2, 6, 23, 0.58);
  text-align: right;
}

.compat-stats {
  display: flex;
  gap: 10px;
  margin: 0 -14px 14px;
  padding: 0 14px 4px;
  overflow-x: auto;
}

.compat-stat {
  flex: 0 0 112px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.compat-stat span,
.compat-stat strong,
.compat-stat em {
  display: block;
}

.compat-stat span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 850;
}

.compat-stat strong {
  margin-top: 9px;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

.compat-stat em {
  margin-top: 7px;
  color: #bae6fd;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.compat-stat.clickable {
  cursor: pointer;
  touch-action: manipulation;
}

.compat-stat.active {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(6, 182, 212, 0.22);
}

.compat-stat.neutral strong {
  color: #e2e8f0;
}

.compat-stat.cyan strong {
  color: #22d3ee;
}

.compat-stat.emerald strong {
  color: #34d399;
}

.compat-stat.rose strong {
  color: #fb7185;
}

.compat-stat.amber strong {
  color: #fbbf24;
}

.compat-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.compat-tab {
  flex: 1 1 0;
  min-height: 42px;
  border-radius: 16px;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.compat-tab.active {
  background: rgba(34, 211, 238, 0.22);
  color: #ffffff;
}

.compat-desk-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compat-desk-grid.aggregated-grid {
  animation: gridSettle 180ms ease-out;
}

.compat-desk-card {
  position: relative;
  flex: 0 0 calc(50% - 5px);
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(214, 198, 173, 0.9);
  border-radius: 24px;
  padding: 12px;
  background: #fffef9;
  color: #35291e;
  box-shadow: 0 12px 26px rgba(123, 91, 47, 0.1);
}

.compat-desk-card.status-empty {
  min-height: 210px;
  border-color: #b8d8bd;
  border-style: dashed;
  background: #fffef9;
}

.compat-desk-card.status-preparing {
  border-color: #9ecfdb;
  background: #e8f5f7;
}

.compat-desk-card.status-preparing .seat-time-value {
  color: #1f758e;
}

.compat-desk-card.status-normal {
  border-color: #9fd7ad;
  background: #eefaf0;
}

.compat-desk-card.status-normal .seat-time-value {
  color: #15803d;
}

.compat-desk-card.status-ending {
  border-color: #eccb72;
  background: #fff5d8;
}

.compat-desk-card.status-ending .seat-time-value,
.compat-desk-card.status-urgent .seat-time-value {
  color: #b46a00;
}

.compat-desk-card.status-urgent {
  border-color: #e7a45c;
  background: #ffefd9;
  animation: microShake 2s ease-in-out infinite;
}

.compat-desk-card.status-timeout {
  border-color: #e69991;
  background: #ffe9e5;
  animation: timeoutPulse 1.4s ease-in-out infinite;
}

.compat-desk-card.status-timeout .seat-time-value {
  color: #c93631;
}

.compat-desk-card.status-infinit {
  border-color: #b9b4e8;
  background: #f0edff;
}

.compat-desk-card.status-infinit .seat-time-value,
.compat-desk-card.is-paused .seat-time-value {
  color: #5b4aa0;
}

.compat-desk-card.is-paused {
  border-color: #b4a6d8;
  background: #f1edfb;
  animation: none;
}

.compat-desk-card .project-name,
.compat-desk-card .live-time strong {
  color: #2f251b;
}

.compat-desk-card .seat-main-time {
  margin: 12px 0 10px;
}

.compat-desk-card .live-time {
  min-width: 0;
}

.compat-desk-card .live-time strong {
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(22px, 1.85vw, 30px);
  line-height: 0.96;
  letter-spacing: -0.09em;
  text-overflow: clip;
  white-space: nowrap;
}

.compat-desk-card .seat-timer-label {
  display: block;
  margin-bottom: 2px;
}

.compat-desk-card .live-time small,
.compat-desk-card .desk-note {
  color: #736653;
}

.compat-desk-card .status-pill {
  background: rgba(111, 98, 83, 0.08);
  color: #756753;
}

.compat-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.compat-actions.four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compat-actions .compat-action {
  min-width: 0;
}

.compat-action {
  min-height: 36px;
  border-radius: 14px;
  background: #f5eadc;
  color: #6f4a1f;
  font-size: 11px;
  font-weight: 950;
}

.compat-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.compat-action.plus {
  background: #dff3ff;
  color: #1275a5;
}

.compat-action.pause {
  background: #ffe7c2;
  color: #a55b00;
}

.compat-action.resume,
.compat-action.start {
  background: #dff7e8;
  color: #177445;
}

.compat-action.move,
.compat-action.print {
  background: #e8f5f7;
  color: #1f758e;
}

.compat-action.note {
  background: #eee6ff;
  color: #6544b0;
}

.compat-action.stop {
  background: #ffe3df;
  color: #c93631;
}

.compat-desk-card .open-desk-button {
  background: rgba(239, 83, 80, 0.12);
  color: #b73f3c;
}

.compat-action.start {
  background: #e8f5f7;
  color: #1f758e;
}

.compat-action.muted {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.compat-action:active,
.compat-tab:active {
  transform: scale(0.95);
}

.compat-modal {
  position: fixed;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.66);
}

.compat-sheet {
  width: 100%;
  max-width: 560px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  padding: 10px 14px 14px;
  background: #0f172a;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.56);
}

@media (max-width: 559px) {
  .compat-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: center;
  }

  .compat-header .clock-card {
    min-width: 0;
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 560px) {
  .compat-desk-card {
    flex-basis: calc(33.333% - 7px);
  }

  .compat-stat {
    flex-basis: 132px;
  }
}

@media (min-width: 900px) {
  .compat-desk-card {
    flex-basis: calc(25% - 11px);
  }

  .compat-stat {
    flex: 1 1 0;
  }

  .compat-modal {
    align-items: center;
  }
}

@media (min-width: 1180px) {
  .compat-desk-card {
    flex-basis: calc(20% - 12px);
  }
}

/* Light seating-map theme for the production Vue app. */
:root {
  color-scheme: light;
  --bg: #fbf6ec;
  --panel: rgba(255, 252, 245, 0.9);
  --panel-strong: #fffaf1;
  --card: #ffffff;
  --line: #eadfce;
  --text: #35291e;
  --muted: #8b7b68;
  --soft: #6f6253;
  --emerald: #26935a;
  --emerald-bg: #e8f7ed;
  --amber: #b98116;
  --amber-bg: #fff3cd;
  --orange: #c56d1d;
  --orange-bg: #ffe9cf;
  --rose: #d94d45;
  --rose-bg: #ffe3df;
  --cyan: #2c88a2;
  --cyan-bg: #e8f5f7;
  --violet: #7256b9;
  --violet-bg: #efe9ff;
  --shadow: 0 14px 34px rgba(123, 91, 47, 0.12);
}

html,
body {
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 215, 122, 0.22), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(118, 190, 170, 0.16), transparent 30%),
    linear-gradient(180deg, #fffaf0 0%, #f7efe2 46%, #fbf6ec 100%);
  color: var(--text);
}

.app-shell {
  width: min(1360px, 100%);
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(34px + env(safe-area-inset-bottom));
}

.app-header {
  margin: 0 -12px 12px;
  background: rgba(255, 250, 241, 0.86);
  border-bottom: 1px solid rgba(218, 204, 184, 0.9);
  box-shadow: 0 10px 30px rgba(139, 100, 55, 0.1);
}

.brand-kicker {
  color: #bf7c18;
}

.brand-title {
  color: #2f251b;
  text-shadow: none;
}

.brand-subtitle,
.clock-card span,
.stat-card span,
.stat-card em,
.floor-plan-head p,
.table-zone-head p,
.seat-body small,
.records-empty,
.records-table th,
.confirm-box p,
.start-time-tip,
.preset-copy small,
.preset-button em {
  color: var(--muted);
}

.clock-card {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px rgba(117, 84, 44, 0.08);
}

.download-bridge-link {
  border-color: rgba(191, 124, 24, 0.28);
  background: linear-gradient(135deg, #fff5d8, #ffffff);
  color: #8a5712;
  box-shadow: 0 8px 18px rgba(146, 101, 42, 0.1);
}

.clock-card strong {
  color: #382a1d;
}

.stats-strip {
  margin: 0 -12px 14px;
  padding-inline: 12px;
}

.stat-card {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(123, 91, 47, 0.1);
}

.stat-card.active {
  border-color: rgba(44, 136, 162, 0.42);
  background: linear-gradient(145deg, #e8f5f7, #ffffff);
  box-shadow: 0 0 0 1px rgba(44, 136, 162, 0.08), 0 12px 28px rgba(44, 136, 162, 0.12);
}

.stat-card.neutral strong {
  color: #6f6253;
}

.floor-plan-panel {
  margin-bottom: 16px;
  border: 1px solid rgba(218, 204, 184, 0.86);
  border-radius: 30px;
  padding: 14px;
  background: rgba(255, 252, 245, 0.76);
  box-shadow: var(--shadow);
}

.floor-plan-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.floor-plan-head h2 {
  color: #33281e;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

.floor-plan-head p {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 780;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.legend-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
  color: #6f6253;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
}

.legend-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d7c8b3;
}

.legend-dot.normal::before {
  background: #55b979;
}

.legend-dot.ending::before {
  background: #efbf4e;
}

.legend-dot.timeout::before {
  background: #e46b62;
}

.plan-toggle {
  flex: none;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: #6f4a1f;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(123, 91, 47, 0.08);
}

.floor-plan-grid {
  display: grid;
  grid-template-columns: minmax(430px, 0.9fr) minmax(520px, 1.1fr);
  grid-template-areas:
    "front front"
    "left right";
  gap: 18px;
  align-items: start;
}

.table-zone {
  overflow-x: auto;
  border: 1px solid rgba(218, 204, 184, 0.84);
  border-radius: 28px;
  padding: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 241, 0.82)),
    repeating-linear-gradient(90deg, rgba(208, 166, 102, 0.04) 0, rgba(208, 166, 102, 0.04) 16px, transparent 16px, transparent 32px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.table-zone::-webkit-scrollbar {
  height: 0;
}

.front-table {
  grid-area: front;
}

.right-table {
  grid-area: right;
}

.left-table {
  grid-area: left;
}

.table-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.table-zone-head h2 {
  margin: 0;
  color: #35291e;
  font-size: 17px;
  font-weight: 950;
}

.table-zone-head p {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 760;
}

.table-zone-head span {
  flex: none;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f7ead7;
  color: #9a6928;
  font-size: 11px;
  font-weight: 950;
}

.seat-map {
  min-width: 470px;
}

.seat-map.horizontal {
  min-width: 960px;
}

.seat-row {
  display: grid;
  gap: 8px;
  justify-content: center;
}

.seat-row:empty,
.seat-col:empty {
  display: none;
}

.seat-row-top,
.seat-row-bottom {
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  margin-inline: 70px;
}

.seat-map.horizontal .seat-row-top {
  grid-auto-columns: 158px;
  margin-inline: 0;
}

.seat-map.horizontal .seat-row-bottom {
  grid-auto-columns: 158px;
  margin-inline: 0;
}

.seat-row-bottom {
  margin-top: 8px;
}

.table-middle {
  display: grid;
  grid-template-columns: 158px minmax(170px, 1fr) 158px;
  gap: 8px;
  align-items: stretch;
}

.seat-map.horizontal .table-middle {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.seat-col {
  display: grid;
  gap: 8px;
  align-content: center;
}

.table-surface {
  display: grid;
  min-height: 452px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 2px solid #d7b98c;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 247, 231, 0.96), rgba(246, 226, 197, 0.94)),
    repeating-linear-gradient(90deg, rgba(177, 125, 61, 0.06) 0, rgba(177, 125, 61, 0.06) 18px, transparent 18px, transparent 36px);
  color: #87602d;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.42);
}

.seat-map.large .table-surface {
  min-height: 560px;
}

.seat-map.horizontal .table-surface {
  min-height: 112px;
}

.table-surface strong {
  font-size: 20px;
  font-weight: 950;
}

.table-surface span {
  font-size: 12px;
  font-weight: 880;
}

.seat-card {
  position: relative;
  display: flex;
  height: 208px;
  min-height: 208px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(214, 198, 173, 0.9);
  border-radius: 24px;
  padding: 10px;
  background: #fff;
  color: #35291e;
  box-shadow: 0 12px 26px rgba(123, 91, 47, 0.1);
  touch-action: manipulation;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.seat-card:active {
  transform: scale(0.96);
}

.seat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.seat-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.seat-id {
  min-width: 0;
  font-size: 19px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.seat-status {
  border-radius: 999px;
  padding: 4px 6px;
  background: rgba(111, 98, 83, 0.08);
  color: #756753;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}

.seat-close {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 9px;
  background: #d64646;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  font-weight: 950;
  touch-action: manipulation;
  box-shadow: 0 6px 12px rgba(214, 70, 70, 0.18);
}

.seat-empty {
  display: grid;
  flex: 1;
  min-height: 118px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #a58a66;
}

.open-desk-button {
  min-width: 68px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 83, 80, 0.12);
  color: #b73f3c;
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  touch-action: manipulation;
}

.open-desk-button:active {
  transform: scale(0.96);
}

.seat-open-button {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  border-radius: 16px;
  font-size: 18px;
}

.print-bridge-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr);
  gap: 12px;
  align-items: center;
  margin: 12px 0 16px;
  border: 1px solid rgba(226, 203, 164, 0.82);
  border-radius: 24px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(134, 103, 61, 0.1);
}

.print-bridge-copy {
  display: grid;
  gap: 4px;
}

.print-bridge-copy strong {
  color: #35291e;
  font-size: 18px;
  font-weight: 950;
}

.print-bridge-copy span {
  color: #7d6e59;
  font-size: 12px;
  font-weight: 800;
}

.print-bridge-actions {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr);
  gap: 10px;
  align-items: end;
}

.print-bridge-button,
.print-bridge-health {
  min-height: 42px;
  border: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #ef5350;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 12px 24px rgba(239, 83, 80, 0.18);
}

.print-bridge-health {
  border: 1px solid rgba(226, 203, 164, 0.88);
  background: #fffaf1;
  color: #6f4a1f;
  box-shadow: none;
}

.print-bridge-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.print-bridge-button:active,
.print-bridge-health:active {
  transform: scale(0.96);
}

.seat-empty b {
  display: grid;
  width: 72px;
  height: 42px;
  place-items: center;
  border: 1px solid #b8d8bd;
  border-radius: 999px;
  background: #f0fbf2;
  color: #31804b;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

.seat-empty span,
.seat-session,
.seat-body small {
  font-size: 10px;
  font-weight: 850;
}

.seat-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.seat-main-time {
  display: grid;
  min-width: 0;
  place-items: center;
  gap: 2px;
  margin-top: 2px;
  text-align: center;
}

.seat-time-label {
  color: #7f715f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.seat-time-value {
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: #15803d;
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  line-height: 0.96;
  font-weight: 980;
  letter-spacing: -0.08em;
  text-overflow: clip;
  white-space: nowrap;
}

.seat-subline {
  display: grid;
  gap: 2px;
  min-height: 31px;
}

.seat-session {
  display: block;
  overflow: hidden;
  color: #3a2a1f;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-subline span,
.seat-note {
  display: block;
  overflow: hidden;
  color: #736653;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-note {
  min-height: 13px;
}

.seat-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-height: 48px;
}

.seat-metrics div {
  min-width: 0;
}

.seat-metrics span {
  display: block;
  overflow: hidden;
  color: #8b7b68;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-metrics strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #2f251b;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-body small {
  display: block;
  overflow: hidden;
  color: #736653;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-actions {
  display: grid;
  gap: 5px;
  margin-top: 0;
}

.seat-actions.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seat-actions.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seat-actions.four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seat-actions.five {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seat-actions.six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seat-action {
  display: grid;
  min-height: 30px;
  place-items: center;
  border-radius: 11px;
  padding: 0 3px;
  background: #f5eadc;
  color: #6f4a1f;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  touch-action: manipulation;
}

.seat-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.seat-action.spacer {
  visibility: hidden;
  pointer-events: none;
}

.seat-action:active,
.seat-close:active,
.plan-toggle:active {
  transform: scale(0.95);
}

.seat-action.plus {
  background: #dff3ff;
  color: #1275a5;
}

.seat-action.pause {
  background: #ffe7c2;
  color: #a55b00;
}

.seat-action.resume,
.seat-action.start {
  background: #dff7e8;
  color: #177445;
}

.seat-action.adjust,
.seat-action.detail {
  background: #eee6ff;
  color: #6544b0;
}

.seat-action.move,
.seat-action.print {
  background: #e8f5f7;
  color: #1f758e;
}

.seat-action.note {
  background: #fff0d7;
  color: #8a5a00;
}

.seat-action.stop {
  background: #ffe3df;
  color: #c93631;
}

.seat-action.muted {
  background: #f2eee7;
  color: #8b7b68;
}

.seat-action.danger {
  background: #d94d45;
  color: #fff;
}

.seat-status-empty {
  border-style: dashed;
  border-color: #b8d8bd;
  background: #fffef9;
}

.seat-status-preparing {
  border-color: #9ecfdb;
  background: #e8f5f7;
}

.seat-status-preparing .seat-time-value {
  color: #1f758e;
}

.seat-status-normal {
  border-color: #9fd7ad;
  background: #eefaf0;
}

.seat-status-normal .seat-time-value {
  color: #15803d;
}

.seat-status-ending {
  border-color: #eccb72;
  background: #fff5d8;
}

.seat-status-ending .seat-time-value,
.seat-status-urgent .seat-time-value {
  color: #b46a00;
}

.seat-status-urgent {
  border-color: #e7a45c;
  background: #ffefd9;
  animation: microShake 2.2s ease-in-out infinite;
}

.seat-status-timeout {
  border-color: #e69991;
  background: #ffe9e5;
  animation: timeoutPulse 1.7s ease-in-out infinite;
}

.seat-status-timeout .seat-time-value {
  color: #c93631;
}

.seat-status-infinit {
  border-color: #b9b4e8;
  background: #f0edff;
}

.seat-status-infinit .seat-time-value,
.seat-card.is-paused .seat-time-value {
  color: #5b4aa0;
}

.seat-card.is-paused {
  border-color: #b4a6d8;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(122, 97, 166, 0.08) 0,
      rgba(122, 97, 166, 0.08) 8px,
      rgba(255, 255, 255, 0.42) 8px,
      rgba(255, 255, 255, 0.42) 16px
    ),
    #f1edfb;
  animation: none;
}

.seat-status-normal .seat-status {
  background: #d9f1df;
  color: #217344;
}

.seat-status-ending .seat-status,
.seat-status-urgent .seat-status {
  background: #ffe5a3;
  color: #8a5a00;
}

.seat-status-timeout .seat-status {
  background: #ffd4cf;
  color: #b83b34;
}

.seat-status-infinit .seat-status,
.seat-card.is-paused .seat-status {
  background: #ded7fb;
  color: #5b4aa0;
}

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

.aggregate-empty {
  border-color: #d8c7ae;
  background: rgba(255, 255, 255, 0.68);
  color: #8b7b68;
}

.modal-backdrop {
  align-items: center;
  background: rgba(70, 52, 32, 0.28);
}

.sheet,
.confirm-box {
  border-color: var(--line);
  background: #fffaf1;
  color: var(--text);
  box-shadow: 0 26px 70px rgba(91, 67, 38, 0.24);
}

.sheet-handle {
  background: #d2c1aa;
}

.adjust-sheet {
  max-width: 620px;
}

.open-sheet {
  max-width: 1080px;
}

.adjust-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.adjust-summary div,
.adjust-form {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.adjust-summary span,
.adjust-summary strong,
.adjust-form label span {
  display: block;
}

.adjust-summary span,
.adjust-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.adjust-summary strong {
  overflow: hidden;
  margin-top: 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adjust-quick-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.adjust-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}

.adjust-form .time-input {
  width: 100%;
  margin-top: 7px;
}

.adjust-submit {
  min-height: 42px;
  border-radius: 15px;
  padding: 0 12px;
  background: #e8f5f7;
  color: #1f758e;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.adjust-form-note {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.45;
}

.start-time-card,
.preset-button,
.settlement-grid div,
.records-drawer {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.start-time-head span,
.preset-button em,
.records-toggle strong {
  color: var(--cyan);
}

.start-mode,
.time-nudge,
.sheet-cancel,
.confirm-cancel {
  background: #f2eee7;
  color: #6f6253;
}

.start-mode.active {
  background: #e8f5f7;
  color: #1f758e;
  box-shadow: inset 0 0 0 1px rgba(44, 136, 162, 0.12);
}

.time-input {
  border-color: var(--line);
  background: #ffffff;
  color: #35291e;
  color-scheme: light;
}

.preset-icon {
  background: #fff3dc;
}

.preset-copy strong,
.sheet-title strong,
.confirm-box h2,
.records-toggle span,
.records-table {
  color: var(--text);
}

.confirm-submit {
  background: linear-gradient(135deg, #d94d45, #ef7b6d);
}

.detail-box {
  display: grid;
  gap: 14px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-head span {
  color: #8b7b68;
  font-size: 12px;
  font-weight: 850;
}

.detail-head h2 {
  margin-top: 2px;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.detail-close {
  min-width: 72px;
  min-height: 34px;
  border-radius: 999px;
  background: #f4eadc;
  color: #6f4a1f;
  font-size: 13px;
  font-weight: 950;
}

.detail-timer {
  border: 1px solid #eadfce;
  border-radius: 24px;
  padding: 16px;
  background: #fffaf1;
  color: #2f251b;
  font-variant-numeric: tabular-nums;
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

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

.detail-cell {
  display: grid;
  gap: 5px;
  min-height: 66px;
  border: 1px solid #eadfce;
  border-radius: 18px;
  padding: 10px;
  background: #fffdf8;
}

.detail-cell span {
  color: #8b7b68;
  font-size: 11px;
  font-weight: 850;
}

.detail-cell strong {
  overflow: hidden;
  color: #35291e;
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-note {
  border-radius: 18px;
  padding: 10px 12px;
  background: #fffaf1;
  color: #756753;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

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

.detail-button {
  min-height: 44px;
  border-radius: 16px;
  background: #e8f5f7;
  color: #1f758e;
  font-size: 15px;
  font-weight: 950;
  touch-action: manipulation;
}

.detail-button.danger {
  background: #d94d45;
  color: #ffffff;
}

.detail-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.detail-button:active,
.detail-close:active {
  transform: scale(0.96);
}

.move-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.move-target {
  display: grid;
  gap: 3px;
  min-height: 62px;
  border: 1px solid rgba(226, 203, 164, 0.86);
  border-radius: 18px;
  padding: 10px;
  background: #fffaf1;
  color: #35291e;
  text-align: left;
  touch-action: manipulation;
}

.move-target strong {
  font-size: 18px;
  font-weight: 950;
}

.move-target span {
  overflow: hidden;
  color: #8b7b68;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.move-target.active {
  border-color: rgba(31, 117, 142, 0.42);
  background: #e8f5f7;
  color: #1f758e;
  box-shadow: inset 0 0 0 2px rgba(31, 117, 142, 0.12);
}

.records-table td,
.records-table th {
  border-bottom-color: #eadfce;
}

.dangerText {
  color: var(--rose);
}

@media (min-width: 620px) {
  .active-seat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .app-shell {
    padding-inline: 22px;
  }

  .app-header {
    margin-inline: -22px;
    padding-inline: 22px;
  }

  .stats-strip {
    margin-inline: 0;
    padding-inline: 0;
  }

  .active-seat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .active-seat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1079px) {
  .floor-plan-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "front"
      "left"
      "right";
  }
}

@media (max-width: 720px) {
  .print-bridge-panel {
    grid-template-columns: 1fr;
  }

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

  .floor-plan-panel {
    margin-inline: -2px;
    border-radius: 24px;
    padding: 10px;
  }

  .floor-plan-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-legend {
    justify-content: flex-start;
  }

  .table-zone {
    border-radius: 22px;
    padding: 10px;
  }

  .seat-map {
    min-width: 470px;
  }

  .seat-map.horizontal {
    min-width: 960px;
  }

  .table-middle {
    grid-template-columns: 150px minmax(170px, 1fr) 150px;
  }

  .seat-row-top,
  .seat-row-bottom {
    grid-auto-columns: 158px;
    margin-inline: 70px;
  }

  .seat-map.horizontal .seat-row-top {
    grid-auto-columns: 158px;
  }

  .seat-map.horizontal .seat-row-bottom {
    grid-auto-columns: 158px;
  }

  .seat-card {
    height: 208px;
    min-height: 208px;
    border-radius: 20px;
    padding: 10px;
  }

  .seat-id {
    font-size: 18px;
  }

  .seat-time-value {
    font-size: 26px;
  }

  .adjust-summary {
    grid-template-columns: 1fr;
  }

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

  .adjust-submit {
    width: 100%;
  }

  .modal-backdrop {
    align-items: center;
    padding: 10px;
  }

  .open-sheet {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    border-radius: 24px;
  }

  .open-sheet .sheet-title {
    display: block;
  }

  .open-sheet .start-time-card {
    display: block;
  }

  .open-sheet .start-mode-row,
  .open-sheet .time-input-row {
    margin-top: 10px;
  }

  .open-sheet .preset-list {
    grid-template-columns: 1fr;
  }
}
