:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #eef2f5;
    --text: #16191d;
    --muted: #6c747d;
    --line: #dde3e8;
    --accent: #1f8a70;
    --accent-strong: #146c56;
    --warn: #b26a00;
    --danger: #b83a3a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header,
.site-footer,
.page {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
}

.ad-rail {
    position: fixed;
    top: 148px;
    z-index: 5;
    width: 132px;
}

.ad-rail-left {
    left: max(18px, calc((100vw - 1280px) / 2 - 156px));
}

.ad-rail-right {
    right: max(18px, calc((100vw - 1280px) / 2 - 156px));
}

.ad-slot {
    min-width: 0;
}

.ad-slot__placeholder {
    width: 100%;
    min-height: 96px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background:
        repeating-linear-gradient(
            135deg,
            #f8fafc 0,
            #f8fafc 10px,
            #eef2f5 10px,
            #eef2f5 20px
        );
    box-shadow: 0 12px 30px rgb(15 23 42 / 10%);
}

.vertical-ad-slot .ad-slot__placeholder,
.vertical-ad-slot .adsbygoogle {
    min-height: 420px;
}

.search-ad-slot {
    margin-top: 14px;
}

.search-ad-slot .ad-slot__placeholder,
.search-ad-slot .adsbygoogle {
    min-height: 96px;
}

.brand,
.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    font-weight: 800;
    font-size: 20px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--text);
    color: #fff;
}

.site-nav a,
.tab {
    color: var(--muted);
    font-weight: 700;
}

.site-nav a:hover,
.tab.active {
    color: var(--text);
}

.hero,
.series-hero,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: end;
    padding: 42px 0 26px;
}

.hero h1,
.page-title h1,
.detail-summary h1,
.series-hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.03;
    letter-spacing: 0;
}

.hero-copy,
.series-hero p,
.site-footer p {
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-stat {
    display: grid;
    place-items: center;
    min-width: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.stat-value {
    font-size: 44px;
    font-weight: 900;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.toolbar {
    display: flex;
    gap: 18px;
    padding: 14px 0 22px;
}

.search-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 12px;
    align-items: end;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 12px;
}

.store-filter-field {
    grid-column: 1 / -1;
}

.store-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.store-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
}

.store-filter-option:has(.store-choice-input:checked) {
    border-color: var(--accent);
    background: #eef9f5;
    box-shadow: inset 0 0 0 1px var(--accent);
}

.store-choice-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.search-field {
    display: grid;
    gap: 6px;
}

.search-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.search-field input,
.search-field select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    padding: 0 11px;
}

.search-button {
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 18px;
}

.currency-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.currency-toggle button,
.currency-toggle a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    padding: 0 10px;
}

.currency-toggle .active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgb(22 25 29 / 10%);
}

.detail-currency {
    width: fit-content;
    margin-top: 12px;
}

.reset-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--muted);
    font-weight: 900;
}

.deal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 36px 0 14px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    min-width: 108px;
    padding: 0 20px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 10px 24px rgb(15 23 42 / 10%);
    font-size: 16px;
    font-weight: 900;
}

.pagination a {
    background: var(--text);
    color: var(--surface);
}

.pagination span {
    min-width: 150px;
    border-color: #0f172a;
    color: var(--text);
}

.pagination a.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.daily-deals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.daily-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #b7e4d1;
    border-radius: 8px;
    background: #ecfdf5;
    color: var(--text);
    box-shadow: 0 8px 22px rgb(15 23 42 / 8%);
}

.daily-summary-card:hover {
    transform: translateY(-1px);
}

.muted-summary {
    border-color: var(--line);
    background: var(--surface);
}

.summary-kicker,
.daily-summary-card small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.daily-summary-card strong {
    display: block;
    margin: 4px 0;
    font-size: 28px;
    line-height: 1;
}

.summary-action {
    flex: 0 0 auto;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--text);
    color: var(--surface);
    font-size: 13px;
    font-weight: 900;
}

.daily-store-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.daily-store-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgb(255 255 255 / 72%);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
}

.compact-empty {
    padding: 14px;
}

.empty-state {
    grid-column: 1 / -1;
    margin: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 800;
}

.deal-card,
.series-card,
.content-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.deal-card {
    overflow: hidden;
}

.cover {
    display: block;
    width: 100%;
    aspect-ratio: 460 / 190;
    object-fit: cover;
    background: var(--surface-soft);
}

.deal-body {
    display: grid;
    gap: 7px;
    padding: 10px;
}

.deal-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.store-logo-list {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.store-logo {
    display: inline-block;
    flex: 0 0 auto;
    width: 24px;
    max-width: 24px;
    height: 24px;
    max-height: 24px;
    object-fit: contain;
    border-radius: 6px;
    vertical-align: middle;
}

.store-logo.tiny {
    width: 18px;
    max-width: 18px;
    height: 18px;
    max-height: 18px;
}

.store-region {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.store-eyebrow,
.logo-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-line {
    flex-wrap: wrap;
}

.deal-body h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
}

.series-name,
.korean-title {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.korean-title.large {
    font-size: 18px;
}

.game-tags,
.game-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.game-tags span,
.game-facts span,
.platform-strip a {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.game-facts span {
    min-height: 22px;
    padding: 0 6px;
    background: #edf7f4;
    color: var(--accent-strong);
    font-size: 11px;
}

.platform-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.platform-strip a {
    background: #f1f4f7;
    color: var(--text);
    gap: 4px;
    min-height: 28px;
    padding: 4px 7px;
    overflow: visible;
}

.platform-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin: 18px 0;
}

.platform-option {
    display: grid;
    gap: 4px;
    min-height: 66px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.platform-option.active {
    border-color: var(--accent);
    background: #edf7f4;
}

.platform-option > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.platform-option strong {
    font-size: 18px;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.score-grid div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.score-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.score-grid strong {
    font-size: 22px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.price-row.big {
    margin: 20px 0;
}

.discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 34px;
    border-radius: 8px;
    background: #dff5ec;
    color: var(--accent-strong);
    font-weight: 900;
}

.sale-price {
    display: block;
    font-size: 19px;
    font-weight: 900;
}

.original-price {
    color: var(--muted);
    font-size: 13px;
    text-decoration: line-through;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.status-pill {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.status-record-low,
.status-lower {
    background: #dff5ec;
    color: var(--accent-strong);
}

.status-higher {
    background: #fde6e6;
    color: var(--danger);
}

.status-same,
.status-first {
    background: #fff2d7;
    color: var(--warn);
}

.buy-link,
.primary-action {
    color: var(--accent-strong);
    font-weight: 900;
}

.primary-action {
    display: inline-flex;
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
}

.series-strip,
.content-section {
    margin-top: 34px;
    padding: 20px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
}

.section-heading a,
.section-heading span {
    color: var(--muted);
    font-weight: 800;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.series-grid.wide {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.series-card {
    display: grid;
    gap: 10px;
    overflow: hidden;
    padding-bottom: 14px;
}

.series-card img {
    width: 100%;
    aspect-ratio: 460 / 215;
    object-fit: cover;
    background: var(--surface-soft);
}

.series-card span,
.series-card small {
    padding: 0 14px;
}

.series-card span {
    font-size: 18px;
    font-weight: 900;
}

.series-card small {
    color: var(--muted);
    font-weight: 700;
}

.detail-layout {
    grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
    align-items: center;
}

.detail-cover,
.series-hero img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-soft);
}

.history-list,
.compact-list {
    display: grid;
    gap: 10px;
}

.history-row,
.compact-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto auto auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.compact-item {
    grid-template-columns: 1fr auto;
}

.series-hero {
    grid-template-columns: minmax(260px, 440px) minmax(0, 1fr);
    align-items: center;
}

.page-title {
    padding: 32px 0 24px;
}

.site-footer {
    padding: 42px 0 28px;
}

@media (max-width: 760px) {
    .ad-rail {
        display: none;
    }

    .search-ad-slot .ad-slot__placeholder,
    .search-ad-slot .adsbygoogle {
        min-height: 120px;
    }

    .hero,
    .series-hero,
    .detail-layout,
    .daily-deals {
        grid-template-columns: 1fr;
    }

    .hero-stat {
        justify-items: start;
        width: 100%;
    }

    .history-row {
        grid-template-columns: 1fr;
    }

    .card-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-row,
    .filter-grid,
    .score-grid {
        grid-template-columns: 1fr;
    }

    .daily-summary-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination {
        gap: 10px;
        padding-top: 28px;
    }

    .pagination a,
    .pagination span {
        min-height: 48px;
        min-width: 0;
        flex: 1 1 120px;
        padding: 0 14px;
    }
}

@media (max-width: 1580px) {
    .ad-rail {
        display: none;
    }
}

@media (min-width: 761px) and (max-width: 1040px) {
    .deal-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .filter-grid {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}

@media (min-width: 1041px) {
    .deal-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
