:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --bar: #ffffff;
  --panel: #ffffff;
  --inset: #f8fafc;
  --line: #dce3ea;
  --text: #172331;
  --subtle: #536273;
  --muted: #596a7a;
  --accent: #1d5a97;
  --primary: #2365a4;
  --primary-hover: #174f86;
  --green: #197950;
  --radius: 10px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .56; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #327abb; outline-offset: 3px; }
.symbols, .screen-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.topbar { background: var(--bar); border-bottom: 1px solid #dce3ea; }
.topbar-inner { height: 64px; max-width: 1400px; margin-inline: auto; padding-inline: 42px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 9px; font-size: 1.55rem; font-weight: 800; letter-spacing: -.06em; line-height: 1; padding-bottom: 2px; }
.brand-mark { width: 37px; height: 37px; display: inline-grid; place-items: center; background: #eaf1f8; color: #2365a4; border: 1px solid #d8e6f3; border-radius: 10px; }
.brand-mark svg { width: 22px; height: 22px; }
nav { align-self: stretch; display: flex; align-items: center; gap: 8px; }
.nav-link { display: inline-flex; gap: 8px; align-items: center; padding: 10px 13px; border: 1px solid transparent; border-radius: 9px; color: var(--subtle); font-size: .875rem; font-weight: 650; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: #1d5a97; background: #edf4fb; }
.nav-link.active { border-color: #dce9f6; }
.nav-link .icon { width: 16px; height: 16px; }
.nav-count { min-width: 18px; padding: 0 4px; border-radius: 10px; text-align: center; font-size: .75rem; color: white; background: var(--primary); }
.account { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.account-name { display: flex; align-items: center; gap: 7px; max-width: 150px; font-weight: 650; }
.account-name:hover { color: var(--accent); }

.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 15px; white-space: nowrap; border: 1px solid transparent; border-radius: 9px; font-size: .875rem; font-weight: 750; line-height: 1.3; transition: background-color .16s ease, border-color .16s ease; }
.button-primary { background: var(--primary); color: #ffffff; border-color: #2365a4; }
.button-primary:hover:enabled, a.button-primary:hover { background: var(--primary-hover); }
.button-quiet { background: transparent; color: var(--text); border-color: #d2dce6; }
.button-quiet:hover:enabled { background: #eef3f7; }
.button-outline { background: #eef5fc; color: #1d5a97; border-color: #d0e2f3; }
.button-outline:hover { background: #e1edf9; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; color: #506475; background: transparent; border: 0; border-radius: 6px; }
.icon-button:hover:enabled { color: var(--text); background: #edf2f6; }
.logout-button { border: 1px solid var(--line); }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 4px 2px; font-size: .875rem; font-weight: 650; }
.text-button:hover:enabled { color: #163e65; }

.main { max-width: 1348px; padding: 38px 42px 35px; margin: auto; }
.startup-notice { margin-bottom: 16px; padding: 12px 16px; color: var(--subtle); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 25px; }
.heading-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.heading-emblem { width: 55px; height: 55px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: #26679f; background: #eaf1f8; border: 1px solid #dce8f3; }
.heading-emblem .icon { width: 26px; height: 26px; stroke-width: 1.55; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 2.7vw, 2.1rem); line-height: 1.15; letter-spacing: -.035em; font-weight: 740; }
.page-heading p { margin-top: 6px; color: var(--subtle); }
.size-chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: #465c70; font-family: Consolas, "Courier New", monospace; font-size: .875rem; }
.size-chip .icon { color: var(--accent); width: 16px; height: 16px; }
.battle-layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 20px; align-items: start; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.stage { overflow: hidden; }
.stage-header, .stage-footer { display: flex; align-items: center; justify-content: space-between; }
.stage-header { height: 49px; padding: 0 17px; }
.stage-label { display: flex; align-items: center; gap: 9px; font-size: .9375rem; font-weight: 700; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #7d8994; }
.live-dot.online { background: var(--green); box-shadow: 0 0 0 4px #1979501c; }
.status-label { color: var(--muted); font-size: .8125rem; }
.status-label.online { color: var(--green); }
.viewport { position: relative; height: clamp(360px, 56vh, 620px); background: #fff; isolation: isolate; border-block: 1px solid #dce3ea; }
#canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: crosshair; touch-action: none; }
#canvas:focus-visible { outline-offset: -3px; }
#canvas.dragging { cursor: grabbing; }
.viewport-tools { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 2px; padding: 3px; background: #fffffff5; border: 1px solid #d1dbe5; border-radius: 9px; box-shadow: 0 5px 23px #1723311c; }
.viewport-tools output { font: .8125rem Consolas, "Courier New", monospace; color: #263a4e; min-width: 43px; text-align: center; }
.viewport-tools .icon-button { width: 30px; height: 30px; }
.viewport-tools .icon { width: 16px; height: 16px; }
.tool-separator { height: 19px; width: 1px; background: #dce3ea; margin-inline: 3px; }
.stage-footer { min-height: 46px; padding: 5px 15px; gap: 9px; color: var(--muted); font-size: .8125rem; }
.coordinates { display: inline-flex; align-items: center; gap: 7px; color: #365778; font-family: Consolas, "Courier New", monospace; white-space: nowrap; }
.coordinates .icon, .stage-hint .icon { width: 15px; height: 15px; }
.stage-hint { display: flex; align-items: center; gap: 6px; }
.stage-footer .text-button { white-space: nowrap; font-size: .8125rem; }
.battle-note { display: flex; gap: 9px; align-items: flex-start; padding: 13px 1px 0; font-size: .875rem; color: var(--muted); }
.battle-note .icon { margin-top: 2px; width: 16px; height: 16px; color: var(--accent); }

.battle-side { display: grid; gap: 16px; }
.palette-panel, .activity-panel { padding: 18px; }
.panel h2 { display: flex; gap: 9px; align-items: center; font-size: 1.0625rem; letter-spacing: -.018em; }
.panel-icon { color: var(--accent); width: 18px; height: 18px; }
.panel-caption { margin: 7px 0 14px; font-size: .875rem; color: var(--subtle); }
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.swatch { aspect-ratio: 1.17; background: var(--swatch); border: 1px solid #1723312a; border-radius: 6px; padding: 0; }
.swatch:hover { box-shadow: inset 0 0 0 2px #ffffff8a; }
.swatch[aria-pressed="true"] { outline: 2px solid #1d5a97; outline-offset: 2px; }
.color-details { display: grid; align-items: center; grid-template-columns: 23px minmax(0, 1fr) auto; gap: 9px; margin-top: 13px; background: var(--inset); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.color-picker { display: grid; place-items: center; position: relative; }
.color-picker input { width: 23px; height: 23px; opacity: 0; cursor: pointer; }
.custom-sample { pointer-events: none; position: absolute; inset: 0; border-radius: 4px; border: 1px solid #1723312a; background: var(--selected-color, #2563a6); }
.color-picker:focus-within .custom-sample { outline: 2px solid var(--accent); outline-offset: 2px; }
.hex-input { width: 100%; padding: 2px 0; color: var(--text); background: transparent; border: 0; font: .875rem Consolas, "Courier New", monospace; }
.hex-input[aria-invalid="true"] { color: #a32638; }
.color-caption { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.placement-actions { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.place-button { width: 100%; min-height: 43px; }
.place-button .icon, .cooldown .icon { width: 16px; height: 16px; }
.cooldown { margin-top: 9px; display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.cooldown.waiting { color: #365778; }

.stat-grid { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-grid > div { display: grid; align-content: center; min-height: 62px; padding: 7px 11px; background: var(--inset); border: 1px solid var(--line); border-radius: 8px; }
.stat-value { color: #172331; font-size: 1.28rem; font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .8125rem; margin-top: 2px; }
.activity-list { margin-top: 12px; color: var(--subtle); font-size: .8125rem; }
.activity-list > p { padding: 3px 0; color: var(--muted); }
.activity-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 0; }
.activity-row + .activity-row { border-top: 1px solid var(--line); }
.activity-color { width: 10px; height: 10px; background: var(--swatch); border-radius: 3px; }
.activity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 650; }
.activity-coordinates { color: var(--muted); font-family: Consolas, "Courier New", monospace; }

.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 20px; align-items: start; }
.composer { padding: 19px; }
.composer textarea { margin-top: 13px; padding: 12px; width: 100%; border-radius: 9px; border: 1px solid var(--line); background: var(--inset); color: var(--text); resize: vertical; min-height: 90px; }
.composer textarea::placeholder { color: var(--muted); }
.composer-actions, .feed-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-actions { margin-top: 9px; color: var(--muted); }
.feed-heading { margin: 23px 0 11px; }
.feed-heading h2 { font-size: 1.1rem; }
.posts { display: grid; gap: 11px; }
.post { padding: 17px 18px; }
.post-header { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: hsl(var(--avatar-hue, 250) 42% 89%); color: #243845; font-weight: 750; }
.avatar { overflow: hidden; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.post-name { display: block; overflow-wrap: anywhere; font-size: .9375rem; }
.post-time { color: var(--muted); display: block; font-size: .8125rem; }
.post-body { margin: 12px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.reaction { color: var(--subtle); font-size: .875rem; background: #f2f5f8; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 6px; padding: 5px 8px; }
.reaction[aria-pressed="true"] { color: #a73852; border-color: #e9b9c4; }
.reaction[aria-pressed="true"] .icon { fill: #a73852; }
.reaction .icon { width: 15px; height: 15px; }
.empty { color: var(--subtle); padding: 26px; text-align: center; }
.empty .icon { color: var(--accent); display: block; margin: 0 auto 10px; width: 26px; height: 26px; }
.older-button { width: 100%; margin-top: 12px; }
.feed-aside { overflow: hidden; }
.feed-aside-body { padding: 17px; }
.feed-aside p { margin: 7px 0 15px; color: var(--subtle); font-size: .9375rem; }

.friends-view { max-width: 700px; }
.friends-view > h1 { margin-bottom: 20px; }
.friends-card, .friends-groups > section { padding: 17px; }
.friends-card > p + button { margin-top: 12px; }
.friends-card label { display: block; margin: 12px 0 5px; color: var(--subtle); font-size: .875rem; }
.friend-form-fields { display: flex; gap: 8px; align-items: stretch; }
.friend-form-fields input {
  min-width: 0; flex: 1; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--inset); color: var(--text);
}
.friends-groups, .friends-load-status { margin-top: 12px; }
.friends-groups > section + section { border-top: 1px solid var(--line); }
.friends-load-status, .friend-empty { color: var(--subtle); margin-top: 8px; }
.friend-list { margin: 5px 0 0; padding: 0; list-style: none; }
.friend-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; padding: 8px 0; }
.friend-row + .friend-row { border-top: 1px solid var(--line); }
.friend-row:last-child { padding-bottom: 0; }
.friend-identity { min-width: 0; display: flex; align-items: center; gap: 9px; font-weight: 650; overflow-wrap: anywhere; }
.friend-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.friend-actions .button { min-height: 36px; padding: 6px 10px; }
.friend-search-results:not(:empty) { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 4px; }
.friend-status { color: var(--subtle); font-size: .875rem; }

.simple-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.chats-view { max-width: 1040px; }
.chat-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 12px; }
.chat-sidebar, .chat-room { overflow: hidden; }
.chat-sidebar-title, .room-header { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-sidebar-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-list-empty { padding: 14px 16px; color: var(--subtle); }
.chat-link { display: flex; align-items: center; gap: 9px; min-height: 56px; padding: 9px 12px; margin: 4px; border-radius: 6px; }
.chat-link:hover, .chat-link[aria-current] { background: #edf4fb; }
.chat-link > span:last-child { min-width: 0; display: grid; }
.chat-link strong, .chat-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-link small, .room-members { color: var(--subtle); }
.room-members { font-size: .875rem; overflow-wrap: anywhere; }
.chat-room { display: grid; grid-template-rows: auto 1fr auto; min-height: 440px; height: clamp(440px, 69vh, 700px); }
.chat-placeholder { padding: 18px; color: var(--subtle); }
.chat-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--inset); padding: 14px; }
.older-messages { display: block; margin: 0 auto 10px; }
.chat-message { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 8px; }
.chat-message.own { align-items: flex-end; }
.message-bubble { max-width: min(90%, 520px); padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.chat-message.own .message-bubble { background: #eaf3fc; border-color: #d8e7f5; }
.message-author { font-size: .8125rem; color: var(--accent); }
.message-body { overflow-wrap: anywhere; white-space: pre-wrap; }
.message-time { display: block; text-align: right; color: var(--muted); font-size: .75rem; margin-top: 3px; }
.message-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.message-form textarea { min-width: 0; flex: 1; resize: vertical; min-height: 40px; max-height: 140px; }
.message-form textarea, #transfer-friend, #gift-friend, #clan-name, #clan-description, #clan-description-edit { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; color: var(--text); background: var(--inset); }
.back-to-chats { display: none; }
.group-friends { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px 8px; }
.group-friends legend { padding-inline: 4px; font-size: .875rem; font-weight: 650; }
.group-friends #group-people { max-height: 180px; overflow: auto; }
.group-friends label { margin: 3px 0; padding: 5px 0; display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.group-friends input[type="checkbox"] { width: auto; flex: 0 0 auto; accent-color: var(--primary); }
.group-friends .friend-empty { margin: 4px 0; }
.wallet-card + .wallet-card { margin-top: 12px; }
.wallet-balance { font-weight: 740; font-size: 2rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
#transfer-friend, #gift-friend { width: 100%; min-height: 40px; }
.transfer-amount { font-weight: 650; font-variant-numeric: tabular-nums; }
.transfer-amount.received { color: var(--green); }
.transfer-person { overflow-wrap: anywhere; }
.wallet-summary { display: flex; align-items: center; gap: 7px; }
.wallet-summary img { flex: 0 0 auto; }
.wallet-earnings { margin-top: 7px; color: var(--subtle); font-size: .875rem; }
.gift-catalog { margin-top: 8px; }
.gift-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; font-size: 1.4rem; margin-right: 7px; }
.profile-identity { display: flex; gap: 14px; align-items: center; }
.profile-identity .avatar { width: 68px; height: 68px; border-radius: 16px; font-size: 1.45rem; }
#avatar-file { max-width: 100%; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.clan-directory, .clan-management { margin-top: 12px; }
.clan-invitations { margin-bottom: 12px; }
#clan-search { margin: 10px 0 4px; }
#clan-name, #clan-description, #clan-description-edit { width: 100%; }
#clan-description, #clan-description-edit { resize: vertical; }
#create-clan, #leave-clan { margin-top: 12px; }
.clan-description, .clan-list-info { overflow-wrap: anywhere; white-space: pre-wrap; }
.clan-description { margin-top: 5px; }
.clan-list-info > small { display: block; color: var(--subtle); }
#my-clan h3, #clan-outgoing h3 { margin: 14px 0 2px; font-size: .9375rem; }
.main > section:not([hidden]), .room-header:not([hidden]) { animation: section-in .16s ease-out both; }
@keyframes section-in { from { opacity: .45; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.reward-toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 6; width: min(360px, calc(100% - 36px));
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 28px; gap: 9px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); padding: 8px 11px 8px 8px;
  border-radius: 10px; box-shadow: 0 6px 22px #1723311c; animation: section-in .22s ease-out both;
}
.reward-toast img, .reward-gift { animation: reward-in .48s ease-out both; }
.reward-gift { display: grid; place-items: center; width: 48px; height: 48px; font-size: 1.6rem; }
.reward-toast p { color: var(--subtle); font-size: .875rem; overflow-wrap: anywhere; }
.reward-toast .icon-button { width: 28px; height: 28px; }
@keyframes reward-in {
  0% { opacity: 0; transform: scale(.65) rotate(-12deg); }
  64% { opacity: 1; transform: scale(1.12) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.auth-dialog { width: min(calc(100% - 28px), 410px); max-height: calc(100% - 28px); border: 1px solid #dce3ea; border-radius: 18px; padding: 25px; background: var(--panel); color: var(--text); box-shadow: 0 16px 80px #17233130; }
.auth-dialog::backdrop { background: #23334560; }
.dialog-close { position: absolute; top: 13px; right: 13px; }
.auth-dialog h2 { margin-top: 13px; font-size: 1.55rem; letter-spacing: -.04em; }
.auth-dialog p { color: var(--subtle); margin: 4px 0 17px; font-size: .9375rem; }
.auth-dialog label { display: block; margin: 12px 0 5px; font-size: .875rem; font-weight: 650; }
.auth-dialog input { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--inset); }
.auth-dialog input::placeholder { color: var(--muted); }
.auth-dialog .auth-error { color: #a32638; margin: 9px 0 0; }
.dialog-submit { width: 100%; margin-top: 17px; }
.auth-switch { margin-top: 12px; text-align: center; font-size: .875rem; color: var(--subtle); }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); color: var(--text); padding: 10px 15px; background: #ffffff; border: 1px solid #c4d3e0; border-radius: 9px; box-shadow: 0 5px 23px #17233125; }

@media (max-width: 1020px) {
  .main, .topbar-inner { padding-inline: 24px; }
  .battle-layout, .feed-layout { grid-template-columns: minmax(0, 1fr) 273px; gap: 14px; }
  .stage-hint { display: none; }
  .palette-panel, .activity-panel { padding: 15px; }
}
@media (max-width: 760px) {
  .main { padding: 23px 16px 24px; }
  .topbar-inner { padding-inline: 16px; gap: 16px; height: auto; min-height: 60px; flex-wrap: wrap; padding-block: 9px; }
  nav { width: 100%; order: 1; gap: 3px; overflow-x: auto; scrollbar-width: none; }
  .nav-link { padding: 8px; font-size: .8125rem; }
  .brand { font-size: 1.36rem; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark svg { width: 19px; height: 19px; }
  .account { gap: 5px; }
  .account .button { min-height: 36px; padding: 6px 9px; font-size: .8125rem; }
  .battle-layout, .feed-layout { grid-template-columns: 1fr; }
  .battle-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .heading-main { gap: 11px; }
  .heading-emblem { width: 44px; height: 44px; border-radius: 11px; }
  .heading-emblem .icon { width: 21px; height: 21px; }
  .viewport { height: clamp(290px, 51vh, 490px); }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-layout:not(.chat-selected) .chat-room { display: none; }
  .chat-selected .chat-sidebar { display: none; }
  .chat-room { height: clamp(370px, calc(100dvh - 190px), 690px); min-height: 370px; }
  .back-to-chats { display: inline-block; margin-bottom: 4px; }
}
@media (max-width: 530px) {
  .topbar-inner { gap: 9px; }
  nav { width: 100%; order: 1; }
  .nav-link { gap: 5px; padding-inline: 7px; }
  .nav-link .icon { display: none; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 15px; gap: 10px; }
  .page-heading p { font-size: .9rem; margin-top: 5px; }
  .size-chip { margin-left: 55px; padding: 4px 7px; font-size: .8125rem; }
  .stage-footer { padding-inline: 9px; }
  .battle-side { grid-template-columns: 1fr; }
  .swatch { aspect-ratio: 1.5; }
}
@media (max-width: 390px) {
  .friend-form-fields { flex-direction: column; }
  .friend-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
