/* ─── SHARED SCREEN FRAME ─────────────────────────────────────────────
   Every full-screen page (Settings and everything under it, Rewards,
   Subscription, Wellness, Discover, …) uses one frame: the app's own 900px
   column, one header, one content padding, and one set of cards, rows,
   icons and section titles. Loaded last so it is the single source of
   truth; the older per-screen classes (settings-row, profile-action-row,
   proactive-row, acct-row) all render through the rules below.
   Tokens only, so all 15 themes apply. */

:root { --screen-max: 900px; --screen-pad: 24px; }
@media (max-width: 640px) { :root { --screen-pad: 16px; } }

/* Frame: some screens live inside .app-shell (900px), others after it and
   used to span the whole window. Same column for all. */
.fullscreen { left: 0; right: 0; width: 100%; max-width: var(--screen-max); margin-inline: auto; }

/* One header */
.fullscreen > .profile-header { min-height: 56px; box-sizing: border-box; padding-inline: calc(var(--screen-pad) - 8px); flex-shrink: 0; }

/* One content area: full column width, same side padding everywhere */
.fullscreen > .profile-body,
.fullscreen > .settings-body,
.fullscreen > .blog-body,
.fullscreen > .feed-body {
  align-items: stretch; box-sizing: border-box; width: 100%;
  padding: 20px var(--screen-pad) 48px;
}
.fullscreen > .profile-body > *,
.fullscreen > .settings-body > * { flex-shrink: 0; }
.acct-body { max-width: none; margin: 0; }

/* Section titles */
.profile-section-title,
.acct-group-title,
.settings-section-title {
  align-self: stretch; font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-3); margin: 22px 0 8px; padding-left: 4px;
}
.fullscreen .profile-body > .profile-section-title:first-child { margin-top: 4px; }

/* Cards (grouped lists) */
.settings-section,
.profile-action-list,
.acct-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  margin: 0; width: 100%; box-sizing: border-box; align-self: stretch;
}
.settings-section + .settings-section,
.acct-group + .acct-group,
.profile-action-list + .profile-action-list { margin-top: 14px; }

/* Rows */
.settings-row,
.profile-action-row,
.acct-row,
.profile-action-list > .proactive-row {
  display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box;
  min-height: 56px; padding: 12px 14px !important; margin: 0 !important;
  background: none !important; border: none; border-radius: 0 !important;
  border-bottom: 1px solid var(--border); font: inherit; color: var(--text); text-align: left;
  transition: background 120ms ease-out;
}
.settings-row:first-child { border-top: none; }
.settings-row:last-child,
.profile-action-row:last-child,
.acct-row:last-child,
.profile-action-list > .proactive-row:last-child { border-bottom: none; }
button.settings-row:hover, button.profile-action-row:hover, button.acct-row:hover { background: var(--surface-2) !important; }

/* Row icons */
.settings-row-icon,
.profile-action-icon,
.acct-ico {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-ink);
}

/* Row text */
.settings-row-title, .profile-action-label, .acct-row-label { font-size: 14.5px; font-weight: 600; color: var(--text); }
.settings-row-sub, .acct-row-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.settings-row-chevron, .acct-chev { color: var(--text-3); flex-shrink: 0; }

/* Theme swatches: a hairline ring so the see-through halves read on any card */
.theme-swatch { box-shadow: inset 0 0 0 1px rgb(var(--ink-rgb) / 0.12); }

/* Phones: the frame is the whole screen; bigger touch rows */
@media (max-width: 640px) {
  .fullscreen { max-width: 100%; }
  .settings-row, .profile-action-row, .acct-row { min-height: 58px; }
  /* 8 swatches fit one row in a phone's card */
  .theme-swatch-row { gap: 7px; flex-wrap: nowrap; justify-content: center; }
  .theme-swatch { width: 32px; height: 32px; }
}

/* Centered heroes keep their centre in the full-width column */
.fullscreen > .profile-body > .profile-avatar-wrap,
.fullscreen > .profile-body > .profile-name,
.fullscreen > .profile-body > .profile-tags { align-self: center; }

/* A toggle row sitting straight in a page body is its own small card */
.fullscreen > .profile-body > .proactive-row {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; box-sizing: border-box; min-height: 56px;
}
.fullscreen > .profile-body > .proactive-row + .proactive-row { margin-top: 8px; }

/* ─── ONE ICON STYLE ──────────────────────────────────────────────────
   Every icon that sits on a tile — Simulation personas, scenarios, the
   Simulation panel, settings and account rows — is the same tile: accent
   tint, a 1px accent hairline, 12px corners (9px on small list icons), a
   line icon in the accent ink. Sizes differ by context, the look does not. */
.agent-tile, .icon-tile, .sim-card-icon, .sim-panel-avatar,
.settings-row-icon, .profile-action-icon, .acct-ico {
  background: var(--accent-soft) !important; color: var(--accent-ink) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent) !important;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-sizing: border-box;
}
.agent-tile, .icon-tile, .sim-card-icon, .sim-panel-avatar { border-radius: 12px !important; }
.icon-tile, .sim-card-icon, .sim-panel-avatar { width: 44px; height: 44px; padding: 0; font-size: 0; }
.sim-panel-avatar { width: 40px; height: 40px; }
.sim-card-icon svg, .icon-tile svg { width: 22px; height: 22px; }
.sim-scenario-card:hover .sim-card-icon { transform: none; box-shadow: none; border-color: var(--accent) !important; }
/* A destructive row keeps its red */
.acct-danger .acct-ico { background: rgba(255, 59, 48, 0.12) !important; color: #ff6b6b !important; border-color: rgba(255, 59, 48, 0.3) !important; }
.profile-action-danger .profile-action-icon { background: rgba(255, 59, 48, 0.12) !important; color: #ff6b6b !important; border-color: rgba(255, 59, 48, 0.3) !important; }

/* Sidebar header: every icon button the same ghost circle; + stays primary */
.sidebar-topbar .sidebar-icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; color: var(--text-2); }
.sidebar-topbar .sidebar-icon-btn:hover { background: rgb(var(--ink-rgb) / 0.08); color: var(--text); }

/* Crisis helpline banner (js/crisis.js): above everything, never dismissed by a tap elsewhere */
.crisis-banner {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px)); box-sizing: border-box; z-index: 100000;
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  background: var(--surface); color: var(--text); border: 1px solid var(--accent); border-radius: 14px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25); font-size: 14px; line-height: 1.45;
}
.crisis-banner-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.crisis-banner-links a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; }
.crisis-banner-close { background: none; border: 0; color: var(--text-2); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
