@font-face {
    font-family: 'Archivo Black';
    src: url('/css/fonts/headings.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --bg: #fff8f4; --surface: #fff; --ink: #281927; --muted: #634c5d; --line: #382233;
    --header: #242150; --header-ink: #fff; --header-line: #242150; --accent: #f3abd1; --accent-hover: #f996c6; --button-ink: #241425;
    --focus: #883474; --link: #81325f; --shadow: #3a223340;
    --heading-font: 'Archivo Black', system-ui, sans-serif; --edge: 2px; --card-radius: 4px; --panel-radius: 6px; --button-radius: 5px;
    --tile-ratio: 1; --width: 1190px;
}

.easygame-home section, .funplay-home section, .casual-home section, .minigame-home section { min-width: 0; }
.ad-break-content h1 {
    font-size: clamp(2.35rem, 5.8vw, 5.25rem);
    line-height: .98;
    overflow-wrap: anywhere;
}
.ad-break-content h2, .home-after-ad h2, .new-collections > h2, .guide h2 {
    font-size: clamp(1.45rem, 3vw, 2.55rem);
    line-height: 1.06;
}
.ad-break-content header p { margin-top: 13px; max-width: 44ch; line-height: 1.55; }
.new-collections > h2 { margin-bottom: 18px; }
.new-collections .category-collections { display: grid; gap: clamp(16px, 2.6vw, 34px); }
.new-collections .game-section { margin: 0; padding: clamp(12px, 2vw, 22px); border: 1px solid var(--line); border-radius: var(--panel-radius); background: var(--surface); }
.new-collections .section-heading { margin-bottom: 12px; }
.new-collections h2:not(#library-title) { font-size: clamp(1.35rem, 2.65vw, 2.1rem); }
.guide h1 { font-size: clamp(2.1rem, 5.4vw, 4.7rem); overflow-wrap: anywhere; }
.guide-cover { display: block; aspect-ratio: 1; object-fit: contain; border-radius: var(--card-radius); }
.guide-about p { max-width: 73ch; margin-top: 12px; color: var(--muted); line-height: 1.75; overflow-wrap: anywhere; }
.guide-related h2 { margin-bottom: 15px; }
.guide-games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.guide .load-status { margin-top: 0; }
@media (max-width: 600px) {
    .guide-games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}

h1, h2 { font-weight:400; }
.site-header :focus-visible, .site-footer :focus-visible { outline-color:#f3abd1; }
#category-dialog :focus-visible { outline-color:var(--focus); }
.mini-opening { display:grid; grid-template-columns:minmax(0, 0.77fr) minmax(0, 1.75fr); align-items:stretch; gap:13px; }
.mini-head { display:grid; align-content:center; background:#f3abd1; color:#2b2058; border:2px solid var(--line); padding:clamp(15px,3vw,32px); }
.mini-head h1 { font-size:clamp(2rem,4.1vw,2.95rem); }
.mini-board { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.mini-board img { aspect-ratio:1.1; }
.mini-board .mini-lead { grid-column:span 2; }
.mini-board .mini-lead img { aspect-ratio:2.27; }
.mini-board .game-card:nth-child(3n + 1) .card-caption { background:#f9d9e9; }
.mini-board .game-card:nth-child(3n + 2) .card-caption { background:#e6e5fa; }
.mini-round { background:#fce8ad; border:2px solid var(--line); padding:clamp(12px,2vw,22px); }
.mini-round h2 { margin-bottom:12px; }
.mini-round-games { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.mini-round-games .game-card { flex-direction:row; align-items:center; }
.mini-round-games img { width:clamp(45px,7vw,85px); flex:none; aspect-ratio:1; }
.minigame-home .category-collections { border:0; }
.minigame-home .category-collections .game-section { border:2px solid var(--line); box-shadow:3px 3px 0 var(--line); }
.minigame-home .category-collections .game-section:nth-child(even) { background:#f3eefc; }
.listing .page-heading { border:2px solid var(--line); background:#f3abd1; padding:14px 18px; box-shadow:3px 3px 0 var(--line); }
.mini-brief { background:#f3abd1; border:2px solid var(--line); padding:clamp(14px,3vw,33px); }
.mini-guide-body { display:grid; grid-template-columns:minmax(150px,230px) minmax(0,1fr); gap:12px; margin-block:12px 30px; }
.mini-launch { display:grid; align-content:center; justify-items:center; gap:11px; border:2px solid var(--line); padding:13px; }
.mini-launch .guide-cover { width:clamp(82px,12vw,143px); }
.mini-guide-body .guide-about { background:#e6f0dd; border:2px solid var(--line); padding:clamp(12px,3vw,29px); }
.minigame-guide .guide-games .game-card:nth-child(odd) .card-caption { background:#f9d9e9; }
@media (max-width:820px) { .mini-opening { grid-template-columns:1fr; } }
@media (max-width:570px) {
    .mini-board, .mini-round-games { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .mini-round-games .card-caption { padding:5px; }
    .mini-guide-body { grid-template-columns:1fr; }
    .mini-launch { grid-template-columns:auto minmax(0,1fr); align-items:center; }
    .mini-launch .button { width:100%; }
}

.adx-slot {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    width: min(100%, 336px);
    margin-inline: auto;
    padding-block: 50px;
}

/* Keep the featured section tall enough to separate the homepage ad slots. */
.ad-break-content {
    display: grid;
    min-block-size: max(0px, calc(100vh - 98px));
    min-block-size: max(0px, calc(100lvh - 98px));
}

.adx-slot + main { padding-top: 0; }
.adx-slot + .home-after-ad { margin-top: 0; }
.home-after-ad + .new-collections { margin-top: clamp(24px, 3vw, 44px); }

@media (min-width: 821px) {
    .mini-board { grid-template-rows: repeat(2, minmax(0, 1fr)); }
    .mini-board .game-card { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
    .mini-board .game-card img { height: 100%; min-height: 0; aspect-ratio: auto; }
}
