﻿/* ?????? Design Tokens ?????????????????????????????????????????????????????????????????????????????? */
:root {
  --bg:               #f7efe4;
  --surface:          rgba(255, 249, 241, 0.9);
  --surface-strong:   rgba(255, 245, 234, 0.98);
  --surface-hover:    rgba(176, 132, 76, 0.08);
  --border:           rgba(137, 102, 58, 0.16);
  --border-bright:    rgba(137, 102, 58, 0.28);

  --text:             #3f2d1d;
  --muted:            #8a735d;
  --muted-bright:     #65513d;

  --accent:           #c78b35;
  --accent-dim:       #965f17;
  --accent-glow:      rgba(199, 139, 53, 0.2);

  --blue:             #bf7444;
  --blue-glow:        rgba(191, 116, 68, 0.16);

  --success:          #3f965c;
  --success-bg:       rgba(63, 150, 92, 0.12);

  --danger:           #c25b4b;
  --danger-bg:        rgba(194, 91, 75, 0.11);

  --warning:          #d09135;
  --warning-bg:       rgba(208, 145, 53, 0.14);

  --radius-sm:        14px;
  --radius-md:        20px;
  --radius-lg:        28px;
  --radius-xl:        36px;

  --shadow-sm:        0 6px 16px rgba(110, 78, 38, 0.08);
  --shadow-md:        0 16px 34px rgba(110, 78, 38, 0.12);
  --shadow-lg:        0 24px 48px rgba(110, 78, 38, 0.16);
  --shadow-accent:    0 14px 30px rgba(199, 139, 53, 0.2);

  --font-sans:        "Inter", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --font-mono:        "Cascadia Code", "JetBrains Mono", "Consolas", monospace;

  --transition:       0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ?????? Reset & Base ???????????????????????????????????????????????????????????????????????????????? */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 78% 48% at 10% 0%, rgba(231, 188, 118, 0.3) 0%, transparent 58%),
    radial-gradient(ellipse 68% 56% at 95% 6%, rgba(223, 168, 132, 0.24) 0%, transparent 50%),
    linear-gradient(180deg, #fff8f0 0%, #f7efe4 45%, #f1e3d3 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(159, 121, 75, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
}

/* ?????? Ambient Blobs ?????????????????????????????????????????????????????????????????????????????? */
.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(44px);
  pointer-events: none;
  z-index: 0;
}

.ambient--left {
  width: 560px;
  height: 560px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, #f0c978 0%, transparent 70%);
  opacity: 0.2;
}

.ambient--right {
  width: 480px;
  height: 480px;
  right: -100px;
  bottom: -80px;
  background: radial-gradient(circle, #e7b387 0%, transparent 70%);
  opacity: 0.18;
}

/* ?????? Layout Containers ?????????????????????????????????????????????????????????????????????? */
.hero,
.layout {
  position: relative;
  z-index: 1;
}

.hero {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 24px;
}

.hero__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr);
  gap: 24px;
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto 48px;
}

.side-stack {
  display: grid;
  gap: 24px;
  align-content: start;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto 44px;
}

.site-footer__inner {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 250, 244, 0.98) 0%, rgba(244, 231, 214, 0.9) 100%);
  box-shadow: var(--shadow-md);
}

.site-footer__title {
  margin: 0 0 14px;
  color: var(--muted-bright);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.site-footer__item {
  padding: 16px 18px;
  border: 1px solid rgba(137, 102, 58, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.52);
}

.site-footer__item span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.site-footer__item strong,
.site-footer__item a {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-footer__item a:hover {
  color: var(--accent-dim);
}

/* ?????? Hero ???????????????????????????????????????????????????????????????????????????????????????????????? */
.hero__badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 5px 12px;
  border: 1px solid rgba(199, 139, 53, 0.24);
  border-radius: 999px;
  background: rgba(199, 139, 53, 0.1);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  border: none;
  background: none;
  padding: 0;
  font-size: 0.76rem;
}

.hero__badge {
  margin: 0;
  padding: 10px 20px;
  border-width: 3px;
  border-color: #8a5514;
  background: linear-gradient(135deg, #f8e2ac 0%, #d89a3a 100%);
  color: #3b2612;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  box-shadow: 0 10px 24px rgba(186, 133, 54, 0.22);
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1.5px solid rgba(137, 102, 58, 0.2);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.9);
  color: #7a4f16;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    color var(--transition);
}

.hero-link:hover {
  transform: translateY(-1px);
  border-color: rgba(199, 139, 53, 0.42);
  box-shadow: 0 12px 24px rgba(186, 133, 54, 0.14);
}

.hero-link--line {
  background: linear-gradient(135deg, rgba(231, 255, 236, 0.98) 0%, rgba(209, 244, 218, 0.9) 100%);
  border-color: rgba(63, 150, 92, 0.24);
  color: #24753a;
}

#headerLineLink {
  border: 3px solid #2f8f46;
  background: linear-gradient(135deg, #edfbe9 0%, #c8edcd 100%);
  color: #1f5e31;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(63, 150, 92, 0.18);
}

#headerLineLink:hover,
#headerLineLink:focus-visible {
  border-color: #38a651;
  background: linear-gradient(135deg, #f5fff3 0%, #d8f5dd 100%);
  color: #184b27;
}

.hero-link--shop {
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.98) 0%, rgba(247, 229, 190, 0.94) 100%);
  border-color: rgba(199, 139, 53, 0.28);
  color: #8a5514;
}

.hero-link.is-disabled {
  opacity: 0.72;
  border-style: dashed;
  background: rgba(255, 251, 245, 0.84);
  color: var(--muted-bright);
  cursor: not-allowed;
  box-shadow: none;
}

.hero-link.is-disabled:hover {
  transform: none;
  border-color: rgba(137, 102, 58, 0.2);
  box-shadow: none;
}

.hero h1,
.panel__header h2 {
  margin: 0;
  line-height: 1.15;
}

.hero h1 {
  max-width: min(1040px, 100%);
  font-size: clamp(1.35rem, 2.55vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
  color: #3d2a18;
}

.hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted-bright);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.8;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

/* ?????? Cards / Meta Cards ???????????????????????????????????????????????????????????????????? */
.meta-card {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.meta-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 139, 53, 0.18), transparent);
}

.meta-card span {
  display: block;
  color: var(--muted-bright);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}

.meta-card--compact {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.meta-card--compact::before {
  display: none;
}

/* ?????? Panel ?????????????????????????????????????????????????????????????????????????????????????????????? */
.panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(199, 139, 53, 0.12) 40%, rgba(199, 139, 53, 0.12) 60%, transparent 100%);
  pointer-events: none;
}

.schedule-panel,
.booking-panel {
  padding: 28px;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel__header--split {
  align-items: flex-end;
}

.panel__header h2 {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text);
}

/* ?????? Links & Inline ???????????????????????????????????????????????????????????????????????????? */
.panel-link,
.inline-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

.panel-link:hover,
.inline-link:hover {
  color: var(--accent-dim);
  opacity: 0.9;
}

.helper-links {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ?????? Buttons ?????????????????????????????????????????????????????????????????????????????????????????? */
.button {
  position: relative;
  appearance: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(122, 83, 41, 0);
  transition: background var(--transition);
}

.button:hover::after {
  background: rgba(122, 83, 41, 0.07);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.button:disabled::after {
  display: none;
}

.button--primary,
.button--secondary,
.button--ghost {
  padding: 12px 22px;
}

.button--primary {
  background: linear-gradient(135deg, #f0ca7a 0%, #d48c30 100%);
  color: #442b13;
  box-shadow: 0 10px 24px rgba(212, 140, 48, 0.22), inset 0 1px 0 rgba(255,255,255,0.42);
}

.button--primary:hover {
  box-shadow: 0 14px 34px rgba(212, 140, 48, 0.28), inset 0 1px 0 rgba(255,255,255,0.44);
}

.button--secondary {
  background: rgba(255, 250, 243, 0.92);
  color: var(--text);
  border: 1px solid var(--border-bright);
  box-shadow: var(--shadow-sm);
}

.button--secondary:hover {
  background: rgba(255, 247, 238, 1);
  border-color: rgba(137, 102, 58, 0.32);
}

.button--ghost {
  background: rgba(255, 248, 239, 0.68);
  color: var(--muted-bright);
  border: 1px solid var(--border);
}

.button--ghost:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

/* ?????? Form Fields ?????????????????????????????????????????????????????????????????????????????????? */
.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted-bright);
  letter-spacing: 0.03em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 248, 0.88);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(199, 139, 53, 0.44);
  background: rgba(255, 251, 244, 1);
  box-shadow: 0 0 0 3px rgba(199, 139, 53, 0.1);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}

#bookingSerialInput,
#progressSerialInput {
  text-transform: none;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
}

.booking-form {
  display: grid;
  gap: 16px;
}

.form-hint,
.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ?????? Inline Message ???????????????????????????????????????????????????????????????????????????? */
.inline-message {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  transition: color var(--transition);
}

.inline-message[data-tone="success"] {
  color: var(--success);
}

.inline-message[data-tone="danger"] {
  color: var(--danger);
}

/* ?????? Hidden ???????????????????????????????????????????????????????????????????????????????????????????? */
.hidden {
  display: none !important;
}

.service-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.service-switcher__button.is-active {
  box-shadow: 0 10px 18px rgba(186, 133, 54, 0.16);
}

#headerStoreLink,
#serviceModeBossButton,
#serviceModeStardustButton {
  border: 3px solid #8a5514;
  background: linear-gradient(135deg, #f3d28f 0%, #d99a3c 100%);
  color: #3b2612;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(186, 133, 54, 0.22);
}

#headerStoreLink:hover,
#serviceModeBossButton:hover,
#serviceModeStardustButton:hover,
#headerStoreLink:focus-visible,
#serviceModeBossButton:focus-visible,
#serviceModeStardustButton:focus-visible {
  border-color: #a8641a;
  background: linear-gradient(135deg, #f7dfaa 0%, #e0aa4d 100%);
  color: #2f1d0d;
}

#headerStoreLink.is-disabled {
  opacity: 1;
  border-style: solid;
  background: linear-gradient(135deg, #f3d28f 0%, #d99a3c 100%);
  color: #3b2612;
  box-shadow: 0 10px 24px rgba(186, 133, 54, 0.22);
}

#headerStoreLink.is-disabled:hover {
  transform: none;
  border-color: #a8641a;
  background: linear-gradient(135deg, #f7dfaa 0%, #e0aa4d 100%);
  color: #2f1d0d;
  box-shadow: 0 10px 24px rgba(186, 133, 54, 0.22);
}

.boss-picker {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(137, 102, 58, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 244, 0.88);
}

.field--compact {
  gap: 10px;
}

.boss-picker__hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}
#bossBookingOptions {
  display: grid;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(137, 102, 58, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 244, 0.88);
  justify-items: stretch;
  align-items: start;
}

#bossBookingOptions .boss-option-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
  text-align: left;
  justify-items: stretch;
  align-items: start;
}

#bossBookingOptions .boss-option-group legend {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--muted-bright);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  justify-self: start;
}

#bossBookingOptions .choice-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 10px;
  margin: 0;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(137, 102, 58, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  justify-self: stretch;
}

#bossBookingOptions .choice-chip input {
  margin: 0;
  justify-self: start;
  align-self: center;
  flex: 0 0 auto;
}

#bossBookingOptions .choice-chip span {
  display: block;
  width: 100%;
  min-width: 0;
  justify-self: start;
  text-align: left;
  white-space: nowrap;
}

#bossBookingOptions .field {
  width: 100%;
  gap: 6px;
  text-align: left;
}

#bossBookingOptions .field span,
#bossBookingOptions .field small {
  text-align: left;
}

#bossBookingOptions .field select,
#bossBookingOptions .field input {
  width: min(220px, 100%);
}

.field-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ?????? Schedule Grid ?????????????????????????????????????????????????????????????????????????????? */
.schedule-grid {
  display: grid;
  gap: 14px;
}

.day-card {
  display: grid;
  grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.98) 0%, rgba(245, 234, 219, 0.92) 100%);
}

.day-card__heading {
  display: grid;
  gap: 6px;
  align-content: start;
}

.day-card__date {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.day-card__hint {
  margin: 0;
  color: var(--muted-bright);
  font-size: 0.88rem;
  line-height: 1.5;
}

.slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.slot-button {
  width: 100%;
  min-height: 126px;
  padding: 16px;
  text-align: left;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: inherit;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.slot-button[data-status="open"] {
  border-color: rgba(199, 139, 53, 0.28);
}

.slot-button[data-status="open"]:hover {
  border-color: rgba(199, 139, 53, 0.5);
  background: rgba(255, 249, 241, 1);
}

.slot-button[data-status="full"] {
  background: rgba(194, 91, 75, 0.08);
  border-color: rgba(194, 91, 75, 0.18);
  color: #9f4136;
}

.slot-button[data-status="in-progress"] {
  background: rgba(162, 109, 38, 0.08);
  border-color: rgba(162, 109, 38, 0.16);
  color: rgba(108, 74, 33, 0.86);
  cursor: default;
}

.slot-button[data-status="closed"] {
  background: rgba(135, 102, 58, 0.05);
  border-color: rgba(135, 102, 58, 0.12);
  color: rgba(86, 65, 43, 0.52);
  cursor: default;
}

.slot-button.is-selected {
  border-color: var(--accent);
  background: rgba(199, 139, 53, 0.12);
  box-shadow: 0 0 0 1px rgba(199, 139, 53, 0.22);
}

.slot-button__title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.slot-button__subtitle,
.slot-button__status {
  margin-top: 6px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted-bright);
}

.slot-button__subtitle {
  min-height: 2.8em;
}

.slot-button__status strong {
  color: var(--text);
}

.slot-button.is-selected .slot-button__subtitle,
.slot-button.is-selected .slot-button__status {
  color: #8f5a12;
}

@media (min-width: 1001px) {
  .hero p {
    width: min(1200px, 100%);
    max-width: 1200px;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .layout {
    gap: 10px;
    grid-template-columns: minmax(0, 690px) minmax(0, 500px);
    justify-content: space-between;
  }

  .layout > .schedule-panel {
    width: min(690px, 100%);
    max-width: 690px;
    justify-self: start;
  }

  .layout > .side-stack {
    width: min(500px, 100%);
    max-width: 500px;
    justify-self: end;
  }

  #scheduleGrid {
    justify-items: start;
  }

  #scheduleGrid > .day-card {
    width: min(660px, 100%);
    max-width: 660px;
    min-height: 150px;
    gap: 12px;
    padding: 12px;
    grid-template-columns: 1fr;
    align-content: start;
  }

  #scheduleGrid > .day-card .day-card__heading {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
    align-items: stretch;
    justify-self: start;
  }

  #scheduleGrid > .day-card .day-card__date {
    width: auto;
    max-width: none;
  }

  #scheduleGrid > .day-card .slot-list {
    width: 100%;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: start;
  }

  #scheduleGrid > .day-card .slot-button {
    width: 100%;
    min-width: 0;
    min-height: 92px;
    padding: 10px;
    justify-self: start;
  }

  #scheduleGrid > .day-card .slot-button__subtitle {
    min-height: 1.45em;
    line-height: 1.45;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.84rem;
  }

  #progressCard .progress-card__message {
    color: #1f4f8a;
  }

  #guideInfoGrid > .guide-info-card {
    min-width: 0;
  }

  #guideInfoGrid > .guide-info-card:nth-child(-n + 2) p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #guideInfoGrid > .guide-info-card:nth-child(3) {
    display: none;
  }
}

/* ?????? Selected Slot Card ???????????????????????????????????????????????????????????????????? */
.selected-slot {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(240, 202, 122, 0.18), rgba(231, 179, 135, 0.18));
  border: 1px solid rgba(199, 139, 53, 0.24);
}

.selected-slot--empty {
  border-style: dashed;
  border-color: var(--border);
  background: rgba(255, 250, 244, 0.68);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.selected-slot h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
  font-weight: 700;
}

.selected-slot p {
  margin: 0;
  color: var(--muted-bright);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ?????? Progress Card ?????????????????????????????????????????????????????????????????????????????? */
.progress-card {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(199, 139, 53, 0.18);
  background: linear-gradient(180deg, rgba(240, 202, 122, 0.1) 0%, rgba(255, 251, 244, 0.92) 100%);
}

.progress-card--empty {
  border-style: dashed;
  border-color: var(--border);
  background: none;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
  padding: 24px;
}

.progress-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.progress-card__header h3 {
  margin: 0;
  font-size: 1.14rem;
  font-weight: 700;
}

.progress-card__message {
  margin: 0;
  color: var(--muted-bright);
  font-size: 0.92rem;
  line-height: 1.65;
}

.progress-card__meta {
  display: grid;
  gap: 12px;
}

.progress-card__meta--details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.progress-card__meta-card {
  min-width: 0;
}

.progress-card__meta-card--serial {
  grid-column: 1 / -1;
}

.progress-card__meta-card--serial strong {
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: 1.5;
}

.progress-section {
  display: grid;
  gap: 12px;
}

.progress-section h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.progress-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.progress-gallery-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 246, 0.84);
}

.progress-gallery-summary {
  display: grid;
  gap: 4px;
}

.progress-gallery-summary strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.progress-gallery-summary span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.gallery-trigger {
  flex-shrink: 0;
}

.gallery-trigger--compact {
  padding: 8px 14px;
  font-size: 0.82rem;
}

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

.image-gallery-grid__empty {
  grid-column: 1 / -1;
}

.image-gallery-card {
  appearance: none;
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 246, 0.9);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.image-gallery-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.image-gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.image-gallery-card strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.image-gallery-card span {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ?????? Modal ?????????????????????????????????????????????????????????????????????????????????????????????? */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(90, 60, 30, 0.22);
}

.modal__dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(90vh, 920px);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(137, 102, 58, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(255, 248, 240, 0.98);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
}

.modal__dialog::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 139, 53, 0.2), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal__dialog--wide {
  width: min(940px, 100%);
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal__header--fixed-row .modal__close {
  margin-left: auto;
  align-self: flex-start;
}

.modal__header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.modal__close {
  flex-shrink: 0;
  appearance: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(199, 139, 53, 0.08);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.modal__close:hover {
  background: rgba(199, 139, 53, 0.14);
  border-color: var(--border-bright);
  color: var(--text);
}

.modal__intro {
  margin: 0;
  color: var(--muted-bright);
  font-size: 0.94rem;
  line-height: 1.7;
}

.modal__scroll {
  overflow-y: auto;
  min-height: 220px;
  max-height: min(46vh, 480px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 247, 0.86);
  scrollbar-width: thin;
  scrollbar-color: rgba(137, 102, 58, 0.22) transparent;
}

.modal__scroll::-webkit-scrollbar {
  width: 4px;
}
.modal__scroll::-webkit-scrollbar-track {
  background: transparent;
}
.modal__scroll::-webkit-scrollbar-thumb {
  background: rgba(137, 102, 58, 0.22);
  border-radius: 99px;
}

.modal__footer {
  display: grid;
  gap: 14px;
}

.modal__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.agreement-consent {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 247, 0.88);
}

.agreement-consent__label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.6;
  cursor: pointer;
}

.agreement-consent__label input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent-dim);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal--preview {
  z-index: 24;
  padding: 0;
  background: rgba(84, 56, 29, 0.58);
  cursor: zoom-out;
}

.image-preview-shell {
  position: relative;
  width: min(80vw, 1100px);
  max-width: 80vw;
  max-height: 80vh;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 22px 16px;
}

.image-preview-note {
  position: absolute;
  top: -2px;
  right: 0;
  margin: 0;
  color: rgba(255, 247, 235, 0.94);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.image-preview-shell img {
  max-width: 100%;
  max-height: calc(80vh - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(30, 18, 9, 0.34);
}

.image-preview-caption {
  color: rgba(255, 247, 235, 0.92);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

/* ?????? Agreement ?????????????????????????????????????????????????????????????????????????????????????? */
.agreement-section + .agreement-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.agreement-section h3 {
  margin: 0 0 10px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.agreement-section p {
  margin: 0;
  color: var(--muted-bright);
  font-size: 0.92rem;
  line-height: 1.75;
}

.agreement-section p + p {
  margin-top: 10px;
}

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

.agreement-summary__item {
  min-width: 0;
}

.agreement-summary__item--inline {
  display: flex;
  align-items: center;
  min-height: auto;
  height: auto;
  padding: 8px 12px;
}

.agreement-summary__item--inline strong {
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.45;
  text-align: left;
}

#agreementModal .modal__dialog {
  gap: 14px;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
}

#agreementModal .agreement-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#agreementModal .agreement-summary__item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: 70px;
  min-height: 70px;
  overflow: hidden;
}

#agreementModal .agreement-summary__item--inline {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  height: auto;
  min-height: 44px;
  padding: 8px 12px;
}

#agreementModal .agreement-summary__item strong {
  margin-top: 4px;
  font-size: 0.94rem;
  line-height: 1.35;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-all;
}

#agreementModal .agreement-summary__item--inline strong {
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.45;
}

#agreementScrollArea {
  height: 250px;
  min-height: 250px;
  max-height: 250px;
  overscroll-behavior: contain;
}

@media (min-width: 1001px) {
  #agreementModal .modal__dialog {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  #agreementModal .modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
  }

  #agreementModal .modal__header > div {
    min-width: 0;
    padding-right: 0;
  }

  #agreementIntro {
    position: absolute;
    top: 34px;
    right: 72px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 32px;
    max-width: 260px;
    margin: 0;
    text-align: left;
  }

  #closeAgreementButton {
    position: static;
    margin-left: 0;
  }

  #agreementSummary {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #agreementModal .agreement-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  #agreementScrollArea {
    grid-column: 1 / -1;
    grid-row: 3;
    height: 270px;
    min-height: 270px;
    max-height: 270px;
  }

  #agreementModal .modal__footer {
    grid-column: 1 / -1;
    grid-row: 4;
    grid-template-columns: 400px minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
  }

  #agreementHint {
    grid-column: 1 / -1;
  }

  #agreementMessage {
    display: none;
  }

  #agreementConsent {
    grid-column: 1;
    width: 400px;
    max-width: 100%;
    margin: 0;
  }

  #agreementModal .modal__actions {
    grid-column: 2;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
  }

}

/* ?????? Guide ?????????????????????????????????????????????????????????????????????????????????????????????? */
.guide-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.guide-info-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 245, 0.78);
  transition: border-color var(--transition);
}

.guide-info-card p {
  margin: 10px 0 14px;
  color: var(--text);
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.guide-info-card:hover {
  border-color: var(--border-bright);
}

.guide-info-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guide-info-card .gallery-trigger--compact {
  min-width: 88px;
}

.guide-info-card .gallery-trigger--compact[data-copy-state="success"] {
  border-color: rgba(85, 143, 95, 0.32);
  background: rgba(85, 143, 95, 0.12);
  color: #275730;
}

.guide-info-card .gallery-trigger--compact[data-copy-state="danger"] {
  border-color: rgba(196, 59, 47, 0.28);
  background: rgba(196, 59, 47, 0.1);
  color: #8d241b;
}

#reminderSummary > div:first-child strong {
  color: #c43b2f;
  font-weight: 700;
}

.guide-video-wrap {
  position: relative;
  min-height: 220px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(84, 56, 29, 0.08);
  box-shadow: var(--shadow-sm);
}

.guide-video-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
}

.guide-video-wrap:empty {
  display: none;
  min-height: 0;
}

/* ?????? Shared Text Helpers ??????????????????????????????????????????????????????????????????????? */
.slot-button__subtitle,
.slot-button__status,
.form-hint {
  color: var(--muted);
}

/* ?????? Tables ???????????????????????????????????????????????????????????????????????????????????????????? */
table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

th {
  padding: 11px 14px;
  background: rgba(214, 186, 149, 0.18);
  border-bottom: 1px solid rgba(137, 102, 58, 0.14);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(137, 102, 58, 0.1);
  font-size: 0.9rem;
  vertical-align: middle;
  transition: background var(--transition);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(199, 139, 53, 0.06);
}

/* ?????? Status Pills ???????????????????????????????????????????????????????????????????????????????? */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-pill--invalid {
  background: var(--danger-bg);
  color: #a24437;
  border: 1px solid rgba(194, 91, 75, 0.18);
}

.status-pill--waiting {
  background: var(--warning-bg);
  color: #9a651a;
  border: 1px solid rgba(208, 145, 53, 0.18);
}

.status-pill--active {
  background: rgba(59, 113, 181, 0.1);
  color: #2d5c92;
  border: 1px solid rgba(59, 113, 181, 0.18);
}

.status-pill--completed {
  background: rgba(90, 154, 116, 0.1);
  color: #356f52;
  border: 1px solid rgba(90, 154, 116, 0.18);
}

/* ?????? Code ???????????????????????????????????????????????????????????????????????????????????????????????? */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(199, 139, 53, 0.1);
  color: var(--blue);
}

/* ?????? Scrollbar ?????????????????????????????????????????????????????????????????????????????????????? */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(137, 102, 58, 0.2);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(137, 102, 58, 0.3);
}

/* ?????? Responsive: Tablet ???????????????????????????????????????????????????????????????????? */
@media (max-width: 1000px) {
  .layout,
  .progress-card__meta,
  .agreement-summary {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 6vw, 4.1rem);
  }

  .hero p {
    max-width: 100%;
  }

  .hero__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__topbar {
    align-items: flex-start;
  }

  .hero__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .day-card {
    grid-template-columns: 1fr;
  }

  .panel__header,
  .panel__header--split,
  .progress-card__header,
  .modal__header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .modal__header--fixed-row {
    flex-direction: row;
    align-items: flex-start;
  }

  .progress-card__meta-card--serial {
    grid-column: auto;
  }

  .progress-gallery-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal__actions {
    flex-direction: column;
  }

  .modal__actions .button {
    width: 100%;
  }

}

/* ?????? Responsive: Mobile ???????????????????????????????????????????????????????????????????? */
@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  .hero {
    width: calc(100% - 24px);
    padding-top: 32px;
  }

  .layout,
  .site-footer {
    width: calc(100% - 24px);
    margin-bottom: 28px;
  }

  .hero__topbar {
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
  }

  .hero__actions {
    display: inline-flex;
    width: auto;
    gap: 8px;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    justify-content: flex-end;
    margin-left: auto;
  }

  .hero-link {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .hero__badge {
    padding: 8px 14px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .side-stack > .booking-panel:first-child > .panel__header--split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .side-stack > .booking-panel:first-child > .panel__header--split > div {
    min-width: 0;
    flex: 1 1 auto;
  }

  #openGuideButton {
    margin-left: auto;
    align-self: flex-end;
    white-space: nowrap;
    text-align: right;
  }

  .schedule-panel,
  .booking-panel {
    padding: 20px;
  }

  #bossBookingOptions {
    padding: 12px;
  }

  #bossBookingOptions .field select,
  #bossBookingOptions .field input {
    width: 100%;
  }

  .modal__dialog {
    padding: 20px;
  }

  #guideModal {
    padding: 14px;
  }

  #guideModal .modal__dialog {
    width: min(100%, 680px);
    max-height: min(88vh, 760px);
    gap: 14px;
    padding: 16px;
  }

  #progressGalleryModal .modal__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "eyebrow eyebrow"
      "title close";
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
  }

  #progressGalleryModal .modal__header > div {
    display: contents;
  }

  #progressGalleryModal .modal__header .eyebrow {
    grid-area: eyebrow;
    margin-bottom: 0;
  }

  #guideModal .modal__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 8px;
  }

  #guideModal .modal__header > div {
    min-width: 0;
  }

  #guideModal .modal__header > div > p {
    margin: 0 0 2px;
  }

  #closeGuideButton {
    justify-self: end;
    align-self: end;
    margin: 0;
  }

  #guideModal .modal__intro {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  #guideInfoGrid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #guideInfoGrid > .guide-info-card {
    padding: 14px;
  }

  #guideInfoGrid > .guide-info-card .gallery-trigger--compact {
    width: 100%;
    justify-content: center;
  }

  #guideModal .guide-video-wrap,
  #guideModal .guide-video-wrap iframe {
    min-height: 180px;
  }

  #progressGalleryModalTitle {
    grid-area: title;
    min-width: 0;
  }

  #closeProgressGalleryButton {
    grid-area: close;
    justify-self: end;
    align-self: center;
    width: 33px;
    height: 33px;
    margin: 0;
  }

  #agreementModal .modal__dialog {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 8px;
  }

  #agreementModal .modal__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    position: static;
    align-items: end;
    column-gap: 8px;
    padding-right: 0;
  }

  #agreementModal .modal__header > div {
    min-width: 0;
  }

  #agreementModal .modal__header > div > p {
    margin: 0 0 2px;
  }

  #agreementModal .modal__header .modal__close {
    position: static;
    justify-self: end;
    align-self: end;
    margin: 0;
  }

  #agreementIntro {
    text-align: left;
    order: 4;
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
  }

  #agreementModal .agreement-summary {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  #agreementModal .agreement-summary__item {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    text-align: left;
    overflow: hidden;
  }

  #agreementModal .agreement-summary__item strong {
    display: inline-block;
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.3;
    text-align: left;
  }

  #agreementModal .modal__footer {
    order: 5;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 6px;
    align-items: start;
    justify-content: stretch;
    overflow-x: hidden;
  }

  #agreementConsent {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    max-width: 220px;
  }

  #agreementModal .agreement-consent {
    padding: 5px 8px;
  }

  #agreementHint,
  #agreementMessage {
    grid-column: 1 / -1;
  }

  #agreementHint {
    display: none;
  }

  #agreementModal .modal__actions {
    grid-column: 2;
    flex-direction: row;
    width: auto;
    min-width: 0;
    justify-self: end;
    align-items: center;
    justify-content: flex-end;
  }

  #agreementModal .modal__actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    max-width: 120px;
    min-height: auto;
    padding: 5px 8px;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
  }

  #agreementModal .modal__actions > #cancelAgreementButton {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  #agreementScrollArea {
    order: 3;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    padding: 12px;
  }

  #progressCard .progress-card__header > span {
    display: none;
  }

  #progressCard .progress-card__message {
    color: #1f4f8a;
  }

  .image-preview-shell {
    width: min(88vw, 1100px);
    max-width: 88vw;
    max-height: 80vh;
    padding: 34px 12px 12px;
  }

  .image-preview-note {
    top: 0;
    right: 4px;
    font-size: 0.78rem;
  }

  .day-card {
    gap: 8px;
    padding: 10px;
  }

  .slot-list {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .slot-button {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 0;
    padding: 12px 14px;
    border-radius: 18px;
    justify-self: stretch;
  }

  .slot-button__title {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .slot-button__subtitle,
  .slot-button__status {
    font-size: 0.76rem;
    line-height: 1.45;
  }

  .slot-button__subtitle {
    min-height: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .hero h1 {
    font-size: clamp(1rem, 5.4vw, 1.35rem);
    line-height: 1.12;
    text-wrap: pretty;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero__meta {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    justify-content: stretch;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .hero__meta > .meta-card {
    width: 100%;
    max-width: none;
  }

  .hero__meta > .meta-card:nth-child(3) {
    grid-column: auto;
  }

  #agreementModal .agreement-summary__item {
    height: 35px;
    min-height: 35px;
    padding: 6px 10px;
  }

  #agreementModal .agreement-summary > div:nth-child(4) {
    height: auto;
    min-height: 56px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .site-footer__inner {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .hero__topbar {
    gap: 10px;
  }

  .hero__actions {
    gap: 6px;
  }

  .slot-list {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .slot-button {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 0;
    padding: 12px;
    justify-self: stretch;
  }

  .slot-button__title {
    font-size: 0.84rem;
  }

  .slot-button__subtitle,
  .slot-button__status {
    font-size: 0.72rem;
  }

  .slot-button__subtitle {
    min-height: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .image-gallery-grid {
    gap: 10px;
  }

  .image-gallery-card {
    padding: 10px;
  }
}

/* Admin */
body.admin-page {
  font-family: "Noto Sans TC", system-ui, sans-serif;
  background: #0f1320;
  color: #e6e8f2;
  margin: 0;
  padding: 32px;
}

.is-hidden {
  display: none !important;
}

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-header h1 {
  margin: 0;
  font-size: 22px;
}

.admin-card {
  background: #1a1f30;
  border: 1px solid #2a3146;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.admin-login {
  max-width: 360px;
  margin: 80px auto;
}

.admin-login__title {
  margin: 0 0 16px;
  font-size: 18px;
}

.admin-login input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #2a3146;
  background: #0f1320;
  color: #e6e8f2;
  margin-bottom: 12px;
}

.admin-btn {
  background: #4f7cff;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  margin: 2px;
}

.admin-btn:hover {
  background: #6b91ff;
}

.admin-btn--full {
  width: 100%;
}

.admin-btn--danger {
  background: #d04444;
}

.admin-btn--danger:hover {
  background: #e25555;
}

.admin-btn--ghost {
  background: transparent;
  border: 1px solid #2a3146;
  color: #e6e8f2;
}

.admin-section-title {
  margin: 0 0 12px;
  font-size: 16px;
}

.admin-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tab {
  border: 1px solid #2a3146;
  background: #0f1320;
  color: #c6cee6;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.admin-tab.is-active {
  background: #4f7cff;
  border-color: #4f7cff;
  color: #fff;
}

.admin-pane {
  display: block;
}

.admin-pane__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-subtitle {
  margin: 0 0 8px;
  font-size: 13px;
  color: #8a91a8;
}

.admin-subtitle--plain {
  margin-bottom: 4px;
  color: #e6e8f2;
  font-size: 15px;
}

.admin-subtitle--spaced {
  margin-top: 14px;
}

.admin-inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-section-block {
  margin-bottom: 16px;
}

.admin-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.admin-actions-row--inline {
  margin-top: 0;
  align-items: center;
  flex-wrap: wrap;
}

.admin-small-number {
  width: 100px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #2a3146;
  background: #0f1320;
  color: #e6e8f2;
}

.admin-page table {
  width: 100%;
  border-collapse: collapse;
}

.admin-page th,
.admin-page td {
  padding: 10px 8px;
  border-bottom: 1px solid #2a3146;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.admin-page th {
  color: #8a91a8;
  font-weight: 500;
}

.admin-slot-toggle-cell {
  text-align: center !important;
  vertical-align: middle !important;
}

.admin-slot-toggle {
  position: relative;
  display: inline-flex;
  min-width: 56px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.admin-slot-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.admin-slot-toggle span {
  display: inline-flex;
  min-width: 56px;
  min-height: 34px;
  padding: 6px 10px;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  border: 1px solid #5b2d2d;
  background: #2a1d1d;
  color: #ffb3b3;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.admin-slot-toggle input:checked + span {
  border-color: #2e8d50;
  background: #183323;
  color: #95efb8;
}

.admin-page .status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.admin-page .status-pill--active {
  background: #1f3d2a;
  color: #6ee7a3;
}

.admin-page .status-pill--completed {
  background: #1f2d4a;
  color: #7aa8ff;
}

.admin-page .status-pill--invalid {
  background: #4a1f1f;
  color: #ff7a7a;
}

.shot-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 60px);
  gap: 6px;
}

.shot-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #2a3146;
  background: #0f1320;
}

.shot-thumbs img[data-error="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.empty {
  padding: 40px;
  text-align: center;
  color: #8a91a8;
}

.msg {
  margin: 12px 0;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
}

.msg--err {
  background: #4a1f1f;
  color: #ff9999;
}

.msg--ok {
  background: #1f3d2a;
  color: #8eebab;
}

.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.preview-overlay.show {
  display: flex;
}

.preview-overlay img {
  max-width: 90vw;
  max-height: 90vh;
}

.admin-textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a3146;
  background: #0f1320;
  color: #e6e8f2;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.7;
}

.admin-hint,
.admin-muted-small {
  color: #8a91a8;
  font-size: 12px;
  line-height: 1.6;
}

.admin-muted-small {
  font-size: 11px;
}

.admin-empty-inline {
  color: #666;
}

.boss-config-list {
  display: grid;
  gap: 14px;
}

.boss-card {
  border: 1px solid #2a3146;
  border-radius: 12px;
  padding: 16px;
  background: #0f1320;
}

.boss-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(120px, 0.6fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.boss-card__field {
  display: grid;
  gap: 6px;
  color: #c6cee6;
  font-size: 12px;
}

.boss-card__field input,
.boss-card__field select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #2a3146;
  background: #12192b;
  color: #e6e8f2;
}

.boss-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c6cee6;
  font-size: 12px;
  white-space: nowrap;
}

.boss-card__schedule {
  display: grid;
  gap: 10px;
}

.boss-card__schedule--secondary {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2a3146;
}

.boss-card__section-title {
  font-size: 13px;
  font-weight: 700;
  color: #e6e8f2;
}

.boss-slot-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 10px 12px;
  border-radius: 10px;
  background: #151d31;
}

.boss-slot-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.boss-slot-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c6cee6;
  font-size: 12px;
}

.boss-slot-row .admin-btn {
  width: 100%;
}

.boss-range-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.8fr) minmax(160px, 0.6fr);
  gap: 12px;
  align-items: end;
  padding: 10px 12px;
  border-radius: 10px;
  background: #151d31;
}

.boss-range-row .admin-btn {
  width: 100%;
}

.clipboard-helper {
  position: fixed;
  opacity: 0;
}

@media (max-width: 720px) {
  .admin-settings-header,
  .admin-pane__header,
  .boss-card__header,
  .boss-slot-row,
  .boss-range-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .boss-slot-options {
    gap: 12px;
  }
}
