/* ===========================================================
   JP resort トライク予約 — デザイントークンは本サイト globals.css と共通
   =========================================================== */
:root {
  --night: #0a0f17;
  --night-2: #0e1622;
  --surface: #131e2c;
  --surface-2: #1f2c3d;
  --mist: #eef1f5;
  --muted: #9fb0c0;
  --faint: #61788e;
  --gold: #c8a96a;
  --gold-soft: #ddc89c;
  --gold-deep: #a98948;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --danger: #d98a8a;
  --font-sans: "Noto Sans JP", system-ui, sans-serif;
  --font-serif: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--night);
  color: var(--mist);
  font-family: var(--font-sans);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
}

::selection { background: var(--gold); color: var(--night); }

.font-serif {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* 星空 */
.bg-stars {
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.35), transparent);
  background-repeat: repeat;
  background-size: 600px 600px;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 9rem;
}

/* ---- ヘッダー ---- */
.page-head { text-align: center; margin-bottom: 2.25rem; }
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.page-title { font-size: 1.7rem; line-height: 1.4; }
.page-lead { margin-top: 0.9rem; font-size: 0.82rem; color: var(--muted); }

/* ---- ステップインジケーター ---- */
.steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  user-select: none;
}
.steps .st {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.steps .st + .st::before {
  content: "";
  display: block;
  flex: none;
  width: 1.1rem;
  height: 1px;
  background: var(--line-strong);
  margin: 0 0.45rem;
}
.steps .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none; /* 横幅が詰まっても円が縦長に潰れないよう縮小を禁止 */
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.7rem;
  font-family: var(--font-serif);
  transition: all 0.3s;
}
.steps .st.active { color: var(--gold); }
.steps .st.active .num { border-color: var(--gold); color: var(--gold); }
.steps .st.done .num {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}
.steps .label { display: none; white-space: nowrap; }
.steps .st.active .label { display: inline; }
@media (min-width: 480px) {
  .steps .label { display: inline; }
}

/* ---- パネル（ステップ画面） ---- */
.panel { display: none; }
.panel.active { display: block; animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
/* 「戻る」で表示されたパネルは左からスライドイン */
.panel.active.from-back { animation-name: slideInBack; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInBack {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}

.panel-title {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  text-align: center;
}
.panel-note {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.6rem;
}

/* ---- プランカード ---- */
.plan-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 0.9rem;
  cursor: pointer;
  color: var(--mist);
  font-family: var(--font-sans);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.plan-card:hover { border-color: var(--gold-deep); }
.plan-card.selected {
  border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(200, 169, 106, 0.15);
}
.plan-card .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.plan-card .name { font-family: var(--font-serif); font-size: 1.1rem; }
.plan-card .price {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--gold);
  white-space: nowrap;
}
.plan-card .price small { font-size: 0.7rem; color: var(--muted); margin-left: 0.2rem; }
.plan-card .meta { margin-top: 0.35rem; font-size: 0.75rem; color: var(--muted); }

/* ---- カレンダー ---- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.cal-title { font-family: var(--font-serif); font-size: 1.05rem; letter-spacing: 0.05em; }
.cal-nav {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--mist);
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}
.cal-nav:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.cal-nav:disabled { opacity: 0.25; cursor: default; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}
.cal-grid .dow {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--faint);
  padding-bottom: 0.4rem;
}
.cal-grid .dow.sat { color: #8fa9c9; }
.cal-grid .dow.sun { color: var(--danger); }

.cal-day {
  aspect-ratio: 1 / 1.05;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  transition: all 0.25s;
  padding: 0;
}
.cal-day .mark { font-size: 0.72rem; color: var(--gold); line-height: 1.2; }
.cal-day.full .mark, .cal-day.closed .mark { color: var(--faint); }
.cal-day.today .mark { color: var(--muted); font-size: 0.62rem; }
.cal-day:hover:not(:disabled) { border-color: var(--gold-deep); }
.cal-day.selected {
  border-color: var(--gold);
  background: var(--surface-2);
  box-shadow: 0 4px 18px rgba(200, 169, 106, 0.18);
}
.cal-day:disabled {
  opacity: 0.35;
  cursor: default;
  background: transparent;
}
.cal-day.empty {
  visibility: hidden;
}

.cal-legend {
  margin-top: 0.8rem;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
}
.cal-legend .g { color: var(--gold); }
.cal-legend .t { color: var(--muted); }

.today-notice {
  margin-top: 1rem;
  background: rgba(200, 169, 106, 0.06);
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}
.today-notice strong { color: var(--gold); font-weight: 500; }

/* ---- 時間スロット ---- */
.time-block { margin-top: 1.8rem; }
.time-title {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  text-align: center;
}
.time-title strong { color: var(--gold); font-weight: 500; }
.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.time-slot {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0.7rem 0.2rem;
  cursor: pointer;
  transition: all 0.25s;
  line-height: 1.5;
}
.time-slot .mk { display: block; font-size: 0.72rem; color: var(--gold); }
.time-slot:hover:not(:disabled) { border-color: var(--gold-deep); }
.time-slot.selected {
  border-color: var(--gold);
  background: var(--surface-2);
  box-shadow: 0 4px 18px rgba(200, 169, 106, 0.18);
}
.time-slot:disabled { opacity: 0.35; cursor: default; }
.time-slot:disabled .mk { color: var(--faint); }

/* ---- オプション ---- */
.opt-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.3rem;
  margin-bottom: 0.8rem;
  cursor: pointer;
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.3s;
  text-align: left;
}
.opt-card:hover:not(:disabled) { border-color: var(--gold-deep); }
.opt-card.selected {
  border-color: var(--gold);
  box-shadow: 0 6px 24px rgba(200, 169, 106, 0.15);
}
.opt-card:disabled { opacity: 0.4; cursor: default; }
.opt-card .oprice { color: var(--gold); font-family: var(--font-serif); white-space: nowrap; }
.opt-card .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  margin-right: 0.85rem;
  font-size: 0.7rem;
  color: transparent;
  transition: all 0.25s;
  flex: none;
}
.opt-card.selected .check {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}
.opt-left { display: flex; align-items: center; }
.opt-note { font-size: 0.7rem; color: var(--muted); display: block; }

/* ---- フォーム ---- */
.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.field label .req {
  color: var(--gold);
  font-size: 0.65rem;
  margin-left: 0.4rem;
  letter-spacing: 0.1em;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="date"],
.field input[type="number"],
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 16px; /* iOSズーム防止 */
  transition: border-color 0.3s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field .err {
  display: none;
  font-size: 0.72rem;
  color: var(--danger);
  margin-top: 0.3rem;
}
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .err { display: block; }

/* 決済方法 */
.pay-card {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin-bottom: 0.7rem;
  cursor: pointer;
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.3s;
  text-align: left;
}
.pay-card:hover { border-color: var(--gold-deep); }
.pay-card.selected {
  border-color: var(--gold);
  box-shadow: 0 6px 24px rgba(200, 169, 106, 0.15);
}
.pay-card .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  margin-right: 0.85rem;
  font-size: 0.7rem;
  color: transparent;
  flex: none;
  transition: all 0.25s;
}
.pay-card.selected .check {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}
.pay-card .pnote { font-size: 0.7rem; color: var(--muted); display: block; }

/* 同意チェック */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 1.4rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}
.agree-row input {
  margin-top: 0.35rem;
  accent-color: var(--gold);
  width: 1rem;
  height: 1rem;
}
.agree-row a { color: var(--gold); text-decoration: none; }
.agree-row a:hover { text-decoration: underline; }

/* ---- 最終確認の注意文 ---- */
.confirm-notice {
  background: rgba(200, 169, 106, 0.08);
  border: 1px solid rgba(200, 169, 106, 0.35);
  border-radius: 0.5rem;
  padding: 0.95rem 1.15rem;
  font-size: 0.78rem;
  color: var(--gold-soft);
  line-height: 1.8;
  margin-bottom: 1.6rem;
}

/* ---- 確認サマリー ---- */
.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.8rem;
}
.summary h3 {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.summary .srow {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.summary .srow:last-child { border-bottom: none; }
.summary .sk { color: var(--muted); flex: none; }
.summary .sv { text-align: right; }
.summary .total {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.1rem;
}

/* ---- ボタン ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  border-radius: 0;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.3s;
}
.btn-primary {
  background: var(--gold);
  color: var(--night);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-soft);
  box-shadow: 0 8px 30px rgba(200, 169, 106, 0.25);
}
.btn-primary:disabled { opacity: 0.4; cursor: default; }
.btn-ghost {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--mist);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---- 下部固定バー ---- */
.foot-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 22, 34, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 0.9rem 1.25rem calc(0.9rem + env(safe-area-inset-bottom));
  z-index: 50;
}
.foot-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.foot-total { flex: 1; line-height: 1.4; }
.foot-total .tl { font-size: 0.65rem; letter-spacing: 0.15em; color: var(--muted); }
.foot-total .tv {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold);
}
.foot-total .tv small { font-size: 0.7rem; color: var(--muted); }

/* ---- 完了画面・通知 ---- */
.done-box { text-align: center; padding: 3rem 0; }
.done-box .mark-circle {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.6rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.5rem;
}
.done-box h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.done-box .code {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin: 1.2rem 0;
}
.done-box p { font-size: 0.85rem; color: var(--muted); }

.alert {
  background: rgba(217, 138, 138, 0.08);
  border: 1px solid rgba(217, 138, 138, 0.35);
  color: var(--danger);
  border-radius: 0.5rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.82rem;
  margin-bottom: 1.4rem;
  display: none;
}
.alert.show { display: block; }

.loading { opacity: 0.55; pointer-events: none; }

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(10, 15, 23, 0.3);
  border-top-color: var(--night);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panel.active { animation: none; }
}

/* ---- PC（大画面）は全体的に文字を大きくして視認性を確保 ---- */
@media (min-width: 768px) {
  body { font-size: 16.5px; }
  .wrap { max-width: 720px; }
  .page-title { font-size: 2rem; }
  .eyebrow { font-size: 0.76rem; }
  .steps .st { font-size: 0.82rem; }
  .panel-title { font-size: 1.4rem; }
  .panel-note { font-size: 0.9rem; }
  .plan-card .name { font-size: 1.25rem; }
  .plan-card .price { font-size: 1.3rem; }
  .plan-card .meta { font-size: 0.85rem; }
  .cal-title { font-size: 1.2rem; }
  .cal-day { font-size: 0.95rem; }
  .field label { font-size: 0.88rem; }
  .btn { font-size: 0.95rem; }
  .summary .srow { font-size: 0.95rem; }
  .summary .total { font-size: 1.1rem; }
}
