/* ===== CSS Custom Properties ===== */
:root {
  --bg:       #FAF7F2;
  --primary:  #8B7355;
  --accent:   #C4956A;
  --text:     #3D3530;
  --card-bg:  #FFFFFF;
  --border:   #E8DDD0;
  --done:     #A8C5A0;
  --danger:   #C97B6B;
  --shadow:   0 2px 8px rgba(61,53,48,0.08);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ===== App Shell ===== */
.app {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ===== Header ===== */
.header {
  background: var(--primary);
  color: #fff;
  padding: 16px 20px 12px;
  text-align: center;
}
.header h1 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.header .subtitle {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 2px;
}

/* ===== Step Indicator ===== */
.step-indicator {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: #aaa;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.step-dot.active {
  background: var(--accent);
  color: #fff;
}
.step-dot.done {
  background: var(--done);
  color: #fff;
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.2s;
}
.step-line.done {
  background: var(--done);
}

/* ===== Screen / Content ===== */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 20px 16px;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}
.screen.active {
  display: flex;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.screen-sub {
  font-size: 12px;
  color: #888;
  margin-top: -8px;
  margin-bottom: 4px;
}

/* ===== Cards ===== */
.card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.card:hover, .card:active {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.card.selected {
  border-color: var(--accent);
  background: #FFF8F2;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.card-desc {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  line-height: 1.5;
}
.card-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* ===== Price Badge ===== */
.price-badge {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.price-unit {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}

/* ===== Tag ===== */
.tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.tag-personal  { background: #F0EBE3; color: var(--primary); }
.tag-group     { background: #E8F0E8; color: #5A7D5A; }
.tag-massage   { background: #F0E8F0; color: #7D5A7D; }
.tag-first     { background: #FFF0E0; color: #C4956A; }

/* ===== Buttons ===== */
.btn-primary {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.05em;
}
.btn-primary:hover  { background: #b5834f; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: var(--border);
  color: #aaa;
  cursor: default;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  opacity: 0.8;
}
.btn-back:hover { opacity: 1; }

/* ===== Confirm Box ===== */
.confirm-box {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-label { color: #888; }
.confirm-value { font-weight: 600; color: var(--text); text-align: right; }

/* ===== Notice ===== */
.notice {
  background: #FFF8F2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #888;
  line-height: 1.6;
}

/* ===== Success ===== */
.success-icon {
  font-size: 52px;
  text-align: center;
  display: block;
  margin: 8px 0;
}
.success-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: var(--primary);
}
.success-sub {
  font-size: 13px;
  text-align: center;
  color: #888;
  line-height: 1.6;
}

/* ===== Index Page ===== */
.plan-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.plan-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.plan-card .plan-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}
.plan-card .plan-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.plan-card .plan-flow {
  font-size: 12px;
  color: #888;
  line-height: 1.6;
}
.plan-card .plan-arrow {
  text-align: right;
  font-size: 18px;
  color: var(--accent);
  margin-top: 8px;
}

/* ===== Spacer ===== */
.spacer { flex: 1; }

/* ===== Frequency Grid ===== */
.freq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ===== Recommended Badge ===== */
.recommended {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}
