:root {
  color-scheme: light;
  --ink: #281f22;
  --muted: #75666b;
  --paper: #fffdf9;
  --panel: #ffffff;
  --line: #e9ddd9;
  --rose: #d9688f;
  --rose-dark: #a73f65;
  --sage: #8ba889;
  --mint: #dceee2;
  --butter: #f8e7af;
  --shadow: 0 22px 60px rgba(80, 45, 55, 0.12);
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fbf2f0 0%, #f7f2e8 42%, #eef4ee 100%);
}

body::selection {
  color: #ffffff;
  background: var(--rose-dark);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(167, 63, 101, 0.36);
  outline-offset: 3px;
}

.nail-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 14px 28px;
  background: rgba(255, 253, 249, 0.9);
  border-bottom: 1px solid rgba(80, 45, 55, 0.1);
  backdrop-filter: blur(18px);
}

.nail-brand,
.nail-nav,
.header-action,
.header-action-secondary,
.nail-footer a {
  text-decoration: none;
}

.nail-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.nail-brand span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
  font-weight: 900;
}

.nail-brand strong {
  font-size: 17px;
}

.nail-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.nail-nav a {
  text-decoration: none;
}

.nail-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-action,
.submit-booking {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--rose-dark);
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(167, 63, 101, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.header-action {
  min-width: 112px;
  padding: 0 18px;
}

.header-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 112px;
  padding: 0 18px;
  border: 1px solid rgba(167, 63, 101, 0.32);
  border-radius: 8px;
  color: var(--rose-dark);
  background: rgba(255, 248, 246, 0.78);
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(167, 63, 101, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.header-action:hover,
.submit-booking:hover,
.header-action:focus-visible,
.submit-booking:focus-visible {
  background: #8e3658;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(167, 63, 101, 0.26);
}

.header-action-secondary:hover,
.header-action-secondary:focus-visible {
  border-color: rgba(167, 63, 101, 0.58);
  background: #fff8f6;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(167, 63, 101, 0.16);
}

.reset-booking {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(167, 63, 101, 0.22);
  border-radius: 8px;
  color: var(--rose-dark);
  background: #fff8f6;
  font-weight: 850;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.submit-booking,
.reset-booking {
  scroll-margin-top: 96px;
}

.reset-booking:hover,
.reset-booking:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(167, 63, 101, 0.48);
  background: #f9ecee;
}

.nail-page {
  overflow: hidden;
}

.frontdesk {
  width: min(1320px, calc(100% - 40px));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 22px 0 58px;
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(360px, 0.92fr);
  gap: 16px;
  align-items: stretch;
}

.brand-stage,
.booking-panel,
.ops-board,
.service-list article,
.lookbook-photo,
.owner-grid article {
  border: 1px solid rgba(80, 45, 55, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-stage {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #1b1717;
}

.brand-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(27, 23, 23, 0.05) 0%, rgba(27, 23, 23, 0.42) 52%, rgba(27, 23, 23, 0.78) 100%),
    linear-gradient(90deg, rgba(27, 23, 23, 0.28), rgba(27, 23, 23, 0));
}

.brand-stage img {
  width: 100%;
  height: 100%;
  min-height: 680px;
  object-fit: cover;
  object-position: center;
}

.brand-overlay {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  z-index: 1;
  color: #fffaf6;
}

.brand-overlay > span,
.panel-label {
  display: inline-flex;
  margin: 0;
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-overlay > span {
  color: #f9df9e;
}

.brand-overlay h1 {
  margin: 10px 0 0;
  font-size: 64px;
  line-height: 0.94;
  letter-spacing: 0;
}

.brand-overlay p {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(255, 250, 246, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.brand-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.brand-facts span {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #2f2428;
  background: rgba(255, 253, 249, 0.9);
  font-weight: 850;
}

.booking-panel,
.ops-board {
  background: rgba(255, 253, 249, 0.92);
}

.booking-panel {
  padding: 24px;
}

.booking-panel h2,
.ops-head h2,
.section-copy h2,
.lookbook-copy h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.06;
  letter-spacing: 0;
}

.booking-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.booking-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.booking-form legend,
.guest-fields label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid button,
.slot-list button,
.lookbook-switch button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 850;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.choice-grid button:hover,
.slot-list button:hover,
.lookbook-switch button:hover,
.choice-grid button:focus-visible,
.slot-list button:focus-visible,
.lookbook-switch button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(167, 63, 101, 0.44);
}

.choice-grid button.is-active,
.slot-list button.is-active,
.lookbook-switch button.is-active {
  color: #ffffff;
  background: var(--rose-dark);
  border-color: var(--rose-dark);
}

.slot-list {
  display: grid;
  gap: 8px;
}

.slot-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 8px 12px;
  text-align: left;
}

.slot-list button span {
  color: currentColor;
  opacity: 0.72;
  font-size: 13px;
}

.slot-list button[disabled] {
  color: #aa9da1;
  background: #f4efeb;
  cursor: not-allowed;
  transform: none;
}

.guest-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guest-fields label {
  display: grid;
  gap: 7px;
}

.wide-field {
  grid-column: 1 / -1;
}

.guest-fields input,
.guest-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.guest-fields input {
  min-height: 46px;
  padding: 0 12px;
}

.guest-fields textarea {
  resize: vertical;
  min-height: 86px;
  padding: 12px;
}

.booking-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.booking-summary span,
.booking-summary strong {
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--mint);
  font-size: 14px;
  font-weight: 900;
}

.booking-summary strong {
  background: var(--butter);
}

.booking-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
}

.submit-booking {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.reset-booking {
  min-height: 52px;
}

.live-note {
  min-height: 40px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: #f8f3ee;
  font-size: 14px;
  line-height: 1.45;
}

.ops-board {
  display: grid;
  align-content: start;
  gap: 12px 18px;
  padding: 24px;
}

.ops-band {
  width: min(1560px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 70px;
}

.ops-band .ops-board {
  grid-template-columns: minmax(300px, 0.62fr) minmax(0, 1.38fr);
  align-items: start;
}

.ops-band .ops-head,
.ops-band .ops-metrics,
.ops-band .ops-stock {
  grid-column: 1;
}

.ops-band .ops-schedule {
  grid-column: 2;
  grid-row: 1 / span 3;
  padding-top: 0;
  border-top: 0;
}

.ops-band .ops-stock {
  margin-top: -2px;
  padding-top: 12px;
}

.ops-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ops-head time {
  min-width: max-content;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--rose-dark);
  background: #f9ecee;
  font-size: 13px;
  font-weight: 850;
}

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ops-metrics div {
  min-height: 96px;
  padding: 14px;
  border-radius: 8px;
  background: #f9f3ed;
}

.ops-metrics strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.ops-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.ops-section {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.ops-section h3 {
  margin: 0;
  font-size: 18px;
}

.ops-section h3:empty {
  display: none;
}

.appointment-list {
  display: grid;
  gap: 10px;
}

.appointment-card {
  display: grid;
  grid-template-columns: 82px minmax(220px, 1fr) 78px minmax(220px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.appointment-card time {
  color: var(--rose-dark);
  font-weight: 900;
}

.appointment-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.appointment-card em {
  min-width: 48px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--sage);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.appointment-card em.is-pending {
  color: #7b5a24;
  background: #f8e7af;
}

.appointment-card em.is-waiting {
  background: #7a6aa6;
}

.appointment-card em.is-full {
  background: #8e6d63;
}

.appointment-card em.is-new {
  background: var(--rose-dark);
}

.appointment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.appointment-actions button {
  min-height: 34px;
  border: 1px solid rgba(80, 45, 55, 0.14);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff8f6;
  font-size: 13px;
  font-weight: 850;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.appointment-actions button:hover,
.appointment-actions button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(167, 63, 101, 0.42);
  background: #f9ecee;
}

.appointment-actions [data-appointment-action="confirm"] {
  color: #ffffff;
  border-color: var(--sage);
  background: var(--sage);
}

.appointment-actions [data-appointment-action="cancel"] {
  color: #9b3155;
  border-color: rgba(155, 49, 85, 0.24);
  background: #fff0f3;
}

.stock-list {
  display: grid;
  gap: 12px;
}

.stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.stock-row span {
  color: var(--muted);
  font-weight: 750;
}

.stock-row strong {
  font-size: 13px;
}

.stock-row i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--rose) var(--stock), #eee4df var(--stock));
}

.service-band,
.studio-band,
.owner-band {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 78px 0;
}

.section-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
}

.section-copy p:not(.panel-label),
.lookbook-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-list article,
.owner-grid article {
  min-height: 230px;
  padding: 22px;
  background: rgba(255, 253, 249, 0.86);
}

.service-list article span {
  color: var(--rose-dark);
  font-size: 13px;
  font-weight: 950;
}

.service-list h3,
.owner-grid h3 {
  margin: 12px 0 0;
  font-size: 24px;
}

.service-list p,
.owner-grid p {
  color: var(--muted);
  line-height: 1.72;
}

.service-list strong {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--butter);
}

.studio-band {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.lookbook-copy {
  padding: 28px;
  border-radius: 8px;
  background: #28342b;
  color: #fffaf6;
}

.lookbook-copy h2 {
  color: #fffaf6;
}

.lookbook-copy p {
  color: rgba(255, 250, 246, 0.76);
}

.lookbook-copy .panel-label {
  color: #f8e7af;
}

.lookbook-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 26px;
}

.lookbook-switch button {
  color: #fffaf6;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.lookbook-switch button.is-active {
  color: #281f22;
  background: var(--butter);
  border-color: var(--butter);
}

.lookbook-photo {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  margin: 0;
  background: #1b1717;
}

.lookbook-photo img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.lookbook-photo figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 253, 249, 0.9);
  font-weight: 850;
  line-height: 1.5;
}

.owner-band {
  padding-top: 46px;
}

.owner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.nail-footer {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 58px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .frontdesk {
    grid-template-columns: 1fr;
  }

  .brand-stage {
    min-height: 520px;
  }

  .brand-stage img {
    min-height: 520px;
  }
}

@media (max-width: 980px) {
  .nail-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nail-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nail-header-actions {
    margin-left: auto;
  }

  .frontdesk,
  .ops-band .ops-board,
  .studio-band {
    grid-template-columns: 1fr;
  }

  .ops-band .ops-head,
  .ops-band .ops-metrics,
  .ops-band .ops-schedule,
  .ops-band .ops-stock {
    grid-column: auto;
    grid-row: auto;
  }

  .ops-band .ops-schedule {
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .ops-band .ops-stock {
    margin-top: 0;
  }

  .section-copy,
  .service-list,
  .owner-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nail-header {
    position: static;
    padding: 12px 14px;
  }

  .nail-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .header-action,
  .header-action-secondary {
    width: 100%;
    min-width: 0;
  }

  .frontdesk,
  .ops-band,
  .service-band,
  .studio-band,
  .owner-band,
  .nail-footer {
    width: calc(100% - 28px);
  }

  .frontdesk {
    min-height: auto;
    padding-top: 14px;
  }

  .brand-stage,
  .brand-stage img {
    min-height: 500px;
  }

  .brand-overlay {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .brand-overlay h1 {
    font-size: 42px;
  }

  .brand-overlay p {
    font-size: 16px;
  }

  .booking-panel,
  .ops-board,
  .lookbook-copy {
    padding: 18px;
  }

  .booking-panel h2,
  .ops-head h2,
  .section-copy h2,
  .lookbook-copy h2 {
    font-size: 30px;
  }

  .choice-grid,
  .choice-grid.compact,
  .guest-fields,
  .booking-summary,
  .booking-actions,
  .ops-metrics,
  .lookbook-switch {
    grid-template-columns: 1fr;
  }

  .appointment-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .appointment-card em {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .appointment-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .appointment-actions button {
    flex: 1 1 0;
  }

  .service-band,
  .studio-band,
  .owner-band {
    padding: 52px 0;
  }

  .lookbook-photo,
  .lookbook-photo img {
    min-height: 420px;
  }

  .nail-footer {
    flex-direction: column;
  }
}
