:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-subtle: #F1F5F9;
  --surface-hover: #E2E8F0;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-muted: #475569;
  --text-dim: #94A3B8;
  
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-subtle: #EFF6FF;
  --primary-border: #BFDBFE;

  --emerald: #059669;
  --emerald-subtle: #ECFDF5;
  
  --red: #DC2626;
  --red-subtle: #FEF2F2;
  --red-border: #FECACA;
  
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Responsive Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-badge {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: -0.3px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
}

.brand-tagline {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

.nav-tabs-wrapper {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
}
.nav-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-tabs {
  display: inline-flex;
  background: var(--surface-subtle);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  gap: 4px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.nav-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover, .btn-primary:active {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-subtle);
}

.btn-danger-subtle {
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid var(--red-border);
}
.btn-danger-subtle:hover {
  background: #FEE2E2;
}

/* ── Main Layout ── */
main {
  flex: 1;
  padding: 24px 20px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
}

/* ── 1. Onboarding Wizard View ── */
.wizard-container {
  max-width: 860px;
  margin: 0 auto;
}

.wizard-hero {
  text-align: center;
  margin-bottom: 28px;
}

.wizard-hero-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.wizard-hero-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 620px;
  margin: 0 auto;
}

.wizard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.wizard-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.wizard-step-badge {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.wizard-step-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.industry-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.industry-card:hover {
  border-color: var(--primary-border);
  background: var(--primary-subtle);
}

.industry-card.selected {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: 0 0 0 1px var(--primary);
}

.industry-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.industry-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.industry-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.equip-checklist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.equip-item {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.equip-item:hover {
  background: var(--surface-hover);
}

.equip-item.checked {
  background: #FFFFFF;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  font-size: 11px;
}

.equip-item.checked .custom-checkbox {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

/* Custom Add Box in Wizard */
.custom-add-box {
  margin-top: 16px;
  padding: 14px;
  background: var(--surface-subtle);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.15s;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ── 2. Studio Workspace View ── */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 24px;
  align-items: start;
}

.mobile-tab-switch {
  display: none;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}

.mobile-tab-btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
}
.mobile-tab-btn.active {
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.section-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
}

.spot-card-editor {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.15s;
}

.spot-card-editor.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.spot-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.spot-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.spot-index-circle {
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 900;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spot-title-text {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}

.step-list-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.step-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-seq-pill {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Mobile Phone Simulator ── */
.phone-sticky-wrap {
  position: sticky;
  top: 80px;
}

.phone-device {
  width: 100%;
  max-width: 360px;
  height: 680px;
  background: #FFFFFF;
  border: 10px solid #1E293B;
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}

.phone-top-speaker {
  height: 22px;
  background: #1E293B;
  display: flex;
  justify-content: center;
  align-items: center;
}

.speaker-bar {
  width: 60px;
  height: 5px;
  background: #334155;
  border-radius: 10px;
}

.phone-screen-body {
  flex: 1;
  background: #F8FAFC;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.guest-header-bar {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guest-header-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}

.guest-body-content {
  padding: 16px;
  flex: 1;
}

.guest-spot-card-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.guest-badge-pill {
  font-size: 9.5px;
  font-weight: 800;
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.guest-spot-name {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
}

.guest-step-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}

.guest-step-num {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 900;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.guest-tip-card {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 11.5px;
  color: #92400E;
  line-height: 1.4;
  margin-bottom: 12px;
}

.guest-bottom-cta {
  margin-top: auto;
  padding: 14px 16px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
}

.btn-friction-alert {
  width: 100%;
  background: var(--red);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 800;
  padding: 13px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* ── 3. Print & Deployment View ── */
.print-deploy-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.deploy-guide-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.deploy-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.deploy-tip-icon {
  font-size: 18px;
  background: var(--primary-subtle);
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.print-sheet-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

/* ── 4. Friction Ledger View ── */
.ledger-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin-top: 4px;
}

.data-table-wrap {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.data-table th {
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 11.5px;
  text-transform: uppercase;
}

.badge-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}
.badge-open {
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid var(--red-border);
}
.badge-resolved {
  background: var(--emerald-subtle);
  color: var(--emerald);
  border: 1px solid #A7F3D0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
}

.reason-btn-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0;
}

.reason-btn {
  background: var(--surface-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.reason-btn.active, .reason-btn:hover {
  background: var(--red-subtle);
  border-color: var(--red);
  color: var(--red);
}

/* ══════════════════════════════════════════════ */
/* 📱 Responsive Mobile & Tablet Rules 📱 */
/* ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .equip-checklist {
    grid-template-columns: repeat(2, 1fr);
  }
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .phone-sticky-wrap {
    position: static;
    margin-top: 20px;
  }
  .print-deploy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  header {
    padding: 10px 14px;
  }
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .brand-group {
    justify-content: space-between;
  }
  .header-actions {
    display: flex;
    width: 100%;
    gap: 8px;
  }
  .header-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 10px;
  }

  main {
    padding: 16px 12px;
  }
  .wizard-hero-title {
    font-size: 21px;
  }
  .wizard-hero-desc {
    font-size: 13px;
  }
  .wizard-card {
    padding: 18px 14px;
  }
  .industry-grid {
    grid-template-columns: 1fr;
  }
  .equip-checklist {
    grid-template-columns: 1fr;
  }
  .ledger-stats-row {
    grid-template-columns: 1fr;
  }

  .mobile-tab-switch {
    display: flex;
  }
  .studio-left-col.hidden-on-mobile {
    display: none !important;
  }
  .studio-right-col.hidden-on-mobile {
    display: none !important;
  }
}

@media print {
  body * {
    visibility: hidden;
  }
  .print-sheet-card, .print-sheet-card * {
    visibility: visible;
  }
  .print-sheet-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  header, .deploy-guide-box, .nav-tabs-wrapper {
    display: none !important;
  }
}

.local-boundary {max-width:1280px;margin:16px auto 0;padding:0 24px;color:var(--text-muted);font-size:12px;line-height:1.6;}
#save-status {font-weight:600;color:#194f63;}
#save-status[data-error="true"] {color:#a12626;}
.header-actions {flex-wrap:wrap;}
.btn,.nav-tab,.reason-btn {min-height:44px;}
[role="button"]:focus-visible,[role="checkbox"]:focus-visible,button:focus-visible {outline:3px solid #2684b8;outline-offset:3px;}
.restore-label {position:relative;overflow:hidden;}
.restore-label input {position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;}
.restore-label:focus-within {outline:3px solid #2684b8;}
.print-preview-frame {width:100%;min-height:75vh;border:0;background:white;}
dialog.modal-overlay {border:0;padding:0;width:min(94vw,480px);max-height:92dvh;position:fixed;inset:0;margin:auto;background:transparent;overflow:auto;}
dialog.modal-overlay:not([open]) {display:none;}
dialog.modal-overlay[open] {display:block;}
dialog::backdrop {background:#14253888;}
.modal-card {width:100%;max-width:none;}
.data-table-wrap {overflow:auto;}
@media(max-width:480px) { .header-inner {padding:12px;}.local-boundary{padding:0 12px;} .custom-add-box{flex-wrap:wrap;} .custom-add-box input{min-width:0;} }

/* Former inline styles. Doubled class + body keeps the precedence the inline attributes had. */
body .u1.u1{display:flex;align-items:center;gap:8px}
body .u2.u2{display:none;margin-top:14px;padding:12px;background:var(--surface-subtle);border-radius:var(--radius-sm)}
body .u3.u3{font-size:12.5px;color:var(--text-muted);margin-bottom:12px}
body .u4.u4{flex:1}
body .u5.u5{flex-shrink:0}
body .u6.u6{display:grid;grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));gap:14px}
body .u7.u7{margin-top:16px;display:flex;justify-content:flex-end}
body .u8.u8{width:100%;max-width:320px;padding:12px;font-size:14.5px}
body .u9.u9{font-size:12px;color:var(--text-muted);margin-top:2px}
body .u10.u10{display:flex;gap:8px}
body .u11.u11{font-size:11.5px;padding:5px 10px}
body .u12.u12{text-align:center;font-size:12px;font-weight:800;color:var(--text-muted);margin-bottom:10px}
body .u13.u13{font-size:15.5px;font-weight:800;margin-bottom:14px;color:var(--text)}
body .u14.u14{font-size:13px;color:var(--text)}
body .u15.u15{margin-top:16px;border-top:1px solid var(--border);padding-top:14px}
body .u16.u16{width:100%;padding:12px;font-size:14px}
body .u17.u17{color:var(--red)}
body .u18.u18{font-size:18px}
body .u19.u19{padding:14px 16px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
body .u20.u20{font-size:14.5px;font-weight:800}
body .u21.u21{font-size:11.5px;color:var(--text-muted)}
body .u22.u22{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
body .u23.u23{font-size:16px;font-weight:900;color:var(--text)}
body .u24.u24{border:none;background:none;font-size:20px;cursor:pointer;color:var(--text-dim)}
body .u25.u25{font-size:12px;color:var(--text-muted);line-height:1.4}
body .u26.u26{font-size:12px}
body .u27.u27{display:flex;gap:8px;margin-top:16px}
body .u28.u28{flex:2;background:var(--red)}
body .u29.u29{border-color:var(--emerald)}
body .u30.u30{background:var(--emerald);border-color:var(--emerald)}
body .u31.u31{font-size:11px;color:var(--primary);font-weight:700;background:var(--primary-subtle);padding:2px 7px;border-radius:4px}
body .u32.u32{font-size:11px;padding:3px 8px}
body .u33.u33{display:grid;grid-template-columns:2fr 1fr;gap:8px;margin-bottom:10px}
body .u34.u34{font-size:11.5px}
body .u35.u35{padding:7px 10px;font-size:13px}
body .u36.u36{font-size:10.5px;font-weight:700;color:var(--text-muted)}
body .u37.u37{text-align:center;color:var(--text-muted);padding:24px}
body .u38.u38{color:var(--text-muted);font-size:12px}
body .u39.u39{color:var(--red);font-weight:700}
body .u40.u40{color:var(--text-muted)}
body .u41.u41{font-size:11px;padding:4px 10px}
body .u42.u42{font-size:11px;color:var(--text-dim)}

/* Spaces and plan */
.space-bar {display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:16px;}
.space-bar-label {font-weight:700;color:var(--text-muted);font-size:13px;}
.space-select {width:auto;min-width:200px;max-width:100%;flex:1 1 200px;}
.plan-chip {font-size:12px;font-weight:700;background:var(--primary-subtle);color:var(--primary);border:1px solid var(--primary-border);border-radius:999px;padding:6px 12px;}
.space-readonly {flex-basis:100%;margin:0;font-size:13px;font-weight:600;color:var(--red);background:var(--red-subtle);border:1px solid var(--red-border);border-radius:var(--radius-sm);padding:8px 12px;}

/* Upgrade dialog */
.modal-head {display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
.modal-title {font-size:18px;font-weight:800;}
.modal-close {background:none;border:0;font-size:18px;cursor:pointer;min-width:44px;min-height:44px;}
.plan-list {list-style:none;display:grid;gap:8px;margin-bottom:12px;font-size:13.5px;line-height:1.55;}
.plan-list li {background:var(--surface-subtle);border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;}
.modal-note {font-size:12.5px;color:var(--text-muted);line-height:1.55;margin-bottom:12px;}
.upgrade-buy {display:flex;justify-content:center;text-decoration:none;margin-bottom:14px;}
.upgrade-buy[aria-disabled="true"] {opacity:.55;pointer-events:none;}
#license-status {margin-top:10px;font-size:13px;font-weight:600;color:#194f63;min-height:1.2em;}
#license-status[data-error="true"] {color:#a12626;}
.btn:disabled {opacity:.55;cursor:not-allowed;}

/* Footer */
.site-footer {text-align:center;font-size:13px;color:var(--text-muted);padding:20px 16px 32px;}
.site-footer a {color:var(--primary);}

/* The hidden attribute must win over component display rules (buttons, links, notes). */
[hidden] {display:none !important;}
