:root {
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
  --ink: #242824;
  --muted: #636b65;
  --line: #dcded7;
  --surface: #fff;
  --paper: #f6f4ef;
  --accent: #b74734;
  --accent-dark: #903322;
  --accent-soft: #f8eae6;
  --on-accent: #fff;
  --on-ink: #fff;
  --button-line: #bdc3ba;
  --button-hover: #f3f5f0;
  --button-hover-line: #929d91;
  --placeholder: #818982;
  --sidebar-surface: #eef0eb;
  --error: #a13427;
  --success: #2f6c45;
  --menu-shadow: #24282421;
  --dialog-shadow: #1418143b;
  --sidebar-shadow: #00000012;
  --dialog-backdrop: #1d251e7a;
  --chat-backdrop: #17201983;
  --stage-line: #dbd8cf;
  --stage-dash: #d7d2c9;
  --stage-center: #fff;
  --stage-edge: #f4f0e9;
  --sidebar-width: 276px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ecf0e8;
  --muted: #adbaaf;
  --line: #3d473d;
  --surface: #202620;
  --paper: #151a16;
  --accent: #ee947f;
  --accent-dark: #f8b09b;
  --accent-soft: #3b2b25;
  --on-accent: #20130f;
  --on-ink: #151a16;
  --button-line: #586458;
  --button-hover: #2b352d;
  --button-hover-line: #829181;
  --placeholder: #97a698;
  --sidebar-surface: #1b211c;
  --error: #ffb09e;
  --success: #9bd3aa;
  --menu-shadow: #00000066;
  --dialog-shadow: #00000080;
  --sidebar-shadow: #00000066;
  --dialog-backdrop: #050905ad;
  --chat-backdrop: #050905ad;
  --stage-line: #475147;
  --stage-dash: #586158;
  --stage-center: #2c352e;
  --stage-edge: #1c231e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { display: flex; flex-direction: column; min-width: 320px; min-height: 100vh; min-height: 100svh; margin: 0; }
main { flex: 1 0 auto; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
p { line-height: 1.6; }
h1, h2, h3 { margin: 0 0 16px; line-height: 1.18; letter-spacing: -.025em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 16px; padding: 10px 14px; background: var(--ink); color: var(--on-ink); opacity: 0; pointer-events: none; transform: translateY(-80px); }
.skip-link:focus-visible { opacity: 1; pointer-events: auto; transform: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--button-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background .16s, border-color .16s, transform .16s;
}
.button:hover, button.button:hover { background: var(--button-hover); border-color: var(--button-hover-line); }
.button:active { transform: translateY(1px); }
.button:disabled, button:disabled { opacity: .55; cursor: default; transform: none; }
#claimForm .button, #openPack, #authSubmit { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
#claimForm .button:hover, #openPack:hover, #authSubmit:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
input { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--button-line); border-radius: 8px; background: var(--surface); color: var(--ink); }
input::placeholder { color: var(--placeholder); }
input:focus { border-color: var(--accent); }

.player-picker { position: relative; min-width: 0; }
.player-picker-list { position: absolute; z-index: 40; top: calc(100% + 5px); right: 0; left: 0; max-height: 280px; margin: 0; padding: 5px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--button-line); border-radius: 9px; background: var(--surface); box-shadow: 0 8px 24px var(--menu-shadow); list-style: none; }
.player-picker-option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 7px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); font-size: 14px; text-align: left; }
.player-picker-option:hover, .player-picker-option[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.player-picker-name { min-width: 0; overflow-wrap: anywhere; }
.player-picker-status { padding: 12px 9px; color: var(--muted); font-size: 13px; }
.admin-version-settings { margin: 22px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-version-settings h3 { font-size: 18px; }

.friends-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.friends-page-heading h1 { margin: 0; font-size: clamp(36px, 3.7vw, 52px); }
.friends-layout { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.3fr); gap: 24px; align-items: start; }
.friends-sidebar { display: grid; gap: 20px; min-width: 0; }
.friends-sidebar > section, .friends-request, .friends-chat { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.friends-sidebar h2, .friends-chat h2 { font-size: 21px; }
.friends-sidebar > section > p, #friendConversationsEmpty { color: var(--muted); font-size: 14px; }
.friends-request { display: grid; gap: 10px; }
.friends-request h2 { margin-bottom: 6px; }
.friends-request label { font-size: 13px; font-weight: 600; }
.friends-request > .button { justify-self: start; margin-top: 4px; }
.friends-request .form-message:empty, #friendsMessage:empty, #friendChatMessage:empty { display: none; }
.friends-list { display: grid; gap: 10px; }
.friends-list-row, .friend-request-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; text-align: left; }
.friends-list-row:hover, .friends-list-row[aria-pressed="true"], .friends-list-row[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.friend-row-identity { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.friend-row-details { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.friend-row-name { overflow-wrap: anywhere; font-weight: 600; }
.friend-last-message { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.friend-row-meta { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 7px; }
.friend-last-message-date { color: var(--muted); font-size: 10px; white-space: nowrap; }
.friend-unread { min-width: 20px; padding: 3px 6px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; text-align: center; }
#friendConversations { max-height: 380px; overflow-y: auto; }
.friend-conversation-row { padding: 16px; }
.friend-conversation-row .friend-row-name { font-size: 15px; }
.friend-conversation-row .friend-last-message { font-size: 13px; }
.friend-conversation-row .friend-last-message-date { font-size: 11px; }
.friend-request-row { flex-wrap: wrap; }
.friend-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-row-actions .button { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.friends-chat .player-identity { overflow-wrap: anywhere; }
.friend-chat-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.friend-chat-heading h2 { margin: 0; }
.friend-chat-messages { display: flex; flex-direction: column; gap: 14px; min-height: 260px; max-height: 480px; margin: 22px 0; padding: 16px 0; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.friend-chat-row { align-self: flex-start; max-width: 94%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow-wrap: anywhere; }
.friend-chat-own { align-self: flex-end; background: var(--accent-soft); }
.friend-chat-author { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.friend-chat-author .player-avatar { width: 24px; height: 24px; }
.friend-chat-text { margin: 8px 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.friend-chat-time { color: var(--muted); font-size: 11px; }
.friend-chat-pending { opacity: .7; }
.friend-chat-form { display: flex; gap: 10px; }
.friend-chat-form input { min-width: 0; }
@media (max-width: 800px) { .friends-layout { grid-template-columns: 1fr; } .friends-chat { padding: 20px; } }

.site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 22px; min-height: 76px; padding: 0 36px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: inline-flex; align-items: center; width: fit-content; color: var(--ink); font-size: 21px; font-weight: 750; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 76px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { border-color: var(--accent); color: var(--ink); }
.header-actions { position: relative; display: flex; align-items: center; justify-content: flex-end; justify-self: end; gap: 10px; min-width: 112px; }
.header-actions > .button, .account-menu > summary { width: 112px; }
.account-menu { position: relative; }
.account-menu > summary { gap: 8px; list-style: none; cursor: pointer; user-select: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:active { transform: none; }
.account-menu-chevron { display: block; flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transform-origin: center; }
.account-menu[open] .account-menu-chevron { transform: rotate(180deg); }
.account-dropdown { position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; width: 234px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 28px var(--menu-shadow); }
.player-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-avatar { display: block; flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); object-fit: cover; }
.profile-avatar { width: 56px; height: 56px; }
.settings-avatar { width: 96px; height: 96px; }
.chat-avatar { width: 28px; height: 28px; }
.player-avatar-wrap { position: relative; display: inline-flex; flex: 0 0 auto; align-self: center; }
.online-indicator { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--success); pointer-events: none; }
.chat-row-head .online-indicator { border-color: var(--sidebar-surface); }
.account-dropdown > a, .account-dropdown > button { display: block; width: 100%; padding: 12px 16px; border: 0; background: var(--surface); color: var(--ink); font-size: 14px; text-align: left; text-decoration: none; }
.account-dropdown > a:hover, .account-dropdown > button:hover { background: var(--paper); }
.account-dropdown > a.account-menu-info { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.account-menu-info strong { overflow-wrap: anywhere; }
.account-menu-info > span:last-child { color: var(--muted); }
.notification-bell { position: relative; width: 42px; padding: 9px; list-style: none; cursor: pointer; }
.notification-bell::-webkit-details-marker { display: none; }
.notification-bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notification-badge { position: absolute; top: 2px; right: 2px; min-width: 19px; height: 19px; padding: 2px 5px; border: 2px solid var(--surface); border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; line-height: 1.1; }
.notification-panel { position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; width: min(360px, calc(100vw - 40px)); padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 28px var(--menu-shadow); }
.notification-panel h2 { margin-bottom: 12px; font-size: 18px; }
.notification-panel > p { color: var(--muted); font-size: 13px; }
.notification-list { display: grid; gap: 8px; max-height: min(440px, calc(100svh - 160px)); overflow-y: auto; overscroll-behavior: contain; }
.notification-item { display: block; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-align: left; text-decoration: none; }
.notification-item:hover { border-color: var(--accent); background: var(--button-hover); }
.notification-unread { background: var(--accent-soft); border-color: var(--accent); }
.notification-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; }
.notification-text { display: block; margin: 8px 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.notification-time { display: block; color: var(--muted); font-size: 11px; }
.profile-picture-edit { display: block; flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.profile-picture-edit:not(:disabled):hover .profile-avatar { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.profile-picture-edit:disabled { opacity: 1; cursor: default; }
.account-menu-message { padding: 0 16px 14px; margin: 0 !important; }
.auth-loading .header-actions, .auth-loading:not(.public-profile-route) .profile-overview, .auth-loading .tokens-section, .auth-loading .chat-join { visibility: hidden; }

.section-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 64px clamp(24px, 4vw, 56px); }
.dev-overview, .profile-overview, .settings-overview, .changelog-overview, .packs-overview, .trading-overview, .tokens-section { border-bottom: 1px solid var(--line); }
.dev-overview { padding-top: 76px; padding-bottom: 76px; }
.dev-overview h1, .profile-overview h1, .settings-overview h1, .changelog-overview h1, .packs-overview h1, .trading-overview h1 { font-size: clamp(36px, 3.7vw, 52px); }
.profile-overview h1 { overflow-wrap: anywhere; }
.dev-overview > p, .profile-overview > p, .settings-overview > p, .changelog-overview > p, .packs-overview > p, .trading-overview > p { max-width: 680px; margin: 0; color: var(--muted); font-size: 16px; }
.dev-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 34px; }
.dev-status > div { min-height: 145px; padding: 23px 25px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dev-status > div:first-child { border-top: 3px solid var(--accent); }
.dev-status h2 { margin-bottom: 12px; font-size: 19px; }
.dev-status p { margin: 0; color: var(--muted); font-size: 14px; }

.halloween-pack { margin-top: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.halloween-pack-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 28px; background: linear-gradient(120deg, #35184f, #502463); color: #fff6e8; }
.halloween-pack-heading > div { flex: 1 1 260px; }
.halloween-pack-heading h2 { margin-bottom: 12px; font-size: 30px; }
.halloween-pack-heading p { max-width: 540px; margin: 0; color: #ead9f3; font-size: 14px; }
.halloween-pack-heading .halloween-pack-eyebrow { margin-bottom: 10px; color: #ffc976; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.pack-preview-badge { flex: none; padding: 8px 12px; border: 1px solid #ffd08c; border-radius: 99px; background: #ffe1b1; color: #452149; font-size: 12px; font-weight: 700; }
.halloween-pack-contents { padding: 24px; }
.pack-preview-hint { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.pack-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px 18px; }
.pack-preview-card { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); text-decoration: none; }
.pack-preview-card:hover { border-color: var(--accent); background: var(--button-hover); }
.pack-preview-card img { display: block; width: 100%; height: auto; border-radius: 6px; }
.pack-preview-card h3 { margin: 12px 4px 6px; overflow-wrap: anywhere; font-size: 16px; line-height: 1.3; }
.pack-preview-card p { margin: 0 4px 5px; color: var(--muted); font-size: 12px; }
dialog.pack-card-dialog { width: min(680px, calc(100vw - 24px)); max-height: calc(100svh - 24px); }
.pack-card-dialog .dialog-content { padding: 24px; }
.pack-card-dialog .dialog-content h2 { margin-bottom: 8px; font-size: 23px; }
.pack-card-dialog .dialog-content > p { margin: 0 0 18px; font-size: 12px; }
.pack-card-dialog img { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100svh - 180px); margin: 0 auto; border-radius: 8px; }
@media (max-width: 600px) {
  .halloween-pack-heading { gap: 14px; padding: 22px; }
  .halloween-pack-contents { padding: 16px; }
  .pack-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .pack-preview-card { padding: 5px; }
  .pack-preview-card h3 { margin: 10px 2px 5px; font-size: 13px; }
  .pack-preview-card p { margin-right: 2px; margin-left: 2px; }
}

.overview-widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.overview-widget { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.overview-widget h2 { margin-bottom: 12px; font-size: 21px; }
.overview-profile { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.overview-profile:hover, .overview-profile:focus-visible { border-color: var(--accent); background: var(--button-hover); }
.overview-profile-guest { margin: 0; color: var(--muted); font-size: 14px; }
.overview-profile-name { margin: 16px 0 20px; overflow-wrap: anywhere; font-size: 26px; }
.overview-profile-identity { margin: 16px 0 20px; }
.overview-profile-identity .overview-profile-name { min-width: 0; margin: 0; }
.overview-profile-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 28px; font-variant-numeric: tabular-nums; }
.overview-profile-balance strong { overflow-wrap: anywhere; font-size: 44px; line-height: 1; letter-spacing: -.05em; }
.overview-profile-balance span { color: var(--muted); font-size: 14px; }
.overview-profile-dates { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 13px 12px; margin: 0; font-size: 13px; }
.overview-profile-dates dt { color: var(--muted); }
.overview-profile-dates dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.overview-profile-link { margin-top: auto; padding-top: 28px; color: var(--accent); font-size: 13px; font-weight: 600; }
.overview-pack { display: flex; flex-direction: column; gap: 20px; }
#overviewClaimSlot .tokens-section { margin-top: 24px; border: 0; }
#overviewClaimSlot .section-wrap { max-width: none; margin: 0; padding: 0; }
#overviewClaimSlot .tokens-heading { margin-bottom: 16px; }
#overviewClaimSlot .tokens-heading h2 { margin: 0; font-size: 21px; }
#overviewClaimSlot .token-grid { grid-template-columns: minmax(0, 1fr); }
#overviewClaimSlot .future-panels, #overviewClaimSlot .balance-card { display: none; }

.profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.profile-retry { margin-top: 20px; }
.profile-trade { margin-top: 20px; }
.profile-moderation { margin-top: 16px; }
.profile-moderation .form-message:empty { display: none; }
.profile-info-card { min-width: 0; padding: 24px 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.profile-info-card h2 { margin-bottom: 22px; font-size: 18px; }
.profile-account-heading { margin-bottom: 22px; }
.profile-account-heading h2 { margin: 0; }
.profile-info-card dl, .account-details { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 12px 16px; margin: 0; }
.profile-info-card dt, .account-details dt { color: var(--muted); font-size: 13px; }
.profile-info-card dd, .account-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.profile-info-card .account-id-value, .account-details .account-id-value { font-family: Consolas, "Courier New", monospace; font-size: 12px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.profile-token-balance { display: flex; align-items: baseline; gap: 8px; margin: -4px 0 19px; }
.profile-token-balance strong { font-size: 42px; line-height: 1; letter-spacing: -.055em; }
.profile-token-balance span { color: var(--muted); font-size: 14px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.settings-card { min-width: 0; padding: 24px 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.settings-card h2 { margin-bottom: 14px; font-size: 18px; }
.settings-card > p:not(.form-message), #settingsLoggedOut > p { margin: 0; color: var(--muted); font-size: 14px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-inline-size: 0; margin: 22px 0 0; padding: 0; border: 0; }
.theme-option { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--button-line); border-radius: 9px; background: var(--paper); font-size: 14px; font-weight: 600; cursor: pointer; }
.theme-option:hover { border-color: var(--button-hover-line); }
.theme-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.theme-option input[type="radio"] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.settings-card .account-details { margin: 20px 0; }
.settings-account-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.settings-account-actions .button { flex: 1 1 auto; }
.settings-form { display: grid; gap: 16px; margin-top: 20px; }
.settings-form label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.settings-form > p:not(.form-message) { margin: 0; color: var(--muted); font-size: 13px; }
.settings-form .button { width: 100%; }
.settings-form .settings-account-actions .button { width: auto; }
.settings-form .form-message { margin: 0 !important; }
#settingsJoin { margin-top: 16px; }
.account-danger { border-left: 3px solid var(--error); }
.button.danger-button { border-color: var(--error); color: var(--error); }
.button.danger-button:hover { border-color: var(--error); background: var(--accent-soft); }

.trading-overview > #tradingAuthLoading { margin-top: 28px; font-size: 14px; }
.trading-overview .form-message:empty, #profileDescription:empty { display: none; }
.trading-guest { margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.trading-guest p { margin: 0 0 16px; color: var(--muted); }
.trading-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0; }
.trading-summary p { margin: 0; color: var(--muted); font-size: 14px; }
.trading-summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.trading-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 24px; }
.trading-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.trading-create h2, .trading-offer-section h2 { font-size: 21px; }
.trading-help { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.trading-form { display: grid; gap: 18px; margin-top: 24px; }
.trading-form label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.trading-form .form-message { margin: 0 !important; }
.trading-form > .button { justify-self: start; }
.trading-terms { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(0, 1fr); gap: 12px; margin: 20px 0; font-size: 14px; }
.trading-terms dt { color: var(--muted); }
.trading-terms dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.trading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.trading-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.trading-primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.trading-offers { min-width: 0; }
.trading-offers > .form-message { margin: 0 0 14px; }
.trading-offers > .form-message:empty { display: none; }
.trading-offers > .button { margin-bottom: 20px; }
.trading-offer-section + .trading-offer-section { margin-top: 32px; }
.trading-offer-section h2 { margin-bottom: 16px; }
.trading-list { display: grid; gap: 14px; margin-top: 16px; }
.trading-list:empty { margin-top: 0; }
.trading-empty { margin: 0; color: var(--muted); font-size: 14px; }
.trading-offer-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.trading-offer-heading h3 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 17px; }
.trading-status { padding: 5px 8px; border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 12px; font-weight: 600; }
.trading-status-pending { background: var(--accent-soft); color: var(--accent); }
.trading-status-accepted { color: var(--success); }
.trading-date { margin: 0; color: var(--muted); font-size: 12px; }
.trading-offer-card .trading-actions { margin-top: 18px; }
.trading-accept-confirmation { flex-basis: 100%; padding: 12px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); }
.trading-inventory { min-inline-size: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.trading-inventory legend { padding: 0 6px; font-size: 14px; font-weight: 650; }
.trading-card-count { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.trading-inventory-refresh { min-height: 34px; margin-top: 12px; padding: 6px 10px; font-size: 12px; }
.trading-inventory-error { color: var(--error); }
.trading-card-picker { display: grid; gap: 10px; max-height: 420px; margin-top: 14px; overflow-y: auto; }
.trading-card-picker:empty { margin-top: 0; }
.trading-card-choice { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.trading-card-choice.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.trading-card-choice.is-unavailable { border-style: dashed; }
.trading-card-choice label { display: flex; align-items: flex-start; gap: 10px; min-width: 0; margin: 0; cursor: pointer; }
.trading-card-choice input[type="checkbox"] { flex: 0 0 18px; width: 18px; min-height: 0; height: 18px; margin: 3px 0 0; padding: 0; accent-color: var(--accent); }
.trading-copy-details { display: flex; flex: 1 1 auto; flex-direction: column; gap: 5px; min-width: 0; text-align: left; }
.trading-copy-details strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.trading-copy-meta { color: var(--muted); font-size: 12px; font-weight: 400; }
.trading-copy-details code { color: var(--muted); overflow-wrap: anywhere; font-size: 10px; font-weight: 400; line-height: 1.5; }
.trading-copy-art { flex: 0 0 42px; width: 42px; height: 58px; border-radius: 4px; object-fit: contain; background: var(--surface); }
.trading-unavailable-label { display: inline-block; margin: 10px 10px 0 28px; color: var(--error); font-size: 12px; }
.trading-card-choice > .button { min-height: 32px; margin-top: 10px; padding: 5px 9px; font-size: 12px; }
.trading-assets-tokens, .trading-assets-count { display: block; }
.trading-assets-count { margin-top: 8px; font-size: 12px; }
.trading-asset-cards { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.trading-asset-cards li { display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.trading-asset-cards .trading-asset-empty { align-items: center; justify-content: center; min-height: 100px; border-style: dashed; color: var(--muted); font-size: 14px; }
.trading-assets-tokens { overflow-wrap: anywhere; }
.trading-session { margin-top: 28px; }
.trading-session-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 24px 0 14px; }
.trading-session-heading h2 { margin: 0; overflow-wrap: anywhere; font-size: 28px; }
.trading-session-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.trading-session-grid > .trading-card > h3 { font-size: 20px; }
.trading-confirmation-state { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.trading-confirmation-state.success { color: var(--success); }
.trading-offer-editor, .trading-session-controls, .trading-private-chat { grid-column: 1 / -1; }
.trading-offer-summary { border-top: 3px solid var(--line); }
#tradingOwnOffer { border-top-color: var(--accent); }
.trading-offer-summary .trading-assets-tokens { font-size: clamp(20px, 2.3vw, 30px); font-weight: 700; }
.trading-offer-summary .trading-assets-count { margin: 0; color: var(--muted); font-size: 13px; }
.trading-offer-summary .trading-asset-cards { margin-top: 4px; }
.trading-offer-summary .trading-copy-art { flex-basis: 64px; width: 64px; height: 88px; }
.trading-offer-editor .trading-card-picker { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.trading-offer-editor input[type="number"] { max-width: 250px; }
.trading-confirm-review { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.trading-confirm-review h3 { margin-bottom: 12px; font-size: 18px; }
.trading-confirm-review .trading-actions { margin-top: 18px; }
.trading-status-negotiating { background: var(--accent-soft); color: var(--accent); }

.games-overview { border-bottom: 1px solid var(--line); }
.games-page-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.games-page-heading h1 { margin: 0; font-size: clamp(36px, 3.7vw, 52px); }
.games-balance { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.games-overview .form-message:empty { display: none; }
.games-lobby { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; gap: 24px; }
.games-request { display: grid; gap: 10px; }
.games-request h2 { margin: 0 0 8px; font-size: 23px; }
.games-request > label { margin-top: 7px; font-size: 13px; font-weight: 600; }
.games-request > .button { justify-self: start; margin-top: 14px; }
.games-opponent-options label { display: block; margin: 7px 0; font-size: 13px; font-weight: 600; }
.games-opponent-options select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--button-line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.games-bot-note { margin: 2px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.games-bot-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 18px; }
.games-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; margin: 0 0 4px; padding: 0; border: 0; }
.games-pick legend { margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.games-pick label { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; min-height: 132px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 12px; font-weight: 600; text-align: center; cursor: pointer; }
.games-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.games-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.games-pick input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.games-pick-icon { color: var(--accent); font-size: clamp(20px, 2.4vw, 32px); letter-spacing: -2px; line-height: 1.2; }
.games-list-sections { display: grid; gap: 28px; min-width: 0; }
.games-list-sections h2 { margin: 0; font-size: 21px; }
.games-list-sections > section > p { color: var(--muted); font-size: 14px; }
.games-list-heading, .games-list-card-heading, .games-session-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.games-list { display: grid; gap: 14px; margin-top: 16px; }
.games-list:empty { margin-top: 0; }
.games-list-card-heading { margin-bottom: 17px; }
.games-list-card h3 { margin: 0; font-size: 17px; }
.games-list-card .player-identity { width: fit-content; color: var(--ink); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.games-list-card a.player-identity:hover { color: var(--accent); }
.games-list-stake { margin: 14px 0; color: var(--muted); font-size: 13px; }
.games-session { max-width: 720px; margin: 0 auto; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.games-session > h2 { margin: 26px 0; text-align: center; font-size: clamp(25px, 3vw, 34px); }
.games-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.games-player { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.games-player:first-child { border-top: 3px solid var(--accent); }
.games-player-label { display: block; margin-bottom: 11px; color: var(--muted); font-size: 12px; }
.games-player .player-identity { justify-content: center; flex-wrap: wrap; color: var(--ink); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.games-player a.player-identity:hover { color: var(--accent); }
.games-player-symbol { display: block; margin-top: 12px; color: var(--accent); font-size: 23px; }
.games-stakes { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 16px 0; color: var(--muted); font-size: 13px; }
.games-stakes strong { color: var(--ink); }
.games-turn { margin: 17px 0 5px; text-align: center; font-size: 20px; font-weight: 650; }
.games-deadline { margin: 0 0 22px; color: var(--muted); text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.games-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; width: min(100%, 350px); margin: 24px auto; }
.games-square { display: grid; place-items: center; min-width: 0; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--accent); font: inherit; font-size: clamp(30px, 5vw, 50px); font-weight: 700; cursor: pointer; }
.games-square:disabled { opacity: 1; cursor: default; }
.games-square:not(:disabled):hover { border-color: var(--accent); background: var(--accent-soft); }
.games-square.is-o { color: var(--success); }
.games-square.is-winning { border-color: var(--accent); background: var(--accent-soft); }
.games-rps-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 24px 0; }
.games-choice { display: flex; flex-direction: column; align-items: center; gap: 13px; min-width: 0; padding: 20px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.games-choice > span:first-child { font-size: clamp(30px, 4vw, 44px); }
.games-choice:disabled { opacity: .6; cursor: default; }
.games-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); opacity: 1; }
.games-choice:not(:disabled):hover { border-color: var(--accent); background: var(--accent-soft); }
.games-reveal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: center; font-size: 14px; }
.games-session-actions { justify-content: center; margin-top: 24px; }
.games-dice-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.games-dice-options label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.games-dice-options select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--button-line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.games-invitees, .games-rolls, .games-placements { display: grid; gap: 10px; }
.games-invitee { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.games-invitee-name { min-width: 0; overflow-wrap: anywhere; }
.games-invitee-remove { flex: 0 0 auto; }
.games-dice > h3 { margin: 22px 0 14px; font-size: 18px; text-align: center; }
.games-rolls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.games-dice-player { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; padding: 20px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.games-dice-player .player-identity { justify-content: center; flex-wrap: wrap; color: var(--ink); text-decoration: none; font-size: 14px; overflow-wrap: anywhere; }
.games-die { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center; flex: 0 0 auto; width: 70px; height: 70px; padding: 12px; border: 1px solid var(--button-line); border-radius: 12px; background: var(--surface); color: var(--accent); box-shadow: 0 3px 0 var(--line); transform-origin: center; }
.games-die-pip { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: 0; }
.games-die[data-value="1"] [data-position="5"],
.games-die[data-value="2"] :is([data-position="1"], [data-position="9"]),
.games-die[data-value="3"] :is([data-position="1"], [data-position="5"], [data-position="9"]),
.games-die[data-value="4"] :is([data-position="1"], [data-position="3"], [data-position="7"], [data-position="9"]),
.games-die[data-value="5"] :is([data-position="1"], [data-position="3"], [data-position="5"], [data-position="7"], [data-position="9"]),
.games-die[data-value="6"] :is([data-position="1"], [data-position="3"], [data-position="4"], [data-position="6"], [data-position="7"], [data-position="9"]) { opacity: 1; }
.games-die.is-waiting::after { position: absolute; inset: 0; display: grid; place-items: center; content: "—"; color: var(--muted); font-size: 26px; }
.games-die.is-rolling { animation: games-die-roll 420ms ease-in-out infinite; }
.games-die.is-rolling::after { display: none; }
.games-die.is-rolling .games-die-pip { opacity: 0; }
.games-die.is-rolling :is([data-position="1"], [data-position="3"], [data-position="4"], [data-position="6"], [data-position="7"], [data-position="9"]) { opacity: 1; animation: games-die-pips 420ms ease-in-out infinite alternate; }
.games-die.is-rolling :is([data-position="3"], [data-position="6"], [data-position="9"]) { animation-delay: -210ms; }
.games-die-small { display: inline-grid; width: 24px; height: 24px; padding: 4px; border-radius: 5px; vertical-align: middle; box-shadow: 0 1px 0 var(--line); }
.games-die-small .games-die-pip { width: 3px; height: 3px; }
.games-die-small.is-waiting::after { font-size: 12px; }
@keyframes games-die-roll { 0%, 100% { transform: translateY(0) rotate(-10deg); } 25% { transform: translateY(-6px) rotate(12deg) scale(.95); } 50% { transform: translateY(0) rotate(-18deg); } 75% { transform: translateY(-4px) rotate(15deg) scale(1.03); } }
@keyframes games-die-pips { from { opacity: .25; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .games-die.is-rolling, .games-die.is-rolling .games-die-pip { animation: none; } }
.games-dice-place { color: var(--muted); font-size: 12px; }
.games-roll-action { display: flex; justify-content: center; margin: 24px 0; }
.games-roll-action .button { min-width: 140px; }
.games-placement { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 8px; }
.games-placement .player-identity { min-width: 0; color: var(--ink); text-decoration: none; }
.games-placement-rank { color: var(--accent); font-weight: 700; }
.games-placement-payout { margin-left: auto; font-size: 14px; font-weight: 650; }
.games-dice-history:empty { display: none; }
.games-dice-history { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.games-dice-history-round { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.games-dice-history-player { display: inline-flex; align-items: center; gap: 6px; }
.game-notification #gameNotificationTerms { margin-top: 12px; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .games-lobby { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .games-session { padding: 18px 14px; } .games-player { padding: 13px 9px; } .games-players { gap: 10px; } .games-list-card { padding: 20px; } }
.trading-chat-messages { display: grid; align-content: start; gap: 14px; max-height: 360px; min-height: 100px; margin-top: 20px; padding: 16px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.trading-chat-row { min-width: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.trading-chat-row:last-child { padding-bottom: 0; border-bottom: 0; }
.trading-chat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12px; }
.trading-chat-meta a { overflow-wrap: anywhere; font-weight: 650; }
.trading-chat-meta time { color: var(--muted); font-size: 11px; }
.trading-chat-row > p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.trading-chat-send-status { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.trading-chat-row > .button { min-height: 32px; margin-top: 8px; padding: 5px 10px; font-size: 12px; }
.trading-chat-form { display: flex; gap: 10px; margin-top: 16px; }
.trading-chat-form input { min-width: 0; }
.trading-chat-form .button { flex: 0 0 auto; }
#tradingOwnReadonly, #tradingPartnerAssets { display: grid; gap: 10px; font-variant-numeric: tabular-nums; }
#tradingDraftMessage { margin: 0; }
#tradingDraftMessage.trading-draft-info { color: var(--muted); }
#tradingChatClosed { margin-top: 16px; }

.trade-notification { position: fixed; z-index: 45; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); width: min(340px, calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 40px var(--dialog-shadow); }
.trade-notification h2 { margin-bottom: 10px; font-size: 20px; }
.trade-notification p { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.trade-notification a { font-weight: 650; }
.trade-notification .trading-help { margin-top: 8px; font-size: 12px; }
.trade-notification .trading-actions { margin-top: 18px; }
.trade-notification .trading-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.trade-notification .trading-primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.trade-notification .form-message:empty { display: none; }
.trade-notification .form-message:not(:empty) { margin-top: 12px; font-size: 13px; }

@media (max-width: 600px) { .trade-notification { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); padding: 20px; } }

@media (max-width: 700px) {
  .trading-session-grid { gap: 12px; }
  .trading-session-grid > .trading-offer-summary { padding: 14px 10px; }
  .trading-session-grid > .trading-offer-summary > h3 { font-size: 17px; }
  .trading-offer-summary .trading-confirmation-state { min-height: 32px; margin-bottom: 12px; font-size: 12px; }
  .trading-offer-summary .trading-asset-cards li { flex-direction: column; padding: 8px; }
  .trading-offer-summary .trading-copy-art { flex-basis: auto; width: 56px; height: 76px; }
}

@media (max-width: 1100px) {
  .trading-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .trading-card { padding: 20px; }
  .trading-summary { align-items: flex-start; }
}

.changelog-editor { max-width: 760px; margin-top: 32px; padding: 24px 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.changelog-editor h2 { margin-bottom: 12px; font-size: 21px; }
.changelog-editor > p { max-width: 640px; margin: 0; color: var(--muted); font-size: 14px; }
.changelog-form { display: grid; gap: 16px; margin-top: 22px; }
.changelog-form label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.changelog-form textarea { display: block; width: 100%; min-height: 136px; padding: 10px 12px; resize: vertical; border: 1px solid var(--button-line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; line-height: 1.5; }
.changelog-form textarea:focus { border-color: var(--accent); }
.changelog-form input[name="version"] { max-width: 230px; }
.changelog-form > div > p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.changelog-form > .button { justify-self: start; }
.changelog-form .form-message { margin: 0 !important; }
.changelog-overview > .changelog-message { margin-top: 32px; font-size: 14px; }
.changelog-retry { margin-top: 14px; }
.changelog-entries { display: grid; gap: 16px; max-width: 760px; margin-top: 32px; }
.changelog-entries:empty { margin-top: 0; }
.changelog-entry { min-width: 0; padding: 24px 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.changelog-entry-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 18px; margin-bottom: 16px; font-size: 12px; }
.news-entry-date { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.news-entry-author { flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 52%; margin-left: auto; text-align: right; }
.news-entry-author-name { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.news-entry-author .player-avatar { width: 28px; height: 28px; }
.news-entry-author .role-badges { flex-wrap: wrap; justify-content: flex-end; }
.news-entry-authors { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 12px; max-width: 65%; margin-left: auto; }
.news-entry-authors .news-entry-author { max-width: 100%; margin-left: 0; }
#announcementPopupAuthor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.changelog-entry-version { max-width: 100%; padding: 5px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 700; overflow-wrap: anywhere; }
.changelog-entry-meta time { color: var(--muted); }
.changelog-entry h2 { margin-bottom: 12px; overflow-wrap: anywhere; font-size: 23px; }
.changelog-entry-description { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.changelog-entry-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px; min-height: 0; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.changelog-entry-actions .button { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.changelog-entry-actions .changelog-delete-button { color: var(--error); }
.changelog-delete-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.changelog-delete-message { flex-basis: 100%; min-width: 0; overflow-wrap: anywhere; }
.news-comments { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.news-comments-summary { display: flex; align-items: center; gap: 9px; width: fit-content; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.news-comments-summary::-webkit-details-marker { display: none; }
.news-comments-summary::before { content: '+'; color: var(--accent); font-size: 19px; line-height: 1; }
.news-comments[open] > .news-comments-summary::before { content: '−'; }
.news-comments-list { display: grid; gap: 12px; margin-top: 18px; }
.news-comments-empty { margin: 0; color: var(--muted); font-size: 14px; }
.news-comments-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.news-comment-row { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.news-comment-author { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; font-size: 13px; }
.news-comment-author .player-avatar { width: 26px; height: 26px; }
.news-comment-text { margin: 10px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.news-comment-time { color: var(--muted); font-size: 11px; }
.news-comment-status { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.news-comment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.news-comment-actions .button { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.news-comments-form { display: grid; gap: 10px; margin-top: 18px; }
.news-comments-form label { font-size: 13px; font-weight: 600; }
.news-comments-input { width: 100%; min-height: 84px; padding: 10px 12px; resize: vertical; border: 1px solid var(--button-line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; line-height: 1.5; }
.news-comments-form > .button { justify-self: start; }
.news-comments-message { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.news-comments-message:empty { display: none; }
.news-comments-more { margin-top: 0; }
.news-comments-sign-in { margin-top: 16px; }

.leaderboard-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 28px; }
.leaderboard-heading h1 { flex: 1 1 300px; min-width: 0; margin: 0; }
.leaderboard-total { display: flex; flex-direction: column; gap: 5px; min-width: 0; max-width: 100%; margin-left: auto; text-align: right; }
.leaderboard-total > span:first-child { color: var(--muted); font-size: 12px; }
.leaderboard-total > strong { overflow-wrap: anywhere; font-size: clamp(22px, 2.5vw, 30px); line-height: 1.2; font-variant-numeric: tabular-nums; }
.leaderboard-overview > .leaderboard-summary { margin-top: 24px; font-size: 13px; }
.leaderboard-summary:empty { display: none; }
.leaderboard-table-wrap { max-width: 760px; margin-top: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.leaderboard-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.leaderboard-table th, .leaderboard-table td { padding: 17px 22px; text-align: left; border-bottom: 1px solid var(--line); }
.leaderboard-table th { background: var(--sidebar-surface); color: var(--muted); font-size: 12px; font-weight: 600; }
.leaderboard-table th:first-child, .leaderboard-table td:first-child { width: 78px; color: var(--muted); }
.leaderboard-table th:last-child, .leaderboard-table td:last-child { text-align: right; white-space: nowrap; }
.leaderboard-table td:last-child { font-weight: 700; }
.leaderboard-table tr:last-child td { border-bottom: 0; }
.leaderboard-own-row { background: var(--accent-soft); }
.leaderboard-profile { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; color: var(--ink); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.leaderboard-profile > span { min-width: 0; }
.role-badges { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }
.role-badge { display: inline-flex; align-items: center; padding: 2px 5px; border-radius: 4px; font-size: 10px; font-weight: 750; line-height: 1.3; letter-spacing: .015em; text-decoration: none; white-space: nowrap; }
.role-badge-admin { color: var(--accent); background: var(--accent-soft); }
.role-badge-mod { color: var(--success); background: var(--sidebar-surface); border: 1px solid var(--line); }
.role-badge-senior-mod { color: var(--success); background: var(--accent-soft); border: 1px solid var(--success); }
.role-badge-banned { color: var(--error); background: var(--accent-soft); }
.player-identity .role-badges, .leaderboard-profile .role-badges { margin-left: 0; }
.moderation-settings, .moderation-player-settings { grid-column: 1 / -1; }
.moderation-player-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; cursor: pointer; font-size: 21px; font-weight: 700; }
.moderation-player-details > summary::-webkit-details-marker { display: none; }
.moderation-player-details > summary::after { content: "+"; color: var(--muted); font-size: 25px; font-weight: 400; }
.moderation-player-details[open] > summary::after { content: "−"; }
.moderation-links { margin-top: 20px; }
.moderation-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; max-width: 520px; margin-top: 24px; }
.moderation-search label { grid-column: 1 / -1; font-size: 13px; font-weight: 600; }
.moderation-players { display: grid; gap: 12px; }
.moderation-player { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.moderation-player .player-identity { flex-wrap: wrap; color: var(--ink); text-decoration: none; font-size: 14px; overflow-wrap: anywhere; }
.moderation-player .player-identity:hover { color: var(--accent); }
.banned-screen { display: flex; min-height: 100svh; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 30px; text-align: center; }
.banned-screen h1 { margin: 0; font-size: clamp(30px, 6vw, 52px); }
body.banned-mode { padding: 0; }
body.banned-mode > :not(#bannedScreen):not(script) { display: none !important; }
.leaderboard-profile:hover { color: var(--accent-dark); }
.leaderboard-you { display: inline-block; margin-left: 8px; color: var(--accent); font-size: 11px; font-weight: 600; }

.tokens-heading { margin-bottom: 24px; }
.tokens-heading h2 { margin-bottom: 10px; font-size: clamp(28px, 3vw, 37px); }
.tokens-heading p { max-width: 680px; margin: 0; color: var(--muted); font-size: 15px; }
.token-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 16px; }
.claim-panel, .future-panel { min-width: 0; padding: 25px 27px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.claim-panel h3, .future-panel h3 { margin-bottom: 10px; font-size: 21px; }
.claim-panel > p, .future-panel p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.future-panels { display: grid; gap: 16px; }
.future-panel p { margin-bottom: 0; }
.balance-card, .account-balance { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; margin: 18px 0; background: var(--paper); font-size: 14px; }
.balance-card strong { font-size: 20px; }
.turnstile-widget { min-height: 66px; max-width: 100%; margin: 16px 0 14px; overflow: hidden; }
#claimForm .button { width: 100%; }
.refresh-button { padding: 9px 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; }
.refresh-button:hover { color: var(--ink); }
#claimCooldown p { margin: 3px 0 6px; color: var(--muted); font-size: 13px; }
.cooldown-clock { font-size: 32px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.claim-reward { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--accent-soft); }
.claim-reward-label { color: var(--muted); font-size: 13px; }
.claim-reward-amount { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--accent); font-size: 44px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.claim-reel-window { display: block; width: 2ch; height: 1.1em; overflow: hidden; }
.claim-reel-track { display: flex; flex-direction: column; }
.claim-reel-number { flex: none; height: 1.1em; text-align: center; }
.claim-reward-unit { align-self: flex-end; margin-bottom: 5px; color: var(--ink); font-size: 16px; font-weight: 600; }
.form-message { min-height: 20px; margin: 12px 0 0 !important; color: var(--error); font-size: 13px !important; }
.form-message.success { color: var(--success); }
.form-message.account-menu-message { margin: 0 !important; }
.profile-route .token-grid { grid-template-columns: minmax(0, 680px); }
.profile-route .future-panels, .profile-route .balance-card { display: none; }

.pack-intro > p { margin: 0; color: var(--muted); font-size: 14px; }
.pack-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pack-stage { position: relative; display: grid; flex: none; place-items: center; height: 320px; min-width: 0; overflow: hidden; border: 1px solid var(--stage-line); border-radius: 12px; background: radial-gradient(circle at 50% 44%, var(--stage-center) 0, var(--stage-edge) 72%); }
.pack-stage::before { content: ""; position: absolute; inset: 13px; border: 1px dashed var(--stage-dash); border-radius: 8px; pointer-events: none; }
.demo-pack { position: relative; width: 160px; height: 230px; padding: 0; border: 0; background: transparent; color: #fff; transform: rotate(-5deg); transition: transform .18s; }
.demo-pack:hover { transform: rotate(-2deg) translateY(-5px); }
.demo-pack:focus-visible { outline: 3px solid var(--accent); outline-offset: 7px; }
.demo-pack-top, .demo-pack-bottom { position: absolute; left: 0; z-index: 1; width: 100%; height: 16px; border: 1px solid #7d3329; background: repeating-linear-gradient(90deg, #d97863 0 4px, #ae4939 4px 7px); }
.demo-pack-top { top: 0; transform-origin: 15% 100%; }
.demo-pack-bottom { bottom: 0; }
.demo-pack-body { position: absolute; inset: 15px 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 20px 10px 16px; border: 2px solid #903b2e; background: linear-gradient(115deg, #963d30, #c75b46 32%, #b74734 70%, #8d352a); box-shadow: 8px 13px 18px #563c352f, inset 4px 0 #ffffff24, inset -4px 0 #00000018; }
.demo-pack-title { font-size: 16px; font-weight: 800; letter-spacing: .04em; }
.demo-pack-mark { display: grid; place-items: center; width: 84px; height: 84px; border: 2px solid #fff9; border-radius: 50%; font-family: Georgia, serif; font-size: 54px; line-height: 1; }
.demo-pack-count { font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.pack-stage-status { position: absolute; right: 20px; bottom: 19px; color: var(--muted); font-size: 11px; }
.pack-stage[data-phase="opening"] .demo-pack { pointer-events: none; animation: test-pack-open .95s ease-in forwards; }
.pack-stage[data-phase="opening"] .demo-pack-top { animation: test-pack-tear .65s .2s ease-out forwards; }
.pack-stage[data-phase="revealed"] .demo-pack { display: none; }
.reveal-cards { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-width: 0; padding: 0 14px; }
.reveal-cards[hidden] { display: none; }
.reveal-card { flex: 0 1 86px; min-width: 0; aspect-ratio: 86 / 125; height: auto; border: 1px solid #d7d2c9; border-radius: 6px; background: #fff; box-shadow: 4px 8px 14px #33282020; opacity: 0; transform: translateY(32px) scale(.9); }
.reveal-card:nth-child(1) { --card-tilt: -8deg; }
.reveal-card:nth-child(2) { --card-tilt: -4deg; }
.reveal-card:nth-child(3) { --card-tilt: 0deg; }
.reveal-card:nth-child(4) { --card-tilt: 4deg; }
.reveal-card:nth-child(5) { --card-tilt: 8deg; }
.reveal-card.is-dealt { animation: test-card-deal .5s cubic-bezier(.18,.82,.24,1) forwards; }
@keyframes test-pack-open { 0% { transform: rotate(-5deg) scale(1); opacity: 1; } 42% { transform: rotate(3deg) scale(1.04); opacity: 1; } 70% { transform: translateY(-8px) rotate(0) scale(1.1); opacity: 1; } 100% { transform: translateY(24px) scale(1.12); opacity: 0; } }
@keyframes test-pack-tear { to { transform: translate(52px, -74px) rotate(25deg); opacity: 0; } }
@keyframes test-card-deal { to { opacity: 1; transform: translateY(0) rotate(var(--card-tilt)); } }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 20px 36px; color: var(--muted); font-size: 12px; }

.chat-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column; width: var(--sidebar-width); background: var(--sidebar-surface); border-right: 1px solid var(--line); }
.chat-heading { flex: none; padding: 23px 21px; border-bottom: 1px solid var(--line); }
.chat-heading-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-heading h2 { margin: 0; font-size: 25px; }
.player-count { display: flex; align-items: center; gap: 7px; min-height: 28px; margin: 7px 0 -3px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.player-count:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.player-count::before { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); content: ""; }
.player-count[data-status="live"]::before { background: var(--success); }
.chat-board { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.chat-messages { flex: 1; min-height: 0; padding: 0 21px; overflow-y: auto; overflow-anchor: none; scrollbar-width: none; }
.chat-messages::-webkit-scrollbar { display: none; }
.chat-empty { display: grid; place-items: center; height: 100%; padding: 20px; color: var(--muted); text-align: center; font-size: 13px; }
.chat-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.chat-row-head { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 3px 8px; font-size: 12px; }
.chat-row-head .chat-avatar { grid-row: 1 / span 2; }
.chat-row-head .player-avatar-wrap { grid-row: 1 / span 2; }
.chat-author-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
.chat-author-identity .role-badges { margin-left: 0; }
.chat-delete-button { margin: 9px 0 0 10px; padding: 0; border: 0; background: none; color: var(--error); font: inherit; font-size: 11px; cursor: pointer; }
.chat-delete-button:hover { text-decoration: underline; }
.chat-delete-button:disabled { opacity: .5; cursor: wait; }
.chat-author { overflow-wrap: anywhere; color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.chat-author:hover, .chat-author:focus-visible { color: var(--accent-dark); text-decoration-color: currentColor; }
.chat-row-head time { grid-column: 2; color: var(--muted); font-size: 11px; }
.chat-row p { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 13px; }
.chat-row.is-reply-highlighted { border-radius: 6px; background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: 4px; }
.chat-reply-button { min-height: 30px; margin-top: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; }
.chat-reply-button:hover { background: var(--surface); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .chat-reply-button { display: none; }
  .chat-row:hover .chat-reply-button, .chat-row:focus-within .chat-reply-button { display: inline-block; }
}
.chat-message-status { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.chat-row.is-pending > p { opacity: .75; }
.chat-row.is-failed .chat-message-status { color: var(--error); }
.chat-retry-button { min-height: 30px; margin-top: 7px; padding: 4px 8px; border: 1px solid var(--button-line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 12px; }
.chat-retry-button:hover { background: var(--button-hover); }
.chat-reply-quote { display: block; width: 100%; margin: 10px 0 8px; padding: 8px 10px; border: 0; border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; background: var(--surface); color: var(--muted); text-align: left; font: inherit; }
button.chat-reply-quote:hover { background: var(--accent-soft); }
.chat-reply-quote-author { display: block; margin-bottom: 4px; color: var(--ink); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.chat-row .chat-reply-quote-text { display: -webkit-box; max-height: 3.2em; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.chat-reply-unavailable { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.chat-join, #chatLoggedIn { border-top: 1px solid var(--line); padding: 17px 21px 20px; }
.chat-join { display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 13px; }
.chat-identity { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.chat-identity strong { color: var(--ink); }
.chat-reply-preview { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; padding: 9px 10px; border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; background: var(--surface); color: var(--muted); font-size: 12px; }
.chat-reply-preview > div { flex: 1; min-width: 0; }
.chat-reply-preview strong { color: var(--ink); overflow-wrap: anywhere; }
.chat-reply-preview p { margin: 5px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
#cancelChatReply { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 22px; }
#cancelChatReply:hover { background: var(--paper); color: var(--ink); }
.chat-form { display: grid; gap: 8px; }
.chat-form .button, .chat-join .button { width: 100%; }
.chat-close, .chat-toggle, .chat-overlay, .online-count-toggle { display: none; }

dialog { width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px var(--dialog-shadow); }
dialog::backdrop { background: var(--dialog-backdrop); }
.dialog-content { position: relative; padding: 31px; }
.dialog-close { position: absolute; top: 15px; right: 16px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 25px; }
.dialog-close:hover { background: var(--paper); color: var(--ink); }
.dialog-content h2 { padding-right: 35px; margin-bottom: 22px; font-size: 27px; }
.dialog-content > p { color: var(--muted); font-size: 14px; }
.announcement-popup { width: min(620px, calc(100vw - 24px)); }
.announcement-popup-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; font-size: 12px; }
.announcement-popup-meta time { color: var(--muted); }
.announcement-popup-meta > div { min-width: 0; max-width: 60%; }
.announcement-popup-meta .player-identity { flex-wrap: wrap; justify-content: flex-end; overflow-wrap: anywhere; }
.dialog-content > .announcement-popup-description { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.online-players-list { max-height: min(440px, 60vh); margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.online-player-link { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.online-player-link span { min-width: 0; overflow-wrap: anywhere; }
.online-player-link:hover { color: var(--accent); background: var(--paper); }
.auth-tabs { display: flex; gap: 23px; margin-bottom: 19px; border-bottom: 1px solid var(--line); }
.auth-tabs button { min-height: 39px; padding: 5px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 14px; }
.auth-tabs button.active { border-color: var(--accent); color: var(--ink); font-weight: 700; }
#authForm > div { margin-bottom: 15px; }
#authForm label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
#authForm .button { width: 100%; }
.account-balance { display: block; margin: 0 0 18px; }
.account-balance small { display: block; color: var(--muted); font-size: 12px; }
.account-balance strong { display: block; margin-top: 4px; font-size: 26px; }
.verification-page { width: min(560px, calc(100% - 40px)); margin: 70px auto; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.verification-page h1 { font-size: 30px; }

@media (min-width: 851px) {
  .site-header, main, footer { margin-left: var(--sidebar-width); }
}
@media (max-width: 1280px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; row-gap: 0; }
  .main-nav a { min-height: 46px; }
  .header-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 1100px) {
  .profile-details, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  .chat-sidebar { width: min(340px, calc(100vw - 32px)); transform: translateX(-101%); transition: transform .22s ease; box-shadow: 10px 0 30px var(--sidebar-shadow); }
  .chat-sidebar.open { transform: translateX(0); }
  .main-nav .chat-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 14px; font-weight: 600; }
  .main-nav .online-count-toggle { display: inline-flex; align-items: center; min-height: 46px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
  .main-nav .online-count-toggle:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .main-nav .chat-toggle:hover, .main-nav .chat-toggle[aria-expanded="true"] { color: var(--ink); }
  .chat-close { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 24px; }
  .chat-overlay:not([hidden]) { position: fixed; inset: 0; z-index: 39; display: block; background: var(--chat-backdrop); }
  body.chat-open { overflow: hidden; }
  .token-grid { grid-template-columns: 1fr; }
  .future-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .site-header { gap: 0 12px; min-height: 0; padding: 10px 20px 0; }
  .brand { font-size: 20px; }
  .header-actions { min-width: 95px; }
  .header-actions > .button, .account-menu > summary { width: 95px; min-height: 38px; padding: 7px 10px; font-size: 13px; }
  .main-nav { flex-wrap: wrap; justify-content: space-between; gap: 0 8px; margin-top: 10px; border-top: 1px solid var(--line); }
  .main-nav a, .main-nav .chat-toggle { min-height: 48px; font-size: 13px; }
  .section-wrap { padding: 44px 20px; }
  .dev-overview { padding-top: 56px; }
  .dev-status, .overview-widgets, .future-panels { grid-template-columns: 1fr; }
  .dev-status > div { min-height: 0; }
  .profile-details, .settings-grid { margin-top: 24px; }
  .profile-info-card, .settings-card, .claim-panel, .future-panel { padding: 21px; }
  .changelog-editor, .changelog-entry { padding: 21px; }
  .changelog-editor, .changelog-entries, .changelog-overview > .changelog-message { margin-top: 24px; }
  .leaderboard-table th, .leaderboard-table td { padding: 14px 12px; }
  .leaderboard-table th:first-child, .leaderboard-table td:first-child { width: 54px; }
  .profile-info-card dl, .account-details { grid-template-columns: 90px minmax(0, 1fr); }
  .theme-options { gap: 10px; }
  .theme-option { padding: 12px; }
  footer { flex-wrap: wrap; min-height: 74px; padding: 20px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chat-sidebar, .button, .demo-pack { transition: none; }
  .pack-stage[data-phase="opening"] .demo-pack, .pack-stage[data-phase="opening"] .demo-pack-top, .reveal-card.is-dealt { animation: none; }
  .reveal-card.is-dealt { opacity: 1; transform: rotate(var(--card-tilt)); }
}
