/* ヘヤトリ — 会議室予約（Material 3 Expressive）
   トークン：白 × インディゴ × ライム。数字は Roboto Flex（幅軸）、和文は IBM Plex Sans JP */
:root {
  --bg: #fcfcff;
  --sf: #ffffff;
  --sc: #f1f1fa;
  --sch: #e6e6f3;
  --line: #e1e1ee;
  --line2: #efeff7;
  --outline: #767894;
  --outline2: #c5c6da;
  --on: #1a1b2e;
  --on2: #4a4c66;
  --pri: #4136c2;
  --pri-d: #2e2596;
  --pc: #e2e0ff;
  --on-pc: #1b1270;
  --lime: #d2f45c;
  --lime-c: #e8f9b0;
  --lime-dd: #4d6a00;
  --on-lime: #1f2a00;
  --err: #b3261e;
  --ec: #ffdad6;
  --on-ec: #410002;
  --f: "Roboto Flex", "IBM Plex Sans JP", system-ui, -apple-system, sans-serif;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 28px;
  --spring: cubic-bezier(.34, 1.45, .5, 1);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --nav-h: calc(80px + env(safe-area-inset-bottom));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--on);
  font-family: var(--f);
  font-size: 15px;
  line-height: 1.6;
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pri); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .tb-title, .tb-large, .sheet-title, .ob-t, .empty-t, .bd-title { font-feature-settings: "palt"; word-break: keep-all; overflow-wrap: normal; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.ic { width: 24px; height: 24px; flex: none; }
.ic.tiny { width: 16px; height: 16px; }
.ic.chev { width: 20px; height: 20px; color: var(--on2); }
:focus-visible { outline: 3px solid var(--pri); outline-offset: 2px; }

/* ---------- アプリの枠 ---------- */
.app {
  position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto;
  width: 100%; max-width: 430px;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 600px) {
  body {
    background-color: #e9e9f6;
    background-image: linear-gradient(#dcdcef 1px, transparent 1px), linear-gradient(90deg, #dcdcef 1px, transparent 1px);
    background-size: 64px 64px;
  }
  .app { box-shadow: 0 0 0 1px #d4d4e8, 0 30px 80px rgba(46, 37, 150, .18); }
}
.views { flex: 1; position: relative; overflow: hidden; min-height: 0; display: block; }
.boot-msg { padding: 40px 24px; text-align: center; color: var(--on2); }
.boot-fail { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: var(--bg); text-align: center; }
.boot-fail[hidden] { display: none; }
.view {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  padding-bottom: 32px;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

/* 遷移 */
.in-fade { animation: fadeIn .3s var(--ease) both; }
.out-fade { animation: fadeOut .15s linear both; }
.in-push { animation: pushIn .38s cubic-bezier(.2, .9, .25, 1) both; z-index: 2; box-shadow: -8px 0 30px rgba(26, 27, 46, .12); }
.out-push { animation: pushOut .38s cubic-bezier(.2, .9, .25, 1) both; }
.in-pop { animation: popIn .34s cubic-bezier(.2, .9, .25, 1) both; }
.out-pop { animation: popOut .34s cubic-bezier(.2, .9, .25, 1) both; z-index: 3; box-shadow: -8px 0 30px rgba(26, 27, 46, .12); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes pushIn { from { transform: translateX(100%); } }
@keyframes pushOut { to { transform: translateX(-22%); opacity: .6; } }
@keyframes popIn { from { transform: translateX(-22%); opacity: .6; } }
@keyframes popOut { to { transform: translateX(100%); } }

/* ---------- トップアプリバー ---------- */
.topbar { flex: none; background: var(--bg); padding-top: env(safe-area-inset-top); position: relative; z-index: 5; }
.tb-row { height: 64px; display: flex; align-items: center; gap: 4px; padding: 0 8px; }
.tb-title { font-size: 21px; font-weight: 500; padding-left: 8px; letter-spacing: .01em; transition: opacity .2s; }
.topbar.large .tb-title { opacity: 0; }
.topbar.large.collapsed .tb-title { opacity: 1; }
.topbar.large.collapsed { box-shadow: 0 1px 0 var(--line); background: var(--sc); }
.tb-large {
  font-size: 32px; font-weight: 700; letter-spacing: .01em; line-height: 1.25;
  padding: 0 20px 14px; max-height: 70px; overflow: hidden;
  transition: max-height .28s var(--ease), padding .28s var(--ease), opacity .2s;
}
.topbar.large.collapsed .tb-large { max-height: 0; padding-bottom: 0; opacity: 0; }

.icon-btn {
  position: relative; overflow: hidden;
  width: 48px; height: 48px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--on);
  transition: transform .25s var(--spring), border-radius .25s var(--spring), background-color .2s;
}
.icon-btn:active { transform: scale(.9); border-radius: 14px; }
.icon-btn.sm { width: 40px; height: 40px; }
.icon-btn.sm .ic { width: 20px; height: 20px; }
.icon-btn.tonal { background: var(--pc); color: var(--on-pc); width: 44px; height: 44px; }
.icon-btn.glassy { background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }

/* ---------- ボタン ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: .01em; line-height: 1.3;
  text-decoration: none; text-align: center; word-break: keep-all;
  transition: transform .28s var(--spring), border-radius .28s var(--spring), background-color .2s, box-shadow .2s;
}
.btn:active:not(:disabled) { transform: scale(.96); border-radius: 14px; }
.btn.filled { background: var(--pri); color: #fff; }
.btn.filled:hover { box-shadow: 0 2px 8px rgba(65, 54, 194, .3); }
.btn.tonal { background: var(--pc); color: var(--on-pc); }
.btn.outline { background: transparent; color: var(--pri); box-shadow: inset 0 0 0 1px var(--outline); }
.btn.text { background: transparent; color: var(--pri); padding: 0 14px; }
.btn.danger { color: var(--err); }
.btn.outline.danger { box-shadow: inset 0 0 0 1px var(--err); }
.btn.filled.danger { background: var(--err); color: #fff; }
.btn.wide { width: 100%; }
.btn.big { min-height: 56px; font-size: 16px; padding: 8px 24px; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn:disabled { background: #e3e3ec; color: #55576c; box-shadow: none; cursor: default; }
.btn .ic { width: 18px; height: 18px; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); pointer-events: none; animation: rip .55s var(--ease) forwards; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }

/* ---------- チップ・セグメント ---------- */
.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chip {
  position: relative; overflow: hidden; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--outline2); border-radius: 12px;
  background: var(--sf); color: var(--on);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, border-radius .3s var(--spring), transform .25s var(--spring);
}
.chip:active { transform: scale(.95); }
.chip.on { background: var(--pc); border-color: var(--pc); color: var(--on-pc); border-radius: 20px; }
.chip .chip-ic { width: 18px; height: 18px; }
.hscroll { display: flex; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; scroll-behavior: smooth; }
.hscroll::-webkit-scrollbar { display: none; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--sf); box-shadow: inset 0 0 0 1px var(--outline2); }
.seg button {
  position: relative; overflow: hidden; flex: 1;
  min-height: 42px; padding: 0 6px; border: 0; border-radius: 999px;
  background: transparent; color: var(--on); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, color .2s, transform .25s var(--spring);
}
.seg button:active { transform: scale(.95); }
.seg button.on { background: var(--pri); color: #fff; }

/* ---------- ナビゲーションバー ---------- */
.nav {
  flex: none; height: var(--nav-h); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--sc); position: relative; z-index: 20;
}
body.pushed .nav { display: none; }
.nav-item {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--on2); text-decoration: none;
}
.nav-ind {
  position: relative; overflow: hidden;
  width: 56px; height: 32px; border-radius: 16px;
  display: grid; place-items: center;
  transition: background-color .2s, width .35s var(--spring);
}
.nav-item.on .nav-ind { background: var(--pc); color: var(--on-pc); width: 64px; }
.nav-l { font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.nav-item.on .nav-l { color: var(--on); font-weight: 700; }
.nav-item:active .nav-ind { transform: scale(.92); }

/* ---------- タイムライン ---------- */
.tl-top { box-shadow: 0 1px 0 var(--line); }
.tl-top .tb-row { padding: 0 8px 0 4px; }
.tb-date { display: flex; flex-direction: column; line-height: 1.15; padding: 0 2px; }
.tb-rel { font-size: 12px; font-weight: 700; color: var(--pri); letter-spacing: .04em; }
.tb-d { font-size: 22px; font-weight: 600; font-variation-settings: "wdth" 104; letter-spacing: -.01em; white-space: nowrap; }
.tb-wd { font-size: 15px; font-weight: 500; color: var(--on2); margin-left: 4px; }
.week { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 8px; scrollbar-width: none; scroll-behavior: smooth; }
.week::-webkit-scrollbar { display: none; }
.day {
  position: relative; flex: none; width: 46px; height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 0; border-radius: 23px; background: transparent; color: var(--on);
  transition: background-color .2s, border-radius .35s var(--spring), transform .25s var(--spring);
}
.day:active { transform: scale(.92); }
.day-w { font-size: 11px; font-weight: 500; color: var(--on2); }
.day-n { font-size: 18px; font-weight: 600; font-variation-settings: "wdth" 96; line-height: 1.2; }
.day.is-today::after { content: ""; position: absolute; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--lime-dd); }
.day.on { background: var(--pri); color: #fff; border-radius: 16px; }
.day.on .day-w { color: #e2e0ff; }
.day.on.is-today::after { background: var(--lime); }
.floor-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 10px; }
.legend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--on2); white-space: nowrap; }
.lg { width: 12px; height: 12px; border-radius: 4px; margin-left: 6px; }
.lg.mine { background: var(--pri); }
.lg.other { background: var(--sch); box-shadow: inset 3px 0 0 #8e8bd9; }

.hint {
  flex: none; display: flex; align-items: center; gap: 10px;
  margin: 8px 12px 0; padding: 6px 4px 6px 14px;
  border-radius: 18px; background: var(--lime-c); color: var(--on-lime);
}
.hint .ic { color: var(--lime-dd); }
.hint-t { flex: 1; font-size: 14px; line-height: 1.45; word-break: keep-all; }

.grid-scroll {
  flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--sf); position: relative; scrollbar-width: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.grid-scroll::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: 52px repeat(var(--n), 116px); grid-template-rows: 64px auto; width: max-content; min-width: 100%; }
.g-corner {
  position: sticky; top: 0; left: 0; z-index: 8;
  background: var(--sf); border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  font-size: 11px; font-weight: 600; color: var(--on2);
}
.g-head {
  position: sticky; top: 0; z-index: 7;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
  padding: 6px 10px; border: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--sf); color: var(--on); text-align: left;
}
.g-head:active { background: var(--sc); }
.gh-name { font-size: 15px; font-weight: 700; line-height: 1.25; }
.gh-meta { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--on2); line-height: 1.2; }
.gh-fl { margin-left: 4px; padding: 0 5px; border-radius: 5px; background: var(--sc); font-weight: 600; font-size: 11px; }
.gh-eq { display: flex; gap: 3px; color: var(--pri); margin-top: 2px; }
.gh-eq .ic { width: 14px; height: 14px; }
.g-times { position: sticky; left: 0; z-index: 6; background: var(--sf); box-shadow: 1px 0 0 var(--line); height: 862px; }
.hr {
  position: absolute; right: 8px; transform: translateY(-50%);
  font-size: 12px; font-weight: 500; font-variation-settings: "wdth" 85; color: var(--on2);
  background: var(--sf); line-height: 1; padding: 2px 0;
}
.now-t {
  position: absolute; right: 3px; transform: translateY(-50%); z-index: 2;
  padding: 3px 5px; border-radius: 8px; background: var(--pri); color: #fff;
  font-size: 11.5px; font-weight: 700; font-variation-settings: "wdth" 85; line-height: 1;
}
.g-cols { display: flex; position: relative; padding: 15px 0 15px; }
.col {
  position: relative; flex: none; width: 116px; height: 832px;
  border-left: 1px solid var(--line);
  background-image:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, var(--line2) 0 1px, transparent 1px 32px);
  touch-action: pan-x pan-y;
  cursor: crosshair;
}
.past-mask {
  position: absolute; left: 0; right: 0; top: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(74, 76, 102, .07) 0 6px, rgba(74, 76, 102, .02) 6px 12px);
}
.bk {
  position: absolute; left: 4px; right: 4px; z-index: 2;
  display: flex; flex-direction: column; gap: 1px; overflow: hidden;
  padding: 4px 8px; border-radius: var(--r-s);
  text-decoration: none; line-height: 1.3;
  transition: transform .25s var(--spring), box-shadow .2s;
  cursor: pointer;
}
.bk:active { transform: scale(.97); }
.bk.mine { background: var(--pri); color: #fff; }
.bk.other { background: var(--sch); color: var(--on); box-shadow: inset 3px 0 0 #8e8bd9; }
.bk.past.other { background: #eeeef4; color: #50526a; box-shadow: inset 3px 0 0 #c9c8e0; }
.bk.past.mine { background: #cfccf6; color: var(--on-pc); }
.bk.active.mine { box-shadow: inset 4px 0 0 var(--lime); }
.bk.focus { outline: 3px solid var(--lime-dd); outline-offset: 1px; }
.bk-t { display: flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; overflow: hidden; }
.bk-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk.tall .bk-t > span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: normal; }
.bk-s { font-size: 11px; font-weight: 500; font-variation-settings: "wdth" 88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk.mine .bk-s { color: #dcdaff; }
.bk.other .bk-s { color: var(--on2); }
.bk.pop { animation: bkPop .55s var(--spring) both; }
@keyframes bkPop { from { transform: scale(.6); opacity: 0; } }

.sel {
  position: absolute; left: 3px; right: 3px; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 12px; border: 2px solid var(--lime-dd);
  background: var(--lime); color: var(--on-lime);
  box-shadow: 0 8px 22px rgba(65, 54, 194, .22);
  transition: top .12s var(--ease), height .12s var(--ease), background-color .2s, border-color .2s;
  animation: selIn .35s var(--spring);
}
.sel.dragging { transition: none; box-shadow: 0 14px 30px rgba(65, 54, 194, .32); }
@keyframes selIn { from { transform: scale(.85); opacity: .4; } }
.sel.bad { background: rgba(255, 218, 214, .6); border-color: var(--err); color: var(--on-ec); }
.sel.bad .sel-l, .sel.bad .sel-len { background: #fff; padding: 1px 6px; border-radius: 6px; position: relative; }
.sel-l { font-size: 14px; font-weight: 700; font-variation-settings: "wdth" 92; line-height: 1.2; }
.sel-len { font-size: 11px; font-weight: 600; line-height: 1.3; }
.sel-h { position: absolute; left: 50%; width: 48px; height: 44px; margin-left: -24px; touch-action: none; cursor: ns-resize; z-index: 2; }
.sel-h::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; border: 3px solid var(--pri); box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.sel.bad .sel-h::after { border-color: var(--err); }
.sel-h.top { top: -22px; }
.sel-h.bot { bottom: -22px; }
.sel-clash {
  position: absolute; left: 3px; right: 3px; z-index: 4; pointer-events: none; border-radius: 10px;
  background: repeating-linear-gradient(135deg, rgba(179, 38, 30, .5) 0 4px, transparent 4px 9px);
}
.now-line { position: absolute; left: 0; right: 0; height: 2px; margin-top: -1px; background: var(--pri); z-index: 1; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--pri); }

.peek {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 12;
  padding: 18px 20px 14px; border-radius: var(--r-l) var(--r-l) 0 0;
  background: var(--sc); box-shadow: 0 -6px 24px rgba(26, 27, 46, .14);
  animation: peekIn .42s var(--spring);
}
@keyframes peekIn { from { transform: translateY(100%); } }
.peek[hidden] { display: none; }
.peek-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.peek-room { display: flex; flex-direction: column; line-height: 1.25; }
.peek-name { font-size: 20px; font-weight: 700; }
.peek-cap { font-size: 13px; color: var(--on2); }
.peek-time { display: flex; align-items: baseline; gap: 4px; font-size: 28px; font-weight: 600; font-variation-settings: "wdth" 110; letter-spacing: -.01em; line-height: 1.1; color: var(--pri); }
.peek-time .dash { color: var(--on2); }
.peek-len { font-size: 13px; font-weight: 600; color: var(--on2); margin-left: 6px; font-variation-settings: "wdth" 100; }
.peek-err, .peek-ok { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.peek-err { background: var(--ec); color: var(--on-ec); }
.peek-ok { background: var(--lime-c); color: var(--on-lime); }
.peek-err .ic, .peek-ok .ic { margin-top: 3px; }
.peek-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.view.peeking .fab { transform: scale(0); opacity: 0; pointer-events: none; }

.fab {
  position: absolute; right: 16px; bottom: 16px; z-index: 11; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 16px;
  background: var(--pc); color: var(--on-pc); font-size: 15px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(46, 37, 150, .22), 0 1px 3px rgba(46, 37, 150, .2);
  transition: transform .35s var(--spring), border-radius .35s var(--spring), opacity .2s;
}
.fab:active { transform: scale(.94); border-radius: 28px; }

/* ---------- シート・ダイアログ・スナックバー ---------- */
.sheet-host, .dialog-host { position: absolute; inset: 0; z-index: 50; }
.dialog-host { z-index: 55; display: grid; place-items: center; padding: 24px; }
.sheet-host[hidden], .dialog-host[hidden] { display: none; }
.scrim { position: absolute; inset: 0; background: rgba(20, 20, 44, .38); opacity: 0; transition: opacity .25s; }
.open .scrim { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%;
  display: flex; flex-direction: column;
  border-radius: var(--r-l) var(--r-l) 0 0; background: #f7f7fd;
  transform: translateY(100%); transition: transform .42s var(--spring);
  padding-bottom: env(safe-area-inset-bottom);
}
.open .sheet { transform: none; }
.sheet-grab { display: grid; place-items: center; height: 28px; flex: none; cursor: grab; touch-action: none; }
.sheet-grab span { width: 36px; height: 4px; border-radius: 2px; background: var(--outline2); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 20px; }
.sheet-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; }
.sheet-head { margin-top: 14px; }
.sheet-title { font-size: 22px; font-weight: 700; line-height: 1.3; }
.sheet-kind { font-size: 14px; font-weight: 500; color: var(--on2); margin-left: 8px; }
.sheet-sub { font-size: 14px; color: var(--on2); margin-top: 2px; }
.sheet-note { margin-top: 10px; font-size: 15px; }
.sheet-actions { margin-top: 18px; }
.eq-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eq-list li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--sf); font-size: 14px; }
.eq-list .ic { color: var(--pri); }

.dialog {
  position: relative; width: 100%; max-width: 340px; padding: 24px 24px 16px;
  border-radius: var(--r-l); background: #f4f3fc; color: var(--on);
  transform: scale(.9); opacity: 0; transition: transform .3s var(--spring), opacity .18s;
  box-shadow: 0 20px 50px rgba(20, 20, 44, .3);
}
.open .dialog { transform: none; opacity: 1; }
.dialog-title { font-size: 21px; font-weight: 600; line-height: 1.35; }
.dialog-body { margin-top: 12px; font-size: 15px; color: var(--on2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 22px; }
.radios { display: flex; flex-direction: column; gap: 4px; }
.radio { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--on); font-size: 15px; }
.radio input { width: 20px; height: 20px; accent-color: var(--pri); flex: none; }

.snack {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px); z-index: 45;
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 6px 6px 18px;
  border-radius: 14px; background: #2f3044; color: #f2f1ff; font-size: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transform: translateY(24px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--spring), opacity .2s;
}
body.pushed .snack { bottom: calc(16px + env(safe-area-inset-bottom)); }
.snack.show { transform: none; opacity: 1; pointer-events: auto; }
.snack-text { flex: 1; line-height: 1.45; }
.snack-act { border: 0; background: transparent; color: #c9c5ff; font-weight: 700; font-size: 14px; min-height: 44px; padding: 0 12px; border-radius: 10px; white-space: nowrap; }

/* ---------- フォーム ---------- */
.bform { display: flex; flex-direction: column; }
.bf-head { display: flex; align-items: center; gap: 14px; }
.bf-ph { width: 72px; height: 72px; object-fit: cover; border-radius: 18px; flex: none; }
.field { display: block; margin-top: 18px; }
.field-l { display: block; font-size: 13px; font-weight: 600; color: var(--on2); margin-bottom: 6px; letter-spacing: .02em; }
.field-in {
  width: 100%; height: 54px; padding: 0 16px; border: 1px solid var(--outline); border-radius: 14px;
  background: var(--sf); font-size: 16px; color: var(--on); outline: none;
}
.field-in:focus { border-color: var(--pri); box-shadow: inset 0 0 0 1px var(--pri); }
.field-in::placeholder { color: #6b6d86; }
.field-err { margin-top: 6px; font-size: 14px; color: var(--err); }
.field-err a { color: var(--pri); font-weight: 600; }
.field-err[hidden] { display: none; }
.field-help { margin-top: 10px; font-size: 14px; color: var(--on2); }
.field-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.field-row .field-l { margin: 0; font-size: 15px; color: var(--on); }
.field-col { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.field-col .field-l { margin: 0; }
.stepper { display: flex; align-items: center; gap: 6px; }
.step-v { min-width: 60px; text-align: center; font-size: 20px; font-weight: 600; font-variation-settings: "wdth" 100; }
.stepper.big .step-v { font-size: 26px; min-width: 70px; }
.rep { margin-top: 6px; }
.rep[hidden] { display: none; }
.occ { list-style: none; margin: 12px 0 0; padding: 4px 12px; border-radius: 16px; background: var(--sf); }
.occ li { display: flex; align-items: center; gap: 8px; min-height: 38px; font-size: 14px; border-bottom: 1px solid var(--line2); }
.occ li:last-child { border-bottom: 0; }
.occ li.ok .ic { color: var(--lime-dd); }
.occ li.ng { color: var(--err); }
.occ-d { font-weight: 600; min-width: 92px; }
.occ-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; margin-top: 4px; }
.switch-row[hidden] { display: none; }
.sw-t { font-size: 15px; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; margin: 0;
  width: 52px; height: 32px; border-radius: 16px; border: 2px solid var(--outline); background: var(--sch);
  transition: background-color .2s, border-color .2s; cursor: pointer;
}
.switch::before {
  content: ""; position: absolute; top: 50%; left: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--outline); transform: translateY(-50%);
  transition: left .3s var(--spring), width .3s var(--spring), height .3s var(--spring), background-color .2s;
}
.switch:checked { background: var(--pri); border-color: var(--pri); }
.switch:checked::before { left: 22px; width: 24px; height: 24px; background: #fff; }
.bform .btn.big { margin-top: 22px; }

/* ---------- 空き検索 ---------- */
.qbox { margin: 0 16px; padding: 16px; border-radius: var(--r-l); background: var(--sc); display: flex; flex-direction: column; gap: 12px; }
.q-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.q-row > div:first-child { flex: 1; min-width: 0; }
.q-l { display: block; font-size: 13px; font-weight: 700; color: var(--on2); letter-spacing: .04em; }
.q-people .q-l { font-size: 16px; color: var(--on); }
.q-hint { display: block; font-size: 13px; color: var(--on2); line-height: 1.4; }
.q-col { display: flex; flex-direction: column; gap: 8px; }
.qbox .chip { background: var(--sf); }
.qbox .chip.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.res-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 22px 20px 6px; }
.res-count { display: flex; align-items: baseline; gap: 4px; font-size: 17px; font-weight: 700; }
.res-n { font-size: 34px; font-weight: 700; font-variation-settings: "wdth" 110; color: var(--pri); line-height: 1; }
.res-when { font-size: 14px; color: var(--on2); font-weight: 500; text-align: right; }
.res-list, .ng-list { list-style: none; margin: 0; padding: 0; }
.res { display: grid; grid-template-columns: 104px 1fr; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.res-ph { width: 104px; height: 120px; object-fit: cover; border-radius: 22px 22px 22px 6px; }
.res-b { min-width: 0; }
.res-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.res-name { font-size: 19px; font-weight: 700; }
.res-kind { font-size: 13px; color: var(--on2); }
.seats { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.seats i { width: 11px; height: 11px; border-radius: 3px; background: var(--sf); box-shadow: inset 0 0 0 1.5px #a9a7d6; }
.seats i.on { background: var(--pri); box-shadow: none; }
.res-fit { font-size: 13px; color: var(--on2); margin-top: 4px; }
.band { position: relative; height: 12px; margin-top: 10px; border-radius: 6px; background: var(--line2); }
.band i { position: absolute; top: 0; bottom: 0; background: #bdbbe0; border-radius: 3px; }
.band b { position: absolute; top: -3px; bottom: -3px; border-radius: 6px; background: var(--lime); box-shadow: 0 0 0 2px var(--lime-dd); }
.band-axis { position: relative; height: 16px; margin-top: 3px; font-size: 11px; color: var(--on2); font-variation-settings: "wdth" 85; }
.band-axis span { position: absolute; top: 0; transform: translateX(-50%); line-height: 1.4; white-space: nowrap; }
.band-axis span:first-child { transform: none; }
.band-axis span:last-child { transform: translateX(-100%); }
.res-go { margin-top: 10px; }
.sec-h { font-size: 15px; font-weight: 700; padding: 24px 20px 8px; color: var(--on); display: flex; align-items: baseline; gap: 8px; }
.sec-sub { font-size: 13px; font-weight: 500; color: var(--on2); }
.ng { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 10px 20px; }
.ng img { width: 56px; height: 56px; object-fit: cover; border-radius: 16px; filter: grayscale(.6); }
.ng-name { display: flex; align-items: baseline; gap: 6px; font-size: 16px; font-weight: 600; }
.ng-cap { font-size: 13px; font-weight: 500; color: var(--on2); }
.ng-why { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.why { padding: 2px 8px; border-radius: 8px; background: var(--ec); color: var(--on-ec); font-size: 12px; font-weight: 500; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 28px 10px; gap: 10px; }
.empty-img { width: 168px; height: 168px; border-radius: 40px; object-fit: cover; }
.empty-t { font-size: 19px; font-weight: 700; }
.empty-s { font-size: 14px; color: var(--on2); }
.alt-list { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 4px; }

/* ---------- 予約詳細 ---------- */
.v-booking .bd-hero { flex: none; height: 232px; background-size: cover; background-position: center; position: relative; }
.bd-hbar { padding: calc(env(safe-area-inset-top) + 8px) 8px 0; }
.bd-scroll { margin-top: -28px; position: relative; z-index: 1; border-radius: var(--r-l) var(--r-l) 0 0; background: var(--bg); }
.bd { padding: 22px 20px 12px; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.st-active { background: var(--lime); color: var(--on-lime); }
.st-up { background: var(--pc); color: var(--on-pc); }
.st-past, .st-cancel { background: var(--sch); color: var(--on2); }
.st-rep, .st-mine { background: var(--sc); color: var(--on2); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime-dd); animation: pulse 1.6s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }
.bd-title { font-size: 24px; font-weight: 700; line-height: 1.35; margin-top: 12px; }
.bd-time { display: flex; align-items: baseline; margin-top: 8px; font-size: 44px; font-weight: 600; font-variation-settings: "wdth" 115; letter-spacing: -.02em; line-height: 1.1; color: var(--pri); }
.bd-dash { color: #6a66c4; margin: 0 6px; }
.bd-date { font-size: 15px; color: var(--on2); margin-top: 4px; }
.live { margin-top: 18px; padding: 16px; border-radius: 24px; background: var(--lime-c); color: var(--on-lime); }
.live-top { display: flex; align-items: baseline; gap: 8px; }
.live-l { font-size: 14px; font-weight: 600; }
.live-v { font-size: 34px; font-weight: 700; font-variation-settings: "wdth" 112; line-height: 1; }
.live-bar { height: 10px; margin-top: 10px; border-radius: 5px; background: rgba(31, 42, 0, .14); overflow: hidden; }
.live-bar i { display: block; height: 100%; border-radius: 5px; background: var(--lime-dd); }
.live-act { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 14px; }
.live-act .btn { padding: 0 6px; font-size: 14px; gap: 2px; }
.live-act .btn.tonal { background: #fff; color: var(--on-pc); }
.live-act .btn.outline.danger { background: transparent; }
.live-note { margin-top: 10px; font-size: 14px; line-height: 1.55; }
.info { list-style: none; margin: 18px 0 0; padding: 0; }
.info > li { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info > li > .ic { color: var(--pri); margin-top: 2px; }
.info .row-tap { padding: 0; min-height: 0; }
.info .row-tap .ic:first-child { color: var(--pri); margin-top: 2px; align-self: flex-start; }
.info-b { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.info-l { font-size: 12px; font-weight: 600; color: var(--on2); letter-spacing: .04em; }
.info-v { font-size: 16px; font-weight: 500; }
.info-sub { display: block; font-size: 14px; font-weight: 400; color: var(--on2); }
.eqs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.eq { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 10px; background: var(--sc); font-size: 13px; }
.series .sec-h { padding-left: 0; padding-right: 0; }
.ser { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ser-a { display: flex; flex-direction: column; padding: 8px 12px; min-height: 44px; border-radius: 14px; background: var(--sc); color: var(--on); text-decoration: none; font-size: 13px; line-height: 1.35; }
.ser li.cur .ser-a { background: var(--pri); color: #fff; }
.bd-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 24px; }
.bd-note { display: flex; gap: 8px; margin-top: 20px; padding: 12px 14px; border-radius: 16px; background: var(--sc); font-size: 14px; color: var(--on2); }
.bd-note .ic { margin-top: 3px; color: var(--pri); }

/* ---------- マイ予約 ---------- */
.tabs { flex: none; display: flex; padding: 0 12px; box-shadow: 0 1px 0 var(--line); background: var(--bg); }
.tab {
  position: relative; overflow: hidden; flex: 1; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: transparent; color: var(--on2); font-size: 15px; font-weight: 600;
}
.tab.on { color: var(--pri); }
.tab.on::after { content: ""; position: absolute; bottom: 0; left: 28%; right: 28%; height: 3px; border-radius: 3px 3px 0 0; background: var(--pri); animation: tabIn .35s var(--spring); }
@keyframes tabIn { from { transform: scaleX(.2); } }
.badge { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pri); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; }
.now-card {
  margin: 16px 16px 4px; padding: 16px; display: grid; grid-template-columns: 60px 1fr 64px; gap: 14px; align-items: center;
  border-radius: var(--r-l); background: var(--pri); color: #fff; text-decoration: none;
  transition: transform .3s var(--spring), border-radius .3s var(--spring);
}
.now-card:active { transform: scale(.98); border-radius: 22px; }
.nc-ph { width: 60px; height: 60px; border-radius: 50% 50% 50% 14px; background-size: cover; background-position: center; }
.nc-b { display: flex; flex-direction: column; min-width: 0; }
.nc-l { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--lime); letter-spacing: .04em; }
.nc-l .pulse { background: var(--lime); }
.nc-t { font-size: 16px; font-weight: 700; line-height: 1.35; margin-top: 2px; }
.nc-m { font-size: 13px; color: #dcdaff; }
.nc-ring { position: relative; width: 64px; height: 64px; }
.nc-ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.rg-bg { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 6; }
.rg-fg { fill: none; stroke: var(--lime); stroke-width: 6; stroke-linecap: round; }
.nc-rv { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 19px; }
.nc-n { font-size: 20px; font-weight: 700; font-variation-settings: "wdth" 100; line-height: 1; }
.nc-u { font-size: 11px; margin-left: 1px; }
.agenda { padding: 0 16px; }
.ag-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 8px; padding: 18px 4px 6px; background: var(--bg); }
.ag-rel { font-size: 17px; font-weight: 700; }
.ag-d { font-size: 14px; font-weight: 500; color: var(--on2); }
.ag-list { list-style: none; margin: 0; padding: 0; }
.ag-item {
  display: grid; grid-template-columns: 50px 4px 1fr; gap: 12px; padding: 10px 4px; min-height: 64px;
  color: var(--on); text-decoration: none; border-radius: 16px;
  transition: background-color .2s, transform .25s var(--spring);
}
.ag-item:active { background: var(--sc); transform: scale(.98); }
.ag-time { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; font-variation-settings: "wdth" 92; }
.ag-s { font-size: 16px; font-weight: 600; }
.ag-e { font-size: 13px; color: var(--on2); }
.ag-rail { border-radius: 2px; background: var(--pri); }
.ag-item.past .ag-rail { background: #bdbbe0; }
.ag-item.active .ag-rail { background: var(--lime-dd); }
.ag-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ag-t { display: flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 500; line-height: 1.4; }
.ag-t .ic { color: var(--pri); }
.ag-m { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--on2); }
.room-pill { padding: 1px 8px; border-radius: 6px; background: var(--pc); color: var(--on-pc); font-weight: 600; }
.tag { padding: 1px 8px; border-radius: 6px; background: var(--sch); color: var(--on2); font-weight: 600; }

/* ---------- 設定・アプリについて ---------- */
.me-card { margin: 0 16px; padding: 16px; display: flex; align-items: center; gap: 14px; border-radius: var(--r-l); background: var(--pc); color: var(--on-pc); }
.avatar { width: 52px; height: 52px; border-radius: 50% 50% 50% 16px; display: grid; place-items: center; background: var(--pri); color: #fff; font-size: 22px; font-weight: 700; flex: none; }
.me-n { font-size: 18px; font-weight: 700; }
.me-d { font-size: 14px; }
.set-list { list-style: none; margin: 0; padding: 0 20px; }
.set-list > li { border-bottom: 1px solid var(--line); }
.set-col { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.set-t { font-size: 16px; }
.set-s { font-size: 14px; color: var(--on2); line-height: 1.5; }
.sw-b { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.danger-t { color: var(--err); font-weight: 500; }
.row-tap {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 0;
  border: 0; background: transparent; color: var(--on); text-decoration: none; text-align: left;
}
.row-tap > .ic:first-child { color: var(--on2); }
.about { padding: 8px 24px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.about-icon { width: 104px; height: 104px; border-radius: 26px; box-shadow: 0 10px 30px rgba(65, 54, 194, .25); }
.about-name { font-size: 26px; font-weight: 700; margin-top: 14px; }
.about-v { font-size: 14px; color: var(--on2); margin-top: 2px; }
.about-note { margin-top: 16px; font-size: 15px; text-align: left; line-height: 1.75; }
.about .sec-h { align-self: stretch; padding: 24px 0 8px; }
.tech { list-style: none; margin: 0 0 24px; padding: 0; align-self: stretch; text-align: left; }
.tech li { padding: 10px 0 10px 18px; border-bottom: 1px solid var(--line); font-size: 15px; position: relative; }
.tech li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 8px; height: 8px; border-radius: 3px; background: var(--lime-dd); }

/* ---------- スプラッシュ・オンボーディング ---------- */
.splash {
  position: absolute; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: #3b36b8; transition: opacity .3s;
}
.splash[hidden] { display: none; }
.splash img { width: 112px; height: 112px; border-radius: 28px; animation: splashIn .6s var(--spring) both; }
.splash-name { color: #fff; font-size: 22px; font-weight: 700; letter-spacing: .12em; }
.splash.bye { opacity: 0; }
@keyframes splashIn { from { transform: scale(.7); opacity: 0; } }
.onboard { position: absolute; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; transition: opacity .3s; }
.onboard[hidden] { display: none; }
.onboard.bye { opacity: 0; }
.ob-ph { flex: 1; min-height: 0; background-size: cover; background-position: center 70%; }
.ob-card { flex: none; margin-top: -32px; position: relative; padding: 24px 24px calc(20px + env(safe-area-inset-bottom)); border-radius: var(--r-l) var(--r-l) 0 0; background: var(--bg); }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--outline2); transition: width .35s var(--spring), background-color .2s; }
.ob-dots i.on { width: 28px; background: var(--pri); }
.ob-t { font-size: 28px; font-weight: 700; line-height: 1.3; margin-top: 16px; }
.ob-s { font-size: 15px; color: var(--on2); margin-top: 10px; min-height: 72px; }
.ob-act { display: flex; justify-content: space-between; margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
}
.res-count { word-break: keep-all; }
