/* /account/settings/: app shell (top bar, 224px workspace sidebar), section nav, icon-header cards. Colors come from tokens only. Smallest text is 14px. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font, system-ui, sans-serif); font-size: var(--fs-body); line-height: 1.5; color: var(--text); background: var(--bg); }
button, input, textarea, select { font: inherit; }
a { color: var(--accent); }
.st-loading { padding: 24px; color: var(--text-muted); }

.st-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 72px; padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.st-top-left, .st-top-right { display: flex; align-items: center; gap: 12px; }
.st-burger, .st-scrim { display: none; }
.st-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: var(--fs-h3); font-weight: 650; text-decoration: none; }
.st-open-editor { display: inline-flex; white-space: nowrap; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); font-size: var(--fs-small); text-decoration: none; }
.st-open-editor:hover { background: var(--surface-2); }

.st-layout { display: grid; grid-template-columns: 288px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.st-side { position: sticky; top: 72px; height: calc(100vh - 72px); align-self: start; display: flex; flex-direction: column; padding: 20px 12px 16px; border-right: 1px solid var(--border); background: var(--surface); }
.st-side ul { margin: 0; padding: 0; list-style: none; flex: 1; }
.st-side-title { margin: 0 10px 10px; font-size: var(--fs-small); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.st-nav-item { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: var(--fs-small); line-height: 1.35; text-decoration: none; }
.st-nav-item small { margin-left: auto; font-size: var(--fs-small); color: var(--text-faint); }
.st-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.st-nav-item:not(.disabled):not(.active):hover { background: var(--surface-2); color: var(--text); }
.st-nav-item.disabled { color: var(--text-faint); cursor: not-allowed; }
.st-side-foot { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.st-foot-row { display: flex; align-items: center; gap: 10px; }
.st-who { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.st-who strong { overflow-wrap: anywhere; font-size: var(--fs-small); font-weight: 500; }
.st-who small { overflow: hidden; color: var(--text-muted); font-size: var(--fs-small); text-overflow: ellipsis; white-space: nowrap; }
.st-who small.scrolling { text-overflow: clip; }
.st-foot-plan { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-small); line-height: 1.35; }
.st-discover { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); font-size: var(--fs-small); font-weight: 500; text-decoration: none; }
.st-discover:hover { background: var(--accent-hover); }
.st-logout { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: var(--fs-small); font-weight: 500; cursor: pointer; }
.st-logout:hover { background: var(--surface); }
.st-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--accent); font-size: var(--fs-small); font-weight: 600; }

.st-main { width: min(1560px, 100%); margin: 0 auto; padding: 32px 40px 72px; }
.st-head { margin-bottom: 24px; }
.st-crumbs { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--text-muted); }
.st-crumbs span[aria-hidden] { color: var(--text-faint); }
.st-crumbs strong { color: var(--text); font-weight: 500; }
.st-head h1 { margin: 6px 0 0; font-size: var(--fs-title); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.st-sub { margin: 4px 0 0; font-size: var(--fs-body); color: var(--text-muted); }
.st-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.st-jump { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; }
.st-jump a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: var(--fs-small); line-height: 1.35; text-decoration: none; }
.st-jump a:hover { background: var(--surface-2); color: var(--text); }
.st-jump a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.st-cards { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.st-card { padding: 24px 26px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); scroll-margin-top: 96px; }
.st-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.st-ico { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-muted); }
.st-card h2 { margin: 0; font-size: var(--fs-h3); font-weight: 650; line-height: 1.3; }
.st-note { margin: 3px 0 0; font-size: var(--fs-small); color: var(--text-muted); }
.st-card-head .st-note { margin-top: 3px; }
.st-muted { font-size: var(--fs-small); color: var(--text-muted); overflow-wrap: anywhere; }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.st-meta strong { font-weight: 400; }
.st-meta { display: flex; flex-direction: column; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.st-meta small { font-size: var(--fs-small); color: var(--text-muted); }
.st-list-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.st-group-title { margin: 18px 0 2px; font-size: var(--fs-small); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.st-list-row:first-of-type { margin-top: 6px; }
.st-list-text { display: flex; flex: 1 1 240px; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.st-list-text small { font-size: var(--fs-small); color: var(--text-muted); }
.st-row-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); text-decoration: none; }
.st-link:hover { text-decoration: underline; }
.st-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-small); line-height: 1.4; }
.st-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-chip.ok { background: color-mix(in srgb, var(--brand-teal-ink) 14%, var(--surface)); color: var(--brand-teal-ink); }
.st-profile { display: flex; align-items: flex-start; gap: 24px; margin-top: 14px; }
.st-avatar-col { display: flex; flex: none; flex-direction: column; align-items: center; gap: 10px; }
.st-avatar-big { overflow: hidden; width: 96px; height: 96px; font-size: calc(32px + var(--ui-plus, 0px)); }
.st-avatar-btns { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.st-card .st-avatar-btns button { min-height: 32px; padding: 4px 10px; }
.st-profile .st-names { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.st-names .st-field { margin: 0; }
.st-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.st-foot-meta { font-size: var(--fs-small); color: var(--text-muted); }
.st-foot-meta strong { font-weight: 500; color: var(--text); }
.st-foot-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.st-hint { margin: 6px 0 0; font-size: var(--fs-small); color: var(--text-muted); }
.st-field { margin: 14px 0 0; }
.st-field label { display: block; margin-bottom: 6px; font-size: var(--fs-small); font-weight: 500; color: var(--text); }
.st-card input:not([type=checkbox]), .st-dialog input:not([type=checkbox]), .st-dialog textarea, .st-card select {
  display: block; width: 100%; min-height: 40px; padding: 8px 12px; font-size: var(--fs-small);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); background: var(--surface);
}
@media (max-width: 640px), (pointer: coarse) { .st-card input:not([type=checkbox]), .st-dialog input:not([type=checkbox]), .st-dialog textarea, .st-card select { font-size: calc(16px + var(--ui-plus, 0px)); } } /* 16px stops iOS from zooming into a field */
.st-card ::placeholder, .st-dialog ::placeholder { color: var(--text-faint); }
.st-dialog textarea { resize: vertical; }
.st-card input:focus-visible, .st-dialog input:focus-visible, .st-dialog textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.st-card button, .st-dialog button, :is(#share-dialog, #share-password-dialog, #embed-dialog, #proposals-dialog) button { cursor: pointer; min-height: 40px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: var(--fs-small); font-weight: 500; }
.st-card button:hover:not(:disabled), .st-dialog button:hover:not(:disabled), :is(#share-dialog, #share-password-dialog, #embed-dialog, #proposals-dialog) button:hover:not(:disabled) { background: var(--surface-2); }
.st-card button.primary, .st-dialog button.primary, :is(#share-dialog, #share-password-dialog, #embed-dialog, #proposals-dialog) button.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.st-card button.primary:hover:not(:disabled), .st-dialog button.primary:hover:not(:disabled), :is(#share-dialog, #share-password-dialog, #embed-dialog, #proposals-dialog) button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.st-card button.danger, .st-dialog button.danger { border-color: var(--danger); background: var(--danger); color: var(--on-accent); }
.st-card button.danger:hover:not(:disabled), .st-dialog button.danger:hover:not(:disabled) { background: var(--danger); filter: brightness(0.92); }
.st-card button { white-space: nowrap; }
.st-card button.st-link-btn { min-height: 0; padding: 4px 0; border: 0; background: none; color: var(--accent); }
.st-card button.st-link-btn:hover:not(:disabled) { background: none; text-decoration: underline; }
.st-card button:disabled, .st-dialog button:disabled, :is(#share-dialog, #share-password-dialog, #embed-dialog, #proposals-dialog) button:disabled { opacity: 0.5; cursor: default; }
.st-card button:focus-visible, .st-dialog button:focus-visible, .st-nav-item:focus-visible, .st-jump a:focus-visible, .st-open-editor:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.st-seg { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--radius-sm); }
.st-card .st-seg button { min-height: 32px; padding: 0 12px; border: 0; background: none; color: var(--text-muted); border-radius: 6px; }
.st-card .st-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.st-toggle { cursor: pointer; }
.st-list-text strong, .st-toggle strong { font-weight: 500; }
.st-switch { appearance: none; position: relative; flex: none; width: 42px; height: 24px; margin: 0; border-radius: var(--radius-pill); background: var(--border-strong); cursor: pointer; transition: background 0.15s; }
.st-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: var(--radius-pill); background: var(--surface); transition: transform 0.15s; }
.st-switch:checked { background: var(--accent); }
.st-switch:checked::after { transform: translateX(18px); }
.st-switch:disabled { opacity: 0.5; cursor: default; }
.st-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-pro { display: inline-block; margin-left: 6px; vertical-align: middle; }
.account-tier { font-size: var(--fs-small); }
.account-tier.free { background: var(--surface-2); color: var(--text-muted); }
.st-status { margin: 10px 0 0; font-size: var(--fs-small); font-weight: 500; color: var(--text); }
.st-status.bad { color: var(--danger); }
.st-status[hidden] { display: none; }

.st-plan-head { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.st-plan-head .st-note { margin: 0; }
.st-plan { position: relative; display: inline-flex; flex: none; align-items: center; gap: 5px; overflow: hidden; padding: 4px 14px; border-radius: var(--radius-pill); font-size: var(--fs-small); font-weight: 500; letter-spacing: 0.04em; }
.st-plan.free { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); }
.st-plan.pro { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--brand-yellow))); color: var(--on-accent); }
.st-plan.pro::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--surface) 55%, transparent) 50%, transparent 65%); transform: translateX(-100%); animation: st-shine 3.5s ease-in-out infinite; }
@keyframes st-shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .st-plan.pro::after { animation: none; } }
.st-usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 18px; }
.st-usage-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: var(--fs-small); color: var(--text-muted); }
.st-usage-top strong { color: var(--text); font-weight: 400; }
.st-bar { height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-2); }
.st-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.px-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 0; font-size: var(--fs-small); font-weight: 500; color: var(--text); }
.px-progress[hidden], .px-canvas[hidden] { display: none; }
.px-progress.bad { color: var(--danger); }
.px-canvas { display: block; flex: none; max-width: 100%; transform-origin: center; }
.px-progress.bar .px-canvas { flex: 1 1 160px; min-width: 0; width: 100%; max-width: 440px; height: auto; }
.px-pct { min-width: 3ch; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.st-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }
.st-facts div + div { padding-left: 16px; border-left: 1px solid var(--border); }
.st-facts dt { font-size: var(--fs-small); color: var(--text-muted); }
.st-facts dd { margin: 0; }
.st-invite-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.st-invite-box .st-usage-top strong { color: var(--text); }
.st-plan-head strong, .st-with-ico strong { font-weight: 500; }
.st-with-ico { display: inline-flex; align-items: center; gap: 8px; }
.st-invite { display: flex; gap: 8px; margin-top: 12px; }
.st-invite input { font-family: var(--mono); font-size: var(--fs-small); background: var(--surface-2); }
.st-details { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.st-details ul { margin: 8px 0 0; padding-left: 18px; font-size: var(--fs-small); }
.st-details summary { cursor: pointer; font-weight: 500; color: var(--accent); }
.st-card .api-block { margin-top: 8px; }
.st-card .api-block > .account-label:first-child { display: none; }
.st-card .api-key { border-top: 1px solid var(--border); }
.api-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 4px; font-size: var(--fs-small); }
.st-chip.wait { background: color-mix(in srgb, var(--brand-yellow) 22%, var(--surface)); color: var(--text); }
.st-card .account-help { font-size: var(--fs-small); color: var(--text-muted); }
.st-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.st-danger .st-ico { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.st-danger h2 { color: var(--danger); }

.st-dialog { width: min(440px, 92vw); padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); box-shadow: var(--shadow-float); }
.st-dialog::backdrop { background: color-mix(in srgb, var(--text) 35%, transparent); backdrop-filter: blur(2px); }
.st-dialog form { position: relative; }
.st-dialog h3 { margin: 4px 0 4px; font-size: var(--fs-h3); font-weight: 650; }
.st-dialog .st-code { font-family: var(--mono); font-size: var(--fs-lead); letter-spacing: 0.35em; text-align: center; }
.st-card button.busy, .st-dialog button.busy { position: relative; padding-left: 38px; }
.st-card button.busy::before, .st-dialog button.busy::before { content: ''; position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: st-spin 0.7s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }
@keyframes st-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.st-step, .st-status:not([hidden]) { animation: st-fade 0.25s ease-out; }
@media (prefers-reduced-motion: reduce) { .st-step, .st-status, .st-card button.busy::before, .st-dialog button.busy::before { animation: none; } }
.st-botcheck:empty { display: none; }
.st-botcheck { margin-top: 10px; }
.st-wait { display: flex; align-items: center; justify-content: center; height: 76px; margin: 4px 0 6px; }
.st-wait .nd { display: block; flex: none; background: var(--surface); border: 2px solid var(--accent); animation: st-node 2.4s ease-in-out infinite; }
.st-wait .n1 { width: 44px; height: 28px; border-radius: 6px; }
.st-wait .n2 { width: 26px; height: 26px; margin: 0 6px; transform: rotate(45deg); border-color: var(--brand-yellow); border-radius: 4px; animation-name: st-node-d; animation-delay: 0.8s; }
.st-wait .n3 { width: 48px; height: 24px; border-color: var(--brand-teal-ink); border-radius: var(--radius-pill); animation-delay: 1.6s; }
.st-wait .ln { position: relative; display: block; flex: none; width: 40px; height: 2px; margin: 0 4px; overflow: hidden; background: var(--border-strong); }
.st-wait .ln::after { content: ''; position: absolute; top: 0; left: -8px; width: 8px; height: 2px; background: var(--accent); animation: st-flow 2.4s ease-in-out infinite; }
.st-wait .l2::after { animation-delay: 0.8s; }
@keyframes st-node { 0%, 35%, 100% { background: var(--surface); box-shadow: 0 0 0 0 transparent; } 12% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); } }
@keyframes st-node-d { 0%, 35%, 100% { background: var(--surface); box-shadow: 0 0 0 0 transparent; transform: rotate(45deg) scale(1); } 12% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); transform: rotate(45deg) scale(1.1); } }
@keyframes st-flow { 0% { left: -8px; } 30%, 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .st-wait .nd, .st-wait .ln::after { animation: none; } }
.st-dialog h2 { margin: 0 0 8px; padding-right: 72px; font-size: var(--fs-h3); font-weight: 650; }

@media (max-width: 1000px) {
  .st-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .st-jump { top: 72px; z-index: 4; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 10px 8px; background: var(--bg); }
  .st-card { scroll-margin-top: 150px; }
  .st-jump a { flex: none; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
  .st-jump a[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
}
@media (min-width: 641px) and (max-width: 1000px) {
  .st-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; }
  .st-burger:hover { background: var(--surface-2); }
  .st-burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .st-layout { grid-template-columns: 64px minmax(0, 1fr); }
  .st-side { width: 64px; justify-self: start; padding: 16px 8px; overflow: hidden; z-index: 20; }
  .st-side-title, .st-nav-item small, .st-who, .st-foot-plan, .st-discover, .st-logout span { display: none; }
  .st-logout { width: 40px; }
  .st-nav-item { justify-content: center; padding: 11px 0; font-size: 0; }
  .st-side-foot { padding: 8px 0; border: 0; background: none; align-items: center; }
  .menu-open .st-side { width: 288px; padding: 20px 12px 16px; box-shadow: var(--shadow-float); }
  .menu-open .st-side-title { display: block; }
  .menu-open .st-nav-item { justify-content: flex-start; padding: 9px 10px; font-size: var(--fs-small); }
  .menu-open .st-nav-item small { display: block; }
  .menu-open .st-side-foot { align-items: stretch; padding: 14px; border: 1px solid var(--border); background: var(--surface-2); }
  .menu-open .st-who, .menu-open .st-foot-plan, .menu-open .st-discover, .menu-open .st-logout span { display: flex; }
  .menu-open .st-logout { width: auto; }
  .menu-open .st-scrim { display: block; position: fixed; inset: 72px 0 0 0; z-index: 15; background: var(--scrim); }
}
@media (max-width: 640px) {
  .st-top { position: static; height: 60px; padding: 0 16px; }
  .st-top-label { display: none; } /* icon-only Dashboard button: the bar has no room on phones */
  .st-jump { top: 0; }
  .st-card { scroll-margin-top: 78px; }
  .st-card button.st-link-btn { min-height: 44px; }
  .st-layout { display: block; }
  .st-side { position: fixed; z-index: 10; inset: auto 0 0 0; height: calc(66px + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--border); border-right: 0; }
  .st-side-title, .st-side-foot, .st-nav-item small { display: none; }
  .st-side ul { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(76px, 1fr); gap: 4px; overflow-x: auto; scrollbar-width: none; } /* 7-8 items do not fit 390px: the bar scrolls sideways */
  .st-nav-item { flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; margin: 0; padding: 4px; font-size: var(--fs-small); text-align: center; }
  .st-main { padding: 20px 16px 104px; }
  .st-head h1 { font-size: calc(22px + var(--ui-plus, 0px)); }
  .st-card { padding: 20px 18px; }
  .st-usage-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .st-facts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .st-facts div + div { padding-left: 0; border-left: 0; }
  .st-card button, .st-dialog button, .st-open-editor, .st-card input:not([type=checkbox]), .st-dialog input:not([type=checkbox]) { min-height: 44px; }
  .st-invite { flex-direction: column; }
  .st-profile { flex-direction: column; align-items: center; }
  .st-profile .st-names { width: 100%; }
  .st-card-foot { flex-direction: column-reverse; align-items: stretch; gap: 12px; text-align: center; }
  .st-foot-actions { margin-left: 0; }
  .st-foot-actions button { width: 100%; }
  .st-profile .st-names { grid-template-columns: minmax(0, 1fr); }
}

/* Grey placeholders while an account page loads (js/account-page.js paintSkeleton) */
.st-skel { height: 20px; margin: 0 0 18px; border-radius: var(--radius-sm); background: var(--surface-2); animation: st-skel-pulse 1.4s ease-in-out infinite; }
.st-skel:first-child { height: 32px; }
@keyframes st-skel-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .st-skel { animation: none; } }
