.hero{background:linear-gradient(115deg,#102b53,#521c30)}.promo{background:linear-gradient(120deg,#132e50,#3d273b)}.game-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.game-toolbar p{margin:8px 0}.game-slot{display:block!important;background:#35141d!important;padding:clamp(8px,2vw,24px)!important}.board{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:clamp(2px,.6vw,7px);max-width:1020px;margin:auto}.tile{padding:0;border:2px solid transparent;border-radius:3px;background:#501c27;aspect-ratio:81/93;cursor:pointer;overflow:hidden}.tile img{display:block;width:100%;height:100%}.tile:focus-visible{outline:3px solid #62bfff;outline-offset:2px;position:relative;z-index:1}.tile:not(:disabled):hover{border-color:#dbeefa}.tile:disabled{cursor:default}.tile.matched{opacity:.35}.result{padding:18px;text-align:center;color:#102b53}.result strong{font-size:1.3rem}@media(max-width:600px){.game-toolbar{font-size:14px}.board{gap:2px}.tile{border-width:1px}}
@media(max-width:600px){.board{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.tile{min-height:44px}.hero__content{max-width:100%}.game-card:fullscreen .game-inner,.game-card.is-expanded .game-inner{width:100%}.game-card:fullscreen,.game-card.is-expanded{display:block}}
@media(max-height:500px){.game-card:fullscreen .game-inner,.game-card.is-expanded .game-inner{width:100%}.game-card:fullscreen,.game-card.is-expanded{display:block}}
.tile{will-change:transform}.tile.matched{visibility:hidden;pointer-events:none}@media(prefers-reduced-motion:reduce){.tile{animation:none!important;transition:none!important}}
.ranking-opt{position:relative;display:inline-flex;align-items:center;background:rgba(9,28,51,.35);border:1px solid rgba(255,255,255,.72);border-radius:12px}.ranking-opt #ranking-toggle{border:0;background:transparent}.ranking-help{width:19px;height:19px;padding:0;margin:0 12px 0 0;border:1px solid white;border-radius:50%;background:transparent;color:white;line-height:17px;cursor:pointer}.ranking-info{position:absolute;z-index:4;top:calc(100% + 8px);right:0;width:min(300px,80vw);padding:14px;border-radius:12px;background:white;color:#102b53;box-shadow:0 8px 26px #0004;font-size:13px}.ranking-info[hidden]{display:none}#ranking-status{font-size:13px}#records{margin-top:18px;color:#102b53}#records table{border-collapse:collapse;width:100%;margin-top:12px}#records th,#records td{padding:8px;text-align:left;border-bottom:1px solid #dce5eb}#records summary:focus-visible{outline:3px solid #62bfff;outline-offset:3px}

.game-toolbar{margin-top:14px}

.game-intro{display:block;width:100%;aspect-ratio:1024/690;border:0;padding:0;background:#38121a url("assets/intro.png") center/contain no-repeat;cursor:pointer}.game-intro[hidden]{display:none}.game-intro:focus-visible{outline:3px solid #62bfff;outline-offset:3px}.game-intro:not([hidden]) + .board{display:none}

.promo{background:linear-gradient(90deg,rgba(6,25,51,.86),rgba(6,25,51,.75)),url("https://library.magicalnancy.ru/assets/nancy-game-21-hero.webp") center/cover no-repeat}

.hero:before{background:linear-gradient(90deg,rgba(9,16,35,.42),transparent 75%),var(--hero-image) center/cover no-repeat;mask-image:none;-webkit-mask-image:none}

.page{width:min(1320px,calc(100% - 40px))}.game-inner{max-width:1200px}.board{max-width:1120px}.game-slot{min-height:0;overflow-x:auto}.game-card:fullscreen .game-inner,.game-card.is-expanded .game-inner{width:100%;max-width:1200px}@media(max-width:600px){.page{width:calc(100% - 28px)}}@media(max-width:900px) and (orientation:landscape) and (pointer:coarse){.board{grid-template-columns:repeat(10,minmax(44px,1fr));min-width:490px}.game-slot{padding:8px!important}.tile{min-height:44px}}

.game-slot{position:relative}#records{position:absolute;z-index:5;inset:0;margin:0;padding:clamp(14px,3vw,30px);overflow:auto;background:rgba(255,255,255,.98);color:#102b53}#records[hidden]{display:none}.records-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.records-head h2{margin:0;font-size:clamp(18px,2.5vw,26px)}#records-close{width:40px;height:40px;flex:none;border:1px solid #dce5eb;border-radius:50%;background:#f7f9fb;color:#102b53;font-size:26px;line-height:1;cursor:pointer}#records-close:hover{background:#e8f2f8}#records-close:focus-visible{outline:3px solid #62bfff;outline-offset:2px}

/* Таблица результатов в оформлении «Парных карт». */
#records{inset:4% 7%;padding:clamp(16px,3vw,34px);border:1px solid rgba(255,255,255,.68);border-radius:16px;background:linear-gradient(145deg,rgba(69,8,17,.94),rgba(25,5,12,.96)),url("assets/back.png") repeat;box-shadow:0 14px 40px rgba(0,0,0,.48);color:#fff}#records h2{color:#fff;text-shadow:0 2px 5px #17030a}#records #ranking-list-status{color:#f7e6e7;line-height:1.5}#records table{border-collapse:separate;border-spacing:0 5px;font-variant-numeric:tabular-nums;color:#fff}#records th,#records td{padding:clamp(8px,1.2vw,14px);border:0;background:rgba(255,255,255,.10);text-align:left}#records th{background:rgba(9,28,51,.52);font-weight:800}#records th:first-child,#records td:first-child{border-radius:8px 0 0 8px;width:18%}#records th:last-child,#records td:last-child{border-radius:0 8px 8px 0;white-space:nowrap}#records-close{background:#f7f9fb;border:1px solid #dce5eb;color:#102b53}#records-close:hover{background:#e8f2f8;border-color:#c7d5e0}#records-close:focus-visible{outline:3px solid #62bfff;outline-offset:3px}@media(max-width:600px){#records{inset:2%;padding:14px;border-radius:12px}#records th,#records td{padding:8px 6px;font-size:13px}#records .records-head h2{font-size:18px}}
