/* Production layout: the board is the fixed center of the viewport. */
body.clear-focus{--focus-board:clamp(260px,calc((100svh - 170px)/2),600px);--focus-gap:clamp(28px,4.5vw,90px);min-height:100svh;overflow-x:clip;-webkit-font-smoothing:antialiased}
.clear-focus .shell{width:calc(100% - 80px);max-width:none;margin:0 auto}
html[data-theme] .clear-focus .site-header{height:76px;position:relative;padding:0;align-items:center}
.clear-focus .brand{font-family:'Outfit',sans-serif;font-weight:600;letter-spacing:-.7px}
.clear-focus .header-center{position:absolute;left:50%;transform:translateX(-50%);font:15px 'Outfit',sans-serif;letter-spacing:2.5px;color:var(--muted);white-space:nowrap}
.clear-focus .header-center i{font-style:normal;margin:0 12px;opacity:.45}
html[data-theme] .clear-focus .header-actions{gap:16px;margin:0!important;min-width:0;flex-shrink:0}
.clear-focus .icon-button{color:var(--muted)}
.clear-focus .theme-control{height:32px;box-shadow:none}
.clear-focus .theme-control select{width:135px;font-size:15px}
.clear-focus .theme-chevron{top:3px}
html[data-theme] .clear-focus .game-layout{grid-template-columns:minmax(220px,1fr) var(--focus-board) minmax(220px,1fr);gap:var(--focus-gap);align-items:center;padding:0;min-height:calc(100svh - 122px);justify-content:stretch}
.clear-focus .intro,.clear-focus .dashboard{width:100%;max-width:238px;min-width:0;padding:0}
.clear-focus .intro{justify-self:end}
.clear-focus .dashboard{justify-self:start}
.clear-focus .intro .eyebrow{font:15px 'Outfit',sans-serif;letter-spacing:1.4px;gap:7px}
.clear-focus .theme-number{font-size:15px;letter-spacing:.8px}
html[data-theme] .clear-focus .intro h1{font-family:'Pretendard',sans-serif;font-size:27px;font-weight:650;line-height:1.3;letter-spacing:-1.2px;margin:10px 0 6px;text-shadow:none;font-style:normal}
.clear-focus .intro-copy{font-size:15px;line-height:1.5;margin:0 0 23px;text-shadow:none!important}
.clear-focus .theme-collection>.section-label{font-size:15px;letter-spacing:1.4px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.clear-focus .theme-list{display:grid;gap:3px;margin:9px 0 22px}
.clear-focus .theme-option{display:grid;grid-template-columns:21px 22px minmax(0,1fr);align-items:center;gap:9px;min-width:0;min-height:33px;padding:5px 7px;text-align:left;border:1px solid transparent;border-radius:min(var(--button-radius),5px);background:transparent;color:var(--muted);transition:background .15s,border-color .15s}
.clear-focus .theme-option:hover{background:var(--surface-soft);color:var(--text)}
.clear-focus .theme-option[aria-pressed="true"]{background:var(--surface);border-color:color-mix(in srgb,var(--lime) 60%,var(--line));color:var(--text)}
.clear-focus .theme-index{font:15px 'Outfit',sans-serif;opacity:.65}
.clear-focus .theme-option .theme-swatch{width:21px;height:22px;border-radius:3px;border:1px solid #ffffff25;background:linear-gradient(140deg,var(--swatch-a),var(--swatch-b));box-shadow:inset 0 1px 0 #ffffff25}
.clear-focus .theme-option[data-theme="aurora"]{--swatch-a:#9decdd;--swatch-b:#455b8a}
.clear-focus .theme-option[data-theme="paper"]{--swatch-a:#f2eadd;--swatch-b:#b44a35}
.clear-focus .theme-option[data-theme="obsidian"]{--swatch-a:#d5b578;--swatch-b:#2d291f}
.clear-focus .theme-option[data-theme="chrome"]{--swatch-a:#d6e3f0;--swatch-b:#136eed}
.clear-focus .theme-option[data-theme="soft"]{--swatch-a:#ead4c3;--swatch-b:#b38bad}
.clear-focus .theme-option[data-theme="jade"]{--swatch-a:#d7ddc5;--swatch-b:#49765d}
.clear-focus .theme-option[data-theme="noir"]{--swatch-a:#e6bb7a;--swatch-b:#253d4a}
.clear-focus .theme-option[data-theme="ocean"]{--swatch-a:#7fe8f1;--swatch-b:#124a83}
.clear-focus .theme-option[data-theme="kinetic"]{--swatch-a:#f88b40;--swatch-b:#283527}
.clear-focus .theme-option[data-theme="arena"]{--swatch-a:#5caaff;--swatch-b:#ee778e}
.clear-focus .theme-option[data-theme="resonance"]{--swatch-a:#c7f6ff;--swatch-b:#03101f}
.clear-focus .theme-label{min-width:0;font-size:15px;letter-spacing:-.15px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.clear-focus .mode-section{max-width:none}
.clear-focus .mode-section>.section-label{font-size:15px;letter-spacing:1.1px}
.clear-focus .mode-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;margin:10px 0 8px;padding:3px}
.clear-focus .mode-tabs button{font-size:15px;padding:8px 9px;gap:5px}
.clear-focus .mode-tabs [data-mode="cheat"]{grid-column:1/-1}
.clear-focus .mode-tabs [data-mode="cheat"] span{font-size:15px}
.clear-focus .mode-section p{font-size:15px;line-height:1.6;text-shadow:none!important}
html[data-theme] .clear-focus .battle-link{position:static;margin:10px 0 0;padding:10px 12px;font-size:15px}
.clear-focus .personal-best{margin-top:17px;padding-top:13px;gap:10px;text-shadow:none!important}
.clear-focus .personal-best svg{width:18px;height:18px}
.clear-focus .personal-best div span{font-size:15px}
.clear-focus .personal-best strong{font:20px 'Outfit',sans-serif;letter-spacing:.5px}
.clear-focus .best-unit{font-size:15px}
.clear-focus .mode-hint{font-size:15px!important;line-height:1.5!important;text-align:left;margin:8px 0 0}
.clear-focus .play-area{width:var(--focus-board);min-width:0;position:relative;grid-column:auto}
.clear-focus .board-topline{height:25px;font-size:15px;letter-spacing:1.5px}
.clear-focus .board-topline>span:last-child{font-size:15px}
.clear-focus .board-frame{width:100%;aspect-ratio:1/2}
.clear-focus .board-bottomline{height:23px;margin:0;align-items:flex-end;font-size:15px}
.clear-focus .board-bottomline button{font-size:15px}
.clear-focus .board-bottomline kbd{font-size:15px;padding:1px 4px}
.clear-focus .board-frame.shake{animation:none;transform:none}
.clear-focus .score-card{padding:0 0 19px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none}
html[data-theme] .clear-focus .score-card strong{font:450 43px/1.2 'Outfit',sans-serif;letter-spacing:1px;color:var(--text);margin:9px 0 8px}
.clear-focus .score-caption{font-size:15px}
.clear-focus .score-card.pulse strong{animation:none}
.clear-focus .metrics{margin:20px 0 12px;gap:18px}
html[data-theme] .clear-focus .metrics strong{font:24px 'Outfit',sans-serif;margin-top:6px}
.clear-focus .metrics>div+div{padding-left:18px}
.clear-focus .level-track{height:2px}
.clear-focus .level-caption{font-size:15px;margin-top:7px}
.clear-focus .piece-card{padding:14px 16px;box-shadow:none}
.clear-focus .next-card{margin-top:22px}
.clear-focus .next-card canvas{height:240px;object-fit:contain}
.clear-focus .hold-card{margin-top:13px;padding-top:13px;padding-bottom:10px}
.clear-focus .hold-card canvas{height:62px;object-fit:contain}
.clear-focus .hold-caption{font-size:15px}
.clear-focus .time-card{padding:17px 1px}
.clear-focus .time-card>span:last-child{font-size:15px}
.clear-focus .footer{height:46px;min-height:46px;font-size:15px}
.clear-focus .footer-note{font-size:15px;letter-spacing:1.6px}
.clear-focus .keyboard-guide{font-size:15px;gap:16px}
.clear-focus .overlay-content{padding:24px}
.clear-focus .overlay-content h2{font-size:clamp(37px,3.6vw,58px)}
.clear-focus .overlay-content p{font-size:15px}
.clear-focus .overlay-content .primary-button{max-width:230px}
html[data-theme] .clear-focus .event-toast,.clear-focus .battle-event{position:absolute;left:0;right:0;top:0;max-height:24px;overflow:hidden;padding:0;text-align:left;font:600 15px/1.5 'Outfit','Pretendard',sans-serif;letter-spacing:.7px;color:var(--lime);text-shadow:none;pointer-events:none;white-space:nowrap;text-overflow:ellipsis;opacity:0;z-index:3;transform:none}
.clear-focus .event-toast.show,.clear-focus .battle-event.show{animation:focus-toast 2200ms linear forwards}
.clear-focus .play-area:has(.event-toast.show) .board-topline,.clear-focus .own-player:has(.battle-event.show) .player-heading{opacity:0}
@keyframes focus-toast{0%,78%{opacity:1;transform:none}100%{opacity:0;transform:none}}
.clear-focus .setting-row select{font:15px 'Pretendard',sans-serif;border:1px solid var(--line);border-radius:var(--button-radius);color:var(--text);background:var(--surface-strong);padding:8px 10px;max-width:120px;min-width:0;margin-left:14px}
.clear-focus select:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
.clear-focus .modal{max-height:calc(100svh - 40px);overflow-y:auto}

/* Battle keeps the main board centered; the rival and own previews share the right rail. */
body.clear-focus.battle-page{--duel-size:clamp(220px,calc((100svh - 224px)/2),540px)}
.clear-focus .battle-message{margin:0;min-height:44px;display:flex;align-items:center;border:0;border-radius:0;border-bottom:1px solid var(--line);background:transparent;font-size:15px;padding:8px 0}
.clear-focus .battle-layout{grid-template-columns:minmax(220px,1fr) var(--duel-size) minmax(220px,1fr);gap:var(--focus-gap);align-items:center;padding:0;min-height:calc(100svh - 148px)}
.clear-focus .battle-lobby{justify-self:end;width:100%;max-width:238px;max-height:calc(100svh - 156px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;gap:12px;padding:12px 3px 12px 0}
.clear-focus .battle-heading{display:block;margin:0 0 5px}
html[data-theme] .clear-focus .battle-heading h1{font-size:23px;line-height:1.35;letter-spacing:-.7px;margin:8px 0 0}
.clear-focus .battle-heading .eyebrow{font-size:15px;letter-spacing:1px;margin:0}
.clear-focus .battle-tag{display:none}
.clear-focus .lobby-card{padding:13px;border-radius:var(--radius);box-shadow:none}
.clear-focus .lobby-card .section-label{font-size:15px;letter-spacing:1.1px}
.clear-focus .lobby-card strong{font-size:16px;margin-top:10px}
.clear-focus .lobby-card p{font-size:15px;margin:8px 0 10px;line-height:1.65}
.clear-focus .lobby-card .primary-button{font-size:15px;margin-top:10px;padding:10px 12px}
.clear-focus .lobby-card .secondary-button{font-size:15px;margin-top:7px;padding:9px}
.clear-focus .lobby-card label{font-size:15px;margin-top:12px}
.clear-focus .room-card #room-code{font-size:26px;letter-spacing:3px}
.clear-focus .battle-rules{font-size:15px;padding:0 2px}
.clear-focus .battle-handling .setting-row{padding:10px 0 12px}
.clear-focus .battle-handling .setting-row strong{font-size:15px}
.clear-focus .battle-handling .setting-row small{font-size:15px;line-height:1.5;max-width:125px;margin-top:4px}
.clear-focus .battle-handling select{font-size:15px;padding:6px 7px;margin-left:8px}
.clear-focus .own-player{position:relative;width:var(--duel-size);min-width:0}
.clear-focus .player-heading{height:34px;min-height:34px;padding-bottom:8px;grid-template-columns:auto minmax(0,1fr) auto;gap:7px}
.clear-focus .player-heading>span:last-child{grid-column:auto;font-size:15px;white-space:nowrap}
.clear-focus .player-heading strong{font-size:15px}
.clear-focus .player-label{font-size:15px}
.clear-focus .battle-stats{height:42px;padding:8px 0 0;gap:12px}
.clear-focus .battle-stats>div{display:flex;align-items:baseline;gap:8px}
.clear-focus .battle-stats span{font-size:15px;white-space:nowrap}
.clear-focus .battle-stats strong{font-size:19px;margin:0;font-variant-numeric:tabular-nums}
.clear-focus .battle-side{justify-self:start;width:100%;max-width:238px;min-width:0;align-self:center}
.clear-focus .rival-player{width:min(100%,calc(var(--duel-size) * .62));margin:0 auto}
.clear-focus .rival-player .player-heading{grid-template-columns:auto 1fr;height:auto;min-height:34px;gap:4px 7px}
.clear-focus .rival-player .player-heading>span:last-child{grid-column:2}
.clear-focus .rival-player .battle-stats{gap:5px;height:auto;min-height:42px}
.clear-focus .rival-player .battle-stats>div{display:block}
.clear-focus .rival-player .battle-stats span{font-size:15px}
.clear-focus .rival-player .battle-stats strong{font-size:17px;margin-top:4px}
.clear-focus .battle-footnote{font-size:15px;margin:10px 0 0}
.clear-focus .battle-previews{margin-top:22px;gap:12px;grid-template-columns:1fr 1fr;align-items:start}
.clear-focus .battle-previews>section,.clear-focus .battle-previews>button{padding:12px 10px;box-shadow:none}
.clear-focus .battle-previews .section-label{font-size:15px;letter-spacing:1px}
.clear-focus .battle-previews #battle-next{height:190px;object-fit:contain}
.clear-focus .battle-previews #battle-hold-canvas{height:60px;object-fit:contain}
.clear-focus.battle-page .footer{height:28px;min-height:28px;margin:0;font-size:15px}
.clear-focus .battle-overlay>strong{font-size:clamp(34px,3.5vw,55px)}
.clear-focus .battle-overlay>p{font-size:15px}

@media(min-width:821px) and (max-height:810px){
  .clear-focus .theme-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 6px;margin:9px 0 20px}
  .clear-focus .theme-option{grid-template-columns:11px 17px minmax(0,1fr);gap:5px;min-height:35px;padding:5px 3px}
  .clear-focus .theme-option .theme-swatch{width:16px;height:21px}.clear-focus .theme-label{font-size:15px;letter-spacing:-.3px}.clear-focus .theme-index{font-size:15px}
  html[data-theme] .clear-focus .intro h1{font-size:24px}.clear-focus .intro-copy{margin-bottom:17px}
  .clear-focus .score-card{padding-bottom:13px}html[data-theme] .clear-focus .score-card strong{font-size:34px;margin:7px 0 5px}.clear-focus .score-caption{font-size:15px}
  .clear-focus .metrics{margin:13px 0 8px}html[data-theme] .clear-focus .metrics strong{font-size:22px;margin-top:4px}.clear-focus .level-caption{font-size:15px;margin-top:5px}
  .clear-focus .next-card{margin-top:15px}.clear-focus .piece-card{padding:11px 13px}.clear-focus .next-card canvas{height:185px}.clear-focus .hold-card{margin-top:10px;padding:10px 13px 8px}.clear-focus .hold-card canvas{height:49px}.clear-focus .hold-caption{font-size:15px}.clear-focus .time-card{padding:12px 0}
  .clear-focus .overlay-content h2{font-size:38px}.clear-focus .overlay-content p{font-size:15px}.clear-focus .overlay-symbol{margin-bottom:19px}
  .clear-focus .battle-previews{margin-top:15px}.clear-focus .battle-previews #battle-next{height:140px}.clear-focus .battle-previews #battle-hold-canvas{height:43px}.clear-focus .battle-footnote{display:none}
}
@media(max-width:1150px) and (min-width:821px){
  body.clear-focus{--focus-gap:28px}.clear-focus .shell{width:calc(100% - 48px)}.clear-focus .header-center{display:none}
  html[data-theme] .clear-focus .game-layout{grid-template-columns:minmax(170px,1fr) var(--focus-board) minmax(170px,1fr)}
  .clear-focus .battle-layout{grid-template-columns:minmax(170px,1fr) var(--duel-size) minmax(170px,1fr)}
  .clear-focus .theme-option{gap:5px}.clear-focus .theme-label{font-size:15px}.clear-focus .theme-list{grid-template-columns:1fr;gap:1px;margin-bottom:16px}.clear-focus .theme-option{grid-template-columns:13px 18px 1fr;min-height:28px;padding:3px 4px}.clear-focus .theme-option .theme-swatch{width:17px;height:20px}.clear-focus .mode-tabs button{font-size:15px;padding:7px}.clear-focus .keyboard-guide{gap:7px}
  .clear-focus .battle-stats span{font-size:15px}.clear-focus .battle-stats strong{font-size:17px}.clear-focus .battle-previews{gap:8px}.clear-focus .rival-player{width:100%}.clear-focus .battle-previews #battle-next{height:140px}
}
@media(max-width:820px){
  body.clear-focus{--focus-board:min(calc(100vw - 44px),calc((100svh - 220px)/2),410px);--focus-gap:20px;font-size:14px}
  .clear-focus .shell{width:calc(100% - 36px);max-width:650px}
  html[data-theme] .clear-focus .site-header{height:62px}.clear-focus .header-center,.clear-focus .brand-divider,.clear-focus .arcade{display:none}
  .clear-focus .brand{font-size:21px;gap:8px}html[data-theme] .clear-focus .header-actions{gap:12px}
  .clear-focus .icon-button>span:not(.help-icon){display:none}.clear-focus .icon-button svg{width:18px;height:18px}.clear-focus .gear{padding-left:0!important;border:0}
  html[data-theme] .clear-focus .theme-control{position:relative!important;inset:auto;height:29px;padding:0 7px;gap:5px}.clear-focus .theme-control select{width:105px;font-size:14px;padding:5px 13px 5px 0}.clear-focus .theme-chevron{top:2px;right:6px}.clear-focus .theme-control .theme-swatch{width:10px;height:10px}
  html[data-theme] .clear-focus .game-layout{grid-template-columns:minmax(0,1fr);gap:17px;min-height:0;padding:12px 0 24px}
  .clear-focus .intro{display:contents}.clear-focus .intro>.eyebrow,.clear-focus .intro>h1,.clear-focus .intro>.intro-copy{display:none}
  .clear-focus .intro .mode-section{display:grid;grid-template-columns:minmax(0,1fr) 108px;position:static;grid-column:1;grid-row:1;width:100%;max-width:none;gap:8px;align-items:center}
  .clear-focus .mode-section>.section-label,.clear-focus .mode-section #mode-description{display:none}
  .clear-focus .mode-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:0;padding:0;border:0;background:transparent}
  .clear-focus .mode-tabs button{justify-content:center;gap:0;padding:8px 4px;font-size:14px;min-height:31px}.clear-focus .mode-tabs [data-mode="cheat"]{grid-column:auto}.clear-focus .mode-tabs button span{display:none}
  html[data-theme] .clear-focus .battle-link{margin:0;padding:8px 7px;font-size:14px;white-space:nowrap}
  .clear-focus .mode-section .mode-hint{grid-column:1/-1;margin:0;font-size:14px!important;text-align:center}
  body.clear-focus.cheat-mode{--focus-board:min(calc(100vw - 44px),calc((100svh - 250px)/2),410px)}
  .clear-focus .play-area{grid-column:1;grid-row:2;justify-self:center;width:var(--focus-board)}
  .clear-focus .board-topline{height:22px;font-size:14px;letter-spacing:1px}.clear-focus .board-topline>span:last-child{font-size:14px}
  .clear-focus .board-bottomline{height:23px;align-items:center;margin-top:0}.clear-focus .board-bottomline>span{font-size:14px;gap:5px}.clear-focus .board-bottomline>span:after{content:none}.clear-focus .board-bottomline>span kbd{display:inline}.clear-focus .board-bottomline button{font-size:14px}
  .clear-focus .touch-controls{position:static;display:grid;width:100%;grid-template-columns:.8fr 1fr 1fr 1fr .8fr 1fr;gap:6px;margin:6px 0 0;touch-action:none}
  .clear-focus .touch-controls button{height:45px;font-size:21px;border-radius:var(--button-radius);background:var(--surface-strong);border:1px solid var(--line);color:var(--text);display:flex;align-items:center;justify-content:center;flex-direction:column;touch-action:none}
  .clear-focus .touch-controls small{font-size:14px}.clear-focus .touch-controls .drop-button{background:var(--lime);color:var(--accent-ink)}
  .clear-focus .dashboard{grid-column:1;grid-row:3;justify-self:center;width:100%;max-width:460px;display:grid;grid-template-columns:1fr 1fr;gap:0 18px;align-items:start;padding:12px 0 0;border-top:1px solid var(--line)}
  .clear-focus .score-card{grid-column:1;grid-row:1;padding:0 0 12px}.clear-focus .score-caption{display:none}html[data-theme] .clear-focus .score-card strong{font-size:31px;margin:6px 0 0;letter-spacing:.4px}
  .clear-focus .metrics{grid-column:1;grid-row:2;margin:12px 0 9px;gap:10px}.clear-focus .metrics>div+div{padding-left:12px}html[data-theme] .clear-focus .metrics strong{font-size:20px}.clear-focus .level-track{grid-column:1;grid-row:3}.clear-focus .level-caption{grid-column:1;grid-row:4;font-size:14px;white-space:normal;margin-top:5px}
  .clear-focus .next-card{grid-column:2;grid-row:1/6;margin:0;padding:12px}.clear-focus .next-card canvas{height:205px}.clear-focus .hold-card{grid-column:1;grid-row:5;margin:12px 0 0;padding:10px 12px 7px}.clear-focus .hold-card canvas{height:47px}.clear-focus .hold-caption{font-size:14px;display:block}.clear-focus .time-card{grid-column:1/-1;padding:12px 0}
  .clear-focus .section-label{font-size:14px;letter-spacing:1px}.clear-focus .section-label>span:not(.small-cross){display:inline;font-size:14px}
  .clear-focus .intro .theme-collection{display:block;grid-column:1;grid-row:4;max-width:460px;width:100%;justify-self:center}
  .clear-focus .theme-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 8px;margin:10px 0 0}.clear-focus .theme-option{grid-template-columns:14px 21px minmax(0,1fr);gap:7px;min-height:36px;padding:6px}.clear-focus .theme-label{font-size:14px}
  .clear-focus .intro .personal-best{display:flex;grid-column:1;grid-row:5;justify-self:center;width:100%;max-width:460px;margin:0;padding-top:14px}
  .clear-focus .footer{height:auto;min-height:42px;justify-content:center;padding:10px 0 calc(10px + env(safe-area-inset-bottom));font-size:14px}.clear-focus .keyboard-guide,.clear-focus .footer-note{display:none}
  .clear-focus .overlay-content{padding:22px}.clear-focus .overlay-content h2{font-size:39px}.clear-focus .overlay-content p{font-size:14px}.clear-focus .overlay-symbol{display:grid}.clear-focus .start-hint{display:block;font-size:14px}.clear-focus .primary-button{font-size:14px;padding:12px}.clear-focus .secondary-button{font-size:14px;padding:10px}
  html[data-theme] .clear-focus .event-toast{font-size:14px;line-height:1.4;letter-spacing:.35px;max-height:21px}
  .clear-focus .modal{padding:27px 23px}.clear-focus .setting-row{padding:16px 0;gap:10px}.clear-focus .setting-row small{font-size:14px}.clear-focus .setting-row select{font-size:14px;padding:7px}

  body.clear-focus.battle-page{--duel-size:auto}.clear-focus.battle-page .shell{width:calc(100% - 28px);max-width:620px}
  .clear-focus.battle-page .theme-control select{width:94px}.clear-focus.battle-page .header-actions{gap:11px}.clear-focus .solo-link{font-size:14px}
  .clear-focus .battle-message{font-size:14px;min-height:38px;line-height:1.5;padding:7px 0}
  .clear-focus .battle-layout{grid-template-columns:minmax(0,1fr) minmax(84px,.34fr);gap:15px 12px;min-height:0;align-items:start;padding-top:12px}
  .clear-focus .battle-lobby{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:1fr 1fr;max-width:none;width:100%;max-height:none;overflow:visible;gap:10px;padding:0}
  .clear-focus .battle-heading{grid-column:1/-1;margin:0}.clear-focus .battle-heading .mobile-break{display:none}html[data-theme] .clear-focus .battle-heading h1{font-size:20px;margin:7px 0}.clear-focus .battle-heading .eyebrow{font-size:14px}
  .clear-focus .lobby-card{padding:11px}.clear-focus .lobby-card strong{font-size:14px}.clear-focus .lobby-card p{font-size:14px}.clear-focus .lobby-card .primary-button{font-size:14px;padding:9px 8px}.clear-focus .lobby-card label{font-size:14px}.clear-focus .join-row input{font-size:14px;padding:8px 5px}.clear-focus .join-row button{font-size:14px;padding:7px}
  .clear-focus .battle-handling{grid-column:1/-1}.clear-focus .battle-handling .setting-row{padding:4px 0 8px}.clear-focus .battle-handling .setting-row small{display:none}.clear-focus .battle-handling select{min-width:100px}.clear-focus .battle-rules{grid-column:1/-1;font-size:14px}
  .clear-focus .room-card{gap:5px 10px}.clear-focus .room-card #room-code{font-size:23px;letter-spacing:2px}.clear-focus .room-card #battle-ready{padding:8px}.clear-focus .room-card .leave-button{font-size:14px}.clear-focus.in-room .battle-heading{display:none}
  .clear-focus .own-player{grid-column:1;grid-row:2;width:100%}.clear-focus .player-heading{height:30px;min-height:30px;gap:5px}.clear-focus .player-heading strong{font-size:14px}.clear-focus .player-heading>span:last-child{font-size:14px}
  .clear-focus .battle-side{grid-column:2;grid-row:2;width:100%;max-width:none;align-self:start}.clear-focus .rival-player{width:100%;margin:0}.clear-focus .rival-player .player-heading{min-height:30px;gap:3px}.clear-focus .rival-player .player-heading strong{font-size:14px}.clear-focus .rival-player .player-label{font-size:14px}.clear-focus .rival-player .player-heading>span:last-child{font-size:14px}
  .clear-focus .battle-stats{height:40px;padding:9px 0 0;gap:6px}.clear-focus .battle-stats>div{display:block}.clear-focus .battle-stats span{font-size:14px}.clear-focus .battle-stats strong{font-size:17px;margin-top:3px}.clear-focus .rival-player .battle-stats{grid-template-columns:1fr 1fr;gap:7px;min-height:60px}.clear-focus .rival-player .battle-stats .incoming-stat{grid-column:1/-1;display:flex;gap:8px;align-items:baseline}.clear-focus .rival-player .battle-stats strong{font-size:14px}.clear-focus .rival-player .battle-stats span{font-size:14px}.clear-focus .battle-footnote{display:none}
  .clear-focus .battle-previews{grid-template-columns:1fr;margin-top:13px;gap:9px}.clear-focus .battle-previews>section,.clear-focus .battle-previews>button{padding:8px}.clear-focus .battle-previews .section-label{font-size:14px}.clear-focus .battle-previews #battle-next{height:158px}.clear-focus .battle-previews #battle-hold-canvas{height:33px}
  .clear-focus .battle-overlay>strong{font-size:31px}.clear-focus .battle-overlay>p{font-size:14px}.clear-focus .battle-overlay>span{font-size:14px;letter-spacing:1px}
  .clear-focus .battle-touch{display:grid;grid-template-columns:.8fr 1fr 1fr 1fr .8fr 1fr;position:sticky;bottom:0;z-index:5;gap:5px;margin-top:16px;padding:8px 0 calc(8px + env(safe-area-inset-bottom));background:var(--bg)}
  .clear-focus .battle-touch button{height:46px;font-size:22px;border:1px solid var(--line);border-radius:var(--button-radius);background:var(--surface-strong);color:var(--text);display:flex;align-items:center;justify-content:center;flex-direction:column;touch-action:none}.clear-focus .battle-touch small{font-size:14px}.clear-focus .battle-touch .drop-button{background:var(--lime);color:var(--accent-ink)}
  .clear-focus.battle-page .footer{height:auto;min-height:36px;padding:10px 0;gap:6px;flex-wrap:wrap;font-size:14px}.clear-focus .battle-event{font-size:14px;letter-spacing:.3px;max-height:28px;white-space:normal;line-height:1.4}
}
@media(max-width:380px){
  .clear-focus .shell{width:calc(100% - 28px)}.clear-focus .brand{font-size:19px;gap:6px}html[data-theme] .clear-focus .header-actions{gap:9px}.clear-focus .theme-control select{width:93px}.clear-focus .theme-control .theme-swatch{display:none}
  .clear-focus .mode-tabs button{font-size:14px}.clear-focus .intro .mode-section{grid-template-columns:1fr 85px;gap:5px}.clear-focus .theme-label{font-size:14px}.clear-focus .theme-option{gap:5px}.clear-focus .board-bottomline>span{font-size:14px}
}
@media(min-width:821px) and (max-height:650px){
  body.clear-focus{--focus-board:calc((100svh - 128px)/2)}html[data-theme] .clear-focus .site-header{height:55px}.clear-focus .footer{height:25px;min-height:25px}html[data-theme] .clear-focus .game-layout{min-height:calc(100svh - 80px)}
  .clear-focus .intro,.clear-focus .dashboard{max-height:calc(100svh - 95px);overflow-y:auto;scrollbar-width:thin;padding:8px 4px}.clear-focus .theme-list{grid-template-columns:repeat(2,minmax(0,1fr))}.clear-focus .theme-option{grid-template-columns:10px 15px 1fr;gap:4px}.clear-focus .theme-label{font-size:15px}
  body.clear-focus.battle-page{--duel-size:calc((100svh - 184px)/2)}.clear-focus .battle-lobby{max-height:calc(100svh - 140px)}.clear-focus .battle-side{max-height:calc(100svh - 145px);overflow-y:auto;scrollbar-width:thin}.clear-focus .battle-layout{min-height:calc(100svh - 123px)}
}
@media(max-width:950px) and (max-height:520px){
  body.clear-focus{--focus-board:calc((100svh - 104px)/2)}body.clear-focus.cheat-mode{--focus-board:calc((100svh - 126px)/2)}
  .clear-focus .shell{width:calc(100% - 32px);max-width:none}html[data-theme] .clear-focus .site-header{height:47px}.clear-focus .header-center{display:none}.clear-focus .brand{font-size:18px}
  html[data-theme] .clear-focus .game-layout{display:grid;grid-template-columns:var(--focus-board) 130px;gap:18px;justify-content:center;align-items:start;min-height:0;padding:9px 0 0;position:relative}
  .clear-focus .intro{display:contents}.clear-focus .intro>*{display:none!important}.clear-focus .intro .mode-section{display:block!important;position:absolute;left:0;top:10px;width:135px;max-width:135px;grid-column:auto;grid-row:auto}
  .clear-focus .mode-tabs{display:grid;grid-template-columns:1fr;gap:6px;margin:0;padding:0}.clear-focus .mode-tabs button{min-height:31px;font-size:14px;padding:8px;justify-content:space-between}.clear-focus .mode-tabs [data-mode="cheat"]{grid-column:auto}.clear-focus .mode-tabs button span{display:inline;font-size:14px}.clear-focus .mode-tabs [data-mode="cheat"] span{font-size:14px}.clear-focus .mode-section>.section-label,.clear-focus .mode-section #mode-description{display:none}.clear-focus .mode-section .mode-hint{font-size:14px!important;text-align:left;margin-top:7px}
  html[data-theme] .clear-focus .battle-link{margin-top:8px;font-size:14px;padding:8px}
  .clear-focus .play-area{grid-column:1;grid-row:1;justify-self:auto}.clear-focus .board-topline{height:20px;font-size:14px;letter-spacing:.6px}.clear-focus .board-bottomline{height:20px}.clear-focus .board-bottomline>span{display:none}.clear-focus .board-bottomline button{font-size:14px;margin-left:auto}
  .clear-focus .dashboard{grid-column:2;grid-row:1;display:block;width:130px;max-width:130px;max-height:calc(100svh - 65px);padding:20px 3px 0;border:0;overflow-y:auto;scrollbar-width:thin}
  .clear-focus .score-card{padding:0 0 8px}html[data-theme] .clear-focus .score-card strong{font-size:22px;margin:5px 0 0}.clear-focus .metrics{margin:8px 0 6px;gap:10px}html[data-theme] .clear-focus .metrics strong{font-size:18px;margin-top:3px}.clear-focus .metrics>div+div{padding-left:10px}.clear-focus .level-caption{font-size:14px;margin-top:4px}
  .clear-focus .piece-card{padding:7px 9px}.clear-focus .next-card{margin-top:9px}.clear-focus .next-card canvas{height:104px}.clear-focus .hold-card{margin-top:7px}.clear-focus .hold-card canvas{height:28px}.clear-focus .hold-caption{display:none}.clear-focus .time-card{padding:8px 0}.clear-focus .time-card>span:last-child{font-size:14px}
  .clear-focus .touch-controls{position:fixed;right:16px;top:108px;width:132px;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0}.clear-focus .touch-controls button{height:47px;font-size:21px}.clear-focus .touch-controls small{font-size:14px}
  .clear-focus .overlay-content{padding:12px}.clear-focus .overlay-symbol,.clear-focus .start-hint{display:none}.clear-focus .overlay-kicker{font-size:14px;letter-spacing:1px}.clear-focus .overlay-content h2{font-size:27px;margin:10px 0}.clear-focus .overlay-content p{font-size:14px;margin-bottom:12px}.clear-focus .overlay-content .primary-button{font-size:14px;padding:10px}.clear-focus .overlay-content .secondary-button{font-size:14px;padding:8px}
  .clear-focus .footer{display:none}html[data-theme] .clear-focus .event-toast{font-size:14px;letter-spacing:0}
  body.clear-focus.battle-page{--duel-size:calc((100svh - 154px)/2)}.clear-focus.battle-page .shell{max-width:none;width:calc(100% - 32px)}.clear-focus .battle-message{min-height:32px;font-size:14px;padding:5px 0}
  .clear-focus .battle-layout{grid-template-columns:minmax(150px,1fr) var(--duel-size) minmax(140px,1fr);gap:22px;min-height:0;padding:0;align-items:start}
  .clear-focus .battle-lobby{display:flex;grid-column:1;grid-row:1;max-width:215px;max-height:calc(100svh - 95px);overflow-y:auto;scrollbar-width:thin;padding:8px 3px 0 0;gap:8px}.clear-focus .battle-heading{display:none}
  .clear-focus .own-player{grid-column:2;grid-row:1;width:var(--duel-size)}.clear-focus .player-heading{height:27px;min-height:27px}.clear-focus .own-player .player-heading{grid-template-columns:auto 1fr}.clear-focus .own-player .player-heading>span:last-child{grid-column:2}.clear-focus .own-player .battle-stats{height:35px;padding-top:6px}.clear-focus .own-player .battle-stats span{font-size:14px}.clear-focus .own-player .battle-stats strong{font-size:14px}
  .clear-focus .battle-side{grid-column:3;grid-row:1;width:100%;max-width:180px;max-height:calc(100svh - 153px);overflow-y:auto;scrollbar-width:thin}.clear-focus .rival-player{width:min(100%,var(--duel-size))}.clear-focus .battle-previews{grid-template-columns:1fr 1fr}.clear-focus .battle-previews #battle-next{height:100px}.clear-focus .battle-previews #battle-hold-canvas{height:34px}
  .clear-focus .battle-overlay{padding:10px}.clear-focus .battle-overlay>strong{font-size:24px;margin:10px 0}.clear-focus .battle-overlay>p{font-size:14px;line-height:1.6}.clear-focus .battle-overlay>span{font-size:14px}
  .clear-focus .battle-touch{position:fixed;bottom:0;right:16px;left:auto;width:min(340px,44vw);padding:7px 0;grid-template-columns:repeat(6,1fr);margin:0;gap:5px}.clear-focus .battle-touch button{height:40px;font-size:19px}.clear-focus .battle-touch small{font-size:14px}.clear-focus.battle-page .footer{display:none}
}
@media(prefers-reduced-motion:reduce){.clear-focus .event-toast.show,.clear-focus .battle-event.show{opacity:1;animation:none!important}.clear-focus *, .clear-focus *:before,.clear-focus *:after{transition:none!important}}

/* Shared view preferences and readable UI sizing. */
html{--view-board-cap:380px;--view-board-scale:.9}
html[data-board-size="small"]{--view-board-cap:300px;--view-board-scale:.8}
html[data-board-size="medium"]{--view-board-cap:380px;--view-board-scale:.9}
html[data-board-size="large"]{--view-board-cap:600px;--view-board-scale:1}
html[data-board-size] body.clear-focus{--solo-view-offset:170px;--solo-view-width:calc(100vw - 640px);--battle-view-offset:250px;--battle-view-width:calc(100vw - 640px);--focus-board:min(var(--view-board-cap),calc((100svh - var(--solo-view-offset))/2 * var(--view-board-scale)),var(--solo-view-width));--duel-size:min(var(--view-board-cap),calc((100svh - var(--battle-view-offset))/2 * var(--view-board-scale)),var(--battle-view-width));font-size:16px;--muted:color-mix(in srgb,var(--text) 74%,var(--bg))}
.clear-focus .board-size-quick{position:static;left:auto;transform:none;display:flex;align-items:center;gap:10px;white-space:nowrap}
.clear-focus .board-size-quick>span{font-size:15px;font-weight:500;color:var(--muted)}
.clear-focus .board-size-quick>div{display:flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:var(--button-radius);background:var(--surface)}
.clear-focus .board-size-quick button{font-size:15px;line-height:1.4;min-height:34px;padding:6px 10px;border:1px solid transparent;border-radius:max(2px,calc(var(--button-radius) - 3px));background:transparent;color:var(--muted)}
.clear-focus .board-size-quick button:hover{color:var(--text);background:var(--surface-strong)}
.clear-focus .board-size-quick button[aria-pressed="true"]{color:var(--text);border-color:var(--lime);background:var(--surface-strong)}
@media(min-width:1021px){html[data-theme] .clear-focus .site-header{height:68px;padding:0}.clear-focus .board-size-quick{top:auto}}
@media(min-width:1021px) and (max-width:1399px){.clear-focus .header-actions .icon-button>span:not(.help-icon){display:none}}
.clear-focus .theme-control{height:38px;position:relative}
.clear-focus .theme-control select{font-size:16px;width:172px;padding-right:17px}
.clear-focus .theme-chevron{top:6px;font-size:18px}
.clear-focus .icon-button{font-size:16px;gap:8px}
.clear-focus .brand .arcade{font-size:15px;letter-spacing:1.5px}
.clear-focus .intro,.clear-focus .dashboard{max-width:300px;max-height:calc(100svh - 160px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;padding:8px 5px}
.clear-focus .intro .eyebrow,.clear-focus .theme-number{font-size:15px;letter-spacing:.7px}
html[data-theme] .clear-focus .intro h1{font-size:32px;line-height:1.3;letter-spacing:-1.1px;margin:11px 0 8px}
.clear-focus .intro-copy{font-size:16px;line-height:1.7;margin-bottom:22px}
.clear-focus .theme-collection>.section-label,.clear-focus .mode-section>.section-label,.clear-focus .section-label{font-size:15px;letter-spacing:.8px}
.clear-focus .theme-collection>.section-label>span,.clear-focus .section-label>span:not(.small-cross){font-size:15px;letter-spacing:0}
.clear-focus .theme-list{gap:4px;margin:10px 0 22px}
.clear-focus .theme-option{min-height:38px;padding:6px 8px;grid-template-columns:23px 25px minmax(0,1fr);gap:10px}
.clear-focus .theme-index{font-size:15px;opacity:.82}
.clear-focus .theme-option .theme-swatch{width:23px;height:25px}
.clear-focus .theme-label{font-size:16px;letter-spacing:-.25px;line-height:1.4}
.clear-focus .mode-tabs button{font-size:16px;min-height:44px;padding:10px 8px;white-space:normal;line-height:1.4;word-break:keep-all}
.clear-focus .mode-tabs [data-mode="cheat"] span{font-size:15px}
.clear-focus .mode-section p,.clear-focus .mode-hint{font-size:15px!important;line-height:1.65!important}
html[data-theme] .clear-focus .battle-link{font-size:16px;padding:10px 12px}
.clear-focus .personal-best{padding-top:15px;margin-top:18px;gap:12px}
.clear-focus .personal-best div span,.clear-focus .best-unit{font-size:15px}
.clear-focus .personal-best strong{font-size:26px}
.clear-focus .personal-best svg{width:23px;height:23px}
.clear-focus .board-topline{height:auto;min-height:34px;font-size:15px;letter-spacing:.7px;gap:8px;padding-bottom:7px;line-height:1.4}
.clear-focus .board-topline>span:last-child{font-size:15px}
.clear-focus .board-bottomline{height:31px;font-size:15px;align-items:center}
.clear-focus .board-bottomline button,.clear-focus .board-bottomline kbd{font-size:15px}
.clear-focus .board-bottomline kbd,.clear-focus kbd{font-size:15px;padding:2px 5px}
.clear-focus .score-caption,.clear-focus .hold-caption,.clear-focus .level-caption{font-size:15px;line-height:1.5}
.clear-focus .time-card>span:last-child{font-size:16px}
.clear-focus .footer,.clear-focus .footer b,.clear-focus .keyboard-guide,.clear-focus .footer-note{font-size:15px;letter-spacing:0}
.clear-focus .footer{gap:14px;min-height:48px;height:auto;padding:10px 0;flex-wrap:wrap;line-height:1.5}
.clear-focus .keyboard-guide{gap:12px;flex-wrap:wrap}
.clear-focus .overlay-kicker,.clear-focus .start-hint{font-size:15px;letter-spacing:1px}
.clear-focus .overlay-content p{font-size:16px;line-height:1.75}
.clear-focus .primary-button,.clear-focus .secondary-button{font-size:16px;min-height:42px}
.clear-focus .overlay-content .primary-button{max-width:245px}
html[data-theme] .clear-focus .event-toast,.clear-focus .battle-event{font-size:15px;line-height:1.4;letter-spacing:.2px;max-height:30px}
.clear-focus .modal{max-width:490px;padding:30px}
.clear-focus .modal h2{font-size:30px}
.clear-focus .modal p,.clear-focus .help-grid{font-size:16px}
.clear-focus .help-grid{gap:16px 20px}
.clear-focus .help-note{font-size:16px!important;line-height:1.75!important}
.clear-focus .setting-row strong{font-size:16px;line-height:1.4}
.clear-focus .setting-row small{font-size:15px;line-height:1.5;word-break:keep-all;max-width:245px;margin-top:6px}
.clear-focus .setting-row select{font-size:16px;max-width:158px;min-width:128px;padding:9px 10px;min-height:40px;margin-left:14px}
.clear-focus .setting-row input{width:21px;height:21px;flex-shrink:0;margin-left:15px}

.clear-focus .battle-lobby,.clear-focus .battle-side{max-width:300px}
.clear-focus .battle-lobby{padding-right:6px}
.clear-focus .battle-message{font-size:18px;line-height:1.5;min-height:52px}
html[data-theme] .clear-focus .battle-heading h1{font-size:30px}
.clear-focus .battle-heading .eyebrow,.clear-focus .lobby-card .section-label{font-size:15px;letter-spacing:.5px}
.clear-focus .lobby-card{padding:16px}
.clear-focus .lobby-card strong{font-size:17px}
.clear-focus .lobby-card p{font-size:16px;line-height:1.65}
.clear-focus .lobby-card label{font-size:15px;line-height:1.5}
.clear-focus .lobby-card .primary-button,.clear-focus .lobby-card .secondary-button,.clear-focus .join-row button{font-size:16px;min-height:39px}
.clear-focus .join-row input{font-size:16px;min-height:41px}
.clear-focus .text-button,.clear-focus .leave-button{font-size:15px;line-height:1.5}
.clear-focus .battle-rules{font-size:16px;line-height:1.8}
.clear-focus .battle-handling .setting-row{padding:14px 0;flex-wrap:wrap;gap:8px}.clear-focus .battle-handling .setting-row>span{flex:1 1 130px}.clear-focus .battle-handling .setting-row select{margin-left:0}
.clear-focus .battle-handling .setting-row strong{font-size:16px}
.clear-focus .battle-handling .setting-row small{font-size:15px;max-width:145px}
.clear-focus .battle-handling select{font-size:16px;min-width:148px;padding:7px;min-height:36px;margin-left:9px}
.clear-focus .player-heading{min-height:48px;height:auto;gap:6px;line-height:1.4}
.clear-focus .player-heading strong{font-size:16px}
.clear-focus .player-label,.clear-focus .player-heading>span:last-child{font-size:15px;letter-spacing:.4px}
.clear-focus .battle-stats{height:auto;min-height:64px;padding-top:10px;gap:12px}
.clear-focus .battle-stats>div{display:block}
.clear-focus .battle-stats span{font-size:15px}
.clear-focus .battle-stats strong{font-size:23px;margin-top:4px}
.clear-focus .rival-player .player-heading{min-height:43px}
.clear-focus .rival-player .battle-stats span{font-size:15px}
.clear-focus .rival-player .battle-stats strong{font-size:20px}
.clear-focus .rival-player .battle-stats{min-height:58px;height:auto}
.clear-focus .battle-footnote,.clear-focus .battle-previews .section-label{font-size:15px}
.clear-focus .battle-overlay>p{font-size:16px}
.clear-focus .battle-overlay>span{font-size:15px;line-height:1.5;letter-spacing:.8px}
.clear-focus .solo-link{font-size:16px}
.clear-focus.battle-page .footer{font-size:15px;height:36px;min-height:36px}
.clear-focus #dev-login label,.clear-focus #dev-login select{font-size:15px}

@media(min-width:821px){
  html[data-theme] .clear-focus .game-layout{min-height:calc(100svh - 108px)}
  .clear-focus .theme-list{grid-template-columns:1fr}
  .clear-focus .battle-layout{min-height:calc(100svh - 158px)}
  .clear-focus .battle-side{max-height:calc(100svh - 166px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;padding:8px 4px}
}
@media(min-width:821px) and (max-width:1020px){
  html[data-theme] .clear-focus .site-header{height:122px;padding:18px 0 52px;align-items:center}
  .clear-focus .board-size-quick{position:absolute;left:50%;transform:translateX(-50%);top:77px}
  html[data-board-size] body.clear-focus{--solo-view-offset:224px;--battle-view-offset:304px}
  html[data-theme] .clear-focus .game-layout{min-height:calc(100svh - 162px)}
  .clear-focus .battle-layout{min-height:calc(100svh - 204px)}
  .clear-focus .intro,.clear-focus .dashboard{max-height:calc(100svh - 198px)}
  .clear-focus .battle-lobby,.clear-focus .battle-side{max-height:calc(100svh - 216px)}
  .clear-focus .theme-list{grid-template-columns:1fr;gap:3px}.clear-focus .theme-option{min-height:34px;grid-template-columns:18px 21px 1fr;padding:5px;gap:7px}.clear-focus .theme-option .theme-swatch{width:20px;height:24px}.clear-focus .theme-label{font-size:15px}
  .clear-focus .footer-note{display:none}.clear-focus .footer{font-size:15px}.clear-focus .keyboard-guide{gap:8px}
}
@media(min-width:821px) and (max-width:1000px){
  .clear-focus .header-actions .icon-button>span:not(.help-icon){display:none}
  .clear-focus .intro .eyebrow{flex-wrap:wrap}.clear-focus .intro .theme-number{margin-left:0}
  html[data-theme] .clear-focus .intro h1{font-size:30px;white-space:normal}
  .clear-focus .mode-tabs{grid-template-columns:1fr}.clear-focus .mode-tabs [data-mode="cheat"]{grid-column:auto}
  .clear-focus .personal-best{flex-wrap:wrap}.clear-focus .personal-best svg{display:none}
  .clear-focus .board-bottomline>span{display:none}.clear-focus .board-bottomline button{margin-left:auto}
  .clear-focus .battle-handling .setting-row{flex-wrap:wrap;gap:9px}.clear-focus .battle-handling select{margin-left:0;max-width:none;width:100%}
}
@media(max-width:820px){
  html[data-board-size] body.clear-focus{font-size:14px;--solo-view-offset:282px;--solo-view-width:calc((100vw - 44px) * var(--view-board-scale));--battle-view-offset:280px;--battle-view-width:calc((100vw - 48px)/1.34 * var(--view-board-scale))}
  html[data-board-size] body.clear-focus.cheat-mode{--solo-view-offset:320px}
  .clear-focus .board-size-quick{display:none}
  html[data-theme] .clear-focus .site-header{height:68px;padding:0;align-items:center}
  html[data-theme] .clear-focus .header-actions{gap:8px}
  .clear-focus .brand{font-size:21px;gap:7px}
  html[data-theme] .clear-focus .theme-control{height:35px;padding:0 6px;gap:0}
  .clear-focus .theme-control .theme-swatch{display:none}
  .clear-focus .theme-control select{font-size:14px;width:142px;padding:5px 15px 5px 0}
  .clear-focus .theme-chevron{top:5px;right:5px}
  .clear-focus .intro .mode-section{grid-template-columns:minmax(0,1fr) 108px;gap:7px}
  .clear-focus .mode-tabs button{font-size:14px;min-height:37px;padding:7px 2px}
  html[data-theme] .clear-focus .battle-link{font-size:14px;padding:8px 6px;min-height:37px}
  .clear-focus .mode-section p,.clear-focus .mode-hint{font-size:14px!important}
  .clear-focus .intro,.clear-focus .dashboard{max-height:none;overflow:visible}
  .clear-focus .dashboard{max-width:460px;padding:15px 0 0;gap:0 18px}
  .clear-focus .board-topline{height:auto;min-height:30px;font-size:14px;letter-spacing:0;gap:8px;padding-bottom:7px;line-height:1.4}.clear-focus .board-topline>span:last-child{font-size:14px}
  .clear-focus .board-bottomline{height:29px;font-size:14px}.clear-focus .board-bottomline>span{display:none}.clear-focus .board-bottomline button{font-size:14px;margin-left:auto}.clear-focus .board-bottomline kbd{font-size:14px}
  .clear-focus .touch-controls{margin-top:7px;gap:5px}.clear-focus .touch-controls button{height:50px;font-size:23px}.clear-focus .touch-controls small{font-size:14px}
  .clear-focus .section-label,.clear-focus .section-label>span:not(.small-cross),.clear-focus .hold-caption,.clear-focus .level-caption{font-size:14px;white-space:normal}
  .clear-focus .level-caption{line-height:1.5}.clear-focus .time-card>span:last-child{font-size:16px}
  .clear-focus .theme-list{gap:6px 9px}.clear-focus .theme-option{grid-template-columns:18px 22px minmax(0,1fr);min-height:42px;gap:7px;padding:6px 4px}.clear-focus .theme-label{font-size:14px;white-space:normal}.clear-focus .theme-index{font-size:14px}.clear-focus .theme-option .theme-swatch{width:21px;height:25px}
  .clear-focus .personal-best div span,.clear-focus .best-unit{font-size:14px}
  .clear-focus .footer{height:auto;min-height:43px;font-size:14px}.clear-focus .footer b{font-size:14px;margin-left:4px}
  .clear-focus .overlay-content{padding:18px}.clear-focus .overlay-content p{font-size:15px;line-height:1.65;margin-bottom:20px}.clear-focus .overlay-kicker{font-size:14px;letter-spacing:.5px}.clear-focus .overlay-content h2{font-size:34px}.clear-focus .overlay-content .primary-button,.clear-focus .overlay-content .secondary-button{font-size:15px;padding:11px;min-height:41px}.clear-focus .start-hint{font-size:14px;line-height:1.4}
  html[data-board-size="small"] .clear-focus .overlay-symbol{display:none}
  .clear-focus .modal{padding:25px 20px}.clear-focus .modal h2{font-size:29px}.clear-focus .help-grid{font-size:15px;gap:14px 10px}.clear-focus .modal p{font-size:15px}.clear-focus .help-note{font-size:14px!important}.clear-focus .setting-row strong{font-size:16px}.clear-focus .setting-row small{font-size:14px}.clear-focus .setting-row select{font-size:15px;min-width:136px;max-width:150px;padding:8px;margin-left:10px}
  html[data-theme] .clear-focus .event-toast{font-size:14px;max-height:27px}
  .clear-focus.battle-page .theme-control select{font-size:14px;width:123px}.clear-focus .solo-link,.clear-focus #battle-sound{font-size:14px}
  .clear-focus .battle-message{font-size:16px;min-height:48px}
  .clear-focus .battle-layout{grid-template-columns:var(--duel-size) minmax(84px,1fr);gap:17px 12px;min-height:0}
  .clear-focus .own-player{width:var(--duel-size)}
  .clear-focus .battle-lobby{max-width:none;max-height:none;overflow:visible;padding:0;gap:12px}
  html[data-theme] .clear-focus .battle-heading h1{font-size:28px}.clear-focus .battle-heading .eyebrow{font-size:14px}
  .clear-focus .lobby-card{padding:12px}.clear-focus .lobby-card .section-label{font-size:14px;letter-spacing:0}.clear-focus .lobby-card strong{font-size:16px}.clear-focus .lobby-card p{font-size:14px}.clear-focus .lobby-card .primary-button,.clear-focus .lobby-card .secondary-button{font-size:14px;padding:10px 8px}.clear-focus .lobby-card label{font-size:14px}.clear-focus .join-row input{font-size:15px;padding:8px 5px;letter-spacing:.7px}.clear-focus .join-row button{font-size:14px;padding:7px}
  .clear-focus .battle-handling .setting-row{padding:10px 0}.clear-focus .battle-handling .setting-row strong{font-size:15px}.clear-focus .battle-handling .setting-row small{display:block;font-size:14px;max-width:230px}.clear-focus .battle-handling select{font-size:15px;min-width:140px}.clear-focus .battle-rules{font-size:14px}
  .clear-focus .room-card .leave-button{font-size:14px}.clear-focus .room-card .primary-button{font-size:14px}
  .clear-focus .player-heading{height:46px;min-height:46px;grid-template-columns:auto minmax(0,1fr);gap:4px 7px}.clear-focus .player-heading strong{font-size:14px}.clear-focus .player-label,.clear-focus .player-heading>span:last-child{font-size:14px}.clear-focus .own-player .player-heading>span:last-child{grid-column:2}
  .clear-focus .battle-side{max-height:none;overflow:visible;padding:0;max-width:none}.clear-focus .rival-player{width:100%}.clear-focus .rival-player .player-heading{height:46px;min-height:46px;grid-template-columns:minmax(0,1fr);gap:0}.clear-focus .rival-player .player-heading strong{font-size:14px}.clear-focus .rival-player .player-label{display:none}.clear-focus .rival-player .player-heading>span:last-child{font-size:14px;grid-column:1}
  .clear-focus .battle-stats{height:64px;gap:5px}.clear-focus .battle-stats span{font-size:14px;white-space:normal;line-height:1.4}.clear-focus .battle-stats strong{font-size:21px}.clear-focus .rival-player .battle-stats span{font-size:14px}.clear-focus .rival-player .battle-stats strong{font-size:18px}.clear-focus .rival-player .battle-stats{grid-template-columns:1fr;gap:8px}.clear-focus .rival-player .battle-stats>div{display:flex;align-items:baseline;justify-content:space-between;gap:4px}.clear-focus .rival-player .battle-stats .incoming-stat{display:block;grid-column:auto}
  .clear-focus .battle-previews .section-label{font-size:14px;letter-spacing:0}.clear-focus .battle-previews>section,.clear-focus .battle-previews>button{padding:8px 6px}
  .clear-focus .battle-overlay>p{font-size:14px;line-height:1.65}.clear-focus .battle-overlay>span{font-size:14px;letter-spacing:0}.clear-focus .battle-overlay>strong{font-size:30px}
  .clear-focus .battle-touch button{height:50px}.clear-focus .battle-touch small{font-size:14px}.clear-focus.battle-page .footer{font-size:14px;min-height:43px}
  .clear-focus .battle-event{font-size:14px;max-height:44px;line-height:1.5}
}
@media(max-width:380px){
  html[data-theme] .clear-focus.battle-page .site-header{height:auto;min-height:106px;flex-wrap:wrap;gap:8px;padding:10px 0}.clear-focus.battle-page .header-actions{width:100%;justify-content:space-between}.clear-focus.battle-page .theme-control select{width:140px}html[data-theme] .clear-focus.battle-page.battle-active .site-header{height:56px;min-height:56px;flex-wrap:nowrap;padding:4px 0}.clear-focus.battle-page.battle-active .brand{display:none}
  .clear-focus .brand{font-size:19px}.clear-focus .theme-control select{width:119px;font-size:14px}html[data-theme] .clear-focus .header-actions{gap:7px}
  .clear-focus .mode-tabs button,.clear-focus .theme-label{font-size:14px}.clear-focus .theme-option{grid-template-columns:16px 19px minmax(0,1fr);gap:5px}.clear-focus .intro .mode-section{grid-template-columns:1fr 98px;gap:5px}
  .clear-focus .modal{padding:23px 16px}.clear-focus .setting-row small{max-width:162px}.clear-focus .setting-row:has(select){flex-wrap:wrap}.clear-focus .setting-row:has(select) select{margin-left:0}.clear-focus .setting-row select{margin-left:7px;min-width:136px;font-size:14px}
}
@media(max-width:950px) and (max-height:520px){
  html[data-board-size] body.clear-focus{--solo-view-offset:138px;--solo-view-width:calc(100vw - 410px);--battle-view-offset:190px;--battle-view-width:calc(100vw - 400px)}
  html[data-board-size] body.clear-focus.cheat-mode{--solo-view-offset:165px}
  .clear-focus .board-size-quick{display:none}html[data-theme] .clear-focus .site-header{height:52px;padding:0}.clear-focus .brand{font-size:20px}
  html[data-theme] .clear-focus .game-layout{grid-template-columns:var(--focus-board) 155px;gap:18px;min-height:0;padding-top:8px}
  .clear-focus .intro .mode-section{width:151px;max-width:151px}.clear-focus .mode-tabs button{font-size:14px;min-height:37px;padding:8px}.clear-focus .mode-tabs [data-mode="cheat"] span{display:none}.clear-focus .mode-section .mode-hint{font-size:14px!important}
  html[data-theme] .clear-focus .battle-link{font-size:14px;padding:9px}.clear-focus .board-topline{height:auto;min-height:38px;font-size:14px;line-height:1.4;padding-bottom:7px}.clear-focus .board-topline>span:last-child{display:none}.clear-focus .board-bottomline{height:27px}.clear-focus .board-bottomline button{font-size:14px}
  .clear-focus .dashboard{width:155px;max-width:155px;max-height:calc(100svh - 65px);overflow-y:auto;padding-top:27px}.clear-focus .section-label,.clear-focus .level-caption,.clear-focus .time-card>span:last-child{font-size:14px}.clear-focus .metrics{gap:10px}.clear-focus .score-card strong{font-size:25px}
  .clear-focus .touch-controls{width:139px;top:99px}.clear-focus .touch-controls button{height:51px}.clear-focus .touch-controls small{font-size:14px}
  .clear-focus .overlay-content{padding:10px}.clear-focus .overlay-symbol,.clear-focus .overlay-kicker,.clear-focus .start-hint{display:none}.clear-focus .overlay-content h2{font-size:27px;margin:7px 0}.clear-focus .overlay-content p{font-size:14px;margin-bottom:10px;line-height:1.5}.clear-focus .overlay-content .primary-button,.clear-focus .overlay-content .secondary-button{font-size:14px;min-height:35px;padding:8px}
  html[data-theme] .clear-focus .event-toast{font-size:14px;max-height:27px}.clear-focus .footer{display:none}
  .clear-focus .battle-message{font-size:14px;min-height:36px}.clear-focus .battle-layout{grid-template-columns:minmax(155px,1fr) var(--duel-size) minmax(140px,1fr);gap:22px;min-height:0}.clear-focus .own-player{width:var(--duel-size)}
  .clear-focus .battle-lobby{max-width:220px;max-height:calc(100svh - 102px);overflow-y:auto;padding-right:5px}.clear-focus .battle-side{max-width:185px;max-height:calc(100svh - 155px);overflow-y:auto}.clear-focus .player-heading,.clear-focus .rival-player .player-heading{min-height:40px;height:40px}.clear-focus .own-player .battle-stats{height:auto;min-height:64px;grid-template-columns:1fr;gap:2px}.clear-focus .own-player .battle-stats>div{display:flex;justify-content:space-between;align-items:baseline}.clear-focus .own-player .battle-stats strong{margin-top:0}.clear-focus .own-player .battle-stats span,.clear-focus .own-player .battle-stats strong{font-size:14px}
  .clear-focus .battle-overlay{padding:8px}.clear-focus .battle-overlay>span{display:none}.clear-focus .battle-overlay>strong{font-size:24px}.clear-focus .battle-overlay>p{font-size:14px;line-height:1.45}.clear-focus .battle-touch button{height:47px}.clear-focus .battle-touch small{font-size:14px}.clear-focus.battle-page .footer{display:none}
}
html[data-theme] .clear-focus .event-toast,.clear-focus .battle-event{font-size:18px;line-height:1.4;letter-spacing:.15px;max-height:30px;white-space:nowrap}
.clear-focus .overlay-content{padding:clamp(12px,calc(var(--focus-board) * .06),24px);max-height:100%;overflow-y:auto;scrollbar-width:thin}
.clear-focus .overlay-content h2{font-size:clamp(22px,calc(var(--focus-board) * .11),58px);white-space:normal;word-break:keep-all;letter-spacing:-.5px;margin:13px 0 15px}
.clear-focus .overlay-content p{line-height:1.6;margin-bottom:18px;word-break:keep-all}
.clear-focus .start-hint{line-height:1.5;word-break:keep-all;text-wrap:balance;letter-spacing:0;margin-top:11px}
html[data-board-size="small"] .clear-focus .overlay-symbol{display:none}
@media(max-height:800px){html[data-board-size="small"] .clear-focus .overlay-kicker{display:none}.clear-focus .overlay-symbol{margin-bottom:16px}}
@media(max-width:950px) and (max-height:520px){.clear-focus .overlay-content{padding:8px}.clear-focus .overlay-content h2{font-size:clamp(17px,calc(var(--focus-board) * .12),27px);margin:7px 0}.clear-focus .overlay-content p{font-size:14px;line-height:1.4;margin-bottom:9px}}
.clear-focus .eyebrow{font-size:15px}
@media(max-width:820px){
  .clear-focus .touch-controls{position:relative;left:50%;right:auto;top:auto;transform:translateX(-50%);width:min(calc(100vw - 36px),460px);grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
  .clear-focus .touch-controls button,.clear-focus .battle-touch button{min-width:0;padding-left:0;padding-right:0}
  .clear-focus .touch-controls small,.clear-focus .battle-touch small{font-size:14px;white-space:nowrap}
  .clear-focus .battle-touch{grid-template-columns:repeat(7,minmax(0,1fr))}
}
@media(max-width:359px) and (min-height:521px){
  html[data-board-size] body.clear-focus{--solo-view-offset:337px}
  html[data-board-size] body.clear-focus.cheat-mode{--solo-view-offset:375px}
  .clear-focus.solo-page .brand{font-size:18px;gap:5px}
  html[data-theme] .clear-focus.solo-page .header-actions{gap:4px}
  .clear-focus.solo-page .header-actions .icon-button{width:24px;min-width:24px;justify-content:center}
  .clear-focus.solo-page .theme-control{width:116px}
  .clear-focus.solo-page .theme-control select{width:100%}
  .clear-focus .touch-controls,.clear-focus .battle-touch{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
  .clear-focus .touch-controls .drop-button,.clear-focus .battle-touch .drop-button{grid-column:span 2}
}
@media(max-width:820px) and (min-height:521px){
  .clear-focus .mode-tabs{grid-template-columns:.8fr 1.45fr 1fr}
}
@media(max-width:950px) and (max-height:520px){
  .clear-focus .touch-controls{position:fixed;left:auto;right:16px;top:91px;transform:none;width:139px;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .clear-focus .touch-controls button{height:clamp(35px,calc((100svh - 140px)/4),50px)}
  .clear-focus .touch-controls .drop-button{grid-column:span 2}
  .clear-focus .battle-touch{width:min(350px,42vw);grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
  .clear-focus .battle-touch .drop-button{grid-column:auto}.clear-focus .battle-touch button{min-width:0;padding-left:0;padding-right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;line-height:1}.clear-focus .battle-touch small{font-size:13px;line-height:1.1;white-space:nowrap}
}

/* Three-player rooms keep the player's board and controls at their chosen size. */
html[data-theme] body.clear-focus.trio-mode .battle-side{max-width:380px}
.clear-focus.trio-mode .rival-boards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.clear-focus.trio-mode .rival-player{width:100%;margin:0;min-width:0}
.clear-focus.trio-mode .rival-player .player-heading{grid-template-columns:minmax(0,1fr);height:auto;min-height:48px;gap:3px}
.clear-focus.trio-mode .rival-player .player-label{display:none}
.clear-focus.trio-mode .rival-player .player-heading>span:last-child{grid-column:1;font-size:15px}
.clear-focus.trio-mode .rival-player .battle-stats{display:flex;flex-direction:column;gap:5px;padding-top:10px}
.clear-focus.trio-mode .rival-player .battle-stats>div{display:flex;justify-content:space-between;align-items:baseline;gap:4px}
.clear-focus.trio-mode .rival-player .battle-stats strong{font-size:16px;margin:0}
.clear-focus.trio-mode .battle-footnote{display:none}
.clear-focus.trio-mode .battle-previews{margin-top:15px}
.clear-focus.trio-mode .battle-tag{font-size:13px;letter-spacing:0;white-space:nowrap}
@media(max-width:820px) and (min-height:521px){
  .clear-focus.trio-mode .rival-boards{grid-template-columns:minmax(0,1fr);gap:12px}
  .clear-focus.trio-mode .rival-player .duel-board{width:clamp(36px,calc((100svh - 560px)/4),64px);max-width:100%;margin:0 auto}
  .clear-focus.trio-mode .rival-player .player-heading{min-height:40px;height:auto;font-size:13px;gap:2px;padding-bottom:4px}
  .clear-focus.trio-mode .rival-player .player-heading>span:last-child{font-size:13px;line-height:1.4;white-space:normal}
  .clear-focus.trio-mode .rival-player .battle-stats{padding-top:4px;min-height:0;gap:3px}
  .clear-focus.trio-mode .rival-player .battle-stats>div:not(.incoming-stat){display:none}
  .clear-focus.trio-mode .rival-player .battle-stats strong{font-size:14px}
  .clear-focus.trio-mode .rival-player .battle-stats span{font-size:12px;white-space:nowrap}
  .clear-focus.trio-mode .battle-previews{gap:6px;margin-top:10px}
  .clear-focus.trio-mode .battle-previews>section,.clear-focus.trio-mode .battle-previews>button{padding:4px}
  .clear-focus.trio-mode .battle-previews #battle-next{height:94px}
  .clear-focus.trio-mode .battle-previews #battle-hold-canvas{height:30px}
  .clear-focus.trio-mode .rival-result{inset:auto 3px 5px;padding:3px;font-size:14px}
}
@media(max-width:950px) and (max-height:520px){
  .clear-focus.trio-mode .rival-boards{gap:8px}
  .clear-focus.trio-mode .rival-player .player-heading{min-height:40px}
  .clear-focus.trio-mode .rival-player .battle-stats>div:first-child{display:none}
  .clear-focus.trio-mode .rival-player .battle-stats span{font-size:12px}
  .clear-focus.trio-mode .rival-player .battle-stats strong{font-size:14px}
}
@media(max-width:820px) and (min-height:521px){
  .clear-focus.battle-active .battle-lobby{display:contents}
  .clear-focus.battle-active .battle-lobby>.battle-heading,.clear-focus.battle-active .battle-handling,.clear-focus.battle-active .battle-rules{display:none}
  .clear-focus.battle-active .room-card{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:4px 8px;padding:7px 10px}
  .clear-focus.battle-active .room-card>.section-label,.clear-focus.battle-active #battle-ready{display:none}
  .clear-focus.battle-active .room-card #room-code{font-size:16px;letter-spacing:1px;grid-column:1;grid-row:1}
  .clear-focus.battle-active .room-card .room-mode{grid-column:2;grid-row:1;margin:0;font-size:14px;white-space:nowrap}
  .clear-focus.battle-active .room-card #room-status{grid-column:1/3;grid-row:2;margin:0;font-size:14px}
  .clear-focus.battle-active .room-card .leave-button{grid-column:3;grid-row:1/3;margin:0;white-space:nowrap}
  .clear-focus.battle-active .room-card #room-reconnect{grid-column:1/-1;grid-row:3}
  .clear-focus.battle-active .battle-chat{grid-column:1/-1;grid-row:3;max-width:none;margin-top:7px}
  .clear-focus.battle-active .battle-layout{row-gap:10px}
  .clear-focus .battle-chat-compose input{font-size:16px}
  .clear-focus .battle-chat-log{max-height:125px}
}
@media(max-width:359px) and (min-height:521px){
  .clear-focus.battle-active .battle-message:not(.error){display:none}
  .clear-focus.trio-mode .rival-boards{gap:6px}
  .clear-focus.trio-mode .rival-player .player-heading{height:auto;min-height:38px;padding-bottom:3px}
  .clear-focus.trio-mode .battle-previews{margin-top:6px;gap:4px}
  .clear-focus.trio-mode .battle-previews>section,.clear-focus.trio-mode .battle-previews>button{padding:3px}
  .clear-focus.trio-mode .battle-previews .section-label{font-size:12px;line-height:1.4}
  .clear-focus.trio-mode .battle-previews #battle-next{height:78px}
  .clear-focus.trio-mode .battle-previews #battle-hold-canvas{height:24px}
}
@media(max-width:950px) and (max-height:520px){
  html[data-theme] body.clear-focus.trio-mode .battle-side{max-width:185px;max-height:none;overflow:visible;align-self:start}
  .clear-focus.trio-mode .rival-boards{gap:8px}
  .clear-focus.trio-mode .rival-player .duel-board{width:clamp(30px,calc((100svh - 222px)/4),58px);max-width:100%;margin:0 auto}
  .clear-focus.trio-mode .rival-player .player-heading{height:auto;min-height:38px;padding-bottom:3px;gap:1px}
  .clear-focus.trio-mode .rival-player .player-heading strong{font-size:13px;line-height:1.4}
  .clear-focus.trio-mode .rival-player .player-heading>span:last-child{font-size:13px;line-height:1.4;white-space:normal}
  .clear-focus.trio-mode .rival-player .battle-stats{min-height:0;padding-top:2px;gap:0}
  .clear-focus.trio-mode .rival-player .battle-stats>div:not(.incoming-stat){display:none}
  .clear-focus.trio-mode .rival-player .battle-stats span{font-size:13px;line-height:1.4;white-space:normal}
  .clear-focus.trio-mode .rival-player .battle-stats strong{font-size:14px;line-height:1.4}
  .clear-focus.trio-mode .battle-previews{grid-template-columns:1fr 1fr;gap:5px;margin-top:4px}
  .clear-focus.trio-mode .battle-previews>section,.clear-focus.trio-mode .battle-previews>button{padding:2px}
  .clear-focus.trio-mode .battle-previews .section-label{font-size:12px;line-height:1.4}
  .clear-focus.trio-mode .battle-previews #battle-next{height:70px}
  .clear-focus.trio-mode .battle-previews #battle-hold-canvas{height:30px}
}
/* The campaign is a first-class single-player entry, including compact screens. */
html[data-theme] .clear-focus .story-link{color:var(--lime);border-color:var(--lime);margin-bottom:6px}
.clear-focus .story-mode-caption{font-size:15px!important;line-height:1.5;color:var(--muted);margin:0 0 8px!important}
@media(max-width:820px){
  .clear-focus .intro .mode-section .mode-tabs{grid-column:1/-1}
  html[data-theme] .clear-focus .intro .mode-section .story-link{grid-column:1;grid-row:2;margin:0;white-space:normal;font-size:14px;line-height:1.4}
  html[data-theme] .clear-focus .intro .mode-section>a[href="/battle.html"]{grid-column:2;grid-row:2}
  .clear-focus .intro .mode-section .story-mode-caption{display:none}
}
