:root {
  --navy: #1B2848;
  --ink: #111A32;
  --cyan: #109CDA;
  --sky: #A6CDEC;
  --surface: #FFFFFF;
  --soft: #F4F8FC;
  --line: #DCE6F0;
  --muted: #68758B;
  --success: #1A936F;
  --holiday: #FCE7F3;
  --sunday: #FFF0EE;
  --saturday: #EAF7FC;
  --shadow: 0 16px 48px rgba(27, 40, 72, .09);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: hidden; background: var(--soft); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: radial-gradient(circle at 80% -10%, rgba(166, 205, 236, .3), transparent 30rem), var(--soft); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(16, 156, 218, .45); outline-offset: 3px; }

.app-frame { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px max(20px, calc((100vw - 720px) / 2)); background: rgba(255, 255, 255, .96); border-bottom: 1px solid rgba(220, 230, 240, .85); }
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-panel { display: grid; place-items: center; width: 60px; height: 36px; padding: 3px; background: #fff; border-radius: 7px; overflow: hidden; }
.logo-panel img { width: 100%; height: auto; display: block; }
.demo-mark { display: grid; place-items: center; width: 30px; height: 30px; color: var(--navy); border: 2px solid #6E88A3; border-radius: 10px; background: #F4F8FC; font: 800 11px/1 Arial, sans-serif; letter-spacing: .08em; }
.brand-copy { display: grid; gap: 1px; min-width: 0; }
.brand-copy strong { color: var(--navy); font-size: 14px; letter-spacing: .04em; }
.portfolio-return { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-decoration: none; white-space: nowrap; transition: color .2s ease; }
.portfolio-return:hover, .portfolio-return:focus-visible { color: var(--cyan); }
.eyebrow { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.icon-button { display: inline-grid; place-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; color: var(--navy); background: var(--surface); transition: .2s ease; }
.icon-button:hover { border-color: var(--cyan); color: var(--cyan); }
.menu-button { gap: 4px; }
.menu-button .menu-line { display: block; width: 19px; height: 2px; border-radius: 99px; background: currentColor; }
.menu-logo-icon { display: none; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 5px; background: #fff; border-radius: 10px; }
.menu-logo-icon img { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; }

.page-content { width: min(100% - 32px, 720px); margin: 0 auto; padding: 24px 0 148px; }
.hero-card { position: relative; overflow: hidden; padding: 24px; color: #fff; background: linear-gradient(135deg, #1B2848 0%, #253A68 62%, #109CDA 160%); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; right: -75px; bottom: -96px; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.035), 0 0 0 56px rgba(255,255,255,.025); }
.hero-topline, .hero-heading, .hero-footer { position: relative; z-index: 1; }
.hero-topline { display: flex; align-items: center; gap: 7px; min-height: 18px; color: rgba(255,255,255,.78); font-size: 11px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #6BE3B0; box-shadow: 0 0 0 4px rgba(107, 227, 176, .15); }
.live-dot.is-demo { background: #FFD166; box-shadow: 0 0 0 4px rgba(255,209,102,.16); }
.source-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .7; }
.hero-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; padding: 36px 0 28px; }
.section-kicker { margin: 0 0 6px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.hero-card .section-kicker { color: #A6CDEC; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(27px, 8vw, 38px); line-height: 1.15; letter-spacing: -.04em; }
h2 { margin-bottom: 0; color: var(--navy); font-size: 22px; letter-spacing: -.03em; }
.period-label { margin-bottom: 0; color: rgba(255,255,255,.7); font-size: 13px; }
.period-badge { display: grid; place-items: center; flex: none; width: 72px; height: 72px; color: var(--navy); background: #fff; border-radius: 22px; font-weight: 800; line-height: 1.15; text-align: center; box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.period-badge::first-line { font-size: 12px; }
.hero-footer { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); }
.office-picker { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; max-width: 75%; padding: 0; color: #fff; text-align: left; border: 0; background: transparent; }
.office-picker-label { grid-column: 1 / -1; color: rgba(255,255,255,.62); font-size: 10px; }
.office-picker strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.chevron { align-self: center; font-size: 26px; line-height: 1; color: #A6CDEC; }
.updated-label { flex: none; color: rgba(255,255,255,.6); font-size: 10px; text-align: right; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.stat-card { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 3px; min-height: 84px; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 8px 20px rgba(27,40,72,.035); }
.stat-label { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.stat-card strong { color: var(--navy); font-size: 28px; line-height: 1; }
.stat-suffix { padding-bottom: 2px; color: var(--muted); font-size: 11px; }
.stat-card-accent { background: #FFF8FB; border-color: #F6D6E7; }
.stat-card-accent strong { color: #C03575; }

.toolbar-card { display: grid; gap: 12px; padding: 12px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: var(--radius-md); }
.search-field { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.search-field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(16,156,218,.1); }
.search-icon { color: var(--cyan); font-size: 23px; line-height: 1; transform: rotate(-20deg); }
.search-field input { min-width: 0; flex: 1; padding: 2px 0; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 14px; }
.search-field input::placeholder { color: #98A4B6; }
.clear-button { display: none; width: 30px; height: 30px; padding: 0; color: var(--muted); border: 0; border-radius: 50%; background: var(--soft); }
.clear-button.is-visible { display: inline-grid; place-items: center; }
.view-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--soft); border-radius: 11px; }
.toggle-button { min-height: 38px; color: var(--muted); border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 700; }
.toggle-button.is-active { color: var(--navy); background: #fff; box-shadow: 0 3px 9px rgba(27,40,72,.08); }
.edit-mode-control { display: flex; align-items: center; gap: 10px; min-width: 0; }
.edit-mode-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 14px; color: var(--navy); border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; }
.edit-mode-button:hover { border-color: var(--cyan); }
.edit-mode-button.is-active { color: #fff; border-color: #B43147; background: #B43147; box-shadow: 0 6px 18px rgba(180,49,71,.18); }
.edit-mode-button:disabled { opacity: .55; cursor: wait; }
.edit-mode-icon { display: inline-grid; place-items: center; min-width: 28px; height: 25px; padding: 0 5px; color: inherit; background: rgba(16,156,218,.1); border-radius: 7px; font-size: 10px; }
.edit-mode-button.is-active .edit-mode-icon { background: rgba(255,255,255,.18); }
.edit-mode-status { min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.edit-save-all-button { min-height: 40px; padding: 0 12px; color: #fff; border: 1px solid var(--cyan); border-radius: 10px; background: var(--cyan); font-size: 12px; font-weight: 800; white-space: nowrap; }
.edit-save-all-button:disabled { color: var(--muted); border-color: var(--line); background: var(--soft); opacity: .75; }
.is-edit-mode .schedule-section { box-shadow: 0 0 0 3px rgba(180,49,71,.08); border-radius: var(--radius-md); }
.shift-edit-button { position: relative; border: 2px solid #B43147; box-shadow: 0 3px 9px rgba(180,49,71,.12); }
.shift-edit-button::after { content: "編集"; position: absolute; right: -5px; top: -12px; padding: 1px 4px; color: #fff; background: #B43147; border-radius: 5px; font-size: 8px; line-height: 1.4; }

.shift-editor-backdrop { position: fixed; z-index: 90; inset: 0; background: rgba(17,26,50,.48); }
.shift-editor-backdrop:not([hidden]) { display: block; }
.shift-editor { position: fixed; z-index: 100; left: 50%; bottom: 0; display: grid; gap: 16px; width: min(100%, 560px); max-height: 86dvh; padding: 24px 20px max(22px, env(safe-area-inset-bottom)); overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -18px 48px rgba(17,26,50,.22); transform: translate(-50%, 110%); transition: transform .24s ease; }
.shift-editor.is-open { transform: translate(-50%, 0); }
.shift-editor-header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.shift-editor-context { display: grid; gap: 4px; margin: 0; padding: 13px 14px; color: var(--navy); background: var(--soft); border-radius: 12px; }
.shift-editor-context strong { font-size: 16px; }
.shift-editor-context span { color: var(--muted); font-size: 13px; }
.shift-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.shift-option { min-height: 52px; padding: 6px; color: var(--navy); border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; font-weight: 800; }
.shift-option:first-child { grid-column: span 2; font-size: 13px; }
.shift-option.is-selected { color: #fff; border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 2px rgba(16,156,218,.14); }
.shift-editor-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 9px; }
.shift-editor-actions button { min-height: 50px; border-radius: 12px; font-size: 14px; font-weight: 800; }
.editor-cancel-button { color: var(--muted); border: 1px solid var(--line); background: #fff; }
.editor-save-button { color: #fff; border: 1px solid var(--navy); background: var(--navy); }
.editor-save-button:disabled { opacity: .55; }


.notice-card { display: flex; align-items: center; gap: 10px; margin: 16px 0 28px; padding: 13px 14px; color: var(--navy); background: #EDF8FD; border: 1px solid #CBEAF8; border-radius: var(--radius-md); }
.notice-icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; color: #fff; background: var(--cyan); border-radius: 9px; font-size: 16px; }
.notice-card strong { display: block; margin-bottom: 2px; font-size: 12px; }
.notice-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.notice-actions { display: flex; flex: none; gap: 9px; margin-left: auto; }
.text-button { padding: 7px 2px; color: var(--cyan); border: 0; background: transparent; font-size: 11px; font-weight: 800; text-decoration: none; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 14px; }
.result-count { padding: 6px 9px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; font-size: 11px; }
.schedule-content { display: grid; gap: 10px; }
.day-card { overflow: hidden; scroll-margin-top: 86px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); }
.day-card.is-today { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(16,156,218,.1); }
.day-card.is-sunday, .day-card.is-holiday { background: linear-gradient(110deg, var(--sunday), #fff 44%); }
.day-card.is-saturday { background: linear-gradient(110deg, var(--saturday), #fff 44%); }
.day-head { display: flex; align-items: center; gap: 9px; padding: 12px 14px 9px; border-bottom: 1px solid #EEF3F7; }
.day-number { display: grid; place-items: center; flex: none; width: 40px; height: 40px; color: var(--navy); background: var(--soft); border-radius: 12px; font-weight: 800; line-height: 1.05; }
.is-sunday .day-number, .is-holiday .day-number { color: #C3414E; background: #FFE0DE; }
.is-saturday .day-number { color: #0878A9; background: #D9F2FC; }
.day-number small { font-size: 10px; font-weight: 700; }
.day-label { display: grid; gap: 2px; }
.day-label strong { font-size: 14px; }
.day-label span { color: var(--muted); font-size: 10px; }
.holiday-label { margin-left: auto; padding: 5px 7px; color: #B82967; background: var(--holiday); border-radius: 7px; font-size: 10px; font-weight: 700; }
.today-label { margin-left: auto; padding: 5px 7px; color: #fff; background: var(--cyan); border-radius: 7px; font-size: 10px; font-weight: 700; }
.shift-list { display: grid; gap: 0; padding: 2px 14px; }
.shift-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; border-bottom: 1px solid #F0F3F7; }
.shift-row:last-child { border-bottom: 0; }
.staff-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; }
.shift-chip { display: inline-grid; place-items: center; min-width: 38px; min-height: 28px; padding: 2px 7px; color: var(--navy); background: #EDF2F7; border-radius: 8px; font-size: 12px; font-weight: 800; }
.shift-chip.is-off { color: #B43147; background: #FFE2E5; }
.shift-chip.is-leave { color: #9B4A83; background: #F4E7F4; }
.shift-chip.is-work { color: #0476A8; background: #E1F5FC; }
.shift-chip.is-empty { color: #A0ABBB; background: #F7F9FB; font-weight: 500; }
.empty-day { padding: 12px 14px 14px; color: var(--muted); font-size: 11px; }
.monthly-wrap { max-height: min(70vh, 640px); overflow: auto; padding-bottom: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); scrollbar-gutter: stable; }
.monthly-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 11px; }
.monthly-table th, .monthly-table td { min-width: 39px; height: 39px; padding: 5px 4px; text-align: center; border-right: 1px solid #EDF1F5; border-bottom: 1px solid #EDF1F5; }
.monthly-table thead th { position: sticky; top: 0; z-index: 2; color: var(--navy); background: var(--soft); font-size: 10px; }
.monthly-table th:first-child, .monthly-table td:first-child { position: sticky; left: 0; z-index: 3; min-width: 104px; max-width: 132px; padding: 5px 9px; color: var(--ink); background: #fff; text-align: left; }
.monthly-table thead th:first-child { z-index: 4; background: var(--soft); }
.monthly-table .sunday { color: #C3414E; background: var(--sunday); }
.monthly-table .saturday { color: #0878A9; background: var(--saturday); }
.monthly-table .holiday { color: #B82967; background: var(--holiday); }
.monthly-table .today { box-shadow: inset 0 0 0 2px var(--cyan); }
.monthly-table td { font-weight: 800; }
.monthly-table td.off { color: #B43147; background: #FFE2E5; }
.monthly-table td.leave { color: #9B4A83; background: #F4E7F4; }
.monthly-table td.work { color: #0476A8; }
.monthly-table td.empty { color: #A0ABBB; font-weight: 500; }
.loading-state, .error-state, .empty-state { display: grid; place-items: center; gap: 8px; min-height: 190px; padding: 28px; color: var(--muted); background: rgba(255,255,255,.8); border: 1px dashed var(--line); border-radius: var(--radius-md); text-align: center; }
.loading-state p, .error-state p, .empty-state p { margin: 0; font-size: 12px; }
.error-state strong { color: #B43147; font-size: 14px; }
.retry-button { min-height: 40px; padding: 0 14px; color: #fff; border: 0; border-radius: 10px; background: var(--navy); font-size: 12px; font-weight: 800; }
.spinner { width: 24px; height: 24px; border: 3px solid #DDECF4; border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-footer { display: flex; justify-content: space-between; gap: 16px; width: min(100% - 32px, 720px); margin: 0 auto; padding: 0 0 118px; color: #8995A7; font-size: 10px; }
.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 46px minmax(108px, 1fr) 46px auto 54px 54px 54px; align-items: center; gap: 4px; width: min(calc(100% - 24px), 720px); min-height: 68px; padding: 7px 8px; transform: translateX(-50%); background: rgba(255,255,255,.94); border: 1px solid rgba(220,230,240,.95); border-radius: 20px; box-shadow: 0 14px 42px rgba(17,26,50,.18); backdrop-filter: blur(18px); }
.bottom-nav button { min-width: 44px; min-height: 52px; color: var(--muted); border: 0; border-radius: 13px; background: transparent; }
.bottom-nav button:disabled { opacity: .32; cursor: not-allowed; }
.bottom-nav-arrow { display: grid; place-items: center; line-height: 1; }
.bottom-nav-arrow span { color: var(--navy); font-size: 29px; font-weight: 300; }
.bottom-nav-arrow small, .bottom-view-button small, .month-picker-button small { font-size: 9px; font-weight: 700; }
.month-picker-button { display: grid; align-content: center; gap: 1px; padding: 3px 7px; color: var(--navy) !important; background: var(--soft) !important; text-align: center; }
.month-picker-button strong { font-size: 14px; line-height: 1.1; }
.month-picker-button small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav-label { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.bottom-nav-divider { width: 1px; height: 34px; margin: 0 2px; background: var(--line); }
.bottom-view-button { display: grid; place-items: center; align-content: center; gap: 1px; }
.bottom-view-button .view-icon { color: var(--muted); font-size: 19px; line-height: 1; }
.bottom-view-button.is-active { color: var(--navy); background: #EAF7FC !important; }
.bottom-view-button.is-active .view-icon { color: var(--cyan); }
.bottom-today-button { display: grid; place-items: center; align-content: center; gap: 1px; color: var(--cyan) !important; background: #F3FBFE !important; }
.today-button-icon { color: var(--cyan); font-size: 21px; line-height: 1; }
.bottom-today-button small { color: var(--navy); font-size: 9px; font-weight: 800; }
.bottom-today-button:hover, .bottom-today-button:focus-visible { border: 1px solid var(--cyan); background: #EAF7FC !important; }
.month-sheet-backdrop { position: fixed; z-index: 70; inset: 0; background: rgba(17,26,50,.38); opacity: 0; transition: opacity .2s ease; }
.month-sheet-backdrop:not([hidden]) { display: block; opacity: 1; }
.month-sheet { position: fixed; z-index: 80; left: 50%; bottom: 0; display: grid; gap: 18px; width: min(100%, 720px); max-height: min(78dvh, 560px); padding: 24px 20px max(22px, env(safe-area-inset-bottom)); overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -18px 48px rgba(17,26,50,.18); transform: translate(-50%, 110%); transition: transform .25s ease; }
.month-sheet.is-open { transform: translate(-50%, 0); }
.month-sheet-header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.month-sheet-header h2 { font-size: 23px; }
.month-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.month-option { display: grid; gap: 3px; min-height: 64px; padding: 10px; color: var(--navy); border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: left; }
.month-option strong { font-size: 13px; }
.month-option small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.month-option.is-selected { border-color: var(--cyan); background: #EAF7FC; box-shadow: inset 0 0 0 1px var(--cyan); }
.month-option.is-loading { opacity: .6; }
.month-sheet-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.site-drawer { position: fixed; z-index: 50; top: 0; right: 0; display: flex; flex-direction: column; width: min(88vw, 360px); height: 100dvh; padding: 24px 18px max(18px, env(safe-area-inset-bottom)); background: #fff; box-shadow: -12px 0 42px rgba(17,26,50,.16); transform: translateX(105%); transition: transform .25s ease; }
.site-drawer.is-open { transform: translateX(0); }
.drawer-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(17,26,50,.42); opacity: 0; transition: opacity .25s ease; }
.drawer-backdrop:not([hidden]) { display: block; opacity: 1; }
.drawer-header { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 20px; }
.drawer-header-actions { display: flex; align-items: center; gap: 8px; }
.drawer-minimize-button { min-height: 44px; padding: 0 12px; color: var(--navy); border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 13px; font-weight: 800; white-space: nowrap; }
.drawer-minimize-button:hover { color: var(--cyan); border-color: var(--cyan); }
.drawer-minimize-button-wide { display: block; width: 100%; margin-top: auto; }
.drawer-header h2 { font-size: 24px; }
.close-button { color: var(--muted); font-size: 25px; }
.drawer-search { flex: none; margin-bottom: 16px; }
.drawer-quick-action { flex: none; margin: -2px 0 10px; }
.drawer-today-button { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 10px 12px; color: var(--navy); border: 1px solid #BFEAF7; border-radius: 14px; background: #F3FBFE; text-align: left; }
.drawer-today-button:hover, .drawer-today-button:focus-visible { border-color: var(--cyan); background: #EAF7FC; }
.drawer-today-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; border-radius: 50%; background: var(--cyan); font-size: 15px; line-height: 1; }
.drawer-today-button strong, .drawer-today-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-today-button strong { font-size: 14px; }
.drawer-today-button small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.drawer-today-button .office-arrow { color: var(--cyan); font-size: 24px; line-height: 1; }
.area-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 7px; scrollbar-width: none; }
.area-tabs::-webkit-scrollbar { display: none; }
.area-tab { flex: none; min-height: 38px; padding: 0 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12px; font-weight: 800; }
.area-tab.is-active { color: #fff; border-color: var(--navy); background: var(--navy); }
.drawer-list { display: grid; gap: 8px; overflow-y: auto; padding: 10px 2px 16px; }
.office-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; padding: 13px; color: var(--ink); text-align: left; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.office-item:hover, .office-item.is-active { border-color: var(--cyan); background: #F3FBFE; }
.office-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.office-item span { color: var(--muted); font-size: 10px; }
.office-item .office-arrow { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--cyan); font-size: 22px; }
.drawer-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.drawer-footer a { color: var(--cyan); font-size: 12px; font-weight: 800; text-decoration: none; }
.drawer-footer p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 11px 14px; color: #fff; background: var(--navy); border-radius: 11px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .page-content { padding-top: 32px; }
  .toolbar-card { display: block; }
  .toolbar-card .search-field { max-width: 420px; }
  .notice-card { padding: 15px 16px; }
}

/* Smartphone readability and thumb-friendly controls */
@media (max-width: 699px) {
  body { font-size: 16px; }
  .topbar { justify-content: flex-start; padding: 16px; }
  .logo-panel { width: 112px; height: 50px; padding: 5px; border-radius: 10px; }
  .logo-panel img { max-height: 100%; object-fit: contain; }
  .brand-lockup { gap: 12px; }
  .brand-copy strong { font-size: 17px; }
  .eyebrow { font-size: 11px; }
  .topbar > .menu-button {
    position: fixed;
    z-index: 36;
    left: 16px;
    bottom: calc(env(safe-area-inset-bottom) + 104px);
    width: 56px;
    height: 56px;
    color: #fff;
    border-color: var(--navy);
    border-radius: 18px;
    background: var(--navy);
    box-shadow: 0 12px 28px rgba(17, 26, 50, .24);
  }
  .topbar > .menu-button::after {
    content: "メニュー";
    position: absolute;
    right: -2px;
    bottom: -18px;
    color: var(--navy);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
  }
  .menu-button span { width: 22px; height: 3px; }

  .page-content { width: min(100% - 24px, 720px); padding: 20px 0 158px; }
  .hero-card { padding: 26px 22px 22px; }
  .hero-topline { min-height: 22px; font-size: 13px; }
  .hero-heading { gap: 12px; padding: 34px 0 28px; }
  .section-kicker { margin-bottom: 8px; font-size: 13px; }
  h1 { font-size: clamp(32px, 9vw, 40px); }
  h2 { font-size: 26px; }
  .period-label { font-size: 16px; }
  .period-badge { width: 82px; height: 82px; border-radius: 24px; font-size: 17px; }
  .period-badge::first-line { font-size: 14px; }
  .hero-footer { gap: 10px; padding-top: 20px; }
  .office-picker { max-width: 74%; }
  .office-picker-label { font-size: 12px; }
  .office-picker strong { font-size: 17px; }
  .chevron { font-size: 30px; }
  .updated-label { font-size: 12px; }

  .stat-grid { gap: 8px; margin: 18px 0; }
  .stat-card { min-height: 94px; padding: 14px 12px; }
  .stat-label { font-size: 13px; }
  .stat-card strong { font-size: 32px; }
  .stat-suffix { font-size: 13px; }
  .toolbar-card { gap: 14px; padding: 14px; }
  .search-field { min-height: 54px; padding: 0 14px; }
  .search-icon { font-size: 26px; }
  .search-field input { font-size: 16px; }
  .clear-button { width: 34px; height: 34px; }
  .toggle-button { min-height: 44px; font-size: 15px; }
  .notice-card { gap: 12px; margin: 18px 0 32px; padding: 15px; }
  .notice-icon { width: 32px; height: 32px; font-size: 18px; }
  .notice-card strong { font-size: 14px; }
  .notice-card p { font-size: 13px; line-height: 1.55; }
  .text-button { padding: 8px 2px; font-size: 13px; }
  .section-heading { margin-bottom: 16px; }
  .result-count { padding: 7px 10px; font-size: 13px; }

  .day-card { content-visibility: auto; contain-intrinsic-size: 132px; }
  .day-head { gap: 11px; padding: 14px 16px 11px; }
  .day-number { width: 46px; height: 46px; border-radius: 14px; font-size: 17px; }
  .day-number small { font-size: 12px; }
  .day-label { gap: 3px; }
  .day-label strong { font-size: 17px; }
  .day-label span { font-size: 13px; }
  .holiday-label, .today-label { padding: 6px 8px; font-size: 13px; }
  .shift-list { padding: 3px 16px; }
  .shift-row { min-height: 50px; gap: 14px; }
  .staff-name { font-size: 16px; }
  .shift-chip { min-width: 44px; min-height: 32px; padding: 3px 9px; border-radius: 9px; font-size: 14px; }
  .empty-day { padding: 14px 16px 16px; font-size: 13px; }
  .monthly-table { font-size: 13px; }
  .monthly-wrap { max-height: calc(100dvh - 250px); }
  .monthly-table th, .monthly-table td { min-width: 44px; height: 46px; }
  .monthly-table thead th { font-size: 12px; }
  .monthly-table th:first-child, .monthly-table td:first-child { min-width: 126px; max-width: 154px; padding: 6px 10px; }
  .loading-state, .error-state, .empty-state { min-height: 220px; padding: 32px 22px; }
  .loading-state p, .error-state p, .empty-state p { font-size: 14px; }
  .error-state strong { font-size: 16px; }
  .retry-button { min-height: 46px; padding: 0 16px; font-size: 14px; }

  .app-footer { width: min(100% - 24px, 720px); padding-bottom: 140px; font-size: 12px; line-height: 1.5; }
  .bottom-nav {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(calc(100% - 16px), 720px);
    min-height: 78px;
    padding: 8px 6px;
    gap: 3px;
    border-radius: 22px;
    background: rgba(255,255,255,.98);
    backdrop-filter: none;
  }
  .bottom-nav button { min-width: 44px; min-height: 60px; border-radius: 14px; }
  .bottom-nav-arrow span { font-size: 34px; }
  .bottom-nav-arrow small, .bottom-view-button small, .month-picker-button small { font-size: 11px; }
  .month-picker-button { padding: 4px 6px; }
  .month-picker-button strong { font-size: 16px; }
  .bottom-nav-label { font-size: 11px; }
  .bottom-view-button .view-icon { font-size: 22px; }
  .bottom-nav-divider { height: 40px; }

  .month-sheet { gap: 20px; padding: 28px 20px max(26px, env(safe-area-inset-bottom)); }
  .month-sheet-header h2 { font-size: 26px; }
  .month-options { gap: 10px; }
  .month-option { min-height: 72px; padding: 12px; }
  .month-option strong { font-size: 15px; }
  .month-option small { font-size: 12px; }
  .month-sheet-note { font-size: 12px; line-height: 1.6; }
  .site-drawer { width: min(92vw, 420px); padding: 28px 20px max(24px, env(safe-area-inset-bottom)); }
  .drawer-header { margin-bottom: 22px; }
  .drawer-header h2 { font-size: 28px; }
  .close-button { width: 52px; height: 52px; font-size: 30px; }
  .drawer-search { margin-bottom: 18px; }
  .area-tabs { gap: 8px; padding-bottom: 9px; }
  .area-tab { min-height: 46px; padding: 0 15px; font-size: 14px; }
  .drawer-list { gap: 10px; padding: 12px 2px 18px; }
  .office-item { gap: 5px 14px; padding: 16px; border-radius: 15px; }
  .office-item strong { font-size: 16px; }
  .office-item span { font-size: 13px; }
  .office-item .office-arrow { font-size: 26px; }
  .drawer-footer { padding-top: 18px; }
  .drawer-footer a { font-size: 14px; }
  .drawer-footer p { font-size: 12px; line-height: 1.6; }
  .toast { bottom: 100px; max-width: calc(100% - 32px); padding: 13px 16px; font-size: 14px; }
  .topbar { box-shadow: 0 8px 24px rgba(17,26,50,.08); backdrop-filter: none; }
  .bottom-nav { box-shadow: 0 8px 24px rgba(17,26,50,.08); }
}

/* Extra-large mobile type scale for staff-facing readability */
@media (max-width: 699px) {
  body { font-size: 18px; }
  .hero-topline { font-size: 14px; }
  .section-kicker { font-size: 14px; }
  h1 { font-size: clamp(36px, 10vw, 44px); }
  h2 { font-size: 28px; }
  .period-label { font-size: 18px; }
  .office-picker-label { font-size: 14px; }
  .office-picker strong { font-size: 19px; }
  .updated-label { font-size: 13px; }
  .stat-label { font-size: 14px; }
  .stat-card strong { font-size: 34px; }
  .stat-suffix { font-size: 14px; }
  .search-field input { font-size: 18px; }
  .toggle-button { font-size: 17px; }
  .notice-card strong { font-size: 16px; }
  .notice-card p { font-size: 15px; }
  .text-button { font-size: 15px; }
  .result-count { font-size: 14px; }
  .day-number { font-size: 19px; }
  .day-number small { font-size: 13px; }
  .day-label strong { font-size: 19px; }
  .day-label span { font-size: 15px; }
  .holiday-label, .today-label { font-size: 14px; }
  .staff-name { font-size: 18px; }
  .shift-chip { font-size: 16px; }
  .empty-day { font-size: 15px; }
  .monthly-table { font-size: 15px; }
  .monthly-table thead th { font-size: 14px; }
  .monthly-table th:first-child, .monthly-table td:first-child { font-size: 16px; }
  .loading-state p, .error-state p, .empty-state p { font-size: 16px; }
  .error-state strong { font-size: 18px; }
  .retry-button { font-size: 16px; }
  .app-footer { font-size: 13px; }
  .bottom-nav-arrow small, .bottom-view-button small, .month-picker-button small { font-size: 13px; }
  .month-picker-button strong { font-size: 18px; }
  .bottom-nav-label { font-size: 12px; }
  .bottom-view-button .view-icon { font-size: 24px; }
  .month-sheet-header h2 { font-size: 28px; }
  .month-option strong { font-size: 17px; }
  .month-option small { font-size: 14px; }
  .month-sheet-note { font-size: 14px; }
  .drawer-header h2 { font-size: 30px; }
  .area-tab { font-size: 15px; }
  .office-item strong { font-size: 18px; }
  .office-item span { font-size: 14px; }
  .drawer-footer a { font-size: 15px; }
  .drawer-footer p { font-size: 14px; }
  .toast { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Senior-readable mobile scale: larger type and easier thumb targets */
@media (max-width: 699px) {
  body { font-size: 19px; }
  .topbar { min-height: 88px; padding: 18px 20px; }
  .logo-panel { width: 140px; height: 62px; padding: 6px; border-radius: 12px; }
  .brand-lockup { gap: 16px; }
  .brand-copy strong { font-size: 20px; }
  .eyebrow { font-size: 12px; }
  .topbar > .menu-button { left: 20px; bottom: calc(env(safe-area-inset-bottom) + 116px); width: 68px; height: 68px; border-radius: 20px; }
  .menu-button span { width: 30px; height: 4px; }
  .topbar > .menu-button::after { right: 0; bottom: -22px; font-size: 13px; }
  .page-content { width: min(100% - 32px, 720px); padding-top: 24px; padding-bottom: 176px; }
  .hero-card { padding: 30px 24px 26px; }
  .hero-topline { font-size: 16px; }
  .section-kicker { font-size: 16px; }
  h1 { font-size: clamp(38px, 11vw, 48px); }
  h2 { font-size: 30px; }
  .period-label { font-size: 20px; }
  .period-badge { width: 92px; height: 92px; border-radius: 26px; font-size: 19px; }
  .period-badge::first-line { font-size: 16px; }
  .office-picker-label { font-size: 15px; }
  .office-picker strong { font-size: 20px; }
  .chevron { font-size: 36px; }
  .updated-label { font-size: 14px; }
  .stat-grid { gap: 12px; margin: 20px 0; }
  .stat-card { min-height: 108px; padding: 16px 14px; }
  .stat-label { font-size: 15px; }
  .stat-card strong { font-size: 38px; }
  .stat-suffix { font-size: 15px; }
  .toolbar-card { gap: 16px; padding: 16px; }
  .search-field { min-height: 64px; padding: 0 16px; border-radius: 14px; }
  .search-icon { font-size: 32px; }
  .search-field input { font-size: 20px; }
  .clear-button { width: 44px; height: 44px; font-size: 22px; }
  .toggle-button { min-height: 52px; font-size: 18px; }
  .notice-card { gap: 16px; padding: 18px; }
  .notice-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; }
  .notice-card strong { font-size: 17px; }
  .notice-card p { font-size: 16px; }
  .text-button { padding: 10px 4px; font-size: 16px; }
  .result-count { padding: 8px 12px; font-size: 15px; }
  .day-head { gap: 14px; padding: 16px 18px 13px; }
  .day-number { width: 54px; height: 54px; border-radius: 16px; font-size: 21px; }
  .day-number small { font-size: 14px; }
  .day-label strong { font-size: 20px; }
  .day-label span { font-size: 16px; }
  .holiday-label, .today-label { padding: 8px 10px; font-size: 16px; }
  .shift-list { padding: 4px 18px; }
  .shift-row { min-height: 58px; gap: 16px; }
  .staff-name { font-size: 20px; }
  .shift-chip { min-width: 52px; min-height: 38px; padding: 4px 10px; border-radius: 10px; font-size: 18px; }
  .empty-day { padding: 16px 18px 18px; font-size: 16px; }
  .monthly-table { font-size: 17px; }
  .monthly-table th, .monthly-table td { min-width: 52px; height: 54px; padding: 6px 5px; }
  .monthly-table thead th { font-size: 16px; }
  .monthly-table th:first-child, .monthly-table td:first-child { min-width: 144px; max-width: 170px; padding: 7px 12px; font-size: 18px; }
  .loading-state, .error-state, .empty-state { min-height: 240px; padding: 36px 24px; }
  .loading-state p, .error-state p, .empty-state p { font-size: 17px; }
  .error-state strong { font-size: 20px; }
  .retry-button { min-height: 56px; padding: 0 20px; font-size: 17px; }
  .app-footer { padding-bottom: 156px; font-size: 14px; }
  .bottom-nav { width: min(calc(100% - 16px), 720px); min-height: 94px; padding: 10px 8px; gap: 4px; border-radius: 24px; }
  .bottom-nav button { min-width: 56px; min-height: 76px; border-radius: 16px; }
  .bottom-nav-arrow span { font-size: 42px; }
  .bottom-nav-arrow small, .bottom-view-button small, .month-picker-button small { font-size: 14px; }
  .month-picker-button { padding: 6px 8px; }
  .month-picker-button strong { font-size: 20px; }
  .bottom-nav-label { font-size: 14px; }
  .bottom-view-button .view-icon { font-size: 30px; }
  .bottom-nav-divider { height: 48px; }
  .month-sheet { gap: 24px; padding: 32px 24px max(30px, env(safe-area-inset-bottom)); }
  .month-sheet-header h2 { font-size: 30px; }
  .month-options { gap: 12px; }
  .month-option { min-height: 84px; padding: 14px; border-radius: 15px; }
  .month-option strong { font-size: 18px; }
  .month-option small { font-size: 15px; }
  .month-sheet-note { font-size: 15px; }
  .close-button { width: 60px; height: 60px; font-size: 36px; }
  .site-drawer { width: min(94vw, 440px); padding: 32px 24px max(28px, env(safe-area-inset-bottom)); }
  .drawer-header { margin-bottom: 24px; }
  .drawer-header h2 { font-size: 32px; }
  .drawer-search { margin-bottom: 20px; }
  .area-tabs { gap: 10px; padding-bottom: 11px; }
  .area-tab { min-height: 54px; padding: 0 18px; font-size: 17px; }
  .drawer-list { gap: 12px; padding: 14px 2px 20px; }
  .office-item { gap: 6px 16px; padding: 18px; border-radius: 16px; }
  .office-item strong { font-size: 20px; }
  .office-item span { font-size: 16px; }
  .office-item .office-arrow { font-size: 34px; }
  .drawer-footer { padding-top: 20px; }
  .drawer-footer a { font-size: 17px; }
  .drawer-footer p { font-size: 15px; }
  .toast { bottom: 116px; padding: 16px 18px; font-size: 18px; }
}

/* Maximum mobile readability mode */
@media (max-width: 699px) {
  html,
  body { overflow-x: hidden; }

  body { font-size: 24px; }
  .topbar { min-height: 112px; padding: 20px 24px; }
  .logo-panel { width: 180px; height: 80px; padding: 8px; border-radius: 16px; }
  .brand-lockup { gap: 20px; }
  .brand-copy strong { font-size: 26px; }
  .eyebrow { font-size: 15px; }
  .topbar > .menu-button { left: 20px; bottom: calc(env(safe-area-inset-bottom) + 178px); width: 88px; height: 88px; border-radius: 24px; }
  .menu-button span { width: 40px; height: 5px; }
  .topbar > .menu-button::after { right: 0; bottom: -28px; font-size: 16px; }
  .page-content { width: min(100% - 32px, 720px); padding-top: 28px; padding-bottom: 232px; }
  .hero-card { padding: 36px 28px 32px; }
  .hero-topline { font-size: 20px; }
  .section-kicker { font-size: 20px; }
  h1 { font-size: clamp(44px, 12vw, 56px); }
  h2 { font-size: 36px; }
  .period-label { font-size: 24px; }
  .period-badge { width: 112px; height: 112px; border-radius: 30px; font-size: 24px; }
  .period-badge::first-line { font-size: 20px; }
  .office-picker-label { font-size: 18px; }
  .office-picker strong { font-size: 25px; }
  .chevron { font-size: 44px; }
  .updated-label { font-size: 17px; }
  .stat-grid { gap: 16px; margin: 24px 0; }
  .stat-card { min-height: 136px; padding: 20px 16px; }
  .stat-label { font-size: 18px; }
  .stat-card strong { font-size: 46px; }
  .stat-suffix { font-size: 18px; }
  .toolbar-card { gap: 20px; padding: 20px; }
  .search-field { min-height: 76px; padding: 0 20px; border-radius: 16px; }
  .search-icon { font-size: 40px; }
  .search-field input { font-size: 24px; }
  .clear-button { width: 56px; height: 56px; font-size: 28px; }
  .toggle-button { min-height: 64px; font-size: 22px; }
  .notice-card { gap: 20px; padding: 22px; }
  .notice-icon { width: 52px; height: 52px; border-radius: 16px; font-size: 28px; }
  .notice-card strong { font-size: 22px; }
  .notice-card p { font-size: 20px; }
  .text-button { padding: 12px 4px; font-size: 20px; }
  .result-count { padding: 10px 14px; font-size: 18px; }
  .day-head { gap: 18px; padding: 20px 22px 16px; }
  .day-number { width: 68px; height: 68px; border-radius: 20px; font-size: 28px; }
  .day-number small { font-size: 18px; }
  .day-label strong { font-size: 26px; }
  .day-label span { font-size: 20px; }
  .holiday-label, .today-label { padding: 10px 14px; font-size: 20px; }
  .shift-list { padding: 6px 22px; }
  .shift-row { min-height: 76px; gap: 20px; }
  .staff-name { font-size: 26px; }
  .shift-chip { min-width: 68px; min-height: 52px; padding: 6px 14px; border-radius: 14px; font-size: 24px; }
  .empty-day { padding: 20px 22px 22px; font-size: 20px; }
  .monthly-table { font-size: 22px; }
  .monthly-table th, .monthly-table td { min-width: 66px; height: 68px; padding: 8px 6px; }
  .monthly-table thead th { font-size: 20px; }
  .monthly-table th:first-child, .monthly-table td:first-child { min-width: 180px; max-width: 210px; padding: 10px 14px; font-size: 24px; }
  .loading-state, .error-state, .empty-state { min-height: 300px; padding: 44px 28px; }
  .loading-state p, .error-state p, .empty-state p { font-size: 21px; }
  .error-state strong { font-size: 25px; }
  .retry-button { min-height: 68px; padding: 0 24px; font-size: 22px; }
  .app-footer { padding-bottom: 206px; font-size: 18px; }
  .bottom-nav { width: min(calc(100% - 8px), 720px); min-height: 144px; padding: 12px 8px; gap: 2px; border-radius: 32px; }
  .bottom-nav { grid-template-columns: 42px minmax(120px, 1fr) 42px 8px 48px 48px 48px; }
  .bottom-nav button { min-width: 48px; min-height: 120px; border-radius: 20px; }
  .bottom-nav-arrow span { font-size: 52px; }
  .bottom-nav-arrow small, .bottom-view-button small, .month-picker-button small { font-size: 17px; }
  .month-picker-button { padding: 8px 6px; }
  .month-picker-button strong { font-size: 22px; }
  .bottom-nav-label { font-size: 17px; }
  .bottom-view-button .view-icon { font-size: 38px; }
  .bottom-nav-divider { height: 64px; }
  .today-button-icon { font-size: 34px; }
  .bottom-today-button small { font-size: 17px; }
  .month-sheet { gap: 28px; padding: 40px 28px max(36px, env(safe-area-inset-bottom)); }
  .month-sheet-header h2 { font-size: 36px; }
  .month-options { gap: 16px; }
  .month-option { min-height: 104px; padding: 18px; border-radius: 18px; }
  .month-option strong { font-size: 24px; }
  .month-option small { font-size: 19px; }
  .month-sheet-note { font-size: 19px; }
  .close-button { width: 72px; height: 72px; font-size: 44px; }
  .site-drawer { width: min(96vw, 480px); padding: 40px 28px max(36px, env(safe-area-inset-bottom)); }
  .drawer-header { margin-bottom: 28px; }
  .drawer-header h2 { font-size: 40px; }
  .drawer-search { margin-bottom: 24px; }
  .area-tabs { gap: 12px; padding-bottom: 14px; }
  .area-tab { min-height: 68px; padding: 0 22px; font-size: 22px; }
  .drawer-list { gap: 16px; padding: 18px 2px 24px; }
  .office-item { gap: 8px 20px; padding: 24px; border-radius: 20px; }
  .office-item strong { font-size: 26px; }
  .office-item span { font-size: 20px; }
  .office-item .office-arrow { font-size: 44px; }
  .drawer-footer { padding-top: 24px; }
  .drawer-footer a { font-size: 22px; }
  .drawer-footer p { font-size: 19px; }
  .toast { bottom: 178px; padding: 20px 22px; font-size: 22px; }
}

/* Balanced compact mobile layout: readable without sacrificing schedule density. */
@media (max-width: 699px) {
  body { font-size: 16px; }
  .topbar { min-height: 72px; padding: 8px 16px; }
  .logo-panel { width: 112px; height: 48px; padding: 5px; border-radius: 10px; }
  .brand-lockup { min-width: 0; gap: 12px; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
  .eyebrow { font-size: 11px; }
  .portfolio-return { font-size: 10px; }
  .topbar > .menu-button {
    left: 16px;
    top: auto;
    bottom: calc(env(safe-area-inset-bottom) + 102px);
    width: 56px;
    height: 56px;
    border-radius: 17px;
    touch-action: none;
    user-select: none;
    cursor: grab;
  }
  .topbar > .menu-button.is-dragging { cursor: grabbing; box-shadow: 0 16px 34px rgba(17, 26, 50, .32); }
  .menu-button span { width: 25px; height: 3px; }
  .topbar > .menu-button::after { right: -2px; bottom: -18px; font-size: 10px; }

  .page-content { width: min(100% - 16px, 720px); padding-top: 12px; padding-bottom: 112px; }
  .hero-card { padding: 20px 16px 16px; }
  .hero-topline { min-height: 18px; font-size: 12px; }
  .source-title { min-width: 0; }
  .hero-heading { gap: 12px; padding: 18px 0 16px; }
  .section-kicker { margin-bottom: 5px; font-size: 12px; }
  h1 { font-size: clamp(28px, 8vw, 34px); }
  h2 { font-size: 22px; }
  .period-label { font-size: 16px; }
  .period-badge { width: 72px; height: 72px; border-radius: 21px; font-size: 17px; }
  .period-badge::first-line { font-size: 14px; }
  .hero-footer { gap: 8px; padding-top: 14px; }
  .office-picker { min-width: 0; max-width: 76%; }
  .office-picker-label { font-size: 11px; }
  .office-picker strong { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
  .chevron { font-size: 28px; }
  .updated-label { font-size: 11px; }

  .stat-grid { gap: 8px; margin: 12px 0; }
  .stat-card { min-height: 78px; padding: 12px 10px; }
  .stat-label { font-size: 12px; }
  .stat-card strong { font-size: 28px; }
  .stat-suffix { font-size: 12px; }
  .toolbar-card { gap: 8px; padding: 8px; }
  .search-field { min-height: 48px; padding: 0 12px; border-radius: 12px; }
  .search-icon { font-size: 24px; }
  .search-field input { font-size: 16px; }
  .clear-button { width: 40px; height: 40px; font-size: 20px; }
  .toggle-button { min-height: 44px; font-size: 15px; }

  .notice-card { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; margin: 12px 0 18px; padding: 9px 10px; }
  .notice-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 17px; }
  .notice-card > div:not(.notice-actions) { min-width: 0; }
  .notice-card strong { overflow: hidden; margin: 0; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .notice-card p { display: none; }
  .notice-actions { gap: 3px; margin-left: 0; }
  .text-button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; font-size: 13px; white-space: nowrap; }

  .section-heading { margin-bottom: 8px; }
  .result-count { padding: 5px 8px; font-size: 12px; }
  .schedule-content { gap: 4px; }
  .day-card { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr); min-height: 60px; border-radius: 12px; }
  .day-head { grid-column: 1; grid-row: 1; align-self: stretch; flex-direction: column; justify-content: center; gap: 2px; padding: 5px 4px; border-right: 1px solid #EEF3F7; border-bottom: 0; }
  .day-number { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
  .day-number small { font-size: 11px; }
  .day-label { min-width: 0; text-align: center; }
  .day-label span { display: block; overflow: hidden; max-width: 54px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .today-label { margin-left: 0; padding: 2px 5px; font-size: 10px; }
  .shift-list { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 4px; padding: 6px; }
  .shift-row { min-width: 0; min-height: 40px; gap: 3px; padding: 0 3px; border: 0; border-radius: 8px; background: rgba(244, 248, 252, .78); }
  .shift-row.is-wide { grid-column: 1 / -1; }
  .staff-name { min-width: 0; font-size: 14px; }
  .shift-chip { flex: none; min-width: 34px; min-height: 34px; padding: 2px 5px; border-radius: 9px; font-size: 14px; }
  .empty-day { grid-column: 2; grid-row: 1; display: flex; align-items: center; min-height: 60px; padding: 8px 10px; font-size: 13px; }

  .monthly-wrap { max-height: calc(100dvh - 176px); }
  .monthly-table { font-size: 14px; }
  .monthly-table th, .monthly-table td { min-width: 46px; height: 48px; padding: 5px 4px; }
  .monthly-table thead th { font-size: 13px; }
  .monthly-table th:first-child, .monthly-table td:first-child { min-width: 124px; max-width: 148px; padding: 6px 10px; font-size: 15px; }
  .loading-state, .error-state, .empty-state { min-height: 200px; padding: 28px 20px; }
  .loading-state p, .error-state p, .empty-state p { font-size: 15px; }
  .error-state strong { font-size: 18px; }
  .retry-button { min-height: 48px; padding: 0 18px; font-size: 16px; }

  .app-footer { padding-bottom: 104px; font-size: 12px; }
  .bottom-nav { width: min(calc(100% - 12px), 720px); min-height: 84px; grid-template-columns: 36px minmax(70px, 1fr) 36px 4px 44px 44px 44px; gap: 3px; padding: 8px 6px; border-radius: 22px; }
  .bottom-nav button { min-width: 44px; min-height: 68px; border-radius: 15px; }
  .bottom-nav-arrow span { font-size: 34px; }
  .bottom-nav-arrow small, .bottom-view-button small, .month-picker-button small { font-size: 12px; }
  .month-picker-button { padding: 5px 6px; }
  .month-picker-button strong { font-size: 18px; white-space: nowrap; }
  .bottom-nav-label { font-size: 12px; }
  .bottom-view-button .view-icon { font-size: 25px; }
  .bottom-nav-divider { height: 42px; }
  .today-button-icon { font-size: 28px; }
  .bottom-today-button small { font-size: 12px; }

  .month-sheet { gap: 16px; padding: 22px 16px max(18px, env(safe-area-inset-bottom)); }
  .month-sheet-header h2 { font-size: 24px; }
  .month-options { gap: 8px; }
  .month-option { min-height: 64px; padding: 10px 12px; border-radius: 13px; }
  .month-option strong { font-size: 17px; }
  .month-option small { font-size: 13px; }
  .month-sheet-note { font-size: 13px; }
  .close-button { width: 48px; height: 48px; font-size: 30px; }

  .site-drawer { width: min(92vw, 380px); padding: 20px 16px max(16px, env(safe-area-inset-bottom)); }
  .drawer-header { margin-bottom: 12px; }
  .drawer-header h2 { font-size: 24px; }
  .drawer-search { margin-bottom: 10px; }
  .drawer-quick-action { margin: -2px 0 12px; }
  .drawer-today-button { min-height: 62px; padding: 10px 12px; border-radius: 14px; }
  .drawer-today-icon { width: 38px; height: 38px; font-size: 17px; }
  .drawer-today-button strong { font-size: 16px; }
  .drawer-today-button small { font-size: 12px; }
  .drawer-today-button .office-arrow { font-size: 28px; }
  .area-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding-bottom: 8px; overflow: visible; }
  .area-tab { min-width: 0; min-height: 44px; padding: 0 3px; font-size: 13px; white-space: nowrap; }
  .drawer-list { gap: 6px; padding: 8px 2px 10px; }
  .office-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr; align-items: center; gap: 3px 10px; min-height: 58px; padding: 9px 11px; border-radius: 12px; }
  .office-item strong { overflow: visible; font-size: 16px; line-height: 1.35; text-overflow: clip; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
  .office-item span { font-size: 13px; }
  .office-item .office-arrow { font-size: 25px; }
  .drawer-footer { margin-top: 8px; padding-top: 8px; }
  .drawer-footer a { display: flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 14px; white-space: nowrap; }
  .drawer-footer p { display: none; }
  .toast { bottom: 96px; padding: 12px 14px; font-size: 15px; }
  .edit-mode-control { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
  .edit-mode-button { min-height: 44px; padding: 0 11px; font-size: 14px; }
  .edit-save-all-button { grid-column: 1 / -1; min-height: 42px; font-size: 14px; }
  .edit-mode-status { font-size: 12px; }
  .shift-editor { gap: 13px; padding: 20px 14px max(16px, env(safe-area-inset-bottom)); }
  .shift-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .shift-option { min-height: 50px; font-size: 16px; }

}

/* Edge-stored menu launcher: the full logo remains visible when the control is minimized. */
.menu-button.is-collapsed { overflow: visible; width: 64px; height: 64px; padding: 3px; color: var(--navy); border-color: var(--cyan); border-radius: 50%; background: #fff; }
.menu-button.is-collapsed .menu-line { display: none; }
.menu-button .menu-logo-icon { display: none; overflow: hidden; width: 100%; height: 100%; padding: 0; background: #fff; border-radius: 50%; }
.menu-button .menu-logo-icon img { display: block; flex: 0 0 auto; width: auto; height: 100%; max-width: none; max-height: none; object-fit: initial; }
.menu-button.is-collapsed .menu-logo-icon { display: flex; align-items: center; justify-content: flex-start; }
.menu-button.is-collapsed::after { display: none; }
.drawer-minimize-button-wide { margin-top: 12px; }
@media (min-width: 700px) {
  .topbar > .menu-button.is-collapsed { position: fixed; z-index: 36; top: 50%; right: -2px; width: 64px; height: 64px; border-radius: 50%; transform: translateY(-50%) translateX(30%); }
  .topbar > .menu-button.is-collapsed.is-docked-left { right: auto; left: -2px; transform: translateY(-50%) translateX(-30%); }
  .topbar > .menu-button.is-collapsed.is-docked-right { right: -2px; left: auto; transform: translateY(-50%) translateX(30%); }
}
@media (max-width: 699px) {
  .topbar > .menu-button.is-collapsed { width: 64px; height: 64px; padding: 3px; border-radius: 50%; transform: none; }
  .topbar > .menu-button.is-collapsed.is-docked-left { transform: translateX(-30%); }
  .topbar > .menu-button.is-collapsed.is-docked-right { transform: translateX(30%); }
}

/* Separate launcher keeps the hamburger button hidden while the logo is stored at the edge. */
.menu-logo-launcher { position: fixed; z-index: 36; top: 50%; right: -2px; display: grid; place-items: center; width: 64px; height: 64px; padding: 3px; overflow: hidden; color: var(--navy); border-color: var(--cyan); border-radius: 50%; background: #fff; box-shadow: 0 12px 28px rgba(17, 26, 50, .24); transform: translateY(-50%) translateX(30%); touch-action: none; user-select: none; cursor: grab; }
.menu-logo-launcher.is-positioned { right: auto; bottom: auto; transform: none; }
.menu-logo-launcher.is-docked-left { right: auto; left: -2px; transform: translateY(-50%) translateX(-30%); }
.menu-logo-launcher.is-docked-right { right: -2px; left: auto; transform: translateY(-50%) translateX(30%); }
.menu-logo-launcher.is-dragging { cursor: grabbing; box-shadow: 0 16px 34px rgba(17, 26, 50, .32); }
.menu-logo-launcher .menu-logo-icon { display: flex; align-items: center; justify-content: flex-start; width: 100%; height: 100%; overflow: hidden; background: #fff; border-radius: 50%; }
.menu-logo-launcher .menu-logo-icon img { display: block; flex: 0 0 auto; width: auto; height: 100%; max-width: none; max-height: none; object-fit: initial; }
button[hidden] { display: none !important; }
@media (max-width: 699px) {
  .menu-logo-launcher { width: 64px; height: 64px; }
}

/* The company-logo control is the menu handle in every state. */
.topbar > .menu-button { display: none !important; }
.menu-logo-launcher[hidden] { display: grid !important; }
.menu-logo-launcher { display: grid !important; top: 104px; right: 20px; left: auto; bottom: auto; width: 64px; height: 64px; padding: 3px; transform: none; }
.menu-logo-launcher.is-collapsed { width: 52px; height: 52px; padding: 2px; }
.menu-logo-launcher.is-positioned { transform: none; }
.menu-logo-launcher.is-docked-left { right: auto; left: -2px; transform: translateX(-30%); }
.menu-logo-launcher.is-docked-right { right: -2px; left: auto; transform: translateX(30%); }
@media (max-width: 699px) {
  .menu-logo-launcher { top: auto; right: auto; left: 16px; bottom: calc(env(safe-area-inset-bottom) + 102px); width: 64px; height: 64px; transform: none; }
  .menu-logo-launcher.is-collapsed { width: 52px; height: 52px; }
  .menu-logo-launcher.is-positioned { transform: none; }
  .menu-logo-launcher.is-docked-left { left: -2px; right: auto; transform: translateX(-30%); }
  .menu-logo-launcher.is-docked-right { right: -2px; left: auto; transform: translateX(30%); }
}

/* ── 本社ヘルプ ─────────────────────────────────────────── */
.help-today-card { display: grid; gap: 6px; width: 100%; margin: -4px 0 16px; padding: 12px 14px; color: var(--ink); text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow); }
.help-today-card:hover, .help-today-card:focus-visible { border-color: var(--cyan); }
.help-today-head { display: flex; align-items: center; gap: 8px; }
.help-today-dot { display: grid; place-items: center; width: 22px; height: 22px; color: #fff; background: var(--navy); border-radius: 7px; font-size: 12px; }
.help-today-head strong { font-size: 13px; }
.help-today-date { color: var(--muted); font-size: 11px; }
.help-today-head .chevron { margin-left: auto; color: var(--cyan); font-size: 18px; }
.help-today-body { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.help-today-body b { font-weight: 700; color: var(--ink); }

.drawer-help-button { margin-top: 8px; border-color: #E4DBF7; background: #F7F4FD; }
.drawer-help-button:hover, .drawer-help-button:focus-visible { border-color: #B79AE8; background: #F0E9FB; }
.drawer-help-button .drawer-today-icon { color: #7A54C9; }

.help-page { position: fixed; inset: 0; z-index: 40; display: none; flex-direction: column; background: var(--soft); }
.help-page:not([hidden]) { display: flex; }
.help-page-header { display: flex; align-items: center; gap: 10px; padding: 12px max(20px, calc((100vw - 720px) / 2)); background: rgba(255, 255, 255, .96); border-bottom: 1px solid rgba(220, 230, 240, .85); }
.help-page-title h1 { margin: 0; font-size: 17px; }
.help-page-title .section-kicker { margin: 0 0 1px; }
.help-member-chips { display: flex; flex-wrap: wrap; gap: 6px; width: min(100% - 32px, 720px); margin: 14px auto 0; }
.help-chip { padding: 6px 12px; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; font-weight: 700; }
.help-chip.is-active { color: #fff; background: var(--navy); border-color: var(--navy); }
.help-content { position: relative; flex: 1; width: min(100% - 32px, 720px); margin: 12px auto 0; padding-bottom: 120px; overflow-y: auto; }
.help-content .day-card { margin-bottom: 10px; scroll-margin-top: 4px; }
.help-content .day-head { padding: 10px 14px 8px; }
.help-content .day-number { width: 34px; height: 34px; font-size: 13px; }
.help-content .shift-list { padding: 2px 14px; }
.help-content .shift-row { min-height: 38px; }
.help-member-name { color: var(--muted); font-size: 11px; font-weight: 700; }
.help-entry-text { overflow: hidden; color: var(--ink); font-size: 13px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.help-nav { position: fixed; z-index: 41; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 46px minmax(108px, 1fr) 46px 54px; align-items: center; gap: 4px; width: min(calc(100% - 24px), 720px); min-height: 68px; padding: 7px 8px; transform: translateX(-50%); background: rgba(255,255,255,.94); border: 1px solid rgba(220,230,240,.95); border-radius: 20px; box-shadow: 0 14px 42px rgba(17,26,50,.18); backdrop-filter: blur(18px); }
.help-nav-label { display: grid; place-items: center; color: var(--navy); font-size: 14px; font-weight: 800; }
.help-notice { margin: 0 0 12px; padding: 10px 12px; color: var(--muted); background: #EDF8FD; border: 1px solid #CBEAF8; border-radius: var(--radius-sm); font-size: 11px; line-height: 1.5; }

@media (min-width: 768px) {
  .help-today-card { padding: 14px 16px; }
  .help-page-title h1 { font-size: 19px; }
}

/* ── データの鮮度表示 ───────────────────────────────────── */
/* 「最新」と言い切るのは5分以内だけ。それ以外は経過時間を出して誤認を防ぐ。 */
.updated-label { display: inline-flex; align-items: center; gap: 5px; }
.updated-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.updated-label.is-fresh { color: #7BE3B4; }
.updated-label.is-aging { color: rgba(255,255,255,.72); }
.updated-label.is-stale { color: #FFC97A; font-weight: 700; }
.updated-label.is-unknown { color: #FFC97A; }
