:root {
  --pink: #d46a8f;
  --pink-dark: #b55073;
  --pink-light: #fbeaf1;
  --ink: #2b2230;
  --muted: #7a6d78;
  --line: #ecdfe6;
  --bg: #fff9fb;
  --card: #ffffff;
  --open: #3f9d63;
  --open-bg: #e8f7ee;
  --booked-bg: #f1eef0;
  --booked-fg: #a79ba4;
  --danger: #c94b4b;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
}

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

header.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

header.top h1 {
  font-size: 1.4rem;
  margin: 0;
  color: var(--pink-dark);
}

header.top .sub {
  color: var(--muted);
  font-size: 0.85rem;
}

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

h2 {
  font-size: 1.05rem;
  margin: 0 0 12px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 12px 0 4px;
}

label:first-child {
  margin-top: 0;
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="password"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}

button {
  font-family: inherit;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  background: var(--pink);
  color: #fff;
}

button:hover {
  background: var(--pink-dark);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary {
  background: var(--pink-light);
  color: var(--pink-dark);
}

button.secondary:hover {
  background: #f6d9e5;
}

button.danger {
  background: var(--danger);
}

button.link {
  background: none;
  color: var(--pink-dark);
  padding: 4px 0;
  text-decoration: underline;
}

.row {
  display: flex;
  gap: 10px;
}

.row > * {
  flex: 1;
}

.error {
  background: #fdecec;
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
  margin: 10px 0;
}

.notice {
  background: #fff6e5;
  color: #7a5a10;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin: 10px 0;
}

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.slot {
  padding: 10px 4px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.slot.open {
  background: var(--open-bg);
  color: var(--open);
  border-color: #cdeedb;
  cursor: pointer;
}

.slot.open:hover {
  background: #d9f3e3;
}

.slot.booked {
  background: var(--booked-bg);
  color: var(--booked-fg);
  cursor: default;
}

.slot.selected {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink-dark);
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px 0;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tabs button {
  background: var(--pink-light);
  color: var(--pink-dark);
  flex: 1;
  padding: 9px 6px;
  font-size: 0.85rem;
}

.tabs button.active {
  background: var(--pink);
  color: #fff;
}

.booking-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.booking-item:last-child {
  border-bottom: none;
}

.booking-item .meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.weekday-block {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.weekday-block:last-child {
  border-bottom: none;
}

.weekday-block h3 {
  font-size: 0.9rem;
  margin: 0 0 8px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.range-row input[type="time"] {
  width: auto;
  flex: 1;
}

.icon-btn {
  background: none;
  color: var(--danger);
  padding: 4px 8px;
  font-size: 1rem;
}

.phrase-display {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--pink-light);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  margin: 10px 0;
  word-break: break-word;
}

.link-display {
  font-size: 0.85rem;
  background: #f4f4f4;
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
  margin: 8px 0;
}

.center {
  text-align: center;
}

footer.foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 24px;
}
