
* {
  box-sizing: border-box;
}

html,
body,
.admin-shell {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #f7f8fa;
}

body {
  color: #302e2c;
  font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.site-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f7f8fa;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.customer-viewport {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #f8f8f8;
}

.customer-phone-shell {
  position: relative;
  width: min(100%, 430px);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #f8f8f8;
  box-shadow: 0 0 32px rgba(34, 31, 28, 0.08);
}

.customer-header {
  position: absolute;
  z-index: 20;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  height: 66px;
  padding: 16px 14px 8px;
  background: rgba(248, 248, 248, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 0;
}

.customer-header h1 {
  grid-column: 2;
  margin: 0;
  color: #312f2c;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.customer-header .version {
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #96918a;
  font-size: 9px;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.member-button {
  grid-column: 3;
  justify-self: end;
}

.header-back {
  grid-column: 1;
  grid-row: 1;
}

.customer-header:has(.header-back) .version {
  display: none;
}

.customer-scroll {
  height: 100%;
  overflow: auto;
  padding: 78px 14px 100px;
  overscroll-behavior: contain;
}

.category-list,
.booking-panel,
.member-page,
.records-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.shop-name-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 16px;
  margin-bottom: 4px;
  border-radius: 20px;
  background: #fff;
  font-size: 14px;
}

.shop-name-card > span { flex-shrink: 0; }
.shop-name-card strong { min-width: 0; overflow-wrap: anywhere; text-align: right; color: #806047; font-weight: 500; }
.category-group.expanded { border-radius: 30px; box-shadow: 0 0 5px #0003; }

.category-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 80px;
  padding: 9px 14px 9px 9px;
  border: 1px solid #ece8e2;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(45, 39, 33, 0.04);
  text-align: left;
  cursor: pointer;
}

.category-card.open {
  border-color: transparent;
  box-shadow: none;
}

.category-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.5;
}
.category-card .card-image { width: 68px; height: 68px; border-radius: 24px; }

.card-image {
  display: block;
  width: 76px;
  height: 72px;
  border-radius: 13px;
  background-color: #eee9e2;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.service-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 5px 4px 7px;
}

.service-section h2 {
  margin: 2px 0 1px;
  color: #57534e;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  padding-bottom: 4px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 30px;
  background: #fff;
  min-width: 0;
}

.service-disclosure {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 24px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.service-disclosure:focus-visible, .category-card:focus-visible, .service-details .choose-button:focus-visible {
  outline: 3px solid #71553e;
  outline-offset: 2px;
}

.service-card .service-image {
  width: 92px;
  height: 92px;
  border-radius: 28px;
}

.service-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  overflow-wrap: anywhere;
}

.service-copy strong {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.service-copy .duration {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #777;
  font-size: 14px;
}

.price-line {
  color: #242424;
  font-size: 20px;
  font-weight: 500;
}

.service-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 12px;
}
.service-description-label { font-size: 12px; }
.service-details p {
  margin: 4px 0 0;
  color: #373737;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.service-details .choose-button {
  align-self: center;
  min-width: 100px;
  min-height: 40px;
  margin-top: 20px;
  border-radius: 10px;
  background: #806047;
}

.choose-button {
  align-self: flex-end;
  min-width: 62px;
  margin-top: 3px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: #564c43;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.selected-service {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 11px;
  border-radius: 17px;
  background: #fff;
  border: 1px solid #ebe7e1;
}

.selected-service .service-image {
  width: 72px;
  height: 72px;
}

.selected-service > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.selected-service small {
  color: #9a8b7c;
  font-size: 11px;
}

.selected-service strong {
  font-size: 14px;
  line-height: 1.4;
}

.selected-service span:not(.card-image) {
  display: flex;
  align-items: center;
  color: #7c756e;
  font-size: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #5f5a54;
  font-size: 14px;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #dcd7d0;
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: #35322f;
  font-size: 16px;
}

.customer-field-hint {
  color: #6f675e;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.customer-text-notice {
  padding: 16px;
  border: 1px solid #d9d0c4;
  border-radius: 12px;
  background: #f4f0e9;
  color: #584f46;
}

.customer-text-notice h2 {
  margin: 0 0 8px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.customer-text-notice p,
.record-card .record-cancel-reason {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
  font-size: 13px;
}

.cancel-confirmation .form-field {
  margin-block: 14px;
}

.cancel-confirmation .choose-button {
  margin: 4px 8px 0 0;
}

.cancel-confirmation .choose-button:focus-visible {
  outline: 2px solid #5c4c3b;
  outline-offset: 3px;
}

.form-field textarea {
  min-height: 95px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #8d7c69;
  box-shadow: 0 0 0 3px rgba(141, 124, 105, 0.12);
}

.choice-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-field legend {
  margin-bottom: 8px;
  color: #5f5a54;
  font-size: 14px;
  font-weight: 600;
}

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

.time-grid {
  grid-template-columns: repeat(4, 1fr);
}

.choice-grid button,
.time-grid button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 6px;
  border: 1px solid #ded9d2;
  border-radius: 11px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.choice-grid button.selected,
.time-grid button.selected {
  border-color: #5e5248;
  background: #5e5248;
  color: #fff;
}

.customer-primary,
.line-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  background: #554c44;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.customer-primary.compact {
  width: auto;
  min-height: 44px;
}

.customer-primary:disabled,
.line-button:disabled,
.choose-button:disabled,
.icon-button:disabled,
.customer-bottom-nav button:disabled,
.choice-field:disabled button {
  opacity: 0.45;
  cursor: not-allowed;
}

.line-button {
  margin-top: 5px;
  background: #06c755;
}

.schedule-chip,
.inline-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px;
  border-radius: 12px;
  background: #ebe6de;
  color: #5f574f;
  font-size: 14px;
  font-weight: 600;
}

.confirm-card,
.info-card,
.shop-info,
.record-card {
  padding: 17px;
  border: 1px solid #e9e4dd;
  border-radius: 17px;
  background: #fff;
}

.confirm-card h2,
.info-card h2,
.shop-info h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.summary-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f0ece7;
  font-size: 14px;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row span {
  color: #8b857e;
}

.summary-row strong {
  line-height: 1.45;
  text-align: right;
}

.consent-copy {
  margin: 0;
  color: #868078;
  font-size: 12px;
  line-height: 1.6;
}

.success-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 0;
  color: #4f6e5a;
  text-align: center;
}

.success-panel h2 {
  margin: 4px 0 0;
  color: #33302d;
  font-size: 23px;
}

.success-panel > p {
  margin: 0 0 8px;
  color: #716b65;
  font-size: 13px;
}

.success-panel .compact-card {
  width: 100%;
  color: #33302d;
}

.line-result,
.line-notice,
.success-notice,
.customer-alert {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  background: #fff4d8;
  color: #795e26;
  font-size: 13px;
  line-height: 1.5;
}

.success-notice {
  margin-top: 10px;
  background: #e3f5e7;
  color: #397147;
}

.customer-alert {
  margin-bottom: 12px;
  background: #fee9e6;
  color: #91473f;
}

.member-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 17px;
  border-radius: 18px;
  background: linear-gradient(135deg, #63584f, #8a7968);
  color: #fff;
}

.member-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.member-hero > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-hero strong {
  font-size: 18px;
}

.member-hero span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.info-card p,
.shop-info p {
  color: #746e67;
  font-size: 13px;
  line-height: 1.65;
}

.info-card form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 15px;
}

.shop-info p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
}

.public-empty {
  display: flex;
  min-height: 55vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #9a958e;
}

.empty-illustration {
  display: block;
  width: 140px;
  height: 120px;
  background: center / contain no-repeat url("/legacy/assets/no-data.svg");
  opacity: 0.8;
}

.public-empty strong {
  font-size: 14px;
  font-weight: 500;
}

.record-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

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

.record-reschedule {
  margin-top: 8px;
  padding: 14px 0;
  border-block: 1px solid #e9e4dd;
}

.record-reschedule h2 {
  margin: 0;
  font-size: 15px;
}

.record-reschedule .customer-alert {
  margin-bottom: 0;
}

.record-reschedule .customer-alert .choose-button {
  display: block;
  margin-top: 8px;
}

.record-reschedule .consent-copy {
  font-size: 12px;
  line-height: 1.6;
}

.record-reschedule button:focus-visible {
  outline: 3px solid #b69d80;
  outline-offset: 2px;
}

.record-head strong {
  font-size: 14px;
  line-height: 1.5;
}

.record-head span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff1d6;
  color: #80622b;
  font-size: 11px;
}

.record-card p,
.record-card small {
  margin: 0;
  color: #77716b;
  font-size: 13px;
}

.record-card small {
  color: #aaa49d;
  font-size: 11px;
}

.inline-empty {
  padding: 18px 12px;
  border-radius: 12px;
  background: #ebe8e3;
  color: #8d8780;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.customer-bottom-nav {
  position: absolute;
  z-index: 30;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 78px;
  padding: 8px 5px max(7px, env(safe-area-inset-bottom));
  border-top: 0;
  border-radius: 16px 16px 0 0;
  background: #bda28a;
  backdrop-filter: blur(14px);
}

.customer-bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: #4b3829;
  cursor: pointer;
}

.customer-bottom-nav svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.6;
}

.customer-bottom-nav span {
  font-size: 11px;
}

.customer-bottom-nav button.active {
  color: #4b3829;
  font-weight: 700;
}

.center-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #766f68;
}

.spin {
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 380px) {
  .customer-scroll { padding-inline: 10px; }
  .category-card { grid-template-columns: 68px minmax(0, 1fr) auto; }
  .card-image { width: 68px; height: 66px; }
  .time-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 700px) {
  .customer-phone-shell {
    border-inline: 1px solid #e2ded8;
  }
}
