:root {
  color-scheme: light;
  /* ── 统一设计令牌（与小程序对齐） ── */
  --text-main: #1F2937;
  --text-sub: #6B7280;
  --text-muted: #9CA3AF;
  --bg-page: #F7F8FA;
  --bg-card: #FFFFFF;
  --bg-subtle: #F3F4F6;
  --border-color: #E5E7EB;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-tint: #EEF2FF;
  --primary-tint-border: rgba(79, 70, 229, 0.18);
  --success: #059669;
  --success-tint: #ECFDF5;
  --warning: #F59E0B;
  --warning-tint: #FFFBEB;
  --danger: #EF4444;
  --danger-tint: #FEF2F2;
  --info: #3B82F6;
  --info-tint: #EFF6FF;
  --panel: rgba(255, 255, 255, 0.96);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: var(--bg-page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  white-space: nowrap;
  cursor: pointer;
}

/* 焦点可见样式 — 无障碍 */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-main);
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.18;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.25;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.app-shell.is-platform-admin {
  display: block;
}

.app-shell.is-auth {
  display: block;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.auth-hint {
  margin: 8px 0 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--danger-tint);
  color: #B91C1C;
  font-size: 13px;
  font-weight: 700;
}

.account-bar {
  grid-column: 1 / -1;
  min-height: 56px;
  padding: 10px 30px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.account-info {
  min-width: 0;
  text-align: right;
}

.account-info strong,
.account-info span {
  display: block;
}

.account-info span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sidebar {
  min-height: 100vh;
  padding: 26px 20px;
  border-right: 1px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 700;
}

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

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand-store-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
}

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

.nav-group {
  display: grid;
  gap: 10px;
}

.nav-group-title {
  margin: 0;
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 14px;
  text-align: left;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
}

.nav-item.active {
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.mini-status {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-status-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mini-status p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.mini-status small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.mini-status.is-online p {
  color: var(--primary-dark);
}

.signal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 6px rgba(104, 116, 109, 0.12);
}

.is-online .signal {
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.12);
}

.workspace {
  min-width: 0;
  padding: 30px;
}

.platform-admin-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.platform-topbar {
  align-items: flex-start;
}

.topbar,
.panel,
.metrics-row,
.dashboard-grid,
.store-management-grid,
.store-overview-panel,
.store-operations-panel,
.store-analysis-panel,
.planning-overview-panel,
.planning-form-panel,
.planning-gate-panel,
.floor-plan-panel,
.store-work-grid,
.store-analytics-grid,
.store-operations-grid,
.store-analysis-grid,
.platform-grid,
.platform-tabs,
.platform-overview-grid,
.platform-bar-grid,
.platform-module-dock,
.platform-active-panel,
.print-stage,
.print-note {
  max-width: 1240px;
}

.topbar {
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.top-subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.eyebrow,
.panel-label {
  margin: 0 0 7px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel-hint {
  margin: 6px 0 0;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.password-field .compact-action {
  min-height: 42px;
  white-space: nowrap;
}

.top-actions,
.button-row,
.row-actions,
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-actions,
.button-row,
.row-actions {
  flex-wrap: wrap;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.compact-head {
  margin-bottom: 12px;
}

.panel {
  min-width: 0;
  margin: 0 auto 18px;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn,
.chip-btn,
.flag-btn {
  min-height: 40px;
  border-radius: var(--radius);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn {
  border: 0;
  background: var(--primary);
  color: #fff;
}

.secondary-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
}

.danger-btn {
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: var(--danger-tint);
  color: #DC2626;
}

.ghost-btn {
  border: 0;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.compact-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.plan-pill,
.status-pill,
.data-source-pill {
  border-radius: var(--radius-pill);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.plan-pill {
  background: #1F2937;
  color: #fff;
}

.status-pill,
.data-source-pill {
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.status-pill.small {
  padding: 5px 8px;
}

.api-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
}

.store-api-config {
  margin-top: 18px;
}

.store-api-config summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.store-api-config summary::-webkit-details-marker {
  display: none;
}

.store-api-config summary strong {
  display: block;
  font-size: 18px;
}

.store-api-config .panel-label {
  display: block;
  font-style: normal;
}

.store-api-config .api-controls {
  margin-top: 18px;
}

.owner-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.7fr) minmax(130px, 0.55fr) minmax(220px, 1.1fr);
  gap: 12px;
  align-items: end;
}

.wide-field {
  grid-column: span 2;
}

.inline-message {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.inline-message.muted {
  color: var(--text-sub);
}

.metrics-row {
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric span,
.metric em {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

.metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 30px;
  line-height: 1.1;
}

.dashboard-grid {
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.connection-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.connection-row span {
  color: var(--text-muted);
  font-weight: 600;
}

.connection-row strong {
  min-width: 0;
  word-break: break-all;
}

.qr-panel {
  text-align: left;
}

.access-code-panel {
  grid-column: 1 / -1;
}

.access-code-panel .section-head {
  align-items: flex-start;
}

.access-code-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.access-code-grid .connection-row {
  display: block;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-muted);
}

.access-code-grid .connection-row span,
.access-code-grid .connection-row strong {
  display: block;
}

.access-code-grid .connection-row strong {
  margin-top: 6px;
}

.generated-access-code {
  margin: 14px 0;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #fff;
}

.generated-access-code span {
  color: var(--text-muted);
  font-weight: 700;
}

.generated-access-code strong {
  min-width: 0;
  font-size: 28px;
  letter-spacing: 0;
  word-break: break-all;
}

.qr-wrap {
  width: 152px;
  aspect-ratio: 1;
  padding: 8px;
  margin: 0 auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.qr-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-missing {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.qr-caption {
  margin: 10px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.qr-link {
  max-width: 220px;
  margin: 6px auto 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  word-break: break-all;
}

.sync-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.sync-table {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.sync-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sync-row:last-child {
  border-bottom: 0;
}

.sync-row span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.sync-row strong {
  min-width: 0;
  font-size: 13px;
  word-break: break-all;
}

.json-preview {
  min-height: 100%;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-radius: var(--radius);
  background: #1F2937;
  color: #D1FAE5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.import-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.game-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.bulk-check,
.game-title-select {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.bulk-check {
  margin-right: auto;
  font-weight: 700;
  color: var(--text-main);
}

.bulk-check input,
.game-title-select input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.bulk-count {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.duplicate-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.duplicate-panel.empty {
  color: var(--text-muted);
  font-weight: 700;
}

.duplicate-panel-head,
.duplicate-group-title,
.duplicate-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.duplicate-panel-head,
.duplicate-group-title {
  justify-content: space-between;
}

.duplicate-panel-head span,
.duplicate-group-title span,
.duplicate-item span,
.duplicate-item em {
  color: var(--text-muted);
  font-size: 13px;
}

.duplicate-group {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.duplicate-items {
  display: grid;
  gap: 8px;
}

.duplicate-item {
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.duplicate-item .bulk-check {
  min-width: 220px;
  margin-right: 0;
}

.duplicate-item button {
  margin-left: auto;
}

.game-table,
.user-admin-table {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.game-head,
.game-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) 136px minmax(190px, 0.8fr) minmax(160px, 0.8fr) minmax(220px, 1fr) 190px;
  align-items: center;
  gap: 12px;
}

.game-head,
.user-admin-head {
  padding: 10px 12px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.game-row,
.user-admin-row,
.review-row,
.feedback-row,
.draft-row {
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
}

.game-row {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 10px;
}

.game-row-main,
.game-inventory-grid,
.game-rental-fields {
  display: grid;
  gap: 10px;
}

.game-row-main {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: start;
}

.game-inventory-grid {
  grid-template-columns: 90px 130px minmax(120px, 0.8fr) 90px minmax(180px, 1fr);
  align-items: end;
}

.game-rental-fields {
  display: none;
  grid-template-columns: repeat(3, minmax(160px, 0.72fr)) minmax(220px, 1fr);
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius);
  background: var(--warning-tint);
}

.game-row.is-rented .game-rental-fields,
.game-row.has-copies .game-rental-fields {
  display: grid;
}

.game-row-actions {
  justify-content: flex-end;
}

.game-title-cell {
  min-width: 0;
}

.game-title-cell strong,
.game-title-cell span,
.game-title-cell em,
.user-admin-main strong,
.user-admin-main span,
.user-admin-main em {
  display: block;
}

.game-title-cell strong,
.user-admin-main strong {
  margin-bottom: 4px;
}

.game-title-cell span,
.game-title-cell em,
.user-admin-main span,
.user-admin-main em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  word-break: break-all;
}

.user-admin-main em {
  margin-top: 4px;
  color: var(--primary-dark);
  font-weight: 700;
}

.flag-group {
  display: flex;
  gap: 6px;
}

.flag-btn {
  min-width: 38px;
  min-height: 34px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 0;
}

.flag-btn.active {
  border-color: var(--primary);
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.compact-field span {
  margin-bottom: 5px;
  font-size: 11px;
}

.compact-field input,
.compact-field select {
  height: 34px;
  padding: 0 9px;
  font-size: 13px;
}

.stock-stepper {
  display: grid;
  grid-template-columns: 28px minmax(46px, 1fr) 28px;
  gap: 4px;
}

.stock-stepper button {
  min-height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--primary-dark);
  font-weight: 700;
}

.game-copy-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.game-copy-row {
  display: grid;
  grid-template-columns: 42px 110px repeat(3, minmax(140px, 1fr)) minmax(160px, 1.2fr);
  gap: 8px;
  align-items: center;
}

.game-copy-row strong {
  color: var(--primary-dark);
  font-size: 12px;
}

.game-copy-row input,
.game-copy-row select {
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  font-size: 12px;
}

.game-copy-row.is-rented {
  padding: 6px;
  border-radius: var(--radius);
  background: #FEF3C7;
}

.add-copy-row-btn {
  justify-self: start;
}

.rental-pill.warning {
  background: var(--warning-tint);
  color: #92400E;
}

.store-overview-panel {
  margin: 0 auto 18px;
}

.planning-overview-panel,
.planning-form-panel,
.planning-gate-panel {
  margin: 0 auto 18px;
}

.store-overview-head,
.store-overview-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-overview-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.store-overview-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.store-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.store-kpi {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--border-subtle);
}

.store-kpi:last-child {
  border-right: 0;
}

.store-kpi span,
.store-kpi em {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}

.store-kpi strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 28px;
  line-height: 1.1;
}

.planning-progress {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(260px, 0.6fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.planning-progress span,
.planning-progress em {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.planning-progress strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.planning-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
}

.planning-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.planning-summary-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

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

.planning-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.planning-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.choice-field > span,
.range-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.choice-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  min-height: 34px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.choice-chip.active {
  border-color: rgba(79, 70, 229, 0.24);
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.range-control {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
}

.range-control input {
  padding: 0;
}

.range-control strong {
  display: inline-grid;
  place-items: center;
  height: 34px;
  border-radius: var(--radius);
  background: var(--primary-tint);
  color: var(--primary-dark);
  font-size: 13px;
}

.planning-actions {
  margin-top: 16px;
}

.planning-checklist {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planning-checklist span {
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.planning-checklist span.done {
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.store-operations-grid {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.store-analysis-grid {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.module-block,
.analysis-block {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.module-title {
  margin-bottom: 14px;
}

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

.module-title strong {
  font-size: 18px;
}

.module-title span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.store-management-grid {
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.table-start-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.table-start-form .primary-btn {
  grid-column: 1 / -1;
  min-height: 42px;
  width: 100%;
}

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

.active-tables-panel .table-timer-grid,
.table-timer-grid > .table-empty {
  min-height: 218px;
}

.table-timer-grid > .table-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
}

.table-timer-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.timer-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.timer-card-head h3,
.table-timer-card p {
  margin-bottom: 0;
}

.timer-clock {
  padding: 7px 10px;
  border-radius: var(--radius);
  background: #1F2937;
  color: #fff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0;
}

.timer-meta {
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timer-meta span {
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.table-timer-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.store-work-grid {
  max-width: 1240px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: minmax(380px, 0.88fr) minmax(420px, 1.12fr);
  gap: 18px;
  align-items: start;
}

.store-work-grid > .panel,
.store-analytics-grid > .panel {
  width: 100%;
  margin: 0;
}

.table-start-panel,
.active-tables-panel {
  align-self: stretch;
}

.table-start-panel .inline-message {
  margin-top: 14px;
}

.active-tables-panel .table-timer-grid {
  grid-template-columns: minmax(0, 1fr);
}

.active-tables-panel .table-empty {
  min-height: 286px;
}

.timer-form,
.inspector-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.live-session-list,
.stat-list,
.bar-list {
  display: grid;
  gap: 10px;
}

.live-session-card,
.stat-list-row {
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.live-session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.live-session-card h3,
.live-session-card p {
  margin-bottom: 0;
}

.session-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.live-session-card .row-actions {
  grid-column: 1 / -1;
}

.store-analytics-grid {
  max-width: 1240px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(380px, 1.16fr) minmax(260px, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.store-analytics-grid > .panel {
  min-height: 224px;
}

.owner-business-grid {
  max-width: 1240px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.owner-business-grid-wide {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.owner-module-dock {
  max-width: 1240px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.owner-module-button {
  min-height: 96px;
  padding: 14px;
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text-main);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.owner-module-button span,
.owner-module-button strong,
.owner-module-button em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-module-button span {
  font-size: 15px;
  font-weight: 900;
}

.owner-module-button strong {
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--primary-dark);
  font-size: 12px;
  line-height: 1.35;
}

.owner-module-button em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.owner-module-button.active {
  border-color: rgba(31, 145, 93, 0.5);
  background: #10231B;
  color: #fff;
}

.owner-module-button.active strong {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.owner-module-button.active em {
  color: rgba(255, 255, 255, 0.72);
}

.owner-detail-stage {
  max-width: 1240px;
  margin: 0 auto 18px;
}

.owner-detail-stage > .panel,
.owner-detail-stage > .store-analytics-grid {
  margin: 0;
}

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

.business-form-grid {
  margin-bottom: 16px;
}

.owner-member-list,
.owner-order-list,
.catalog-list {
  display: grid;
  gap: 10px;
}

.ops-list {
  display: grid;
  gap: 10px;
}

.owner-trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.owner-trial-banner.warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--warning-tint);
}

.owner-onboarding-checklist .ops-row.done {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.08);
}

.ops-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.ops-row span,
.ops-row em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.segmented-control button.active {
  border-color: rgba(79, 70, 229, 0.28);
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.compact-metrics-row {
  margin-top: 0;
  margin-bottom: 14px;
}

.owner-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.business-chart {
  min-height: 220px;
}

.business-bar em {
  font-size: 11px;
  white-space: nowrap;
  transform: rotate(-16deg);
  transform-origin: top left;
}

.compact-rate-row {
  grid-template-columns: minmax(0, 1fr) 120px 72px;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.catalog-row strong,
.catalog-row span,
.catalog-row em {
  display: block;
}

.catalog-row span,
.catalog-row em {
  color: var(--text-muted);
  font-size: 12px;
}

.stat-list-row {
  display: grid;
  gap: 4px;
}

.stat-list-row span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.bar-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
}

.bar-row span,
.bar-row strong {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.bar-row div {
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--info);
}

.floor-plan-panel {
  margin-bottom: 18px;
}

.floor-plan-shell {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.floor-toolbar {
  margin: -4px 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px) minmax(180px, 220px) auto;
  gap: 10px;
  align-items: center;
}

.floor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.floor-tabs button {
  min-height: 34px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.floor-tabs button.active {
  border-color: rgba(79, 70, 229, 0.28);
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.floor-shape-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.floor-shape-control span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.floor-shape-control select {
  height: 34px;
  font-size: 12px;
  font-weight: 700;
}

.room-variant-control {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.room-variant-control > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.room-variant-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-variant-tabs button {
  min-height: 34px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.room-variant-tabs button.active {
  border-color: rgba(79, 70, 229, 0.28);
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.flow-thickness-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.flow-thickness-control span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.flow-thickness-control input {
  width: 100%;
  accent-color: var(--primary);
}

.facility-palette {
  margin: -4px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.facility-palette > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.floor-board {
  position: relative;
  align-self: start;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    var(--bg-card);
  background-size: 36px 36px;
}

.room-outline {
  position: absolute;
  z-index: 0;
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}

.room-shape-fill {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(15, 23, 42, 0.92);
  border-radius: 6px;
  background:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #f7f2e8 0%, #f2ebdd 100%);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74);
  pointer-events: none;
}

.room-resize-handle {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: var(--primary);
  box-shadow: none;
  cursor: nwse-resize;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 140ms ease;
}

.room-edge-handle,
.room-edge-rotate,
.room-edge-curve,
.room-point-handle {
  position: absolute;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transition: opacity 140ms ease;
}

.room-outline:hover .room-resize-handle,
.room-outline:hover .room-edge-handle,
.room-outline:hover .room-edge-rotate,
.room-outline:hover .room-edge-curve,
.room-outline:hover .room-point-handle,
.room-outline.is-dragging .room-resize-handle,
.room-outline.is-dragging .room-edge-handle,
.room-outline.is-dragging .room-edge-rotate,
.room-outline.is-dragging .room-edge-curve,
.room-outline.is-dragging .room-point-handle {
  opacity: 1;
  pointer-events: auto;
}

.room-edge-handle {
  width: 20px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-pill);
  background: rgba(79, 70, 229, 0.78);
  box-shadow: none;
  cursor: grab;
  transform: translate(-50%, -50%);
}

.room-edge-handle:hover,
.room-edge-handle:focus-visible {
  background: rgba(79, 70, 229, 0.88);
}

.room-edge-rotate {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: var(--radius-pill);
  background: var(--warning);
  box-shadow: none;
  cursor: crosshair;
  transform: translate(-50%, -50%);
}

.room-edge-curve {
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: var(--radius-pill);
  background: #b86adf;
  box-shadow: none;
  cursor: ns-resize;
  transform: translate(-50%, -50%);
}

.room-curve-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.room-curve-path {
  vector-effect: non-scaling-stroke;
}

.room-curve-fill {
  fill: #f4ecde;
  stroke: none;
}

.room-curve-outline {
  fill: none;
  stroke: rgba(15, 23, 42, 0.98);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.room-outline.is-polygon-editable .room-shape-fill {
  border-color: transparent;
  background: transparent;
}

.room-point-handle {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: var(--info);
  box-shadow: none;
  cursor: move;
  transform: translate(-50%, -50%);
}

.floor-board.floor-shape-long .room-outline {
  min-height: 28%;
}

.floor-board.floor-shape-l-shape .room-shape-fill {
  clip-path: polygon(0 0, 100% 0, 100% 55%, 58% 55%, 58% 100%, 0 100%);
}

.floor-board.floor-shape-corner .room-shape-fill {
  clip-path: polygon(0 0, 76% 0, 76% 22%, 100% 22%, 100% 100%, 0 100%);
}

.room-outline.is-dragging .room-shape-fill {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.14);
}

.floor-board .table-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.flow-line {
  position: absolute;
  z-index: 1;
  pointer-events: auto;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.26);
  cursor: grab;
}

.main-flow {
  left: 3%;
  right: 3%;
  transform: translateY(-50%);
}

.side-flow {
  top: 8%;
  bottom: 8%;
  transform: translateX(-50%);
}

.flow-line.is-dragging {
  background: rgba(59, 130, 246, 0.2);
  cursor: grabbing;
}

.floor-node {
  position: absolute;
  z-index: 2;
  min-width: 26px;
  min-height: 26px;
  border: 2px solid rgba(71, 85, 105, 0.42);
  border-radius: 6px;
  padding: 8px;
  background: #FCFBF7;
  color: #233247;
  cursor: grab;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 3px;
  text-align: center;
  box-shadow: none;
  overflow: visible;
  touch-action: none;
  transform: rotate(var(--node-rotation, 0deg));
  transform-origin: center;
}

.floor-node.is-table {
  border-color: rgba(99, 102, 241, 0.58);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 100%);
}

.floor-node.is-room {
  align-items: start;
  justify-items: start;
  padding: 10px;
  border-color: rgba(59, 130, 246, 0.82);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92) 0%, rgba(219, 234, 254, 0.88) 100%);
}

.floor-node.is-facility {
  grid-template-rows: auto auto;
  gap: 5px;
  padding: 6px 8px 8px;
  border-color: rgba(100, 116, 139, 0.55);
  background: rgba(252, 251, 247, 0.96);
  color: #334155;
}

.floor-node.is-bean-rack {
  border-color: rgba(129, 140, 248, 0.7);
  background: rgba(238, 242, 255, 0.96);
  color: #5b55d6;
  min-height: 26px;
}

.floor-node.is-ps5,
.floor-node.is-tv {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(239, 246, 255, 0.96);
  color: #2563eb;
  min-height: 22px;
}

.floor-node.is-sofa {
  border-color: rgba(120, 113, 108, 0.52);
  background: rgba(250, 250, 249, 0.96);
  color: #57534e;
}

.floor-node.is-toilet {
  border-color: rgba(14, 165, 233, 0.64);
  background: rgba(236, 254, 255, 0.98);
  color: #0f766e;
}

.floor-node.is-stairs {
  border-color: rgba(71, 85, 105, 0.62);
  border-radius: 2px;
  background: rgba(248, 250, 252, 0.96);
  color: #334155;
}

.floor-node.is-door {
  min-width: 12px;
  min-height: 30px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 4px;
  padding: 1px 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
  color: #1F2937;
  place-items: center;
}

.floor-node.is-door span,
.floor-node.is-door em,
.floor-node.is-door i {
  display: none;
}

.floor-node.is-active {
  border-color: var(--warning);
  background: var(--warning-tint);
  box-shadow: none;
}

.floor-node.is-selected {
  z-index: 4;
  outline: 2px solid rgba(79, 70, 229, 0.55);
  outline-offset: 2px;
}

.floor-node.is-dragging {
  z-index: 5;
  cursor: grabbing;
  box-shadow: none;
}

.floor-node.shape-rounded {
  border-radius: 16px;
}

.floor-node.shape-circle {
  border-radius: var(--radius-pill);
  place-items: center;
  text-align: center;
}

.floor-node.shape-hex {
  clip-path: polygon(18% 0, 82% 0, 100% 50%, 82% 100%, 18% 100%, 0 50%);
  border-radius: 0;
}

.floor-node.shape-rect {
  border-radius: 4px;
}

.floor-node.shape-l-shape {
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 62%, 62% 100%, 0 100%);
}

.floor-node.shape-long {
  min-height: 22px;
  padding-block: 5px;
}

.floor-node.shape-long strong {
  font-size: 13px;
}

.floor-node.is-door.shape-long {
  min-height: 34px;
}

.floor-node strong,
.floor-node span,
.floor-node em,
.floor-node i {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-node .node-label {
  max-width: 100%;
  color: inherit;
  font-weight: 800;
}

.floor-node .node-label-table {
  padding: 4px 12px;
  border: 1px solid rgba(129, 140, 248, 0.26);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  line-height: 1;
}

.floor-node.shape-circle .node-label-table {
  padding: 6px 14px;
  font-size: 20px;
}

.floor-node .node-label-room {
  align-self: start;
  justify-self: start;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 13px;
  line-height: 1.1;
}

.floor-node .node-label-facility {
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.86);
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.15;
  font-size: 11px;
  font-weight: 800;
}

.floor-node .node-label-door {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  max-width: none;
  padding: 2px 7px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  transform: translateY(-50%);
}

.node-glyph {
  display: block;
  width: 72%;
  max-width: 54px;
  height: auto;
  color: currentColor;
  pointer-events: none;
}

.node-glyph * {
  vector-effect: non-scaling-stroke;
}

.floor-node.is-door .node-glyph {
  width: 100%;
  max-width: none;
  height: 100%;
}

.floor-node.is-bean-rack .node-glyph {
  width: 88%;
  max-width: 70px;
}

.floor-node.is-ps5 .node-glyph {
  max-width: 52px;
}

.floor-node.is-tv .node-glyph {
  max-width: 48px;
}

.floor-node.is-sofa .node-glyph {
  max-width: 56px;
}

.floor-node.is-toilet .node-glyph,
.floor-node.is-stairs .node-glyph {
  max-width: 34px;
}

.floor-node span,
.floor-node em {
  display: none;
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.floor-node i {
  margin-top: 0;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
  background: #1F2937;
  color: #fff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.floor-node.is-facility i {
  display: none;
}

.floor-node .node-quick-actions {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 8;
  display: flex;
  gap: 4px;
  overflow: visible;
  white-space: nowrap;
}

.floor-node.is-door .node-quick-actions {
  display: flex;
}

.floor-node .node-quick-actions span {
  display: grid;
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.floor-node.is-door .node-quick-actions span {
  display: grid;
}

.floor-node .node-quick-actions span[data-node-quick="delete"] {
  color: var(--danger);
}

.floor-node .node-rotate-handle {
  position: absolute;
  top: -34px;
  left: 50%;
  z-index: 8;
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: var(--radius-pill);
  background: var(--info);
  box-shadow: none;
  cursor: grab;
  transform: translateX(-50%);
}

.floor-node .node-rotate-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 16px;
  background: rgba(59, 130, 246, 0.42);
  transform: translateX(-50%);
}

.floor-node .node-resize-handle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  z-index: 8;
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 45%, rgba(0, 0, 0, 0.4) 46%, rgba(0, 0, 0, 0.4) 58%, transparent 59%),
    var(--primary);
  box-shadow: none;
  cursor: nwse-resize;
}

.floor-node.is-door .node-resize-handle {
  display: block;
}

.floor-inspector {
  width: 340px;
  max-width: 340px;
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-card);
}

.floor-inspector.is-collapsed {
  min-height: 96px;
}

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

.inspector-tabs {
  margin: 14px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.inspector-tabs button {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.inspector-tabs button + button {
  border-left: 1px solid var(--border-color);
}

.inspector-tabs button.active {
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.selected-timer-box {
  display: grid;
  gap: 12px;
}

.compact-inspector-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-inspector-fields select {
  height: 34px;
  font-size: 13px;
}

.wide-inspector-action {
  grid-column: 1 / -1;
}

.compact-inspector-fields input[readonly] {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.selected-timer-form {
  display: grid;
  grid-template-columns: minmax(70px, 0.7fr) minmax(120px, 1.2fr) 64px;
  gap: 8px;
  align-items: center;
}

.selected-timer-form input,
.selected-timer-form select {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  font-size: 12px;
}

.selected-timer-form button {
  grid-column: auto;
}

.reservation-timeline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  gap: 8px;
}

.reservation-timeline > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.reservation-slot {
  appearance: none;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.reservation-slot:hover {
  border-color: rgba(79, 70, 229, 0.35);
}

.reservation-slot strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.reservation-slot em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.reservation-slot.is-reserved {
  border-color: rgba(245, 158, 11, 0.42);
  background: var(--warning-tint);
}

.reservation-slot.is-occupied {
  border-color: rgba(239, 68, 68, 0.3);
  background: var(--danger-tint);
}

.selected-timer-box strong,
.selected-timer-box span {
  display: block;
}

.selected-timer-box strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
}

.selected-timer-box span,
.muted-text {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.facility-note-box strong {
  font-family: inherit;
  font-size: 18px;
}

.floor-flow-note {
  margin-top: 14px;
}

.floor-legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.floor-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.floor-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 2px solid rgba(31, 138, 91, 0.5);
  background: var(--bg-card);
}

.floor-legend .legend-floor {
  border-color: rgba(0, 0, 0, 0.25);
  background: var(--bg-subtle);
}

.floor-legend .legend-room {
  border-color: rgba(59, 130, 246, 0.6);
  background: #f5f9fb;
}

.floor-legend .legend-facility {
  border-color: rgba(245, 158, 11, 0.9);
  background: #fffaf0;
}

.floor-legend .legend-active {
  border-color: var(--warning);
  background: var(--warning-tint);
}

.rate-list,
.session-list {
  display: grid;
  gap: 10px;
}

.rate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 46px;
  gap: 10px;
  align-items: center;
}

.rate-row strong,
.rate-row span,
.session-row strong,
.session-row span {
  display: block;
}

.rate-row span,
.session-row span {
  color: var(--text-muted);
  font-size: 12px;
}

.rate-row em {
  color: var(--primary-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.rate-bar {
  height: 9px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
}

.rate-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.hour-chart {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  padding-top: 12px;
}

.hour-chart > .table-empty {
  grid-column: 1 / -1;
  align-self: stretch;
  display: grid;
  place-items: center;
}

.hour-bar {
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 18px;
  gap: 6px;
  align-items: end;
}

.hour-bar span {
  display: block;
  width: 100%;
  min-height: 6px;
  border-radius: 6px 6px 0 0;
  background: var(--info);
}

.hour-bar em {
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 54px 72px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.session-row:last-child {
  border-bottom: 0;
}

.table-empty {
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
}

.platform-message {
  max-width: 1240px;
  margin: 0 auto 18px;
}

.platform-api-config {
  padding: 0;
  overflow: hidden;
}

.platform-api-config summary,
.store-api-config summary {
  min-height: 64px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.platform-api-config .api-controls,
.store-api-config .api-controls {
  padding: 0 20px 20px;
}

.platform-tabs {
  margin: 0 auto 14px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.platform-tab,
.platform-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.platform-tab.active,
.platform-tabs button.active {
  background: var(--text-main);
  color: #fff;
}

.platform-grid {
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
}

.platform-grid.split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.platform-overview-grid {
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-action-card {
  min-height: 230px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-action-card > span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  background: var(--info-tint);
  color: var(--info);
  font-size: 12px;
  font-weight: 700;
}

.admin-action-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.admin-action-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.admin-action-card button {
  align-self: end;
  justify-self: start;
}

.admin-action-card.compact {
  background: #1F2937;
  color: #fff;
}

.admin-action-card.compact p {
  color: rgba(255, 255, 255, 0.72);
}

.platform-bar-grid {
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
  gap: 18px;
  align-items: start;
  width: 100%;
}

.platform-bar-workspace {
  gap: 14px;
}

.platform-module-dock {
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.platform-module-button {
  min-height: 94px;
  padding: 14px;
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text-main);
  box-shadow: var(--shadow);
}

.platform-module-button span,
.platform-module-button strong,
.platform-module-button em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-module-button span {
  font-size: 15px;
  font-weight: 900;
}

.platform-module-button strong {
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--primary-dark);
  font-size: 12px;
  line-height: 1.35;
}

.platform-module-button em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.platform-module-button.active {
  border-color: rgba(31, 145, 93, 0.5);
  background: #10231B;
  color: #fff;
}

.platform-module-button.active strong {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.platform-module-button.active em {
  color: rgba(255, 255, 255, 0.72);
}

.platform-active-panel {
  margin: 0 auto;
  width: 100%;
}

.platform-active-panel > .panel,
.platform-active-panel > .admin-metrics {
  margin-bottom: 0;
}

.platform-content-workspace {
  margin: 0 auto;
  width: 100%;
  display: grid;
  gap: 14px;
}

.content-audit-hero {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.content-audit-hero h2 {
  margin-bottom: 6px;
}

.content-audit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.content-audit-dock {
  margin-top: 0;
}

.metadata-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.csv-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.csv-review-sidebar,
.csv-review-main {
  min-width: 0;
  margin-bottom: 0;
}

.csv-review-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.csv-file-picker input {
  padding: 8px;
  height: auto;
}

.csv-review-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.csv-review-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.csv-review-row {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-main);
  text-align: left;
}

.csv-review-row strong,
.csv-review-row span,
.csv-review-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csv-review-row span,
.csv-review-row em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.csv-review-row.active {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.csv-review-editor {
  display: grid;
  gap: 16px;
}

.csv-review-form textarea {
  min-height: 86px;
}

.csv-review-actions {
  justify-content: flex-start;
}

.metadata-search-panel,
.metadata-editor-panel {
  min-width: 0;
  max-width: 100%;
  margin-bottom: 0;
}

.metadata-search-panel {
  position: sticky;
  top: 16px;
  align-self: start;
  width: 100%;
  justify-self: stretch;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.metadata-editor-panel {
  width: 100%;
  height: calc(100vh - 32px);
  overflow: hidden;
}

.metadata-result-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.metadata-result-row {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-main);
}

.metadata-result-row strong,
.metadata-result-row span,
.metadata-result-row em,
.metadata-review-card strong,
.metadata-review-card span,
.metadata-review-card em,
.metadata-summary strong,
.metadata-summary span {
  display: block;
}

.metadata-result-row span,
.metadata-result-row em,
.metadata-review-card span,
.metadata-review-card em,
.metadata-summary span {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.metadata-result-row.active {
  border-color: rgba(79, 70, 229, 0.34);
  background: var(--primary-tint);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.14);
}

.metadata-editor-form {
  display: grid;
  gap: 16px;
}

.metadata-editor-shell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

.metadata-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: start;
  padding-bottom: 4px;
  background: var(--bg-card);
}

.metadata-editor-toolbar-main {
  min-width: 0;
}

.metadata-editor-toolbar-actions {
  min-width: 0;
  display: grid;
  gap: 12px;
  justify-items: end;
}

.metadata-editor-toolbar-actions .row-actions {
  justify-content: flex-end;
}

.metadata-primary-actions {
  flex-wrap: nowrap;
}

.metadata-editor-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.metadata-summary {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.metadata-summary strong {
  color: var(--text-main);
  font-size: 15px;
}

.metadata-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.metadata-form-section {
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.metadata-form-section h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

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

.metadata-form-grid .full-span {
  grid-column: 1 / -1;
}

.metadata-status-row,
.metadata-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.metadata-status-row {
  justify-content: flex-end;
}

.metadata-review-card {
  min-height: 100%;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.metadata-review-card strong {
  margin-bottom: 6px;
  font-size: 13px;
}

.metadata-sync-group {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.metadata-footer-spacer {
  height: 8px;
}

.platform-side-stack {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.platform-side-stack .qr-poster-layout {
  grid-template-columns: 1fr;
}

.platform-side-stack .qr-print-card {
  max-width: 260px;
  margin: 0 auto;
}

.store-qr-panel {
  margin-bottom: 0;
}

.store-qr-panel .qr-wrap {
  max-width: 210px;
  margin-inline: auto;
}

.store-qr-panel .connection-row {
  display: none;
}

.store-qr-panel .qr-link,
.store-qr-panel .connection-row strong {
  word-break: break-all;
  overflow-wrap: anywhere;
}

.platform-owner-form {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  align-items: end;
}

.platform-owner-form .wide-field {
  grid-column: span 2;
}

.platform-owner-form .required-field span {
  display: block;
  color: var(--primary-dark);
  font-weight: 800;
}

.platform-owner-form .required-field span::after {
  content: "必填";
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(31, 145, 93, 0.12);
  color: var(--primary-dark);
  font-size: 11px;
  line-height: 1.2;
  vertical-align: middle;
}

.platform-owner-form .required-field input,
.platform-owner-form .required-field select {
  border-color: rgba(31, 145, 93, 0.55);
  background: rgba(31, 145, 93, 0.035);
}

.platform-store-picker {
  margin-bottom: 0;
}

.platform-store-picker,
.platform-bar-card,
.platform-side-stack > .panel {
  box-shadow: var(--shadow);
}

.store-picker-controls {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(360px, 1.15fr) 136px;
  gap: 12px;
  align-items: end;
}

.platform-store-list {
  margin-top: 16px;
  max-height: 620px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.platform-store-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
}

.platform-store-list-head {
  display: none;
}

.platform-store-list-row {
  min-height: 150px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: #fff;
}

.platform-store-list-row.active {
  border-color: rgba(31, 145, 93, 0.45);
  background: rgba(31, 145, 93, 0.045);
}

.platform-store-list-row > div:nth-child(1),
.platform-store-list-row > div:nth-child(2),
.platform-store-list-row > div:nth-child(3) {
  grid-column: 1 / -1;
}

.platform-store-list-row > span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
}

.platform-store-list-row > button {
  justify-self: end;
}

.platform-store-list-row strong,
.platform-store-list-row span {
  display: block;
}

.platform-store-list-row strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.platform-store-list-row span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.store-owner-cell {
  min-width: 0;
}

.store-owner-detail-card {
  margin-bottom: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.store-owner-detail-card > div:first-child span,
.store-owner-summary > strong,
.store-owner-summary > span {
  display: block;
}

.store-owner-detail-card > div:first-child span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.store-owner-detail-card > div:first-child strong {
  margin-top: 4px;
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.store-owner-summary {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.store-owner-summary > strong {
  color: var(--primary-dark);
  font-size: 13px;
  line-height: 1.35;
}

.store-owner-summary > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.store-owner-summary.compact {
  gap: 6px;
}

.store-owner-summary.compact .store-owner-chip-list {
  max-height: 76px;
  overflow: auto;
}

.store-owner-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.platform-games-panel {
  margin-top: 0;
}

.qr-poster-panel {
  margin: 0;
}

.qr-poster-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.qr-print-card {
  width: 100%;
  aspect-ratio: 9 / 13;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.qr-print-brand {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.qr-print-logo {
  width: 36px;
  height: 36px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--info);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.qr-print-logo img,
.qr-print-code img,
.qr-poster-result {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-print-brand strong,
.qr-print-brand span,
.qr-print-card p,
.qr-print-card small {
  display: block;
}

.qr-print-brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.qr-print-brand span,
.qr-print-card p,
.qr-print-card small,
.qr-poster-help p {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.qr-print-card h3 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.15;
}

.qr-print-code {
  min-height: 0;
  padding: 8px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.qr-print-code span {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.qr-poster-help {
  display: grid;
  gap: 10px;
}

.qr-poster-help strong {
  font-size: 16px;
}

.qr-poster-help p {
  margin: 0;
  max-width: 680px;
}

.qr-poster-result {
  max-width: 150px;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.table-corner-layout {
  grid-template-columns: minmax(360px, 0.9fr) minmax(300px, 1fr);
}

.table-corner-preview {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.table-corner-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.download-link {
  text-decoration: none;
}

.qr-poster-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.qr-poster-compact strong,
.qr-poster-compact p {
  display: block;
}

.qr-poster-compact strong {
  font-size: 15px;
}

.qr-poster-compact p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.admin-metrics {
  margin: 0 auto 18px;
  max-width: 1240px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.platform-overview-metrics,
.platform-overview-layout {
  width: min(100%, 1240px);
}

.platform-overview-layout {
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.platform-overview-main,
.platform-overview-store {
  min-width: 0;
  margin: 0;
}

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

.overview-shortcut {
  min-height: 118px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
}

.overview-shortcut:hover {
  border-color: rgba(79, 70, 229, 0.45);
  background: var(--bg-subtle);
}

.overview-shortcut strong,
.overview-shortcut span {
  display: block;
}

.overview-shortcut strong {
  font-size: 18px;
  line-height: 1.25;
}

.overview-shortcut span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.platform-overview-actions {
  margin-top: 12px;
}

.platform-overview-store {
  display: grid;
  gap: 14px;
}

.platform-overview-store h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.platform-overview-store dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.platform-overview-store dl div {
  padding: 10px 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.platform-overview-store dt,
.platform-overview-store dd {
  margin: 0;
}

.platform-overview-store dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.platform-overview-store dd {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
}

.user-admin-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.checkin-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.checkin-table {
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.checkin-head,
.checkin-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(90px, 0.45fr) minmax(90px, 0.45fr) minmax(120px, 0.6fr) minmax(150px, 0.75fr) minmax(140px, 0.7fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.checkin-head {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.checkin-row {
  border-top: 1px solid var(--border-subtle);
}

.checkin-row strong,
.checkin-row span {
  display: block;
}

.checkin-row strong {
  font-size: 15px;
  line-height: 1.35;
}

.checkin-row span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-maintenance {
  margin-bottom: 12px;
}

.user-admin-head,
.user-admin-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.05fr) minmax(260px, 1fr) minmax(92px, 0.42fr) minmax(100px, 0.48fr) minmax(180px, 0.72fr) 150px;
  align-items: center;
  gap: 12px;
}

.user-admin-row {
  grid-template-columns: 44px minmax(0, 1.05fr) minmax(260px, 1fr) minmax(92px, 0.42fr) minmax(100px, 0.48fr) minmax(180px, 0.72fr) 150px;
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.table-sort-btn:hover,
.table-sort-btn.active {
  color: var(--green-dark);
}

.table-sort-btn span {
  min-width: 0;
}

.table-sort-btn em {
  min-width: 24px;
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}

.user-admin-stat {
  min-width: 0;
}

.user-admin-stat strong,
.user-admin-stat span {
  display: block;
}

.user-admin-stat strong {
  font-size: 16px;
  line-height: 1.25;
}

.user-admin-stat span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.user-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}

.user-admin-bound {
  min-width: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-admin-actions {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.platform-store-list-row .store-binding-chip,
.store-binding-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 5px 4px 10px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.platform-store-list-row .store-binding-chip span,
.store-binding-chip span {
  color: var(--primary-dark);
  font-size: 12px;
  line-height: 1.25;
}

.store-binding-chip em {
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
}

.store-binding-chip button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: var(--border-subtle);
  color: var(--primary-dark);
  font-size: 15px;
  line-height: 1;
}

.muted-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.admin-pagination {
  margin-top: 14px;
  justify-content: flex-end;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(360px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.user-row:last-child {
  border-bottom: 0;
}

.user-title-cell,
.user-role-box {
  min-width: 0;
}

.user-title-cell strong,
.user-title-cell span,
.user-title-cell em,
.user-role-box > span {
  display: block;
}

.user-title-cell strong {
  font-size: 15px;
}

.user-title-cell span,
.user-title-cell em,
.user-role-box > span {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  word-break: break-all;
}

.user-title-cell em {
  margin-top: 5px;
  color: var(--primary-dark);
}

.user-role-box > span {
  margin-bottom: 8px;
}

.user-bind-btn {
  min-width: 140px;
  white-space: nowrap;
}

.role-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.role-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.role-toggle:has(input:checked) {
  border-color: rgba(79, 70, 229, 0.38);
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.2);
}

.admin-modal {
  width: min(520px, 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}

.modal-copy {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-field {
  display: grid;
  gap: 8px;
}

.modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.review-list,
.feedback-list,
.draft-list {
  display: grid;
  gap: 10px;
}

.review-row,
.feedback-row,
.draft-row {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.review-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-row strong,
.review-row span,
.review-row em,
.feedback-row strong,
.feedback-row span,
.feedback-row em,
.draft-row strong,
.draft-row span,
.draft-row em {
  display: block;
}

.review-row span,
.review-row em,
.feedback-row span,
.feedback-row em,
.draft-row span,
.draft-row em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  word-break: break-all;
}

.feedback-row,
.draft-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.feedback-row p {
  margin: 0;
  line-height: 1.55;
}

.compact-toolbar {
  grid-template-columns: minmax(220px, 320px) auto;
  justify-content: start;
}

.draft-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip-btn {
  min-height: 34px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
}

.chip-btn.active {
  border-color: var(--primary);
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.draft-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.35fr);
  gap: 12px;
  align-items: end;
}

.materials-workspace {
  background: transparent;
}

.material-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 130px minmax(280px, 1.5fr);
  gap: 14px;
  align-items: end;
}

.layout-toggle {
  min-height: 42px;
  grid-column: span 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layout-toggle button {
  height: 38px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 700;
}

.layout-toggle button.active {
  border-color: var(--primary);
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.print-note {
  margin: 0 auto 18px;
  padding: 14px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--panel);
  display: flex;
  gap: 10px;
  color: var(--text-muted);
  line-height: 1.6;
}

.print-note strong {
  flex-shrink: 0;
  color: var(--primary-dark);
}

.print-stage {
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.print-card {
  color: #1F2937;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-sticker {
  width: 100%;
  min-height: 260px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: center;
  border-top: 8px solid var(--primary);
}

.material-brand {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

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

.material-copy h2,
.box-sticker h2,
.stand-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.material-copy h2 {
  font-size: 34px;
  line-height: 1.08;
}

.material-copy p {
  margin: 10px 0 12px;
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 700;
}

.material-copy small,
.box-sticker small {
  display: inline-block;
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  background: var(--warning-tint);
  color: #92400E;
  font-weight: 700;
}

.table-sticker footer {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
}

.box-sticker {
  min-height: 170px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 122px;
  gap: 10px;
  align-items: center;
  border-left: 8px solid var(--info);
}

.box-store {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.box-sticker h2 {
  font-size: 24px;
  line-height: 1.1;
}

.box-sticker p:not(.box-store):not(.qr-caption):not(.qr-link) {
  margin: 8px 0 10px;
  color: var(--info);
  font-size: 18px;
  font-weight: 700;
}

.box-sticker .qr-wrap {
  width: 112px;
}

.stand-card {
  min-height: 430px;
  grid-column: span 2;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  border-top: 12px solid var(--danger);
}

.stand-kicker {
  margin-bottom: 14px;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 700;
}

.stand-card h2 {
  max-width: 620px;
  font-size: 48px;
  line-height: 1.05;
}

.stand-card .stand-copy > p {
  margin: 16px 0 22px;
  color: var(--danger);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.stand-card ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.stand-card li {
  position: relative;
  padding-left: 18px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.stand-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  transform: translateY(-50%);
}

.stand-card .qr-wrap {
  width: 188px;
}

.stand-card .qr-caption {
  font-size: 15px;
}

.stand-card .qr-link {
  max-width: 210px;
  font-size: 9px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 1000;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  background: #1F2937;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  box-shadow: var(--shadow);
}

.toast.is-success {
  background: #047857;
}

.toast.is-error {
  background: #B91C1C;
}

@media (max-width: 1120px) {
  .platform-module-dock {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .game-head,
  .game-row,
  .user-row,
  .feedback-row,
  .draft-row {
    grid-template-columns: 1fr;
  }

  .game-head {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-list {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  }

  .nav-item {
    text-align: center;
    padding: 0 8px;
  }

  .mini-status {
    display: none;
  }

  .workspace {
    padding: 20px;
  }

  .topbar,
  .section-head,
  .content-audit-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-audit-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  h1 {
    font-size: 28px;
  }

  .api-controls,
  .owner-form,
  .metrics-row,
  .access-code-grid,
  .admin-metrics,
  .platform-module-dock,
  .dashboard-grid,
  .store-management-grid,
  .store-work-grid,
  .store-analytics-grid,
  .floor-plan-shell,
  .floor-toolbar,
  .store-operations-grid,
  .store-analysis-grid,
  .planning-progress,
  .planning-summary-grid,
  .planning-form,
  .planning-fields,
  .platform-tabs,
  .platform-overview-grid,
  .platform-overview-layout,
  .overview-shortcut-grid,
  .platform-grid.split,
  .platform-bar-grid,
  .metadata-review-layout,
  .csv-review-layout,
  .metadata-form-grid,
  .platform-owner-form,
  .store-picker-controls,
  .platform-store-list-head,
  .platform-store-list-row,
  .store-owner-detail-card,
  .qr-poster-layout,
  .table-start-form,
  .timer-form,
  .inspector-fields,
  .table-timer-grid,
  .sync-layout,
  .library-toolbar,
  .compact-toolbar,
  .import-box,
  .user-admin-controls,
  .checkin-controls,
  .checkin-head,
  .checkin-row,
  .user-admin-head,
  .user-admin-row,
  .review-row,
  .draft-controls,
  .material-controls,
  .print-stage,
  .stand-card {
    grid-template-columns: 1fr;
  }

  .platform-module-dock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floor-shape-control {
    grid-template-columns: 1fr;
  }

  .flow-thickness-control {
    grid-template-columns: 1fr;
  }

  .floor-board {
    min-height: 460px;
  }

  .floor-inspector {
    width: 100%;
    max-width: none;
  }

  .user-admin-head {
    display: none;
  }

  .wide-field,
  .layout-toggle,
  .table-start-form .primary-btn,
  .stand-card {
    grid-column: auto;
  }

  .generated-access-code {
    grid-template-columns: 1fr;
  }

  .planning-progress {
    gap: 10px;
  }

  .store-overview-head,
  .store-overview-meta,
  .store-api-config summary,
  .metadata-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .metadata-search-panel,
  .metadata-editor-panel,
  .csv-review-sidebar,
  .csv-review-main {
    position: static;
    top: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .metadata-editor-shell {
    height: auto;
  }

  .metadata-editor-toolbar {
    position: static;
    grid-template-columns: 1fr;
    background: transparent;
  }

  .metadata-editor-toolbar-actions,
  .metadata-sync-group {
    justify-items: start;
  }

  .metadata-editor-toolbar-actions .row-actions,
  .metadata-status-row {
    justify-content: flex-start;
  }

  .metadata-primary-actions {
    flex-wrap: wrap;
  }

  .metadata-editor-scroll {
    overflow: visible;
    padding-right: 0;
  }

  .store-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-kpi {
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
  }

  .store-kpi:nth-child(2n) {
    border-right: 0;
  }

  .store-kpi:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .sync-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .rate-row,
  .session-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .rate-row em {
    text-align: left;
  }

  .hour-chart {
    overflow-x: auto;
    grid-template-columns: repeat(24, 20px);
  }

  .stand-card h2 {
    font-size: 38px;
  }

  .platform-tab {
    min-height: 38px;
  }

  .admin-action-card {
    min-height: 0;
  }
}

@page {
  size: A4;
  margin: 10mm;
}

@media print {
  :root {
    --shadow: none;
  }

  body {
    background: var(--bg-card);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .sidebar,
  .material-topbar,
  .material-controls,
  .print-note,
  .toast {
    display: none !important;
  }

  .workspace,
  .materials-workspace {
    padding: 0;
    background: var(--bg-card);
  }

  .print-stage {
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, 92mm);
    gap: 7mm;
    align-items: start;
  }

  .print-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
  }

  .table-sticker {
    width: 92mm;
    min-height: 58mm;
    padding: 5mm;
    grid-template-columns: minmax(0, 1fr) 30mm;
    gap: 4mm;
  }

  .material-copy h2 {
    font-size: 25pt;
  }

  .material-copy p {
    font-size: 15pt;
  }

  .qr-wrap {
    width: 28mm;
    padding: 1.6mm;
  }

  .box-sticker {
    width: 92mm;
    min-height: 36mm;
    padding: 4mm;
    grid-template-columns: minmax(0, 1fr) 24mm;
  }

  .box-sticker h2 {
    font-size: 18pt;
  }

  .box-sticker p:not(.box-store):not(.qr-caption):not(.qr-link) {
    font-size: 12pt;
  }

  .box-sticker .qr-wrap {
    width: 23mm;
  }

  .stand-card {
    grid-column: span 2;
    width: 190mm;
    min-height: 132mm;
    padding: 9mm;
    grid-template-columns: minmax(0, 1fr) 45mm;
  }

  .stand-card h2 {
    font-size: 37pt;
  }

  .stand-card .stand-copy > p {
    font-size: 17pt;
  }

  .stand-card li {
    font-size: 13pt;
  }

  .stand-card .qr-wrap {
    width: 42mm;
  }
}
