/* SX-006k4: use the existing theme and visualViewport variables. */
.account-links { display:grid; gap:8px; border-top:1px solid var(--line); padding-top:14px; }
.account-links[hidden], .account-links [hidden], [data-k5-legacy][hidden] { display:none !important; }
.account-links button { display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; min-height:48px; background:var(--panel); color:var(--text); border:1px solid var(--line); padding:10px 12px; }
.account-links small { display:block; font-size:12px; line-height:1.45; font-weight:normal; color:var(--muted); margin-top:3px; }
.account-overlay { position:fixed; z-index:80; top:var(--app-viewport-top,0px); left:var(--app-viewport-left,0px); width:var(--app-visible-width,100%); height:var(--app-visible-height,100%); box-sizing:border-box; display:flex; align-items:center; justify-content:center; background:rgba(20,25,23,.48); padding: max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); }
.account-overlay[hidden], .account-overlay [hidden] { display:none !important; }
.account-card { display:flex; flex-direction:column; width:min(100%,470px); max-height:100%; min-height:0; border:1px solid var(--line); border-radius:14px; background:var(--panel); color:var(--text); box-shadow:var(--panel-shadow); overflow:hidden; }
.account-header { display:flex; flex:none; gap:12px; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid var(--line); }
.account-header h2 { flex:1; font-size:20px; line-height:1.25; margin:0; overflow-wrap:anywhere; }
.account-header button { flex:none; width:auto; min-width:80px; max-width:45%; padding:8px 12px; }
.account-body { min-height:0; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:0 16px 18px; scroll-padding:14px; }
.account-body p { line-height:1.5; overflow-wrap:anywhere; }
#accountMessage:empty { display:none; }
.account-error { color:var(--text); border-left:3px solid #be6029; padding:8px 12px; background:color-mix(in srgb,var(--panel) 94%,#be6029); }
.account-help { font-size:14px; color:var(--muted); }
.account-body label { display:block; margin:15px 0 6px; font-size:14px; font-weight:600; line-height:1.4; }
.account-body input,.account-body select { display:block; box-sizing:border-box; width:100%; min-width:0; min-height:46px; font:inherit; font-size:16px !important; line-height:1.4; padding:10px 12px; color:var(--text); background:var(--panel); border:1px solid var(--line); border-radius:8px; }
.account-body input:focus,.account-body select:focus { outline:2px solid var(--accent); outline-offset:2px; }
.account-address-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.65fr); gap:12px; }
.account-overlay button { min-height:44px; font-size:16px; white-space:normal; }
.account-overlay button.secondary { color:var(--text); background:var(--panel); }
.account-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; padding-bottom:4px; }
.account-actions button { flex:1 1 130px; }
.account-sync { border:1px solid var(--line); border-radius:8px; padding:10px 12px; font-size:14px; }
#accountDetails dt { color:var(--muted); font-size:14px; margin-top:20px; }
#accountDetails dd { margin:5px 0 0; font-size:16px; font-weight:600; overflow-wrap:anywhere; }
#appearanceMenu { top:var(--app-viewport-top,0px); left:var(--app-viewport-left,0px); right:auto; bottom:auto; width:var(--app-visible-width,100%); height:var(--app-visible-height,100%); box-sizing:border-box; padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); }
#appearanceMenu .appearance-card { max-height:100%; box-sizing:border-box; overscroll-behavior:contain; }
@media(max-height:440px) { .account-header { padding:6px 12px; } .account-overlay { align-items:stretch; } }
@media(max-width:340px) { .account-address-row { grid-template-columns:1fr; gap:0; } }

