:root {
  --line: #06c755;
  --line-dark: #04a947;
  --ink: #101714;
  --sub: #66726d;
  --weak: #8b9691;
  --bg: #eef3f0;
  --paper: #ffffff;
  --soft: #f6f8f7;
  --soft-green: #e8f8ef;
  --border: #dbe5df;
  --border-strong: #bfd0c7;
  --danger: #b74b55;
  --danger-bg: #fff0f1;
  --amber: #b36a1d;
  --amber-bg: #fff4e6;
  --radius: 8px;
  --shadow: 0 18px 46px rgba(17, 35, 27, 0.13);
}
[hidden] {
  display: none !important;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }

.phone {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.96);
}
.topbar__title { min-width: 0; }
.topbar__title strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar__title span {
  display: block;
  margin-top: 1px;
  color: var(--weak);
  font-size: 11px;
  font-weight: 700;
}
.topbar__close {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--sub);
}
.topbar__close svg { width: 18px; height: 18px; }

.screen {
  display: none;
  min-height: calc(100vh - 56px);
  background: var(--bg);
}
.screen.is-active { display: block; }
.content { padding: 14px 14px 104px; }

.hero {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
}
.hero__visual {
  position: relative;
  min-height: 184px;
  padding: 20px;
  background:
    linear-gradient(140deg, rgba(6,199,85,0.92), rgba(13,129,85,0.86)),
    url("salon_logo.png") center / 72% auto no-repeat;
  color: #fff;
}
.hero__visual::after {
  position: absolute;
  inset: auto 18px 18px auto;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  content: "";
}
.hero__tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  font-size: 12px;
  font-weight: 800;
}
.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 286px;
  margin: 22px 0 0;
  font-size: 29px;
  line-height: 1.28;
  letter-spacing: 0;
}
.hero__lead {
  position: relative;
  z-index: 1;
  max-width: 292px;
  margin: 12px 0 0;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}
.hero__body { padding: 18px; }
.service-card {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.service-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.service-card li:last-child { border-bottom: 0; }
.service-card span {
  color: var(--sub);
  font-size: 13px;
  font-weight: 700;
}
.service-card strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-align: right;
}
.menu-section {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--paper);
}
.menu-section h2 {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: 0;
}
.menu-list {
  display: grid;
  gap: 10px;
}
.menu-card {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.menu-card.is-selected {
  border-color: var(--line);
  background: var(--soft-green);
  box-shadow: inset 0 0 0 1px var(--line);
}
.menu-card strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}
.menu-card span {
  display: block;
  margin-top: 5px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}
.menu-card small {
  display: block;
  margin-top: 8px;
  color: var(--line-dark);
  font-size: 12px;
  font-weight: 800;
}

.fixed-action {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.98);
}
.primary, .secondary, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border-radius: var(--radius);
  font-weight: 800;
  letter-spacing: 0;
}
.primary { background: var(--line); color: #fff; }
.primary:active { background: var(--line-dark); }
.secondary {
  border: 1px solid var(--border-strong);
  background: var(--paper);
  color: var(--ink);
}
.text-button {
  width: auto;
  min-height: 36px;
  padding: 0 4px;
  background: transparent;
  color: var(--sub);
  font-size: 14px;
}

.step {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 2px 16px;
}
.step__item {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--weak);
  font-size: 11px;
  font-weight: 800;
}
.step__dot {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--paper);
  color: inherit;
  font-size: 12px;
}
.step__item.is-current,
.step__item.is-done { color: var(--line-dark); }
.step__item.is-current .step__dot,
.step__item.is-done .step__dot {
  border-color: var(--line);
  background: var(--line);
  color: #fff;
}

.page-title {
  margin: 2px 0 14px;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 0;
}
.loading {
  display: grid;
  min-height: calc(100vh - 56px);
  place-items: center;
  padding: 28px;
  text-align: center;
}
.spinner, .mini-spinner {
  border: 4px solid #dff4e8;
  border-top-color: var(--line);
  border-radius: 50%;
  animation: spin 0.82s linear infinite;
}
.spinner { width: 58px; height: 58px; margin: 0 auto 18px; }
.mini-spinner { width: 18px; height: 18px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading h2 { margin: 0; font-size: 21px; letter-spacing: 0; }
.loading p {
  margin: 8px 0 0;
  color: var(--sub);
  font-size: 13px;
  font-weight: 700;
}

.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #f0d2a5;
  border-radius: var(--radius);
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}
.week-nav {
  display: grid;
  grid-template-columns: 82px 1fr 82px;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}
.week-nav__button {
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.week-nav__button:disabled {
  border-color: var(--border);
  background: #f3f6f4;
  color: var(--weak);
}
.week-nav__range {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}
.availability-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--paper);
}
.availability-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}
.availability-card__head strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}
.availability-card__head span {
  display: block;
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
}
.availability-legend {
  flex: 0 0 auto;
  color: var(--sub);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.7;
  text-align: right;
}
.availability-grid {
  display: grid;
  grid-template-columns: 49px repeat(7, minmax(37px, 1fr));
  width: 100%;
}
.availability-cell {
  display: grid;
  place-items: center;
  min-height: 43px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}
.availability-cell:nth-child(8n) { border-right: 0; }
.availability-cell.is-head {
  min-height: 54px;
  background: var(--soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}
.availability-cell.is-head span { display: block; }
.availability-cell.is-head small {
  color: var(--sub);
  font-size: 10px;
  font-weight: 700;
}
.availability-cell.is-time {
  background: var(--soft);
  color: var(--sub);
  font-size: 12px;
  font-weight: 800;
}
.availability-button {
  width: 100%;
  height: 100%;
  min-height: 43px;
  background: transparent;
  color: var(--line-dark);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}
.availability-button.is-open:active { background: var(--soft-green); }
.availability-button.is-booked { color: var(--weak); }
.availability-button:disabled { background: #f7f8f7; }

.form-card, .complete-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--paper);
}
.selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--soft-green);
}
.selected span {
  display: block;
  color: var(--sub);
  font-size: 12px;
  font-weight: 800;
}
.selected strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}
.selected em {
  display: block;
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.fields {
  display: grid;
  gap: 14px;
  padding: 16px;
}
.field { display: grid; gap: 7px; }
.field label, .payment-field legend {
  font-size: 13px;
  font-weight: 800;
}
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: 0;
}
.field input { height: 48px; padding: 0 13px; }
.field textarea {
  min-height: 86px;
  padding: 12px 13px;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: var(--line);
  box-shadow: 0 0 0 4px rgba(6,199,85,0.13);
}
.payment-field {
  display: grid;
  gap: 9px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}
.payment-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.payment-option input { margin-top: 4px; accent-color: var(--line); }
.payment-option strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}
.payment-option small {
  display: block;
  margin-top: 3px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.confirming {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 16px 16px;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--sub);
  font-size: 12px;
  font-weight: 800;
}
.confirming.is-visible { display: flex; }
.complete-card {
  padding: 28px 18px 20px;
  text-align: center;
}
.complete-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--soft-green);
  color: var(--line-dark);
}
.complete-mark svg { width: 38px; height: 38px; }
.complete-card h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}
.complete-summary {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--soft);
  text-align: left;
}
.complete-summary div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: start;
}
.complete-summary dt {
  color: var(--sub);
  font-size: 13px;
  font-weight: 800;
}
.complete-summary dd {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  word-break: break-word;
}
.toast {
  position: fixed;
  right: 14px;
  bottom: 86px;
  left: 14px;
  z-index: 8;
  width: min(calc(100% - 28px), 402px);
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid #f0c6cb;
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 430px) {
  .phone { width: 100%; box-shadow: none; }
}
