:root {
  --menu-ink: #f5e9d6;
  --menu-muted: #b9c4bd;
  --menu-line: #caa26055;
}
.symbol-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.65;
  stroke-linecap: round; stroke-linejoin: round;
}
:where(button, a, select, input):focus-visible { outline: 2px solid #ffe0a3; outline-offset: 3px; }
.intro {
  position: fixed; inset: 0; isolation: isolate; overflow: auto;
  display: grid; grid-template-rows: auto 1fr auto;
  color: var(--menu-ink);
  background:
    linear-gradient(180deg,#0b102bb8 0%,transparent 18% 81%,#0a102bba 100%),
    url("assets/v3/menu/cueva-ilustrada.jpg") center / cover no-repeat #141c52;
}
.intro-bar, .intro-footer {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-inline: max(24px,5vw);
}
.intro-bar { padding-block: 20px; }
.intro-brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: #fff0b9; font: 900 24px/.9 'Barlow Condensed', Impact, sans-serif; letter-spacing: .08em;
  text-shadow: 0 2px #090d27;
}
.brand-emblem {
  display: block; width: 46px; height: auto; flex: none;
  background: #000; border-radius: 19%; box-shadow: 0 0 0 1px #ffd17e80, 0 3px 0 #0a0c20;
}
.brand-caption {
  display: block; margin-top: 6px; color: #aaf5f4; font: 700 9px/1 'DM Sans',system-ui,sans-serif; letter-spacing: .15em;
}
.intro-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.utility {
  position: relative; display: flex; align-items: center; gap: 7px; min-height: 43px;
  padding: 0 12px; border: 1px solid #6ba9c6; border-radius: 9px;
  color: #eff7ff; background: #1c2853; font-size: 12px;
  box-shadow: 0 3px 0 #0b1029;
  transition: background .17s, border-color .17s;
}
.utility:hover { background: #283e74; border-color: #9bf8f4; filter: none; }
.utility .icon { font-size: 16px; color: #9cf7f0; }
.utility[aria-pressed="false"] { color: #a8ada7; border-color: #7d8d8d60; }
.utility[aria-pressed="false"] .icon { color: #a4a9a3; }
.utility[aria-pressed="false"]::after {
  position: absolute; content: ""; width: 20px; height: 2px;
  left: 12px; top: 20px; background: #e1a06c; transform: rotate(-49deg);
  box-shadow: 0 0 0 1px #172020;
}
.wallet-button { color: #fff0b5; padding-inline: 13px; background: #603b2a; border-color: #ffc066; }
.wallet-button:hover { background: #815032; border-color: #ffe59d; }
.wallet-button .icon { font-size: 22px; }
.wallet-button strong { min-width: 1.3em; font-size: 15px; font-variant-numeric: tabular-nums; }
.intro-hero {
  position: relative; z-index: 1; align-self: start; justify-self: center; text-align: center;
  width: min(100% - 42px,740px); padding-top: clamp(22px,7dvh,86px); padding-bottom: 38px;
}
.intro-crest {
  display: flex; align-items: center; justify-content: center; gap: clamp(15px,4vw,44px);
}
.intro-crest::before, .intro-crest::after {
  content: ""; width: 13px; height: 23px;
  clip-path: polygon(50% 0,64% 40%,100% 50%,64% 61%,50% 100%,36% 61%,0 50%,36% 40%);
  background: #90fff1;
}
.intro-crest::after {
  background: #ffce67; transform: translateY(-19px) scale(.8);
}
.intro-crest img {
  display: block; width: clamp(102px,17dvh,156px); height: auto;
  background: #000; border-radius: 19%;
  box-shadow: 0 0 0 2px #ffce77, 0 0 0 5px #101334, 0 9px 0 4px #0a0f29, 0 0 38px #50dbef59;
}
.intro-kicker {
  margin: 0; color: #9afef3; font-size: clamp(10px,1.4vw,13px); font-weight: 800; letter-spacing: .23em;
  text-shadow: 0 2px #080e35;
}
#gameTitle {
  margin: 15px 0 16px; color: #fff0a5;
  font: 900 clamp(72px,12.3vw,151px)/.82 'Barlow Condensed',Impact,sans-serif;
  letter-spacing: .035em;
  transform: skewX(-6deg);
  paint-order: stroke fill; -webkit-text-stroke: 5px #111535;
  text-shadow: 0 4px #fdb145, 0 8px #c86332, 0 11px #111535, 0 14px #111535, 0 17px 20px #090e34af;
}
.intro-subtitle {
  margin: 7px 0 0; font-size: clamp(13px,1.65vw,17px);
  font-weight: 700; color: #f7f0ff; text-shadow: 0 2px 5px #080d2b;
}
.intro-actions {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 1fr; gap: 16px;
  width: min(100%,700px); margin: clamp(27px,4dvh,40px) auto 0;
}
.play-card {
  display: grid; grid-template-columns: 42px minmax(0,1fr) 17px; align-items: center; text-align: left; gap: 10px;
  min-height: 86px; padding: 12px 13px; border: 2px solid #101431; border-radius: 13px;
  box-shadow: 0 5px 0 var(--card-base), 0 8px 0 1px #101431, inset 0 2px 0 #ffffff84;
  transition: translate .16s, filter .16s;
}
.play-card:enabled:hover { translate: 0 -3px; filter: brightness(1.09); }
.play-card:enabled:active { translate: 0 2px; }
.play-card:disabled { opacity: 1; filter: none; }
.mode-badge {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: #13193b; border-radius: 9px; color: var(--card-accent);
  box-shadow: inset 0 0 0 1px #ffffff27;
}
.play-card .mode-icon { width: 25px; height: 25px; }
.play-card .mode-arrow { width: 17px; height: 17px; justify-self: end; }
.mode-copy { display: grid; gap: 5px; }
.mode-copy strong { font: 900 clamp(25px,2.6vw,28px)/.95 'Barlow Condensed',Impact,sans-serif; }
.mode-copy small { font-size: 12px; font-weight: 700; line-height: 1.2; }
.play-custom { --card-base: #a54a33; --card-accent: #ffe79b; background: linear-gradient(155deg,#ffe079,#ffab52); color: #30223c; }
.play-online { --card-base: #127b90; --card-accent: #9bfff2; background: linear-gradient(155deg,#a0fff0,#46d8d4); color: #142442; }
.play-missions { --card-base: #674ca3; --card-accent: #e5c9ff; background: linear-gradient(155deg,#ecd4ff,#ba98f3); color: #2d204a; }
.play-daily { --card-base: #527c38; --card-accent: #d7ffab; background: linear-gradient(155deg,#e2ffa9,#a6dc79); color: #243c2c; }
.intro-worm {
  position: absolute; z-index: 0; pointer-events: none;
  right: max(1vw,12px); bottom: 6dvh; width: clamp(240px,28vw,445px);
  transform-origin: 62% 88%; filter: drop-shadow(0 12px 14px #000c);
  animation: look-out 5.8s ease-in-out infinite alternate;
}
@keyframes look-out { from { transform: scaleY(1) rotate(-.5deg); } to { transform: scaleY(1.025) rotate(.65deg); } }
.intro-footer { min-height: 63px; padding-block: 14px; }
.version-tag,.intro-workshop {
  border: 1px solid #677caa; border-radius: 7px; background: #111834e8;
  padding: 7px 10px; box-shadow: 0 2px 0 #0a0f26;
}
.version-tag { font-size: 10px; letter-spacing: .16em; font-weight: 800; color: #bdf6f4; }
.version-tag::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px 0; border-radius: 50%; background: #efb35e; }
.intro-workshop { color: #f7f0ff; font-weight: 700; font-size: 12px; text-decoration: none; }
.intro-workshop:hover { color: #ffe0a1; }
.intro-workshop span { margin-left: 3px; color: #efb35e; }

#menu:not(.in-match) {
  background: linear-gradient(#101335bd,#101633b8),url("assets/v3/menu/cueva-ilustrada.jpg") center / cover #121735;
  backdrop-filter: none;
}
#menu.in-match { z-index: 9; }
.lobby-panel {
  width: min(540px,100%); padding: 24px; border: 1px solid #6996c0;
  background: linear-gradient(150deg,#25356a,#171e47); box-shadow: 0 6px 0 #101431, 0 16px 62px #0009; color: var(--menu-ink);
}
.lobby-nav, .dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.lobby-nav { align-items: center; margin: -5px 0 18px; }
.lobby-nav .text-button { padding: 6px 0; font-size: 13px; }
.lobby-settings { display: inline-flex; align-items: center; gap: 6px; background: #1c2853; border-color: #6ba9c6; color: #d8fffa; font-size: 12px; padding: 7px 10px; }
.panel-kicker { color: #a0fff0; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.lobby-heading h2,.dialog-heading h2 { margin: 3px 0 11px; font: 900 clamp(32px,5vw,43px)/.97 'Barlow Condensed',Impact,sans-serif; }
.lobby-panel .room-line { margin: 12px 0 5px; }
.lobby-panel #roomHint,.lobby-panel #networkStatus { line-height: 1.4; }
.lobby-panel #resumeGame { width: 100%; margin-top: 10px; }

.menu-dialog {
  box-sizing: border-box; width: min(100% - 28px,450px); max-height: calc(100dvh - 28px); overflow-y: auto;
  border: 1px solid #6996c0; border-radius: 13px; padding: 22px; color: var(--menu-ink);
  background: linear-gradient(155deg,#28366c,#171e47); box-shadow: 0 6px 0 #101431, 0 22px 65px #000b;
}
.menu-dialog::backdrop { background: #050b10c4; backdrop-filter: blur(4px); }
.dialog-close { display: grid; place-items: center; min-width: 37px; min-height: 37px; padding: 7px; background: #1c2853; border-color: #6ba9c6; color: #d8fffa; }
.dialog-close .icon { width: 20px; height: 20px; }
.settings-group { display: grid; gap: 10px; margin: 12px 0 0; padding: 12px 14px 14px; border: 1px solid #a7a68c52; border-radius: 7px; }
.settings-group legend { color: #ffe0ad; padding: 0 6px; font-size: 12px; font-weight: 800; }
.settings-group select { padding: 7px 9px; }
.settings-check { display: flex; align-items: center; gap: 8px; }
.settings-group input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #efb961; }
.settings-group input[type="range"] { grid-column: 1 / -1; width: 100%; margin: 0; padding: 0; accent-color: #efb961; cursor: pointer; }
.settings-slider { display: grid; grid-template-columns: 1fr auto; row-gap: 5px; }
.settings-slider output { color: #f0c58b; font-weight: 700; }
#fullscreen { justify-self: start; font-size: 12px; padding: 7px 10px; }
#fullscreenStatus:empty { display: none; }
#fullscreenStatus { font-size: 11px; color: #ffd6a6; }
.wallet-dialog { width: min(100% - 28px,380px); }
.wallet-balance { min-height: 145px; display: grid; place-content: center; justify-items: center; padding: 16px; border: 1px solid var(--menu-line); background: #20221c; border-radius: 9px; }
.wallet-balance .icon { width: 37px; height: 37px; }
.wallet-balance strong { font: 900 47px/1.1 'Barlow Condensed',Impact,sans-serif; color: #ffdc8f; }
.wallet-balance span { color: var(--menu-muted); font-size: 12px; }

.crate-prompt {
  position: fixed; z-index: 4; left: 50%; bottom: 80px; transform: translateX(-50%);
  display: grid; grid-template-columns: 52px minmax(100px,1fr) auto auto; align-items: center; gap: 8px;
  width: max-content; max-width: calc(100% - 20px); padding: 8px;
  background: #18234af2; border: 1px solid #ffcd76; border-radius: 10px;
  box-shadow: 0 4px 0 #0c132d, 0 7px 15px #0007;
}
.crate-prompt img { width: 52px; height: 38px; object-fit: contain; }
.crate-copy { display: grid; gap: 2px; min-width: 0; }
.crate-copy strong { font: 900 21px/.95 'Barlow Condensed',Impact,sans-serif; }
.crate-copy span { font-size: 11px; color: #d3eff7; }
.crate-prompt button { padding: 7px 9px; font-size: 12px; white-space: nowrap; }
.crate-prompt kbd { margin-left: 3px; font-size: 10px; }
@media (pointer: coarse) {
  .crate-prompt { bottom: 142px; }
  .crate-prompt kbd { display: none; }
}
@media (max-width: 420px) {
  .crate-prompt { grid-template-columns: 36px minmax(70px,1fr) auto auto; gap: 5px; }
  .crate-prompt img { width: 36px; }
  .crate-prompt kbd { display: none; }
}

@media (max-width: 930px) {
  .intro-worm { right: 0; width: 245px; }
}
@media (max-width: 610px) {
  .intro { background-position: center, 43% center; }
  .intro-bar,.intro-footer { padding-inline: max(13px,3.4vw); gap: 8px; }
  .intro-bar { padding-block: 12px; }
  .intro-brand { gap: 0; font-size: 0; }
  .brand-caption { display: none; }
  .brand-emblem { width: 39px; }
  .intro-tools { gap: 5px; }
  .utility { min-height: 40px; padding-inline: 8px; }
  .utility span { display: none; }
  .utility .icon { font-size: 16px; }
  .utility[aria-pressed="false"]::after { left: 8px; top: 19px; }
  .wallet-button .icon { font-size: 21px; }
  .intro-hero { width: calc(100% - 32px); padding-top: clamp(24px,5dvh,60px); padding-bottom: 30px; }
  .intro-crest img { width: clamp(96px,15dvh,132px); }
  #gameTitle { font-size: clamp(47px,15.4vw,91px); letter-spacing: .015em; }
  .intro-actions { grid-template-columns: 1fr; width: min(100%,335px); gap: 16px; margin-top: 27px; }
  .play-card { min-height: 72px; padding: 10px 13px; }
  .mode-copy strong { font-size: 28px; }
  .intro-worm { display: none; }
  .intro-footer { min-height: 52px; }
  .lobby-panel { padding: 16px; }
}
@media (max-height: 560px) and (min-width: 611px) {
  .intro-bar { padding-block: 11px; }
  .intro-hero { padding-top: 10px; padding-bottom: 16px; }
  .intro-crest img { width: 83px; }
  #gameTitle { font-size: clamp(65px,11vw,102px); }
  .intro-actions { margin-top: 22px; }
  .intro-footer { min-height: 42px; }
}
:root[data-menu-motion="reduced"] .intro-worm { animation: none; }
:root[data-menu-motion="reduced"] .play-card, :root[data-menu-motion="reduced"] .utility { transition: none; }
:root[data-menu-motion="reduced"] .play-card:enabled:is(:hover,:active) { translate: 0; }
@media (prefers-reduced-motion: reduce) {
  .intro-worm { animation: none; }
  .play-card,.utility { transition: none; }
  .play-card:enabled:is(:hover,:active) { translate: 0; }
}

#menu:not(.in-match) {
  background: linear-gradient(155deg,#081328c9,#100e25e8),
    url("assets/v3/menu/cueva-ilustrada.jpg") center / cover no-repeat #0d162a;
  backdrop-filter: none;
}
.lobby-tools { display: flex; gap: 8px; }
.lobby-panel { background: linear-gradient(145deg,#233361,#151f3f 58%,#242044); }
.room-open > .lobby-panel { width: min(1080px,100%); }
.room-open .lobby-heading h2 { color: #fff0bf; margin-bottom: 18px; }
.room-options {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 20px;
}
.room-option {
  display: grid; gap: 10px; padding: 10px; border-radius: 10px;
  border: 1px solid #527495; background: linear-gradient(145deg,#253b60,#182c49);
}
.room-option span { display: flex; align-items: center; gap: 7px; color: #a8f4ee; font-size: 13px; font-weight: 800; }
.room-option .icon { width: 20px; height: 20px; }
.room-option select {
  min-width: 0; padding: 8px 6px; border-radius: 5px; border-color: #66829c;
  background: #101e35; color: #fff3db; font-size: 13px; font-weight: 700;
}
.room-option select:disabled { opacity: 1; color: #e3e6f0; border-color: #577087; appearance: none; }
.room-lineup { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,220px); gap: 14px; }
.local-room .room-lineup { grid-template-columns: minmax(0,1fr); }
.lineup,.invite-card {
  min-width: 0; padding: 13px; border: 1px solid #587493; border-radius: 12px;
  background: #111f36d9;
}
.lineup-heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.lineup-heading h3,.invite-card h3 { margin: 0; font: 800 25px/.95 'Barlow Condensed',Impact,sans-serif; color: #fff0c3; }
#rosterCount { color: #a4eee8; font-size: 13px; font-weight: 800; white-space: nowrap; }
#room #roster { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 7px; }
#room .roster-item {
  min-width: 0; min-height: 118px; display: grid; align-content: end; text-align: center;
  padding: 3px 4px 8px; border: 1px solid #3c5673; border-radius: 8px;
  background: radial-gradient(ellipse at 50% 34%,color-mix(in srgb,var(--worm-color,#548398) 26%,transparent),transparent 73%),#182740;
}
.roster-item canvas { display: block; width: 100%; height: 72px; object-fit: contain; }
.roster-item strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.roster-item small { display: block; color: #a9c7d9; font-size: 11px; margin-top: 3px; }
#room .roster-empty { place-content: center; border-style: dashed; background: #131d32; }
.roster-empty > span { color: #7c9db6; font-size: 28px; line-height: 1; }
.invite-card {
  display: grid; align-content: center; gap: 7px; text-align: center;
  background: radial-gradient(ellipse at 50% 30%,#304367,#182541 80%);
}
.invite-label { color: #b8cddb; font-size: 11px; }
#roomCode { color: #ffdf90; font: 900 32px/.98 'Barlow Condensed',Impact,sans-serif; letter-spacing: .13em; margin-left: .13em; }
.invite-card button { padding: 7px 8px; color: #dbfffb; background: #1e4257; border-color: #699ab1; font-size: 12px; }
#inviteLink { min-width: 0; padding: 7px 6px; font-size: 11px; }
#inviteStatus { margin: 0; color: #c5f2e5; font-size: 11px; }
#inviteStatus:empty,#networkStatus:empty { display: none; }
.room-actions { display: flex; align-items: center; gap: 14px; margin-top: 15px; }
.room-actions #leave { color: #e3c8bd; flex: none; font-size: 12px; }
#roomHint { flex: 1; color: #c3d2e1; text-align: right; }
#start {
  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 15px; color: #271b22; background: linear-gradient(#ffdf80,#efad56);
  border: 1px solid #ffdd98; border-radius: 8px; box-shadow: 0 3px 0 #79452b;
}

.profile-dialog { width: min(820px,100% - 28px); scrollbar-color: #677da1 #1a2444; }
.profile-dialog .dialog-heading { margin-bottom: 12px; }
.profile-dialog .dialog-heading h2 { color: #fff0bf; margin-bottom: 0; }
.profile-layout { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr); gap: 16px; }
.profile-stage {
  position: sticky; top: 0; align-self: start; min-height: 350px; display: grid; align-content: center; justify-items: center; gap: 8px;
  overflow: hidden; padding: 12px; border: 1px solid #688cb1; border-radius: 12px;
  background: radial-gradient(ellipse at 50% 60%,transparent 10%,#101b36c7 80%),
    url("assets/v3/menu/cueva-ilustrada.jpg") 52% 58% / cover no-repeat #192649;
}
.profile-stage canvas { display: block; width: min(100%,370px); height: auto; filter: drop-shadow(0 8px 7px #0b0e23bb); }
#motionPreview { padding: 6px 9px; font-size: 12px; background: #1c304b; color: #e0f9ff; }
#previewName {
  max-width: 100%; padding: 5px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 1px solid #8495a0; border-radius: 20px; background: #111c32; text-shadow: 0 2px #070915;
  font: 800 24px/1 'Barlow Condensed',Impact,sans-serif;
}
.profile-controls { display: grid; align-content: start; gap: 9px; min-width: 0; }
.profile-controls > label { color: #fff0c3; font-weight: 800; }
.profile-controls #nickname { padding: 8px 9px; background: #132239; }
.profile-group { margin: 0; min-width: 0; padding: 7px 9px 9px; border: 1px solid #5b7393; border-radius: 8px; }
.profile-group legend { padding: 0 5px; color: #fff0c3; font-size: 12px; font-weight: 800; }
.profile-colors { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 6px; padding: 3px 0; justify-items: center; }
#profileColorName { display: block; padding-top: 4px; color: #e2f3f5; font-size: 11px; text-align: center; }
.profile-group label { position: relative; cursor: pointer; min-width: 0; }
.profile-group input { position: absolute; margin: 0; width: 1px; height: 1px; opacity: 0; }
.color-swatch {
  width: 24px; height: 24px; display: block; border: 2px solid #10192d; border-radius: 50%;
  background: linear-gradient(150deg,#ffffff66,transparent 50%,#09092155),var(--swatch);
  box-shadow: 0 0 0 1px #7c8da6;
}
.profile-group input:checked + .color-swatch { box-shadow: 0 0 0 2px #ffe1a0; }
.profile-group input:focus-visible + span { outline: 2px dashed #a8fff4; outline-offset: 4px; }
.accessory-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
.gear-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gear-tabs button {
  min-width: 0; padding: 7px 5px; background: #182b46; border-color: #5f7894;
  color: #d8ecf7; font-size: 13px; line-height: 1.15;
}
.gear-tabs button[aria-pressed="true"] { background: #38415d; border-color: #ffc775; color: #ffe3a0; }
.gear-tabs small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; font-weight: 500; }
.accessory-tile {
  display: grid; justify-items: center; text-align: center; align-content: start; gap: 3px; min-width: 0;
  padding: 3px 2px 5px; min-height: 58px; border: 1px solid #59778d; border-radius: 6px;
  background: #182a43; color: #d9e6ed; font-size: 11px; line-height: 1.12;
}
.accessory-tile canvas { width: min(100%,70px); height: 40px; object-fit: contain; }
.accessory-tile.no-accessory { position: relative; }
.accessory-tile.no-accessory::before {
  content: ""; position: absolute; top: 11px; width: 12px; height: 12px;
  border: 2px solid #9cb6cd; border-radius: 50%;
  background: linear-gradient(135deg,transparent 43%,#9cb6cd 45% 55%,transparent 57%);
}
.profile-group input:checked + .accessory-tile { color: #fff3d2; background: #3d3c50; border-color: #ffc675; }
.profile-actions { display: flex; justify-content: end; gap: 7px; }
.profile-actions button { padding: 9px 11px; font-size: 13px; }
.profile-actions button[type="submit"] { background: linear-gradient(#ffdc78,#efa853); }
@media (max-width: 860px) {
  #room #roster { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 610px) {
  #menu.room-open { align-items: start; padding: 10px; }
  .room-options { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 12px; }
  .room-lineup { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .invite-card { grid-template-columns: minmax(100px,1fr) minmax(120px,1fr); text-align: left; }
  .invite-card h3,.invite-card #inviteLink,.invite-card #inviteStatus { grid-column: 1 / -1; }
  #roomCode { grid-row: 3; grid-column: 1; }
  .invite-card #copy { grid-row: 2 / span 2; grid-column: 2; }
  .room-actions { flex-wrap: wrap; justify-content: space-between; }
  #roomHint { order: 1; flex: 0 0 100%; text-align: left; }
  .profile-layout { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .profile-dialog { padding: 14px; }
  .profile-stage { position: relative; min-height: 0; padding: 5px; }
  .profile-stage canvas { width: min(100%,155px); }
  #previewName { font-size: 19px; }
}
