:root {
    --bg: #ffffff;
    --surface: #f6f7f9;
    --text: #1b1d21;
    --muted: #5d636e;
    --line: #dfe2e7;
    --accent: #2457c5;
    --normal: #6b7280;
    --rare: #2f6fd6;
    --epic: #8a3fd1;
    --legend: #d97a06;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #15171b;
        --surface: #1f2228;
        --text: #e8eaee;
        --muted: #a2a8b3;
        --line: #343841;
        --accent: #7ea6ff;
        --normal: #a2a8b3;
        --rare: #6ea2ff;
        --epic: #c08cff;
        --legend: #ffb04a;
    }
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

main,
header.site,
footer.site {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 16px;
}

header.site {
    padding-top: 20px;
    padding-bottom: 4px;
    font-size: 14px;
    color: var(--muted);
}

header.site a {
    color: var(--muted);
    text-decoration: none;
}

header.site a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 28px;
    line-height: 1.3;
    margin: 12px 0 8px;
}

h2 {
    font-size: 21px;
    line-height: 1.35;
    margin: 44px 0 12px;
    padding-top: 4px;
}

h3 {
    font-size: 17px;
    margin: 0 0 8px;
}

p,
ul {
    margin: 0 0 12px;
}

ul {
    padding-left: 22px;
}

li + li {
    margin-top: 4px;
}

a {
    color: var(--accent);
}

.meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.note {
    color: var(--muted);
    font-size: 14px;
}

.nowrap {
    white-space: nowrap;
}

.toc {
    background: var(--surface);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
}

.toc ol {
    margin: 0;
    padding-left: 20px;
}

.table-wrap {
    overflow-x: auto;
    margin: 0 0 12px;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 15px;
}

table.wide {
    min-width: 600px;
}

table.wide th[scope="row"] {
    white-space: nowrap;
}

caption {
    text-align: left;
    font-weight: 600;
    padding: 0 0 8px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

thead th {
    background: var(--surface);
    font-weight: 600;
    white-space: nowrap;
}

td.num,
th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

td.date,
th.date {
    width: 7.5em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.grades {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 8px 24px;
}

.grade {
    display: inline-block;
    font-weight: 700;
}

.grade.normal {
    color: var(--normal);
}

.grade.rare {
    color: var(--rare);
}

.grade.epic {
    color: var(--epic);
}

.grade.legend {
    color: var(--legend);
}

.games {
    list-style: none;
    padding: 0;
}

.games li {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
}

.games a {
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
}

.games a:hover {
    text-decoration: underline;
}

footer.site {
    margin-top: 56px;
    padding-top: 16px;
    padding-bottom: 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

footer.site a {
    color: var(--muted);
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    table {
        font-size: 14px;
    }

    th,
    td {
        padding: 7px 8px;
    }
}
