/* Current direction: centre the board; options and records flank it symmetrically. */
#modal>label,#modal .auth-fields>label{display:block!important;margin:14px 0 7px;color:#d0e3f3;font-size:13px}#modal input:not([type=checkbox]),#modal textarea,#modal>select{box-sizing:border-box;display:block;width:100%;max-width:100%;min-height:44px;padding:10px 12px;border:1px solid #b9d8f17a;border-radius:10px;background:#173653;color:#f7f6ed;font:15px system-ui}#modal input:focus{outline:2px solid #e9ce80;outline-offset:2px}#modal .dialog-actions{margin-top:20px;align-items:center}.profile-highlights{border-top:1px solid #b5d6ec44;margin-top:16px;padding-top:14px}.profile-highlights h3{font-size:14px;color:#ffe7ac;margin:14px 0 9px}.profile-rank{display:flex;align-items:center;gap:14px}.profile-rank>b{font-size:30px;color:#ffe3a0}.profile-rank>span{font-size:12px;line-height:1.6;color:#c4deec}.profile-achievements{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.profile-achievements article{display:grid;gap:4px;text-align:center;padding:10px 5px;border:1px solid #a9c9dc33;border-radius:10px;background:#16355080;opacity:.65}.profile-achievements article.earned{opacity:1;border-color:#e3c77788}.profile-achievements span{font-size:23px;color:#ffe1a0}.profile-achievements b{font-size:11px}.profile-achievements small{font-size:10px;color:#bad6e5}.profile-best{font-size:13px;color:#cae1eb}.profile-best strong{color:#ffe3a0;font-size:18px}.profile-highlights>small{font-size:10px;color:#bbd3df}.owned-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.owned-grid article{padding:10px;border:1px solid #a9cbd852;border-radius:12px;background:#12324e;min-width:0;display:grid;gap:6px;text-align:center}.owned-preview{height:100px;position:relative;overflow:hidden;display:grid;place-items:center}.owned-preview>*{max-width:100%;max-height:100%}.owned-preview svg{max-height:90px}.owned-preview .board-preview{width:100%;height:90px}.owned-grid article>b{font-size:12px}.owned-grid article>small,.owned-grid article>span{font-size:10px;color:#c8e2ea}.owned-grid button{padding:7px;font-size:11px}
.wood-board .square:not(.selected):not(.last){background-color:var(--board-light);background-image:repeating-linear-gradient(92deg,#ffffff12 0px,#ffffff00 3px,#7c4c1919 7px,#ffffff04 11px),linear-gradient(120deg,#ffffff16,#b67f2a0d);box-shadow:inset 0 1px 0 #fff3,inset 0 -1px 1px #4f2e1726}.wood-board .square.dark:not(.selected):not(.last){background-color:var(--board-dark)}
@media(min-width:1100px){body.fit-match .match-layout{grid-template-columns:minmax(0,1fr) var(--fit-board) minmax(0,1fr)!important;gap:18px}body.fit-match .board-column{grid-column:2;grid-row:1;gap:8px}body.fit-match .board-column>.player-card{display:flex!important;width:100%;height:52px;padding:6px 10px;margin:0;border-radius:12px;min-width:0;gap:10px}body.fit-match .player-card .avatar{width:35px;height:35px;border-radius:9px;flex-shrink:0}body.fit-match .player-card b{font-size:13px}body.fit-match .player-card small{font-size:9px}body.fit-match .player-card .turn-pill{display:none}body.fit-match .player-card>div:nth-child(2){min-width:0;flex:1}body.fit-match .player-card .player-clock{display:flex;align-items:center;justify-content:center;min-width:110px;height:40px;font:750 27px system-ui;letter-spacing:.5px;border:1px solid #d5d4c2;background:#dfddcedb;color:#555d60;border-radius:9px;padding:5px 12px;margin-left:auto;font-variant-numeric:tabular-nums}body.fit-match .player-card.turn-active .player-clock{background:#071827;color:#fff;border-color:#98c4d8;box-shadow:0 0 0 2px #90dedb22}body.fit-match .player-card .player-clock.clock-low{color:#ffacbd;background:#2e1524}body.fit-match .untimed-card{margin-left:auto;color:#d7e5ec;font-size:13px;font-weight:650}body.fit-match .board-hint{display:none}body.fit-match .match-panel{display:contents!important}body.fit-match .match-overview,body.fit-match .match-records,body.fit-match .match-tools{padding:14px;border:1px solid #bbd6e050;border-radius:15px;background:linear-gradient(140deg,#173b50f2,#102739f7);min-height:0}body.fit-match .match-overview{grid-column:1;grid-row:1;align-self:start}body.fit-match .match-records{grid-column:3;grid-row:1;align-self:stretch}body.fit-match .match-tools{grid-column:1;grid-row:1;align-self:end;display:block;border-top:1px solid #bbd6e050}body.fit-match .match-tools>h3{margin:0 0 10px;font:600 21px Georgia,serif;color:#ffe4a2}body.fit-match .panel-actions,body.fit-match .social-match-tools{display:flex;flex-direction:column;gap:6px;align-items:stretch}body.fit-match .panel-actions .text-button,body.fit-match .social-match-tools .text-button{justify-content:flex-start;text-align:left;min-height:35px;width:100%;font-size:13px;padding:7px 11px;border:1px solid #91b8cd48;border-radius:9px;background:#21485f55;color:#e4eff6}body.fit-match .social-match-tools{margin-top:6px}body.fit-match .social-match-tools .text-button{font-size:12px}body.fit-match .panel-actions .text-button svg{width:18px;height:18px;margin-right:5px}body.fit-match .panel-actions .danger{color:#ffb9c7}body.fit-match .sticker-turn-note{display:none}body.fit-match .summary-players{grid-template-columns:1fr 1fr!important;gap:7px}body.fit-match .summary-player{display:block;padding:7px}body.fit-match .summary-clock-row{display:none}body.fit-match .desktop-match-summary>h3{font-size:11px}body.fit-match .summary-royal{display:block;border:0;padding-top:5px}body.fit-match .summary-kid-art{display:none}body.fit-match .summary-royal b{font-size:9px}body.fit-match .summary-royal small{font-size:8px}body.fit-match .summary-last-move{font-size:10px;display:block}body.fit-match .summary-last-move span{display:none}body.fit-match .quality-summary{margin-top:12px;padding-top:10px;border-top:1px solid #9bbdcc33}body.fit-match .quality-summary>p{font-size:10px}body.fit-match .coach-lesson{display:block;margin-top:10px;padding:9px}body.fit-match .coach-lesson h3{margin-bottom:6px}body.fit-match .coach-lesson p{font-size:11px;line-height:1.5}body.fit-match .coach-lesson button{margin-top:7px}body.fit-match .match-panel h2{font-size:clamp(18px,1.5vw,26px)}body.fit-match .match-meta{font-size:10px}body.fit-match .computer-rival-note{font-size:9px;margin:7px 0;padding:6px}body.fit-match .desktop-match-summary{margin-top:8px;padding-top:7px}body.fit-match .summary-identity strong{font-size:11px}body.fit-match .summary-state{font-size:9px}
}
@media(max-width:1099px){.match-tools>h3{font-size:21px;color:#ffe5a6}.panel-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px}.panel-actions>.text-button{font-size:14px;min-height:42px;padding:9px;border:1px solid #93b7ce55;border-radius:10px}}

@media(min-width:1100px){body.fit-match .match-tools .text-button{margin:0!important;height:35px;min-height:35px;line-height:1.2;box-sizing:border-box}body.fit-match .panel-actions{gap:6px!important;padding:0!important;margin:0!important}body.fit-match .summary-classic{display:none}body.fit-match .match-records .desktop-match-summary{margin-top:8px;padding:7px 0;border-bottom:1px solid #99bed033}body.fit-match .match-records .desktop-match-summary>h3{margin-bottom:6px}body.fit-match .quality-summary .points-pending{display:none}body.fit-match .quality-summary>p{display:none}body.fit-match .quality-summary .review-replay{min-height:29px;padding:6px;font-size:11px}}

.search-changing-avatar{display:block;width:100%;height:100%;padding:2px;overflow:hidden}.search-changing-avatar>svg{display:block;width:100%;height:100%;animation:search-avatar-arrive .35s ease-out both}@keyframes search-avatar-arrive{from{opacity:.2;transform:translateY(8px) scale(.88)}to{opacity:1;transform:none}}.estimated-summary{padding-top:9px;margin-top:9px;border-top:1px solid #a3c6dc44}.estimated-summary>b{display:block;color:#f8e2aa;font-size:13px;margin-bottom:6px}.estimated-summary .quality-sides{font-size:13px;gap:12px}.estimated-summary .quality-sides b{font-size:18px}
@media(min-width:1100px){body.fit-match .match-panel h2{font-size:clamp(23px,1.8vw,31px);margin:10px 0}body.fit-match .match-meta{font-size:13px;line-height:1.6}body.fit-match .panel-head .eyebrow{font-size:11px}body.fit-match .connection{font-size:12px}body.fit-match .computer-rival-note,body.fit-match .match-reward{font-size:12px;line-height:1.5;padding:8px 10px}body.fit-match .match-tools>h3{font-size:24px;margin:0 0 12px}body.fit-match .match-tools .text-button{height:41px;min-height:41px;font-size:15px!important;padding:8px 12px;line-height:1.25}body.fit-match .panel-actions,body.fit-match .social-match-tools{gap:7px!important}body.fit-match .social-match-tools{margin-top:7px}body.fit-match .captured-heading h3,body.fit-match .journal-head h3,body.fit-match .desktop-match-summary>h3{font-size:15px}body.fit-match .captured-heading>small,body.fit-match .captured-label,body.fit-match .captured-label>span{font-size:11px}body.fit-match .summary-identity strong{font-size:14px}body.fit-match .summary-state,body.fit-match .summary-side{font-size:11px}body.fit-match .summary-royal b{font-size:11px}body.fit-match .summary-royal small{font-size:10px}body.fit-match .summary-last-move b{font-size:13px}body.fit-match .journal-columns,body.fit-match .journal-pages{font-size:12px}body.fit-match .move-row{font-size:13px;min-height:27px;padding:6px 4px}body.fit-match .move-row small{font-size:12px}body.fit-match .record-tabs button{font-size:13px;padding:7px 10px}body.fit-match .online-result .result-story h2{font-size:25px}body.fit-match .online-result .result-story p,body.fit-match .online-result .result-rating,body.fit-match .online-result .result-bonus{font-size:12px;line-height:1.5}body.fit-match .online-result .result-story .eyebrow{font-size:10px}body.fit-match .online-result .result-coins b{font-size:21px}body.fit-match .online-result .result-coins small{font-size:10px}body.fit-match .online-result button{font-size:13px;min-height:36px}body.fit-match .free-match-summary b{font-size:18px}body.fit-match .free-match-summary span{font-size:12px}body.fit-match .player-card b{font-size:15px}body.fit-match .player-card small{font-size:11px}}
@media(prefers-reduced-motion:reduce){.search-changing-avatar>svg{animation:none}}

.panel-actions>[hidden]{display:none!important}

.record-tabs{justify-content:flex-start;gap:8px;flex-wrap:wrap;margin:0 0 13px}.record-tabs button[aria-pressed=true]{border-color:#e7cf8f;color:#ffe6ad;background:#315f7b}.match-records>[hidden]{display:none!important}

@media(min-width:1100px){body.fit-match .board-column{gap:6px}body.fit-match .board-column>.player-card{height:52px!important;min-height:52px!important;max-height:52px;padding:4px 9px;box-sizing:border-box}body.fit-match .player-card>div:nth-child(2){overflow:hidden}body.fit-match .player-card b,body.fit-match .player-card small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* Compact side rails leave the largest possible square board at the centre. */
.match-options{position:relative;z-index:30}.match-options>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;border:1px solid #abcde77a;border-radius:11px;padding:12px 14px;font-size:17px;font-weight:700;color:#ffe5a4;background:#234b65}.match-options>summary::-webkit-details-marker{display:none}.match-options>summary:focus-visible{outline:2px solid #ffe4a0}.match-options[open]>summary{border-color:#ffe4a0}.options-menu{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#153349;border:1px solid #a7cce1;border-radius:12px;padding:10px;box-shadow:0 12px 30px #081623bb}.match-tools .tiny-note{display:none}.match-chat{min-width:0}.chat-computer{font-size:12px;color:#c1dcec;line-height:1.4;margin:6px 0}.chat-message{padding:8px 10px;background:#23455c;border:1px solid #9bbbc92b;border-radius:9px;margin:7px 0;overflow-wrap:anywhere}.chat-message>b{display:block;font-size:12px;color:#ffe2a1}.chat-message p{padding:0;margin:4px 0 0;font-size:14px;line-height:1.45;background:none}.chat-sticker{display:block;width:65px;height:65px;margin-top:4px}.chat-sticker>*{width:100%;height:100%;max-height:65px}.chat-expressions{display:flex;align-items:center;gap:10px;margin-top:8px}.chat-expressions button{font-size:14px;padding:8px 12px}.chat-expressions small{font-size:11px;color:#c3dfed}
@media(min-width:1100px){
 body.fit-match header{height:52px;padding:4px 0}body.fit-match header .brand img{width:39px;height:39px}body.fit-match .back-row{height:24px}
 body.fit-match .match-layout{width:100%;max-width:calc(var(--fit-board) + 696px)!important;margin:0 auto!important;grid-template-columns:minmax(0,1fr) var(--fit-board) minmax(0,1fr)!important;gap:18px}
 body.fit-match .board-column{gap:4px}body.fit-match .board-column>.player-card{height:44px!important;min-height:44px!important;max-height:44px;padding:3px 9px}body.fit-match .player-card .player-clock{height:36px;font-size:27px}.player-card .avatar{width:32px;height:32px}
 body.fit-match .match-left{grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:12px;min-height:0;min-width:0}body.fit-match .match-overview{padding:12px;flex:none}body.fit-match .match-tools{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:0;border:0;background:none;flex:1;min-height:0}body.fit-match .match-chat{padding:12px;border:1px solid #bbd6e050;border-radius:15px;background:linear-gradient(140deg,#173b50f2,#102739f7)}body.fit-match .match-chat h3{font-size:17px}body.fit-match .chat-heading button{font-size:12px}body.fit-match .chat-form input{font-size:14px;padding:9px}body.fit-match .chat-form button{font-size:13px}.chat-notice{font-size:11px}body.fit-match .chat-message p{font-size:14px}.chat-messages{min-height:55px}.chat-messages>.chat-message{margin:5px 0;padding:6px 8px}body.fit-match .match-records{padding:12px}
 body.fit-match .summary-players{grid-template-columns:1fr!important}.match-records .summary-player{padding:8px}.chat-pagination{font-size:12px}.chat-pagination button{font-size:14px;padding:3px 12px}body.fit-match .match-tools .options-menu .text-button{font-size:15px!important;min-height:39px;height:39px}.match-tools .options-menu .social-match-tools{margin-top:7px}
 body.fit-match .record-tabs{gap:6px}body.fit-match .record-tabs button{font-size:13px;padding:7px 9px}body.fit-match .opening-note{font-size:12px;line-height:1.5;color:#ffe2a1;margin:8px 0 0}body.fit-match .match-records{align-self:start}body.fit-match .match-records .match-overview{padding:0;border:0;background:none}.match-records .match-overview[hidden]{display:none!important}body.fit-match .match-left{align-self:start}body.fit-match .chat-message p{max-width:100%}
}
@media(max-width:1099px){.match-left{display:flex;flex-direction:column;gap:12px}.match-tools{padding:12px}.match-chat{margin-top:15px}.options-menu{z-index:50}.match-options .panel-actions{display:flex!important;flex-direction:column}.match-options .text-button{min-height:40px;width:100%;text-align:left}}

.opening-alert{font-size:14px;font-weight:700;white-space:nowrap;color:#ffe4a3;padding:5px 8px;border:1px solid #f2d69277;border-radius:8px;background:#183348}.opening-urgent{color:#ff667d!important;font-weight:850!important;animation:opening-warning .65s steps(2,end) infinite!important}.opening-note.opening-urgent{padding:8px;border:1px solid #ff667d;border-radius:8px;background:#401b2dcc}@keyframes opening-warning{50%{color:#ffd2d9;text-shadow:0 0 12px #ff536b;box-shadow:0 0 0 2px #ff536b44}}@media(prefers-reduced-motion:reduce){.opening-urgent{animation:none!important}}body.reduced .opening-urgent{animation:none!important}

.chat-form .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(min-width:1100px){body.fit-match .board-frame{transition:none!important}}

.opponent-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.opponent-stat-grid>div{background:#173855;border:1px solid #a4ccdc55;border-radius:12px;padding:14px 7px;text-align:center}.opponent-stat-grid b{display:block;font-size:26px;color:#ffe2a0}.opponent-stat-grid span{font-size:12px}.opponent-achievements{display:grid;gap:8px;margin:14px 0}.opponent-achievements span{padding:10px;background:#18344e;border-radius:8px;color:#b9d0df}.opponent-achievements .earned{color:#ffe3a6}.friends-list{display:grid;gap:9px}.friends-list button{text-align:left;padding:12px}.friends-list b,.friends-list small{display:block}.friends-list small{margin-top:5px;color:#c0dcec}.chat-review-actions>p{font-size:12px;line-height:1.5}.chat-review-actions>button{font-size:12px;padding:8px;margin:4px 4px 0 0}.player-card button.avatar{cursor:pointer;color:inherit;display:grid;place-items:center;padding:0;border:1px solid #e3d299;flex-shrink:0}.player-card button.avatar:focus-visible{outline:3px solid #ffe3a0;outline-offset:2px}

.side-tabs{display:flex;gap:8px}.side-tabs button{font-size:14px;padding:9px 12px;border:1px solid #a8cddd70;background:#183a52;color:#e7f1f5;border-radius:9px}.side-tabs button[aria-pressed=true]{color:#ffe2a0;border-color:#e4cd8b}.match-tools .match-chat[hidden],.match-left>.online-result[hidden]{display:none!important}
@media(min-width:1100px){body.fit-match header,body.fit-match footer,body.fit-match .bottom-dock{display:none!important}body.fit-match #app{padding:0 18px!important}body.fit-match .back-row{height:22px}body.fit-match .match-left>.online-result{display:flex;flex-direction:column;align-items:stretch;padding:13px;margin:0;gap:10px}.match-left>.online-result .result-buttons{max-width:none;justify-content:flex-start}.match-left>.online-result .result-coins{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.match-left>.online-result .result-story h2{font-size:25px!important}.match-left>.online-result .result-coins b{font-size:20px!important}.match-left>.online-result .result-rating,.match-left>.online-result .result-bonus{font-size:12px;text-align:left}.match-left>.online-result .rematch-invitation{padding:9px}.match-left>.online-result .free-match-summary{text-align:left}.match-left>.online-result .result-buttons>button{font-size:13px}.match-left>.online-result .result-coins small{font-size:9px}.match-left>.online-result .result-bonus{line-height:1.4}.match-left>.online-result .coin-free-rewards{display:none}.match-left>.online-result .result-story p{font-size:13px}.match-left>.online-result .rematch-invitation span,.match-left>.online-result .rematch-invitation small{font-size:12px}body.fit-match .match-records{max-height:none}.match-records .summary-royal small{line-height:1.3}}

@media(min-width:1100px){body.fit-match .match-layout{max-width:none!important}body.fit-match .match-left .match-tools{align-self:stretch;flex:0 0 auto;width:100%;min-width:0}body.fit-match .match-options{width:100%;min-width:0}body.fit-match .match-options>summary{width:100%;gap:16px;min-height:46px;box-sizing:border-box}body.fit-match .match-options>summary>svg{flex:0 0 20px;transition:transform .15s}body.fit-match .match-options[open]>summary>svg{transform:rotate(180deg)}body.fit-match .options-menu{width:100%;box-sizing:border-box}.match-options .panel-actions,.match-options .social-match-tools{width:100%}body.fit-match .match-options .options-menu .text-button{display:flex;gap:8px;width:100%;white-space:nowrap;align-items:center;justify-content:flex-start}.match-left>.online-result .result-coins{grid-template-columns:1fr 1fr!important;padding:0!important;gap:12px!important}.match-left>.online-result .result-coins>div:last-child{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px solid #abc9dc33}.match-left>.online-result .result-coins small{white-space:nowrap;letter-spacing:.3px!important;font-size:10px!important}.match-left>.online-result .result-coins b{white-space:nowrap;font-variant-numeric:tabular-nums}.match-left>.online-result .result-coins>div:last-child b{margin:0;font-size:22px!important}.match-left>.online-result .result-buttons{display:grid!important;grid-template-columns:1fr 1fr;width:100%;gap:8px!important}.match-left>.online-result .result-buttons .text-button{grid-column:1/-1;text-align:center;justify-content:center}.match-left>.online-result .result-buttons>button{margin:0;width:100%;padding:9px!important;white-space:normal}}

/* Explicit user exception: conversation scrolls; the page and composer stay fixed. */
.match-chat .chat-messages{height:clamp(140px,24vh,280px);min-height:140px;max-height:280px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#91bdd0 #133149;padding-right:4px;outline-offset:3px}.chat-messages::-webkit-scrollbar{width:7px}.chat-messages::-webkit-scrollbar-track{background:#133149;border-radius:8px}.chat-messages::-webkit-scrollbar-thumb{background:#91bdd0;border-radius:8px}.chat-messages .chat-message{scroll-margin:8px}.match-chat .chat-form[hidden],.match-chat .chat-expressions[hidden],.match-chat .chat-review-actions[hidden]{display:none!important}.match-chat .chat-message{flex-shrink:0}

.match-options.opens-up>.options-menu{top:auto;bottom:calc(100% + 6px)}

.result-exit{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:43px;padding:10px 16px;border:1px solid #ff9bb0;border-radius:11px;background:linear-gradient(135deg,#ad2c4c,#7e203a);color:#fff1f5;font-size:15px;font-weight:750;cursor:pointer;box-shadow:0 3px 0 #3f1424}.result-exit:hover{background:linear-gradient(135deg,#c83c5e,#9a2944)}.result-exit:focus-visible{outline:3px solid #ffc2d0;outline-offset:3px}.match-left>.online-result .result-buttons .result-exit{grid-column:1/-1!important;background:linear-gradient(135deg,#ad2c4c,#7e203a);color:#fff1f5!important;border-color:#ff9bb0!important;min-height:43px!important;font-size:15px!important}
