:root {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    color: #1b2e4a;
    background: #f4f7fa;
    --line: #d8e3ee;
    --primary: #285079;
    --pale: #eaf1f9;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button, input { font: inherit; }
button { cursor: pointer; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.topbar, main { max-width: 1200px; margin: auto; padding-inline: clamp(12px, 3vw, 32px); }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 69px; gap: 12px; }
.brand img { display: block; width: clamp(104px, 20vw, 150px); height: auto; }
.account { display: flex; align-items: center; gap: 12px; font-size: .83rem; }
.account button { border: 0; background: transparent; color: var(--primary); padding: 8px 0; min-height: 44px; }
main { min-height: calc(100vh - 135px); padding-block: 26px 42px; }
.heading, .calendar-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.heading { margin-bottom: 18px; }
h1, h2 { margin: 0; }
h1 { font-size: clamp(1.45rem, 4vw, 2.15rem); }
h2 { font-size: 1.19rem; }
.tabs, .month-controls { display: flex; gap: 5px; }
.tabs a, .month-controls a { display: grid; place-items: center; min-height: 44px; min-width: 44px; padding: 6px 10px; font-size: .82rem; border-radius: 8px; }
.tabs [aria-current], .month-controls a { background: var(--pale); color: var(--primary); font-weight: 700; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(215px, 28%); gap: 14px; align-items: start; }
.panel, .login { background: white; border: 1px solid var(--line); border-radius: 14px; }
.calendar-bar { padding: 12px; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays { background: var(--pale); text-align: center; font-size: .8rem; padding: 7px 0; }
.weekdays span:first-child { color: #9f343d; }
.weekdays span:last-child { color: #315e8e; }
.dates { overflow: hidden; border-radius: 0 0 14px 14px; }
.day, .blank { border-top: 1px solid var(--line); min-height: 93px; min-width: 0; }
.day { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 5px; }
.dates > :not(:nth-child(7n)) { border-right: 1px solid var(--line); }
.day:nth-child(7n+1) .number { color: #9f343d; }
.day:nth-child(7n) .number { color: #315e8e; }
.day:hover { background: #f3f7fb; }
.day:focus-visible { outline-offset: -2px; }
.day.selected { background: var(--pale); box-shadow: inset 0 0 0 2px #7194bb; }
.blank, .past { background: #f5f7fa; }
.number { display: grid; place-items: center; min-width: 24px; height: 24px; font-size: .85rem; font-weight: 700; }
.day .number.today { background: var(--primary); border-radius: 50%; color: white; }
.person { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #f4f7fa; border-left: 3px solid var(--employee); border-radius: 3px; padding: 1px 4px; font-size: .75rem; }
.full { color: #7a343b; }
.day small { font-size: .63rem; }
.detail, .history, .login { padding: 18px; }
.detail { scroll-margin-top: 12px; }
.detail ul, .history ul { padding: 0; margin: 0 0 14px; list-style: none; }
.detail li { margin: 5px 0; }
.detail .person { width: fit-content; font-size: .9rem; }
.count { font-weight: 700; color: var(--primary); }
.count span { color: #4b5e74; font-weight: 400; font-size: .85rem; }
.primary, .secondary { padding: 10px 14px; min-height: 44px; border-radius: 8px; border: 1px solid var(--primary); width: 100%; }
.primary { background: var(--primary); color: white; }
.secondary { color: var(--primary); background: white; }
.notice, .status { background: var(--pale); padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
.login { max-width: 430px; margin: clamp(10px, 8vh, 90px) auto 0; padding: clamp(18px, 5vw, 36px); }
.stack, .stack label { display: grid; gap: 8px; }
.stack { margin-top: 22px; gap: 16px; }
.stack input { width: 100%; min-height: 44px; border: 1px solid #a8bbce; border-radius: 8px; padding: 10px; }
.history li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.history ul { margin-top: 12px; }
.timestamps { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 5px; color: #4b5e74; font-size: .85rem; }
.badge { margin-left: 8px; background: var(--pale); padding: 3px 6px; border-radius: 5px; font-size: .75rem; }
footer { text-align: center; padding: 18px; font-size: .78rem; border-top: 1px solid var(--line); background: white; }
@media (max-width: 680px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .day, .blank { min-height: 66px; }
    .day { padding: 3px; }
    .person { font-size: .66rem; padding-inline: 2px; }
    .heading { align-items: flex-start; flex-direction: column; }
}

/* Next Hearts handoff palette */
.site-header { border-top: 4px solid transparent; background: linear-gradient(to right, #ea6665 20%, #f5a843 20% 40%, #ffe994 40% 60%, #7db58a 60% 80%, #5bc4cb 80%) border-box 0 0 / 100% 4px no-repeat, white; }
.tabs, .month-controls { flex-wrap: wrap; }
.panel:has(> .stack), main > .panel:has(> details) { padding: 18px; margin-bottom: 14px; }
.panel > details.panel { margin-block: 10px; padding: 14px; }
.panel summary { cursor: pointer; }
.stack input[type=color] { width: 86px; max-width: 100%; padding: 4px; }
.stack button:not(.primary) { min-height: 42px; border-radius: 8px; padding: 7px 10px; border: 1px solid var(--line); background: #f4f7fa; color: var(--primary); }
