:root {
  --navy: #17313d;
  --navy-2: #254b58;
  --orange: #e96d4b;
  --orange-soft: #fff0ea;
  --blue: #3478a4;
  --blue-soft: #e9f3fa;
  --ink: #172126;
  --muted: #6d7b80;
  --line: #dce3e3;
  --line-soft: #edf1f1;
  --surface: #ffffff;
  --canvas: #f4f6f4;
  --shadow: 0 18px 50px rgba(26, 48, 55, 0.08);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(52, 120, 164, 0.25); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.app-frame { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 12; height: 100vh; padding: 30px 20px 22px; background: var(--navy); color: #f8fbfa; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-symbol { width: 41px; height: 41px; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 10px; }
.brand-symbol i { width: 4px; display: block; border-radius: 5px; background: #f9d6c9; }
.brand-symbol i:nth-child(1) { height: 11px; }
.brand-symbol i:nth-child(2) { height: 20px; background: #fff; }
.brand-symbol i:nth-child(3) { height: 15px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .08em; }
.brand small { display: block; margin-top: 4px; color: #95abb3; font-size: 8px; letter-spacing: .15em; }
.nav-list { display: grid; gap: 7px; margin-top: 52px; }
.nav-item { width: 100%; padding: 12px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 11px; background: transparent; color: #a9bbc1; text-align: left; }
.nav-item:hover, .nav-item.is-active { color: #fff; background: rgba(255,255,255,.1); }
.nav-icon { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; font-size: 11px; }
.sidebar-card { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.05); }
.sidebar-card p { margin: 0 0 10px; color: #91a9b1; font-size: 10px; letter-spacing: .1em; }
.sync-state { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sync-state i { width: 7px; height: 7px; border-radius: 50%; background: #e3a946; box-shadow: 0 0 0 4px rgba(227,169,70,.1); }
.sync-state.is-online i { background: #77c398; box-shadow: 0 0 0 4px rgba(119,195,152,.1); }
.sync-state.is-error i { background: #ef8269; }
.text-button { margin-top: 10px; padding: 0; border: 0; background: transparent; color: #f6c7b9; font-size: 11px; }
.account-button { width: 100%; margin-top: 12px; padding: 11px 5px; display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 9px; border: 0; background: transparent; color: white; text-align: left; }
.account-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: #dfe9e8; color: var(--navy); font-size: 12px; font-weight: 700; }
.account-button b, .account-button small { display: block; }
.account-button b { font-size: 12px; }
.account-button small { margin-top: 3px; color: #92a9b1; font-size: 9px; }
.account-button > i { color: #88a0a8; font-style: normal; font-size: 20px; }
.mobile-bar { display: none; }

main { min-width: 0; padding: 38px clamp(24px, 3.5vw, 58px) 55px; }
.page { display: none; max-width: 1500px; margin: 0 auto; }
.page.is-active { display: block; }
.page-header { min-height: 72px; margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.kicker { margin: 0 0 7px; color: var(--orange); font-size: 10px; font-weight: 750; letter-spacing: .18em; }
.page-header h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(34px, 4vw, 45px); line-height: 1; font-weight: 500; letter-spacing: -.03em; }
.date-caption { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.button { min-height: 39px; padding: 0 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-weight: 650; font-size: 12px; }
.button-primary { min-height: 43px; border-color: var(--navy); background: var(--navy); color: white; box-shadow: 0 8px 18px rgba(23,49,61,.16); }
.button-primary:hover { background: var(--navy-2); }
.button-primary:disabled { opacity: .45; cursor: not-allowed; }
.button-quiet { min-height: 36px; padding: 0 12px; }
.button-danger { border-color: #efc9c2; color: #b74f3c; background: #fff8f6; }

.insight-row { margin-bottom: 14px; display: grid; grid-template-columns: 1.5fr 1fr 1.25fr; gap: 10px; }
.insight-card { min-width: 0; min-height: 72px; padding: 13px 16px; display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.78); }
.insight-card > div { display: contents; }
.insight-label { grid-column: 1 / -1; align-self: start; color: #819095; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.insight-card strong { color: var(--navy); font-family: Georgia, serif; font-size: 25px; font-weight: 500; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insight-card p { margin: 0; align-self: end; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holiday-card strong { color: var(--orange); font-family: inherit; font-size: 15px; font-weight: 700; }

.calendar-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.calendar-toolbar { min-height: 68px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.period-control, .toolbar-actions { display: flex; align-items: center; gap: 7px; }
.square-button { width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 23px; line-height: 1; }
.square-button:hover, .button-quiet:hover { background: #f5f7f6; }
.period-title { min-width: 150px; margin-left: 8px; }
.period-title h2 { margin: 0; font-size: 17px; }
.period-title span { display: block; margin-top: 2px; color: #8a979a; font-size: 9px; }
.select-control { min-width: 142px; height: 39px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.select-control span { color: #8a969a; font-size: 9px; }
.select-control select { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #35464d; font-size: 11px; }
.view-toggle { padding: 3px; display: flex; border-radius: 9px; background: #edf1f1; }
.view-toggle button { width: 38px; height: 31px; border: 0; border-radius: 7px; background: transparent; color: #718085; font-size: 12px; }
.view-toggle button.is-active { background: white; color: var(--navy); box-shadow: 0 2px 8px rgba(27,50,58,.12); font-weight: 750; }
.calendar-legend { min-height: 34px; padding: 8px 15px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line-soft); background: #fafbfa; color: #78868a; font-size: 9px; }
.calendar-legend > span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.calendar-legend small { margin-left: auto; color: #9aa4a6; font-size: 9px; }
.weather-attribution { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border: 1px solid #d3dcdd; border-radius: 50%; color: #879598; font-size: 10px; line-height: 1; text-decoration: none; }
.weather-attribution:hover { border-color: #9eb0b4; color: #58747d; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.holiday-dot { background: var(--orange); }
.workday-dot { background: var(--blue); }
.festival-dot { background: #b38b32; }
.schedule-dot { background: #52a07a; }
.locked-dot { background: #aeb7b8; }
.calendar-stage { min-height: 520px; }

.weekday-row, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(88px, 1fr)); }
.weekday-cell { min-height: 35px; padding: 9px 11px; border-right: 1px solid var(--line-soft); color: #859195; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.weekday-cell:last-child { border-right: 0; }
.weekday-cell.is-weekend { color: #b78275; }
.day-cell { position: relative; min-width: 0; min-height: 132px; padding: 0; display: grid; grid-template-rows: 62px auto; align-content: start; border: 0; border-right: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); background: #fff; text-align: left; vertical-align: top; }
.day-cell:nth-child(7n) { border-right: 0; }
.day-cell:hover { z-index: 1; background: #f9fbfa; box-shadow: inset 0 0 0 1px #cbd8d7; }
.day-cell.is-outside { color: #afb8ba; background: #fafbfa; }
.day-cell.is-weekend:not(.is-workday) { background: #fdfbf9; }
.day-cell.is-holiday { background: #fff9f6; }
.day-cell.is-workday { background: #f7fbfe; }
.day-cell.is-festival { background: #fffdf5; }
.day-cell.is-booking-locked { color: #9aa4a6; background: repeating-linear-gradient(135deg, #f7f8f8 0, #f7f8f8 8px, #f2f4f4 8px, #f2f4f4 16px); }
.day-cell.is-booking-locked:hover { background: repeating-linear-gradient(135deg, #f4f6f6 0, #f4f6f6 8px, #eef1f1 8px, #eef1f1 16px); }
.day-cell.is-booking-locked .day-cell-create { cursor: help; }
.day-cell.is-booking-past { color: #a1aaac; background: #fafbfb; }
.day-cell.is-today::after { content: ""; position: absolute; inset: 4px; border: 1px solid #7193a0; border-radius: 8px; pointer-events: none; }
.day-cell-create { position: absolute; inset: 0; z-index: 0; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.day-cell-create:focus-visible { outline: 2px solid #6f9cac; outline-offset: -4px; }
.date-head { position: relative; z-index: 3; min-width: 0; min-height: 50px; margin: 6px 9px 0; display: grid; grid-template-rows: 27px auto; align-content: start; gap: 2px; pointer-events: none; }
.date-line { min-width: 0; display: flex; align-items: center; gap: 5px; }
.date-line .booking-window-label { margin-left: auto; }
.date-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 750; }
.is-today .date-number { background: var(--navy); color: #fff; }
.day-status { min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 5px; font-size: 8px; font-weight: 800; }
.day-status.is-holiday { color: #bd523d; background: #faddd5; }
.day-status.is-workday { color: #2b6f9b; background: #dcecf6; }
.day-status.is-festival { color: #87651f; background: #f5e9bd; }
.holiday-name { min-width: 0; margin-left: auto; overflow: hidden; color: #bf5d49; font-size: 8px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.is-workday .holiday-name { color: #36769e; }
.is-festival .holiday-name { color: #8e6e2c; }
.booking-window-label { min-width: 0; padding: 2px 5px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d6dddd; border-radius: 999px; background: rgba(255,255,255,.76); color: #7d898c; font-size: 7px; font-style: normal; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.booking-window-label.is-past { background: #f3f5f5; color: #899497; }
.weather-line { min-width: 0; min-height: 18px; display: flex; align-items: center; gap: 6px; color: #4c6972; font-size: 8px; font-weight: 700; line-height: 1.25; white-space: nowrap; pointer-events: none; }
.weather-temperature { color: #6e5b50; }
.weather-humidity { color: #4c7581; }
.weather-humidity.is-high { color: #c0392b; font-weight: 800; }
.weather-line.is-unavailable { color: #929d9f; font-weight: 600; }
.weather-line.is-empty { visibility: hidden; }
.schedule-stack { margin-top: 5px; display: grid; gap: 4px; }
.day-cell > .schedule-stack { position: relative; z-index: 2; grid-row: 2; min-width: 0; margin: 0 9px 9px; }
.schedule-pill { width: 100%; min-width: 0; padding: 5px 6px; border: 0; border-left: 3px solid var(--staff-color); border-radius: 4px; background: color-mix(in srgb, var(--staff-color) 10%, white); text-align: left; }
.schedule-pill:hover { filter: brightness(.97); box-shadow: 0 2px 8px rgba(30, 58, 67, .08); }
.schedule-pill strong, .schedule-pill small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.schedule-pill strong { color: #314147; font-size: 9px; }
.schedule-pill small { margin-top: 2px; color: #718085; font-size: 8px; }
.schedule-pill .schedule-staff-short { display: none; }
.schedule-pill, .agenda-chip { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab; }
.schedule-pill.is-booking-copy-source, .agenda-chip.is-booking-copy-source { opacity: .38; filter: saturate(.65); cursor: grabbing; }
.schedule-more { padding: 2px 4px; border: 0; background: transparent; color: #708086; font-size: 8px; text-align: left; }

body.is-booking-copy-dragging { -webkit-user-select: none; user-select: none; cursor: grabbing; overscroll-behavior: none; }
.booking-copy-ghost { position: fixed; top: 0; left: 0; z-index: 80; width: min(220px, calc(100vw - 24px)); min-height: 58px; padding: 9px 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--staff-color) 35%, #dce3e3); border-left: 4px solid var(--staff-color); border-radius: 10px; background: rgba(255,255,255,.97); box-shadow: 0 16px 42px rgba(23,49,61,.27); pointer-events: none; will-change: transform; }
.booking-copy-ghost small, .booking-copy-ghost strong, .booking-copy-ghost span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.booking-copy-ghost small { color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.booking-copy-ghost strong { margin-top: 3px; color: var(--navy); font-size: 12px; }
.booking-copy-ghost span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.booking-copy-tip { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 81; max-width: calc(100vw - 28px); padding: 10px 14px; border-radius: 999px; background: var(--navy); color: white; box-shadow: 0 10px 28px rgba(23,49,61,.25); font-size: 11px; font-weight: 700; text-align: center; transform: translateX(-50%); pointer-events: none; }
[data-copy-date].is-booking-copy-target { background: var(--blue-soft); box-shadow: inset 0 0 0 3px var(--blue); }
[data-copy-date].is-booking-copy-invalid { background: #fff1ed; box-shadow: inset 0 0 0 3px #d96a51; }

.week-scroller { overflow: auto; max-height: 70vh; }
.week-grid { min-width: 980px; display: grid; grid-template-columns: 132px repeat(7, minmax(118px, 1fr)); }
.week-corner, .week-day, .week-room, .week-slot { min-width: 0; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: #fff; }
.week-corner, .week-day { position: sticky; top: 0; z-index: 4; }
.week-corner { left: 0; z-index: 6; background: #f8faf9; }
.week-day { min-height: 96px; padding: 9px; text-align: center; }
.week-day.is-holiday { background: #fff7f4; }
.week-day.is-workday { background: #f4faff; }
.week-day.is-festival { background: #fffbed; }
.week-day.is-booking-locked, .week-slot.is-booking-locked { background: repeating-linear-gradient(135deg, #f7f8f8 0, #f7f8f8 9px, #f1f3f3 9px, #f1f3f3 18px); color: #929d9f; }
.week-day.is-booking-locked { cursor: help; }
.week-day.is-booking-past, .week-slot.is-booking-past { color: #97a1a3; background: #fafbfb; }
.week-day .booking-window-label { margin: 2px auto 0; }
.week-day > .week-weekday { color: #7d8a8e; font-size: 9px; }
.week-day strong { width: 27px; height: 27px; margin: 4px auto 2px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
.week-day.is-today strong { color: white; background: var(--navy); }
.week-day > .weather-line { justify-content: center; margin: 2px 0; font-size: 8px; }
.week-day .holiday-name { display: block; margin: 2px 0 0; }
.week-room { position: sticky; left: 0; z-index: 2; min-height: 96px; padding: 13px 11px; background: #f8faf9; font-size: 11px; font-weight: 750; }
.week-slot { min-height: 96px; padding: 7px; text-align: left; }
.week-slot:hover { background: #f8fbfa; }
.week-slot-create { width: 100%; min-height: 24px; padding: 2px 4px; border: 0; border-radius: 5px; background: transparent; color: #8a999d; font-size: 8px; text-align: left; }
.week-slot-create:hover { background: #edf4f2; color: var(--navy); }
.week-slot.is-booking-locked .week-slot-create { color: #929d9f; cursor: help; }
.week-slot.is-booking-past .week-slot-create { color: #929d9f; }
.mobile-agenda { display: none; }

.management-list { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.management-row { min-height: 78px; padding: 14px 18px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.management-row:last-child { border-bottom: 0; }
.management-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: white; font-weight: 800; }
.management-row h3 { margin: 0 0 4px; font-size: 14px; }
.management-row p { margin: 0; color: var(--muted); font-size: 10px; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #56666b; font-size: 10px; }
.row-actions button:last-child { color: #b45242; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-state i { width: 48px; height: 48px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 14px; background: #edf2f1; color: var(--navy); font-style: normal; }
.empty-state strong { display: block; margin-bottom: 5px; color: #425158; font-size: 14px; }
.empty-state p { margin: 0; font-size: 11px; }

.scrim { position: fixed; inset: 0; z-index: 11; background: rgba(9, 24, 30, .38); backdrop-filter: blur(2px); }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; padding: 18px; display: grid; place-items: center; background: rgba(10, 26, 32, .5); backdrop-filter: blur(5px); }
.modal-backdrop[hidden], .scrim[hidden] { display: none; }
.modal { position: relative; width: min(550px, 100%); max-height: min(760px, 92vh); overflow: auto; padding: 28px; border-radius: 17px; background: white; box-shadow: 0 34px 110px rgba(7, 25, 31, .32); }
.modal-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border: 0; background: transparent; color: #7f8c8f; font-size: 24px; }
.modal-close:disabled { opacity: .35; cursor: wait; }
.modal h2 { margin: 0 36px 5px 0; font-family: Georgia, "Songti SC", serif; font-size: 25px; font-weight: 500; }
.modal-subtitle { margin: 0 0 20px; color: var(--muted); font-size: 11px; }
.entry-reminder-list { display: grid; gap: 10px; }
.entry-reminder-item { padding: 14px; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf9; }
.entry-reminder-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #e5f0ec; color: #3d725f; font-size: 13px; font-weight: 800; }
.entry-reminder-icon.is-copy { background: #e9f0f3; color: #4c7581; }
.entry-reminder-item strong { display: block; margin: 1px 0 5px; color: #34464c; font-size: 15px; }
.entry-reminder-item p { margin: 0; color: #52656b; font-size: 14px; line-height: 1.65; }
.entry-reminder-item small { display: block; margin-top: 7px; color: #78878b; font-size: 12px; line-height: 1.55; }
.entry-reminder-actions .button { min-width: 120px; }
.readonly-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: #f1f4f3; color: #66777c; font-size: 10px; }
.modal-sync-note { margin-top: 12px; padding: 9px 11px; border: 1px solid #cfe1e6; border-radius: 8px; background: #f1f8fa; color: #416775; font-size: 10px; }
.modal-sync-note[hidden] { display: none; }
.form-stack { display: grid; gap: 13px; }
.field { display: grid; gap: 6px; color: #56666b; font-size: 10px; font-weight: 650; }
.field input, .field select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; color: var(--ink); outline: 0; }
.field input:focus, .field select:focus { border-color: #6f9cac; background: white; }
.booking-window-help { color: #7d898c; font-size: 9px; font-weight: 500; line-height: 1.5; }
.room-editor { margin-top: 13px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.room-editor-head { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; background: #f7f9f8; border-bottom: 1px solid var(--line-soft); }
.room-editor-head strong { font-size: 11px; }
.staff-checks { padding: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.staff-check { position: relative; }
.staff-check input { position: absolute; opacity: 0; pointer-events: none; }
.staff-check span { min-height: 29px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; color: #5e6d72; font-size: 10px; cursor: pointer; }
.staff-check span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--staff-color); }
.staff-check input:checked + span { border-color: var(--staff-color); color: #273a40; background: color-mix(in srgb, var(--staff-color) 10%, white); font-weight: 700; }
.booking-editor, .booking-detail-form { display: grid; gap: 14px; }
.selection-section { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.selection-title { min-height: 39px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); background: #f7f9f8; }
.selection-title strong { font-size: 11px; }
.selection-title small { color: var(--muted); font-size: 9px; }
.choice-grid { padding: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 7px; }
.staff-choices { max-height: 190px; overflow: auto; }
.choice-card { position: relative; min-width: 0; }
.choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-card span { min-height: 46px; padding: 8px 10px; display: grid; align-content: center; grid-template-columns: 9px minmax(0, 1fr); column-gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.choice-card span::before { content: ""; grid-row: 1 / 3; align-self: center; width: 8px; height: 8px; border: 2px solid color-mix(in srgb, var(--choice-color) 70%, white); border-radius: 50%; background: white; }
.choice-card b, .choice-card small { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.choice-card b { font-size: 10px; }
.choice-card small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.choice-card input:checked + span { border-color: var(--choice-color); background: color-mix(in srgb, var(--choice-color) 9%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--choice-color) 35%, white); }
.choice-card input:checked + span::before { border-color: var(--choice-color); background: var(--choice-color); box-shadow: inset 0 0 0 2px white; }
.choice-card input:focus-visible + span { outline: 3px solid rgba(52, 120, 164, .25); outline-offset: 2px; }
.choice-card.is-assigned span { opacity: .62; cursor: default; }
.booking-summary { margin-bottom: 16px; padding: 12px; display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; }
.booking-summary > i { width: 9px; height: 9px; border-radius: 50%; }
.booking-summary strong, .booking-summary span { display: block; }
.booking-summary strong { font-size: 11px; }
.booking-summary span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.detail-conflict { padding: 9px 11px; border: 1px solid #efc9c2; border-radius: 8px; background: #fff5f2; color: #a64d3d; font-size: 10px; }
.detail-conflict[hidden] { display: none; }
.existing-list { margin-top: 18px; }
.existing-list > strong { display: block; margin-bottom: 8px; font-size: 11px; }
.existing-item { width: 100%; min-height: 48px; padding: 8px 9px; display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 9px; border: 0; border-top: 1px solid var(--line-soft); background: white; text-align: left; }
.existing-item:hover { background: #f7faf9; }
.existing-item i { width: 7px; height: 7px; border-radius: 50%; background: var(--staff-color); }
.existing-item b, .existing-item small { display: block; }
.existing-item b { font-size: 10px; }
.existing-item small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.existing-item em { color: #52717b; font-size: 9px; font-style: normal; white-space: nowrap; }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions-split { align-items: center; justify-content: space-between; }
.modal-actions-split > span { display: flex; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 50; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 9px; background: var(--navy); color: white; box-shadow: 0 12px 30px rgba(9,29,36,.25); font-size: 11px; opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) {
  .app-frame { display: block; }
  .sidebar { position: fixed; left: 0; width: 232px; transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-bar { position: sticky; top: 0; z-index: 10; height: 62px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: white; }
  .mobile-bar .brand-symbol { width: 33px; height: 33px; padding: 8px; border-radius: 10px; }
  .mobile-bar .brand strong { font-size: 14px; }
  .mobile-bar button { padding: 7px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: transparent; color: white; font-size: 11px; }
  main { padding-top: 28px; }
}

@media (max-width: 760px) {
  html, body, .app-frame, main, .page { width: 100%; max-width: 100%; overflow-x: hidden; }
  main { padding: 24px 12px 40px; }
  .page-header { min-height: 66px; margin: 0 4px 16px; align-items: center; }
  .page-header h1 { font-size: 32px; }
  .date-caption { font-size: 11px; }
  .button-primary { min-height: 39px; padding: 0 11px; }
  .insight-row { margin: 0 4px 11px; grid-template-columns: 1fr 1fr; }
  .insight-card { min-height: 65px; }
  .holiday-card { grid-template-columns: minmax(0, 1fr); align-content: center; row-gap: 3px; }
  .holiday-card > .insight-label, .holiday-card > strong, .holiday-card > p { grid-column: 1; }
  .holiday-card > strong, .holiday-card > p { overflow: visible; white-space: normal; text-overflow: clip; overflow-wrap: anywhere; }
  .holiday-card > p { line-height: 1.4; }
  .insight-row .insight-card:nth-child(2) { display: none; }
  .calendar-card { width: 100%; max-width: 100%; min-width: 0; border-radius: 12px; box-shadow: 0 10px 30px rgba(26,48,55,.07); }
  .calendar-toolbar { padding: 11px; align-items: flex-start; flex-direction: column; }
  .period-control { width: 100%; }
  .square-button { width: 44px; height: 44px; }
  .period-title { min-width: 0; margin-left: auto; text-align: right; }
  .period-title h2 { font-size: 15px; }
  .toolbar-actions { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .select-control { min-width: 0; flex: 1; }
  .select-control select { width: 100%; max-width: 100%; }
  .select-control span { display: none; }
  .calendar-legend { padding: 8px 10px; gap: 10px; overflow-x: auto; }
  .calendar-legend small { display: none; }
  .calendar-stage { min-height: 430px; }
  .weekday-row, .month-grid { width: 100%; min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .weekday-cell { padding: 8px 2px; text-align: center; border-right: 0; }
  .day-cell { min-height: 112px; padding: 0; grid-template-rows: 60px auto; border-right-color: #f0f2f2; }
  .date-head { min-height: 52px; margin: 4px 2px 0; grid-template-rows: 22px 28px; gap: 1px; }
  .date-line { justify-content: center; gap: 1px; }
  .date-number { width: 22px; height: 22px; font-size: 10px; }
  .day-status { min-width: 14px; width: 14px; height: 14px; padding: 0; border-radius: 4px; font-size: 7px; }
  .date-head .booking-window-label { display: none; }
  .date-head .holiday-name { display: none; }
  .date-head .weather-line { width: 100%; min-height: 27px; flex-direction: column; justify-content: center; gap: 0; font-size: 7px; line-height: 1.15; text-align: center; }
  .schedule-stack { gap: 2px; }
  .day-cell > .schedule-stack { margin: 0 3px 4px; }
  .schedule-pill { min-height: 44px; padding: 3px; border-left-width: 2px; text-align: center; }
  .schedule-pill strong { font-size: 7px; }
  .schedule-pill .schedule-staff-full { display: none; }
  .schedule-pill .schedule-staff-short { display: block; font-size: 8px; letter-spacing: .02em; }
  .schedule-more { min-height: 44px; padding: 0; text-align: center; font-size: 7px; }
  .week-scroller { display: none; }
  .mobile-agenda { display: grid; }
  .agenda-day { width: 100%; padding: 13px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: white; text-align: left; }
  .agenda-day.is-booking-locked { background: repeating-linear-gradient(135deg, #fafbfb 0, #fafbfb 10px, #f4f6f6 10px, #f4f6f6 20px); }
  .agenda-day.is-booking-past { color: #929d9f; background: #fafbfb; }
  .agenda-day:last-child { border-bottom: 0; }
  .agenda-head { width: 100%; min-height: 60px; padding: 6px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 0; background: transparent; text-align: left; }
  .agenda-date-block { min-width: 0; display: grid; gap: 4px; color: inherit; }
  .agenda-date-line { min-width: 0; display: flex; align-items: center; gap: 7px; }
  .agenda-date-line strong { flex: none; font-size: 13px; }
  .agenda-weekday { flex: none; color: var(--muted); font-size: 10px; }
  .agenda-date-line .holiday-name { position: static; min-width: 0; margin: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
  .agenda-date-line .booking-window-label { margin: 0; }
  .agenda-date-block .weather-line { justify-content: flex-start; gap: 8px; color: #4c6972; font-size: 10px; }
  .agenda-head > i { margin: 0; color: #557780; font-size: 9px; font-style: normal; }
  .agenda-content { margin-top: 8px; display: grid; gap: 6px; }
  .agenda-room { padding: 8px 9px; border-radius: 7px; background: #f6f8f7; }
  .agenda-room > b { display: block; margin-bottom: 5px; font-size: 9px; }
  .agenda-chips { display: flex; flex-wrap: wrap; gap: 4px; }
  .agenda-chip { width: 100%; min-height: 44px; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-left: 3px solid var(--staff-color); border-radius: 7px; background: color-mix(in srgb, var(--staff-color) 11%, white); color: #4c5c61; font-size: 9px; text-align: left; }
  .agenda-chip span { color: #718085; font-size: 8px; white-space: nowrap; }
  .agenda-empty { min-height: 44px; padding: 0 9px; border: 1px dashed var(--line); border-radius: 7px; background: white; color: #879598; font-size: 9px; text-align: left; }
  .management-row { padding: 12px; grid-template-columns: 42px 1fr; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 88vh; padding: 24px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .modal-close { top: 7px; right: 7px; width: 44px; height: 44px; }
  .entry-reminder-item { padding: 13px 12px; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .entry-reminder-icon { width: 40px; height: 40px; }
  .entry-reminder-actions .button { width: 100%; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-choices { max-height: none; overflow: visible; }
  .choice-card span { min-height: 48px; }
  .modal-actions .button { min-height: 44px; }
  .modal-actions-split { align-items: stretch; flex-direction: column; }
  .modal-actions-split > span { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-actions-split .button { width: 100%; }
}

@media (max-width: 350px) {
  .calendar-card { width: calc(100% + 24px); max-width: none; margin-left: -12px; border-radius: 0; }
}

@media (max-width: 420px) {
  .page-header .date-caption { display: none; }
  .insight-card { padding: 11px; }
  .insight-card strong { font-size: 21px; }
  .square-button { width: 44px; height: 44px; }
  .button-quiet { min-height: 33px; }
  .view-toggle button { width: 33px; }
  .day-cell { min-height: 86px; }
}
