* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f4f5f8;
    color: #202838;
    font-family: system-ui, sans-serif;
    line-height: 1.5;
}

main { max-width: 1120px; margin: 0 auto; padding: 32px 20px 48px; }
header { margin-bottom: 28px; }
header a { color: #566077; text-underline-offset: 3px; }
h1 { margin: 16px 0 4px; font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.04em; }
p { margin: 0; color: #626b7b; }

.theme-sort { display: flex; gap: 6px; margin-bottom: 28px; }
.theme-sort a { padding: 8px 18px; border-radius: 999px; color: #566077; text-decoration: none; font-weight: 600; }
.theme-sort a:hover { background: #e9e4f2; }
.theme-sort a[aria-current="page"] { color: #fff; background: #7350ad; }
.theme-sort a:focus-visible { outline: 3px solid #7350ad; outline-offset: 3px; }
.theme-group + .theme-group { margin-top: 32px; }
.theme-group h2 { margin: 0 0 12px; font-size: 22px; }
.empty-month { font-size: 14px; }
.theme small { color: #626b7b; text-align: center; }
.calendar .themes, .scene .themes { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }

.themes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.theme {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 18px 12px;
    border: 1px solid #dfe3eb;
    border-radius: 16px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.theme:hover { border-color: #8d79bd; background: #f8f5ff; }
.theme:focus-visible { outline: 3px solid #7350ad; outline-offset: 3px; }
.theme img { display: block; width: 100%; max-width: 150px; height: 150px; object-fit: contain; }
.theme span { font-weight: 600; text-align: center; }
