:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1c2128;
  --muted: #6b7280;
  --accent: #1f9d55;
  --accent-hover: #178241;
  --accent-bg: #f1faf4;
  --danger: #c0392b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}
header.site .inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
header.site h1 { font-size: 17px; margin: 0; }
header.site .sub { font-size: 12px; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

h2 { font-size: 15px; margin: 0 0 12px; }
h2 .step {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  border-radius: 999px;
  padding: 1px 9px;
  margin-right: 8px;
  vertical-align: 1px;
}

p.note { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

button, .btn {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  transition: background .12s, border-color .12s;
}
button:hover:not(:disabled) { border-color: #c8cdd6; }
button:disabled { opacity: .45; cursor: default; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  width: 100%;
  padding: 13px;
}
.btn-primary:hover:not(:disabled) { background: #178241; border-color: #178241; }

.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 8px; }
.btn-danger { color: var(--danger); border-color: #f0d3cf; background: #fff; }

.choice-list { display: grid; gap: 8px; }
.choice {
  text-align: left;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.choice[aria-selected='true'] { border-color: var(--accent); background: #f1faf4; }
.choice .chev { color: var(--muted); font-weight: 400; }

.date-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}
.date-tab {
  flex: 0 0 auto;
  min-width: 62px;
  text-align: center;
  padding: 8px 6px;
  line-height: 1.3;
}
.date-tab .d { font-size: 15px; font-weight: 700; }
.date-tab .w { font-size: 11px; color: var(--muted); }
.date-tab[aria-selected='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
.date-tab[aria-selected='true'] .w { color: #d9f2e3; }
.date-tab:disabled { opacity: .35; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot { padding: 12px 4px; font-weight: 600; text-align: center; }
.slot[aria-selected='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }

label.field { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type='text'], input[type='password'], input[type='time'], select {
  font: inherit;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, button:focus-visible {
  outline: 2px solid #9ad4b3;
  outline-offset: 1px;
}

.summary { background: #f1faf4; border: 1px solid #cdead9; border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }

.msg { border-radius: 10px; padding: 11px 13px; font-size: 14px; margin-bottom: 12px; }
.msg-error { background: #fdeceb; border: 1px solid #f4c7c2; color: #8d2b20; }
.msg-info { background: #eef4fd; border: 1px solid #cfe0f7; color: #24486f; }
.msg-ok { background: #f1faf4; border: 1px solid #cdead9; color: #1c6b3d; }

.empty { color: var(--muted); font-size: 14px; padding: 16px 0; text-align: center; }
.loading { color: var(--muted); font-size: 14px; padding: 12px 0; }

.booking-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.booking-row .when { font-weight: 700; }
.booking-row .who { font-size: 13px; color: var(--muted); }

.hidden { display: none !important; }

.hours-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.hours-row select { width: auto; }
.hours-row input[type='time'] { width: auto; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
table.list th { color: var(--muted); font-weight: 600; font-size: 12px; }

footer.note { font-size: 12px; color: var(--muted); text-align: center; padding: 8px 0 0; }
footer.note a { color: var(--accent); }
