/* 管理画面（全デモサイト共通）
   見た目は全サイトで共通にし、アクセント色・店名・ロゴだけをサイトに合わせる（実際の店舗向けサービスと同じ考え方）。
   PC はサイドバー＋右にプレビュー、スマホは上部バー＋引き出しメニュー、表はカードに組み替える */
:root {
  --acc: #2F6FEB;
  --acc-ink: #fff;
  --bg: #F4F5F7;
  --panel: #fff;
  --ink: #1A1D23;
  --ink-2: #3D434D;
  --muted: #6B7280;
  --line: #E4E6EB;
  --soft: #F1F2F5;
  --ok: #18875A; --ok-bg: #E4F5EC;
  --warn: #B86A00; --warn-bg: #FFF2D9;
  --info: #2D63D6; --info-bg: #E7EFFD;
  --danger: #CC3D3D; --danger-bg: #FCE9E9;
  --mute: #6B7280; --mute-bg: #EFF0F3;
  --r: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .18);
  --side: 248px;
  --top: 64px;
  --jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --num: "Outfit", "Noto Sans JP", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--jp); font-size: 14px; line-height: 1.7; letter-spacing: .01em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ---------- ボタン ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:hover { background: var(--soft); }
.btn--pri { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn--pri:hover { background: var(--acc); filter: brightness(1.08); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); border-color: #F3C4C4; }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn--icon { width: 36px; min-height: 36px; padding: 0; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------- ログイン ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--acc) 16%, transparent), transparent 45%), radial-gradient(circle at 90% 90%, color-mix(in srgb, var(--acc) 10%, transparent), transparent 40%), var(--bg); }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 36px 32px 28px; box-shadow: var(--shadow-lg); text-align: center; }
.login-logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); font-size: 26px; font-weight: 700; overflow: hidden; }
.login-logo svg, .login-logo img { width: 70%; height: 70%; }
.login h1 { font-size: 20px; margin-top: 18px; letter-spacing: .04em; }
.login .login-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.login-acct { display: flex; align-items: center; gap: 12px; text-align: left; margin: 26px 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.login-acct .av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-weight: 700; color: var(--acc); }
.login-acct b { display: block; font-size: 14px; }
.login-acct small { color: var(--muted); font-size: 12px; }
.login .btn { min-height: 48px; font-size: 15px; }
.login-note { margin-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.login-back { display: inline-block; margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- 骨組み ---------- */
.adm { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100svh; }
.adm.has-preview { grid-template-columns: var(--side) minmax(0, 1fr) var(--pv-w, 430px); }
.side { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.brand-logo { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 17px; overflow: hidden; }
.brand-logo svg, .brand-logo img { width: 72%; height: 72%; }
.brand b { display: block; font-size: 14.5px; line-height: 1.35; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.nav { padding: 12px 10px; display: grid; gap: 2px; }
.nav-label { padding: 12px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--acc) 11%, #fff); color: var(--ink); font-weight: 700; }
.nav a[aria-current="page"] .ic { color: var(--acc); }
.nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font-family: var(--num); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding: 12px 10px 16px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.side-foot a, .side-foot button { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: none; text-decoration: none; color: var(--muted); font-size: 13px; text-align: left; }
.side-foot a:hover, .side-foot button:hover { background: var(--soft); color: var(--ink); }
.demo-flag { margin: 0 10px 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: #7A4A00; font-size: 11.5px; line-height: 1.7; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: var(--top); padding: 10px 28px; background: rgba(244, 245, 247, .88); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.is-scrolled { border-bottom-color: var(--line); }
.top-title { min-width: 0; }
.top-title h1 { font-size: 19px; line-height: 1.4; }
.top-title p { font-size: 12.5px; color: var(--muted); }
.top-act { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }
.content { padding: 8px 28px 60px; max-width: 1180px; width: 100%; }

/* ---------- カード・数字 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 15px; }
.card-h .more { margin-left: auto; font-size: 12.5px; color: var(--acc); text-decoration: none; font-weight: 600; background: none; border: 0; padding: 0; }
.card-b { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid--2 { grid-template-columns: 1.15fr .85fr; align-items: start; }
.stat { display: block; padding: 16px 18px; text-decoration: none; transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); transform: translateY(-1px); }
.stat-l { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-l .ic { color: var(--acc); }
.stat-v { font-family: var(--num); font-size: 30px; font-weight: 700; line-height: 1.2; margin-top: 6px; }
.stat-v small { font-family: var(--jp); font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-v--text { font-family: var(--jp); font-size: 19px; line-height: 1.45; margin-top: 10px; }
.stat--alert .stat-v { color: var(--danger); }
.hello { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 18px; margin: 6px 0 18px; }
.hello h2 { font-size: 22px; }
.hello p { color: var(--muted); }
.store-state { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
.store-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.store-state.is-on i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }

/* ---------- 状態ラベル ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--mute-bg); color: var(--mute); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--ok { background: var(--ok-bg); color: var(--ok); }
.chip--warn { background: var(--warn-bg); color: var(--warn); }
.chip--info { background: var(--info-bg); color: var(--info); }
.chip--danger { background: var(--danger-bg); color: var(--danger); }
.chip--plain::before { display: none; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--soft); color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.tag--web { background: color-mix(in srgb, var(--acc) 12%, #fff); color: var(--acc); }

/* ---------- ツールバー・絞り込み ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; min-width: 220px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #E9EBEF; gap: 2px; }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg button .n { font-family: var(--num); margin-left: 4px; color: var(--muted); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; min-height: 40px; padding: 0 14px; border: 0; background: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--acc); }
.tabs .n { font-family: var(--num); font-size: 11.5px; color: var(--muted); margin-left: 4px; }

/* ---------- 表（予約・申込） ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { position: sticky; top: 0; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 14px; background: #FAFAFB; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: #FAFBFD; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.cell-main { font-weight: 700; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.t-date b { font-family: var(--num); font-size: 14px; }
.t-date small { display: block; color: var(--muted); font-size: 11.5px; }
.t-right { text-align: right; }
.cards { display: none; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; margin: 0 auto 10px; color: #B7BCC6; }
.list-foot { padding: 12px 18px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- 一覧（メニュー・商品など） ---------- */
.items { display: grid; }
.item { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; transition: background .15s, opacity .2s; }
.item:last-child { border-bottom: 0; }
.item.is-off { background: #FAFAFB; }
.item.is-off .item-main, .item.is-off .item-thumb { opacity: .55; }
.item.is-drag { opacity: .4; }
.item.is-over { box-shadow: inset 0 2px 0 var(--acc); }
.grip { color: #B4B9C2; cursor: grab; display: grid; place-items: center; border: 0; background: none; padding: 0; width: 22px; height: 32px; }
.grip:active { cursor: grabbing; }
.item-thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; background: var(--soft); border: 1px solid var(--line); }
.item-thumb--none { display: grid; place-items: center; color: #B4B9C2; }
.item-main { min-width: 0; }
.item-main b { display: block; font-size: 14px; line-height: 1.45; }
.item-main span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-main .badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; white-space: normal; }
.item-price { font-family: var(--num); font-weight: 700; font-size: 15px; white-space: nowrap; text-align: right; }
.item-act { display: flex; align-items: center; gap: 6px; }
.item-move { display: flex; flex-direction: column; }
.item-move button { width: 26px; height: 18px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; padding: 0; border-radius: 4px; }
.item-move button:hover { background: var(--soft); color: var(--ink); }
.item-move .ic { width: 14px; height: 14px; }

/* スイッチ */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; user-select: none; }
.field .switch { white-space: normal; line-height: 1.5; align-items: flex-start; }
.field .switch i { margin-top: 1px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { position: relative; width: 36px; height: 21px; border-radius: 99px; background: #D5D9E0; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + i { background: var(--acc); }
.switch.is-danger input:checked + i { background: var(--danger); }
.switch input:checked + i::after { transform: translateX(15px); }
.switch input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ---------- フォーム ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field > span em { font-style: normal; color: var(--danger); margin-left: 4px; font-size: 11px; }
.field small { color: var(--muted); font-size: 12px; }
.input, .field input[type=text], .field input[type=number], .field input[type=date], .field input[type=time], .field input[type=tel], .field input[type=email], .field input[type=url], .field input[type=datetime-local], .field select, .field textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid #D6DAE1; border-radius: 9px; background: #fff; font-size: 14px; line-height: 1.6; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.field .is-invalid { border-color: var(--danger); }
.yen { position: relative; }
.yen::before { content: "¥"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.yen input { padding-left: 26px !important; font-family: var(--num); }
.img-field { display: flex; align-items: center; gap: 12px; }
.img-field img, .img-field .ph { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: var(--soft); }
.img-field .ph { display: grid; place-items: center; color: #B4B9C2; }
.img-field-act { display: flex; flex-wrap: wrap; gap: 6px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 10px; max-height: 300px; overflow-y: auto; padding: 2px; }
.picker button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--soft); aspect-ratio: 1; }
.picker button[aria-pressed="true"] { border-color: var(--acc); }
.picker img { width: 100%; height: 100%; object-fit: cover; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer; }
.check-row input { accent-color: var(--acc); }
.settings-grid { display: grid; gap: 16px; max-width: 760px; }
.settings-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.help { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.hint-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); color: #24418A; font-size: 12.5px; line-height: 1.8; margin-bottom: 16px; }
.hint-box .ic { color: var(--info); margin-top: 3px; }

/* ---------- 引き出し（詳細・編集） ---------- */
.drawer-bg { position: fixed; inset: 0; z-index: 80; background: rgba(15, 18, 25, .38); opacity: 0; transition: opacity .25s; }
.drawer-bg.is-open { opacity: 1; }
.drawer { position: fixed; z-index: 81; top: 0; right: 0; bottom: 0; width: min(500px, 100%); display: flex; flex-direction: column; background: #fff; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.drawer.is-open { transform: none; }
.drawer-h { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { font-size: 17px; line-height: 1.45; }
.drawer-h p { font-size: 12.5px; color: var(--muted); }
.drawer-h .btn--icon { margin-left: auto; flex: none; }
.drawer-b { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-f { display: flex; gap: 8px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #FAFAFB; }
.drawer-f .spacer { flex: 1; }
.dl { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dl div { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.dl div:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.dl dd { white-space: pre-wrap; word-break: break-word; }
.status-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.status-pick button { min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.status-pick button[aria-pressed="true"] { border-color: transparent; }
.status-pick button[aria-pressed="true"][data-tone="ok"] { background: var(--ok); color: #fff; }
.status-pick button[aria-pressed="true"][data-tone="warn"] { background: var(--warn); color: #fff; }
.status-pick button[aria-pressed="true"][data-tone="info"] { background: var(--info); color: #fff; }
.status-pick button[aria-pressed="true"][data-tone="danger"] { background: var(--danger); color: #fff; }
.status-pick button[aria-pressed="true"][data-tone="mute"] { background: var(--mute); color: #fff; }
.sec-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.sec-title:first-child { margin-top: 0; }

/* ---------- カレンダー ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h3 { font-size: 17px; font-family: var(--num); }
.cal-head h3 small { font-family: var(--jp); font-size: 13px; color: var(--muted); margin-left: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 2px; }
.cal-wd:first-child { color: #C0473F; }
.cal-wd:last-child { color: #3A65C9; }
.cal-day { position: relative; min-height: 76px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, background .15s; }
.cal-day:hover:not(:disabled) { border-color: color-mix(in srgb, var(--acc) 50%, var(--line)); }
.cal-day b { font-family: var(--num); font-size: 14px; }
.cal-day.is-sun b { color: #C0473F; }
.cal-day.is-sat b { color: #3A65C9; }
.cal-day.is-today { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.cal-day.is-past { opacity: .45; }
.cal-day.is-base { background: #F6F6F8; }
.cal-day .lab { font-size: 11px; font-weight: 700; line-height: 1.35; padding: 2px 6px; border-radius: 6px; width: fit-content; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cal-day .lab--base { color: var(--muted); background: #ECEDF1; }
.cal-blank { min-height: 76px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* ---------- 空き枠 ---------- */
.slots-wrap { overflow-x: auto; }
.slots { border-collapse: separate; border-spacing: 4px; min-width: 100%; }
.slots th { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px; white-space: nowrap; }
.slots thead th b { display: block; font-family: var(--num); font-size: 15px; color: var(--ink); }
.slots thead th.is-today b { color: var(--acc); }
.slots tbody th { text-align: right; font-family: var(--num); font-size: 13px; color: var(--ink-2); padding-right: 8px; }
.slot { width: 100%; min-width: 64px; min-height: 42px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; line-height: 1.25; transition: transform .1s, border-color .15s; }
.slot:hover { border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); }
.slot:active { transform: scale(.96); }
.slot small { display: block; font-size: 10.5px; font-weight: 600; opacity: .75; }
.slot.is-set { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--acc) 55%, transparent); }
.pop { position: fixed; z-index: 90; min-width: 170px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 2px; }
.pop button { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13px; font-weight: 600; }
.pop button:hover { background: var(--soft); }
.pop button[aria-pressed="true"] { background: color-mix(in srgb, var(--acc) 11%, #fff); }
.pop i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- ダッシュボード ---------- */
.agenda li { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.agenda li:hover { background: #FAFBFD; }
.agenda li:last-child { border-bottom: 0; }
.agenda .tm { font-family: var(--num); font-weight: 700; font-size: 15px; }
.agenda .what b { display: block; font-size: 13.5px; }
.agenda .what span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed li { display: flex; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); margin-top: 8px; flex: none; }
.feed .dot--web { background: var(--danger); }
.feed time { display: block; font-size: 11.5px; color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 120px; padding-top: 8px; }
.bars div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bars i { display: block; flex: none; width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--acc) 30%, #fff); }
.bars div:last-child i { background: var(--acc); }
.bars span { font-size: 11px; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- プレビュー ---------- */
.pv { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; background: #E8EAEE; border-left: 1px solid var(--line); }
.pv-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.pv-h b { font-size: 13px; }
.pv-h .seg { margin-left: auto; }
.pv-b { flex: 1; overflow: hidden; display: grid; place-items: start center; padding: 16px; }
.pv-phone { width: 375px; max-width: 100%; height: 100%; border-radius: 30px; border: 10px solid #1A1D23; overflow: hidden; background: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.pv-phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.pv-pc { width: 100%; height: 100%; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .15); position: relative; }
.pv-pc iframe { position: absolute; top: 0; left: 0; width: 1280px; border: 0; transform-origin: 0 0; }
.pv-note { padding: 0 16px 14px; font-size: 11.5px; color: var(--muted); text-align: center; }

/* ---------- お知らせ（トースト） ---------- */
.toast { position: fixed; z-index: 95; left: 50%; bottom: 24px; transform: translate(-50%, 20px); display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 16px; border-radius: 12px; background: #1A1D23; color: #fff; font-size: 13.5px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; max-width: calc(100% - 24px); }
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast .ic { color: #6EE7A8; }
.toast a { color: #9EC5FF; font-weight: 700; white-space: nowrap; }
.confirm-box { position: fixed; z-index: 96; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15, 18, 25, .45); }
.confirm-box > div { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--shadow-lg); }
.confirm-box h2 { font-size: 16px; }
.confirm-box p { color: var(--ink-2); margin-top: 8px; font-size: 13.5px; }
.confirm-box .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---------- スマホ・タブレット ---------- */
@media (max-width: 1280px) {
  .adm.has-preview { grid-template-columns: var(--side) minmax(0, 1fr); }
  .adm.has-preview .pv { position: fixed; z-index: 70; right: 0; top: 0; bottom: 0; width: min(430px, 100%); box-shadow: var(--shadow-lg); }
}
@media (max-width: 960px) {
  .adm, .adm.has-preview { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 75; left: 0; top: 0; width: min(290px, 86vw); transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
  .adm.nav-open .side { transform: none; }
  .nav-bg { position: fixed; inset: 0; z-index: 74; background: rgba(15, 18, 25, .38); }
  .menu-toggle { display: inline-flex; }
  .top { padding: 10px 16px; }
  .content { padding: 4px 16px 90px; }
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .adm.has-preview .pv { width: 100%; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .top-title h1 { font-size: 17px; }
  .top-title p { display: none; }
  .top-act .btn .lbl { display: none; }
  .top-act .btn { width: 38px; padding: 0; }
  .grid--stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat-v { font-size: 24px; }
  .hello h2 { font-size: 18px; }
  .toolbar { gap: 8px; }
  .search { min-width: 0; flex: 1 1 100%; }
  .toolbar .seg { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .table-wrap { display: none; }
  .cards { display: grid; }
  .rcard { display: grid; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
  .rcard:last-child { border-bottom: 0; }
  .rcard.is-new { box-shadow: inset 3px 0 0 var(--danger); }
  .rcard-top { display: flex; align-items: center; gap: 8px; }
  .rcard-top .chip { margin-left: auto; }
  .rcard-when { font-family: var(--num); font-weight: 700; }
  .rcard-name { font-weight: 700; font-size: 15px; }
  .rcard-sub { font-size: 12.5px; color: var(--muted); }
  .item { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .item .grip { display: none; }
  .item-price { grid-column: 3; grid-row: 1; }
  .item-act { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
  .form-row { grid-template-columns: 1fr; }
  .drawer { top: auto; height: min(92svh, 100%); width: 100%; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .cal-grid { gap: 4px; }
  .cal-day { min-height: 58px; padding: 5px; border-radius: 8px; }
  .cal-day .lab { font-size: 9px; padding: 1px 3px; letter-spacing: -.02em; }
  .stat-l { font-size: 11.5px; align-items: flex-start; }
  .agenda li { grid-template-columns: 50px minmax(0, 1fr) auto; padding: 10px 14px; }
  .dl div { grid-template-columns: 6.5em minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
