/* ------------------------------------------------------------
   Otina お客様PWA（スマホ縦向きが前提）
   色は LP とそろえる：生成り・墨・グレージュ
------------------------------------------------------------ */
:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #2f2b28;
  --ink-soft: #6d655e;
  --accent: #a3907e;
  --line: #d9d1c6;
  --danger: #a6463a;
  --serif-en: 'Cormorant Garamond', 'Shippori Mincho', serif;
  --serif-ja: 'Shippori Mincho', serif;
  --sans: 'Noto Sans JP', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
h1, p, dl, dd { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.screen {
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.screen-mark { align-self: center; }
/* 前の画面へのリンク（ホーム画面の PWA には「戻る」がないため） */
.back-link {
  align-self: flex-start;
  padding: 8px 4px;
  margin: -8px 0 -12px -4px;   /* ロゴとの間を少し詰める */
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
}
.screen-title {
  text-align: center;
  font-family: var(--serif-ja);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.15em;
}
.screen-lead { text-align: center; color: var(--ink-soft); font-size: 13px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.price { font-family: var(--serif-en); font-size: 40px; line-height: 1.2; text-align: center; }
.price small { font-family: var(--sans); font-size: 13px; margin-left: 4px; }
.note {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.8;
}
.center { text-align: center; }

.agree {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}
.agree input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

.btn {
  display: inline-block;
  padding: 15px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: .35; cursor: default; }
.btn-block {
  width: 100%;
  margin-bottom: 10px;
}
#payment-element { margin-bottom: 18px; }

.message {
  font-size: 13px;
  color: var(--danger);
  background: #f6e9e6;
  border-radius: 8px;
  padding: 10px 14px;
}
.message.info { color: var(--ink); background: #efeae2; }

.pass { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.pass dt { color: var(--ink-soft); }
.pass dd { text-align: right; font-weight: 500; }

/* 入口 */
.steps { margin: 0 0 18px; padding-left: 1.4em; font-size: 14px; line-height: 1.9; }
.steps strong { font-weight: 500; }
.btn-outline { background: transparent; color: var(--ink); }
.confirm {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 10px;
}
.confirm-question { text-align: center; font-size: 15px; font-weight: 500; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.confirm-actions .btn { padding: 13px 8px; letter-spacing: 0.06em; }

/* 困った時 */
.help { gap: 12px; }
.help-title { font-size: 14px; font-weight: 500; }
.help strong { font-weight: 500; letter-spacing: 0.08em; }

/* 入力 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-size: 13px; color: var(--ink-soft); }
.field input {
  font: inherit;
  font-size: 18px;              /* 16px 未満だと iPhone で拡大される */
  letter-spacing: 0.08em;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.field input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

/* 予約 */
.booking { align-items: center; gap: 4px; }
.booking-label { font-size: 12px; color: var(--ink-soft); letter-spacing: 0.2em; }
.booking-time { font-size: 20px; font-weight: 500; letter-spacing: 0.06em; }
.link { background: none; border: none; padding: 4px; font: inherit; font-size: 12px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }

/* どの画面でも一番下 */
.app-footer { max-width: 440px; margin: 0 auto; padding: 0 20px 40px; }

.wait-note { margin: -6px 0 16px; padding: 10px 12px; background: #efeae2; border-radius: 8px; color: var(--ink); }
.wait-note strong { font-weight: 500; }

/* 注意書き（お支払いの前） */
.notice { margin: 0 0 16px; padding: 12px 14px 12px 30px; background: #efeae2; border-radius: 8px; font-size: 12px; line-height: 1.8; }
.notice li + li { margin-top: 4px; }

/* 通知のカード（入口の画面・全画面で出す） */
.push-card {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100dvh;
  padding: 10px;
  overflow-y: auto;            /* 小さい画面・文字を大きくしている時もはみ出さない */
  overscroll-behavior: contain;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  /* 表示・非表示をふわっと切りかえる
     ・開く時：@starting-style（透明）→ 今の色
     ・閉じる時：今の色 → [hidden] の透明。allow-discrete で、消え終わるまで display: none を待つ */
  transition:
    background-color .3s,
    display .3s allow-discrete;
}
.push-card[hidden] {
  display: none;               /* 上の display: flex より hidden を優先（カード自身） */
  background-color: transparent;
  pointer-events: none;        /* 消えている途中（0.3秒）に押せないように */
}
@starting-style {
  .push-card { background-color: transparent; }
}
.push-card .innerline {
  width: 100%;
  max-width: 400px;
  margin: auto 0;              /* 中身が画面より高い時は上から並べる（center だと上が切れる） */
  box-shadow: 0 8px 30px rgb(47 43 40 / .12);
  transition: opacity .3s, translate .3s;   /* 内側のカードも一緒に（少し下から浮かび上がる） */
}
.push-card[hidden] .innerline { opacity: 0; translate: 0 12px; }
@starting-style {
  .push-card .innerline { opacity: 0; translate: 0 12px; }
}
.push-card [data-push-state] { display: flex; flex-direction: column; gap: 10px; }
.push-card .agree { margin-bottom: 0; }
.push-card .link { align-self: flex-start; padding-left: 0; margin-left: auto; }
.push-card [hidden] { display: none; }   /* 上の display: flex より hidden を優先（中身） */
.push-open { display: block; margin: 12px auto 0; }
body.is-modal-open { overflow: hidden; }   /* 開いている間は後ろをスクロールさせない */

/* 残り時間（ロッカーの画面）：秒単位＋ゲージ。残り10分から色を変える */
.remaining { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.remaining-head { display: flex; justify-content: space-between; align-items: baseline; }
.remaining-label { font-size: 13px; color: var(--ink-soft); }
.remaining-time {
  font-family: var(--serif-en);
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.04em;
  /* Cormorant Garamond の数字は「オールドスタイル」（3・4 が下にはみ出す形）なので、
     lining-nums で高さをそろえる。tabular-nums で幅もそろえる（秒が変わるたびに横に揺れないように） */
  font-variant-numeric: lining-nums tabular-nums;
  transition: color .3s;
}
.remaining-time.is-soon { color: var(--danger); }
.gauge { height: 6px; border-radius: 999px; background: #efeae2; overflow: hidden; }
.gauge-bar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 1s linear, background-color .3s;   /* 1秒ごとの変化をなめらかに */
}
.gauge.is-soon .gauge-bar { background: var(--danger); }

/* パスの出し直し（お支払いの画面）：コードで受け取る */
.claim { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.claim summary { font-size: 13px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; text-align: center; list-style: none; }
.claim summary::-webkit-details-marker { display: none; }
.claim[open] summary { margin-bottom: 12px; }
#claim-code { letter-spacing: 0.4em; font-size: 22px; text-align: center; }

/* お連れの方（同行者）の QR（ロッカーの画面） */
.invite-group { display: flex; flex-direction: column; gap: 16px; }
.invite-group[hidden] { display: none; }
.invite-ill { width: 100%; height: auto; display: block; font-family: var(--sans); }
.invite-qr { align-self: center; width: min(220px, 70vw); aspect-ratio: 1; background: #fff; border-radius: 8px; }
.invite-qr svg { display: block; width: 100%; height: 100%; }
.invite [hidden] { display: none; }

/* QR を読む（アプリの中のカメラ） */
.scanner {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  background: #1d1a18; color: #f7f4ef;
}
.scanner[hidden] { display: none; }
.scanner-view { position: relative; width: min(320px, 86vw); aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #000; }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-frame { position: absolute; inset: 14%; border: 2px solid rgba(247, 244, 239, .85); border-radius: 10px; }
.scanner-note { font-size: 13px; text-align: center; line-height: 1.8; }
.scanner-close { color: #f7f4ef; border-color: rgba(247, 244, 239, .6); min-width: 160px; }

/* クーポン（お支払いの画面） */
.coupon { margin: 0 0 16px; padding: 0 0 14px; border-top: none; border-bottom: 1px solid var(--line); }
.coupon summary { text-align: left; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; background: #efeae2; border-radius: 8px; font-size: 13px; }
.coupon-applied[hidden], .coupon [hidden] { display: none; }
.price-original { text-align: center; font-size: 13px; color: var(--ink-soft); margin-bottom: -8px; }
.price-coupon { text-align: center; font-size: 12px; color: var(--accent); letter-spacing: 0.04em; }
.price-coupon[hidden], .price-original[hidden] { display: none; }

/* 404（アプリ） */
.notfound-links { display: flex; flex-direction: column; gap: 10px; }
