/* ---------- Settings: grouped list + pushed detail screens (agent.js) ----------
   iOS-style: a profile header, frosted groups of rows (coloured icon tile, label, value, chevron), small uppercase
   group labels and footnotes on the mood background. Detail screens get a sticky bar with a back chevron and title. */
.st-page{display:flex;flex-direction:column;gap:18px;padding-top:4px}
.st-page>*{flex:none}

/* detail screen bar */
.st-top{position:sticky;top:0;z-index:10;margin:0 -14px -6px;height:calc(var(--top) + 52px);padding:var(--top) 10px 0 6px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px}
.st-top::before{content:"";position:absolute;left:0;right:0;top:0;height:calc(var(--top) + 72px);background:linear-gradient(to bottom,rgba(10,10,16,.5),rgba(10,10,16,.18) 70%,rgba(10,10,16,0));backdrop-filter:blur(18px) saturate(1.2);-webkit-backdrop-filter:blur(18px) saturate(1.2);-webkit-mask-image:linear-gradient(to bottom,#000 60%,transparent);mask-image:linear-gradient(to bottom,#000 60%,transparent);pointer-events:none;z-index:-1}
.st-back{justify-self:start;display:inline-flex;align-items:center;gap:1px;max-width:100%;height:40px;padding:0 10px 0 2px;border-radius:99px;font-size:15.5px;font-weight:500;color:#fff;min-width:0}
.st-back span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-back svg{width:22px;height:22px;flex:none}
.st-back:active{background:rgba(255,255,255,.12)}
.st-title{margin:0;font-family:var(--f-display);font-weight:400;font-style:italic;font-size:21px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:56vw;text-align:center}
.st-top-gap{justify-self:end}

/* profile header */
.st-profile{display:flex;align-items:center;gap:14px;padding:14px 14px 14px 14px;text-align:left;width:100%;transition:transform .25s var(--spring)}
.st-profile:active{transform:scale(.985)}
.st-avatar{flex:none;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;font-family:var(--f-display);font-size:27px;color:#fff;background:linear-gradient(150deg,#6b4f86,#e9a98a);box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}
.st-profile .st-txt b{font-size:19px;font-weight:600}
.st-profile .st-txt small{font-size:14px}

/* a nudge at the top of the list */
.st-alert{display:flex;align-items:center;gap:12px;width:100%;padding:12px 12px 12px 14px;border-radius:20px;text-align:left;color:#fff;background:linear-gradient(135deg,#0f7a5f,#10a37f);box-shadow:0 12px 30px rgba(16,163,127,.3),inset 0 0 0 1px rgba(255,255,255,.2)}
.st-alert>svg:first-child{width:22px;height:22px;flex:none}
.st-alert>svg:last-child{width:18px;height:18px;flex:none;opacity:.8}
.st-alert span{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.st-alert b{font-size:15px;font-weight:600}
.st-alert small{font-size:13px;opacity:.85}

/* groups and rows */
.st-sec{display:flex;flex-direction:column;gap:7px}
.st-glabel{margin:0 16px;font-size:12px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.78)}
.st-group{border-radius:22px;overflow:hidden;background:var(--frost);color:var(--frost-ink);backdrop-filter:blur(24px) saturate(1.3);-webkit-backdrop-filter:blur(24px) saturate(1.3);box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);animation:dIn .45s var(--ease) backwards}
.st-foot{margin:0 16px;font-size:12.5px;line-height:1.45;color:rgba(255,255,255,.78)}
.st-row{position:relative;display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:9px 12px 9px 14px;text-align:left;color:inherit;text-decoration:none;font:inherit;transition:background .15s}
.st-row+.st-row::before{content:"";position:absolute;top:0;right:0;left:56px;height:1px;background:rgba(31,26,36,.08)}
.st-group>.st-row:not(:has(.st-ico))+.st-row::before,.st-row:not(:has(.st-ico))+.st-row::before{left:14px}
button.st-row:active,a.st-row:active{background:rgba(31,26,36,.06)}
@media (hover:hover){button.st-row:hover,a.st-row:hover{background:rgba(31,26,36,.035)}}
.st-ico{flex:none;width:30px;height:30px;border-radius:9px;display:grid;place-items:center;color:#fff;background:var(--t)}
.st-ico svg{width:17px;height:17px;stroke-width:2}
.st-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.st-txt b{font-size:16px;font-weight:450;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-txt small{font-size:13px;line-height:1.35;color:#6f6877;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.st-val{flex:none;max-width:48%;font-size:15px;color:#7a7282;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.st-chev{flex:none;display:grid;place-items:center;color:#b3abb9;margin-right:-2px}
.st-chev svg{width:17px;height:17px;stroke-width:2.2}
.st-row.danger .st-txt b{color:#d13a2a;font-weight:500}
.st-row.danger:not(:has(.st-ico)) .st-txt{align-items:flex-start}
.st-static{cursor:default}
.st-ctl{cursor:default}
.st-ctl.off .ag-time{opacity:.45}
.st-ctl .ag-time{width:96px;padding:0 6px 0 8px}
.st-ctl .st-txt b{white-space:normal}
.st-ctl .ag-switch{margin-top:0}

/* inline editors */
.st-input{flex:1.3;min-width:0;height:36px;border:0;border-radius:10px;padding:0 10px;background:transparent;font:inherit;font-size:16px;color:var(--frost-ink);text-align:right;outline:none}
.st-input:focus{background:rgba(31,26,36,.06);text-align:left}
.st-input::placeholder{color:#a39bab}
.st-ctl:has(.st-select-over){cursor:pointer}
.st-select-over{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font-size:16px}

/* buttons */
.st-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:44px;padding:0 18px;border-radius:99px;font-size:15px;font-weight:600;background:rgba(31,26,36,.07);color:var(--frost-ink);text-decoration:none;transition:transform .2s var(--spring),opacity .2s}
.st-btn svg{width:17px;height:17px}
.st-btn:active{transform:scale(.96)}
.st-btn:disabled{opacity:.45}
.st-btn.solid{background:#1f1a24;color:#fff}
.st-btn.danger{background:#d13a2a;color:#fff}
.st-btn.sm{height:34px;padding:0 14px;font-size:13.5px}
.st-btn.wide{width:100%;height:50px;font-size:16px}

/* a single card screen (ChatGPT, developer token, delete account) */
.st-panel{padding:20px 18px 18px;display:flex;flex-direction:column;gap:14px}
.st-hero-ico{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;color:#fff;background:var(--t);box-shadow:0 12px 26px color-mix(in srgb,var(--t) 35%,transparent)}
.st-hero-ico svg{width:26px;height:26px;stroke-width:2}
.st-h2{margin:2px 0 0;font-family:var(--f-display);font-weight:400;font-size:28px;line-height:1.1;letter-spacing:-.01em;color:#1f1a24}
.st-p{margin:0;font-size:15px;line-height:1.5;color:#4a4252}
.st-list{margin:-4px 0 0;padding-left:20px;display:flex;flex-direction:column;gap:4px;font-size:15px;line-height:1.45;color:#4a4252}
.st-warn{margin:0;padding:12px 14px;border-radius:14px;background:#fff1e6;color:#8a4a10;font-size:14.5px}
.st-field{display:flex;flex-direction:column;gap:8px;font-size:14px;color:#4a4252}
.st-field b{color:#1f1a24;overflow-wrap:anywhere}
.st-field input{height:46px;border:0;border-radius:14px;padding:0 14px;font:inherit;font-size:16px;background:rgba(31,26,36,.06);color:var(--frost-ink);outline:none}
.st-field input:focus{box-shadow:0 0 0 2px #b9a3ff}
.st-token{padding:12px 14px;border-radius:14px;background:rgba(31,26,36,.06)}
.st-token code{background:none;padding:0;font-size:13px;word-break:break-all;user-select:all;color:#1f1a24}
.st-fine{margin:0;font-size:12.5px;line-height:1.45;color:#7a7282;overflow-wrap:anywhere}
.st-fine code{background:rgba(31,26,36,.06);font-size:11.5px}
.st-page .ag-ask{margin-top:-4px}
.st-page .ag-seeit{align-self:flex-start;margin-top:-10px}
.st-page #ag-logins{margin-top:0}

/* Settings → AI: the two AIs */
.ai-pick.viewing{background:rgba(31,26,36,.04)}
.ai-badge{display:inline-flex;align-items:center;gap:4px;flex:none;height:24px;padding:0 9px;border-radius:99px;font-size:12.5px;font-weight:600;color:#2f7a52;background:rgba(47,158,107,.12)}
.ai-badge svg{width:12px;height:12px;stroke-width:3}
.st-glabel.ai-sub{margin-top:18px}
.ai-note{margin-top:-4px}

/* Settings → AI → Model: a radio list (options come from GET /api/ai/models) */
.md-opt{align-items:flex-start;padding-top:12px;padding-bottom:12px}
.md-opt .st-txt small{white-space:normal;line-height:1.4}
.md-radio{flex:none;display:grid;place-items:center;width:22px;height:22px;margin-top:1px;border-radius:50%;box-shadow:inset 0 0 0 1.5px rgba(31,26,36,.25);color:#fff;transition:background .15s,box-shadow .15s}
.md-opt.on .md-radio{background:#10a37f;box-shadow:none}
.md-radio svg{width:13px;height:13px;stroke-width:3}
.md-def{font-style:normal;font-size:11.5px;font-weight:600;margin-left:6px;padding:1px 7px;border-radius:99px;color:#6b6475;background:rgba(31,26,36,.07);vertical-align:1px}
.md-opt:disabled{opacity:.6}
.md-set{display:flex;flex-direction:column;gap:18px}
