/* 施設「直前枠を出す」画面（2026-10-09）。利用者ページと同じ約束：緑基調・直前枠はオレンジ・角丸16/12・影1段・8の倍数・44px */
:root {
  --green: #2D7A4F; --green-dark: #1a4a30; --green-soft: #e8f1ec;
  --orange: #e65100; --orange-deep: #bf4300; --orange-soft: #fff1e8;
  --ink: #1b1b1b; --ink-2: #4a5550; --muted: #6b7b72; --line: #e4ebe6; --bg: #f5f7f6; --danger: #c62828;
  --shadow: 0 2px 12px rgba(0,0,0,.06); --r: 16px; --r-s: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, 'Helvetica Neue', 'Hiragino Sans', 'Noto Sans JP', sans-serif; font-size: 15px; line-height: 1.7; }
button, input, select { font-family: inherit; }
.header { background: var(--green); color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5; }
.header a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.header h1 { font-size: 16px; margin: 0; font-weight: 800; letter-spacing: .02em; }
.wrap { max-width: 600px; margin: 0 auto; padding: 16px 16px 64px; }
.card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card h2 { font-size: 15.5px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.card h2 .n { font-size: 12px; color: var(--muted); font-weight: 600; }
.lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin: 14px 0 6px; }
.lbl:first-of-type { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 44px; padding: 6px 14px; border-radius: 22px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; line-height: 1.25; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
.chip small { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.chip.on { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-deep); }
.chip.on small { color: var(--orange-deep); }
.chip.off { opacity: .45; cursor: default; }
.chip.ghost { border-style: dashed; color: var(--muted); }
.timein { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.timein input { min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: var(--r-s); font-size: 16px; }
.plans { display: grid; gap: 8px; }
.plan { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; background: #fff; cursor: pointer; text-align: left; min-height: 64px; }
.plan.on { border-color: var(--orange); background: var(--orange-soft); }
.plan .th { width: 56px; height: 42px; border-radius: 8px; background: var(--green-soft); object-fit: cover; display: grid; place-items: center; color: var(--green); font-size: 18px; }
.plan .t { font-weight: 700; font-size: 14px; line-height: 1.35; }
.plan .s { font-size: 12px; color: var(--muted); }
.plan .p { font-size: 13.5px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: #fff; font-size: 20px; color: var(--green); cursor: pointer; }
.stepper button:disabled { color: #c5cdc8; }
.stepper output { min-width: 48px; text-align: center; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.preview { background: var(--orange-soft); border-radius: var(--r-s); padding: 10px 12px; margin-top: 14px; font-size: 13px; color: var(--ink-2); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; text-align: center; }
.preview b { display: block; font-size: 16px; color: var(--orange-deep); font-variant-numeric: tabular-nums; }
.preview span { font-size: 11px; color: var(--muted); }
.primary { width: 100%; min-height: 52px; margin-top: 14px; border: 0; border-radius: var(--r-s); background: var(--orange); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(230,81,0,.22); }
.primary:disabled { opacity: .5; box-shadow: none; cursor: default; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.warn { font-size: 12.5px; color: #8a5a00; background: #fff8e1; border-radius: var(--r-s); padding: 8px 12px; margin-top: 10px; }
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; margin-top: 6px; }
/* 準備状況 */
.ready { border-left: 4px solid var(--orange); }
.ready ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.ready li a { color: var(--green); font-weight: 700; text-decoration: none; }
/* 受付中一覧 */
.offer { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; margin-bottom: 8px; }
.offer .w { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.offer .w small { font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 6px; }
.offer .t { font-size: 13.5px; color: var(--ink-2); }
.offer .m { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.st { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st.open { background: var(--green-soft); color: var(--green); }
.st.hold { background: #eef1f0; color: var(--muted); }
.st.full { background: var(--orange-soft); color: var(--orange-deep); }
.st.closed { background: #eef1f0; color: var(--muted); }
.offer .act button { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.offer .act button:disabled { opacity: .45; cursor: default; }
.empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 10px 0 4px; }
/* 設定・履歴 */
details.sec { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 14px; }
details.sec summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800; font-size: 15px; display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
details.sec summary::-webkit-details-marker { display: none; }
details.sec summary::after { content: '›'; color: var(--muted); transform: rotate(90deg); transition: .15s; font-size: 18px; }
details.sec[open] summary::after { transform: rotate(-90deg); }
details.sec .in { padding: 0 16px 16px; }
.range { display: flex; align-items: center; gap: 12px; }
.range input[type=range] { flex: 1; accent-color: var(--orange); }
.range output { font-size: 20px; font-weight: 800; color: var(--orange-deep); min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.save { min-height: 46px; padding: 0 18px; border-radius: var(--r-s); border: 0; background: var(--green); color: #fff; font-weight: 800; font-size: 14.5px; cursor: pointer; margin-top: 12px; }
.save:disabled { opacity: .6; }
.hist { font-size: 13px; color: var(--ink-2); display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; }
.hist .d { font-variant-numeric: tabular-nums; color: var(--muted); }
/* 確認シート・トースト */
.sheet-bg { position: fixed; inset: 0; background: rgba(20,30,25,.45); opacity: 0; pointer-events: none; transition: .2s; z-index: 40; }
.sheet-bg.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: #fff; border-radius: 20px 20px 0 0; max-height: 90vh; overflow-y: auto; transform: translateY(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); max-width: 600px; margin: 0 auto; }
.sheet.on { transform: translateY(0); }
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: #d8e0dc; margin: 4px auto 12px; }
.sheet h3 { font-size: 17px; margin: 0 0 10px; }
.sheet dl { display: grid; grid-template-columns: 6.5em 1fr; gap: 6px 10px; margin: 0 0 12px; font-size: 14px; }
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; font-weight: 700; }
.sheet .row { display: flex; gap: 10px; }
.sheet .row button { flex: 1; min-height: 50px; border-radius: var(--r-s); font-size: 15px; font-weight: 800; cursor: pointer; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); }
.sheet .row button.go { background: var(--orange); color: #fff; border-color: var(--orange); }
.sheet .row button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #233; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; max-width: calc(100% - 32px); opacity: 0; transition: .2s; z-index: 50; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast a { color: #ffd9c2; font-weight: 700; }
.demo { background: #fff8e1; color: #7a5a00; font-size: 12.5px; padding: 8px 12px; border-radius: var(--r-s); margin-bottom: 12px; }
