@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700&family=Noto+Serif+TC:wght@500;600&display=swap");
:root {
  --ink: #263b30;
  --muted: #657269;
  --bg: #f5f5ef;
  --paper: #fffef9;
  --line: #dce1d6;
  --sage: #e5ecdf;
  --gold: #8c703e;
  --danger: #a33f38;
  --shadow: 0 5px 24px #263b3008;
  font-family: "Noto Sans TC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font:
    500 clamp(26px, 3vw, 36px)/1.5 "Noto Serif TC",
    serif;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
h2 {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 12px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.8;
}
small,
.small {
  font-size: 12px;
  color: var(--muted);
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid #ae7035;
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link {
  position: fixed;
  top: -80px;
  background: var(--paper);
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 8px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 10px;
}
.primary,
.secondary,
.danger-outline,
.icon-button,
.text-button {
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.primary {
  background: var(--ink);
  color: #fff;
}
.primary:hover {
  background: #3c5545;
}
.secondary,
.icon-button {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.secondary:hover,
.icon-button:hover {
  background: var(--sage);
}
.danger-outline {
  background: #fff9f6;
  border-color: #e8c9c3;
  color: var(--danger);
}
.text-button {
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
}
.icon-button {
  width: 44px;
  padding: 8px;
  font-size: 24px;
}
.full {
  width: 100%;
}
.back-home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.back-home:hover {
  text-decoration: underline;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font:
    24px "Noto Serif TC",
    serif;
  flex-shrink: 0;
}
.studio {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px 1fr;
}
.sidebar {
  background: var(--ink);
  color: #eff1e9;
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 35px 24px;
  display: flex;
  flex-direction: column;
}
.studio-brand {
  text-decoration: none;
  display: flex;
  gap: 12px;
  align-items: center;
  font:
    500 18px "Noto Serif TC",
    serif;
}
.studio-brand small {
  display: block;
  color: #bbccbb;
  font: 8px sans-serif;
  letter-spacing: 0.13em;
  margin-top: 8px;
}
.sidebar-caption {
  font-size: 11px;
  color: #c2cfbd;
  margin: 24px 0 30px;
}
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.main-nav button {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 2px 12px;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #cad6c4;
  padding: 14px;
  min-height: 62px;
}
.main-nav svg {
  grid-row: span 2;
  align-self: center;
}
.main-nav button > span {
  font-weight: 600;
  font-size: 14px;
}
.main-nav small {
  font-size: 10px;
  color: inherit;
  opacity: 0.75;
}
.main-nav button[aria-current="page"] {
  background: #e8eddf;
  color: #263b30;
}
.main-nav button:hover {
  background: #ffffff12;
}
.main-nav button[aria-current="page"]:hover {
  background: #e8eddf;
}
.sidebar-note {
  position: relative;
  margin-top: auto;
  padding-top: 50px;
  overflow: hidden;
}
.sidebar-note > span {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #b9c8b1;
}
.sidebar-note p {
  font:
    16px/1.8 "Noto Serif TC",
    serif;
  margin: 10px 0;
}
.admin-people { display:flex; gap:4px; }
.admin-people button { position:relative; width:50%; height:128px; padding:0; border:0; background:transparent; border-radius:16px; cursor:pointer; }
.admin-people button:focus-visible { outline:2px solid #c9d6b8; outline-offset:2px; }
.admin-people button:hover { background:rgba(255,255,255,.05); }
.admin-people canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.admin-people .portrait-live img { opacity:0; }
.admin-motion-toggle { background:transparent; border:1px solid #728677; color:#dce6d5; border-radius:20px; padding:7px 12px; font-size:11px; cursor:pointer; }
.sidebar-note .admin-motion-status { color:#b9c8b1; font:11px/1.6 sans-serif; min-height:36px; }
.sidebar-note .admin-people img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: saturate(0.7);
}
.workspace-shell {
  min-width: 0;
}
.topbar {
  height: 78px;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fafbf6;
}
.account {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  font-size: 12px;
}
.account > span {
  overflow-wrap: anywhere;
}
#workspace {
  max-width: 1440px;
  margin: auto;
  padding: 36px 40px 70px;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-heading p:last-child {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.sync-state {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.sync-state > span:first-child {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8da37f;
}
.sync-state .icon-button {
  background: transparent;
  border: 0;
}
.staff-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.staff-switch button {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 18px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}
.staff-switch button:first-child {
  padding-left: 18px;
}
.staff-switch button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.staff-switch img {
  width: 30px;
  height: 34px;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: 40%;
  background: #e4e9de;
}
.scope-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.scope-label img {
  width: 36px;
  height: 40px;
  object-fit: cover;
  object-position: 50% 15%;
}
.day-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.date-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.date-picker {
  min-width: 0;
}
.date-picker input {
  background: transparent;
  border: 0;
  padding: 10px;
  font-weight: 600;
  width: 178px;
}
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}
.week-strip button {
  padding: 12px 4px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  border-radius: 14px;
  min-height: 84px;
}
.week-strip span {
  font-size: 10px;
}
.week-strip strong {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}
.week-strip i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}
.week-strip i.has-bookings {
  background: #9a804d;
}
.week-strip [aria-pressed="true"] {
  background: var(--ink);
  color: #d7e1cd;
  border-color: var(--ink);
}
.week-strip [aria-pressed="true"] strong {
  color: #fff;
}
.week-strip [aria-pressed="true"] i.has-bookings {
  background: #d9c594;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.summary-grid > div {
  padding: 20px 22px;
  background: #e9eee3;
  border-radius: 14px;
  border: 1px solid #dfe5d8;
}
.summary-grid small {
  display: block;
  font-size: 11px;
  margin-bottom: 9px;
}
.summary-grid strong {
  font-size: 25px;
  font-weight: 500;
}
.summary-grid strong span {
  font-size: 12px;
  margin: 0 3px;
}
.summary-grid > div:nth-child(2) {
  background: #eeede4;
  border-color: #e4e2d6;
}
.summary-grid > div:nth-child(3) {
  background: #f0ede8;
  border-color: #e7e0d8;
}
.agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 28px;
}
.agenda-main {
  min-width: 0;
}
.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.segmented {
  display: flex;
  background: #e8ece2;
  border-radius: 12px;
  padding: 4px;
  flex-shrink: 0;
}
.segmented button {
  min-height: 40px;
  padding: 8px 15px;
  color: var(--muted);
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
}
.segmented button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 5px #263b3010;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #bac5b3;
  color: var(--muted);
  min-width: 0;
  max-width: 260px;
  flex: 1;
}
.search-field input {
  border: 0;
  background: transparent;
  min-width: 0;
  font-size: 12px;
  padding: 12px 2px;
  width: 100%;
  outline-offset: 0;
}
.search-field svg {
  width: 17px;
}
.list-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.list-meta p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  min-height: 40px;
  color: var(--muted);
  cursor: pointer;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  flex-shrink: 0;
}
.daygroup {
  margin-bottom: 20px;
}
.daygroup > h3 {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin: 18px 0 12px;
}
.booking-card {
  border: 1px solid var(--line);
  border-left: 3px solid #9cad90;
  background: var(--paper);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr);
  gap: 0 18px;
  margin-bottom: 12px;
}
.booking-card[data-staff="esther"] {
  border-left-color: #b99a6a;
}
.time-column {
  border-right: 1px solid var(--line);
  padding-right: 15px;
  grid-row: span 3;
}
.time-column strong {
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.time-column small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
.booking-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.booking-top h3 {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.state-pill {
  border-radius: 20px;
  background: #edf0e7;
  color: #536247;
  font-size: 10px;
  padding: 4px 9px;
  white-space: nowrap;
}
.state-pill.active {
  background: #dcebd4;
  color: #355c2b;
}
.state-pill.buffer {
  background: #f1e7d3;
  color: #83652c;
}
.state-pill.cancelled {
  background: #f2e5e1;
  color: #97544c;
}
.state-pill.past {
  background: #ecece6;
  color: #747970;
}
.booking-card.cancelled {
  border-left-color: #b9bdb3;
}
.booking-customer {
  font-size: 13px;
  margin: 0 0 8px;
}
.booking-staff {
  font-size: 11px;
  color: var(--gold);
  margin-left: 8px;
}
.booking-timing {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.booking-note {
  font-size: 12px;
  background: #f3f4ed;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
.booking-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  grid-column: 2;
}
.booking-actions button,
.booking-actions a {
  min-height: 44px;
  font-size: 12px;
  padding: 8px 12px;
}
.day-note {
  border-left: 1px solid var(--line);
  padding-left: 26px;
  padding-top: 8px;
}
.day-note h2 {
  font:
    23px/1.7 "Noto Serif TC",
    serif;
  margin: 16px 0;
}
.day-note > p {
  font-size: 12px;
  color: var(--muted);
}
.day-note .secondary {
  background: transparent;
  font-size: 12px;
}
.next-guest {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}
.next-guest strong {
  display: block;
  font-size: 26px;
  font-weight: 500;
  margin: 8px 0;
}
.next-guest p {
  font-size: 12px;
  color: var(--muted);
}
.empty-state {
  padding: 42px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #ffffff45;
}
.empty-state > span {
  font-size: 28px;
  display: block;
  color: #92a384;
  margin-bottom: 14px;
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 10px;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.empty-state .secondary {
  font-size: 12px;
}
.card {
  background: var(--paper);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.card-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.card-heading h2 {
  margin: 0 0 4px;
}
.card-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.step-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sage);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}
.schedule-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: start;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid label,
.field-label,
.blackout-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
}
input:not([type="checkbox"]),
select {
  min-height: 46px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
input[type="date"] {
  width: 100%;
}
.date-picker input {
  border: 0;
  background: transparent;
  width: 172px;
}
.search-field input {
  border: 0;
  background: transparent;
}
.field-label {
  margin-top: 20px;
  gap: 8px;
}
.field-label > span {
  color: var(--muted);
}
.helper {
  font-size: 12px;
  color: var(--muted);
  margin: 18px 0 0;
  line-height: 1.9;
}
.slot-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
.quick-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 16px;
}
.quick-slots button {
  font-size: 12px;
  padding: 8px 2px;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.slot-choice,
.slot-taken,
.slot-leave {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  position: relative;
  font-size: 14px;
  padding: 9px 3px;
  background: #fafbf6;
  color: var(--ink);
}
.slot-choice {
  cursor: pointer;
}
.slot-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.slot-choice:has(input:checked) {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.slot-choice:has(input:focus-visible) {
  outline: 3px solid #ae7035;
  outline-offset: 3px;
}
.slot-choice small {
  color: inherit;
  font-size: 9px;
}
.slot-taken {
  background: repeating-linear-gradient(
    135deg,
    #edece5,
    #edece5 5px,
    #e8e7e0 5px,
    #e8e7e0 6px
  );
  color: #72766d;
}
.slot-taken small,
.slot-leave small {
  font-size: 9px;
  color: inherit;
}
.slot-leave {
  background: #f3e7db;
  color: #8b5f3f;
  border-color: #e4cdb8;
  cursor: pointer;
}
.leave-save {
  position: sticky;
  bottom: 16px;
  padding: 14px;
  margin: 22px -8px -8px;
  background: #f1f4ebf5;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  z-index: 5;
}
.leave-save p {
  font-size: 12px;
  margin: 0;
}
.leave-save small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.settings-intro {
  font-size: 12px;
  color: var(--muted);
}
.setting-group {
  margin-bottom: 16px;
}
.setting-group > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 30px;
  min-height: 44px;
}
.setting-group > summary::-webkit-details-marker {
  display: none;
}
.setting-group > summary:after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 22px;
}
.setting-group[open] > summary:after {
  content: "−";
}
.setting-group > summary > span {
  font-size: 17px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.setting-group > summary small {
  font-size: 11px;
}
.setting-group[open] > summary {
  padding-bottom: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 24px 0 0;
}
legend {
  font-size: 12px;
  margin-bottom: 12px;
}
.wd-chips {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.wd-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
}
.wd-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.wd-chip:has(input:checked) {
  background: var(--ink);
  color: #fff;
}
.wd-chip:has(input:focus-visible) {
  outline: 3px solid #ae7035;
  outline-offset: 3px;
}
.save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 22px;
}
.save-row > span {
  font-size: 12px;
  color: var(--muted);
}
.service-group {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.service-group > summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-group > summary:after {
  content: "＋";
  margin-left: auto;
}
.service-group[open] > summary:after {
  content: "−";
}
.timing-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 110px 110px auto;
  gap: 12px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.timing-row h4 {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}
.timing-row label {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.timing-row input {
  width: 100%;
}
.timing-summary {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  grid-column: 1/4;
  grid-row: 2;
}
.status-action {
  grid-column: 4;
  grid-row: 1/3;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sage);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 12px;
}
.technical-note {
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.technical-note summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.blackout-form {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 14px;
  align-items: end;
}
.blackout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.blackout-item span {
  overflow-wrap: anywhere;
}
.blackout-item small {
  display: block;
  margin-top: 5px;
}
.calendar-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}
.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.calendar-heading h2 {
  margin: 0;
  font-size: 20px;
}
.calendar-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  gap: 5px;
}
.calendar-weekdays {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.month-grid button {
  min-height: 64px;
  border: 1px solid transparent;
  background: #f2f4ec;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--ink);
  font-size: 14px;
}
.month-grid button small {
  font-size: 9px;
  color: inherit;
}
.month-grid button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.month-grid button.today {
  border-color: #a8b29a;
}
.calendar-booking {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  text-align: left;
  border-width: 0 0 1px;
  background: transparent;
  color: var(--ink);
}
.calendar-booking > strong {
  font-size: 18px;
}
.calendar-booking > span {
  font-size: 13px;
}
.calendar-booking small {
  display: block;
  margin-top: 5px;
}
.calendar-booking:last-of-type {
  margin-bottom: 18px;
}
.external-calendar {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}
.external-calendar > summary {
  cursor: pointer;
  min-height: 44px;
  padding: 8px 0;
  font-weight: 600;
  color: var(--ink);
}
.external-calendar iframe {
  margin-top: 20px;
  width: 100%;
  height: 550px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.external-calendar p {
  margin-top: 18px;
}
dialog {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 25px 100px #1b2d3040;
}
dialog::backdrop {
  background: #1c2e2966;
  backdrop-filter: blur(3px);
}
.sheet {
  width: 480px;
  max-width: calc(100% - 32px);
  max-height: 85dvh;
  border-radius: 24px;
  padding: 32px;
  overflow-y: auto;
}
.sheet .eyebrow {
  margin-right: 30px;
}
.sheet h2 {
  font:
    500 25px/1.5 "Noto Serif TC",
    serif;
  margin: 14px 0;
}
.dialog-close {
  position: absolute;
  right: 16px;
  top: 18px;
  border: 0;
  background: transparent;
}
.sheet-handle {
  display: none;
}
.detail-time {
  font-size: 34px;
  font-weight: 500;
  margin: 10px 0;
}
.detail-fields {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px 20px;
  font-size: 13px;
  line-height: 1.7;
  margin: 24px 0;
}
.detail-fields dt {
  color: var(--muted);
}
.detail-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}
.confirmation {
  border-radius: 20px;
  padding: 28px;
  max-width: calc(100% - 32px);
  width: 420px;
}
.confirmation h2 {
  font-size: 20px;
}
.confirmation p {
  font-size: 13px;
  white-space: pre-line;
}
.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
#confirmError,
#loginErr {
  color: var(--danger);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  max-width: calc(100% - 32px);
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.auth-loading {
  text-align: center;
  padding: 100px 20px;
  color: var(--muted);
  font-size: 13px;
}
.login-layout {
  min-height: 100dvh;
  max-width: 1280px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 80px 60px;
  position: relative;
}
.login-layout > .back-home {
  position: absolute;
  top: 20px;
  left: 30px;
}
.login-art {
  padding: 35px;
  background: #e8ecdf;
  border-radius: 160px 160px 24px 24px;
  text-align: center;
}
.login-art img {
  width: 100%;
  height: 330px;
  object-fit: contain;
}
.login-art p {
  font:
    23px/1.7 "Noto Serif TC",
    serif;
}
.login-card {
  max-width: 400px;
}
.login-card > .brand-mark {
  margin-bottom: 24px;
}
.login-card > p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
}
.login-card h1 {
  font-size: 28px;
  margin: 12px 0 20px;
}
.google-login {
  width: 100%;
  margin: 18px 0 10px;
}
.google-login > span {
  background: #fff;
  color: #4285f4;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font: bold 16px sans-serif;
}
@media (max-width: 1200px) {
  .studio {
    grid-template-columns: 200px 1fr;
  }
  .sidebar {
    padding: 30px 18px;
  }
  #workspace {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .agenda-layout {
    grid-template-columns: 1fr;
  }
  .day-note {
    display: none;
  }
  .schedule-layout {
    grid-template-columns: 1fr;
  }
  .calendar-layout {
    grid-template-columns: 1fr;
  }
  .timing-row {
    grid-template-columns: 1fr 90px 90px auto;
  }
}
@media (max-width: 760px) {
  .studio {
    display: block;
  }
  .sidebar {
    position: static;
    height: 0;
    padding: 0;
    background: none;
  }
  .studio-brand,
  .sidebar-caption,
  .sidebar-note {
    display: none;
  }
  .main-nav {
    position: fixed;
    z-index: 40;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    gap: 4px;
    justify-content: space-around;
    background: #fbfcf6f5;
    border-top: 1px solid var(--line);
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
    backdrop-filter: blur(14px);
  }
  .main-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 55px;
    padding: 7px 4px;
    color: #788471;
    border-radius: 12px;
    text-align: center;
  }
  .main-nav button > span {
    font-size: 10px;
  }
  .main-nav small {
    display: none;
  }
  .main-nav svg {
    width: 21px;
    height: 21px;
  }
  .main-nav button[aria-current="page"] {
    background: #e8eddf;
    color: var(--ink);
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 62px;
    padding: 0 20px;
    background: #f9faf3f5;
    backdrop-filter: blur(12px);
  }
  .account {
    gap: 6px;
    font-size: 10px;
  }
  .account > span {
    max-width: 132px;
  }
  .account .text-button {
    font-size: 11px;
    padding: 8px;
  }
  .back-home {
    font-size: 12px;
  }
  #workspace {
    padding: 26px 20px calc(96px + env(safe-area-inset-bottom));
  }
  .page-heading {
    display: block;
    margin-bottom: 18px;
    position: relative;
  }
  .page-heading h1 {
    font-size: 28px;
    padding-right: 20px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
    margin-bottom: 8px;
  }
  .page-heading p:last-child {
    font-size: 12px;
  }
  .sync-state {
    position: absolute;
    top: 4px;
    right: 0;
    margin-top: 0;
    font-size: 10px;
  }
  .sync-state .icon-button {
    margin-left: auto;
    height: 36px;
    min-height: 36px;
    width: 36px;
  }
  .staff-switch {
    margin-bottom: 14px;
    gap: 6px;
  }
  .staff-switch button {
    font-size: 12px;
    padding-right: 13px;
    min-height: 44px;
  }
  .staff-switch img {
    width: 25px;
    height: 30px;
  }
  .day-bar {
    margin-bottom: 14px;
    gap: 6px;
  }
  .date-nav {
    gap: 0;
  }
  .date-picker input {
    font-size: 14px;
    padding: 8px 3px;
    width: 141px;
    min-width: 0;
  }
  .date-nav .icon-button {
    width: 36px;
    min-height: 44px;
    padding: 4px;
    border-color: transparent;
    background: transparent;
  }
  .day-bar > .secondary {
    font-size: 10px;
    padding: 8px 10px;
    min-height: 40px;
    white-space: nowrap;
  }
  .week-strip {
    gap: 5px;
    margin-bottom: 18px;
  }
  .week-strip button {
    border-radius: 10px;
    min-height: 77px;
    padding: 10px 2px 7px;
  }
  .week-strip strong {
    font-size: 19px;
  }
  .week-strip span {
    font-size: 9px;
  }
  .summary-grid {
    gap: 7px;
    margin-bottom: 24px;
  }
  .summary-grid > div {
    padding: 13px 11px;
    border-radius: 11px;
  }
  .summary-grid small {
    font-size: 9px;
    line-height: 1.5;
    margin-bottom: 9px;
  }
  .summary-grid strong {
    font-size: 17px;
    line-height: 1.5;
    display: block;
  }
  .summary-grid strong span {
    font-size: 10px;
  }
  .list-tools {
    display: block;
  }
  .segmented {
    width: 100%;
    margin-bottom: 13px;
  }
  .segmented button {
    flex: 1;
    font-size: 12px;
  }
  .search-field {
    max-width: none;
  }
  .search-field input {
    font-size: 16px;
  }
  .list-meta {
    margin: 10px 0;
  }
  .booking-card {
    padding: 17px 14px;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 0 12px;
  }
  .time-column {
    padding-right: 10px;
  }
  .time-column strong {
    font-size: 18px;
  }
  .time-column small {
    font-size: 9px;
  }
  .booking-top {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }
  .booking-top h3 {
    font-size: 14px;
  }
  .booking-customer {
    font-size: 12px;
    margin-top: 6px;
  }
  .booking-staff {
    font-size: 10px;
    margin-left: 6px;
  }
  .booking-timing {
    font-size: 10px;
  }
  .booking-actions {
    grid-column: 1/-1;
    margin-top: 14px;
    border-top: 1px solid #edf0e6;
    padding-top: 10px;
  }
  .booking-actions button,
  .booking-actions a {
    flex: 1;
    font-size: 11px;
  }
  .booking-note {
    font-size: 11px;
  }
  .card {
    padding: 20px;
    border-radius: 14px;
  }
  .card-heading {
    gap: 10px;
    margin-bottom: 20px;
  }
  .card-heading h2 {
    font-size: 16px;
  }
  .card-heading p {
    font-size: 11px;
  }
  .form-grid {
    gap: 14px;
  }
  .form-grid input,
  .form-grid select,
  .field-label input,
  .blackout-form input,
  .timing-row input {
    font-size: 16px;
    width: 100%;
  }
  .helper {
    font-size: 11px;
  }
  .slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .slot-legend {
    font-size: 10px;
    gap: 12px;
  }
  .leave-save {
    bottom: calc(80px + env(safe-area-inset-bottom));
    padding: 12px;
    margin-top: 18px;
  }
  .leave-save .primary {
    padding: 10px 13px;
    font-size: 12px;
  }
  .leave-save p {
    font-size: 11px;
  }
  .leave-save small {
    font-size: 9px;
  }
  .settings-intro {
    font-size: 11px;
  }
  .setting-group > summary > span {
    font-size: 16px;
  }
  .setting-group > summary small {
    font-size: 10px;
  }
  .wd-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }
  .save-row {
    flex-direction: column;
    align-items: stretch;
  }
  .save-row .primary {
    width: 100%;
  }
  .timing-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .timing-row h4 {
    grid-column: 1/-1;
    font-size: 13px;
  }
  .timing-summary {
    grid-column: 1/-1;
    grid-row: auto;
    font-size: 10px;
  }
  .status-action {
    grid-column: 1/-1;
    grid-row: auto;
    min-height: 44px;
  }
  .blackout-form {
    grid-template-columns: 1fr;
  }
  .month-grid {
    gap: 4px;
  }
  .month-grid button {
    min-height: 52px;
    font-size: 12px;
  }
  .month-grid button small {
    font-size: 8px;
  }
  .calendar-heading h2 {
    font-size: 18px;
  }
  .calendar-weekdays {
    font-size: 10px;
  }
  .external-calendar {
    font-size: 12px;
  }
  .external-calendar iframe {
    height: 480px;
  }
  .sheet {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 24px 24px 0 0;
    padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
    max-height: 90dvh;
  }
  .sheet-handle {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: #ccd4c5;
    margin: 0 auto 24px;
  }
  .sheet h2 {
    font-size: 23px;
  }
  .sheet-actions {
    position: sticky;
    bottom: 0;
    background: var(--paper);
    padding-top: 10px;
  }
  .detail-fields {
    gap: 15px 14px;
    font-size: 12px;
    grid-template-columns: 76px 1fr;
  }
  .confirmation {
    padding: 24px;
  }
  .toast {
    bottom: calc(87px + env(safe-area-inset-bottom));
    font-size: 12px;
    width: max-content;
  }
  .login-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 90px 28px 36px;
    align-items: stretch;
  }
  .login-art {
    display: none;
  }
  .login-card {
    margin: 0 auto;
    width: 100%;
  }
  .login-card h1 {
    font-size: 26px;
  }
  .login-layout > .back-home {
    left: 28px;
  }
  .login-card > .brand-mark {
    margin-bottom: 40px;
  }
}
@media (max-width: 350px) {
  #workspace {
    padding-left: 15px;
    padding-right: 15px;
  }
  .topbar {
    padding: 0 15px;
  }
  .account > span {
    max-width: 100px;
  }
  .date-picker input {
    width: 129px;
    font-size: 13px;
  }
  .summary-grid strong {
    font-size: 15px;
  }
  .summary-grid > div {
    padding: 12px 9px;
  }
  .card {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .staff-switch button {
    font-size: 11px;
    padding-right: 10px;
  }
  .sheet {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.calendar-setup{margin:0 0 24px;padding:24px;border:1px solid #b8c6aa;border-left:5px solid var(--gold);border-radius:20px;background:#f0f3e8;overflow-wrap:anywhere}
.calendar-setup[data-connected="true"]{border-left-color:var(--ink);background:var(--paper)}
.calendar-setup-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.calendar-setup-heading strong{font-size:13px;background:#fff9e7;color:#745d34;padding:6px 12px;border-radius:30px}
.calendar-setup[data-connected="true"] .calendar-setup-heading strong{background:var(--sage);color:var(--ink)}
.calendar-setup h2{font-size:22px;margin:12px 0}.calendar-setup p{line-height:1.7}
.calendar-setup-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0;align-items:center}
.calendar-setup-actions a{text-decoration:none;text-align:center}
.calendar-setup summary{cursor:pointer;font-size:14px}.calendar-setup code{user-select:all}
#calendarSetupResult{font-weight:500}#calendarScopeNote{color:var(--muted)}
@media(max-width:600px){.calendar-setup{padding:18px;margin-bottom:18px}.calendar-setup h2{font-size:20px}.calendar-setup-actions>*{flex:1 1 45%;min-height:44px}.calendar-setup-actions .primary{flex-basis:100%}}

#calendarSharedId{display:block;width:100%;box-sizing:border-box;margin:10px 0;padding:12px;border:1px solid var(--line);border-radius:10px;font:inherit}#calendarSetupGuide{margin-top:16px}#calendarSetupGuide[open]{padding-top:12px;border-top:1px solid var(--line)}
