/* v8: never flash stale server-rendered cards before live API catalog arrives */
.catalog-section#games > .game-grid{display:none!important}
.sgr-catalog-loading-grid{min-height:420px}
.sgr-catalog-skeleton{border:1px solid #6c4a5530;border-radius:22px;padding:14px;background:#fff9f6;min-height:390px;overflow:hidden}
.sgr-skeleton-cover,.sgr-skeleton-line,.sgr-skeleton-pill{background:linear-gradient(90deg,#eadfe0 25%,#f7eff0 37%,#eadfe0 63%);background-size:400% 100%;animation:sgr-skeleton 1.25s ease-in-out infinite}
.sgr-skeleton-cover{aspect-ratio:16/9;border-radius:14px;margin-bottom:16px}
.sgr-skeleton-line{height:19px;border-radius:9px;margin:10px 2px}
.sgr-skeleton-line.short{width:62%}
.sgr-skeleton-line.tiny{width:42%;height:14px}
.sgr-skeleton-pills{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:20px}
.sgr-skeleton-pill{height:42px;border-radius:12px}
.sgr-catalog-error{grid-column:1/-1;color:#755f67;border:1px dashed #6c4a5538;border-radius:18px;padding:32px;text-align:center;background:#fff9f6}
@keyframes sgr-skeleton{0%{background-position:100% 0}100%{background-position:0 0}}
/* Secret Game Room catalog v6 — cards aligned with the desktop app reference */
.sgr-original-grid-hidden{display:none!important}
.sgr-game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.sgr-game-card{--card:#0b2b20;--card-border:#315e4e;--accent:#3f9d73;--accent2:#62c295;color:#f7f7f2;background:var(--card);border:1px solid var(--card-border);border-radius:22px;min-width:0;overflow:hidden;box-shadow:0 18px 44px #43172518;transition:transform .22s ease,box-shadow .22s ease}
.sgr-card-theme-1{--card:#2c2024;--card-border:#634850;--accent:#ef82aa;--accent2:#ffabd0}
.sgr-card-theme-2{--card:#16182b;--card-border:#444d78;--accent:#7762b2;--accent2:#a38ee1}
.sgr-game-card:hover{transform:translateY(-4px);box-shadow:0 25px 55px #3410182b}
.sgr-card-main{appearance:none;text-align:left;color:inherit;background:transparent;border:0;width:100%;padding:0;display:block;cursor:pointer;font:inherit}
.sgr-card-cover{aspect-ratio:16/9;border-radius:16px;margin:12px 12px 0;overflow:hidden;background:#09110e;position:relative}
.sgr-card-cover img{width:100%;height:100%;display:block;object-fit:cover}
.sgr-card-cover-placeholder{width:100%;height:100%;display:grid;place-items:center;font-size:42px;font-weight:850;color:#fff4}
.sgr-card-copy{padding:20px 20px 14px}
.sgr-game-card h3{color:#fff;letter-spacing:-.045em;margin:0;font-size:clamp(23px,2vw,30px);line-height:1.08;min-height:2.16em}
.sgr-game-card .sgr-card-copy>p{color:#b5c6bf;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:3.2em;margin:18px 0 20px;font-size:16px;line-height:1.55}
.sgr-card-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;border-top:1px solid #ffffff17;padding-top:16px}
.sgr-card-facts>div{min-width:0;text-align:center}
.sgr-card-facts small{color:#aebcb6;display:block;margin-bottom:7px;font-size:12px;font-weight:750;line-height:1.15}
.sgr-card-facts strong{color:#f8f8f3;font-size:15px;font-weight:820;line-height:1.15;white-space:nowrap}
.sgr-card-facts .sgr-difficulty{display:inline-flex;justify-content:center;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.sgr-card-bottom{border-top:1px solid #ffffff17;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px 16px;padding:15px 20px 19px}
.sgr-card-author{min-width:0;color:#f7f7f2;font-size:14px;font-weight:760;line-height:1.25}
.sgr-author-inline{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;font:inherit}
.sgr-author-inline a{color:inherit;font:inherit;text-decoration:none}
.sgr-author-inline a:hover{text-decoration:underline;text-underline-offset:3px}
.sgr-creator-empty{color:#91a098;font-size:14px;font-weight:760}
.sgr-card-price{font-size:21px;line-height:1.1;white-space:nowrap}
.sgr-card-more{grid-column:1/-1;color:#fff;background:var(--accent);border:1px solid var(--accent2);border-radius:13px;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:48px;font-size:16px;font-weight:820;cursor:pointer;transition:filter .18s,transform .18s}
.sgr-card-more:hover{filter:brightness(1.08)}.sgr-card-more:active{transform:translateY(1px)}
.sgr-catalog-empty{grid-column:1/-1;color:#755f67;border:1px dashed #6c4a5538;border-radius:18px;padding:32px;text-align:center}

.sgr-modal-open{overflow:hidden}
.sgr-detail-overlay[hidden]{display:none}.sgr-detail-overlay{position:fixed;z-index:9999;inset:0;display:grid;place-items:center;padding:28px}
.sgr-detail-backdrop{position:absolute;inset:0;background:#050708d9;backdrop-filter:blur(10px)}
.sgr-detail-shell{position:relative;color:#f5fbf7;background:linear-gradient(135deg,#061812,#0c2f23 78%);border:1px solid #7e6938aa;border-radius:20px;width:min(1440px,96vw);max-height:92vh;overflow:auto;padding:24px;box-shadow:0 45px 110px #0009}
.sgr-detail-close{position:sticky;z-index:3;top:0;float:right;color:#fff;background:#0b0b0bd9;border:1px solid #ffffff30;border-radius:999px;width:42px;height:42px;font-size:28px;line-height:1;cursor:pointer}
.sgr-detail-title{clear:both;color:#fff;letter-spacing:-.045em;margin:0 54px 24px 0;font-size:clamp(38px,4vw,62px);line-height:1}
.sgr-detail-panel{border:1px solid #8c733daa;border-radius:18px;display:grid;grid-template-columns:minmax(0,1fr) minmax(480px,.98fr);gap:26px;padding:24px}
.sgr-detail-left,.sgr-detail-right{min-width:0}
.sgr-detail-cover{aspect-ratio:16/9;border:1px solid #8a724f7d;border-radius:16px;overflow:hidden;background:#07110d}
.sgr-detail-cover img{width:100%;height:100%;display:block;object-fit:cover}
.sgr-detail-description h3,.sgr-rounds h3{color:#f5faf6;letter-spacing:-.035em;margin:20px 0 9px;font-size:27px}
.sgr-detail-description h3{color:#3f9d73;font-size:20px}
.sgr-detail-description p{color:#eef4f0;margin:0;font-size:18px;font-weight:650;line-height:1.5}
.sgr-detail-commerce{display:flex;align-items:end;justify-content:space-between;gap:16px;border-top:1px solid #ffffff19;margin-top:20px;padding-top:16px}
.sgr-detail-author{color:#fff;font-size:16px;font-weight:800;line-height:1.3}.sgr-detail-author a,.sgr-detail-author>span{color:inherit;font:inherit}.sgr-detail-author a{text-decoration:none}.sgr-detail-author a:hover{text-decoration:underline;text-underline-offset:3px}.sgr-detail-price{display:grid;gap:4px;text-align:right}.sgr-detail-price small{color:#9db0a7;font-size:12px;font-weight:720}.sgr-detail-price strong{font-size:28px}
.sgr-detail-consent{color:#bac8c1;display:flex;align-items:flex-start;gap:10px;margin-top:18px;font-size:12px;line-height:1.45}.sgr-detail-consent input{accent-color:#3f9d73;margin-top:2px;flex:0 0 auto}.sgr-detail-consent a{color:#fff;text-decoration:underline;text-underline-offset:2px}
.sgr-buy-button{color:#fff;background:#2f865f;border:1px solid #60bc91;border-radius:14px;width:100%;height:58px;margin-top:13px;font-size:20px;font-weight:850;cursor:pointer}.sgr-buy-button:disabled{opacity:.55;cursor:wait}.sgr-buy-status{color:#ffacb9;min-height:20px;margin:8px 0 0;font-size:12px}
.sgr-detail-facts{border:1px solid #315347;border-radius:14px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:12px}
.sgr-detail-facts>div{text-align:center;min-width:0;padding:4px 5px}.sgr-detail-facts small{color:#d1ddd7;display:block;margin-bottom:9px;font-size:12px;font-weight:760}.sgr-detail-facts strong{color:#fff;font-size:18px;font-weight:850;white-space:nowrap}.sgr-difficulty-pill{color:#7f2028!important;background:#ffd0d4;border-radius:999px;display:inline-block;padding:7px 13px;font-size:14px!important}
.sgr-rounds h3{margin-top:22px}.sgr-round-row{border:1px solid #315347;border-radius:11px;display:grid;grid-template-columns:125px minmax(0,1fr) 120px;align-items:center;gap:14px;margin-top:9px;padding:10px 13px;font-size:15px}.sgr-round-row strong{font-size:17px}.sgr-round-row span{font-weight:720}.sgr-round-row b{color:#c9d7d0;text-align:right;font-size:14px;white-space:nowrap}.sgr-no-rounds{color:#9fb1a8;border:1px dashed #315347;border-radius:12px;padding:18px}
.sgr-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.sgr-tags span{color:#b7c5be;background:#0a241b;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:720}
.sgr-detail-loading{min-height:380px;display:grid;place-items:center;color:#b7c6bf;font-size:17px}

@media(max-width:1080px){.sgr-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sgr-detail-panel{grid-template-columns:1fr}.sgr-detail-facts{grid-template-columns:repeat(5,minmax(90px,1fr));overflow-x:auto}}
@media(max-width:720px){.sgr-game-grid{grid-template-columns:1fr}.sgr-game-card h3{min-height:auto}.sgr-detail-overlay{padding:8px}.sgr-detail-shell{width:100%;max-height:96vh;border-radius:16px;padding:14px}.sgr-detail-panel{padding:13px}.sgr-detail-title{font-size:34px}.sgr-detail-facts{grid-template-columns:repeat(2,1fr);overflow:visible}.sgr-round-row{grid-template-columns:90px 1fr}.sgr-round-row b{grid-column:2;text-align:left}.sgr-card-facts small{font-size:11px}.sgr-card-facts strong{font-size:14px}.sgr-detail-commerce{align-items:start;flex-direction:column}.sgr-detail-price{text-align:left}}

/* v9: first six cards come from static Yandex-hosted catalog preview; the rest load on demand */
.sgr-catalog-controls{display:flex;justify-content:center;margin:28px 0 2px}
.sgr-catalog-controls[hidden]{display:none}
.sgr-load-more{appearance:none;border:1px solid #7e4f5f;background:#fff7f4;color:#5f263d;border-radius:999px;min-width:210px;height:52px;padding:0 28px;font:inherit;font-size:16px;font-weight:820;cursor:pointer;box-shadow:0 10px 28px #5d173116;transition:transform .18s ease,background .18s ease,box-shadow .18s ease}
.sgr-load-more:hover{background:#fff0ee;transform:translateY(-1px);box-shadow:0 14px 32px #5d173123}
.sgr-load-more:disabled{opacity:.58;cursor:wait;transform:none}

.sgr-detail-hero{overflow:hidden;margin:0 0 18px;border-radius:20px;background:#111}.sgr-detail-hero img{display:block;width:100%;max-height:360px;object-fit:cover}

/* v17.7 dynamic legal content */
.legal-article .legal-action-button{appearance:none;border:1px solid currentColor;border-radius:10px;background:transparent;color:inherit;padding:9px 12px;cursor:pointer;font:inherit}
.legal-article table{width:100%;border-collapse:collapse;margin:18px 0;display:block;overflow:auto}
.legal-article th,.legal-article td{padding:10px 12px;border:1px solid rgba(40,58,49,.18);text-align:left;vertical-align:top}
