
    html { color-scheme: light; }
    body { margin: 0; background: #040907; }
    button, input, select { font: inherit; }
    button { cursor: pointer; touch-action: manipulation; }
    button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #66ac86; outline-offset: 3px; }
    #lexi {
      --ink: #17211d;
      --page: #f5f5f2;
      --surface: #ffffff;
      --line: #d2d8d1;
      --key: #e6e9e4;
      --correct: #4d9b72;
      --present: #d5a83d;
      --absent: #838b85;
      --accent: #285a44;
      color: var(--ink);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    #lexi * { box-sizing: border-box; }
    #lexi .app {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      background: var(--page);
      min-height: 100dvh;
    }
    #lexi .topbar {
      position: relative;
      z-index: 5;
      min-height: 68px;
      gap: 12px;
      flex-wrap: wrap;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 22px;
      border-bottom: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
      background: #ffffff;
      color: #17211d;
    }
    #lexi .brand { font-size: 25px; font-weight: 750; letter-spacing: -.05em; color: #17211d; text-decoration: none; }
    #lexi .brand span { color: var(--correct); }
    #lexi .meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: #17211d; }
    #lexi .tools { display: flex; align-items: center; gap: 4px; }
    #lexi .icon-button {
      display: inline-grid;
      place-items: center;
      min-width: 36px;
      height: 40px;
      gap: 6px;
      border: 0;
      background: transparent;
      color: #17211d;
    }
    #lexi .icon-button i { width: 18px; height: 18px; }
    #lexi .settings-panel {
      --ink: #17211d;
      --page: #ffffff;
      --surface: #ffffff;
      --line: #d2d8d1;
      --key: #e6e9e4;
      --accent: #285a44;
      position: absolute;
      z-index: 3;
      top: 50px;
      right: 12px;
      width: 304px;
      padding: 15px;
      border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
      background: var(--surface);
      color: var(--ink);
      box-shadow: 0 12px 28px color-mix(in srgb, var(--ink) 18%, transparent);
    }
    #lexi .settings-panel[hidden] { display: none; }
    #lexi .settings-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; font-size: 14px; font-weight: 700; }
    #lexi .settings-block + .settings-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
    #lexi .settings-label { margin-bottom: 8px; font-size: 12px; font-weight: 700; }
    #lexi .settings-note { margin: 7px 0 0; font-size: 11px; color: color-mix(in srgb, var(--ink) 63%, transparent); line-height: 1.35; }
    #lexi .mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
    #lexi .setting-choice {
      min-height: 32px;
      padding: 5px 4px;
      border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
      border-radius: 4px;
      background: transparent;
      color: var(--ink);
      font-size: 11px;
      font-weight: 700;
    }
    #lexi .setting-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--surface); }
    #lexi [hidden] { display: none !important; }
    #lexi button:disabled { opacity: .48; cursor: not-allowed; }
    #lexi .setting-action { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d8e0d8; border-radius: 5px; background: #f7f9f6; color: #17211d; font-size: 12px; font-weight: 500; text-align: left; }
    #lexi .setting-action[aria-pressed="true"] { border-color: #285a44; background: #edf5ee; }
    #lexi .setting-action i { width: 16px; height: 16px; }
    #lexi .online-options { display: grid; gap: 7px; margin-top: 10px; }
    #lexi .join-form { display: flex; gap: 6px; flex-wrap: wrap; }
    #lexi .room-input { width: 100%; min-width: 0; border: 1px solid #ccd7cc; border-radius: 4px; padding: 10px; background: #fff; color: #17211d; font: 16px/1.25 monospace; text-transform: uppercase; }
    #lexi .error-note { margin: 5px 0; font-size: 12px; color: #a23030; }
    #lexi .game-shell.duel { width: min(100%, 788px); }
    #lexi .match-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #e4e9e2; padding-bottom: 14px; margin-bottom: 19px; }
    #lexi .match-heading strong { display: block; font-size: 15px; font-weight: 600; }
    #lexi .match-actions { display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; gap: 8px; }
    #lexi .match-subtitle { display: block; font-size: 11px; color: #657168; margin-top: 3px; }
    #lexi .match-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 17px; padding: 10px 0; font-size: 12px; border-bottom: 1px solid #e4e9e2; }
    #lexi .match-score { display: flex; align-items: center; gap: 12px; }
    #lexi .match-score strong { font-size: 19px; font-variant-numeric: tabular-nums; }
    #lexi .turn-status { border-radius: 5px; padding: 6px 10px; background: #e9f3e9; color: #285a44; overflow-wrap: anywhere; }
    #lexi .header-nickname { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #lexi .match-hud { flex-wrap: wrap; }
    #lexi .match-score { min-width: 0; max-width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    #lexi .match-score span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    #lexi .match-score span:last-child { text-align: right; }
    #lexi .match-score strong { flex-shrink: 0; }
    #lexi .player-name { min-width: 0; max-width: 100%; }
    #lexi .player-name > span:last-child { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #lexi .player-avatar { flex-shrink: 0; }
    #lexi .room-player { gap: 12px; }
    #lexi .room-player > span:first-child { min-width: 0; overflow-wrap: anywhere; }
    #lexi .proposal-person { min-width: 0; overflow-wrap: anywhere; }
    #lexi .proposal-person > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #lexi .format-field { display: grid; gap: 7px; font-size: 12px; margin: 11px 0; }
    #lexi .format-field select { width: 100%; min-width: 0; background: #fff; border: 1px solid #ccd7cc; border-radius: 4px; padding: 8px; font-family: inherit; font-size: 13px; color: #17211d; }
    #lexi .welcome { padding: 32px 8px 27px; }
    #lexi .welcome-mark { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); width: min(100%, 385px); gap: clamp(3px, 1vw, 7px); margin-bottom: 30px; }
    #lexi .welcome-mark span { display: grid; place-items: center; min-width: 0; aspect-ratio: 42 / 46; border-radius: 4px; background: #4d9b72; color: #fff; font-size: clamp(16px, 4vw, 23px); font-weight: 700; }
    #lexi .welcome-mark span:nth-child(3) { background: #d5a83d; }
    #lexi .welcome h1 { font-size: 28px; letter-spacing: -.04em; line-height: 1.15; margin: 0 0 10px; }
    #lexi .welcome p { margin: 0 0 28px; font-size: 13px; line-height: 1.6; color: #657168; }
    #lexi .nickname-label { display: grid; gap: 8px; margin-bottom: 14px; font-size: 12px; font-weight: 600; }
    #lexi .nickname-input { width: 100%; min-width: 0; border: 1px solid #ccd7cc; border-radius: 5px; padding: 13px 12px; background: #fff; color: #17211d; font-family: inherit; font-size: 16px; }
    #lexi .welcome .error-note { margin: 0 0 12px; color: #a23030; }
    #lexi .welcome .welcome-foot { margin: 15px 0 0; font-size: 11px; text-align: center; }
    #lexi .negotiation-clock { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; font-size: 12px; color: #657168; }
    #lexi .negotiation-clock strong { color: #285a44; font-variant-numeric: tabular-nums; }
    #lexi .number-game { padding: 15px 0; }
    #lexi .number-game h2 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.025em; }
    #lexi .number-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin: 23px 0 15px; }
    #lexi .number-choice { min-height: 47px; border: 1px solid #ccd7cc; border-radius: 5px; background: #f7f9f6; color: #17211d; font-size: 18px; font-weight: 600; }
    #lexi .number-choice[aria-pressed="true"] { background: #285a44; border-color: #285a44; color: #fff; }
    #lexi .number-status { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 17px 0; font-size: 12px; color: #657168; overflow-wrap: anywhere; }
    #lexi .number-result { text-align: center; padding: 20px 0 0; }
    #lexi .number-target { display: block; font-size: 48px; font-weight: 700; color: #285a44; line-height: 1.2; margin: 8px 0 20px; }
    #lexi .number-result .proposal-players { text-align: left; margin: 15px 0; }
    #lexi .number-result h3 { font-size: 17px; margin: 20px 0; overflow-wrap: anywhere; }
    @media (max-width: 480px) {
      #lexi .header-nickname { max-width: 74px; }
      #lexi .meta { gap: 4px; }
      #lexi .number-choices { gap: 5px; }
      #lexi .welcome { padding: 20px 5px; }
    }
    #lexi .round-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; padding: 12px; background: #f3f5ed; color: #253e2e; font-size: 12px; }
    #lexi .round-notice strong { display: block; margin-bottom: 3px; }
    #lexi .round-notice button { width: auto; white-space: nowrap; }
    #lexi .negotiation { max-width: 408px; margin: 0 auto; padding: 14px 0; }
    #lexi .negotiation h2 { margin: 0 0 7px; font-size: 21px; }
    #lexi .proposal-players { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 23px 0; }
    #lexi .proposal-person { display: grid; gap: 8px; padding: 14px; background: #f2f5ee; border-radius: 6px; font-size: 12px; }
    #lexi .proposal-person strong { font-size: 16px; }
    #lexi .proposal-options { margin: 10px 0 15px; }
    #lexi .negotiation-dialog { margin: 20px 0 0; padding: 18px; border: 1px solid #bfd3c1; border-radius: 7px; background: #fff; box-shadow: 0 8px 28px #20463014; }
    #lexi .negotiation-dialog h3 { margin: 0 0 9px; font-size: 16px; }
    #lexi .negotiation-dialog p { margin: 0 0 15px; font-size: 12px; color: #58655b; line-height: 1.6; }
    #lexi .negotiation-actions { display: flex; gap: 9px; }
    #lexi .negotiation-actions button { flex: 1; }
    #lexi .negotiation-actions .text-action { border: 1px solid #d5ded3; border-radius: 5px; }
    #lexi .negotiation-status { margin-top: 15px; font-size: 12px; color: #356449; }
    #lexi .text-action { min-height: 36px; background: transparent; border: 0; color: #285a44; font-size: 12px; padding: 4px 6px; white-space: nowrap; }
    #lexi .text-action.give-up { border: 1px solid #e4c6c0; border-radius: 5px; color: #963f35; padding: 5px 10px; }
    #lexi .text-action.give-up:hover:not(:disabled) { background: #fff1ed; border-color: #ba7468; }
    #lexi .boards { display: grid; grid-template-columns: minmax(0, 1fr); }
    #lexi .duel .boards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; }
    #lexi .player-pane { min-width: 0; }
    #lexi .duel .player-pane + .player-pane { padding-left: 20px; border-left: 1px solid #e3e8e0; }
    #lexi .player-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 13px; margin-bottom: 12px; }
    #lexi .player-name { display: flex; align-items: center; gap: 7px; }
    #lexi .player-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #e9f1e9; color: #285a44; font-size: 11px; font-weight: 600; }
    #lexi .turn-chip { font-size: 11px; color: #296045; }
    #lexi .board-count { display: flex; justify-content: space-between; font-size: 11px; color: #6d766f; margin-top: 9px; }
    #lexi .tile.seed { border-color: #4d9b72; color: #326c4e; background: #edf5ee; }
    #lexi .match-status { min-height: 18px; margin: 13px 0 0; font-size: 12px; color: #326347; text-align: center; }
    #lexi .lobby { max-width: 390px; margin: 0 auto; padding: 14px 0; }
    #lexi .lobby h2 { margin: 0 0 8px; font-size: 20px; color: #17211d; }
    #lexi .lobby .room-code { display: block; padding: 13px 0; font: 600 28px/1.2 monospace; letter-spacing: 5px; color: #285a44; }
    #lexi .room-players { display: grid; gap: 8px; margin: 16px 0 20px; }
    #lexi .room-player { display: flex; justify-content: space-between; padding: 12px; border-radius: 5px; background: #f1f4ee; font-size: 13px; }
    #lexi .lobby label { display: grid; gap: 7px; margin-bottom: 18px; font-size: 12px; }
    #lexi .lobby select { width: 100%; background: #fff; border: 1px solid #ccd7cc; border-radius: 4px; padding: 10px; font: 16px/1.2 inherit; color: #17211d; }
    #lexi .lobby-primary { width: 100%; min-height: 42px; padding: 9px 15px; border: 0; border-radius: 5px; background: #285a44; color: #fff; font-size: 13px; }
    #lexi .matchmaking { padding: 42px 0; text-align: center; }
    #lexi .matchmaking p { font-size: 13px; color: #667269; }
    #lexi .duel .keyboard { max-width: 420px; }
    @media (max-width: 580px) {
      #lexi .duel .boards { gap: 14px; }
      #lexi .duel .player-pane + .player-pane { padding-left: 8px; }
      #lexi .duel .board, #lexi .duel .row { gap: 3px; }
      #lexi .duel .tile { font-size: clamp(12px, 3.3vw, 20px); border-width: 1px; }
      #lexi .player-heading { flex-wrap: wrap; min-height: 49px; font-size: 12px; }
      #lexi .duel .player-heading { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; }
      #lexi .duel .player-name { width: 100%; }
      #lexi .player-avatar { width: 23px; height: 23px; }
      #lexi .turn-chip { font-size: 11px; }
      #lexi .match-heading strong { font-size: 13px; }
      #lexi .match-hud { flex-wrap: wrap; font-size: 11px; }
      #lexi .match-score { gap: 7px; width: 100%; }
      #lexi .round-notice { flex-wrap: wrap; }
    }
    #lexi .background-options { display: flex; align-items: center; gap: 4px; }
    #lexi .background-choice {
      display: flex;
      align-items: center;
      gap: 7px;
      min-height: 40px;
      padding: 5px 10px;
      border: 1px solid transparent;
      border-radius: 6px;
      background: #ffffff;
      color: #69716c;
      font-size: 12px;
      font-weight: 500;
    }
    #lexi .background-preview { position: relative; width: 20px; height: 20px; border: 1px solid #00000018; border-radius: 50%; overflow: hidden; }
    #lexi .background-choice[aria-pressed="true"] { background: #eff2ef; border-color: #dfe4de; color: #17211d; }
    #lexi .background-preview.paper { background: repeating-linear-gradient(130deg, #fafaf6 0 6px, #d5d8d4 6px 7px); }
    #lexi .background-preview.night { background: repeating-linear-gradient(130deg, #17191c 0 6px, #45494f 6px 7px); }
    #lexi .background-preview.cyber { background-color: #040b08; background-image: linear-gradient(#69f39580 1px, transparent 1px), linear-gradient(90deg, #69f39580 1px, transparent 1px); background-size: 7px 7px; }
    #lexi .background-preview.arcade { background-color: #f4bd24; background-image: repeating-linear-gradient(135deg, #0c5a59 0 2px, transparent 2px 10px), repeating-linear-gradient(45deg, #ef4d39 0 2px, transparent 2px 14px); }
    #lexi .play-area { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 32px 24px 36px; }
    #lexi .game-shell {
      --ink: #17211d;
      --page: #ffffff;
      --surface: #ffffff;
      --line: #d2d8d1;
      --key: #e6e9e4;
      --accent: #285a44;
      width: min(100%, 446px);
      min-width: 0;
      padding: 24px 22px 20px;
      border: 1px solid #e4e7e1;
      border-radius: 10px;
      background: #ffffff;
      color: #17211d;
      box-shadow: 0 16px 50px rgba(17, 24, 21, .12);
    }
    #lexi .board-wrap { width: min(100%, 298px); margin: 0 auto; }
    #lexi .round-line { min-height: 24px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; font-size: 12px; color: color-mix(in srgb, var(--ink) 64%, transparent); }
    #lexi .round-number { font-weight: 700; color: var(--accent); }
    #lexi .board { display: grid; gap: 5px; }
    #lexi .row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
    #lexi .tile {
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      border: 2px solid var(--line);
      background: var(--surface);
      color: var(--ink);
      font-size: 24px;
      line-height: 1;
      font-weight: 700;
      letter-spacing: .02em;
    }
    #lexi .tile.correct { background: var(--correct); border-color: var(--correct); color: #fff; }
    #lexi .tile.present { background: var(--present); border-color: var(--present); color: #fff; }
    #lexi .tile.absent { background: var(--absent); border-color: var(--absent); color: #fff; }
    #lexi .tile.active { border-color: color-mix(in srgb, var(--ink) 54%, transparent); }
    #lexi .keyboard { display: grid; gap: 6px; width: min(100%, 476px); margin: 22px auto 0; }
    #lexi .keys { display: flex; justify-content: center; gap: 4px; }
    #lexi .keys.middle { padding: 0 20px; }
    #lexi .key {
      flex: 1 1 0;
      min-width: 0;
      height: 42px;
      display: grid;
      place-items: center;
      border: 0;
      border-radius: 4px;
      background: var(--key);
      color: var(--ink);
      font-size: 13px;
      font-weight: 700;
    }
    #lexi .key.wide { flex: 1.5 1 0; font-size: 11px; }
    #lexi .key.correct { background: var(--correct); color: #fff; }
    #lexi .key.present { background: var(--present); color: #fff; }
    #lexi .key.absent { background: var(--absent); color: #fff; }
    #lexi .footer { text-align: center; margin-top: 17px; font-size: 12px; color: color-mix(in srgb, var(--ink) 58%, transparent); }
    #lexi .scenery { position: absolute; inset: 68px 0 0; z-index: 0; overflow: hidden; pointer-events: none; }
    #lexi .scene { position: absolute; inset: 0; display: none; overflow: hidden; }
    #lexi .scene > * { position: absolute; }
    #lexi .scene-minimal { display: block; --drawing: #7b858d; }
    #lexi .scene-minimal::before { content: ""; position: absolute; inset: 0; opacity: .42; background-image: linear-gradient(#d3d9d7 1px, transparent 1px), linear-gradient(90deg, #d3d9d7 1px, transparent 1px); background-size: 112px 112px; mask-image: linear-gradient(135deg, #000, transparent 46%, #000); }
    #lexi .orbit { border: 1px solid var(--drawing); border-radius: 50%; opacity: .24; }
    #lexi .orbit::before, #lexi .orbit::after { content: ""; position: absolute; border: 1px solid var(--drawing); border-radius: 50%; }
    #lexi .orbit::before { inset: 22px; }
    #lexi .orbit::after { inset: 44px; }
    #lexi .orbit.one { width: 330px; height: 330px; left: -158px; top: 72px; }
    #lexi .orbit.two { width: 430px; height: 430px; right: -140px; bottom: -182px; }
    #lexi .draft-lines { width: 140px; height: 330px; right: 5%; top: -62px; transform: rotate(35deg); border-left: 1px solid var(--drawing); border-right: 1px solid var(--drawing); background: linear-gradient(90deg, transparent calc(50% - .5px), var(--drawing) 50%, transparent calc(50% + .5px)); opacity: .22; }
    #lexi .draft-square { left: 12%; bottom: 140px; width: 76px; height: 76px; border: 1px solid var(--drawing); transform: rotate(-22deg); opacity: .2; }
    #lexi .draft-square::after { content: ""; position: absolute; inset: 14px; border: 1px solid var(--drawing); }
    #lexi .dot-field { left: 30px; bottom: 30px; width: 170px; height: 68px; background: radial-gradient(var(--drawing) 1px, transparent 1.5px) 0 0 / 13px 13px; opacity: .26; }
    #lexi[data-background="black"] { --page: #15171b; }
    #lexi[data-background="black"] .scene-minimal { --drawing: #a4aebc; background: radial-gradient(ellipse at 0 20%, #31343c 0, transparent 55%); }
    #lexi[data-background="black"] .scene-minimal::before { background-image: linear-gradient(#3b424c 1px, transparent 1px), linear-gradient(90deg, #3b424c 1px, transparent 1px); }
    #lexi[data-background="cyber"] { --page: #040907; }
    #lexi[data-background="cyber"] .scene-minimal,
    #lexi[data-background="arcade"] .scene-minimal { display: none; }
    #lexi[data-background="cyber"] .scene-cyber { display: block; background: radial-gradient(ellipse at 3% 32%, #143a2270, transparent 43%), radial-gradient(ellipse at 92% 22%, #163c2b60, transparent 42%), linear-gradient(#040907, #07130d 65%, #020704); }
    #lexi .cyber-orbit { width: 178px; height: 178px; right: 4%; top: 62px; border-radius: 50%; border: 1px solid #4bcd7750; background: repeating-conic-gradient(from 5deg, #75fa9e75 0deg 1deg, transparent 1deg 15deg); mask-image: radial-gradient(transparent 0 64%, #000 65% 69%, transparent 70%); filter: drop-shadow(0 0 5px #8bffba40); }
    #lexi .cyber-target { width: 152px; height: 152px; right: calc(4% + 13px); top: 75px; border: 1px solid #60ea8a44; border-radius: 50%; background: linear-gradient(transparent calc(50% - .5px), #69f39555 50%, transparent calc(50% + .5px)), linear-gradient(90deg, transparent calc(50% - .5px), #69f39555 50%, transparent calc(50% + .5px)); }
    #lexi .cyber-target::before { content: ""; position: absolute; inset: 24px; border: 2px solid transparent; border-top-color: #a4ffad; border-right-color: #a4ffad; border-radius: 50%; transform: rotate(22deg); filter: drop-shadow(0 0 5px #94ffae66); }
    #lexi .cyber-target::after { content: ""; position: absolute; inset: 61px; border: 1px solid #69f395; transform: rotate(45deg); background: #73ffa326; }
    #lexi .cyber-stars { inset: 0; opacity: .35; background: radial-gradient(#9effb4 1px, transparent 1.5px) 14px 31px / 109px 93px, linear-gradient(#42956512 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(90deg, #42956512 1px, transparent 1px) 0 0 / 64px 64px; }
    #lexi .cyber-code { left: 28px; top: 34px; margin: 0; color: #71d78f; opacity: .32; font: 11px/2.3 monospace; letter-spacing: 6px; }
    #lexi .cyber-code.second { left: auto; right: 3%; top: 264px; opacity: .28; font-size: 11px; letter-spacing: 3px; }
    #lexi .circuit-trace { top: 224px; left: -18px; width: 175px; height: 92px; border: 1px solid #7bffac50; border-top: 0; transform: skewY(-25deg); }
    #lexi .circuit-trace::before { content: ""; position: absolute; width: 7px; height: 7px; right: -4px; top: -4px; border-radius: 50%; background: #a0ffc0; box-shadow: 0 0 9px #73ffa2; }
    #lexi .circuit-trace::after { content: ""; position: absolute; inset: 14px 18px -17px -1px; border-right: 1px solid #70c89750; border-bottom: 1px solid #70c89750; }
    #lexi .cyber-tower { bottom: 116px; width: 82px; border-top: 2px solid #3f8661; border-left: 1px solid #37654c; background: repeating-linear-gradient(0deg, transparent 0 17px, #07100b 17px 24px), repeating-linear-gradient(90deg, #448b5350 0 3px, #050c08 3px 16px); box-shadow: 12px 10px 0 #020704; }
    #lexi .cyber-tower.t1 { left: 1%; height: 315px; }
    #lexi .cyber-tower.t2 { left: 11%; height: 240px; width: 102px; border-top-color: #6bbf85; }
    #lexi .cyber-tower.t3 { right: 2%; height: 295px; width: 92px; }
    #lexi .cyber-tower.t4 { right: 12%; height: 205px; width: 80px; }
    #lexi .cyber-tower::before { content: ""; position: absolute; height: 36px; width: 1px; top: -38px; left: 16px; background: #a6ffab; box-shadow: 0 0 8px #69f39560; }
    #lexi .neon-sign { top: 157px; left: 5%; padding: 10px 14px; color: #d2ffd8; border: 1px solid #8cffa6; border-radius: 0; background: #05120b; font: 700 23px/1.2 monospace; letter-spacing: 4px; text-shadow: 0 0 9px #84ffa570; box-shadow: 0 0 9px #73ffab40, inset 0 0 7px #69f39512, 5px 5px 0 #194b3038; }
    #lexi .neon-sign.second { top: 342px; left: auto; right: 6%; color: #c1ffca; border-color: #83e0a280; text-shadow: 0 0 7px #73ffab50; box-shadow: 0 0 8px #8cffaa20; font-size: 16px; letter-spacing: 4px; transform: none; }
    #lexi .cyber-floor { left: -45%; right: -45%; bottom: -135px; height: 330px; transform: perspective(280px) rotateX(53deg); background: linear-gradient(#4b956546 1px, transparent 1px) 0 0 / 42px 35px, linear-gradient(90deg, #73be8955 1px, transparent 1px) 0 0 / 42px 35px, #030b06; border-top: 1px solid #8be2a177; box-shadow: 0 -10px 35px #43de7420; }
    #lexi .laser { width: 1px; height: 260px; top: -120px; left: 18%; background: #a3ffb5; transform: rotate(34deg); box-shadow: 0 0 7px #b4ffc080; }
    #lexi .laser.second { height: 126px; left: auto; right: 7%; top: -34px; background: #72f7c7; box-shadow: 0 0 8px #72f7c755; }
    #lexi .scanlines { inset: 0; background: repeating-linear-gradient(transparent 0 3px, #02080530 3px 4px); }
    #lexi[data-background="cyber"] .game-shell { box-shadow: 0 0 0 4px #a0ffb312, 0 20px 70px #000c, 0 0 45px #5fe88a18; }
    #lexi[data-background="arcade"] { --page: #f7c644; }
    #lexi[data-background="arcade"] .scene-arcade { display: block; background: radial-gradient(#e48942 1px, transparent 1.5px) 0 0 / 13px 13px, #f7cb51; }
    #lexi .arcade-swoop { width: 440px; height: 440px; border: 68px solid #f07295; border-radius: 50%; left: -230px; top: -135px; box-shadow: 0 0 0 22px #fbe5b8, 0 0 0 48px #6550ac; }
    #lexi .arcade-swoop.second { left: auto; top: auto; right: -280px; bottom: -200px; width: 500px; height: 500px; border-color: #209f91; box-shadow: 0 0 0 24px #fbe5b8, 0 0 0 50px #f07153; }
    #lexi .checker { width: 190px; height: 110px; right: -12px; top: 72px; transform: rotate(14deg); background: conic-gradient(#253831 25%, #fff4d3 0 50%, #253831 0 75%, #fff4d3 0) 0 0 / 28px 28px; border: 5px solid #fff4d3; box-shadow: 5px 7px 0 #253831; }
    #lexi .checker.second { right: auto; top: auto; left: -52px; bottom: 52px; transform: rotate(-12deg); width: 214px; height: 94px; }
    #lexi .arcade-sticker { left: 4%; top: 235px; padding: 13px 16px; background: #f66a47; color: #fff8df; border: 3px solid #27362f; border-radius: 8px; box-shadow: 5px 6px 0 #27362f; transform: rotate(-11deg); font: 900 29px/1.1 monospace; letter-spacing: -1px; }
    #lexi .arcade-sticker.second { top: 369px; left: auto; right: 3%; background: #6552ad; font-size: 22px; text-align: center; transform: rotate(12deg); padding: 17px; }
    #lexi .pixel-figure { left: 11%; top: 433px; width: 11px; height: 11px; background: #253831; box-shadow: -22px 0 #253831, 22px 0 #253831, -11px 11px #253831, 0 11px #253831, 11px 11px #253831, -22px 22px #253831, -11px 22px #253831, 0 22px #253831, 11px 22px #253831, 22px 22px #253831, -33px 33px #253831, -22px 33px #253831, 0 33px #253831, 22px 33px #253831, 33px 33px #253831, -33px 44px #253831, -11px 44px #253831, 0 44px #253831, 11px 44px #253831, 33px 44px #253831, -22px 55px #253831, 22px 55px #253831; transform: rotate(-7deg); }
    #lexi .arcade-burst { right: 11%; top: 220px; width: 66px; height: 66px; background: #f26548; clip-path: polygon(50% 0,60% 30%,86% 8%,76% 39%,100% 50%,73% 59%,91% 88%,61% 72%,50% 100%,39% 72%,9% 90%,27% 59%,0 50%,26% 38%,10% 9%,39% 29%); transform: rotate(13deg); }
    #lexi .arcade-confetti { width: 30px; height: 70px; right: 22%; top: 35px; transform: rotate(24deg); background: #229c8f; border: 3px solid #253831; box-shadow: -480px 260px 0 -6px #6552ad; }
    #lexi .arcade-donut { left: 16%; top: 95px; width: 55px; height: 55px; border: 13px solid #219d90; border-radius: 50%; box-shadow: 3px 3px 0 #27362f; }
    #lexi[data-background="arcade"] .game-shell { border: 2px solid #28392f; box-shadow: 9px 9px 0 #28392f; }
    #lexi button { font-family: inherit; }
    #lexi .topbar .tools .icon-button { display: flex; padding: 0 8px; font-size: 12px; }
    @media (max-width: 740px) {
      #lexi .topbar { padding: 10px 14px; }
      #lexi .background-options { order: 3; width: 100%; justify-content: center; }
      #lexi .scenery { top: 112px; }
      #lexi .play-area { padding-top: 27px; }
      #lexi .scene-cyber .neon-sign, #lexi .arcade-sticker { transform: scale(.8) rotate(-10deg); transform-origin: left center; left: -26px; }
      #lexi .scene-cyber .neon-sign.second, #lexi .arcade-sticker.second { left: auto; right: -28px; transform-origin: right center; }
    }
    @media (max-width: 480px) {
      #lexi .topbar { padding: 0 14px; }
      #lexi .settings-panel { right: 7px; width: min(304px, calc(100vw - 14px)); }
      #lexi .play-area { padding: 24px 20px 32px; }
      #lexi .game-shell { padding: 18px 10px; }
      #lexi .background-choice { padding: 5px 7px; gap: 5px; }
      #lexi .background-preview { width: 15px; height: 15px; }
      #lexi .round-line { font-size: 11px; gap: 8px; }
      #lexi .round-number { white-space: nowrap; }
      #lexi .tile { font-size: 21px; }
      #lexi .key { height: 44px; font-size: 11px; padding: 0; }
      #lexi .key.wide { font-size: 11px; }
      #lexi .keys { gap: 3px; }
    }

    #lexi .game-shell { width: min(100%, 490px); padding: 25px 25px 22px; }
    #lexi .game-shell.duel { width: min(100%, 820px); }
    #lexi .play-area { padding: 34px 24px 40px; min-height: calc(100dvh - 68px); align-content: center; }
    #lexi .settings-button { display: flex; align-items: center; gap: 8px; border: 1px solid #dfe5dc; border-radius: 6px; background: #fff; color: #243b2e; min-height: 39px; padding: 6px 11px; font-size: 12px; }
    #lexi .settings-button span { font-size: 22px; line-height: 1; }
    #lexi .topbar { padding: 12px 26px; }
    #lexi .header-nickname { font-weight: 600; }
    #lexi .settings-panel { position: fixed; inset: 82px 22px auto auto; margin: 0; width: min(350px, calc(100vw - 28px)); max-height: calc(100dvh - 104px); overflow-y: auto; padding: 22px; border-radius: 10px; }
    #lexi dialog:not([open]) { display: none; }
    #lexi dialog::backdrop { background: #03120a66; backdrop-filter: blur(3px); }
    #lexi .modal { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; border: 1px solid #dce4d9; border-radius: 12px; padding: 26px; background: #fff; color: #17211d; box-shadow: 0 24px 100px #03170b33; }
    #lexi .modal h2 { margin: 0 0 14px; font-size: 21px; letter-spacing: -.03em; }
    #lexi .modal p { font-size: 13px; line-height: 1.7; color: #58665b; margin: 0 0 20px; }
    #lexi .modal .settings-heading h2 { margin: 0; }
    #lexi .modal .negotiation-clock { margin-bottom: 18px; }
    #lexi .format-field select, #lexi .lobby select { font-size: 14px; font-family: inherit; min-height: 42px; }
    #lexi .setting-choice { min-height: 39px; font-size: 12px; }
    #lexi .settings-note { font-size: 12px; line-height: 1.55; }
    #lexi .settings-label { font-size: 13px; }
    #lexi .settings-block + .settings-block { margin-top: 21px; padding-top: 19px; }
    #lexi .join-label { display: block; font-size: 12px; margin-top: 5px; }
    #lexi .join-form .setting-action { background: #285a44; color: #fff; justify-content: center; }
    #lexi .welcome { padding: 29px 6px 22px; }
    #lexi .welcome h1 { font-size: 30px; max-width: 360px; }
    #lexi .welcome-mark { margin-bottom: 28px; }
    #lexi .welcome .welcome-foot { margin-top: 22px; }
    #lexi .lobby-primary { min-height: 45px; font-weight: 600; }
    #lexi .lobby-primary:hover { background: #1e4835; }
    #lexi .key { height: 45px; font-weight: 650; }
    #lexi .key:hover:not(:disabled) { filter: brightness(.95); }
    #lexi .key:disabled { opacity: .65; }
    #lexi .key.wide { flex: 1.7 1 0; }
    #lexi .board-wrap { width: min(100%, 292px); }
    #lexi .board { gap: 6px; }
    #lexi .row { gap: 6px; }
    #lexi .tile { border-radius: 3px; font-size: 24px; }
    #lexi .tile.typed { border-color: #768b7b; }
    #lexi .input-row { position: relative; }
    #lexi .guess-input { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; opacity: 0; font-size: 16px; cursor: text; }
    #lexi .input-row:focus-within, #lexi .multi .input-row { outline: 2px solid #a0bea9; outline-offset: 3px; border-radius: 3px; }
    #lexi .tile.seed { border-style: dashed; }
    #lexi .keyboard { margin-top: 24px; }
    #lexi .footer { margin-top: 24px; font-size: 11px; }
    #lexi .match-hud { row-gap: 12px; }
    #lexi .duel .boards { position: relative; }
    #lexi .duel .boards::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #e3e8e0; pointer-events: none; }
    #lexi .duel .player-pane + .player-pane { padding-left: 0; border-left: 0; }
    #lexi .nickname-input { font-weight: 400; }
    #lexi .match-score { flex: 1; max-width: 320px; }
    #lexi .turn-status { font-size: 12px; }
    #lexi .player-name { flex: 1; }
    #lexi .turn-chip { flex-shrink: 0; }
    #lexi .lobby .room-code { font-size: 30px; }
    #lexi .room-code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    #lexi .room-player span:last-child { flex-shrink: 0; color: #4b6652; font-size: 12px; }
    #lexi .room-player.empty { background: #fafbf8; border: 1px dashed #c6d4c6; color: #6c786e; }
    #lexi .lobby label { margin-top: 16px; }
    #lexi .lobby-primary + .settings-note { margin-top: 12px; }
    #lexi .proposal-person { gap: 12px; padding: 16px; }
    #lexi .proposal-person strong { font-size: 20px; }
    #lexi .proposal-person > span:first-child { color: #5d6b60; }
    #lexi .proposal-players { gap: 12px; }
    #lexi .negotiation-status { line-height: 1.65; }
    #lexi .status-card { margin-top: 20px; padding: 20px; background: #f1f6ed; border-radius: 8px; }
    #lexi .status-card h3 { margin: 0 0 10px; font-size: 18px; }
    #lexi .status-card p { font-size: 13px; line-height: 1.6; color: #57665b; margin: 0 0 15px; }
    #lexi .round-notice { border-radius: 6px; margin-bottom: 21px; }
    #lexi .round-notice .answer { font-size: 18px; letter-spacing: .1em; margin: 8px 0; display: block; }
    #lexi .round-notice .lobby-primary { min-width: 120px; }
    #lexi .disconnected { margin: 0 0 16px; border-radius: 5px; background: #fff6de; color: #735a24; padding: 10px 13px; font-size: 12px; line-height: 1.5; }
    #lexi .connection-banner { position: relative; z-index: 4; padding: 10px 20px; text-align: center; background: #fff1cc; color: #715114; font-size: 13px; }
    #lexi .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100vw - 36px); padding: 13px 20px; border-radius: 9px; background: #193326; color: #fff; box-shadow: 0 8px 25px #001b162e; font-size: 13px; text-align: center; pointer-events: none; }
    #lexi .toast.error { background: #873f38; }
    #lexi .inline-error { color: #a23d35; font-size: 12px; margin: 0 0 12px; line-height: 1.5; }
    #lexi .loading { text-align: center; padding: 45px 0; font-size: 15px; color: #627368; }
    #lexi .search-art { display: flex; justify-content: center; gap: 6px; margin: 6px auto 24px; }
    #lexi .search-art span { display: grid; place-items: center; border-radius: 4px; width: 43px; height: 47px; background: #e8f0e6; color: #285a44; font-weight: 700; font-size: 22px; }
    #lexi .search-art span:nth-child(2) { background: #285a44; color: #fff; }
    #lexi .rule-legend { display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 10px 12px; margin-bottom: 20px; font-size: 12px; }
    #lexi .rule-swatch { display: grid; place-items: center; width: 35px; height: 35px; color: #fff; border-radius: 3px; font-weight: 700; }
    #lexi .rule-swatch.correct { background: #4d9b72; }
    #lexi .rule-swatch.present { background: #d5a83d; }
    #lexi .rule-swatch.absent { background: #838b85; }
    #lexi .reveal .tile { animation: flip-in .35s ease both; }
    #lexi .reveal .tile:nth-child(2) { animation-delay: .055s; }
    #lexi .reveal .tile:nth-child(3) { animation-delay: .11s; }
    #lexi .reveal .tile:nth-child(4) { animation-delay: .165s; }
    #lexi .reveal .tile:nth-child(5) { animation-delay: .22s; }
    #lexi .shake { animation: shake .25s ease; }
    @keyframes flip-in { from { transform: rotateX(75deg); opacity: .3; } to { transform: rotateX(0); opacity: 1; } }
    @keyframes shake { 25%,75% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
    @media (min-width: 1200px) { #lexi .play-area { padding-top: 40px; padding-bottom: 50px; } }
    @media (max-width: 740px) { #lexi .topbar { padding: 10px 16px; gap: 9px; } #lexi .play-area { min-height: calc(100dvh - 112px); } }
    @media (max-width: 580px) {
      #lexi .match-score { flex-basis: 100%; max-width: none; }
      #lexi .duel .player-name { flex: initial; }
      #lexi .duel .tile { border-radius: 2px; }
      #lexi .round-notice .lobby-primary { width: 100%; }
    }
    @media (max-width: 480px) {
      #lexi .topbar { gap: 8px; padding: 10px 12px; }
      #lexi .brand { font-size: 23px; }
      #lexi .settings-button { font-size: 11px; padding: 5px 7px; gap: 5px; }
      #lexi .header-nickname { max-width: 60px; font-size: 11px; }
      #lexi .play-area { padding: 22px 13px 30px; align-content: start; }
      #lexi .game-shell { padding: 20px 13px; }
      #lexi .welcome h1 { font-size: 29px; }
      #lexi .background-choice { padding: 5px 7px; min-height: 37px; }
      #lexi .board-wrap { width: min(100%, 278px); }
      #lexi .key { font-size: 12px; height: 47px; }
      #lexi .key.wide { font-size: 10px; }
      #lexi .keys.middle { padding: 0 13px; }
      #lexi .settings-panel { top: 16px; right: 14px; max-height: calc(100dvh - 32px); padding: 19px; }
      #lexi .proposal-person { padding: 13px; }
      #lexi .proposal-person strong { font-size: 19px; }
      #lexi .match-subtitle { line-height: 1.5; }
      #lexi .match-heading { gap: 7px; flex-wrap: wrap; }
      #lexi .match-actions { margin-left: auto; }
    }
    #lexi .game-shell.picking { width: min(100%, 820px); padding: 38px 30px; }
    #lexi .game-picker { text-align: center; }
    #lexi .picker-welcome { margin: 0 0 12px; color: #52715e; font-size: 13px; overflow-wrap: anywhere; }
    #lexi .game-picker h1 { margin: 0; font-size: clamp(25px, 4vw, 38px); letter-spacing: -.045em; }
    #lexi .picker-copy { margin: 12px 0 30px; font-size: 14px; color: #637268; }
    #lexi .variant-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    #lexi .variant-card { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 24px 12px 16px; border: 1px solid #d9e3d7; border-radius: 12px; background: #f7f9f4; color: #233b2d; transition: border-color .15s, transform .15s, background .15s; }
    #lexi .variant-card:hover { transform: translateY(-3px); border-color: #4d9b72; background: #edf5e9; }
    #lexi .variant-card strong { margin: 22px 0 7px; font-size: 20px; letter-spacing: -.035em; }
    #lexi .variant-card > span:not(.variant-art) { font-size: 12px; color: #637268; }
    #lexi .variant-art { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 5px; width: 120px; height: 98px; }
    #lexi .variant-art-mono { grid-template-columns: 1fr; width: 90px; }
    #lexi .mini-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
    #lexi .mini-board i { aspect-ratio: 1; border-radius: 2px; background: #dce6d8; }
    #lexi .mini-board i:nth-child(3n) { background: #d5a83d; }
    #lexi .mini-board i:nth-last-child(-n+5) { background: #4d9b72; }
    #lexi .variant-chances { display: flex; width: 100%; justify-content: space-between; border-top: 1px solid #dce5d9; margin-top: 22px; padding-top: 15px; }
    #lexi .picker-foot { margin: 27px 0 0; color: #6b766e; font-size: 12px; line-height: 1.6; }
    #lexi .game-shell.multi { width: min(100%, 650px); }
    #lexi .game-shell.multi.duel { width: min(100%, 1100px); }
    #lexi .multi .board-wrap { width: 100%; }
    #lexi .word-boards { display: grid; grid-template-columns: minmax(0, 1fr); }
    #lexi .multi .word-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
    #lexi .word-board { min-width: 0; }
    #lexi .word-heading { display: flex; justify-content: space-between; gap: 4px; margin: 0 auto 8px; font-size: 11px; color: #69786c; max-width: 252px; }
    #lexi .is-solved .word-heading { color: #287047; font-weight: 650; }
    #lexi .solved-count { font-size: 11px; color: #52745c; margin: -3px 0 17px; }
    #lexi .multi .board { max-width: 252px; margin: 0 auto; gap: 4px; }
    #lexi .multi .row { gap: 4px; }
    #lexi .multi .tile { font-size: clamp(15px, 2vw, 22px); }
    #lexi .multi[data-variant="quadra"] .board, #lexi .multi[data-variant="quadra"] .word-heading { max-width: 190px; }
    #lexi .multi.duel .board, #lexi .multi.duel .word-heading { max-width: 190px; }
    #lexi .multi .boards-viewport { overflow-x: auto; padding: 4px; scrollbar-width: thin; scrollbar-color: #b5c8b8 #f4f7f2; }
    #lexi .multi.duel .boards { min-width: 580px; gap: 28px; }
    #lexi .multi .keyboard { max-width: 480px; position: sticky; bottom: 0; z-index: 2; background: #fff; padding: 12px 0 8px; border-radius: 8px; }
    #lexi .guess-proxy { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: text; }
    #lexi .key { position: relative; }
    #lexi .key-colors { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: inherit; background: #fff; }
    #lexi .key-colors.colors-4 { grid-template-rows: repeat(2, 1fr); }
    #lexi .key-segment.unknown { background: var(--key); }
    #lexi .key-segment.correct { background: var(--correct); }
    #lexi .key-segment.present { background: var(--present); }
    #lexi .key-segment.absent { background: var(--absent); }
    #lexi .key-letter { position: relative; }
    #lexi .split-key .key-letter { display: inline-grid; place-items: center; min-width: 17px; min-height: 21px; padding: 1px 3px; border-radius: 3px; background: #fffffff0; color: #17211d; font-size: 12px; }
    #lexi .answers { display: flex; flex-wrap: wrap; gap: 5px 18px; }
    #lexi .answer small { font-size: 10px; color: #6a7c6e; }
    @media (max-width: 580px) {
      #lexi .game-shell.picking { padding: 26px 13px; }
      #lexi .variant-options { gap: 7px; }
      #lexi .variant-card { padding: 18px 5px 12px; border-radius: 7px; }
      #lexi .variant-card strong { font-size: clamp(11px, 3.1vw, 17px); margin-top: 13px; white-space: nowrap; }
      #lexi .variant-art { width: 65px; height: 61px; gap: 3px; }
      #lexi .variant-art-mono { width: 55px; }
      #lexi .variant-card > span:not(.variant-art) { font-size: 10px; }
      #lexi .variant-chances { margin-top: 14px; padding-top: 12px; }
      #lexi .multi .word-boards { gap: 18px 10px; }
      #lexi .multi .board, #lexi .multi .row { gap: 3px; }
      #lexi .multi .tile { border-width: 1px; font-size: 15px; }
      #lexi .multi.duel .current-row .tile { font-size: 17px; }
      #lexi .multi .player-heading { min-height: 0; }
      #lexi .multi.duel .player-heading { flex-direction: row; align-items: center; }
      #lexi .multi.duel .player-name { width: auto; }
      #lexi .multi .keyboard { margin-top: 15px; }
    }
    /* Keep multiword rounds inside the viewport, with a square active row. */
    #lexi .play-area:has(.multi .boards) { padding: 10px 20px; min-height: calc(100dvh - 68px); }
    #lexi .game-shell.multi:has(.boards) { padding: 12px 18px; }
    #lexi .multi:has(.boards) .match-heading { padding-bottom: 6px; margin-bottom: 6px; }
    #lexi .multi .match-hud { padding: 4px 0; margin-bottom: 8px; row-gap: 5px; }
    #lexi .multi .player-heading { margin-bottom: 4px; min-height: 0; font-size: 12px; }
    #lexi .multi .player-avatar { width: 22px; height: 22px; }
    #lexi .multi .solved-count { margin: 0 0 6px; font-size: 10px; }
    #lexi .multi .word-heading { margin-bottom: 4px; font-size: 10px; }
    #lexi .multi .word-boards { gap: 8px 16px; align-items: start; }
    #lexi .multi .board { gap: 2px; }
    #lexi .multi .tile { aspect-ratio: auto; height: var(--resting-row-height, 16px); min-height: 0; border-width: 1px; font-size: clamp(8px, calc(var(--resting-row-height, 16px) - 3px), 15px); }
    #lexi .multi .current-row .tile { height: auto; aspect-ratio: 1; font-size: clamp(15px, 2vw, 22px); }
    #lexi .multi .board-count { margin-top: 5px; font-size: 10px; }
    #lexi .multi .keyboard { position: static; margin-top: 10px; padding: 0; gap: 4px; }
    #lexi .multi .key { height: 38px; }
    #lexi .multi:has(.boards) .footer { display: none; }
    @media (max-height: 800px) {
      #lexi .multi .key { height: 34px; }
      #lexi .multi[data-variant="quadra"] .board, #lexi .multi[data-variant="quadra"] .word-heading { max-width: 160px; }
    }
    @media (max-width: 580px) {
      #lexi .play-area:has(.multi .boards) { padding: 8px 12px; min-height: 0; }
      #lexi .game-shell.multi:has(.boards) { padding: 10px; }
      #lexi .multi .word-boards { gap: 8px; }
      #lexi .multi .match-hud { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; font-size: 10px; }
      #lexi .multi .match-score { grid-column: 1 / -1; grid-row: 2; }
      #lexi .multi .turn-status { font-size: 10px; padding: 4px 6px; }
    }
    @media (max-width: 580px) and (max-height: 740px) {
      #lexi:has(.multi .boards) .topbar { padding: 6px 10px; gap: 4px; }
      #lexi:has(.multi .boards) .meta { gap: 5px; }
      #lexi:has(.multi .boards) .topbar [data-action="settings"] { font-size: 0; width: 32px; padding: 0; justify-content: center; }
      #lexi:has(.multi .boards) .topbar .settings-button { min-height: 32px; }
      #lexi:has(.multi .boards) .background-choice { min-height: 30px; }
      #lexi .play-area:has(.multi .boards) { padding: 5px 8px; }
      #lexi .game-shell.multi:has(.boards) { padding: 7px; }
      #lexi .multi .match-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
      #lexi .multi .match-heading strong { font-size: 11px; }
      #lexi .multi .match-subtitle { font-size: 9px; line-height: 1.35; }
      #lexi .multi .match-actions { gap: 3px; }
      #lexi .multi .match-actions .text-action { font-size: 10px; padding: 4px 5px; min-height: 30px; }
      #lexi .multi .keyboard { margin-top: 7px; gap: 3px; }
      #lexi .multi .key { height: 30px; }
    }
    @media (max-height: 620px) {
      #lexi .multi:has(.boards) .match-subtitle { display: none; }
      #lexi .multi.duel .match-hud { display: flex; flex-wrap: nowrap; margin-bottom: 4px; }
      #lexi .multi.duel .match-hud > span:first-child { display: none; }
      #lexi .multi.duel .match-score { flex: 1 1 0; gap: 4px; max-width: none; font-size: 10px; }
      #lexi .multi.duel .turn-status { padding: 3px; font-size: 9px; }
      #lexi .multi.duel .player-heading { display: none; }
      #lexi .multi .word-heading { margin-bottom: 2px; }
      #lexi .multi .key { height: 28px; }
    }
    @media (prefers-reduced-motion: reduce) { #lexi *, #lexi *::before, #lexi *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
  
