.site-nav > a.nav-login { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-soft); color: var(--text); font-weight: 680; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.site-nav > a.nav-login:hover { transform: translateY(-1px); border-color: var(--blue); background: var(--surface); color: var(--text); }
:root[data-theme="light"] .site-nav > a.nav-login { border-color: rgba(74, 117, 196, .28); background: rgba(100, 142, 218, .1); color: #284b85; }
:root[data-theme="light"] .site-nav > a.nav-login:hover { border-color: rgba(74, 117, 196, .55); background: rgba(100, 142, 218, .17); color: #1d3f77; }

.account-page { min-height: 100vh; display: flex; flex-direction: column; }
.account-page main { display: flex; flex: 1; align-items: center; }
.account-header .header-inner { min-height: 74px; }
.account-nav { display: flex; align-items: center; gap: 11px; }
.account-home { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 13px; transition: background .2s ease, color .2s ease; }
.account-home:hover { background: var(--surface-soft); color: var(--text); }
.account-nav .utility-toggle { min-height: 36px; }
.account-shell { display: grid; place-items: center; padding-block: 76px 88px; }
.account-panel { position: relative; isolation: isolate; width: min(100%, 580px); padding: clamp(27px, 5vw, 48px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 25px; background: linear-gradient(150deg, rgba(16, 26, 49, .97), rgba(9, 15, 29, .98)); box-shadow: 0 28px 90px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .035); }
.account-panel::before { position: absolute; z-index: -1; top: -150px; right: -105px; width: 330px; height: 330px; border-radius: 50%; background: radial-gradient(circle, rgba(105, 145, 238, .2), transparent 70%); content: ""; pointer-events: none; }
.account-kicker { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--cyan); font-size: 11px; font-weight: 750; letter-spacing: .16em; }
.account-kicker::before { width: 20px; height: 1px; background: currentColor; content: ""; }
.account-panel h1 { max-width: none; margin: 0 0 10px; font-size: clamp(34px, 5vw, 45px); font-weight: 680; letter-spacing: -.055em; line-height: 1.2; }
.account-intro { margin: 0 0 27px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.account-notice { display: flex; gap: 12px; margin: 0 0 25px; padding: 14px 15px; border: 1px solid rgba(135, 231, 208, .19); border-radius: 13px; background: rgba(35, 107, 100, .12); color: #b7e8dc; font-size: 12px; line-height: 1.75; }
.account-notice-icon { display: grid; flex: 0 0 24px; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: rgba(135, 231, 208, .13); color: var(--mint); font-size: 13px; font-weight: 750; }
.account-notice p { margin: 0; }
.account-notice strong { color: #e1fff6; font-weight: 700; }
.account-form { display: grid; gap: 16px; }
.account-form[hidden], [hidden] { display: none !important; }
.account-field { display: grid; gap: 7px; color: #d7e1f6; font-size: 13px; font-weight: 650; }
.account-field input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 11px; outline: none; background: rgba(4, 10, 21, .72); color: var(--text); font: inherit; font-size: 14px; font-weight: 450; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.account-field input::placeholder { color: var(--quiet); }
.account-field input:focus { border-color: rgba(145, 183, 255, .78); background: rgba(5, 12, 25, .9); box-shadow: 0 0 0 3px rgba(100, 144, 232, .13); }
.account-code-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 9px; }
.account-code-button { min-height: 48px; padding-inline: 12px; border: 1px solid rgba(145, 183, 255, .32); border-radius: 11px; background: rgba(66, 104, 184, .15); color: #dbe7ff; font-size: 12px; font-weight: 680; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.account-code-button:hover:not(:disabled) { border-color: rgba(164, 203, 255, .65); background: rgba(71, 118, 215, .24); }
.account-code-button:disabled { cursor: wait; opacity: .68; }
.account-field-hint { margin: -3px 0 0; color: var(--quiet); font-size: 11px; line-height: 1.6; }
.account-submit { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; gap: 10px; margin-top: 2px; border: 1px solid transparent; border-radius: 12px; background: linear-gradient(110deg, #89baff, #aaa3ff); color: #081020; font-size: 14px; font-weight: 750; cursor: pointer; box-shadow: 0 10px 28px rgba(107, 133, 227, .16); transition: transform .18s ease, filter .18s ease, opacity .18s ease; }
.account-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.account-submit:disabled { cursor: wait; opacity: .68; }
.account-form-status { min-height: 22px; margin: -5px 0 0; color: #ffb8b8; font-size: 12px; line-height: 1.6; }
.account-form-status[data-state="success"] { color: #9be6cb; }
.account-switch-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 19px 0 0; color: var(--quiet); font-size: 12px; }
.account-switch { padding: 4px; border: 0; background: none; color: #adc7ff; font: inherit; font-weight: 680; cursor: pointer; }
.account-switch:hover { color: #d5e2ff; text-decoration: underline; }
.account-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--quiet); font-size: 10px; letter-spacing: .08em; }
.account-divider::before, .account-divider::after { flex: 1; height: 1px; background: var(--line); content: ""; }
.account-legal { margin: 0; color: var(--quiet); font-size: 11px; line-height: 1.8; text-align: center; }
.account-legal a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(145, 183, 255, .35); text-underline-offset: 3px; }
.account-legal a:hover { color: var(--text); }
.account-signed-in { display: grid; justify-items: center; text-align: center; }
.account-avatar { display: grid; width: 70px; height: 70px; place-items: center; margin: 1px 0 18px; border: 1px solid rgba(145, 183, 255, .35); border-radius: 22px; background: linear-gradient(145deg, rgba(74, 112, 190, .3), rgba(47, 145, 140, .2)); color: #e1eaff; font-size: 24px; font-weight: 750; }
.account-signed-in h2 { margin: 0 0 7px; font-size: 26px; letter-spacing: -.04em; }
.account-user-email { margin: 0 0 21px; color: var(--cyan); font-size: 14px; overflow-wrap: anywhere; }
.account-membership { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 7px; padding: 15px; border: 1px solid rgba(135, 231, 208, .2); border-radius: 13px; background: rgba(35, 107, 100, .1); text-align: left; }
.account-membership > div { display: grid; gap: 5px; }
.account-membership > div span { color: var(--muted); font-size: 11px; }
.account-membership > div strong { color: var(--text); font-size: 14px; }
.account-membership p { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.account-membership-sync { margin: 0 0 15px; color: var(--quiet); font-size: 11px; }
.account-plan-picker { width: 100%; margin: 0 0 19px; text-align: left; }
.account-plan-picker h3 { margin: 0 0 11px; color: var(--text); font-size: 14px; }
.account-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.account-plan-button { display: flex; min-height: 66px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-soft); color: var(--text); text-align: left; cursor: pointer; }
.account-plan-button:hover:not(:disabled) { border-color: var(--blue); background: rgba(77, 122, 193, .18); }
.account-plan-button strong { color: var(--text); font-size: 13px; }
.account-plan-button small { color: var(--muted); font-size: 10px; font-weight: 500; }
.account-plan-button:disabled { opacity: .58; cursor: not-allowed; }
.account-plan-pro { border-color: rgba(74, 188, 164, .38); background: rgba(39, 119, 115, .13); }
.account-plan-note { margin: 9px 0 3px; color: var(--quiet); font-size: 10px; line-height: 1.7; }
.account-plan-controls { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; }
.account-plan-refresh, .account-plan-cancel { min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.account-plan-cancel { border-color: rgba(239, 153, 133, .32); color: #efb6a8; }
.account-plan-refresh:hover, .account-plan-cancel:hover { border-color: var(--blue); color: var(--text); }
.account-checkout-fallback { display: inline-flex; margin: 3px 0 7px; color: var(--cyan); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.account-checkout-fallback[hidden], .account-plan-cancel[hidden] { display: none; }
.account-data-note { margin: 0 0 22px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); font-size: 12px; line-height: 1.8; text-align: left; }
.account-data-note strong { color: var(--text); }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.account-download-link, .account-logout { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-soft); color: var(--text); font-size: 12px; font-weight: 680; cursor: pointer; }
.account-download-link { border-color: rgba(135, 231, 208, .35); background: rgba(39, 119, 115, .2); color: #c4f4e7; }
.account-download-link:hover, .account-logout:hover { border-color: var(--blue); }
.account-signout-status { min-height: 20px; margin: 12px 0 0; color: #ffb8b8; font-size: 12px; }
:root[data-theme="light"] .account-panel { border-color: rgba(49, 71, 104, .16); background: linear-gradient(150deg, rgba(255, 255, 255, .99), rgba(243, 247, 252, .99)); box-shadow: 0 25px 72px rgba(38, 57, 84, .12), inset 0 1px #fff; }
:root[data-theme="light"] .account-panel::before { background: radial-gradient(circle, rgba(105, 145, 238, .13), transparent 70%); }
:root[data-theme="light"] .account-field { color: #34445e; }
:root[data-theme="light"] .account-field input { border-color: rgba(49, 71, 104, .2); background: rgba(255, 255, 255, .9); color: #17243a; }
:root[data-theme="light"] .account-field input:focus { border-color: rgba(74, 117, 196, .65); background: #fff; box-shadow: 0 0 0 3px rgba(74, 117, 196, .11); }
:root[data-theme="light"] .account-notice { border-color: rgba(32, 140, 117, .2); background: rgba(32, 140, 117, .07); color: #386d63; }
:root[data-theme="light"] .account-notice strong { color: #20594f; }
:root[data-theme="light"] .account-code-button { border-color: rgba(74, 117, 196, .27); background: rgba(100, 142, 218, .1); color: #284b85; }
:root[data-theme="light"] .account-switch { color: #345c9c; }
:root[data-theme="light"] .account-switch:hover { color: #1d3f77; }
:root[data-theme="light"] .account-avatar { border-color: rgba(74, 117, 196, .25); color: #284b85; }
:root[data-theme="light"] .account-user-email { color: #257565; }
:root[data-theme="light"] .account-membership { border-color: rgba(32, 140, 117, .2); background: rgba(32, 140, 117, .06); }
:root[data-theme="light"] .account-membership > div strong { color: #20594f; }
:root[data-theme="light"] .account-plan-button { border-color: rgba(49, 71, 104, .18); background: rgba(248, 250, 253, .92); }
:root[data-theme="light"] .account-plan-pro { border-color: rgba(38, 142, 125, .3); background: rgba(49, 160, 139, .08); }
:root[data-theme="light"] .account-plan-button:hover:not(:disabled) { background: rgba(74, 117, 196, .08); }
:root[data-theme="light"] .account-plan-cancel { color: #9e5043; }
:root[data-theme="light"] .account-data-note { border-color: rgba(49, 71, 104, .16); }
:root[data-theme="light"] .account-download-link { border-color: rgba(38, 142, 125, .3); background: rgba(49, 160, 139, .1); color: #23685f; }
.account-footer .footer-bottom { width: 100%; }

@media (max-width: 640px) {
  .account-header .header-inner { min-height: 66px; gap: 8px; }
  .account-nav { gap: 5px; }
  .account-home { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; overflow: hidden; font-size: 0; }
  .account-home::before { content: "←"; font-size: 15px; }
  .account-nav .theme-label { display: none; }
  .account-nav .utility-toggle { min-height: 34px; padding-inline: 9px; font-size: 11px; }
  .account-shell { padding-block: 42px 56px; }
  .account-panel { border-radius: 19px; }
  .account-panel h1 { font-size: 34px; }
  .account-actions { grid-template-columns: 1fr; }
  .account-plan-grid { grid-template-columns: 1fr; }
  .account-membership { align-items: flex-start; flex-direction: column; gap: 8px; }
  .account-membership p { text-align: left; }
}
