/* Shared layout refresh. Original theme tokens and horror palette are retained. */
:root { --sidebar-width: 0px; --main-column-max: 1580px; }
.page { margin-left: 0; padding: 28px 28px 56px; }
.site-footer { margin-left: 0; padding: 30px 28px; }
.footer-inner { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr); max-width: 1580px; margin: auto; gap: 28px; }
.footer-inner > nav[aria-label="Footer"] { justify-content: flex-end; }
.footer-inner .footer-categories { justify-self: center; }
.footer-categories .category-list { display: flex; flex-flow: row wrap; justify-content: center; gap: 8px; max-width: 500px; }
.footer-categories .category-list a { width: 44px; height: 44px; }
.footer-categories .category-list .label { left: 50%; top: auto; bottom: 54px; transform: translateX(-50%); width: max-content; max-width: 210px; white-space: normal; text-align: center; }
.footer-categories .category-list a:is(:hover,:focus-visible) .label { opacity: 1; transform: translateX(-50%); }
.footer-categories a[aria-current="page"] { box-shadow: 0 0 0 2px var(--accent); }

/* One card treatment across home, detail, category, tag and search pages. */
body .game-card { position: relative; display: block; min-width: 0; min-height: 0; width: 100%; height: auto; aspect-ratio: 1; overflow: hidden; isolation: isolate; border-radius: 14px; background: var(--panel-2); animation: none; opacity: 1; transform: none; transition: transform 260ms ease, box-shadow 260ms ease; }
body .game-card img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0; transition: transform 480ms ease, filter 300ms ease; }
body .game-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 18%, #090c121f 36%, #090c12cc 70%, #05070bfa 100%); opacity: 0; pointer-events: none; transition: opacity 280ms ease; }
body .game-card .title { position: absolute; inset: auto 0 0; z-index: 2; padding: 32px 14px 15px; margin: 0; background: none; color: #fff; font-size: 20px; font-weight: 700; line-height: 1.15; text-shadow: 0 2px 5px #000; opacity: 0; transform: translateY(14px) scale(.96); transform-origin: left bottom; transition: opacity 220ms ease, transform 340ms ease; }
body .game-card .title::before { content: ""; display: block; width: 7px; height: 7px; margin-bottom: 7px; border-radius: 3px; background: #b82833; }
body .game-card:is(:hover,:focus-visible) { transform: translateY(-4px); box-shadow: 0 12px 24px #0005; }
body .game-card:is(:hover,:focus-visible)::after { opacity: 1; }
body .game-card:is(:hover,:focus-visible) .title { opacity: 1; transform: none; }
body .game-card:is(:hover,:focus-visible) img { transform: scale(1.085) rotate(-1deg); filter: saturate(1.12); }
body .recommend-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
body.catalog-page .recommend-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
body .recommend-grid .game-card.wide { min-height: 0; aspect-ratio: 1; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; }

.playable-page { max-width: 1636px; margin-inline: auto; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; align-items: start; }
.detail-main, .detail-side-column { min-width: 0; display: grid; gap: 22px; align-content: start; }
.detail-player { width: 100%; margin: 0; border-radius: 18px; overflow: hidden; box-shadow: none; }
.detail-player .embed-frame { aspect-ratio: 16 / 9; }
.detail-player .embed-frame iframe { display: block; width: 100%; height: 100%; }
.player-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; background: var(--panel); }
.player-toolbar > span { font-size: 20px; font-weight: 700; }
.player-toolbar .cta-group { width: auto; flex-wrap: wrap; gap: 8px; }
.player-toolbar button { width: auto; padding: 9px 12px; font-size: 13px; }
.quick-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quick-card, .game-summary, .detail-side, .detail-recommendations, .guide-block, .guide-tabs, .detail-side-column #comments { background: var(--panel); border-radius: 18px; padding: 24px; box-shadow: none; }
.quick-card { border-top: 0; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; font-size: 14px; letter-spacing: .09em; font-weight: 700; color: var(--accent-2); }
.quick-card ul { padding-left: 19px; margin: 0; font-size: 17px; line-height: 1.5; }
.quick-card li + li { margin-top: 8px; }
.mobile-control { color: var(--muted); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 15px; color: var(--muted); margin-bottom: 22px; }
.summary-heading { display: flex; align-items: center; gap: 18px; }
.summary-heading > img { flex: 0 0 80px; width: 80px; height: 80px; border-radius: 14px; object-fit: cover; }
.summary-heading > div { min-width: 0; }
.summary-heading h1 { font-family: var(--font-display); font-size: clamp(25px, 2.7vw, 38px); margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.summary-heading .eyebrow { margin-bottom: 6px; font-size: 12px; }
.game-summary .hero-subheadline { margin: 20px 0; max-width: none; color: var(--muted); font-size: 19px; line-height: 1.5; }
.game-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.stat { background: var(--panel-2); border-radius: 12px; padding: 14px; }
.stat dt { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.stat dd { margin: 0; font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.stat a { font-size: 16px; }
.stat a:hover, .breadcrumbs a:hover { text-decoration: underline; }
.detail-recommendations { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; padding: 16px; }
.detail-side { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; padding: 14px; }
.game-detail-page .embed-ad-slot { order: initial; }
.game-guide { gap: 22px; font-size: 18px; line-height: 1.7; min-width: 0; }
.game-guide h2 { margin: 0 0 20px; font: 700 25px/1.4 var(--font-display); }
.game-guide h3 { font: 700 22px/1.4 var(--font-display); margin: 0 0 20px; }
.game-guide h4 { font-size: 20px; margin: 24px 0 10px; line-height: 1.4; }
.game-guide p { font-size: inherit; line-height: inherit; color: var(--muted); margin: 0 0 16px; }
.game-guide li { margin-bottom: 10px; }
.game-guide .description-media { margin-block: 20px 0; }
.guide-tabs { padding: 24px; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px; border-radius: 12px; background: var(--panel-2); margin-bottom: 24px; }
.game-guide .guide-nav a { border: 0; padding: 10px 13px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: 16px; line-height: 1.3; text-decoration: none; }
.game-guide .guide-nav a:hover { background: var(--panel); }
.game-guide .guide-nav a[aria-selected="true"] { color: #fff; background: linear-gradient(145deg, #83171d, #430b10); }
.guide-panel { min-height: 300px; scroll-margin-top: 120px; }
.guide-panel[hidden] { display: none; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.game-guide table { width: 100%; font-size: 16px; }
.game-guide td, .game-guide th { padding: 12px; }
.game-guide hr { display: none; }
.detail-side-column #comments { margin: 0; padding: 22px; }
.detail-side-column #comments .comments-title { font-size: 22px; }
.detail-side-column #comments .comments-subtitle { font-size: 18px; }
.detail-side-column #comment-form { min-width: 0; }
body[data-theme="light"] .eyebrow { color: var(--text); }
@media (max-width: 1150px) {
 .detail-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 18px; }
 .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
 .footer-brand { align-items: center; }
 .footer-inner > nav[aria-label="Footer"] { justify-content: center; }
}
@media (max-width: 900px) {
 .detail-layout { grid-template-columns: minmax(0,1fr); }
 .detail-side { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .page { padding: 20px 14px 40px; }
 .site-footer { padding: 26px 14px; }
}
@media (max-width: 600px) {
 .detail-main, .detail-side-column { gap: 16px; }
 .quick-cards { grid-template-columns: minmax(0,1fr); }
 .quick-card, .game-summary, .guide-block, .guide-tabs { padding: 20px; }
 .summary-heading { align-items: flex-start; gap: 12px; }
 .summary-heading > img { flex-basis: 56px; width: 56px; height: 56px; }
 .summary-heading h1 { font-size: 25px; }
 .game-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .stat:last-child { grid-column: 1 / -1; }
 .detail-side { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 12px; }
 .detail-recommendations { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 12px; }
 body .recommend-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
 body.catalog-page .recommend-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 body .recommend-grid .game-card .title, .detail-recommendations .game-card .title { font-size: 13px; padding: 24px 8px 8px; }
 body .game-card .title { font-size: 17px; }
 body.catalog-page .recommend-grid .game-card .title { font-size: 17px; padding: 30px 12px 12px; }
 .game-guide { font-size: 17px; }
 .game-guide h2 { font-size: 23px; }
 .game-guide .guide-nav a { font-size: 15px; padding: 10px; }
 .player-toolbar { flex-wrap: wrap; padding: 12px; }
 .player-toolbar .cta-group { margin-left: auto; }
 .footer-categories .category-list { max-width: 320px; }
 .footer-categories .category-list .label { display: block; }
}
@media (hover: none) {
 body .game-card::after, body .game-card .title { opacity: 1; }
 body .game-card .title { transform: none; padding: 30px 12px 12px; }
}
@media (prefers-reduced-motion: reduce) {
 body .game-card, body .game-card img, body .game-card::after, body .game-card .title { transition: none; }
 body .game-card:is(:hover,:focus-visible), body .game-card:is(:hover,:focus-visible) img { transform: none; }
}
/* Keep footer tooltips within the centered navigation, including narrow phones. */
.footer-categories { position: relative; }
.footer-categories .category-list a { position: static; }
.footer-categories .category-list .label { bottom: calc(100% + 10px); }
.player-toolbar #fullscreen-button.primary { width: auto; font-size: 13px; letter-spacing: .02em; }
.player-toolbar .player-actions { width: auto; }
@media (max-width: 600px) {
 .detail-player .embed-frame { min-height: 360px; }
 .detail-player .player-top { flex-wrap: nowrap; }
 .detail-player .player-actions { width: auto; }
 .player-toolbar #fullscreen-button.primary { font-size: 12px; padding: 9px 10px; }
 .player-toolbar .cta-group { gap: 6px; }
}

/* Compact summary: preserve the full title and metadata without tall stat tiles. */
.game-summary { padding: 20px; }
.game-summary .breadcrumbs { margin-bottom: 12px; font-size: 14px; }
.summary-heading { gap: 14px; }
.summary-heading > img { flex-basis: 56px; width: 56px; height: 56px; border-radius: 11px; }
.summary-heading h1 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.25; }
.summary-heading .eyebrow { margin-bottom: 4px; font-size: 11px; }
.game-summary .hero-subheadline { margin: 12px 0; font-size: 17px; line-height: 1.4; }
.game-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.game-stats .stat { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-radius: 9px; flex: 1 1 auto; }
.game-stats .stat:last-child { flex-basis: 100%; }
.game-stats .stat dt { flex-shrink: 0; margin: 0; font-size: 14px; }
.game-stats .stat dd { font-size: 16px; line-height: 1.4; min-width: 0; }
.game-stats .stat a { font-size: 15px; }
@media (max-width: 600px) {
 .game-summary { padding: 16px; }
 .summary-heading { gap: 10px; }
 .summary-heading > img { flex-basis: 44px; width: 44px; height: 44px; }
 .game-summary .hero-subheadline { font-size: 16px; }
 .game-stats .stat { padding: 7px 10px; }
}
