/* Profile workspace: the dashboard's charcoal surfaces and warm arcade accents. */
body.account-page {
  display: flow-root;
  --account-bg: #111111;
  --account-surface: #191919;
  --account-surface-soft: #222222;
  --account-surface-deep: #171717;
  --account-border: #363431;
  --account-border-strong: #6e6254;
  --account-text: #f1efec;
  --account-muted: #b1ada8;
  --account-subtle: #a09b94;
  --account-accent: #d49a60;
  --account-accent-strong: #71362f;
  --account-radius: 8px;
  background: #111 url("/assets/arcade-hero-background-warm-lounge.png") center / cover fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.account-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.account-page .account-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 18px auto;
  padding: 0;
  overflow: clip;
  border: 1px solid var(--account-border);
  border-radius: 10px;
  background: rgba(19, 19, 19, 0.97);
  box-shadow: 0 20px 60px #0007;
}

.account-page .account-topbar {
  min-height: 72px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--account-border);
}

.account-page .account-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; letter-spacing: -0.03em; }
.account-brand img { width: 36px; height: 47px; object-fit: contain; }
.account-back-link { display: inline-flex; align-items: center; gap: 10px; padding: 10px 0; color: #dca36d; font-size: 13px; text-decoration: none; }
.account-back-link:hover { color: #f5c79e; }
.account-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.account-page .account-panel { padding: 18px; }
.account-page .account-status-message { margin: 0 0 16px; padding: 12px 16px; border: 1px solid #86613d; background: #32271b; color: #f0cba4; font-size: 13px; line-height: 1.5; }
.account-page .account-status-message[data-tone="error"] { border-color: #7b4740; background: #332321; color: #ffc2b8; }
.account-loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 400px; color: var(--account-muted); }
.account-loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--account-accent); }

.account-settings-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.account-sidebar { display: flex; flex-direction: column; min-width: 0; padding: 24px 14px 18px; border: 1px solid var(--account-border); border-radius: 8px; background: #181818; }
.account-sidebar-profile { display: grid; justify-items: center; gap: 10px; padding: 0 4px 26px; text-align: center; border-bottom: 1px solid #41403d; }
.account-avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 120px; height: 120px; border: 1px solid #d9b998; border-radius: 50%; color: #fff5e8; background: #a87447; font-size: 64px; font-weight: 500; line-height: 1; }
.account-avatar-small { width: 94px; height: 94px; margin-bottom: 4px; font-size: 48px; }
.account-sidebar-profile > strong { max-width: 100%; overflow-wrap: anywhere; font-size: 20px; letter-spacing: -0.025em; }
.account-handle { max-width: 100%; overflow-wrap: anywhere; color: var(--account-muted); font-size: 14px; }
.account-section-nav { display: grid; gap: 7px; margin-top: 18px; }
.account-section-tab { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 51px; padding: 11px 14px; border: 1px solid transparent; border-radius: 5px; color: #c8c5c0; background: transparent; font: inherit; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; transition: background 150ms ease, color 150ms ease, border-color 150ms ease; }
.account-section-tab > i { width: 24px; color: #aaa7a2; font-size: 20px; text-align: center; }
.account-section-tab:hover { background: #25231f; color: #fff5e8; }
.account-section-tab.is-active { border-color: #8d623e; color: #fff7ef; background: #60432b; }
.account-section-tab.is-active > i { color: #dfa46f; }
.account-sidebar-footer { margin-top: auto; padding-top: 100px; }
.account-signout-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 45px; padding: 10px 16px; border: 1px solid #91493f; border-radius: 5px; color: #ee9d8c; background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.account-signout-button:hover { background: #39231f; color: #ffd2c8; }
.account-sidebar-footer p { margin: 14px 0 0; color: var(--account-subtle); font-size: 11px; text-align: center; line-height: 1.5; }
.account-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.account-identity { display: flex; align-items: center; gap: 24px; min-height: 216px; padding: 30px; border: 1px solid var(--account-border); border-radius: 8px; background: linear-gradient(90deg, rgba(10, 10, 10, 0.76), rgba(10, 10, 10, 0.7)), url("/assets/arcade-hero-background-warm-lounge.png") center 48% / cover; }
.account-identity-copy { min-width: 0; }
.account-identity { position: relative; isolation: isolate; overflow: hidden; }
.account-cover-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.account-identity:has(.account-cover-image:not([hidden]))::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0009, #0006); pointer-events: none; }
.account-avatar { overflow: hidden; }
.account-avatar > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-avatar-editor { position: relative; flex: 0 0 auto; }
.account-image-edit-button, .account-image-clear-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #9c7958; border-radius: 50%; background: #25211e; color: #edbc8e; box-shadow: 0 2px 8px #0007; cursor: pointer; }
.account-avatar-editor .account-image-edit-button { position: absolute; right: -2px; bottom: -2px; }
.account-avatar-editor .account-image-clear-button { position: absolute; right: -2px; top: -2px; }
.account-image-clear-button { width: 26px; height: 26px; border-color: #77685a; color: #dfd3c8; font-size: 11px; }
.account-cover-tools { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 8px; }
.account-image-edit-button:hover, .account-image-clear-button:hover { background: #68472e; color: #fff2e5; }
.account-image-edit-button:disabled, .account-image-clear-button:disabled { opacity: .5; cursor: wait; }
.account-image-remove { padding: 0; border: 0; color: var(--account-muted); background: none; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.account-image-remove:hover { color: #ffc2b8; }
.account-image-feedback { margin: 16px 0 0; color: #dfad7c; font-size: 13px; line-height: 1.5; }
.account-image-feedback[data-tone="error"] { color: #ffc2b8; }
.account-groups-toolbar, .account-group-actions, .account-group-form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.account-groups-toolbar { margin-top: 26px; }
.account-groups-help { color: var(--account-muted); font-size: 12px; line-height: 1.7; }
.account-groups-help a { color: #dfad7c; text-underline-offset: 3px; }
.account-group-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.account-page .account-group-form { padding: 24px 0; border-block: 1px solid var(--account-border); gap: 22px; }
.account-group-preview { padding: 16px; border-radius: 5px; background: #22211f; color: var(--account-muted); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.account-group-preview strong { color: #dfad7c; font-weight: 600; }
.account-group-preview ul { margin: 10px 0 0; padding-left: 18px; max-height: 230px; overflow-y: auto; }
.account-group-warning { margin-bottom: 0; color: #efc68f; }
.account-groups-list { display: grid; margin-top: 24px; }
.account-group-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-top: 1px solid var(--account-border); }
.account-group-card h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.account-group-card p, .account-groups-empty { margin: 7px 0 0; color: var(--account-muted); font-size: 13px; line-height: 1.7; }
.account-group-actions { flex: 0 0 auto; }
.account-group-actions .account-outline-button { font-size: 12px; min-height: 34px; padding: 8px 10px; text-decoration: none; }
.account-page .account-profile-form .account-readonly-field { margin-top: 0; }
.account-identity-copy h2 { margin: 0; font-size: 30px; font-weight: 750; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.account-identity-copy p { margin: 6px 0 0; color: #c3beb8; font-size: 17px; overflow-wrap: anywhere; }
.account-role { display: flex; align-items: center; gap: 9px; margin-left: auto; color: #dfa16a; font-size: 13px; white-space: nowrap; }
.account-role > i { font-size: 17px; }

.account-page .account-settings-card { min-width: 0; padding: 30px 34px 24px; border: 1px solid var(--account-border); border-radius: 8px; background: #191919; }
.account-page .account-section-heading { display: flex; align-items: flex-start; padding: 0; border: 0; }
.account-page .account-section-heading h2 { font-size: 21px; line-height: 1.3; font-weight: 700; letter-spacing: -0.025em; }
.account-page .account-section-heading p { margin: 10px 0 0; color: var(--account-muted); font-size: 14px; line-height: 1.6; }
.account-page .account-form { gap: 30px; margin-top: 32px; }
.account-page .account-form label, .account-page .account-field-label { position: relative; gap: 10px; color: var(--account-text); font-size: 14px; font-weight: 600; }
.account-page .account-form input:not([type="checkbox"]), .account-page .account-form textarea, .account-page .account-form select { border: 1px solid #4a4844; border-radius: 5px; color: var(--account-text); background: #222; font: inherit; font-size: 15px; font-weight: 450; }
.account-page .account-form input:not([type="checkbox"]), .account-page .account-form select { min-height: 48px; padding: 12px 13px; }
.account-page .account-form textarea { min-height: 110px; padding: 12px 13px; line-height: 1.6; }
.account-page .account-form input::placeholder, .account-page .account-form textarea::placeholder { color: #8f8b85; }
.account-page :is(button, a, summary, input, textarea, select):focus-visible { outline: 2px solid #dfa16a; outline-offset: 4px; }
.account-page .account-form :is(input, textarea, select):focus-visible { border-color: #dfa16a; outline-offset: 2px; }
.account-page .account-form input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: #bd8655; }
.account-page .account-form small, .account-page .account-readonly-field small { color: var(--account-subtle); font-size: 13px; line-height: 1.5; }
.account-page .account-readonly-field { max-width: 620px; gap: 10px; margin-top: 32px; }
.account-page .account-readonly-value { min-height: 48px; padding: 12px 13px; border: 1px solid #44423f; border-radius: 5px; color: #aaa59e; background: #222; font-size: 15px; overflow-wrap: anywhere; }
.account-profile-form > label, .account-setup-field { max-width: 620px; }
.account-setup-field { display: grid; gap: 13px; margin-top: 4px; }
.account-page .account-checkbox-label { font-weight: 450; gap: 10px !important; }
.account-page .account-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--account-border); }
.account-form-footer p { margin: 0; color: var(--account-subtle); font-size: 13px; line-height: 1.5; }
.account-form-footer p[data-dirty="true"] { color: #dfad7c; }
.account-page .account-primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: fit-content; min-width: 155px; min-height: 43px; padding: 12px 22px; border: 1px solid #a36348; border-radius: 5px; color: #fff4e9; background: #71362f; font-size: 13px; font-weight: 700; box-shadow: inset 0 1px #ffffff0a; cursor: pointer; }
.account-page .account-primary-button:hover { background: #8b4939; border-color: #d79a68; }
.account-page button:disabled { cursor: wait; opacity: 0.6; }
.account-page .account-outline-button { min-height: 37px; gap: 8px; padding: 9px 12px; border: 1px solid #6a5744; border-radius: 5px; color: #ecc49c; background: #2a241e; font-size: 12px; cursor: pointer; }
.account-page .account-outline-button:hover { border-color: #bd8655; background: #3a2d21; }

.account-page .account-preferences-form { display: contents; }
.account-page .account-media-section { margin-top: 30px; }
.account-page .account-media-section + .account-media-section { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--account-border); }
.account-page .account-media-section-heading { align-items: center; }
.account-page .account-media-section-heading h3 { font-size: 15px; }
.account-page .account-media-section-heading p { margin-top: 7px; font-size: 12px; line-height: 1.5; }
.account-page .account-media-empty { display: grid; justify-items: center; gap: 8px; min-height: 122px; align-content: center; padding: 22px; border: 1px dashed #524639; background: #1c1b19; font-size: 12px; }
.account-media-empty > i { margin-bottom: 3px; color: #ae8054; font-size: 22px; }
.account-media-empty > strong { color: #d8d2c9; font-size: 13px; font-weight: 550; }
.account-media-empty > span { color: var(--account-subtle); line-height: 1.5; }
.account-page .account-game-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 18px; }
.account-page .account-game-card { max-width: 180px; }
.account-page .account-streamer-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 18px; }
.account-page .account-streamer-card { max-width: 180px; gap: 9px; padding: 17px 9px; }
.account-page .account-streamer-card figcaption, .account-page .account-game-card figcaption { font-size: 12px; }
.account-page .account-media-remove { width: 26px; height: 26px; border-color: #87705b; }
.account-page .account-streamer-status { font-size: 11px; }
.account-list-disclosure { margin-top: 13px; }
.account-list-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; color: #b9afa2; font-size: 12px; cursor: pointer; list-style: none; }
.account-list-disclosure > summary::-webkit-details-marker { display: none; }
.account-list-disclosure > summary > i { font-size: 10px; transition: transform 150ms ease; }
.account-list-disclosure[open] > summary > i { transform: rotate(180deg); }
.account-page .account-list-editor { display: grid; gap: 8px; margin-top: 8px; padding: 14px; background: #151515; border-color: var(--account-border); }
.account-page .account-list-editor > span { color: var(--account-muted); font-size: 12px; }
.account-page .account-list-editor textarea { margin: 0; }
.account-page .account-preference-rows { margin-top: 24px; border: 0; border-radius: 0; }
.account-page .account-preference-row { grid-template-columns: 24px minmax(0, 1fr) minmax(140px, 190px); gap: 17px; min-height: 110px; padding: 23px 0; border-color: var(--account-border); }
.account-page .account-preference-icon { width: 24px; height: 24px; border-radius: 0; color: #ba946e; background: transparent; font-size: 19px; }
.account-page .account-preference-copy { gap: 8px; }
.account-page .account-preference-copy strong { font-size: 14px; font-weight: 600; }
.account-page .account-preference-copy small { max-width: 32ch; font-size: 12px; line-height: 1.5; }
.account-page .account-form .account-toggle-row > input[type="checkbox"] { appearance: none; position: relative; width: 40px; height: 23px; justify-self: end; border: 1px solid #6c655d; border-radius: 20px; background: #36322d; cursor: pointer; }
.account-page .account-toggle-row > input::before { content: ""; display: block; width: 15px; height: 15px; margin: 3px; border-radius: 50%; background: #d2c6b8; transition: transform 150ms ease; }
.account-page .account-form .account-toggle-row > input:checked { border-color: #bb8555; background: #8f5e34; }
.account-page .account-toggle-row > input:checked::before { transform: translateX(17px); background: #fff3e4; }
.account-security-section { padding: 28px 0 0; }
.account-security-section + .account-security-section { margin-top: 28px; border-top: 1px solid var(--account-border); }
.account-security-section h3 { margin: 0; font-size: 15px; font-weight: 600; }
.account-security-section p { margin: 9px 0 0; color: var(--account-muted); font-size: 13px; line-height: 1.6; }
.account-security-section .account-form { max-width: 620px; margin-top: 22px; gap: 20px; }
.account-security-note { display: flex; align-items: flex-start; gap: 16px; }
.account-security-note > i { margin-top: 1px; color: #bb916b; font-size: 21px; }
.account-admin-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 15px; color: #e5b381; font-size: 13px; text-decoration: none; }
.account-admin-link:hover { text-decoration: underline; }

.account-welcome { width: min(100%, 480px); margin: 36px auto 48px; }
.account-welcome-heading { margin-bottom: 26px; text-align: center; }
.account-welcome-heading h2 { margin: 0; font-size: 30px; letter-spacing: -0.04em; }
.account-welcome-heading p { margin: 13px auto 0; max-width: 38ch; color: var(--account-muted); font-size: 14px; line-height: 1.65; }
.account-auth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 5px; border: 1px solid var(--account-border); border-radius: 7px; background: #141414; }
.account-auth-tabs button { min-height: 42px; border: 1px solid transparent; border-radius: 4px; color: var(--account-muted); background: transparent; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.account-auth-tabs button[aria-selected="true"] { color: #ffedd8; border-color: #79583a; background: #4b3725; }
.account-page .account-auth-card { margin-top: 12px; padding: 28px; background: #1b1b1b; }
.account-auth-card h3 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.account-auth-card > p { margin: 8px 0 0; font-size: 13px; line-height: 1.6; }
.account-auth-card .account-primary-button { width: 100%; }
.account-optional { position: absolute; right: 0; color: var(--account-subtle); font-size: 11px; font-weight: 400; }
.account-welcome-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; color: var(--account-subtle); font-size: 11px; }

@media (max-width: 1000px) {
  .account-group-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .account-page .account-shell { width: calc(100% - 32px); margin: 16px auto; }
  .account-settings-layout { grid-template-columns: 205px minmax(0, 1fr); }
  .account-identity { gap: 18px; padding: 24px; flex-wrap: wrap; }
  .account-role { margin-left: 0; }
  .account-page .account-settings-card { padding: 26px; }
  .account-page .account-preference-row { grid-template-columns: 24px minmax(0, 1fr); }
  .account-page .account-preference-row select { grid-column: 2; width: 100%; max-width: 240px; }
  .account-page .account-form .account-toggle-row > input[type="checkbox"] { grid-column: 2; justify-self: start; }
}

@media (max-width: 720px) {
  .account-page .account-shell { width: calc(100% - 20px); margin: 10px auto; }
  .account-page .account-topbar { min-height: 67px; padding: 10px 16px; }
  .account-page .account-brand { font-size: 15px; gap: 9px; }
  .account-brand img { width: 28px; height: 36px; }
  .account-back-link { font-size: 11px; gap: 7px; }
  .account-page .account-panel { padding: 12px; }
  .account-settings-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .account-sidebar { display: contents; }
  .account-sidebar-profile { display: none; }
  .account-section-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 5px; border: 1px solid var(--account-border); border-radius: 7px; background: #191919; }
  .account-section-tab { flex-direction: column; justify-content: center; gap: 9px; min-height: 65px; padding: 10px 3px; font-size: 10px; }
  .account-section-tab > i { font-size: 18px; }
  .account-sidebar-footer { grid-row: 3; margin: 0; padding: 14px 0 4px; }
  .account-signout-button { width: auto; min-width: 135px; margin: 0 auto; }
  .account-content { grid-row: 2; gap: 12px; }
  .account-identity { min-height: 142px; gap: 16px; padding: 20px; }
  .account-avatar { width: 65px; height: 65px; font-size: 35px; }
  .account-avatar-editor .account-image-edit-button { width: 30px; height: 30px; font-size: 12px; }
  .account-cover-tools { top: 10px; right: 10px; }
  .account-cover-tools .account-image-edit-button { width: 30px; height: 30px; font-size: 12px; }
  .account-group-fields { grid-template-columns: 1fr; }
  .account-identity-copy { flex: 1; }
  .account-identity-copy h2 { font-size: 25px; }
  .account-identity-copy p { font-size: 13px; }
  .account-role { flex-basis: 100%; font-size: 11px; gap: 7px; }
  .account-role > i { font-size: 13px; }
  .account-page .account-settings-card { padding: 24px 18px 20px; }
  .account-page .account-section-heading h2 { font-size: 20px; }
  .account-page .account-form-footer { flex-direction: column; align-items: stretch; gap: 15px; margin-top: 18px; padding-top: 20px; }
  .account-form-footer .account-primary-button { width: 100%; }
  .account-page .account-media-section-heading { display: flex; gap: 12px; align-items: flex-start; }
  .account-media-section-heading > div { min-width: 0; }
  .account-page .account-outline-button { min-height: 38px; padding: 9px; font-size: 11px; }
  .account-page .account-game-grid, .account-page .account-streamer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .account-page .account-preference-row { gap: 12px; }
  .account-welcome { margin: 24px auto; }
  .account-welcome-heading h2 { font-size: 27px; }
  .account-page .account-auth-card { padding: 23px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-page *, .account-page *::before { scroll-behavior: auto !important; transition: none !important; }
}
