/* =====================================================================
   Interior Designer · stylesheet
   Indigo brand: #1B1464 (primary), #0F0E2E (hero dark)
   Accents: emerald-600 (good), red-500 (warn), amber-500 (test)
   ===================================================================== */

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 13px; color: #1f2937; background: #f3f4f6;
  /* iOS / S-Pen friendliness — disable callout, selection, overscroll bounce */
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  /* Use touch-action: none on canvas only — let toolbar/sidebar still scroll */
}
input, textarea, [contenteditable] {
  -webkit-user-select: text; user-select: text;
}
#stage, #stage-wrap { touch-action: none; }   /* canvas owns all gestures */
body { display: flex; flex-direction: column; }

/* ----- Touch-friendly hit targets (Apple HIG / Material both want ≥44px) ----- */
@media (hover: none), (pointer: coarse) {
  #topbar { min-height: 56px; padding: 8px 12px; }
  #topbar button {
    min-height: 40px; min-width: 40px;
    padding: 8px 12px; font-size: 13px;
  }
  #topbar .sep { height: 28px; }
  .lib-item {
    min-height: 44px;
    padding: 8px 10px !important;
    font-size: 13px;
  }
  .lib-cat { min-height: 40px; padding: 8px 10px !important; font-size: 12px; }
  .auth-tab, .auth-submit, .ghost-btn, .primary-btn { min-height: 44px; }
  .modal-card button { min-height: 40px; }
  .zoom-controls button { width: 40px; height: 40px; }
  .canvas-ctx button { padding: 11px 12px; font-size: 13px; }
  .design-log .dl-row .dl-restore { min-height: 36px; padding: 8px 14px; }
  /* Property fields & inputs */
  input, select, textarea, .stat-input { min-height: 38px; font-size: 13px; }
}
.hidden { display: none !important; }
.muted { color: #9ca3af; font-style: italic; font-size: 12px; }
.sep { width: 1px; height: 22px; background: #2a2480; margin: 0 6px; display: inline-block; }

button { font-family: inherit; }

/* -------- Buttons -------- */
.primary-btn {
  background: #1B1464; color: #fff; border: 1px solid #2a2480;
  padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13px;
  font-weight: 500;
}
.primary-btn:hover { background: #2a2480; }
.ghost-btn {
  background: transparent; color: #1B1464; border: 1px solid #c7d2fe;
  padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.ghost-btn:hover { background: #eef2ff; }

/* =====================================================================
   AUTH
   ===================================================================== */
.auth-body {
  background: linear-gradient(135deg, #0F0E2E 0%, #1B1464 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.auth-card {
  background: #fff; padding: 32px 40px; border-radius: 12px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.brand-mark {
  display: inline-block; width: 40px; height: 40px; line-height: 40px;
  background: #1B1464; color: #fff; border-radius: 8px;
  font-size: 20px; font-weight: 700;
}
.brand-mark.sm { width: 28px; height: 28px; line-height: 28px; font-size: 14px; }
.brand-name {
  font-size: 18px; font-weight: 700; color: #0F0E2E; margin-top: 8px;
  letter-spacing: 0.3px;
}
.brand-sub {
  font-size: 11px; color: #6b7280; margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.auth-tabs {
  display: flex; gap: 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 10px 0; background: transparent; border: none;
  cursor: pointer; font-size: 13px; color: #6b7280;
  border-bottom: 2px solid transparent;
}
.auth-tab.active { color: #1B1464; border-bottom-color: #1B1464; font-weight: 600; }
.auth-form label {
  display: block; margin-bottom: 14px; font-size: 12px;
  color: #4b5563; font-weight: 500;
}
.auth-form input {
  display: block; width: 100%; padding: 9px 11px;
  border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px;
  margin-top: 4px; font-family: inherit;
}
.auth-form input:focus { outline: 2px solid #c7d2fe; border-color: #1B1464; }
.auth-submit {
  width: 100%; padding: 11px; background: #1B1464; color: #fff;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 600; margin-top: 6px;
}
.auth-submit:hover { background: #2a2480; }
.auth-error { color: #b91c1c; font-size: 12px; margin-top: 10px; min-height: 16px; }
.auth-foot {
  text-align: center; font-size: 10px; color: #9ca3af;
  margin-top: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}

/* =====================================================================
   APP HEADER
   ===================================================================== */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; padding: 0 20px;
  background: #0F0E2E; color: #fff;
  border-bottom: 1px solid #1B1464;
}
.brand-line { display: flex; align-items: center; gap: 10px; }
.back-link {
  color: #c7d2fe; text-decoration: none; font-size: 18px;
  padding: 0 6px; line-height: 1;
}
.back-link:hover { color: #fff; }
.project-name { font-weight: 600; font-size: 14px; }
.save-state { color: #c7d2fe; font-size: 11px; margin-left: 8px; }
.save-state.dirty { color: #fbbf24; }
.save-state.saving { color: #fde047; }
.header-right { display: flex; align-items: center; gap: 10px; }
.user-menu { position: relative; }
.user-chip {
  font-size: 12px; padding: 4px 10px; padding-right: 8px;
  background: rgba(255,255,255,0.08); border-radius: 12px;
  border: none; color: #fff; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.user-chip:hover { background: rgba(255,255,255,0.16); }
.user-chip .chev-down { font-size: 9px; opacity: 0.7; }

.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.18);
  min-width: 220px; z-index: 60; padding: 6px;
}
.user-dropdown.hidden { display: none; }
.user-dropdown-head {
  padding: 10px 12px 12px; border-bottom: 1px solid #f3f4f6; margin-bottom: 4px;
}
.udh-name { font-weight: 700; color: #0F0E2E; font-size: 13px; }
.udh-email { color: #6b7280; font-size: 11px; margin-top: 1px; }
.udh-tier {
  display: inline-block; margin-top: 6px; padding: 2px 8px;
  background: #d1fae5; color: #065f46; border-radius: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
}
.user-dropdown button, .user-dropdown a {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px; border: none; background: transparent;
  font-family: inherit; font-size: 12px; color: #374151;
  border-radius: 4px; cursor: pointer; text-decoration: none;
  text-align: left;
}
.user-dropdown button:hover, .user-dropdown a:hover {
  background: #eef2ff; color: #1B1464;
}
.user-dropdown button > span:first-child,
.user-dropdown a > span:first-child { font-size: 14px; width: 18px; text-align: center; }
.user-dropdown-sep { height: 1px; background: #f3f4f6; margin: 4px 0; }
.user-email { color: #c7d2fe; margin-left: 6px; font-size: 11px; }
.app-header .ghost-btn {
  color: #fff; border-color: #2a2480; background: transparent;
}
.app-header .ghost-btn:hover { background: #1B1464; }

/* Drawing tabs strip (M3) */
.drawing-tabs-strip {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  background: #f8fafc; border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
}
.drawing-tabs { display: flex; gap: 2px; }
.drawing-tab {
  background: #fff; color: #4b5563; border: 1px solid #e5e7eb;
  padding: 6px 12px; border-radius: 5px 5px 0 0; cursor: pointer;
  font-size: 12px; font-weight: 500; font-family: inherit;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.drawing-tab:hover { background: #eef2ff; color: #1B1464; }
.drawing-tab.active {
  background: #fff; color: #1B1464; font-weight: 600;
  border-color: #c7d2fe; border-bottom-color: #fff;
  position: relative; z-index: 1;
}
.drawing-tab .dt-icon { font-size: 13px; }
.drawing-tab .tab-del { opacity: 0.4; margin-left: 4px; }
.drawing-tab .tab-del:hover { opacity: 1; color: #dc2626; }
.drawing-tabs-strip .ghost-btn.small {
  padding: 4px 10px; font-size: 11px;
}

/* Drawing-type picker */
.drawing-type-picker {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 14px;
}
.dt-card {
  border: 1px solid #e5e7eb; padding: 14px; border-radius: 8px;
  cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
.dt-card:hover {
  border-color: #1B1464; background: #eef2ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15,14,46,0.08);
}
.dt-card .dt-card-icon { font-size: 22px; }
.dt-card .dt-card-name { font-size: 12px; font-weight: 600; color: #0F0E2E; }
.dt-card .dt-card-group { font-size: 10px; color: #9ca3af; text-transform: uppercase; }

/* Floor sub-tabs strip (M3 — under drawing tabs, only when applicable) */
.floor-tabs-strip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: #f3f4f6; border-bottom: 1px solid #e5e7eb;
  font-size: 12px; min-height: 30px;
}
.floor-tabs-strip.hidden { display: none; }
.strip-label { color: #6b7280; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; margin-right: 4px; }
.floor-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.floor-tab {
  background: #fff; color: #4b5563; border: 1px solid #e5e7eb;
  padding: 3px 10px; border-radius: 4px; cursor: pointer;
  font-size: 11px; font-weight: 500; font-family: inherit;
}
.floor-tab:hover { background: #eef2ff; color: #1B1464; border-color: #c7d2fe; }
.floor-tab.active { background: #1B1464; color: #fff; border-color: #1B1464; }
.floor-tab .floor-del {
  margin-left: 4px; opacity: 0.4; font-size: 10px;
}
.floor-tab .floor-del:hover { opacity: 1; color: #fca5a5; }
.floor-tabs-strip .ghost-btn.small {
  padding: 2px 8px; font-size: 10px;
}

/* Site stats panel (in props area) */
.site-stats {
  margin: 14px 0; padding: 12px; background: #f8fafc;
  border-left: 3px solid #1B1464; border-radius: 4px;
}
.site-stats h3 {
  margin: 0 0 10px 0; font-size: 11px; font-weight: 700;
  color: #1B1464; text-transform: uppercase; letter-spacing: 0.5px;
}
.site-stats .stat-row {
  display: flex; justify-content: space-between;
  padding: 5px 0; font-size: 12px; border-bottom: 1px solid #e5e7eb;
}
.site-stats .stat-row:last-child { border-bottom: none; }
.site-stats .stat-label { color: #6b7280; }
.site-stats .stat-val { color: #0F0E2E; font-weight: 600; font-variant-numeric: tabular-nums; }
.site-stats .stat-val.warn { color: #b91c1c; }
.site-stats .stat-val.ok { color: #047857; }
.site-stats .stat-input {
  width: 80px; padding: 2px 5px; font-size: 12px;
  border: 1px solid #d1d5db; border-radius: 3px;
  font-family: inherit; text-align: right;
}

/* =====================================================================
   DASHBOARD
   ===================================================================== */
.dash-main {
  max-width: 1200px; margin: 0 auto; padding: 32px 24px;
}
.dash-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.dash-head h1 {
  margin: 0 0 4px 0; font-size: 22px; color: #0F0E2E; font-weight: 700;
}
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.project-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 0; text-decoration: none; color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  display: flex; flex-direction: column;
  border-left: 4px solid #1B1464;
  overflow: hidden;
}
.project-card:hover {
  box-shadow: 0 6px 16px rgba(15, 14, 46, 0.12);
  transform: translateY(-1px);
  border-color: #c7d2fe; border-left-color: #1B1464;
}
.card-thumb {
  height: 140px; background: #F8FAFC;
  background-size: cover; background-position: center;
  border-bottom: 1px solid #f1f5f9;
}
.card-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  color: #CBD5E1; font-size: 36px; font-weight: 700;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
}
.card-body {
  padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 4px;
}
.card-name { font-weight: 600; font-size: 14px; color: #0F0E2E; }
.card-client { font-size: 12px; color: #4b5563; }
.card-addr { font-size: 11px; color: #6b7280; line-height: 1.4; }
.card-meta {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid #f3f4f6;
  font-size: 11px; color: #9ca3af;
  display: flex; align-items: center; justify-content: space-between;
}
.card-delete {
  background: transparent; border: none; cursor: pointer;
  color: #9ca3af; padding: 2px 6px; border-radius: 4px;
  font-size: 14px;
}
.card-delete:hover { background: #fee2e2; color: #b91c1c; }

.empty-state {
  text-align: center; padding: 60px 20px; color: #6b7280;
  background: #fff; border: 1px dashed #d1d5db; border-radius: 10px;
  grid-column: 1 / -1;
}
.empty-icon { font-size: 40px; opacity: 0.3; margin-bottom: 12px; }
.empty-title { font-weight: 600; color: #4b5563; margin-bottom: 6px; font-size: 14px; }

/* =====================================================================
   EDITOR (top toolbar, library, canvas, props)
   ===================================================================== */
#topbar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 42px; padding: 5px 14px;
  background: #1B1464; color: #fff;
  border-bottom: 1px solid #2a2480;
  row-gap: 4px;
  flex-wrap: wrap;
}
#topbar .tools {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  row-gap: 4px;
  flex: 1; min-width: 0;
}
#topbar button {
  background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 8px; border-radius: 5px; cursor: pointer; font-size: 11px;
  font-family: inherit; white-space: nowrap;
}
#topbar button:hover:not(:disabled) { background: rgba(255,255,255,0.18); }
#topbar button:disabled {
  opacity: 0.4; cursor: not-allowed;
}
#topbar .hint { font-size: 11px; opacity: 0.7; margin-left: 8px; }

#layout {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  flex: 1; min-height: 0;     /* claim remaining space; shrink properly */
  height: auto;
}

#library {
  background: #fff; border-right: 1px solid #e5e7eb; overflow-y: auto;
  position: relative;
  /* Fade-out at bottom to hint "more below" when scrollable */
  background: linear-gradient(white 30%, white 70%, rgba(255,255,255,0)) top no-repeat,
              linear-gradient(rgba(255,255,255,0), white 70%) bottom no-repeat,
              linear-gradient(rgba(0,0,0,0.06), rgba(0,0,0,0)) top no-repeat,
              linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.06)) bottom no-repeat,
              #fff;
  background-size: 100% 24px, 100% 24px, 100% 6px, 100% 6px;
  background-attachment: local, local, scroll, scroll;
}
/* Super-buttons at top of library: Floor / Site / Both */
.lib-mode-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-bottom: 1px solid #e5e7eb;
}
.lib-mode-toggle.three-cols {
  grid-template-columns: 1fr 1fr 1fr;
}
.lib-mode-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 0; background: #f9fafb; border: none;
  font-family: inherit; font-size: 11px; font-weight: 600;
  color: #6b7280; cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.12s;
  letter-spacing: 0.4px; text-transform: uppercase;
}
.lib-mode-btn:hover { background: #eef2ff; color: #1B1464; }
.lib-mode-btn.active {
  background: #fff; color: #1B1464; border-bottom-color: #1B1464;
}
.lib-mode-btn .lmb-icon { font-size: 16px; }

.lib-search {
  padding: 8px; border-bottom: 1px solid #e5e7eb;
  display: flex; gap: 6px; align-items: center;
}
.lib-search input {
  flex: 1; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 4px;
  font-size: 12px; font-family: inherit;
}
.lib-toggle-all {
  flex-shrink: 0; padding: 5px 6px; font-size: 12px; font-weight: 700;
  background: #fff; border: 1px solid #d1d5db; border-radius: 4px;
  cursor: pointer; font-family: inherit;
  letter-spacing: 0; line-height: 1;
}
.lib-toggle-all:hover { background: #f9fafb; border-color: #c7d2fe; }
.lib-toggle-all .ta-collapsed { color: #CD2054; }   /* matches collapsed chev */
.lib-toggle-all .ta-expanded  { color: #1E9E3C; }   /* matches expanded chev */

/* Clear button in LHS panel — context-aware action for the active drawing */
.lib-clear-btn {
  display: block; width: calc(100% - 16px); margin: 0 8px 8px 8px;
  padding: 6px 10px; font-size: 11px; font-family: inherit;
  background: #fff; color: #991B1B;
  border: 1px solid #fecaca; border-radius: 4px; cursor: pointer;
  font-weight: 600; letter-spacing: 0.3px;
  transition: all 0.1s;
}
.lib-clear-btn:hover { background: #fee2e2; border-color: #fca5a5; }
.lib-cat {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; font-size: 10px; font-weight: 700; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.5px;
  background: #f9fafb; border-bottom: 1px solid #e5e7eb;
  cursor: pointer; user-select: none;
  transition: background 0.1s;
}
.lib-cat:hover { background: #eef2ff; color: #1B1464; }
.lib-cat .chev { font-size: 11px; transition: color 0.1s; width: 10px; font-weight: 700; }
.lib-cat .chev.expanded { color: #1E9E3C; }     /* expanded = green */
.lib-cat .chev.collapsed { color: #CD2054; }    /* collapsed = pink/red */
.lib-cat .cat-count { color: #9ca3af; font-weight: 500; margin-left: auto; font-size: 10px; }
.lib-cat-body.collapsed { display: none; }
.lib-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; cursor: pointer; border-bottom: 1px solid #f3f4f6;
  font-size: 12px;
}
.lib-item:hover { background: #eef2ff; }
.lib-item .icon { width: 18px; text-align: center; font-size: 14px; }
.lib-item .meta { color: #9ca3af; font-size: 10px; margin-left: auto; }

#stage-wrap { position: relative; background: #e5e7eb; }
#stage { width: 100%; height: calc(100% - 26px); background: #fafafa; }
#status-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 26px; background: #0F0E2E; color: #d1d5db;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; font-size: 11px;
}

#props { background: #fff; border-left: 1px solid #e5e7eb; overflow-y: auto; }
.props-title {
  padding: 10px 12px; font-weight: 700; font-size: 12px;
  color: #1B1464; border-bottom: 1px solid #e5e7eb;
  text-transform: uppercase; letter-spacing: 0.5px;
}
#props-body { padding: 12px; }
.prop-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.prop-row label { width: 70px; font-size: 11px; color: #6b7280; }
.prop-row input, .prop-row select {
  flex: 1; padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 12px;
  font-family: inherit;
}
.prop-section {
  margin-top: 12px; padding-top: 8px; border-top: 1px solid #f3f4f6;
}
.prop-section .ph {
  font-size: 11px; font-weight: 700; color: #1B1464; margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.btn-replace {
  width: 100%; padding: 6px; background: #eef2ff; border: 1px solid #c7d2fe;
  color: #1B1464; border-radius: 4px; cursor: pointer; font-size: 11px;
  font-family: inherit;
}
.btn-replace:hover { background: #e0e7ff; }

/* =====================================================================
   MODALS
   ===================================================================== */
.modal {
  position: fixed; inset: 0; background: rgba(15, 14, 46, 0.6);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  padding: 20px;
}
.modal-card {
  background: #fff; padding: 24px; border-radius: 10px;
  min-width: 460px; max-width: 600px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.modal-card.wide { max-width: 720px; }
.modal-card.very-wide { max-width: 1280px; }
.sub-billing-pill {
  background: #1B1464; color: #fff;
  padding: 5px 12px; border-radius: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.4px;
}

/* ==================== 4-TIER CANDY GRID ==================== */
.tier-grid-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  max-height: 76vh; overflow-y: auto; padding: 6px 4px;
}
@media (max-width: 1200px) { .tier-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .tier-grid-4 { grid-template-columns: 1fr; } }

.tier-card-v2 {
  position: relative; border-radius: 14px;
  padding: 18px 18px 16px 18px;
  display: flex; flex-direction: column;
  border: 1px solid; font-size: 12px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tier-card-v2:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); }

/* FREE — neutral white/gray */
.tc-free        { background: #fff; border-color: #e5e7eb; }
.tc-free .tc-cap{ color: #6b7280; }
.tc-free .tc-section { color: #6b7280; }

/* PRO — cream / amber */
.tc-pro         { background: #fffbeb; border-color: #fde68a; }
.tc-pro .tc-cap { color: #b45309; }
.tc-pro .tc-section { color: #b45309; }

/* STUDIO — light purple, accentuated as "most popular" */
.tc-studio      {
  background: #f5f3ff; border-color: #a78bfa; border-width: 2px;
  transform: scale(1.02);
}
.tc-studio:hover { transform: scale(1.02) translateY(-2px); }
.tc-studio .tc-cap { color: #6d28d9; }
.tc-studio .tc-section { color: #6d28d9; }

/* NEXT — mint */
.tc-next        { background: #f0fdf4; border-color: #86efac; }
.tc-next .tc-cap{ color: #047857; }
.tc-next .tc-section { color: #047857; }

/* Floating top-right pills */
.tc-pop, .tc-coming {
  position: absolute; top: -10px; right: 16px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.6px;
  padding: 4px 10px; border-radius: 12px; text-transform: uppercase;
}
.tc-pop {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); color: #fff;
  box-shadow: 0 3px 8px rgba(109, 40, 217, 0.3);
}
.tc-coming { background: #fef3c7; color: #92400e; }

/* Card top section */
.tc-cap {
  font-weight: 700; letter-spacing: 1px; font-size: 11px;
  text-transform: uppercase;
}
.tc-price {
  font-size: 24px; font-weight: 700; color: #0F0E2E;
  margin-top: 2px; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; flex-wrap: wrap;
}
.tc-price > span {
  font-size: 11px; font-weight: 500; color: #9ca3af; margin-left: 6px;
  text-transform: lowercase;
}
.tc-meta {
  font-size: 11px; color: #6b7280; margin-top: 1px;
}
.tc-tagline {
  font-size: 11px; color: #4b5563; margin-top: 8px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,0.06);
  line-height: 1.45; font-style: italic;
}
.tc-section {
  font-weight: 700; font-size: 9.5px; letter-spacing: 0.7px;
  text-transform: uppercase; margin-top: 12px; margin-bottom: 5px;
}
.tc-list {
  list-style: none; margin: 0; padding: 0;
  font-size: 11.5px; line-height: 1.55; color: #374151;
}
.tc-list li {
  padding: 1.5px 0 1.5px 18px; position: relative;
}
.tc-list li:before {
  content: '✓'; position: absolute; left: 0;
  color: #1E9E3C; font-weight: 700; font-size: 12px;
}
.tc-not                { color: #9ca3af !important; }
.tc-list.tc-not-list li:before { content: '×'; color: #CD2054; }
.tc-list-planned li:before     { content: '○'; color: #047857; font-weight: 600; }

.tc-cta {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.tc-btn {
  width: 100%; padding: 10px; border: none; border-radius: 8px;
  font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  color: #fff; transition: all 0.12s;
  letter-spacing: 0.3px;
}
.tc-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,0.18); }
.tc-current {
  background: #d1fae5 !important; color: #065f46 !important;
  cursor: not-allowed; box-shadow: none !important; transform: none !important;
}
.tc-buy-pro {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.tc-buy-studio {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}
.tc-notify {
  background: #fff; border: 1px solid #86efac; color: #047857;
}
.tc-notify:hover { background: #f0fdf4; }

/* ==================== SUBSCRIPTION TIER GRID ==================== */
.sub-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.sub-current { font-size: 12px; color: #6b7280; }
.sub-current-pill {
  background: #d1fae5; color: #065f46; padding: 3px 10px;
  border-radius: 12px; font-weight: 700; font-size: 11px;
}
.tier-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  max-height: 70vh; overflow-y: auto; padding: 4px;
}
@media (max-width: 1000px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card {
  position: relative; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px;
  display: flex; flex-direction: column;
}
.tier-card.tier-pro {
  border-color: #1B1464; border-width: 2px;
  box-shadow: 0 12px 28px rgba(15, 14, 46, 0.12);
  transform: scale(1.02);
}
.tier-card.tier-next {
  background: linear-gradient(135deg, #f9fafb 0%, #fff 100%);
  border-style: dashed; opacity: 0.95;
}
.tier-most-popular, .tier-coming {
  position: absolute; top: -10px; right: 16px;
  font-size: 9px; font-weight: 700; padding: 4px 10px;
  border-radius: 10px; letter-spacing: 0.6px;
}
.tier-most-popular {
  background: linear-gradient(135deg, #1B1464 0%, #2a2480 100%); color: #fff;
}
.tier-coming { background: #fef3c7; color: #92400e; }

.tier-head { padding-bottom: 14px; border-bottom: 1px solid #f3f4f6; }
.tier-name {
  font-size: 11px; font-weight: 700; color: #6b7280;
  letter-spacing: 1px; text-transform: uppercase;
}
.tier-price {
  font-size: 28px; font-weight: 700; color: #0F0E2E; margin-top: 4px;
  display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums;
}
.tier-price-sub {
  font-size: 11px; font-weight: 500; color: #9ca3af;
  text-transform: lowercase; letter-spacing: 0;
}
.tier-tag {
  font-size: 11px; color: #4b5563; margin-top: 2px; font-style: italic;
}
.tier-features {
  list-style: none; padding: 14px 0 0 0; margin: 0; flex: 1;
  font-size: 12px; line-height: 1.55; color: #374151;
}
.tier-features li { padding: 2px 0; }
.tier-features li.tier-feature-h {
  font-weight: 700; color: #1B1464; margin-bottom: 4px; padding-top: 0;
}
.tier-features li:not(.tier-feature-h):first-letter { font-weight: 700; }
.tier-cta { padding-top: 14px; border-top: 1px solid #f3f4f6; margin-top: 14px; }
.tier-btn {
  width: 100%; padding: 10px; border: none; border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.12s;
}
.tier-current-btn {
  background: #d1fae5; color: #065f46; cursor: not-allowed;
}
.tier-buy-btn {
  background: linear-gradient(135deg, #1B1464 0%, #2a2480 100%); color: #fff;
}
.tier-buy-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(15,14,46,0.25); }
.tier-notify-btn {
  background: #fff; border: 1px solid #fcd34d; color: #92400e;
}
.tier-notify-btn:hover { background: #fef3c7; }
.tier-fine {
  font-size: 10px; color: #9ca3af; text-align: center;
  margin-top: 6px; font-style: italic;
}
.modal-title {
  font-weight: 700; font-size: 14px; color: #1B1464; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.modal-card label {
  display: block; margin-bottom: 12px; font-size: 12px;
  color: #4b5563; font-weight: 500;
}
.modal-card input, .modal-card textarea {
  display: block; width: 100%; padding: 7px 9px;
  border: 1px solid #d1d5db; border-radius: 5px; font-size: 13px;
  margin-top: 4px; font-family: inherit;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.modal-hint { margin-top: 10px; font-size: 11px; }

#voice-text {
  width: 100%; padding: 8px; border: 1px solid #d1d5db; border-radius: 4px;
  font-size: 13px; font-family: inherit; resize: vertical; margin-bottom: 8px;
}
#voice-status {
  font-size: 12px; color: #6b7280; margin-bottom: 8px; min-height: 18px;
}
#voice-modal .modal-actions button {
  padding: 6px 12px; background: #1B1464; color: #fff;
  border: none; border-radius: 4px; cursor: pointer; font-size: 12px;
  font-family: inherit;
}

/* Versions list */
.versions-list {
  max-height: 50vh; overflow-y: auto; margin: 8px 0;
}
.version-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px; border-bottom: 1px solid #f3f4f6;
}
.version-row:last-child { border-bottom: none; }
.version-info { flex: 1; }
.version-name { font-weight: 600; color: #0F0E2E; font-size: 13px; }
.version-meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.version-notes { font-size: 12px; color: #4b5563; margin-top: 4px; }
.version-actions { display: flex; gap: 6px; }
.version-actions button {
  padding: 5px 10px; font-size: 11px; border-radius: 4px;
  font-family: inherit; cursor: pointer;
}
.btn-restore {
  background: #1B1464; color: #fff; border: 1px solid #1B1464;
}
.btn-restore:hover { background: #2a2480; }

/* =====================================================================
   AUDIT MODAL (M7)
   ===================================================================== */
.method-picker {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  padding: 10px 12px; margin-bottom: 10px;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px;
  font-size: 12px;
}
.method-picker .method-label {
  font-weight: 700; color: #1B1464; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.method-picker label {
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; color: #4b5563;
}
.method-picker input[type=radio] { cursor: pointer; }

.audit-summary {
  display: flex; gap: 16px; margin-bottom: 12px; padding: 10px;
  background: #f8fafc; border-left: 3px solid #1B1464; border-radius: 4px;
  font-size: 13px;
}
.audit-summary .pill {
  padding: 4px 10px; border-radius: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums; font-size: 12px;
}
.audit-summary .pill.pass { background: #d1fae5; color: #065f46; }
.audit-summary .pill.warn { background: #fef3c7; color: #92400e; }
.audit-summary .pill.fail { background: #fee2e2; color: #991b1b; }

.audit-tabs {
  display: flex; gap: 2px; border-bottom: 1px solid #e5e7eb; margin-bottom: 10px;
}
.audit-tab {
  background: transparent; border: none; padding: 8px 14px; cursor: pointer;
  font-size: 12px; color: #6b7280; font-family: inherit;
  border-bottom: 2px solid transparent;
}
.audit-tab:hover { color: #1B1464; }
.audit-tab.active { color: #1B1464; border-bottom-color: #1B1464; font-weight: 600; }

.audit-results { max-height: 50vh; overflow-y: auto; padding-right: 6px; }
.audit-row {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}
.audit-row:last-child { border-bottom: none; }
.audit-row .badge {
  flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; margin-top: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff; font-weight: 700;
}
.audit-row .badge.pass { background: #1E9E3C; }
.audit-row .badge.warn { background: #f59e0b; }
.audit-row .badge.fail { background: #CD2054; }
.audit-row .info { flex: 1; }
.audit-row .info .row-title { font-weight: 600; color: #0F0E2E; font-size: 13px; }
.audit-row .info .row-meta { color: #9ca3af; font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }
.audit-row .info .row-detail { color: #4b5563; font-size: 12px; margin-top: 4px; line-height: 1.4; }

/* =====================================================================
   COPILOT MODAL (M7)
   ===================================================================== */
#copilot-question {
  width: 100%; padding: 8px; border: 1px solid #d1d5db; border-radius: 4px;
  font-size: 13px; font-family: inherit; resize: vertical; margin-bottom: 8px;
}
.copilot-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.suggest-chip {
  background: #eef2ff; color: #1B1464; border: 1px solid #c7d2fe;
  padding: 5px 10px; border-radius: 14px; font-size: 11px; cursor: pointer;
  font-family: inherit;
}
.suggest-chip:hover { background: #e0e7ff; }
.copilot-reply {
  max-height: 50vh; overflow-y: auto; padding: 12px;
  background: #f8fafc; border-radius: 6px; font-size: 13px; line-height: 1.5;
  border: 1px solid #e5e7eb;
  display: none;
}
.copilot-reply.show { display: block; }
.copilot-reply p { margin: 0 0 10px 0; }
.copilot-reply h1, .copilot-reply h2, .copilot-reply h3 {
  margin: 14px 0 8px 0; color: #1B1464;
}
.copilot-reply h1 { font-size: 15px; }
.copilot-reply h2 { font-size: 14px; }
.copilot-reply h3 { font-size: 13px; }
.copilot-reply ul, .copilot-reply ol { margin: 0 0 10px 18px; padding: 0; }
.copilot-reply li { margin-bottom: 4px; }
.copilot-reply code { background: #e5e7eb; padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.copilot-reply pre { background: #0F0E2E; color: #c7d2fe; padding: 10px; border-radius: 4px; overflow-x: auto; font-size: 11px; }
.copilot-usage { font-size: 10px; color: #9ca3af; text-align: right; margin-top: 8px; font-style: italic; }
.copilot-loading { color: #6b7280; font-style: italic; padding: 20px; text-align: center; }

/* =====================================================================
   TEMPLATES PICKER
   ===================================================================== */
.templates-grid {
  max-height: 65vh; overflow-y: auto; padding: 4px;
}
.tpl-segment-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px 6px 4px;
  border-bottom: 1px solid #e5e7eb;
  margin: 12px 0 8px 0;
  font-size: 11px; font-weight: 700; color: #1B1464;
  text-transform: uppercase; letter-spacing: 0.5px;
  cursor: pointer; user-select: none;
  transition: background 0.1s;
}
.tpl-segment-header:hover { background: #eef2ff; }
.tpl-segment-header .chev {
  font-size: 11px; font-weight: 700; width: 10px; transition: color 0.1s;
}
.tpl-segment-header .chev.expanded { color: #1E9E3C; }
.tpl-segment-header .chev.collapsed { color: #CD2054; }
.tpl-segment-grid.collapsed { display: none; }
/* Title row in templates modal so the toggle button can sit in the corner */
.modal-title-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.tpl-segment-header:first-child { margin-top: 0; }
.tpl-segment-count {
  margin-left: auto; padding: 2px 8px; font-size: 10px;
  background: #eef2ff; color: #1B1464; border-radius: 10px; font-weight: 700;
}
.tpl-segment-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.template-card {
  border: 1px solid #e5e7eb; padding: 14px; border-radius: 8px;
  cursor: pointer; background: #fff; transition: all 0.12s;
  display: flex; flex-direction: column; gap: 4px;
}
.template-card:hover {
  border-color: #1B1464; background: #eef2ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(15,14,46,0.10);
}
.template-card.blank-card {
  background: linear-gradient(135deg, #f9fafb 0%, #fff 100%);
  border-style: dashed; border-color: #c7d2fe;
}
.template-card.pro-card {
  position: relative;
  opacity: 0.6;
  background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
  cursor: not-allowed;
  filter: saturate(0.6);
}
.template-card.pro-card:hover {
  opacity: 0.85; filter: saturate(0.9);
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  transform: none;
}
.tc-pro-badge {
  position: absolute; top: 6px; right: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  letter-spacing: 0.5px; text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.4);
}
.template-card .tc-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.template-card .tc-icon { font-size: 22px; }
.template-card .tc-name { font-size: 13px; font-weight: 700; color: #0F0E2E; flex: 1; }
.template-card .tc-area { font-size: 10px; color: #fff; padding: 2px 7px; background: #1B1464; border-radius: 10px; font-weight: 600; }
.template-card .tc-desc { font-size: 11px; color: #4b5563; line-height: 1.4; }
.template-card .tc-tags {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
}
.template-card .tc-tag {
  font-size: 9px; color: #6b7280; padding: 1px 6px;
  background: #f3f4f6; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.4px;
}

/* =====================================================================
   SUN-PATH PANEL (M7+)
   ===================================================================== */
.sun-panel {
  position: fixed !important;
  left: auto !important;
  right: 300px !important;
  top: 110px !important;
  width: 320px;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  border: 1px solid #fde68a; border-radius: 10px;
  box-shadow: 0 14px 30px rgba(202, 138, 4, 0.25);
  z-index: 50;
  display: flex; flex-direction: column;
  max-height: 75vh;
}
@media (max-width: 1100px) {
  .sun-panel { right: 14px !important; top: 90px !important; width: min(320px, calc(100vw - 28px)); }
}
.sun-panel.hidden { display: none; }
.sun-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #fde68a;
  background: #fef3c7; border-radius: 10px 10px 0 0;
}
.sun-panel-title { font-weight: 700; color: #78350f; font-size: 13px; }
.sun-panel-body { padding: 14px 16px; overflow-y: auto; }
.sun-row { margin-bottom: 12px; }
.sun-row label {
  display: block; font-size: 11px; color: #78350f;
  font-weight: 600; margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.sun-row input[type=number] {
  width: 80px; padding: 4px 6px; font-size: 12px;
  border: 1px solid #fcd34d; border-radius: 4px;
  font-family: inherit;
}
.sun-row input[type=range] { width: 100%; cursor: pointer; }
.sun-row input[type=checkbox] { vertical-align: middle; margin-right: 4px; }
.sun-hint { font-size: 11px; color: #92400e; margin-left: 8px; }
.sun-readout { font-size: 11px; color: #92400e; font-variant-numeric: tabular-nums; margin-left: 4px; }
.season-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.season-chip {
  padding: 4px 10px; border-radius: 12px; font-size: 11px;
  background: #fff; border: 1px solid #fcd34d;
  color: #78350f; cursor: pointer; font-family: inherit;
}
.season-chip:hover { background: #fef3c7; }
.season-chip.active { background: #f59e0b; color: #fff; border-color: #d97706; }
.sun-stats {
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 6px;
  padding: 8px 10px; font-size: 11px; color: #7c2d12; line-height: 1.6;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.sun-stats .stat-row {
  display: flex; justify-content: space-between; padding: 1px 0;
}
.sun-stats .stat-row .lbl { color: #92400e; }
.sun-stats .stat-row .val { font-weight: 700; color: #7c2d12; }
.sun-panel .ghost-btn.small { padding: 2px 8px; font-size: 11px; }

/* =====================================================================
   Inline dimension input (overlay on canvas)
   ===================================================================== */
.dim-input {
  position: absolute; z-index: 50;
  width: 70px; padding: 2px 4px;
  border: 1px solid #1B1464; border-radius: 3px;
  font-size: 12px; text-align: center;
  background: #fff; color: #1B1464; font-weight: 700;
  font-family: inherit;
}

/* ---------- OAuth buttons ---------- */
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 14px; margin: 6px 0 0;
  background: #fff; border: 1px solid #DADCE0; border-radius: 8px;
  font: 600 14px/1 'Google Sans', system-ui, -apple-system, sans-serif;
  color: #3C4043; text-decoration: none; cursor: pointer;
  transition: background .12s, box-shadow .12s, border-color .12s;
}
.oauth-btn:hover { background: #F8F9FA; border-color: #C6C8CC; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.oauth-btn:active { background: #F1F3F4; }
.oauth-btn svg { flex-shrink: 0; }

.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 6px; color: #94A3B8;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: #E2E8F0;
}

/* ---------- Pro badge on library items ---------- */
.lib-item .pro-badge {
  display: inline-block;
  font-size: 9px; font-weight: 700; letter-spacing: 0.4px;
  padding: 1px 5px; border-radius: 3px;
  background: rgba(27, 20, 100, 0.10);
  color: #1B1464;
  margin-left: auto; margin-right: 4px;
  vertical-align: middle;
  text-transform: uppercase;
}
.lib-item.is-pro .icon { position: relative; }

/* ---------- Pro-gate subscription modal ---------- */
.pro-gate-modal { position: fixed; inset: 0; z-index: 99999; }
.pro-gate-modal.hidden { display: none; }
.pro-gate-modal .pgm-backdrop {
  position: absolute; inset: 0; background: rgba(15, 14, 46, 0.55);
  backdrop-filter: blur(2px);
}
.pro-gate-modal .pgm-card {
  position: relative; max-width: 440px; margin: 8vh auto 0;
  background: white; border-radius: 16px;
  padding: 32px 32px 24px;
  box-shadow: 0 24px 64px rgba(15, 14, 46, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.pro-gate-modal .pgm-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #1B1464, #4338CA);
  color: white; font-size: 22px; font-weight: 700;
  margin-bottom: 12px;
}
.pro-gate-modal h2 {
  margin: 0 0 8px; font-size: 20px; font-weight: 700; color: #0F0E2E;
  letter-spacing: -0.2px;
}
.pro-gate-modal .pgm-body {
  margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: #475569;
}
.pro-gate-modal .pgm-price {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 16px; margin: 0 0 16px;
  background: #F8FAFC; border-left: 4px solid #1B1464; border-radius: 8px;
}
.pro-gate-modal .pgm-price .amount {
  font-size: 28px; font-weight: 800; color: #0F0E2E; font-variant-numeric: tabular-nums;
}
.pro-gate-modal .pgm-price .lifetime {
  font-size: 11px; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.pro-gate-modal .pgm-list {
  list-style: none; padding: 0; margin: 0 0 22px;
  font-size: 13px; color: #334155;
}
.pro-gate-modal .pgm-list li {
  padding: 6px 0 6px 24px; position: relative;
}
.pro-gate-modal .pgm-list li::before {
  content: '✓'; position: absolute; left: 4px; top: 6px;
  color: #1E9E3C; font-weight: 700; font-size: 13px;
}
.pro-gate-modal .pgm-actions {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.pro-gate-modal .pgm-go {
  flex: 1; padding: 12px 16px;
  background: #1B1464; color: white; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .12s;
}
.pro-gate-modal .pgm-go:hover { background: #261A82; }
.pro-gate-modal .pgm-go:disabled { opacity: 0.6; cursor: wait; }
.pro-gate-modal .pgm-later {
  padding: 12px 16px;
  background: white; color: #64748B; border: 1px solid #E2E8F0; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.pro-gate-modal .pgm-later:hover { background: #F8FAFC; }
.pro-gate-modal .pgm-mini {
  font-size: 11px; color: #94A3B8; text-align: center;
}
.pro-gate-modal .pgm-mini a { color: #1B1464; text-decoration: none; font-weight: 600; }
.pro-gate-modal .pgm-mini a:hover { text-decoration: underline; }
