/* Home page styles (migrated from index.php inline style) */
:root {
    --bg: #f3f0e9;
    --panel: #fffdf8;
    --ink: #1c2933;
    --muted: #5d6875;
    --accent: #cd7a25;
    --accent-2: #0f7f95;
    --line: #d4d9cd;
    --soft: #edf1e8;
    --safe-top: env(safe-area-inset-top, 0px);
    --back-to-top-extra: 0px;
    --font-size-caption: 12px;
    --font-size-body-sm: 13px;
    --font-size-body: 14px;
    --font-size-body-lg: 16px;
    --font-size-h1: clamp(24px, 3.6vw, 28px);
    --font-size-h2: clamp(20px, 3vw, 24px);
    --font-size-h3: clamp(16px, 2.4vw, 19px);
    --line-height-body: 1.45;
    --line-height-heading: 1.2;
}
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: "Avenir Next", "Futura", "Trebuchet MS", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
}
.topbar {
    background: #2b2b2b;
    color: #fefbf5;
    padding: calc(10px + var(--safe-top)) 16px 0;
    position: -webkit-sticky;
    position: sticky !important;
    top: 0 !important;
    z-index: 980;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    border-bottom: 1px solid #1f1f1f;
    border-radius: 0;
    isolation: isolate;
}
.topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-mark {
    width: 150px;
    height: 42px;
    border-radius: 0;
    background: transparent;
    padding: 0;
    display: grid;
    place-items: center;
}
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.menu-button {
    border: 1px solid #4c4c4c;
    background: #3a3a3a;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.install-button {
    border: 1px solid #4c4c4c;
    background: #1f8ead;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 52vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.menu-button svg {
    width: 20px;
    height: 20px;
}
.wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 20px 60px;
}
.search-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.search-count {
    margin: 8px 0 0;
    color: #677184;
    font-size: 12px;
}
.summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 0;
}
.summary-strip-small {
    margin-top: 8px;
}
.section-calendar-export {
    margin-top: 14px;
}
.calendar-export-spoiler {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefb;
    box-shadow: none;
    overflow: hidden;
}
.calendar-export-spoiler > summary {
    padding: 12px 14px;
    background: #f8fbf6;
    font-size: 15px;
    font-weight: 700;
    color: #24323d;
}
.calendar-export-spoiler > summary::after {
    color: #0f7f95;
}
.calendar-export-spoiler[open] > summary {
    border-bottom: 1px solid var(--line);
}
.calendar-export-summary-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.calendar-export-content {
    padding: 10px;
}
.calendar-export-subtitle {
    margin: 0 0 8px;
    color: #5f6f7c;
    font-size: 12px;
    line-height: 1.35;
}
.calendar-export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.calendar-export-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefb;
    padding: 10px;
    box-shadow: none;
}
.calendar-export-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.calendar-export-card h3 {
    margin: 0;
    font-size: 15px;
    color: #24323d;
}
.calendar-export-tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid #d9e2ea;
    background: #edf4fb;
    color: #2b5c86;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1px;
}
.calendar-export-tag.is-private {
    border-color: #dddfd2;
    background: #f2f5eb;
    color: #44523f;
}
.calendar-export-card .summary-strip {
    margin: 0;
}
.calendar-export-card .summary-strip + .summary-strip {
    margin-top: 8px;
}
.calendar-export-card .chip {
    min-height: 34px;
    padding: 5px 10px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
}
.calendar-export-card .summary-strip .chip {
    min-width: 0;
    justify-content: center;
    flex: 0 1 auto;
}
.calendar-filter-note {
    margin: 10px 0 0;
    color: #4b5f73;
    font-size: 12px;
}
.calendar-filter-note code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 6px;
    background: #eaf0f3;
    color: #304556;
}
.chip-button {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--line);
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.chip-subtle {
    font-size: 12px;
    font-weight: 600;
}
.calendar-export-note {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #435465;
}
.calendar-export-note.is-warning {
    color: #8a4b16;
}
.calendar-export-note.is-error {
    color: #9f2c1f;
}
.events-card {
    margin: 8px 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(28, 41, 51, 0.07);
}
.events-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: #ececec;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}
.events-card-header h2 {
    margin: 0;
    font-size: 16px;
    color: #4b4b4b;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.events-card-icon {
    width: 26px;
    height: 26px;
    color: #8a8a8a;
    flex: 0 0 auto;
}
.events-card-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.event-list {
    display: grid;
    gap: 0;
    background: #ffffff;
}
.event-item {
    padding: 16px 18px;
}
.event-item + .event-item {
    border-top: 1px solid var(--line);
}
.event-item .event-date {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.event-item .event-note {
    margin: 0;
    color: #2f588d;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.1px;
}
.events-more {
    padding: 0 18px 16px;
    background: #ffffff;
}
.events-more button {
    border: 1px solid var(--line);
    background: #fff;
    color: #334155;
    border-radius: 10px;
    min-height: 44px;
    padding: 0 12px;
    font-weight: 700;
    cursor: pointer;
}
.events-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.events-empty {
    color: var(--muted);
    font-style: italic;
    margin: 8px 0 0;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--panel);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 13px;
}
.chip.is-active {
    background: #d9eef3;
    border-color: #9fced8;
    color: #0e5d70;
}
.chip-confirm.is-confirmed {
    background: #e5f8ef;
    border-color: #bde5cd;
    color: #1e6a4d;
}
.chip.chip-muted {
    background: #eef2f7;
    border-color: #dde4ec;
    color: #5b6675;
}
.badge {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-2);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.2px;
}
.badge-holiday {
    background: #fee4e2;
    border: 1px solid #f5b4ae;
    color: #9b1c1c;
    font-weight: 700;
}
.section {
    margin-top: 18px;
}
.section h2 {
    margin: 0 0 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4d4947;
}
.section h2 span {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid var(--accent-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent-2);
}
.section h2 span svg {
    width: 12px;
    height: 12px;
    display: block;
}
.section-my-duty .my-duty-card {
    border: 1px solid #d7dfd2;
    border-radius: 14px;
    background: #fffefb;
    box-shadow: 0 10px 20px rgba(28, 41, 51, 0.07);
    padding: 14px;
}
.my-duty-lead {
    margin: 0;
    color: #42566a;
    font-size: 13px;
    line-height: 1.4;
}
.my-duty-helper {
    margin: 10px 0 0;
    color: #516478;
    font-size: 12px;
    line-height: 1.35;
}
.section-staff-activity .staff-activity-card {
    border: 1px solid #d7dfd2;
    border-radius: 14px;
    background: #fffefb;
    box-shadow: 0 10px 20px rgba(28, 41, 51, 0.07);
    padding: 12px;
}
.staff-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.staff-activity-item {
    border: 1px solid #dce4d8;
    border-radius: 10px;
    background: #f8fbf6;
    padding: 10px 11px;
}
.staff-activity-title {
    margin: 0;
    color: #1f3140;
    font-size: 13px;
    font-weight: 800;
}
.staff-activity-detail {
    margin: 4px 0 0;
    color: #42586b;
    font-size: 12px;
    line-height: 1.35;
}
.staff-activity-time {
    margin: 5px 0 0;
    color: #6a7785;
    font-size: 11px;
    font-weight: 600;
}
details .days {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 18px;
    transition: max-height 0.35s ease, opacity 0.2s ease, padding 0.2s ease;
}
details[open] .days {
    max-height: 1400px;
    opacity: 1;
    padding: 0 18px 18px;
}
.week {
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 14px;
    background: var(--panel);
    box-shadow: 0 10px 22px rgba(31, 45, 61, 0.06);
}
summary {
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 700;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4d4947;
}
summary::-webkit-details-marker {
    display: none;
}
summary::after {
    content: "+";
    margin-left: auto;
    font-weight: 700;
    color: var(--accent);
}
details[open] summary::after {
    content: "–";
}
.week-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    flex: 0 0 auto;
}
.days {
    border-top: 1px solid var(--line);
    background: #fbfbfb;
}
.day {
    margin-top: 14px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--line);
}
.day h3 {
    margin: 0 0 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.day-actions {
    margin: 0 0 8px;
}
.day.is-today {
    border-color: #1f8ead;
    background: #f0fbff;
    box-shadow: 0 6px 14px rgba(31, 142, 173, 0.18);
}
.today-pill {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    background: #1f8ead;
    color: #fff;
}
.assigned-pill {
    margin-left: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e3a8a;
}
.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.task-row {
    display: grid;
    grid-template-columns: 68px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #dbe2d7;
    background: #ffffff;
}
.task-name {
    font-size: 11px;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: #526171;
    font-weight: 800;
}
.task-value {
    color: #24323d;
    font-weight: 700;
    line-height: 1.3;
}
.task-assigned {
    background: #f7efe1;
    border-color: #e8d3b0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(31, 142, 173, 0.45);
    outline-offset: 2px;
    border-radius: 8px;
}
.empty {
    color: var(--muted);
    font-style: italic;
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(21, 36, 66, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    background: var(--panel);
    border-left: 1px solid var(--line);
    box-shadow: none;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1100;
}
.drawer h2 {
    margin: 0;
    font-size: 18px;
}
.drawer .accent-line {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: var(--accent);
    margin: 4px 0 6px;
}
.drawer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    box-shadow: none;
}
.drawer .admin-link {
    background: var(--accent);
}
.drawer .staff-link {
    background: var(--accent-2);
}
.drawer .staff-logout {
    background: #e0473a;
}
.drawer .close {
    align-self: flex-end;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--muted);
}
.drawer-open {
    overflow: hidden;
}
.drawer-open .drawer {
    transform: translateX(0);
}
.drawer-open .drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}
.page-footer{margin-top:24px;padding:12px 0;border-top:1px solid #d9e0e6;text-align:center;color:#6b7785;font-size:12px;background:transparent;border-radius:0;}
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px) + var(--back-to-top-extra));
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid #c7d2e0;
    background: #1f8ead;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 950;
}
.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.my-schedule-sticky {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 940;
    border: 1px solid #d7dfd2;
    border-radius: 14px;
    background: #fffefb;
    box-shadow: 0 14px 28px rgba(18, 30, 42, 0.22);
    padding: 10px 10px 12px;
    display: none;
}
.my-schedule-sticky[hidden] {
    display: none !important;
}
.my-schedule-sticky-title {
    margin: 0;
    color: #203142;
    font-size: 13px;
    font-weight: 800;
}
.my-schedule-sticky-meta {
    margin: 4px 0 0;
    color: #4a6073;
    font-size: 12px;
    line-height: 1.35;
}
.my-schedule-sticky-meta.is-task {
    color: #2b4866;
    font-weight: 700;
}
.my-schedule-sticky-actions {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}
.my-schedule-sticky-actions .chip {
    width: 100%;
    justify-content: center;
}
.app-splash {
    position: fixed;
    inset: 0;
    background: #2b2b2b;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.35s ease;
}
.app-splash.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.app-splash img {
    width: min(78vw, 360px);
    height: auto;
    display: block;
}
.pagination {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.pagination .page-info {
    color: #677184;
    font-size: 12px;
    font-weight: 600;
}
.pagination .page-links {
    display: inline-flex;
    gap: 8px;
}
.pagination .page-links a,
.pagination .page-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
}
.pagination .page-links .page-link-number,
.pagination .page-links .page-link-ellipsis {
    min-width: 44px;
    padding: 6px 10px;
}
.pagination .page-links .page-link-number.is-current {
    opacity: 1;
    background: #2d4a60;
    border-color: #2a4257;
    color: #ffffff;
}
.pagination .page-links .page-link-ellipsis {
    cursor: default;
}
.pagination .page-links span {
    opacity: 0.45;
}
@media (max-width: 720px) {
    .topbar {
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    }
    .wrap {
        padding: 16px 14px 50px;
    }
    summary {
        padding: 14px 16px;
    }
    .search-bar {
        padding: 12px;
    }
}

/* Stage 2 Public Refresh: visual-only (no behavior changes) */
body {
    background-image:
        radial-gradient(circle at 8% -10%, rgba(15, 127, 149, 0.12), transparent 34%),
        radial-gradient(circle at 98% 2%, rgba(205, 122, 37, 0.14), transparent 33%),
        linear-gradient(180deg, #f8f6f2 0%, #efebe3 100%);
    color: var(--ink);
}
.topbar {
    background: linear-gradient(120deg, #1d2a36 0%, #2b3843 52%, #364652 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 28px rgba(19, 29, 39, 0.24);
    padding: calc(12px + var(--safe-top)) 16px 2px;
}
.search-bar {
    margin: 4px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(247, 250, 253, 0.92);
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(16, 24, 39, 0.16);
}
.search-bar input {
    color: #2a3340;
    min-height: 40px;
}
.search-icon {
    color: #0f7f95;
}
.search-clear {
    background: #d9e9f3;
    color: #174569;
}
.search-clear:hover {
    background: #c7deee;
}
.event-list,
.week {
    border-color: #d6dbcf;
    box-shadow: 0 12px 24px rgba(28, 41, 51, 0.07);
}
.section h2,
summary,
.day h3 {
    font-family: "Futura", "Avenir Next", "Trebuchet MS", sans-serif;
    letter-spacing: 0.25px;
    color: #24323d;
}
.event-item + .event-item {
    border-top-color: #dce2d8;
}
.week-dot {
    background: #0f7f95;
}
summary::after {
    color: #cd7a25;
}
.days {
    background: #f8fbf6;
    border-top-color: #dbe2d7;
}
.day {
    background: #fffefb;
    border-color: #d9dfd3;
}
.day.is-today {
    border-color: #0f7f95;
    background: #eff8fb;
    box-shadow: 0 7px 16px rgba(15, 127, 149, 0.18);
}
.today-pill {
    background: #0f7f95;
}
.task-assigned {
    background: #f7efe1;
}
.chip {
    background: #f3f7f0;
    border-color: #d9dfd4;
    color: #2d3a46;
    font-weight: 700;
}
.chip:hover {
    background: #e8f0e7;
}
.badge {
    background: #0f7f95;
}
.badge-holiday {
    background: #fff0ec;
    border-color: #f3c4bc;
    color: #9a2e22;
}
.menu-button {
    border-color: #4f5e6a;
    background: #30414f;
}
.install-button {
    border-color: #0c6c7f;
    background: linear-gradient(180deg, #178ea6 0%, #0f7f95 100%);
    box-shadow: 0 7px 14px rgba(15, 127, 149, 0.24);
}
.install-button:hover {
    filter: brightness(1.05);
}
.drawer {
    background: #fffdf8;
    border-left-color: #d9dfd4;
    box-shadow: 0 18px 36px rgba(28, 41, 51, 0.16);
}
.drawer .admin-link {
    background: #f6e5cc;
    color: #7f430f;
}
.drawer .staff-link {
    background: #d9eef3;
    color: #0e5d70;
}
.drawer .staff-logout {
    background: #f9dad4;
    color: #9b2d20;
}
.pagination .page-links a,
.pagination .page-links span {
    background: #fffefb;
    border-color: #d6dccf;
}
.page-footer {
    border-top-color: #d7ddd2;
}
@media (max-width: 720px) {
    .topbar {
        box-shadow: 0 10px 22px rgba(19, 29, 39, 0.26);
    }
    .search-bar {
        border-radius: 12px;
        margin-top: 6px;
    }
}

/* Stage 4 UX polish */
.search-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f5f8f2;
    border: 1px solid #d9dfd4;
    color: #435465;
    font-weight: 600;
}
.search-count[hidden] {
    display: none;
}
.search-clear:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.pagination .page-links a:hover {
    background: #eef3eb;
}
.pagination .page-links span {
    cursor: not-allowed;
}
.drawer a:focus-visible,
.chip:focus-visible {
    outline: 3px solid rgba(15, 127, 149, 0.35);
    outline-offset: 2px;
}

/* Stage 5: accessibility + mobile hardening */
.search-count {
    color: #3d5164;
}
.event-item .event-note {
    color: #2f588d;
}
.empty {
    color: #4f6070;
}
.menu-button,
.install-button,
.chip,
.drawer a,
.pagination .page-links a,
.pagination .page-links span {
    min-height: 44px;
}
.summary-strip .chip {
    min-width: 120px;
    justify-content: center;
}
.day h3 {
    line-height: 1.35;
    flex-wrap: wrap;
}
@media (max-width: 390px) {
    .topbar {
        padding: calc(10px + var(--safe-top)) 10px 2px;
    }
    .top-actions {
        gap: 6px;
    }
    .brand-mark {
        width: 126px;
        height: 34px;
    }
    .menu-button {
        width: 44px;
        padding: 0;
    }
    .install-button {
        font-size: 12px;
        padding: 8px 10px;
    }
    .wrap {
        padding: 14px 10px 44px;
    }
    .events-card-header h2 {
        font-size: 15px;
    }
    .event-item .event-note {
        font-size: 16px;
    }
    .events-card-icon {
        width: 22px;
        height: 22px;
    }
    .search-bar {
        margin-top: 4px;
        padding: 3px 6px;
        gap: 4px;
        display: grid;
        grid-template-columns: 16px 1fr auto auto;
        align-items: center;
    }
    .search-icon {
        width: 16px;
        height: 16px;
    }
    .search-icon svg {
        width: 13px;
        height: 13px;
    }
    .search-bar input {
        font-size: 16px;
        min-width: 0;
    }
    .search-clear {
        width: 44px;
        height: 44px;
        min-height: 44px;
        font-size: 12px;
    }
    .summary-strip {
        gap: 8px;
    }
    .calendar-export-card .summary-strip .chip {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }
    .section h2 {
        font-size: 17px;
    }
    summary {
        padding: 13px 14px;
        font-size: 14px;
    }
    .days {
        padding: 0 12px;
    }
    details[open] .days {
        padding: 0 12px 12px;
    }
    .day {
        margin-top: 10px;
        padding: 10px 11px;
    }
    .day h3 {
        font-size: 15px;
    }
    .task-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .task-name,
    .assigned-pill {
        justify-self: start;
    }
    .pagination {
        gap: 8px;
    }
    .pagination .page-links {
        width: 100%;
    }
    .pagination .page-links a,
    .pagination .page-links span {
        min-width: 44px;
    }
    .pagination .page-links .page-link-nav {
        flex: 1;
    }
    .pagination .page-links .page-link-number,
    .pagination .page-links .page-link-ellipsis {
        flex: 0 0 auto;
    }
    .back-to-top {
        right: 12px;
        width: 48px;
        height: 48px;
    }
    .drawer {
        width: min(86vw, 300px);
    }
}

/* Stage 6: micro search bar + iOS no-zoom */
.search-form {
    gap: 0;
}
.search-bar {
    margin: 6px 0 0;
    padding: 6px 10px;
    gap: 6px;
    min-height: 44px;
    display: grid;
    grid-template-columns: 16px 1fr auto auto;
    border-radius: 10px;
    align-items: center;
}
.search-icon {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
}
.search-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}
.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.15;
    min-width: 0;
}
.search-bar .search-clear {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
}
.search-bar .search-submit {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #0c6c7f;
    background: linear-gradient(180deg, #178ea6 0%, #0f7f95 100%);
    color: #ffffff;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
}

@media (hover: none) and (pointer: coarse) {
    .search-bar input {
        font-size: 16px;
    }
}

@media (max-width: 900px) {
    .my-schedule-sticky {
        display: block;
    }
}

/* Stage 7: typography consistency */
body {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
}
.section h2,
.events-card-header h2,
.day h3,
.calendar-export-card h3,
.drawer h2 {
    font-size: var(--font-size-h3);
    line-height: var(--line-height-heading);
}
.event-item .event-note {
    font-size: var(--font-size-h3);
    line-height: 1.3;
}
.calendar-export-spoiler > summary {
    font-size: var(--font-size-body-lg);
}
.menu-button,
.install-button,
.chip,
.badge,
.my-duty-lead,
.staff-activity-title,
.task-value,
.my-schedule-sticky-title,
.pagination .page-links a,
.pagination .page-links span,
.search-bar .search-submit {
    font-size: var(--font-size-body-sm);
}
.search-count,
.calendar-export-subtitle,
.calendar-filter-note,
.calendar-export-note,
.my-duty-helper,
.staff-activity-detail,
.my-schedule-sticky-meta,
.pagination .page-info {
    font-size: var(--font-size-body-sm);
}
.events-count,
.calendar-export-tag,
.today-pill,
.assigned-pill,
.task-name,
.staff-activity-time,
.page-footer {
    font-size: var(--font-size-caption);
}
