[hidden] { display: none !important; }
.account-shell { width: min(820px, 100%); margin: 0 auto; }
.account-shell .app-heading { margin-bottom: 18px; }
.account-shell .app-heading h1 { font-size: 36px; }
.account-shell .app-heading .app-eyebrow { margin: 0 0 6px; }
.account-page-status { color: var(--muted); font-size: 13px; }
.account-page-status:empty { display: none; }
.account-page-card { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: var(--paper); box-shadow: var(--shadow); }
.account-page-card h2 { margin: 0 0 12px; font: 800 22px/1.2 var(--font-display); }
.account-page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.account-page-heading h2 { margin: 0; }
.account-balance-row { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.account-balance { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); text-decoration: none; }
.account-balance strong { font: 900 22px/1 var(--font-numbers); }
.account-balance span { color: var(--muted); font-size: 12px; }
.account-balance:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.account-page-kicker { margin: 0 0 4px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
#settings-form { display: grid; gap: 12px; }
.settings-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.settings-tabs .account-control { flex: 1; min-width: 0; white-space: normal; }
.settings-tabs [aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
.settings-panel { box-sizing: border-box; height: clamp(180px, calc(100dvh - 350px), 380px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.settings-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.settings-panel > label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; }
#settings-panel-profile .account-note { margin: 8px 0 16px; }
.account-connections { display: grid; gap: 8px; margin: 20px 0; border-top: 1px solid var(--line); padding-top: 16px; }
.account-connections h3 { margin: 0; font: 800 16px/1.3 var(--font-display); }
.account-connection-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--canvas); }
.account-connection-copy { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.account-provider-icon { flex: none; }
.account-connection-row .account-note { margin: 3px 0 0; font-size: 12px; white-space: pre-line; }
.account-connection-row .account-control { flex: none; }
.settings-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.settings-save-bar > button { flex: none; }
#settings-form > label, #settings-form legend { font-size: 12px; font-weight: 800; }
#settings-name { width: min(100%, 360px); min-height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--paper); color: var(--ink); font: inherit; }
#settings-form fieldset { margin: 6px 0 0; border: 0; padding: 0; }
.avatar-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.avatar-choice-wrap { display: inline-flex; }
.avatar-choice { display: grid; width: 52px; height: 52px; place-items: center; border: 2px solid var(--line); border-radius: 50%; padding: 3px; background: var(--paper); cursor: pointer; }
.avatar-choice.is-locked { filter: grayscale(1); opacity: .48; cursor: not-allowed; }
.avatar-choice-wrap.is-locked { position: relative; }
.avatar-lock { position: absolute; right: -3px; bottom: -3px; display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 11px; }
.avatar-lock img { width: 13px; height: 13px; }
.avatar-choice img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.avatar-choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); }
.avatar-choice:focus-visible, #settings-name:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.account-page-card .account-note { margin: 0; }
.cog-editor { display: flex; flex-direction: column; gap: 10px; }
.cog-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cog-editor-heading h2 { margin: 0; font-size: 18px; }
.cog-editor h3 { margin: 0; font: 800 18px var(--font-display); }
.cog-shop-button { display: flex; flex: none; align-items: center; gap: 6px; min-height: 36px; border: 1px solid #82bfff; border-radius: 6px; padding: 4px 8px; background: linear-gradient(115deg, #213f62, #28394c 65%, #533d46); color: #eef6ff; box-shadow: 0 3px 0 #162d49; text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.cog-shop-button > img { flex: none; }
.cog-shop-button > span:not(.cog-shop-arrow) { min-width: 0; flex: 1; }
.cog-shop-button strong { display: block; font: 800 12px var(--font-display); }
.cog-shop-button small { display: block; margin-top: 4px; color: #c9dff3; font-size: 12px; line-height: 1.5; }
.cog-shop-arrow { color: #ff987f; font-size: 24px; }
.cog-shop-button:hover { border-color: #ff987f; background: #294663; }
.cog-shop-button:active { transform: translateY(1px); box-shadow: none; }
.cog-shop-button:focus-visible { outline: 3px solid #ff987f; outline-offset: 3px; }
.cog-editor .cog-customizer { flex: 1; min-height: 0; grid-template-columns: minmax(140px, .65fr) minmax(0, 1.35fr); gap: 12px; }
.cog-preview-stage { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--canvas); text-align: center; overflow-y: auto; }
.cog-preview-stage .cog-profile-preview { width: min(140px, 100%); height: auto; aspect-ratio: 1; }
.cog-preview-art { position: relative; width: min(140px, 100%); }
.cog-preview-shop { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); min-height: 36px; white-space: nowrap; text-decoration: none; }
.cog-preview-caption { font-size: 12px; line-height: 1.4; }
.cog-preview-stage .account-note { font-size: 11px; line-height: 1.4; }
.cog-browser { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cog-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.cog-tabs [aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
.cog-options-panel { display: grid; flex: 1; min-height: 0; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-content: start; gap: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.cog-options-panel .cog-filter-empty { grid-column: 1 / -1; }
.cog-options-panel .cog-option { min-width: 0; min-height: 60px; justify-content: flex-start; padding: 6px; text-align: left; white-space: normal; }
.cog-option > span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.cog-option strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.cog-option-detail { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.cog-option.is-unowned { border-style: dashed; }
.cog-option.is-unowned .cog-option-detail { color: var(--ink); font-weight: 700; }
.cog-options-panel .cog-swatch { width: 28px; height: 28px; }
.cog-hat-preview { width: 36px; height: 36px; flex: none; object-fit: contain; }
.cog-option:focus-visible, .cog-options-panel:focus-visible, .cog-tabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#settings-changes { font-size: 12px; line-height: 1.4; }
#settings-changes.is-unsaved { color: var(--ink); font-weight: 700; }
#settings-save.has-unsaved-changes { border-color: var(--accent); background: var(--accent); color: var(--canvas); box-shadow: 0 0 0 3px var(--accent-soft); animation: save-reminder 1.8s ease-in-out infinite; }
@keyframes save-reminder { 50% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) {
  #settings-save.has-unsaved-changes { animation: none; }
  .cog-shop-button { transition: none; }
  .cog-shop-button:hover, .cog-shop-button:active { transform: none; }
}
.progress-list, .achievement-list { display: grid; gap: 9px; }
.progress-item, .achievement-item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--canvas); }
.progress-item.is-complete, .achievement-item.is-earned { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.progress-item-copy, .achievement-copy { min-width: 0; flex: 1; }
.progress-item strong, .achievement-item strong { display: block; font-size: 13px; }
.progress-item p, .achievement-item p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.progress-count { flex: none; color: var(--muted); font: 800 12px var(--font-numbers); white-space: nowrap; }
.mission-reward { display: inline-flex; flex: none; align-items: center; gap: 3px; color: var(--accent); font: 800 12px var(--font-numbers); white-space: nowrap; }
.mission-reward img { width: 17px; height: 17px; }
.achievement-state { flex: none; font-size: 19px; }
.achievement-state img { display: block; width: 19px; height: 22px; }
.achievement-reward-avatar { width: 34px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 50%; object-fit: contain; }
@media (max-width: 520px) {
  .account-shell .app-heading h1 { font-size: 30px; }
  .account-page-card { padding: 12px; }
  .account-page-card h2 { font-size: 16px; }
  .settings-tabs { gap: 4px; }
  .settings-tabs .account-control { padding-inline: 5px; font-size: 11px; min-height: 44px; }
  .settings-panel { height: clamp(200px, calc(100dvh - 325px), 420px); }
  .settings-panel.cog-editor { height: clamp(340px, calc(100dvh - 250px), 480px); }
  .account-page-heading { align-items: flex-start; }
  #settings-name { font-size: 16px; }
  .account-connection-row { flex-wrap: wrap; }
  .account-connection-row .account-control { min-height: 44px; }
  .cog-editor .cog-customizer { grid-template-columns: minmax(0, 1fr); grid-template-rows: 112px minmax(0, 1fr); gap: 8px; }
  .cog-preview-stage { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-rows: 1fr 1fr; gap: 2px 6px; padding: 6px; text-align: left; }
  .cog-preview-art { grid-row: 1 / 3; width: 96px; }
  .cog-preview-stage .cog-profile-preview { width: 96px; display: block; }
  .cog-preview-shop { min-height: 44px; padding: 4px 6px; font-size: 11px; }
  .cog-preview-caption { align-self: end; }
  .cog-preview-stage .account-note { grid-column: 2; align-self: start; }
  .cog-preview-stage > button { grid-column: 3; grid-row: 1 / 3; max-width: 64px; min-height: 44px; padding: 4px; font-size: 10px; white-space: normal; }
  .cog-options-panel { grid-template-columns: minmax(0, 1fr); }
  .cog-editor-heading h2 { font-size: 14px; }
  .cog-shop-button { min-height: 40px; }
  .cog-shop-button > img { width: 20px; height: 20px; }
  .cog-shop-button strong { font-size: 11px; }
  .settings-save-bar { gap: 8px; }
  .settings-save-bar > button { min-height: 44px; }
  .progress-item, .achievement-item { gap: 8px; padding: 8px; }
}
