.preferences-page { min-width:0; max-width:1100px; }
.preferences-heading,.preference-card-head { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.preferences-heading { margin-bottom:14px; }
.preferences-heading h2 { margin:0; font-size:22px; }
.preferences-heading p,.preferences-intro { color:var(--muted,#999); font-size:13px; line-height:1.7; }
.preferences-heading p { margin:6px 0 0; }
.preferences-heading button { flex-shrink:0; }
.notification-rule-list { display:grid; gap:12px; }
.notification-rule h3,.notification-rule-form h3,.preferences-form h3 { margin:0; font-size:17px; line-height:1.6; overflow-wrap:anywhere; }
.preference-card-head>div { display:flex; gap:10px; align-items:center; flex-wrap:wrap; min-width:0; }
.preference-status { padding:3px 8px; border:1px solid rgba(255,255,255,.15); border-radius:6px; color:var(--muted,#999); font-size:11px; }
.preference-status.enabled { color:#93d7b0; border-color:rgba(90,180,120,.3); background:rgba(90,180,120,.07); }
.rule-metric { color:var(--muted,#999); font-size:12px; }
.rule-scope { display:grid; gap:4px; font-size:13px; overflow-wrap:anywhere; line-height:1.7; }
.rule-scope>b { color:var(--muted,#999); font-size:11px; font-weight:400; }
.notification-rule .muted,.preferences-page .muted { color:var(--muted,#999); font-size:12px; line-height:1.7; }
.preference-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.preferences-page button,.preferences-page .file-btn { min-height:40px; padding:9px 14px; border-radius:10px; font-size:13px; cursor:pointer; box-sizing:border-box; }
.preferences-page .ghost { border:1px solid rgba(255,255,255,.15); background:rgba(255,255,255,.045); color:var(--text,#eee); box-shadow:none; }
.preferences-page .danger-text { color:#ff9999; }
.notification-rule-form,.preferences-form { display:grid; gap:14px; margin-bottom:16px; }
.notification-rule-form>label,.preferences-form>label,.preferences-grid>label { display:grid; gap:7px; min-width:0; color:var(--muted,#999); font-size:13px; }
.preferences-page input:not([type="checkbox"]):not([type="radio"]),.preferences-page select { width:100%; max-width:100%; min-width:0; min-height:44px; box-sizing:border-box; padding:10px 12px; border:1px solid rgba(255,255,255,.13); border-radius:10px; background:var(--bg,#111216); color:var(--text,#eee); font:inherit; }
.preferences-page input[readonly] { opacity:.7; }
.preferences-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:14px; }
.preferences-page fieldset { margin:0; padding:12px; min-width:0; border:1px solid rgba(255,255,255,.12); border-radius:12px; }
.preferences-page legend { padding:0 6px; font-size:13px; }
.preference-check { display:flex; align-items:center; gap:8px; margin:8px 0; color:var(--text,#eee); font-size:13px; line-height:1.6; }
.preference-check input { flex:0 0 18px; width:18px; height:18px; accent-color:#d4b573; }
.preference-check span { display:grid; min-width:0; gap:3px; overflow-wrap:anywhere; }
.preference-check small { color:var(--muted,#999); font-size:11px; }
.rule-account-picks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; }
.rule-account-picks[hidden] { display:none; }
.preference-channels { display:flex; flex-wrap:wrap; gap:0 20px; }
.sound-library,.notification-history { margin-top:16px; }
.sound-library summary,.notification-history summary { cursor:pointer; font-size:15px; }
.sound-library summary small,.notification-history summary small { margin-left:8px; font-size:11px; color:var(--muted,#999); }
.sound-list { list-style:none; padding:0; margin:12px 0 0; }
.sound-list li { display:flex; gap:8px; align-items:center; padding:10px 0; border-top:1px solid rgba(255,255,255,.1); }
.sound-list li>span { flex:1; min-width:0; overflow-wrap:anywhere; }
.sound-list small { display:block; color:var(--muted,#999); font-size:11px; }
.notification-history p { padding:12px 0; margin:0; font-size:13px; line-height:1.7; border-top:1px solid rgba(255,255,255,.09); overflow-wrap:anywhere; }
.preferences-feedback { white-space:pre-line; color:#96d9b0; font-size:13px; line-height:1.7; }
.preferences-feedback:empty,.form-feedback:empty,.rule-form-feedback:empty { display:none; }
.preferences-feedback.err,.rule-form-feedback { color:#ff9c9c; }
.preferences-page [type="submit"] { justify-self:start; }
.global-actions>.risk-control-group { grid-column:1/-1; padding:12px 0; border-top:1px solid var(--line,rgba(255,255,255,.12)); }
.global-actions .risk-control-group>strong,.global-actions .risk-control-group>summary { display:block; margin-bottom:10px; font-size:13px; line-height:1.7; cursor:pointer; }
.global-actions .risk-control-group>button { margin:4px 8px 4px 0; border-radius:10px; }
.global-actions button.secondary { background:var(--bg-2,#202126); color:var(--text,#eee); border:1px solid var(--line,rgba(255,255,255,.15)); box-shadow:none; }
.risk-account-actions .risk-control-group { padding-top:14px; margin-top:14px; border-top:1px solid var(--line,rgba(255,255,255,.12)); }
.risk-account-actions .risk-control-group>strong,.risk-account-actions summary { display:block; margin-bottom:10px; cursor:pointer; font-size:14px; }
.risk-account-actions .risk-control-group p { color:var(--muted,#999); font-size:12px; line-height:1.7; }
.risk-account-actions button { margin:4px 8px 4px 0; border-radius:10px; }
.risk-account-actions button.secondary { background:var(--bg-2,#202126); color:var(--text,#eee); border:1px solid var(--line,rgba(255,255,255,.15)); box-shadow:none; }
/* Homepage risk toolbar: compact actions, independently reported account state. */
.global-risk.home-risk-compact { padding:14px 16px; border-radius:16px; }
.home-risk-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.home-risk-title { display:flex; align-items:center; gap:12px; min-width:0; }
.home-risk-title h2 { margin:0; font-size:16px; line-height:1.5; white-space:nowrap; }
.home-risk-title>span { font-size:12px; color:var(--muted,#999); }
.home-risk-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.home-risk-compact button,.home-risk-compact select { width:auto; min-height:34px; height:34px; padding:6px 12px; border:1px solid var(--line,#3b3c43); border-radius:8px; background:var(--bg-2,#202126); color:var(--text,#eee); font-size:12px; font-weight:500; box-shadow:none; }
.home-risk-compact button { cursor:pointer; }
.home-risk-compact button:disabled { opacity:.4; cursor:not-allowed; }
.home-risk-compact button:not(:disabled):hover { border-color:var(--gold,#d4a356); }
.home-risk-compact button:focus-visible,.home-risk-compact select:focus-visible,.home-risk-account:focus-within { outline:2px solid var(--gold,#d4a356); outline-offset:2px; }
.home-risk-tools>a { white-space:nowrap; font-size:12px; margin-left:4px; }
.home-risk-other { display:flex; align-items:center; gap:6px; padding-left:8px; border-left:1px solid var(--line,#3b3c43); }
.home-risk-other select { max-width:190px; }
.home-risk-accounts { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; max-height:142px; overflow:auto; padding:2px; }
.home-risk-account { display:flex; align-items:center; gap:8px; min-width:0; max-width:100%; padding:7px 10px; border:1px solid var(--line,#3b3c43); border-radius:10px; background:var(--bg-2,#17191e); cursor:pointer; }
.home-risk-account>input { width:15px; height:15px; margin:0; flex:0 0 15px; accent-color:var(--gold,#d4a356); }
.home-risk-account>span { min-width:0; }
.home-risk-account>span:first-of-type { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.home-risk-account b { font-size:12px; font-weight:600; }
.home-risk-state,.home-risk-terminal { font-size:11px; line-height:1.5; overflow-wrap:anywhere; color:var(--muted,#999); }
.home-risk-state.paused { color:#e7c479; }
.home-risk-state.pending { color:#d5bf8b; }
.home-risk-state.failed { color:#f19b9b; }
.home-risk-terminal { border-left:1px solid var(--line,#3b3c43); padding-left:8px; }
.home-risk-help { margin:9px 0 0; font-size:11px; color:var(--muted,#999); line-height:1.6; }
.home-risk-feedback { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; margin-top:10px; padding-top:10px; border-top:1px solid var(--line,#3b3c43); font-size:12px; line-height:1.7; }
.home-risk-feedback>strong { font-size:12px; font-weight:500; }
.home-risk-receipt { color:var(--muted,#999); overflow-wrap:anywhere; }
.home-risk-receipt b { font-weight:500; }
.home-risk-receipt.pending { color:#d5bf8b; }
.home-risk-receipt.success { color:#9ed6b5; }
.home-risk-receipt.failed { color:#f19b9b; }
.home-risk-receipt small { display:block; font-size:11px; }
.home-risk-compact>.err:empty { display:none; }
@media(max-width:720px) { .home-risk-tools { width:100%; gap:7px; } .home-risk-account { flex-wrap:wrap; } .home-risk-terminal { border-left:0; padding-left:23px; flex-basis:100%; } .home-risk-tools>a { margin-left:auto; } }
@media(max-width:600px) { .preferences-heading h2 { font-size:19px; } .preferences-grid,.rule-account-picks { grid-template-columns:1fr; } .preferences-page [type="submit"] { width:100%; } .preference-card-head { gap:10px; } }
