@charset "UTF-8";
/* ============================================================
   ひとひら整骨院 デジタル診察券 — 患者さま向け画面スタイル

   配色・書体は hitohira-seikotsuin.jp に合わせています。
   ▼ 色を変えたいときは、この :root の中の値だけ書き換えてください。
   ============================================================ */

:root {
  /* ブランドカラー（HPのロゴマーク＝ターコイズ／ボタン＝エメラルドグリーン） */
  --teal:       #3AAFA3;
  --teal-deep:  #2C8F86;
  --green:      #4CAE86;
  --green-deep: #388F6D;

  /* HPの見出し帯で使われている濃紺 */
  --navy:       #12384B;

  /* 文字・背景 */
  --ink:        #2A403C;
  --ink-soft:   #55706A;
  --muted:      #8CA49D;
  --paper:      #F1F8F3;   /* HPのヒーローと同じ淡いミント */
  --card:       #FFFFFF;
  --chip:       #DDEFE4;
  --hairline:   #DDEBE3;

  /* 粗品対象のときのアクセント */
  --gold:       #C09A45;
  --gold-soft:  #FBF5E7;

  --radius:     20px;
  --shadow:     0 1px 3px rgba(18,56,75,.04), 0 14px 34px rgba(18,56,75,.07);
  --shadow-sm:  0 1px 2px rgba(18,56,75,.05), 0 4px 14px rgba(18,56,75,.05);

  --font-min:  "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --font-body: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont,
               "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-min);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* 背景にHPと同じ、ごく薄い曲線のあしらい */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  background:
    radial-gradient(120% 70% at 110% -10%, rgba(58,175,163,.10), transparent 60%),
    radial-gradient(110% 60% at -20% 108%, rgba(76,174,134,.10), transparent 60%);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 auto;
  padding: 22px 18px 46px;
}

/* ---------- ヘッダー ---------- */
.brand { text-align: center; padding: 6px 0 22px; }
.brand__logo {
  height: 52px;
  width: auto;
  max-width: 80%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.brand__mark { margin: 0 auto 8px; display: block; }
.brand__name {
  font-family: var(--font-min);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .14em;
  margin: 0;
  color: var(--teal-deep);
}
.brand__en {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 5px 0 0;
  padding-left: .34em;
}
.brand__sub {
  font-family: var(--font-min);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--muted);
  margin: 10px 0 0;
}

/* ---------- カード共通 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  margin-bottom: 15px;
}
.card--tight { padding: 22px 18px; }

.card__label {
  font-family: var(--font-body);
  font-size: 10.5px;
  letter-spacing: .3em;
  color: var(--muted);
  text-align: center;
  margin: 0 0 14px;
  text-transform: uppercase;
}

/* ---------- 患者番号 ---------- */
.clinic-chip {
  display: inline-block;
  font-family: var(--font-min);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--green-deep);
  background: var(--chip);
  border-radius: 999px;
  padding: 5px 15px;
  margin: 0 0 14px;
}
.pno {
  text-align: center;
  font-family: var(--font-min);
  font-size: clamp(42px, 14vw, 58px);
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.1;
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  word-break: break-all;
  padding-left: .08em;
}
.pno-sub {
  text-align: center;
  font-family: var(--font-min);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

/* ---------- バーコード ---------- */
.barcode-box {
  margin: 20px -2px 0;
  padding: 14px 8px 8px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  text-align: center;
  width: 100%;
  border: 0;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: transform .12s ease;
}
.barcode-box svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.barcode-box:active { transform: scale(.985); }
.barcode-hint {
  display: block;
  font-family: var(--font-body);
  font-size: 10.5px;
  color: var(--muted);
  margin: 6px 0 0;
  letter-spacing: .06em;
}

/* ---------- QR（★ 2026-10-06 券ごとに選べる。中の文字はバーコードと同じ） ---------- */
.barcode-box--qr { padding: 0 8px 8px; }   /* 上は QR の白い余白（4つ分）がそのまま空きになるので 0 に。バーコードの券と、名前からの間を揃えます */
.qr-wrap {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto;
}
.barcode-box .qr-wrap svg { width: 100%; height: 100%; max-width: none; }
.qr-val {
  display: block;
  font-family: monospace;
  font-size: 13px;
  letter-spacing: .08em;
  color: #22312D;
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- 花びらスタンプ ---------- */
.flower-wrap { text-align: center; }
.flower-wrap svg { display: block; margin: 0 auto; max-width: 220px; height: auto; }
.flower-count {
  font-family: var(--font-min);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .16em;
  margin: 12px 0 0;
}
.flower-count b {
  font-size: 27px;
  font-weight: 500;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.flower-note {
  font-family: var(--font-min);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.9;
  letter-spacing: .04em;
  margin: 10px 0 0;
}
.flower-note b { color: var(--green-deep); font-size: 16px; }

/* 10ポイント到達 */
.card--gift { background: var(--gold-soft); border: 1px solid #EEE1C2; }
.gift-badge {
  display: inline-block;
  font-family: var(--font-min);
  background: linear-gradient(135deg, #CFAE60, var(--gold));
  color: #fff;
  font-size: 12.5px;
  letter-spacing: .16em;
  padding: 8px 20px;
  border-radius: 999px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(192,154,69,.24);
}

/* ---------- 由来のひとこと（HPの世界観） ---------- */
.origin {
  text-align: center;
  font-family: var(--font-min);
  font-size: 12.5px;
  line-height: 2.1;
  letter-spacing: .06em;
  color: var(--ink-soft);
  background: transparent;
  padding: 4px 6px 0;
  margin: 0;
}
.origin span { display: block; }

/* ---------- ボタン ---------- */
.btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-min);
  font-size: 15.5px;
  letter-spacing: .14em;
  padding: 17px 18px;
  border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn--primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 6px 16px rgba(76,174,134,.30);
}
.btn--primary:active { transform: translateY(1px); box-shadow: 0 3px 9px rgba(76,174,134,.26); }
.btn--ghost {
  color: var(--green-deep);
  background: #fff;
  border: 1px solid #BFE0CE;
}
.btn + .btn { margin-top: 10px; }

/* ---------- 未登録の案内 ---------- */
.notice {
  text-align: center;
  font-family: var(--font-min);
  line-height: 2.1;
  font-size: 14.5px;
  letter-spacing: .05em;
  color: var(--ink-soft);
  white-space: pre-line;
  margin: 0 0 20px;
}
.linkcode {
  font-family: var(--font-min);
  font-size: 40px;
  letter-spacing: .24em;
  text-align: center;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  padding-left: .24em;
  margin: 4px 0 2px;
}
.linkcode-label {
  font-family: var(--font-body);
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .3em;
  color: var(--muted);
  margin: 0 0 12px;
}

/* ---------- 院の切り替えタブ ---------- */
.switcher {
  display: flex;
  gap: 5px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto 15px;
  max-width: 320px;
}
.switcher button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 9px 6px;
  font-family: var(--font-min);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--ink-soft);
  cursor: pointer;
}
.switcher button[aria-selected="true"] {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ---------- 読み込み中・エラー ---------- */
.state {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
  font-family: var(--font-min);
  font-size: 14px;
  letter-spacing: .1em;
  line-height: 2;
}
.spinner {
  width: 32px; height: 32px;
  margin: 0 auto 18px;
  border: 2px solid rgba(58,175,163,.2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.petal--new { animation: petalIn .55s cubic-bezier(.2,.9,.3,1.2); }
@keyframes petalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.footer {
  text-align: center;
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .18em;
  padding: 14px 0 0;
  line-height: 2;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* ── バーコードの全画面表示 ───────────────────────────── */
body.bc-open { overflow: hidden; }

.bc-full {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px 20px;
  animation: bcIn .16s ease-out;
}
@keyframes bcIn { from { opacity: 0 } to { opacity: 1 } }

.bc-full__body {
  width: 100%;
  max-width: 560px;
  text-align: center;
}
.bc-full__clinic {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: .12em;
  color: #6E8A83;
}
.bc-full__no {
  margin: 0 0 18px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #000;
  font-variant-numeric: tabular-nums;
}
.bc-full svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.bc-full__qr {
  width: min(72vw, 300px);
  height: min(72vw, 300px);
  margin: 0 auto;
}
.bc-full .bc-full__qr svg { width: 100%; height: 100%; }
.bc-full__hint {
  margin: 20px 0 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: #2A403C;
}
.bc-full__hint span {
  font-size: 12.5px;
  color: #8CA49D;
}
.bc-full__close {
  margin-top: 26px;
  border: 1.5px solid #DDEBE3;
  background: #fff;
  color: #55706A;
  font-family: inherit;
  font-size: 15px;
  padding: 13px 40px;
  border-radius: 999px;
  cursor: pointer;
}
.bc-full__close:active { background: #F1F8F3; }


/* ---------- 今月の抽選番号（2026/08/28 追加） ---------- */
.lot-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 14px;
}
.lot-no {
  font-family: var(--font-min);
  font-size: 17px;
  letter-spacing: .08em;
  color: var(--green-deep);
  background: var(--chip);
  border-radius: 999px;
  padding: 7px 16px;
  white-space: nowrap;
}

/* ---------- 次回のご予約（2026/08/28 追加） ---------- */
.next-when {
  text-align: center;
  font-family: var(--font-min);
  font-size: 21px;
  letter-spacing: .04em;
  color: var(--teal-deep);
  margin: 0;
}
.next-what {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}


/* ============================================================
   【2026-09-19】画面の磨き込み（ヌルヌル化と細部）
   並び・大きさ・色は変えていません。変えたのは「動き」と、崩れていた細部だけです。
   ============================================================ */
:root { --e-out: cubic-bezier(.16,.84,.34,1); }

/* 予約の画面へ移るとき、ページごと白く読み直さず、そっと溶けて切りかわります
   （対応している端末だけ。対応していない端末は、これまでどおりです） */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }

/* 文の折り返し。言葉の切れ目で折り、1〜2文字だけ次の行に落ちるのを防ぎます */
body { word-break: auto-phrase; text-wrap: pretty; line-break: strict; overflow-wrap: break-word; }

/* アプリらしく：押したときの色のにじみ・長押しの文字選び・画像の「保存」・2回押しの拡大を止めます */
html { -webkit-tap-highlight-color: transparent; }
button, a, .btn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
img, svg { -webkit-touch-callout: none; -webkit-user-drag: none; }

/* 押したときの沈み込み。押すときは速く、離すときは少しゆっくり */
.btn { transition: transform .2s var(--e-out), box-shadow .2s var(--e-out), background-color .2s ease; }
.btn:active, .barcode-box:active { transition-duration: .06s; }
.btn--ghost:active { transform: translateY(1px); background: #F6FBF8; }
.bc-full__close { transition: background-color .2s ease, transform .2s var(--e-out); }
.bc-full__close:active { transform: scale(.97); }

/* 院（ご家族）の切り替え。緑の丸が、となりへすべって移ります */
.switcher { position: relative; }
.switcher button { position: relative; z-index: 1; transition: color .3s ease; touch-action: manipulation; }
.switcher__pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; z-index: 0;
  border-radius: 999px; background: var(--green); box-shadow: var(--shadow-sm); pointer-events: none; }
.switcher.has-pill button[aria-selected="true"] { background: transparent; box-shadow: none; }

/* 読み込み中の下書き（中身と同じ形のうすい枠） */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes hhShine { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.sk-card { border-radius: var(--radius); margin-bottom: 15px; box-shadow: var(--shadow);
  background: linear-gradient(100deg, rgba(255,255,255,.62) 30%, rgba(255,255,255,.96) 50%, rgba(255,255,255,.62) 70%);
  background-size: 300% 100%; animation: hhShine 1.3s ease-in-out infinite; }
.sk-card--a { height: 380px; }
.sk-card--b { height: 340px; }

/* 中身が順に浮かび上がる */
@keyframes hhRise { from { opacity: 0; transform: translate3d(0,12px,0); } to { opacity: 1; transform: none; } }
.hh-rise { animation: hhRise .45s var(--e-out) both; }
/* 院の切り替えのときは、同じ場所ですっと入れかえます */
@keyframes hhSwap { from { opacity: .3; transform: translate3d(0,5px,0); } to { opacity: 1; transform: none; } }
.hh-swap { animation: hhSwap .3s var(--e-out) both; }
/* 下書きは、中身と入れかわるあいだだけ上に残して、そっと消します */
#content { position: relative; }
@keyframes hhOut { to { opacity: 0; } }
.sk-fade { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; animation: hhOut .32s ease forwards; }
.sk-fade .sk-card { animation: none; }

/* 院名の書体が届くまで、文字だけ伏せておきます（index.php の小さな仕掛けとひと組） */
.brand__name, .brand__en, .brand__sub { transition: opacity .35s ease; }
html.hh-fw .brand__name, html.hh-fw .brand__en, html.hh-fw .brand__sub { opacity: 0; }

/* バーコードの全画面。開くときはふわっと、閉じるときもふわっと */
@keyframes hhZoomIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.bc-full__body { animation: hhZoomIn .28s var(--e-out) both; }
@keyframes hhBcOut { to { opacity: 0; } }
.bc-full.is-closing { animation: hhBcOut .2s ease forwards; pointer-events: none; }

/* 「つぎのごよやく」は、あとから届くので、下のボタンを押し下げずにそっと開きます */
#nextBooking { overflow-anchor: none; }

/* ------------------------------------------------------------
   ボタンと色を、ネット予約・受付のタッチ画面と同じ濃い緑にそろえます
   （2026-09-19 ご相談C・森川さんの確認ずみ）。
   診察券の明朝の字と花びらは、そのまま残しています。
   ------------------------------------------------------------ */
:root {
  --green:      #0C8272;   /* ボタン・切り替えの丸（予約・キオスクの --brand と同じ） */
  --green-deep: #056252;   /* 小さな緑の文字（予約・キオスクの --brand-d と同じ） */
  --chip:       #E6F6F4;   /* 院名・抽選番号の丸いふだ（予約・キオスクの --brand-soft と同じ） */
}
.btn { border-radius: 14px; }
.btn--primary {
  background: linear-gradient(150deg, #14A891 0%, #0C8272 55%, #06584D 100%);
  box-shadow: 0 4px 0 #05473E, 0 10px 22px rgba(9,105,90,.22);
}
.btn--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #05473E, 0 6px 14px rgba(9,105,90,.2); }
.btn--ghost { border: 2px solid #D9E8E5; color: #0C8272; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
