:root {
    --bg: #f4f6f2;
    --panel: #ffffff;
    --line: #d3d9d1;
    --text: #1f2d1f;
    --muted: #5f6b5f;
    --accent: #3d5a3a;
    --work: #eaf5ea;
    --closed: #f6e3e3;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
}

header {
    padding: 16px 20px 0;
}

main {
    padding: 16px 20px 32px;
}

.schedule-page {
    color: var(--text);
}

.week-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.week-nav {
    display: flex;
    gap: 10px;
    font-size: 13px;
}

.week-nav a,
.week-nav span {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    background: var(--panel);
}

.week-nav span {
    color: var(--muted);
    background: #f0f3ef;
}

.week-title {
    font-size: 18px;
    font-weight: 600;
}

.status-legend {
    display: flex;
    gap: 12px;
    font-size: 16px;
    color: var(--muted);
}

.status-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    border: 1px solid var(--line);
    display: inline-block;
}

.dot.work {
    background: var(--work);
}

.dot.closed {
    background: var(--closed);
}

.corner {
    height: 46px;
}

.day-head {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
}

.day-head .date {
    font-weight: 600;
}

.day-head .weekday {
    color: var(--muted);
    font-size: 12px;
}

.calendar {
    --hour-height: 40px;
}

.calendar-head {
    display: grid;
    grid-template-columns: 40px repeat(7, minmax(90px, 1fr));
    gap: 10px;
    align-items: stretch;
}

.calendar-body {
    display: grid;
    grid-template-columns: 40px repeat(7, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.time-col {
    display: grid;
    grid-auto-rows: var(--hour-height);
    gap: 0;
}

.time-row {
    position: relative;
    height: var(--hour-height);
}

.time-row span {
    position: absolute;
    top: 0;
    right: 8px;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
}

.day-col {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    height: calc(var(--hour-count) * var(--hour-height));
}

.hour-line {
    position: relative;
    height: var(--hour-height);
    border-top: 1px dashed #e4e9e1;
}

.event {
    position: absolute;
    left: 10px;
    right: 10px;
    background: var(--work);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 13px;
    line-height: 1.4;
    z-index: 2;
}

.event.closed {
    background: var(--closed);
}

.event-title {
    font-weight: 600;
    font-size: 15px;
}

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

.full-closed {
    position: absolute;
    inset: 8px;
    background: rgba(246, 227, 227, 0.8);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 3;
    font-weight: 600;
    font-size: 15px;
    color: #6a3b3b;
}

.full-closed.pending {
    background: rgba(230, 232, 235, 0.9);
    color: #50565c;
}

.scroll-hint {
    display: none;
}

@media (max-width: 767px) {
    header {
        padding: 12px 14px 0;
    }

    main {
        padding: 12px 14px 24px;
    }

    .week-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .week-nav {
        flex-wrap: wrap;
    }

    .status-legend {
        flex-wrap: wrap;
    }

    .calendar {
        --hour-height: 40px;
        overflow-x: auto;
        padding-bottom: 6px;
        position: relative;
    }

    .calendar-head,
    .calendar-body {
        grid-template-columns: 48px repeat(7, minmax(100px, 1fr));
        min-width: 760px;
    }

    .scroll-hint {
        position: fixed;
        right: 16px;
        top: 128px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        color: var(--muted);
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid var(--line);
        border-radius: 999px;
        padding: 4px 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .scroll-hint.visible {
        opacity: 1;
    }

    .scroll-hint-icon {
        width: 16px;
        height: 16px;
        display: block;
    }

    .scroll-hint-text {
        font-size: 11px;
        letter-spacing: 0.02em;
    }

    .day-head {
        padding: 6px 8px;
    }

    .event {
        font-size: 12px;
    }

    .event-title {
        font-size: 14px;
    }

    .time-row span {
        font-size: 14px;
    }
}
