
.games-hero{background:linear-gradient(135deg,#152c53,#273d73);color:white;padding:48px 0 40px}
.games-hero h1{font-size:clamp(30px,4vw,44px);margin:8px 0 9px}
.games-hero p{color:#d8e1fa;margin:0;max-width:710px}
.games-hero .breadcrumbs,.games-hero .breadcrumbs a{color:#a8cdfa}
.game-panel{background:white;border:1px solid #e0e9f5;border-radius:20px;padding:23px;box-shadow:0 8px 28px #1c31520b}
.game-frame{display:grid;grid-template-columns:minmax(0,350px) minmax(200px,1fr);gap:26px;justify-content:center;align-items:start;max-width:790px;margin:auto}
.play-surface{border-radius:15px;padding:16px;background:#12243e;box-shadow:0 10px 25px #12243e2e;display:flex;justify-content:center}
#block-board{display:block;width:min(100%,300px);height:auto;aspect-ratio:1/2;touch-action:none;border:2px solid #3f587a;background:#0c1c30;outline:none;border-radius:7px}
.game-info{display:grid;gap:13px}
.game-stat{background:#edf4fb;border:1px solid #d5e4f4;padding:12px 14px;border-radius:12px}
.game-stat span{display:block;color:#657997;font-size:12px;font-weight:750}
.game-stat strong{display:block;font-size:24px;color:#142d52}
.game-next{text-align:center}
#block-next{display:block;width:124px;height:124px;margin:6px auto 0;background:#10233c;border-radius:10px}
.game-button-row,.game-controls{display:flex;flex-wrap:wrap;gap:9px;margin-top:13px}
.game-btn{background:#285fce;color:white;padding:12px 16px;border:0;border-radius:11px;font-weight:800;min-height:46px}
.game-btn.alt{background:#e7f0ff;color:#2153ab}
.game-btn:disabled{opacity:.47;cursor:not-allowed}
.game-controls{justify-content:center;margin-top:18px}
.game-controls button{flex:0 1 66px;min-height:59px;font-size:23px;color:#183d6b;border:1px solid #c0d5ee;background:#eaf3ff;border-radius:12px;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.game-controls button.harddrop{flex:0 1 92px;font-size:14px;font-weight:800}
.game-msg{padding:12px 14px;background:#eaf4ff;border-radius:11px;color:#205a8d;font-size:14px;margin-top:14px;min-height:46px}
.game-help{font-size:14px;color:#5c7087;line-height:1.7;margin-top:16px}
.game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.game-grid .card{min-height:190px}
.game-grid .tag{margin-top:12px}
.game-grid .game-coming{background:#fafcff;color:#75849a;cursor:default}
.game-grid .game-coming:hover{transform:none;box-shadow:none;border-color:#e2e8f1}
.ttt-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;max-width:360px;margin:18px auto}
.ttt-cell{aspect-ratio:1/1;border:1px solid #c7d9ed;border-radius:13px;background:#f1f7fd;color:#2559b5;font-size:clamp(42px,6vw,72px);font-weight:800;display:grid;place-items:center;line-height:1;min-width:0}
.ttt-cell:disabled{cursor:default}.ttt-cell.x{color:#1c6ab2}.ttt-cell.o{color:#ce7256}.ttt-cell.winner{background:#d7f6d9;border-color:#71bf83}
.ttt-bar{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;align-items:center}
.ttt-bar label{font-weight:700;color:#435a78;font-size:14px}.ttt-bar select{border:1px solid #cbd9e7;border-radius:9px;padding:11px;max-width:240px}
@media(max-width:710px){.game-frame{grid-template-columns:1fr}.game-info{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.game-info .game-next{grid-column:span 2}.game-info .game-button-row,.game-info .game-msg{grid-column:span 2}.game-stat{padding:9px}.game-stat strong{font-size:20px}.game-panel{padding:14px}.game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:510px){.game-grid{grid-template-columns:1fr}.play-surface{padding:9px}.game-controls{gap:6px}.game-controls button{flex:1 1 46px;min-width:45px;padding:7px}.game-controls button.harddrop{flex:1 1 80px}}

/* Версия 21: комнаты и новые игры */
.room-panel{border-top:1px solid #dae6f0;margin-top:24px;padding-top:18px}.room-panel h2{font-size:20px}.room-panel[hidden],#room-active[hidden],#room-open[hidden],#chess-promotion[hidden]{display:none!important}.room-join-label{font-size:13px;font-weight:700;color:#355779;display:grid;gap:4px}.room-join-label input,.room-url input{min-width:0;border:1px solid #cad9e8;border-radius:9px;padding:10px;font-size:15px}.room-url{display:flex;gap:10px;flex-wrap:wrap}.room-url input{flex:1 1 250px}.sea-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.sea-layout h2{font-size:17px}.sea-board{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:1px;background:#9eb9d3;border:2px solid #9eb9d3;max-width:430px;aspect-ratio:1/1}.sea-cell{min-width:0;aspect-ratio:1/1;border:0;border-radius:0;background:#ecf6fc;display:grid;place-items:center;padding:0;font-size:clamp(9px,1.6vw,19px);color:#2673af}.sea-cell:not(:disabled):hover{background:#c2e5ff}.sea-cell.ship{background:#7ca2ba;color:#183e57}.sea-cell.hit{background:#f5a3a3;color:#8c1731;font-weight:bold}.sea-cell.miss{background:#d3e4ee;color:#617d96}.sea-cell:disabled{cursor:default}.chess-layout{display:grid;grid-template-columns:minmax(0,470px) minmax(170px,1fr);gap:22px;margin-top:16px}.chess-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:min(100%,470px);aspect-ratio:1/1;border:3px solid #8d6a49}.chess-square{min-width:0;aspect-ratio:1/1;border:0;border-radius:0;padding:0;font-family:'DejaVu Sans','Segoe UI Symbol',sans-serif;font-size:clamp(23px,4.2vw,49px);line-height:1;display:grid;place-items:center;overflow:hidden}.chess-square.light{background:#f0d9b5}.chess-square.dark{background:#b58863}.chess-square.white-piece{color:#fffdf4;-webkit-text-stroke:1px #303030;text-shadow:1px 2px 2px #252525}.chess-square.black-piece{color:#16191c;text-shadow:0 1px #f5ede2}.chess-square.selected{box-shadow:inset 0 0 0 5px #f4d94b}.chess-square.target{box-shadow:inset 0 0 0 6px #4caf71}.chess-log{color:#355579;line-height:2;overflow-wrap:anywhere}.chess-promo{margin:12px 0}.chess-promo button,.sdk-numbers button{min-height:40px;border-radius:9px;border:1px solid #a9c0d9;background:#eef6ff;color:#204b82;font-weight:800;padding:8px;margin:3px}.sdk-panel{max-width:710px;margin:auto}.sdk-board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));width:min(100%,500px);margin:20px auto;border:3px solid #354b69;aspect-ratio:1/1}.sdk-cell{min-width:0;aspect-ratio:1/1;border:1px solid #9caec0;border-radius:0;padding:0;display:grid;place-items:center;background:#fff;font-size:clamp(17px,3vw,29px);font-weight:650;color:#2868b4}.sdk-cell.fixed{background:#edf2f8;color:#233b58}.sdk-cell.picked{background:#c7e4ff}.sdk-cell.conflict{color:#c73232;background:#ffebeb}.sdk-numbers{display:flex;flex-wrap:wrap;justify-content:center}.sdk-numbers button{min-width:38px;font-size:18px}.sdk-panel .game-button-row{justify-content:center}
@media(max-width:800px){.sea-layout,.chess-layout{grid-template-columns:1fr}.sea-board{max-width:430px}.chess-layout{justify-items:center}.chess-layout>div{width:100%;max-width:470px}}@media(max-width:420px){.sea-layout{gap:16px}.sea-cell{font-size:12px}.chess-square{font-size:clamp(28px,8vw,42px)}.room-join-label{width:100%}}

/* Версия 22: поиск соперника и чат */
#room-search-cancel[hidden],#room-chat[hidden],#room-chat-form[hidden],#room-chat-log[hidden],#room-chat-quick[hidden]{display:none!important}
.room-chat{border:1px solid #d8e5f2;border-radius:15px;margin-top:20px;padding:15px;background:#f8fbff;max-width:740px}
.room-chat-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}.room-chat h3{font-size:18px;margin:0}.room-mute{font-size:14px;color:#395776;display:flex;align-items:center;gap:8px}.room-mute input{width:18px;height:18px}
.room-chat-log{height:185px;overflow-y:auto;background:white;border:1px solid #d7e4f2;padding:12px;border-radius:12px;margin-top:12px;display:flex;flex-direction:column;gap:9px}.room-chat-message{border-radius:9px;padding:8px 11px;margin:0;max-width:90%;align-self:flex-start;background:#edf3fb;overflow-wrap:anywhere}.room-chat-message.mine{align-self:flex-end;background:#dcf4e9}.room-chat-form{display:flex;gap:9px;margin-top:12px}.room-chat-form input{min-width:0;flex:1;border-radius:9px;border:1px solid #c6d8ea;padding:12px}.room-chat .game-btn{min-height:40px;padding:9px 12px;font-size:13px}.room-chat .game-button-row{gap:7px}.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:460px){.room-chat{padding:10px}.room-chat-form{flex-wrap:wrap}.room-chat-form input{flex:1 1 100%}.room-chat .game-button-row button{flex:1 1 120px}}
