/* Keep navigation with the wordmark and account controls together when the wallet is hidden. */
#app .topbar.fusion-header { justify-content: flex-start; }
#app .header-nav + .header-auth { margin-inline-start: auto; }
#app .header-auth {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; flex: none; padding: 0 12px; border: 0; border-radius: 12px;
  color: #f0d7e3; background: #30252e; font: inherit; font-weight: 550;
}
.header-auth svg { width: 20px; height: 20px; }
@media (min-width:1160px) and (max-width:1280px) {
  #app .topbar.fusion-header { gap:6px; padding-inline:12px; }
  #app .header-nav { margin-left:4px; }
  #app .header-nav > a { padding-inline:8px; }
  #app .header-auth { width:44px; padding:0; }
  .header-auth > span { display:none; }
}
@media (min-width:641px) and (max-width:1159px) {
  #app .topbar.fusion-header { grid-template-columns: auto minmax(0,1fr) repeat(3,auto); }
  #app .header-auth { grid-column:4; grid-row:1; }
  #app .header-help { grid-column:5; }
}
@media (max-width:640px) {
  #app .header-auth { width:44px; padding:0; }
  .header-auth > span { display:none; }
}
@media (max-width:420px) {
  #app .topbar.fusion-header { gap:3px; padding-inline:8px; }
}

#modal[open]:has(.auth-form) .modal-head { margin-bottom: 20px; }
#modal[open]:has(.auth-form) .modal-body { display:block; min-height:0; padding:0 2px 2px; }
#modal[open] .auth-form { display:grid; gap:16px; }
#modal[open] .auth-form p { margin:0; color:var(--muted); font-size:var(--type-body); line-height:1.55; }
.auth-form .auth-address { color:var(--text); font-weight:550; overflow-wrap:anywhere; }
.auth-field { display:grid; gap:7px; color:var(--text); font-size:var(--type-body); font-weight:520; }
.auth-field > input, .auth-password input { width:100%; min-width:0; }
.auth-password { position:relative; }
#modal[open] .auth-password input { padding-right:52px; }
.auth-password button {
  position:absolute; inset:0 0 0 auto; display:grid; place-items:center; width:46px;
  background:transparent; color:var(--muted); border:0; border-radius:10px;
}
.auth-password svg, .auth-identity svg {
  width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round;
}
.auth-password .eye-slash { display:none; }
.auth-password [aria-pressed=true] .eye-slash { display:block; }
.auth-field small, .auth-identity small {
  color:var(--muted); font-size:var(--type-label); line-height:1.45; font-weight:400;
}
#modal[open] input.auth-code {
  font-size:clamp(24px,6vw,32px); line-height:1.3; font-weight:550;
  letter-spacing:.45em; text-indent:.45em; text-align:center; font-variant-numeric:tabular-nums;
}
#modal[open] input.auth-code::placeholder { opacity:.45; }
#modal .auth-submit { min-height:46px; }
#modal .auth-link, #modal .auth-mail-link {
  justify-self:start; display:inline-flex; align-items:center; min-height:36px;
  background:transparent; color:#edafca; border:0; padding:0 2px; font:inherit; font-weight:520;
  text-decoration:underline; text-decoration-color:#966579; text-underline-offset:4px;
}
#modal .auth-link:disabled { color:var(--muted); text-decoration:none; }
#modal .auth-form .auth-switch { text-align:center; }
.auth-options { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; }
.auth-identity { display:flex; align-items:center; gap:12px; }
.auth-identity span { display:grid; gap:4px; }
.auth-identity svg { color:var(--field-accent); flex:none; }
#modal[open] .auth-form .auth-error { color:#ffa3b3; font-size:var(--type-label); }
.auth-error:empty { display:none; }
@media (prefers-reduced-motion:no-preference) {
}


#app .topbar .header-bell {position:relative;overflow:visible}
.header-bell sup {position:absolute;inset:-4px auto auto -5px;min-width:16px;height:16px;padding:0 4px;box-sizing:border-box;display:grid;place-items:center;border-radius:20px;background:#eca4bf;color:#301721;font:700 10px/1 system-ui;font-variant-numeric:tabular-nums;box-shadow:0 0 0 2px #1c1820;pointer-events:none}
.header-bell sup[hidden],.notice-center [hidden] {display:none}
#modal[open]:has(.notice-center) {width:min(440px,calc(100% - 24px));max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
#modal:has(.notice-center) .modal-head {display:flex;align-items:center;gap:8px;margin-bottom:16px}
#modal:has(.notice-center) #modal-title {flex:1}
#modal:has(.notice-center) .modal-body {min-height:0;padding:0 2px 2px;overflow:auto}
.notice-gear,.notice-tools button {display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:12px;background:rgba(255,255,255,.056);color:var(--text);font:inherit;cursor:pointer}
.notice-gear {width:36px;height:36px;flex:none}
.notice-gear[aria-expanded=true] {background:rgba(234,153,187,.15);color:#ffcbe1}
.notice-center {display:block}
.notice-tools {display:flex;align-items:center;justify-content:space-between;gap:8px}
.notice-tools button {padding:8px 11px;font-size:.81rem;min-height:36px}
.notice-tools button:disabled {opacity:.45}
.notice-center svg,.notice-gear svg {width:18px;height:18px;flex:none}
.notice-list {max-height:min(480px,54dvh);overflow:auto;overscroll-behavior:contain;display:grid;gap:6px;scrollbar-width:thin}
#modal .notice-row {position:relative;display:grid;grid-template-columns:34px minmax(0,1fr) 7px;align-items:start;gap:10px;width:100%;padding:13px;border:0;border-radius:13px;text-align:left;background:rgba(255,255,255,.036);color:inherit;box-shadow:none;font:inherit;cursor:pointer}
#modal .notice-row[data-unread] {background:linear-gradient(110deg,rgba(230,151,183,.12),rgba(255,255,255,.04))}
.notice-symbol {display:grid;place-items:center;width:34px;height:34px;border-radius:11px;color:#edb3cd;background:rgba(223,143,180,.085)}
[data-tone=risk] .notice-symbol {color:#f3b49b;background:rgba(222,133,98,.12)}
[data-tone=success] .notice-symbol {color:#98dbc0;background:rgba(92,185,146,.1)}
.notice-copy {display:grid;gap:4px;min-width:0}
.notice-copy strong,.notice-device strong {font-size:.92rem;font-weight:600;line-height:1.35}
.notice-copy>span,.notice-device small,.notice-empty small,.notice-loading,.notice-status {color:var(--muted);font-size:.83rem;line-height:1.45}
.notice-copy time {margin-top:3px;color:var(--muted);font-size:.72rem}
.notice-row i {width:6px;height:6px;margin-top:5px;border-radius:50%;background:#eda5c1}
.notice-empty,.notice-loading {display:grid;justify-items:center;text-align:center;gap:7px;padding:28px 16px}
.notice-empty svg {width:24px;height:24px;color:#d9a4bb;margin-bottom:6px}
.notice-status:empty {display:none}

#modal:has(.notice-center) .modal-head {margin:0 0 14px;padding-bottom:15px;border-bottom:1px solid rgba(220,192,209,.13)}
.notice-feed-title {margin-inline-end:auto;display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:.84rem;font-weight:550}
.notice-feed-title b:not(:empty) {padding:2px 6px;border-radius:6px;color:#edb3cd;background:rgba(222,143,180,.12);font-size:.7rem;line-height:1.3}
.notice-tools {justify-content:flex-end;gap:5px;margin-bottom:12px}
.notice-tools button {border-radius:8px;background:transparent;color:var(--muted)}
.notice-day {display:flex;align-items:center;gap:10px;margin:9px 2px 3px;color:var(--muted);font-size:.74rem;font-weight:550}
.notice-day::after {content:"";flex:1;height:1px;background:rgba(220,192,209,.14)}
.notice-preferences {display:flow-root}
.notice-device {display:grid;gap:6px;margin-bottom:12px;padding:12px 14px;border-radius:12px;background:linear-gradient(115deg,rgba(230,151,183,.11),rgba(255,255,255,.035))}
.device-control {display:flex;align-items:center;justify-content:space-between;gap:12px}
#modal .device-switch {display:block;position:relative;flex:none;width:44px;height:26px;padding:3px;border:0;border-radius:20px;background:#574451;box-shadow:none;cursor:pointer}
.device-switch span {display:block;width:20px;height:20px;background:#efe2e9;border-radius:50%;box-shadow:0 1px 3px #20192455}
#modal .device-switch[aria-checked=true] {background:#d782a5}
.device-switch[aria-checked=true] span {transform:translateX(18px);background:#fff5f9}
.device-switch:disabled {opacity:.46}
.device-retry {justify-self:start;padding:5px 0;border:0;background:transparent;color:#edb3cd;font:inherit;font-size:.84rem;text-align:left;cursor:pointer}
@media (prefers-reduced-motion:no-preference){.device-switch span {transition:transform .19s ease-out}.device-switch {transition:background .19s ease-out}}
