/* マチジュン — Material 3 Expressive・白×ミントブルー */
:root {
  --primary: #00696c;
  --on-primary: #ffffff;
  --pc: #a6eeea;
  --on-pc: #00201f;
  --sc: #c9e8ec;
  --on-sc: #0b2f3f;
  --tertiary: #8a5100;
  --tc: #ffdcbc;
  --on-tc: #2c1600;
  --error: #ba1a1a;
  --surface: #f5fbfa;
  --s-low: #edf6f5;
  --s-mid: #e5f0ef;
  --s-high: #dbe9e8;
  --on-s: #141d1d;
  --on-sv: #3d4948;
  --outline: #6d7979;
  --outline-v: #bdc9c8;
  --inv: #2b3231;
  --on-inv: #ecf2f1;
  --inv-primary: #84d4d0;
  --ff: "M PLUS 1", "Hiragino Sans", system-ui, sans-serif;
  --fn: "Roboto Flex", "M PLUS 1", system-ui, sans-serif;
  --spring: cubic-bezier(.42, 1.67, .21, .9);
  --spring-soft: cubic-bezier(.3, 1.3, .4, 1);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--ff); color: var(--on-s); background: var(--surface); font-size: 16px; line-height: 1.6;
  line-break: strict; word-break: normal; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, .btn, .chip, .tb-h, .q-h, .call-room, .ob-t, .fin-t, .empty-t, .state-t, .sc-t, .row-t p:first-child, .li-t p:first-child, .ch-t b, .have-t b {
  word-break: keep-all; overflow-wrap: anywhere; font-feature-settings: "palt";
}
.num { font-family: var(--fn); font-variant-numeric: tabular-nums; white-space: nowrap; font-variation-settings: "wdth" 110, "opsz" 48; }
.nw { white-space: nowrap; }
.ico { width: 24px; height: 24px; flex: none; }
.ico-s { width: 18px; height: 18px; flex: none; }
.ico-xs { width: 16px; height: 16px; flex: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.app { position: fixed; inset: 0; margin: 0 auto; max-width: 430px; height: 100dvh; overflow: hidden; background: var(--surface); }
@media (min-width: 600px) {
  body { background: #d9f1ee radial-gradient(circle at 1px 1px, rgba(0, 105, 108, .14) 1.2px, transparent 1.6px) 0 0 / 22px 22px; }
  .app { box-shadow: 0 30px 80px rgba(0, 72, 74, .25); }
}
.screen { position: absolute; inset: 0; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface); }
.scr.is-leaving { pointer-events: none; }
.in-fade { animation: inFade .32s var(--ease) .06s both; }
.out-fade { animation: outFade .1s linear both; }
.in-fwd { animation: inFwd .34s var(--ease) both; }
.out-fwd { animation: outFwd .2s var(--ease) both; }
.in-back { animation: inBack .34s var(--ease) both; }
.out-back { animation: outBack .2s var(--ease) both; }
@keyframes inFade { from { opacity: 0; transform: scale(.97); } }
@keyframes outFade { to { opacity: 0; } }
@keyframes inFwd { from { opacity: 0; transform: translateX(36px); } }
@keyframes outFwd { to { opacity: 0; transform: translateX(-36px); } }
@keyframes inBack { from { opacity: 0; transform: translateX(-36px); } }
@keyframes outBack { to { opacity: 0; transform: translateX(36px); } }

/* ---- トップアプリバー ---- */
.topbar { display: flex; align-items: center; gap: 4px; min-height: calc(68px + var(--st)); padding: var(--st) 8px 0 16px; flex: none; background: var(--surface); position: relative; z-index: 2; }
.topbar .icon-btn:first-child { margin-left: -8px; }
.tb-t { flex: 1; min-width: 0; }
.tb-k { font-size: 13px; color: var(--on-sv); font-weight: 500; }
.tb-h { font-size: 24px; font-weight: 800; line-height: 1.25; }
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--on-sv); flex: none; transition: background-color .2s; }
.icon-btn:active { background: rgba(0, 105, 108, .14); }
.icon-btn.sm { width: 44px; height: 44px; }
.body { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 16px calc(120px + var(--sb)); }
.s-set .body, .s-about .body { padding-bottom: calc(32px + var(--sb)); }

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 700; letter-spacing: .02em; transition: border-radius .35s var(--spring), transform .2s var(--spring), background-color .2s;
}
.btn:active { border-radius: 14px; transform: scale(.98); }
.btn.big { min-height: 56px; font-size: 16px; padding: 0 28px; }
.btn.wide { width: 100%; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.tonal { background: var(--sc); color: var(--on-sc); }
.btn.outlined { box-shadow: inset 0 0 0 1px var(--outline); color: var(--primary); }
.btn.text { color: var(--primary); padding: 0 14px; }
.btn.text.danger { color: var(--error); }
.btn.filled-inv { background: #fff; color: var(--primary); }
.btn[disabled] { pointer-events: none; }
.btn.is-busy { background: #2c7f81; }
.busy { width: 24px; height: 24px; }
.busy path { fill: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.btn-row .tonal { flex: 1; }
.fab {
  position: absolute; z-index: 3; right: 16px; bottom: calc(96px + var(--sb)); display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 20px 0 16px; border-radius: 18px; background: var(--pc); color: var(--on-pc); font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 16px rgba(0, 72, 74, .22), 0 1px 3px rgba(0, 72, 74, .2); transition: border-radius .35s var(--spring), transform .25s var(--spring);
  animation: fabIn .5s var(--spring) .2s both;
}
.fab:active { border-radius: 28px; transform: scale(.96); }
@keyframes fabIn { from { transform: scale(.6); opacity: 0; } }

/* ---- 番号札（待ち状況） ---- */
.hero { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin-top: 2px; }
.tk { position: relative; width: min(56vw, 218px); aspect-ratio: 1; background-image: linear-gradient(transparent, transparent); }
.tk-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 18px rgba(0, 105, 108, .25)); }
.tk-path { fill: var(--primary); transition: fill .6s; }
.is-soon .tk-path { fill: var(--tertiary); }
.tk-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; }
.tk-l { font-size: 13px; font-weight: 700; color: #e3fbf9; letter-spacing: .04em; }
.tk-no { font-size: clamp(54px, 17vw, 68px); line-height: 1; font-variation-settings: "wdth" 118, "opsz" 144; font-weight: 900; letter-spacing: -.01em; margin: 2px 0 4px; }
.tk-d { font-size: 13px; font-weight: 700; color: #e3fbf9; }
.is-soon .tk-l, .is-soon .tk-d { color: #fff1e4; }
.now { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-left: 4px; }
.live { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--s-high); font-size: 13px; font-weight: 700; color: var(--on-s); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; transform: scale(.7); } }
.now-no { font-size: 52px; font-weight: 800; line-height: 1.05; color: var(--on-s); font-variation-settings: "wdth" 112, "opsz" 96; }
.now-c { font-size: 13px; color: var(--on-sv); }
.now-c .num { font-size: 15px; font-weight: 700; color: var(--on-s); }
.away-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; height: 30px; padding: 0 10px; border-radius: 10px; background: var(--tc); color: var(--on-tc); font-size: 13px; font-weight: 700; }
.tick { animation: tick .5s var(--spring-soft); display: inline-block; }
@keyframes tick { from { transform: translateY(.4em); opacity: 0; } }
.remain { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 14px 2px 2px; }
.rm { display: flex; align-items: baseline; gap: 4px; }
.rm-k { font-size: 18px; font-weight: 700; }
.rm b { font-size: 76px; line-height: .95; font-weight: 900; color: var(--primary); font-variation-settings: "wdth" 120, "opsz" 144; }
.is-soon .rm b { color: var(--tertiary); }
.rm-u { font-size: 22px; font-weight: 800; }
.rm-eta { text-align: right; padding-bottom: 6px; }
.rm-eta-k { font-size: 13px; color: var(--on-sv); }
.rm-eta-v b { font-size: 26px; font-weight: 800; line-height: 1.2; }
.rm-eta-c { font-size: 14px; color: var(--on-sv); }
.wave-wrap { margin: 6px 0 2px; }
.wavy { display: block; width: 100%; height: 26px; overflow: visible; }
.wv-fill { fill: none; stroke: var(--primary); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.is-soon .wv-fill { stroke: var(--tertiary); }
.wv-track { stroke: var(--sc); stroke-width: 5; stroke-linecap: round; }
.wv-stop { fill: var(--primary); }
.wave-l { display: flex; justify-content: space-between; font-size: 13px; color: var(--on-sv); margin-top: 2px; }
.strip { display: flex; gap: 6px; margin: 12px 0 18px; flex-wrap: wrap; }
.strip li { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 13px; font-weight: 700; transition: transform .4s var(--spring); }
.st-past { background: var(--s-high); color: var(--on-sv); }
.st-now { background: var(--primary); color: #fff; transform: scale(1.12); }
.st-wait { background: #fff; color: var(--on-s); box-shadow: inset 0 0 0 1.5px var(--outline-v); }
.st-me { background: var(--on-s); color: #fff; border-radius: 10px !important; transform: rotate(8deg); }
.soon-card { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; padding: 14px 16px; border-radius: 24px; background: var(--tc); color: var(--on-tc); animation: soonIn .6s var(--spring) both; }
.soon-card .ico { animation: ring 1.2s ease-in-out 3; color: var(--tertiary); }
@keyframes soonIn { from { transform: scale(.9); opacity: 0; } }
@keyframes ring { 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.sc-t { font-size: 17px; font-weight: 800; }
.sc-s { font-size: 14px; }

.card { background: var(--s-low); border-radius: 24px; padding: 16px; }
.row { display: flex; align-items: center; gap: 14px; }
.lead-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--pc); color: var(--on-pc); flex: none; }
.row-t { flex: 1; min-width: 0; }
.row-t p:first-child { font-size: 16px; font-weight: 700; }
.sub { font-size: 13px; color: var(--on-sv); }
.m3-switch { position: relative; width: 56px; height: 34px; border-radius: 17px; flex: none; background: var(--s-high); box-shadow: inset 0 0 0 2px var(--outline); transition: background-color .25s; }
.m3-switch i { position: absolute; top: 9px; left: 9px; width: 16px; height: 16px; border-radius: 50%; background: var(--outline); display: grid; place-items: center; color: transparent; transition: all .35s var(--spring); }
.m3-switch[aria-checked="true"] { background: var(--primary); box-shadow: none; }
.m3-switch[aria-checked="true"] i { left: 26px; top: 4px; width: 26px; height: 26px; background: #fff; color: var(--primary); }
.m3-switch:active i { transform: scale(1.15); }
.sec { margin-top: 22px; }
.sec-h { font-size: 15px; font-weight: 800; margin: 0 4px 10px; }
.sec-h.pad { margin: 20px 8px 10px; }
.log { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.log li { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 16px; background: var(--s-low); }
.log b { font-size: 20px; font-weight: 800; line-height: 1.2; font-variation-settings: "wdth" 115, "opsz" 48; }
.log span { font-size: 12px; color: var(--on-sv); }
.log li.is-new { background: var(--pc); animation: pop .5s var(--spring); }
.log li.is-new span { color: var(--on-pc); }
@keyframes pop { from { transform: scale(.7); } }
.demo { margin-top: 18px; }
.demo-t { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--on-sv); }
.bgroup { display: flex; gap: 3px; }
.bgroup button { flex: 1; min-height: 44px; background: var(--s-high); font-size: 14px; font-weight: 700; border-radius: 8px; transition: border-radius .35s var(--spring), background-color .2s; }
.bgroup button:first-child { border-radius: 22px 8px 8px 22px; }
.bgroup button:last-child { border-radius: 8px 22px 22px 8px; }
.bgroup button[aria-pressed="true"] { background: var(--primary); color: #fff; border-radius: 22px; }
.demo-s { font-size: 13px; color: var(--on-sv); margin-top: 10px; }
.fine { font-size: 13px; color: var(--on-sv); line-height: 1.7; margin: 18px 4px 0; }

/* 呼び出し・診察中・会計・完了 */
.call { position: relative; overflow: hidden; margin: 4px 0 0; padding: 36px 22px 28px; border-radius: 36px; background: var(--primary); color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; }
.call-ring { position: absolute; left: 50%; top: 30px; width: 300px; height: 300px; margin-left: -150px; animation: spin 14s linear infinite; }
.call-ring svg { width: 100%; height: 100%; }
.call-ring path { fill: rgba(255, 255, 255, .1); }
@keyframes spin { to { transform: rotate(360deg); } }
.call > *:not(.call-ring) { position: relative; }
.call-k { font-size: 18px; font-weight: 800; color: #dffaf7; }
.call-no { font-size: 128px; line-height: 1; font-weight: 1000; font-variation-settings: "wdth" 130, "opsz" 144; margin: 18px 0 22px; animation: beat 1.2s var(--spring) infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.06); } }
.call-room { font-size: 26px; font-weight: 800; line-height: 1.35; }
.call-s { font-size: 15px; color: #dffaf7; margin: 6px 0 22px; }
.call-f { font-size: 13px; color: #dffaf7; margin-top: 16px; line-height: 1.6; }
.state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 12px 8px; }
.ld { width: 120px; height: 120px; }
.ld svg { width: 100%; height: 100%; overflow: visible; }
.ld-path { fill: var(--pc); }
.state-k { font-size: 40px; font-weight: 900; color: var(--primary); margin-top: 18px; }
.state-t { font-size: 25px; font-weight: 800; margin-top: 4px; }
.state-s { font-size: 15px; color: var(--on-sv); margin-top: 8px; max-width: 22em; margin-bottom: 24px; }
.pay-ico { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 36px; background: var(--sc); color: var(--on-sc); }
.pay-ico .ico { width: 48px; height: 48px; }
.state.is-pay .pay-ico { background: var(--tc); color: var(--tertiary); animation: soonIn .6s var(--spring); }
.fin-img, .empty-img { width: 100%; height: 230px; object-fit: cover; border-radius: 32px 32px 32px 96px; }
.empty-img { object-position: 50% 30%; height: 250px; }
.fin-b, .empty-b { padding: 20px 4px 0; }
.fin-t, .empty-t { font-size: 26px; font-weight: 800; line-height: 1.35; }
.fin-d { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0; }
.fin-d div { padding: 10px 12px; border-radius: 18px; background: var(--s-low); }
.fin-d dt { font-size: 12px; color: var(--on-sv); }
.fin-d dd { font-size: 20px; font-weight: 800; }
.fin-s, .empty-s { font-size: 15px; color: var(--on-sv); margin: 8px 0 18px; }
.empty-q { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: var(--s-mid); font-size: 14px; margin-bottom: 18px; }
.empty-q b { font-size: 18px; color: var(--primary); }

/* ---- 受付 ---- */
.rec-hero { position: relative; }
.rec-hero img { width: 100%; height: 184px; object-fit: cover; border-radius: 32px; }
.rec-q { position: absolute; left: 12px; bottom: 12px; padding: 8px 16px 10px; border-radius: 22px; background: #fff; box-shadow: 0 6px 18px rgba(0, 60, 62, .16); }
.rec-q-k { font-size: 12px; color: var(--on-sv); font-weight: 700; }
.rec-q-v { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--on-sv); }
.rec-q-v b { font-size: 32px; color: var(--primary); line-height: 1.1; }
.rec-q-v > .nw:first-child { color: var(--on-s); font-weight: 700; }
.have { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 12px 12px 18px; border-radius: 24px; background: var(--pc); color: var(--on-pc); }
.have-no { font-size: 36px; font-weight: 900; font-variation-settings: "wdth" 125, "opsz" 96; }
.have-t { flex: 1; display: flex; flex-direction: column; }
.have-t b { font-size: 16px; }
.have-t span { font-size: 13px; }
.fm-h { font-size: 15px; font-weight: 800; margin: 24px 4px 10px; }
.opt { font-size: 13px; font-weight: 500; color: var(--on-sv); }
.field { position: relative; margin-bottom: 12px; }
.field input, .field textarea { display: block; width: 100%; height: 58px; padding: 24px 16px 8px; border: 0; border-radius: 16px 16px 4px 4px; background: var(--s-mid); box-shadow: inset 0 -1px 0 var(--outline); font-size: 16px; color: var(--on-s); transition: box-shadow .2s; }
.field textarea { height: auto; min-height: 100px; padding-top: 28px; resize: none; line-height: 1.6; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 -3px 0 var(--primary); }
.field label { position: absolute; left: 16px; top: 17px; font-size: 16px; color: var(--on-sv); pointer-events: none; transition: all .2s var(--ease); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 6px; font-size: 12px; font-weight: 700; color: var(--primary); }
.field.is-err input { box-shadow: inset 0 -3px 0 var(--error); }
.field.is-err label { color: var(--error) !important; }
.f-err { font-size: 13px; color: var(--error); font-weight: 700; margin: 4px 16px 0; }
.seg { display: flex; gap: 3px; margin-bottom: 10px; }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 50px; padding: 0 6px; background: var(--s-high); font-size: 15px; font-weight: 700; border-radius: 8px; transition: border-radius .35s var(--spring), background-color .2s; }
.seg button:first-child { border-radius: 25px 8px 8px 25px; }
.seg button:last-child { border-radius: 8px 25px 25px 8px; }
.seg button[aria-checked="true"] { background: var(--primary); color: #fff; border-radius: 25px; }
.note { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: var(--s-mid); font-size: 14px; line-height: 1.65; margin-bottom: 10px; }
.note .ico-s { margin-top: 3px; color: var(--primary); }
.note.warm { background: var(--tc); color: var(--on-tc); }
.note.warm .ico-s { color: var(--tertiary); }
.choice { display: flex; flex-direction: column; gap: 8px; }
.ch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; background: var(--s-low); text-align: left; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background-color .2s, border-radius .35s var(--spring); }
.ch:active { border-radius: 14px; }
.ch-r { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--outline); flex: none; position: relative; }
.ch[aria-pressed="true"] { background: #d9f4f1; box-shadow: inset 0 0 0 2px var(--primary); }
.ch[aria-pressed="true"] .ch-r { box-shadow: inset 0 0 0 2px var(--primary); }
.ch[aria-pressed="true"] .ch-r::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--primary); }
.ch-t { display: flex; flex-direction: column; gap: 2px; }
.ch-t b { font-size: 16px; }
.ch-t > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--on-sv); }
.chip-in { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--outline-v); font-style: normal; font-weight: 700; color: var(--on-s); }
.chip-in.on { background: var(--primary); color: #fff; box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--outline-v); background: var(--surface); font-size: 14px; font-weight: 700; color: var(--on-sv); transition: border-radius .35s var(--spring), background-color .2s; }
.chips.big .chip { min-height: 48px; font-size: 15px; }
.chip:active { border-radius: 22px; }
.chip[aria-pressed="true"] { background: var(--sc); color: var(--on-sc); box-shadow: none; padding-left: 12px; }
#issueBtn { margin-top: 26px; }

/* ---- 問診票 ---- */
.q-prog { margin: 2px 4px 10px; }
.q-p-t { font-size: 14px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.q-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.q-bars li { height: 8px; border-radius: 4px; background: var(--s-high); transition: background-color .3s; }
.q-bars li.done { background: var(--primary); }
.q-bars li.now { background: linear-gradient(90deg, var(--primary) 50%, var(--pc) 50%); }
.q-card { background: var(--s-low); border-radius: 32px; padding: 22px 18px; animation: inFade .3s var(--ease); }
.q-h { font-size: 21px; font-weight: 800; line-height: 1.4; }
.q-h.mt { margin-top: 26px; margin-bottom: 8px; }
.q-s { font-size: 14px; color: var(--on-sv); margin: 4px 0 14px; }
.q-card .chips { margin-bottom: 16px; }
.q-card .choice { margin-top: 12px; }
.q-card .ch { background: var(--surface); }
.q-card .field input, .q-card .field textarea { background: var(--surface); }
.q-card .card.row { background: var(--surface); margin-top: 12px; }
.temp { text-align: center; padding: 6px 0 0; }
.temp-v { display: flex; justify-content: center; align-items: baseline; gap: 2px; }
.temp-v b { font-size: 68px; font-weight: 900; color: var(--primary); line-height: 1; font-variation-settings: "wdth" 115, "opsz" 144; transition: color .3s; }
.temp-v span { font-size: 22px; font-weight: 800; }
.temp.is-fever b { color: var(--tertiary); }
.temp-l { display: flex; justify-content: space-between; font-size: 13px; color: var(--on-sv); }
.temp-n { font-size: 14px; color: var(--on-sv); margin-top: 8px; }
.temp.is-fever .temp-n { color: var(--on-tc); background: var(--tc); border-radius: 14px; padding: 8px 12px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 48px; background: transparent; margin: 8px 0 2px; --v: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--primary) 0 var(--v), var(--sc) var(--v) 100%); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 6px; height: 44px; margin-top: -14px; border-radius: 3px; background: var(--primary); box-shadow: 0 0 0 5px var(--surface); }
input[type="range"]::-moz-range-track { height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--primary) 0 var(--v), var(--sc) var(--v) 100%); }
input[type="range"]::-moz-range-thumb { width: 6px; height: 44px; border: 0; border-radius: 3px; background: var(--primary); }
.temp.is-fever input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--tertiary) 0 var(--v), var(--tc) var(--v) 100%); }
.temp.is-fever input[type="range"]::-webkit-slider-thumb { background: var(--tertiary); }
.q-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.q-nav .btn { min-width: 120px; min-height: 52px; }
.sm-row { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; padding: 10px 0; box-shadow: inset 0 -1px 0 var(--outline-v); }
.sm-row:not(:has(button)) { grid-template-columns: 96px 1fr; }
.sm dt { font-size: 13px; color: var(--on-sv); font-weight: 700; }
.sm dd { font-size: 15px; }
.muted { color: var(--on-sv); }
.tag-warm { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 8px; background: var(--tc); color: var(--on-tc); font-size: 12px; font-weight: 700; }
.q-done { text-align: center; margin-bottom: 8px; }
.q-done-ico { display: grid; place-items: center; width: 72px; height: 72px; margin: 4px auto 12px; border-radius: 26px; background: var(--primary); color: #fff; transform: rotate(-6deg); }
.q-done-ico .ico { width: 36px; height: 36px; }
.q-done + .sm { margin-bottom: 18px; }

/* ---- 医院情報 ---- */
.cl-hero img { width: 100%; height: 220px; object-fit: cover; border-radius: 32px 32px 32px 32px; }
.cl-id { padding: 16px 4px 4px; }
.cl-name { font-size: 25px; font-weight: 800; line-height: 1.3; }
.cl-sub { font-size: 14px; color: var(--on-sv); }
.open { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 10px; min-height: 38px; padding: 4px 14px; border-radius: 19px; background: var(--s-high); font-size: 14px; font-weight: 800; }
.open i { width: 9px; height: 9px; border-radius: 50%; background: var(--outline); }
.open.is-open { background: var(--pc); color: var(--on-pc); }
.open.is-open i { background: var(--primary); animation: blink 1.6s infinite; }
.open-h { font-weight: 500; font-size: 13px; }
.crowd { margin-top: 16px; }
.crowd-h .sec-h { margin: 0 0 2px; }
.crowd-n { font-size: 13px; color: var(--on-sv); }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 130px; margin-top: 14px; }
.bars li { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bars i { display: block; width: 100%; border-radius: 10px 10px 4px 4px; background: var(--sc); transition: height .6s var(--spring-soft); }
.bars .off i { background: var(--s-high); }
.bars .is-now i { background: var(--primary); }
.bars span { font-size: 12px; color: var(--on-sv); }
.bars .is-now span { color: var(--primary); font-weight: 800; }
.crowd-f { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--on-sv); margin-top: 10px; }
.hours { width: 100%; border-collapse: separate; border-spacing: 4px; margin: 0 -4px; }
.hours th { font-size: 13px; font-weight: 700; color: var(--on-sv); }
.hours thead th { padding-bottom: 2px; }
.hours th.today { color: var(--primary); }
.hours tbody th { text-align: left; width: 40px; }
.hours td { height: 38px; text-align: center; border-radius: 12px; background: var(--s-low); }
.hours td.today { background: var(--pc); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.no { display: inline-block; width: 12px; height: 2px; border-radius: 1px; background: var(--outline); }
.hours-n { font-size: 13px; color: var(--on-sv); margin: 8px 4px 0; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 64%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.gallery figure { scroll-snap-align: start; }
.gallery img { width: 100%; height: 164px; object-fit: cover; border-radius: 24px; }
.gallery figcaption { font-size: 13px; color: var(--on-sv); margin: 6px 6px 0; }
.doc { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.doc-av { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.doc-av svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.doc-av path { fill: var(--sc); }
.doc-av b { position: relative; font-size: 19px; color: var(--on-sc); }
.doc-n { font-size: 16px; font-weight: 800; }
.doc-n span { font-size: 13px; font-weight: 500; color: var(--on-sv); margin-left: 8px; }
.doc-s { font-size: 14px; color: var(--on-sv); }
.acc p { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin-bottom: 8px; }
.acc .ico-s { margin-top: 3px; color: var(--primary); }

/* ---- 設定 ---- */
.list { background: var(--s-low); border-radius: 28px; overflow: hidden; }
.list + .list { margin-top: 10px; }
.li { display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 12px 16px; width: 100%; text-align: left; color: var(--on-s); }
.li > .ico { color: var(--on-sv); }
.li + .li { box-shadow: inset 0 1px 0 var(--surface); }
.li-t { flex: 1; min-width: 0; }
.li-t p:first-child { font-size: 16px; font-weight: 500; }
.li.col { flex-direction: column; align-items: stretch; gap: 0; }
.li-top { display: flex; align-items: center; gap: 16px; }
.li-top > .ico { color: var(--on-sv); }
.li-v { font-size: 15px; font-weight: 700; color: var(--primary); }
.li-v b { font-size: 20px; }
.as-btn:active { background: var(--s-high); }
.li.danger, .li.danger .ico { color: var(--error); }
.ab-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 8px 0 20px; }
.ab-hero img { width: 112px; height: 112px; border-radius: 32px; }
.ab-hero h2 { font-size: 26px; font-weight: 800; margin-top: 8px; }
.ab-hero p { font-size: 15px; color: var(--on-sv); }
.ab-note p { font-size: 15px; line-height: 1.75; }
.ab-note p + p { margin-top: 6px; color: var(--on-sv); font-size: 14px; }
.ab-cta { margin-top: 24px; }

/* ---- ナビゲーションバー ---- */
.navbar { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(80px + var(--sb)); padding-bottom: var(--sb); background: var(--s-mid); transition: transform .3s var(--ease); }
.navbar.is-gone { transform: translateY(105%); }
.nb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--on-sv); }
.nb-pill { position: relative; display: grid; place-items: center; width: 64px; height: 32px; border-radius: 16px; transition: background-color .2s; }
.nb-pill::before { content: ""; position: absolute; inset: 0; border-radius: 16px; background: var(--sc); transform: scaleX(.3); opacity: 0; transition: transform .45s var(--spring), opacity .15s; }
.nb.is-on .nb-pill::before { transform: none; opacity: 1; }
.nb-pill .ico { position: relative; }
.nb.is-on .nb-pill { color: var(--on-sc); }
.nb-l { font-size: 12px; font-weight: 700; }
.nb.is-on .nb-l { color: var(--on-s); font-weight: 800; }
.nb:active .nb-pill::before { opacity: 1; transform: scaleX(.9); }
.nb-badge { position: absolute; top: 2px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--error); box-shadow: 0 0 0 2px var(--s-mid); }

/* ---- スナックバー・ダイアログ・バナー ---- */
.snack { position: absolute; z-index: 30; left: 12px; right: 12px; bottom: calc(92px + var(--sb)); display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 8px 6px 16px; border-radius: 14px; background: var(--inv); color: var(--on-inv); font-size: 14px; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); opacity: 0; transform: translateY(18px) scale(.96); pointer-events: none; transition: opacity .2s, transform .4s var(--spring); }
.snack.is-on { opacity: 1; transform: none; pointer-events: auto; }
.snack span { flex: 1; }
.snack-act { min-height: 40px; padding: 0 12px; border-radius: 20px; color: var(--inv-primary); font-weight: 800; white-space: nowrap; }
.dlg-layer { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 20, 20, .36); opacity: 0; transition: opacity .2s; }
.dlg-layer.is-on { opacity: 1; }
.dlg { width: min(320px, calc(100% - 48px)); padding: 24px; border-radius: 28px; background: #e9f3f2; text-align: center; transform: scale(.9); transition: transform .4s var(--spring); }
.dlg-layer.is-on .dlg { transform: none; }
.dlg-ico { color: var(--primary); }
.dlg-t { font-size: 22px; font-weight: 800; margin-top: 12px; line-height: 1.35; }
.dlg-m { font-size: 14px; color: var(--on-sv); margin-top: 12px; text-align: left; line-height: 1.7; }
.dlg-b { display: flex; justify-content: flex-end; gap: 4px; margin-top: 22px; }
.btn-text { min-height: 44px; padding: 0 14px; border-radius: 22px; color: var(--primary); font-size: 15px; font-weight: 700; }
.btn-text.strong { background: var(--primary); color: #fff; padding: 0 18px; }
.heads-up { position: absolute; z-index: 60; left: 8px; right: 8px; top: calc(8px + var(--st)); transform: translateY(-140%); transition: transform .5s var(--spring); }
.heads-up.is-on { transform: none; }
.hu { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 26px; background: #fff; box-shadow: 0 12px 30px rgba(0, 50, 50, .25); }
.hu img { width: 40px; height: 40px; border-radius: 12px; }
.hu-t { display: flex; flex-direction: column; }
.hu-t b { font-size: 15px; }
.hu-t span { font-size: 13px; color: var(--on-sv); }

/* ---- 起動 ---- */
.splash { position: fixed; inset: 0; margin: 0 auto; max-width: 430px; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--pc); transition: opacity .3s; }
.splash img { width: 112px; height: 112px; border-radius: 32px; box-shadow: 0 16px 40px rgba(0, 80, 80, .25); animation: pop .6s var(--spring); }
.splash-n { font-size: 26px; font-weight: 800; color: var(--on-pc); letter-spacing: .06em; }
.splash.is-out { opacity: 0; }
.onboard { position: fixed; inset: 0; margin: 0 auto; max-width: 430px; z-index: 90; background: var(--surface); padding-top: var(--st); transition: opacity .3s; display: flex; flex-direction: column; }
.onboard.is-out { opacity: 0; }
.ob-media { padding: 16px 16px 0; }
.ob-media img { width: 100%; height: min(52vh, 420px); object-fit: cover; border-radius: 220px 220px 36px 36px; }
.ob-txt { padding: 24px 24px 0; }
.ob-t { font-size: 30px; font-weight: 800; line-height: 1.35; }
.ob-s { font-size: 16px; color: var(--on-sv); line-height: 1.75; margin-top: 10px; }
.flip .ob-media img { animation: obIn .55s var(--spring-soft); }
.flip .ob-txt { animation: inFade .4s var(--ease) .05s both; }
@keyframes obIn { from { transform: scale(.92); border-radius: 60px; opacity: .3; } }
.ob-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 16px 16px calc(20px + var(--sb)); }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--outline-v); transition: width .4s var(--spring), background-color .2s; }
.ob-dots i.on { width: 24px; background: var(--primary); }
.nojs, .fatal { position: fixed; z-index: 200; left: 16px; right: 16px; bottom: 24px; padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-size: 15px; }
.fatal-t { font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.strip { flex-wrap: nowrap; }
.strip .st-gap { width: 22px; display: flex; gap: 3px; align-items: center; justify-content: center; }
.st-gap i { width: 4px; height: 4px; border-radius: 50%; background: var(--outline); }
.flow { display: flex; align-items: flex-start; justify-content: center; gap: 0; width: 100%; margin-top: 28px; padding: 18px 8px; border-radius: 28px; background: var(--s-low); }
.flow li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--on-sv); text-align: center; }
.flow li + li::before { content: ""; position: absolute; top: 18px; right: 50%; width: 100%; height: 3px; margin-right: 20px; border-radius: 2px; background: var(--s-high); z-index: 0; }
.flow li.done + li::before, .flow li.done + li.now::before { background: var(--primary); }
.flow-i { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; background: var(--s-high); color: var(--on-sv); }
.flow .done .flow-i { background: var(--primary); color: #fff; }
.flow .now .flow-i { background: var(--pc); color: var(--on-pc); border-radius: 50%; animation: pop .6s var(--spring); }
.flow .now { color: var(--on-s); }
.state .fine { text-align: center; }
