/* TSUYA（つや）体験版 — 白 × グレージュ × 墨 × テラコッタ */
:root {
  --bg: #F8F6F2;
  --paper: #FFFFFF;
  --greige: #EAE4DC;
  --greige-2: #DDD5CA;
  --line: #E3DCD3;
  --ink: #2B2B2B;
  --muted: #6B655F;
  --accent: #B5654A;
  --accent-d: #974F37;
  --accent-l: #F5E9E3;
  --ok: #5E7A63;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 43, 43, .05), 0 6px 24px rgba(43, 43, 43, .06);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .02em;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p, dl, dd { margin: 0; }

/* ===== 体験版の帯 ===== */
.demo-band {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px;
  padding: 7px 16px;
  background: var(--ink); color: #F3EFEA;
  font-size: 12.5px; line-height: 1.55;
}
.demo-band p { flex: 1 1 420px; min-width: 0; }
.demo-band a { white-space: nowrap; text-underline-offset: 3px; }

/* ===== ヘッダー ===== */
.app-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 18px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.brand-logo { font-family: var(--serif); font-size: 26px; letter-spacing: .32em; line-height: 1.2; }
.brand-ja { font-size: 12.5px; color: var(--muted); letter-spacing: .08em; }
.view-tabs { display: flex; background: var(--greige); border-radius: 999px; padding: 4px; gap: 4px; }
.view-tabs button {
  border: 0; background: transparent; border-radius: 999px;
  padding: 8px 18px; min-height: 44px; font-size: 15px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; line-height: 1.25;
}
.view-tabs button small { font-size: 11px; font-weight: 400; color: var(--muted); }
.view-tabs button[aria-selected="true"] { background: var(--paper); box-shadow: var(--shadow); }
.reset-btn {
  border: 1px solid var(--greige-2); background: transparent; border-radius: 999px;
  padding: 8px 16px; min-height: 44px; font-size: 14px; color: var(--muted);
}
.reset-btn:hover { border-color: var(--accent); color: var(--accent-d); }

.app { padding: 28px 16px 64px; }

/* ===== 共通部品 ===== */
.label {
  display: inline-block; font-size: 11px; letter-spacing: .32em; color: var(--accent);
  font-weight: 600; margin-bottom: 2px;
}
.h2 { font-size: 21px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; }
.lead { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.small { font-size: 13px; color: var(--muted); }
.sub { font-size: 14px; color: var(--muted); font-weight: 600; margin: 20px 0 8px; }
.en { font-size: 10.5px; letter-spacing: .3em; color: var(--muted); font-weight: 500; margin-left: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--paper); font-size: 15px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-d); border-color: var(--accent-d); }
.btn.ghost { border-color: var(--greige-2); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn.danger { border-color: #C9A79A; color: var(--accent-d); }
.btn.sm { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.btn:disabled { opacity: .4; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.tag {
  display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 7px;
  border-radius: 999px; background: var(--accent-l); color: var(--accent-d); font-weight: 600;
  white-space: nowrap; vertical-align: middle;
}
.tag.gray { background: var(--greige); color: var(--muted); }

.av {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  color: #fff; font-family: var(--serif); font-size: 18px; letter-spacing: 0;
}
.av.sm { width: 28px; height: 28px; font-size: 13px; }
.av.lg { width: 56px; height: 56px; font-size: 22px; }
.av.any { background: var(--greige); color: var(--muted); font-family: var(--font); font-size: 11px; letter-spacing: .1em; }
.av.cust { background: var(--greige); color: var(--ink); }

.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--paper); border-radius: var(--radius); border: 1px dashed var(--greige-2); }
.err { color: #A2412A; font-size: 14px; margin-top: 6px; }
.notice { background: var(--accent-l); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.notice.gray { background: var(--greige); }

/* ===== お客様の画面（スマホ枠） ===== */
.phone {
  max-width: 440px; margin: 0 auto;
  background: var(--paper); border-radius: 28px; box-shadow: var(--shadow);
  overflow: hidden; border: 1px solid var(--line);
}
.phone-top { padding: 22px 20px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.salon-mark { display: flex; flex-direction: column; align-items: center; margin-bottom: 14px; }
.salon-en { font-size: 10.5px; letter-spacing: .4em; color: var(--muted); }
.salon-name { font-family: var(--serif); font-size: 24px; letter-spacing: .38em; line-height: 1.3; margin-right: -.38em; }
.salon-note { font-size: 11px; color: var(--muted); }
.seg { display: flex; background: var(--greige); border-radius: 999px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 999px; min-height: 44px; font-size: 15px; font-weight: 600; }
.seg button[aria-selected="true"] { background: var(--paper); box-shadow: var(--shadow); }
.persona { font-size: 12.5px; color: var(--muted); background: var(--bg); padding: 8px 20px; text-align: center; }
.phone-body { padding: 22px 20px 0; font-size: 16.5px; }
.phone-body .pad-b { padding-bottom: 24px; }

.stepper { display: flex; gap: 4px; margin-bottom: 22px; list-style: none; padding: 0; }
.stepper li { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); }
.stepper li::before { content: ""; display: block; height: 3px; border-radius: 2px; background: var(--greige); margin-bottom: 6px; }
.stepper li.done::before, .stepper li.now::before { background: var(--accent); }
.stepper li.now { color: var(--ink); font-weight: 700; }

.menu-list { display: grid; gap: 10px; }
.menu-item {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 14px;
}
.menu-item.on { border-color: var(--accent); background: var(--accent-l); }
.mi-check { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--greige-2); margin-top: 2px; position: relative; }
.menu-item.on .mi-check { background: var(--accent); border-color: var(--accent); }
.menu-item.on .mi-check::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mi-name { font-weight: 700; font-size: 16.5px; }
.mi-desc { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.mi-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; color: var(--muted); }
.mi-meta strong { color: var(--ink); font-size: 16px; }

.sty-list { display: grid; gap: 10px; }
.sty-item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 14px;
}
.sty-item.on { border-color: var(--accent); background: var(--accent-l); }
.sty-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.55; }
.sty-name { font-weight: 700; font-size: 17px; }
.sty-role { font-size: 12.5px; color: var(--muted); }
.sty-tag { font-size: 13.5px; }
.sty-fee { flex: none; font-size: 13px; text-align: right; color: var(--muted); }
.sty-fee strong { display: block; color: var(--ink); font-size: 15px; }

.date-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -2px 8px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.date-chip {
  flex: none; width: 70px; scroll-snap-align: start;
  border: 1px solid var(--line); background: var(--paper); border-radius: 12px;
  padding: 8px 4px; display: flex; flex-direction: column; align-items: center; line-height: 1.35;
}
.date-chip .dc-m { font-size: 11px; color: var(--muted); }
.date-chip .dc-d { font-size: 20px; font-weight: 700; }
.date-chip .dc-w { font-size: 12px; }
.date-chip .dc-n { font-size: 11.5px; margin-top: 4px; color: var(--accent-d); font-weight: 600; }
.date-chip.sun .dc-w { color: #A2412A; }
.date-chip.sat .dc-w { color: #3F5E80; }
.date-chip.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.date-chip.on .dc-m, .date-chip.on .dc-n, .date-chip.on .dc-w { color: #fff; }
.date-chip:disabled { background: var(--bg); color: #B4ACA3; }
.date-chip:disabled .dc-n { color: #B4ACA3; font-weight: 400; }

.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.time-btn {
  min-height: 48px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px;
  font-size: 16px; font-weight: 600;
}
.time-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--greige-2); background: var(--paper); font-size: 16px;
}
.field textarea { min-height: 76px; resize: vertical; line-height: 1.6; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.check-list { display: grid; gap: 2px; }

.sum-dl { display: grid; grid-template-columns: 7em 1fr; gap: 10px 12px; font-size: 15.5px; }
.sum-dl dt { color: var(--muted); font-size: 14px; }
.sum-dl dd { min-width: 0; overflow-wrap: anywhere; }
.sum-dl .total { font-size: 19px; font-weight: 700; }
.deadline { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 14.5px; }
.deadline strong { color: var(--accent-d); }

.book-bar {
  position: sticky; bottom: 0; margin: 24px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.bb-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; font-size: 12.5px; color: var(--muted); }
.bb-sum strong { font-size: 19px; color: var(--ink); }
.bb-btns { display: flex; gap: 8px; }
.bb-btns .btn { padding: 10px 18px; }

.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-l); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 8px auto 14px; font-size: 30px; }
.center { text-align: center; }

.res-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: var(--paper); }
.res-card.cancelled { background: var(--bg); color: var(--muted); }
.rc-date { font-size: 18px; font-weight: 700; line-height: 1.4; }
.rc-date span { display: block; font-size: 15px; font-weight: 600; color: var(--muted); }
.res-card .sum-dl { margin-top: 10px; grid-template-columns: 4.5em 1fr; font-size: 15px; }
.res-card .btn-row { margin-top: 14px; }
.res-card .btn-row .btn { flex: 1; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.history .h-date { flex: none; width: 6.4em; font-size: 14px; color: var(--muted); }
.history .h-body { flex: 1; min-width: 0; font-size: 15px; }
.section-gap { margin-top: 30px; }

/* ===== お店の画面 ===== */
.shop { max-width: 1180px; margin: 0 auto; }
.shop-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.shop-nav button {
  border: 0; background: transparent; padding: 10px 14px 12px; min-height: 48px;
  font-size: 15.5px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3;
}
.shop-nav button small { font-size: 10px; letter-spacing: .3em; font-weight: 500; }
.shop-nav button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.shop-nav button[aria-selected="true"] small { color: var(--accent); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.kpis { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.kpis strong { font-size: 18px; color: var(--ink); margin-left: 6px; }

.sched { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 12px 16px; }
.sched-head, .sched-grid { display: grid; grid-template-columns: 46px repeat(4, minmax(0, 1fr)); }
.sched-head { position: sticky; top: var(--band-h, 52px); z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.sh-col { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; text-align: center; min-width: 0; padding: 0 2px; line-height: 1.35; }
.sh-col em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; }
.sched-grid { position: relative; padding-top: 8px; }
.sg-times { position: relative; }
.sg-times span { position: absolute; right: 8px; font-size: 11.5px; color: var(--muted); transform: translateY(-50%); }
.sg-col {
  position: relative; border-left: 1px solid var(--line); min-width: 0;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% 72px;
}
.sg-col.off { background-color: #F3F0EB; background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0,0,0,.035) 8px 9px); }
.sg-slot { position: absolute; left: 0; right: 0; border: 0; background: transparent; padding: 0; }
.sg-slot:hover, .sg-slot:focus-visible { background: var(--accent-l); }
.sg-slot:hover::after, .sg-slot:focus-visible::after { content: "＋"; color: var(--accent); font-size: 14px; }
.blk {
  position: absolute; left: 3px; right: 3px; z-index: 2; overflow: hidden;
  border: 0; border-left: 3px solid var(--greige-2); border-radius: 6px;
  background: var(--greige); text-align: left; padding: 3px 6px; font-size: 12px; line-height: 1.35;
  display: flex; flex-direction: column; gap: 1px;
}
.blk.nom { border-left-color: var(--accent); background: var(--accent-l); }
.blk.done { opacity: .62; }
.blk.short { flex-direction: row; align-items: center; gap: 4px; padding-top: 0; padding-bottom: 0; }
.blk.short .blk-time, .blk.short .blk-menu, .blk.short .blk-tags { display: none; }
.blk:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.blk-time { font-size: 11px; color: var(--muted); }
.blk-name { font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk-menu { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-tags { display: flex; flex-wrap: wrap; gap: 2px; }
.blk .tag { font-size: 10px; padding: 0 5px; }
.now-line { position: absolute; left: 40px; right: 0; height: 0; border-top: 2px solid var(--accent); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* カルテ */
.karte { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.k-list { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; position: sticky; top: calc(var(--band-h, 52px) + 12px); }
.k-search { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--greige-2); font-size: 16px; margin-bottom: 10px; }
.k-items { max-height: 62vh; overflow-y: auto; display: grid; gap: 2px; }
.k-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 8px; min-height: 56px; }
.k-item:hover { background: var(--bg); }
.k-item.on { background: var(--accent-l); }
.k-item .ki-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.k-item .ki-name { font-weight: 700; font-size: 15px; }
.k-item .ki-sub { font-size: 12px; color: var(--muted); }
.k-detail { min-width: 0; }
.k-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
.k-head .kh-main { flex: 1; min-width: 160px; }
.k-head h3 { font-size: 22px; font-weight: 600; }
.k-head p { font-size: 13.5px; color: var(--muted); }
.k-memo { font-size: 14.5px; background: var(--bg); padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; overflow-wrap: anywhere; }
.k-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 12px; }
.k-sec-head h4 { font-size: 17px; font-weight: 600; margin: 0; }
.rec { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--paper); }
.rec header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; }
.rec header strong { font-size: 16px; }
.rec header .who { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.rec header .btn { margin-left: auto; }
.rec-menu { font-size: 14.5px; margin-bottom: 8px; }
.rec-dl { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 6px 12px; font-size: 14.5px; }
.rec-dl dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.rec-dl dd { overflow-wrap: anywhere; white-space: pre-wrap; }
.rec-dl dd.formula { font-family: ui-monospace, "SFMono-Regular", Consolas, var(--font); font-size: 14px; background: var(--bg); border-radius: 6px; padding: 2px 8px; }
.back-link { display: none; }

/* お知らせ候補 */
.rules { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rules span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13.5px; }
.rv-list { display: grid; gap: 10px; }
.rv-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; }
.rv-main { min-width: 0; line-height: 1.5; }
.rv-name { font-weight: 700; font-size: 16px; }
.rv-sub { font-size: 13px; color: var(--muted); }
.rv-days { text-align: right; font-size: 13px; color: var(--muted); line-height: 1.4; white-space: nowrap; }
.rv-days strong { display: block; font-size: 18px; color: var(--accent-d); }
.draft { width: 100%; min-height: 240px; border: 1px solid var(--greige-2); border-radius: 10px; padding: 12px; font-size: 15px; line-height: 1.75; resize: vertical; }

/* 集計 */
.stat-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-totals .card { padding: 16px; }
.stat-totals p { font-size: 13px; color: var(--muted); }
.stat-totals strong { font-size: 22px; font-weight: 600; }
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; }
.bar-who { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; min-width: 0; }
.bar-track { display: flex; height: 22px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.bar-done { background: var(--accent); }
.bar-plan { background: repeating-linear-gradient(135deg, #D9A893 0 6px, #E8C6B7 6px 12px); }
.bar-nom { background: #8B8178; }
.bar-num { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.bar-num strong { color: var(--ink); font-size: 15px; }

/* ===== モーダル ===== */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(43, 43, 43, .42); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 560px; background: var(--paper); border-radius: 18px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-box h3 { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.modal-box .btn-row { margin-top: 20px; }
.modal-box .sum-dl { grid-template-columns: 6em 1fr; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14.5px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 24px; text-align: center; }

/* ===== 狭い画面 ===== */
@media (max-width: 860px) {
  .karte { grid-template-columns: minmax(0, 1fr); }
  .k-list { position: static; }
  .karte.has-sel .k-list { display: none; }
  .back-link { display: flex; width: fit-content; margin-bottom: 14px; }
  .k-items { max-height: none; }
}
@media (max-width: 640px) {
  .demo-band { font-size: 11.5px; padding: 6px 12px; }
  .app-head { padding: 14px 16px; gap: 10px; }
  .brand-logo { font-size: 22px; }
  .view-tabs { width: 100%; }
  .view-tabs button { flex: 1; padding: 6px 8px; }
  .reset-btn { width: 100%; }
  .app { padding: 18px 12px 48px; }
  .phone { border-radius: 20px; }
  .phone-body { padding: 18px 16px 0; }
  .book-bar { margin: 20px -16px 0; padding-left: 16px; padding-right: 16px; }
  .bb-btns .btn { padding: 10px 14px; }
  .sched { padding: 8px 6px 12px; }
  .sched-head, .sched-grid { grid-template-columns: 34px repeat(4, minmax(0, 1fr)); }
  .sh-col { font-size: 11px; }
  .sg-times span { right: 4px; font-size: 10px; }
  .now-line { left: 30px; }
  .blk { left: 1px; right: 1px; padding: 2px 3px; }
  .blk-name { font-size: 11px; }
  .blk-time, .blk-menu { font-size: 9.5px; }
  .rv-item { grid-template-columns: 44px minmax(0, 1fr); }
  .rv-days { grid-column: 2; text-align: left; }
  .rv-item .btn { grid-column: 1 / -1; }
  .stat-totals { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rec-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rec-dl dd { margin-bottom: 6px; }
  .modal { padding: 16px 10px; }
  .modal-box { padding: 20px 16px; }
  .shop-nav button { padding: 8px 10px 10px; font-size: 14.5px; }
}
