.header nav { gap: 26px; }
.main { max-width: 1400px; }
.arena-entry { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; padding: 44px 48px; border: 1px solid #3b4836; border-radius: 18px; background: radial-gradient(ellipse at 95% 10%, #3c4c294a, transparent 65%), #182019; overflow: hidden; }
.arena-entry .welcome { width: auto; text-align: left; max-width: 530px; }
.arena-entry .welcome .eyebrow { justify-content: flex-start; font-size: 9px; letter-spacing: 1.4px; }
.arena-entry .welcome h2 { font-size: clamp(30px, 3.3vw, 49px); line-height: 1.12; letter-spacing: -1.5px; margin: 18px 0; }
.arena-entry .welcome-copy { line-height: 1.8; color: #b0bca2; max-width: 450px; }
.arena-entry form { max-width: 430px; margin-top: 25px; }
.arena-entry .welcome label { font-size: 10px; }
.matchmaking-button { width: 100%; justify-content: space-between; margin-top: 13px; min-height: 71px; padding: 13px 18px; text-align: left; font-size: 16px; }
.matchmaking-button > svg { width: 23px; height: 23px; }
.matchmaking-button > span:nth-child(2) { flex: 1; padding-left: 5px; }
.matchmaking-button small { display: block; font-size: 10px; font-weight: 400; margin-top: 5px; color: #50452f; }
.matchmaking-button > span:last-child { font-size: 24px; font-weight: 400; }
.entry-actions > .button { flex: 1; }
.matchmaking-message { padding: 12px 14px; background: #263023; border: 1px solid #566846; color: #d5debe; border-radius: 7px; font-size: 12px; line-height: 1.65; margin: 10px 0 0; }
.entry-bottom { display: flex; align-items: center; gap: 24px; margin-top: 22px; max-width: 430px; justify-content: space-between; }
.entry-bottom .practice-button { margin: 0; justify-content: flex-start; font-size: 12px; }
.entry-bottom a { color: #abb89a; font-size: 11px; white-space: nowrap; }
.entry-bottom a:hover { color: var(--amber); }
.arena-art { position: relative; min-width: 0; align-self: center; justify-self: center; width: min(100%, 380px); padding: 24px 16px 35px; }
.arena-art-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; transform: rotate(-7deg); }
.arena-art-grid > img, .art-tile { width: 100%; aspect-ratio: 1; border-radius: 18px; border: 1px solid #bbcba74f; object-fit: cover; box-shadow: 0 12px 22px #0004; }
.art-tile { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; background: #eab464; color: #302b1c; font-size: 19px; line-height: 1.12; font-weight: 800; letter-spacing: -.4px; }
.art-tile svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.art-tag { display: block; text-align: center; margin-top: 33px; color: #a8b78f; font-size: 10px; letter-spacing: .5px; }
.art-badge { position: absolute; right: -1px; top: 3px; background: #d4e3b1; color: #314124; padding: 14px 18px; font-size: 10px; font-weight: 800; letter-spacing: 1px; line-height: 1.5; border-radius: 8px; transform: rotate(5deg); box-shadow: 0 4px 12px #0005; }
.workspace { grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; }
.metrics .metric { padding: 16px 19px; min-height: 113px; }
.metrics .metric-value { font-size: 33px; margin-top: 9px; }
#canvas-wrap:has(#lobby-card:not([hidden])) { display: block; }
#canvas-wrap:has(#lobby-card:not([hidden])) > canvas { display: none; }
.stage-overlay:has(#lobby-card:not([hidden])) { width: 100%; min-height: 535px; padding: 28px 22px; }
#lobby-card { max-width: 100%; }
.arena-footer .text-button { font-size: 11px; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; }
.arena-footer .text-button svg { width: 16px; height: 16px; }
.arena-rules { margin: 54px 0 12px; padding-top: 35px; border-top: 1px solid #364330; display: grid; grid-template-columns: 260px 1fr; gap: 30px; }
.rules-heading .eyebrow { font-size: 9px; line-height: 1.6; }
.rules-heading h2 { font-size: 26px; font-weight: 500; letter-spacing: -.7px; margin: 14px 0; line-height: 1.3; }
.rules-heading > p:last-child { font-size: 12px; line-height: 1.8; color: #a6b295; margin: 0; }
.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.rules-grid article { position: relative; border-left: 1px solid #3b4a32; padding-left: 21px; }
.rules-grid svg { display: block; width: 27px; height: 27px; fill: none; stroke: var(--amber); stroke-width: 1.4; margin: 3px 0 20px; }
.rule-number { position: absolute; top: 4px; right: 0; font-size: 11px; color: #728361; }
.rules-grid h3 { font-size: 16px; font-weight: 500; letter-spacing: -.3px; margin: 0 0 12px; }
.rules-grid p { font-size: 11px; line-height: 1.85; margin: 0; color: #a6b295; }
.arena-rules .keyboard-help { grid-column: 1 / -1; margin: 0; background: #172017; padding: 15px 19px; border: 1px solid #34442e; border-radius: 8px; }
.keyboard-help summary { cursor: pointer; font-size: 12px; color: #bdcaa9; }
.keyboard-help summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.battle-image-note { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; background: #293722; border: 1px solid #4b6239; border-radius: 8px; padding: 16px; }
.battle-image-note svg { width: 29px; height: 29px; color: var(--amber); fill: none; stroke: currentColor; stroke-width: 1.5; }
.battle-image-note strong { font-size: 13px; font-weight: 500; }
.battle-image-note p { font-size: 11px; line-height: 1.6; color: #aebd99; margin: 6px 0 0; }
.public-lobby-option { margin-top: 18px; }
.public-lobby-option small { display: block; font-size: 10px; line-height: 1.6; margin-top: 3px; color: #a7b596; }
#auth-dialog { width: min(900px, 94vw); max-width: 900px; padding: 0; border-radius: 18px; position: fixed; inset: 0; margin: auto; height: fit-content; background: #192219; border-color: #516641; }
.auth-layout { display: grid; grid-template-columns: 38% 1fr; min-height: 565px; }
.auth-close { position: absolute; right: 17px; top: 13px; z-index: 1; border: 0; background: #293625; color: #c6d0b7; border-radius: 6px; width: 32px; height: 32px; font-size: 21px; }
.auth-story { background: radial-gradient(ellipse at 0 45%, #43552c88, transparent 80%), #263323; padding: 35px 30px; border-right: 1px solid #425639; display: flex; flex-direction: column; align-items: flex-start; }
.auth-brand { display: flex; align-items: center; gap: 8px; color: var(--amber); font-size: 15px; font-weight: 800; letter-spacing: -.5px; }
.auth-brand svg { width: 25px; height: 25px; }
.auth-art { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; transform: rotate(-7deg); width: 137px; margin: 42px auto 33px; align-self: center; }
.auth-art > span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: #77996a; border: 1px solid #d0e4b458; }
.auth-art > span:nth-child(2) { background: #d4e4b0; border-radius: 12px 29px 12px 12px; }
.auth-art > span:nth-child(3) { background: #b2d195; border-radius: 12px 12px 29px 12px; }
.auth-art > span:nth-child(4) { background: var(--amber); }
.auth-art svg { width: 29px; height: 29px; color: #334229; }
.auth-story h2 { font-size: 26px; font-weight: 500; line-height: 1.25; letter-spacing: -.8px; margin: 0 0 14px; }
.auth-story > p { font-size: 12px; line-height: 1.8; color: #acbd96; margin: 0; }
.auth-story ul { list-style: none; padding: 0; margin: 28px 0; }
.auth-story li { display: flex; gap: 8px; align-items: center; font-size: 11px; line-height: 1.7; margin: 12px 0; color: #ccd8bc; }
.auth-story li svg { width: 14px; height: 14px; color: #bed48e; fill: none; stroke: currentColor; stroke-width: 2; }
.auth-story-note { margin-top: auto; padding-top: 22px; border-top: 1px solid #4c623a; font-size: 10px; color: #a0b38a; width: 100%; }
.auth-content { padding: 41px 40px 33px; min-width: 0; }
.auth-content .eyebrow { font-size: 9px; letter-spacing: 1.3px; padding-right: 15px; }
.auth-content > h2 { font-size: 28px; line-height: 1.25; margin: 12px 0; letter-spacing: -.8px; }
.auth-intro { font-size: 12px; color: #a6b696; line-height: 1.65; margin: 0 0 23px; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px; border: 1px solid #394e31; border-radius: 8px; background: #131d13; margin-bottom: 24px; }
.auth-switch button { min-height: 39px; font-size: 12px; border-radius: 5px; }
.auth-switch .current { background: #33462a; border-color: #556d42; }
#auth-form label { display: block; margin-bottom: 17px; font-size: 12px; }
#auth-form label > small { display: block; font-size: 10px; color: #90a27e; margin-top: 7px; }
.auth-steps { display: flex; gap: 20px; font-size: 10px; color: #7f9371; margin: -5px 0 17px; }
.auth-steps .current { color: var(--amber); }
.auth-preview { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #425c35; border-radius: 9px; background: #253420; margin-bottom: 20px; }
#auth-preview-avatar { width: 43px; height: 43px; border-radius: 10px; background: #9d7841; color: #ffe4b8; display: grid; place-items: center; font-size: 17px; font-weight: 700; flex-shrink: 0; }
.auth-preview > div { min-width: 0; flex: 1; }
.auth-preview strong { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.auth-preview small { display: block; font-size: 10px; color: #a9bd94; margin-top: 5px; overflow-wrap: anywhere; }
.auth-preview > span:last-child { font-size: 9px; color: #baca9d; }
.password-input { position: relative; }
.password-input input { padding-right: 80px; }
.password-input > button { position: absolute; right: 5px; top: 6px; min-height: 32px; border: 0; background: #2c3c26; padding: 7px 9px; font-size: 10px; border-radius: 4px; color: #c6d7ae; }
.password-status { color: #a9b697; font-size: 10px; line-height: 1.6; margin: -5px 0 18px; }
.password-status.ready { color: #c2db98; }
.auth-back, .auth-recover-link { display: block; min-height: 34px; font-size: 11px; color: #b2c39d; text-align: center; margin: 9px auto 0; }
.auth-content #recovery-panel h3 { font-size: 21px; font-weight: 500; letter-spacing: -.4px; margin: 18px 0 14px; }
.auth-content #recovery-panel > p { font-size: 12px; }
.account-success { width: 50px; height: 50px; display: grid; place-items: center; background: #405c2a; border: 1px solid #839e56; border-radius: 50%; color: #d6e9aa; }
.account-success svg { width: 25px; height: 25px; }
#recovery-panel .button { margin: 8px 0; font-size: 12px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
  .arena-entry { padding: 35px 32px; gap: 28px; }
  .arena-rules { grid-template-columns: 1fr; gap: 24px; }
  .rules-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 30px; align-items: center; }
  .rules-heading .eyebrow { grid-column: 1 / -1; margin: 0; }
  .rules-heading h2 { margin: 0; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { display: block; }
  .rule-note { display: none; }
  .arena-entry { gap: 18px; grid-template-columns: 1.2fr 1fr; }
  .art-badge { font-size: 8px; padding: 10px 13px; }
  .art-tile { font-size: 14px; gap: 12px; }
  .art-tag { font-size: 8px; }
  .entry-bottom { gap: 10px; }
  .entry-bottom a { font-size: 10px; }
  .entry-bottom .practice-button { flex-wrap: wrap; gap: 7px; font-size: 11px; }
}
@media (max-width: 760px) {
  .header nav { gap: 10px; justify-content: flex-start; }
  .header nav .nav-button { flex: 1; text-align: center; }
  .main { margin-top: 26px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading h1 { font-size: 22px; line-height: 1.4; }
  .arena-entry { display: block; padding: 27px 24px; border-radius: 13px; }
  .arena-entry .welcome { max-width: none; }
  .arena-entry .welcome h2 { font-size: 34px; }
  .arena-entry .welcome-copy { font-size: 12px; }
  .arena-entry .welcome .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .arena-art { display: none; }
  .entry-bottom .practice-button { font-size: 11px; }
  .entry-bottom a { font-size: 10px; }
  .matchmaking-button { font-size: 15px; }
  .entry-actions .button { font-size: 12px; padding: 10px; }
  .rules-heading { display: block; }
  .rules-heading h2 { font-size: 25px; margin: 14px 0; }
  .arena-rules { margin-top: 34px; padding-top: 28px; }
  .rules-grid { grid-template-columns: 1fr; gap: 24px; }
  .rules-grid article { padding-left: 53px; border-left: 0; }
  .rules-grid svg { position: absolute; left: 0; top: 0; margin: 0; }
  .rules-grid h3 { padding-right: 25px; margin-bottom: 8px; }
  .rules-grid p { font-size: 12px; }
  .metrics .metric { padding: 13px 10px; min-height: 102px; }
  .metrics .metric-value { font-size: 26px; }
  .arena-footer { gap: 9px; }
  .arena-footer > span { flex-basis: 100%; }
  .arena-footer .zoom-controls { margin-left: 0; margin-right: auto; }
  .auth-layout { display: block; min-height: 0; }
  .auth-story { display: block; padding: 22px 24px; border-right: 0; border-bottom: 1px solid #425639; }
  .auth-brand { font-size: 13px; }
  .auth-story h2 { font-size: 21px; margin: 15px 0 0; }
  .auth-story h2 br { display: none; }
  .auth-story > p, .auth-story ul, .auth-art, .auth-story-note { display: none; }
  .auth-content { padding: 27px 24px; }
  .auth-content > h2 { font-size: 26px; }
  .auth-intro { margin-bottom: 18px; }
  .auth-preview > span:last-child { display: none; }
  .auth-close { right: 12px; top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .timer-track > span, .puzzle-card { transition: none; }
}
