.hk-account-page { min-width:0; --account-peach:#f9e3d5; --account-mint:#e0eee7; --account-yellow:#f5e8be; }
.hk-account-page.dark-mode {
  --account-peach:#513b36; --account-mint:#284b3e; --account-yellow:#50432b;
  background:var(--bg-main);
}
.account-main { width:min(1120px,calc(100% - 48px)); margin:48px auto 56px; color:var(--text-main); }
.account-card { box-sizing:border-box; width:100%; max-width:620px; min-width:0; margin-inline:auto; padding:32px; border:1px solid var(--border-color); border-radius:var(--ui-radius-panel); background:var(--bg-card); box-shadow:var(--ui-shadow); }
.dark-mode .account-card { border-color:var(--border-color); background:var(--ui-card-bg); box-shadow:var(--ui-shadow); }
.account-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; margin:0 0 26px; background:var(--surface-2,var(--bg-main)); border-radius:var(--ui-radius-control); }
.account-tabs button { min-width:0; min-height:44px; padding:8px; border:0; border-radius:var(--ui-radius-control); background:transparent; color:var(--text-muted); font:inherit; font-size:.82rem; font-weight:650; cursor:pointer; overflow-wrap:anywhere; }
.account-tabs button[aria-selected="true"] { background:var(--bg-card); color:var(--text-main); box-shadow:0 1px 5px rgba(20,18,31,.08); }
.account-card-heading::before { content:""; display:block; width:64px; height:8px; margin-bottom:22px; border-radius:99px; background:linear-gradient(90deg,#677ded 0 33%,#ee956f 33% 66%,#74c8a3 66%); }
.account-card-heading h1 { margin:0 0 8px; color:var(--text-main); font-size:1.5rem; font-weight:750; letter-spacing:-.025em; line-height:1.2; overflow-wrap:anywhere; }
.account-card-heading h1:focus { outline:none; }
.account-card-heading p { margin:0 0 24px; color:var(--text-muted); font-size:.86rem; line-height:1.65; }
.account-field { display:grid; gap:8px; margin:0 0 18px; min-width:0; }
.account-field label,.account-avatar-fieldset legend { color:var(--text-main); font-size:.82rem; font-weight:650; }
.account-field input { box-sizing:border-box; width:100%; min-width:0; min-height:48px; padding:11px 13px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); background:var(--bg-main,var(--surface)); color:var(--text-main); font:inherit; font-size:1rem; transition:border-color 150ms; }
.account-field input:focus { border-color:var(--hk-focus); }
.account-field input:disabled { opacity:.65; }
.account-field-help { margin:-5px 0 20px; color:var(--text-muted); font-size:.75rem; line-height:1.65; }
.hk-account-page .account-submit { display:flex; align-items:center; justify-content:center; width:100%; min-height:48px; padding:12px; margin:8px 0 18px; border-radius:var(--ui-radius-control); font-size:.9rem; font-weight:700; white-space:normal; }
.hk-account-page .account-submit:disabled { cursor:default; opacity:.5; transform:none; box-shadow:none; }
.account-text-button { min-height:44px; padding:8px 0; border:0; background:transparent; color:var(--accent-text); font:inherit; font-size:.8rem; font-weight:650; line-height:1.5; cursor:pointer; text-align:start; overflow-wrap:anywhere; }
.account-text-button:hover { text-decoration:underline; text-underline-offset:3px; }
.account-text-button:disabled { opacity:.5; cursor:default; }
.account-service,.account-message { margin:0 0 20px; padding:12px 14px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); background:var(--surface-2,var(--bg-main)); color:var(--text-muted); font-size:.8rem; line-height:1.65; overflow-wrap:anywhere; }
.account-service p { margin:0; }
.account-service .account-text-button { margin-bottom:-8px; }
.account-message[data-kind="error"] { border-color:#b36a57; color:var(--text-main); }
.account-message[data-kind="success"] { background:var(--account-mint); color:var(--text-main); }
.account-message.account-verification-message { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:10px; padding:18px; }
.account-message.account-verification-message[hidden] { display:none; }
.account-verification-mark { display:grid; place-items:center; box-sizing:border-box; width:36px; height:36px; border:1px solid var(--border-color); border-radius:50%; background:var(--bg-card); color:var(--text-main); font-size:1.2rem; line-height:1; }
.account-verification-message > strong { font-size:.92rem; line-height:1.45; }
.account-verification-message > span:not(.account-verification-mark) { max-width:56ch; line-height:1.65; }
.account-verification-message > .account-text-button { justify-self:start; max-width:100%; padding:9px 14px; border:1px solid var(--border-color); border-radius:999px; background:var(--bg-card); text-align:center; }
.account-local-settings { margin:22px 0 0; padding-top:16px; border-top:1px solid var(--border-color); }
.account-local-settings p { margin:0 0 18px; color:var(--text-muted); font-size:.75rem; line-height:1.6; }
.account-local-settings .account-text-button { padding-block:4px; }
.account-guest-link { display:block; padding:8px 0; min-height:44px; color:var(--text-muted); font-size:.8rem; text-align:center; text-decoration:none; line-height:1.6; }
.account-guest-link:hover { color:var(--text-main); text-decoration:underline; }
.account-profile-summary { display:flex; flex-direction:column; align-items:flex-start; gap:22px; min-width:0; margin:8px 0 20px; padding:8px 0; }
.account-profile-summary > div:last-child { min-width:0; }
.account-profile-avatar { display:grid; place-items:center; box-sizing:border-box; width:104px; height:104px; flex:0 0 104px; margin-left:12px; overflow:visible; color:var(--text-main); font-size:2.5rem; background:linear-gradient(145deg,var(--account-mint),var(--account-peach)); border:3px solid var(--bg-card); border-radius:50%; box-shadow:0 0 0 1px var(--border-color),0 6px 18px -10px rgba(28,51,46,.35); }
.account-profile-avatar svg { width:36px; height:36px; }
.account-avatar-image { display:block; width:100%; height:100%; object-fit:cover; border-radius:50%; }
.account-profile-email { margin:0 0 6px; color:var(--text-main); font-size:.85rem; overflow-wrap:anywhere; }
.account-profile-verified { margin:0; font-size:.72rem; color:var(--text-muted); }
.account-avatar-fieldset { padding:0; margin:0 0 24px; min-width:0; border:0; }
.account-avatar-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
.account-avatar-choice { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; min-height:106px; padding:14px 8px 10px; border:1px solid var(--border-color); border-radius:var(--ui-radius-card); color:var(--text-muted); background:var(--bg-main,var(--surface)); cursor:pointer; }
.account-decoration-preview { display:block; width:42px; height:42px; border-radius:50%; }
.account-decoration-name { font-size:.7rem; font-weight:650; text-align:center; overflow-wrap:anywhere; line-height:1.3; }
.account-avatar-choice:has(input:checked) { background:var(--account-peach); border-color:var(--accent); color:var(--text-main); box-shadow:inset 0 0 0 1px var(--accent); }
.account-avatar-choice:has(input:focus-visible) { outline:3px solid var(--hk-focus); outline-offset:3px; }
.account-profile-actions { display:flex; justify-content:space-between; flex-wrap:wrap; gap:0 16px; margin-bottom:18px; }
.account-photo-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 10px; }
.account-photo-controls .account-text-button { padding:9px 14px; border:1px solid var(--border-color); border-radius:999px; background:var(--bg-card); text-decoration:none; }
.account-photo-controls .account-text-button:hover { border-color:var(--border-hover); background:var(--bg-hover); }
.account-photo-hint { margin:0 0 24px; color:var(--text-muted); font-size:.75rem; line-height:1.65; overflow-wrap:anywhere; }
.account-cache-note { display:grid; gap:4px; margin:0 0 22px; padding:13px 15px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); background:var(--account-mint); color:var(--text-main); font-size:.77rem; line-height:1.65; }
.account-cache-note time { font-size:.72rem; opacity:.85; }
.account-cache-note[hidden] { display:none; }
.account-billing-summary { margin-top:24px; padding-top:20px; border-top:1px solid var(--border-color); }
.account-billing-summary h3 { margin:0 0 10px; font-size:.88rem; }
.account-billing-summary p { color:var(--text-muted); font-size:.76rem; line-height:1.65; overflow-wrap:anywhere; }
.account-billing-plans { display:grid; gap:10px; }
.account-billing-plan { display:grid; gap:6px; padding:14px; border:1px solid var(--border-color); border-radius:var(--ui-radius-control); background:var(--bg-main); }
.account-billing-plan strong { font-size:.86rem; overflow-wrap:anywhere; }
.account-billing-plan .account-text-button { width:100%; padding-inline:12px; border:1px solid var(--border-color); border-radius:999px; text-align:center; background:var(--account-peach); color:var(--text-main); }
.account-billing-plan span { color:var(--text-muted); font-size:.76rem; }
.account-billing-actions { display:flex; flex-wrap:wrap; justify-content:space-between; gap:0 14px; }
.account-billing-summary[hidden] { display:none; }
.account-footer .footer-inner { display:flex; justify-content:center; flex-wrap:wrap; gap:12px 24px; font-size:.75rem; }
.account-footer a { color:var(--text-muted); }
.hk-account-page :is(a,button,input):focus-visible { outline:3px solid var(--hk-focus); outline-offset:3px; }
html.reduce-motion .account-field input,html.lite-mode .account-field input { transition:none; }

.hk-account-page[data-account-view="profile"] .account-card { max-width:none; padding:36px; }
.hk-account-page[data-account-view="profile"] .account-card-heading { margin-bottom:30px; }
.hk-account-page[data-account-view="profile"] .account-card-heading h1 { font-size:clamp(1.8rem,3vw,2.2rem); }
.account-profile-grid { display:grid; grid-template-columns:minmax(220px,.9fr) minmax(0,2.1fr); gap:36px; align-items:start; }
.account-profile-overview { min-width:0; padding:28px 22px 22px; border:1px solid var(--border-color); border-radius:var(--ui-radius-card); background:var(--ui-banner-bg) top / 100% 76px no-repeat,var(--bg-main); }
.account-profile-details { min-width:0; }
.account-profile-details .account-field { max-width:500px; }
.account-profile-details .account-submit { max-width:240px; }
.account-avatar-choice:has(input:disabled) { cursor:default; opacity:.65; }
.account-avatar-fieldset .account-field-help { margin:8px 0 0; }
.account-profile-overview .account-photo-hint { margin:12px 0 0; }
.hk-account-page[data-account-view="profile"] .account-local-settings { display:flex; align-items:center; justify-content:space-between; gap:12px 32px; margin-top:28px; padding-top:20px; }
.hk-account-page[data-account-view="profile"] .account-local-settings p { margin:0; max-width:460px; }
.hk-account-page[data-account-view="profile"] .account-guest-link { display:none; }
@media (max-width:900px) {
  .account-profile-grid { grid-template-columns:minmax(0,1fr); gap:28px; }
  .account-profile-overview { padding:24px; }
  .account-profile-summary { flex-direction:row; align-items:center; gap:28px; }
  .account-profile-details .account-field { max-width:none; }
}
@media (max-width:767px) {
  .account-main { width:calc(100% - 32px); margin-top:26px; }
  .account-card,.hk-account-page[data-account-view="profile"] .account-card { padding:22px 20px; border-radius:var(--ui-radius-panel); }
  .account-card-heading h1 { font-size:1.35rem; }
  .hk-account-page[data-account-view="profile"] .account-card-heading { margin-bottom:22px; }
  .account-profile-overview { padding:22px 16px 18px; border-radius:var(--ui-radius-control); }
  .account-profile-summary { flex-direction:column; align-items:flex-start; }
  .account-profile-avatar { width:88px; height:88px; flex-basis:88px; font-size:2.2rem; }
  .account-avatar-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .account-profile-details .account-submit { max-width:none; }
  .hk-account-page[data-account-view="profile"] .account-local-settings { align-items:flex-start; flex-direction:column; gap:8px; }
  .account-tabs { margin-bottom:22px; }
}
@media (prefers-reduced-motion:reduce) { .account-field input { transition:none; } }
