@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@500;700&display=swap");

:root {
    --color-ink: #1f2430;
    --color-muted: #616a7f;
    --color-cream: #fbf6f1;
    --color-paper: #fffdfb;
    --color-accent: #9e2600;
    --color-accent-dark: #7b1e00;
    --color-line: #d9ccbf;

    --color-success-bg: #edf8ee;
    --color-success-line: #8fcca0;
    --color-error-bg: #fdeeee;
    --color-error-line: #e4a5a5;
    --color-warning-bg: #fff6e8;
    --color-warning-line: #f1c37b;
    --color-info-bg: #eef4fb;
    --color-info-line: #9abce4;

    --shadow-soft: 0 12px 28px rgb(0 0 0 / 8%);
    --shadow-soft-hover: 0 18px 34px rgb(0 0 0 / 12%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100dvh;
    color: var(--color-ink);
    font-family: "Noto Sans JP", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgb(158 38 0 / 9%), transparent 30%),
        radial-gradient(circle at 90% 18%, rgb(158 38 0 / 8%), transparent 26%),
        linear-gradient(180deg, #fdf9f5, #f6efea 55%, #f3ece6);
}

a {
    color: var(--color-accent);
    border-bottom: 1px solid rgb(158 38 0 / 35%);
    text-decoration: none;
}

a:hover {
    background: rgb(158 38 0 / 8%);
    border-color: rgb(158 38 0 / 68%);
    color: var(--color-accent-dark);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgb(251 246 241 / 88%);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgb(158 38 0 / 25%);
    box-shadow: 0 8px 20px rgb(0 0 0 / 8%);
}

.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.site-header h1 {
    margin: 0;
    font-family: "Noto Serif JP", serif;
    font-size: clamp(1.2rem, 1vw + 1rem, 1.45rem);
    letter-spacing: 0.04em;
}

.site-header h1 a {
    border: 0;
    color: var(--color-ink);
}

.site-header h1 a:hover {
    background: transparent;
    color: var(--color-accent-dark);
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-header nav a {
    border: 1px solid rgb(158 38 0 / 35%);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgb(255 255 255 / 62%);
}

.container {
    max-width: 1100px;
    margin: 22px auto;
    padding: 0 16px 32px;
}

.card {
    position: relative;
    background: linear-gradient(180deg, #fffdfa, #fbf7f2);
    border: 2px solid var(--color-line);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
}

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 0.65rem;
    font-family: "Noto Serif JP", serif;
    letter-spacing: 0.02em;
}

.card p {
    margin: 0.45rem 0;
}

.narrow {
    max-width: 560px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.93rem;
}

small {
    display: block;
    margin-top: -8px;
    margin-bottom: 10px;
    color: var(--color-muted);
    font-size: 0.82rem;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c7b8a8;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--color-ink);
    background: #fff;
}

input:focus,
select:focus {
    outline: 0;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgb(158 38 0 / 14%);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    border: 2px solid var(--color-accent);
    border-radius: 10px;
    padding: 9px 15px;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    line-height: 1.35;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.button:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #fff;
}

.button-secondary {
    background: #fff;
    color: var(--color-accent);
}

.button-secondary:hover {
    color: var(--color-accent-dark);
    background: rgb(158 38 0 / 10%);
}

.flash {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    font-size: 0.92rem;
}

.flash-success {
    background: var(--color-success-bg);
    border-color: var(--color-success-line);
}

.flash-error {
    background: var(--color-error-bg);
    border-color: var(--color-error-line);
}

.flash-warning {
    background: var(--color-warning-bg);
    border-color: var(--color-warning-line);
}

.flash-info {
    background: var(--color-info-bg);
    border-color: var(--color-info-line);
}

.pattern-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 8px;
}

.selection-note {
    margin-top: 0;
    color: #6b5c4f;
}

.course-type-heading,
.course-subject-heading {
    grid-column: 1 / -1;
    margin: 2px 0;
}

.course-type-heading {
    background: #f1e2d4;
    border: 1px solid #dbc7b4;
    border-radius: 8px;
    color: #4f3322;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 6px 10px;
}

.course-subject-heading {
    color: #705846;
    font-size: 0.86rem;
    font-weight: 700;
    margin-top: 4px;
}

.checkbox-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    border: 1px solid rgb(158 38 0 / 24%);
    border-radius: 10px;
    padding: 9px;
    background: rgb(255 255 255 / 70%);
    font-weight: 400;
}

.checkbox-item:hover {
    background: rgb(158 38 0 / 8%);
    border-color: rgb(158 38 0 / 40%);
}

.checkbox-item input {
    width: auto;
    margin: 2px 0 0;
    accent-color: var(--color-accent);
}

.checkbox-item-required {
    background: #f8f2ec;
    border-color: #d9cbbe;
}

.checkbox-item-required:hover {
    background: #f8f2ec;
    border-color: #d9cbbe;
}

.course-badge-required {
    display: inline-block;
    min-width: 2.8em;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e8d3c1;
    color: #5a3722;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

table {
    border-collapse: collapse;
    width: 100%;
}

.timetable {
    min-width: 640px;
}

th,
td {
    border: 1px solid #dfd4c9;
    padding: 8px;
    vertical-align: top;
}

.timetable th {
    background: #f4e9df;
    color: #4b2f21;
    font-weight: 700;
}

.slot-cell {
    min-width: 140px;
    line-height: 1.5;
}

.slot-muted {
    background: #eceff3;
    color: #6a7282;
}

.slot-muted strong,
.slot-muted span {
    color: #6a7282;
}

.slot-empty {
    color: var(--color-muted);
}

@media (max-width: 900px) {
    .grid-2,
    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .site-header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header nav {
        width: 100%;
    }

    .site-header nav a {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .container {
        margin-top: 14px;
        padding: 0 10px 20px;
    }

    .card {
        border-radius: 13px;
        padding: 13px;
    }

    .button {
        width: 100%;
    }

    .pattern-links .button {
        width: auto;
    }

    .timetable {
        min-width: 540px;
    }
}

