/* 鮨割烹 たか友 店舗管理システム — 画面のスタイル(デモ v2 のデザインを本番用に移植) */
/* ============================================================
   デザイントークン v2 — 「メジャーアプリの作法 × 和の色」
   枠線ではなく、余白と面(淡い塗り)で画面を整理する。
   文字サイズとコントラストは50〜60代前提を崩さない。
   ============================================================ */
:root {
  --bg: #F7F5F0;          /* 地: 生成りを少し明るく */
  --card: #FFFFFF;
  --ink: #211F1C;         /* 墨 */
  --sub: #57534B;         /* 鈍色(白地で7:1) */
  --line: #ECE8DF;        /* 罫線は最小限にだけ使う */
  --ai: #1C4A66;          /* 藍: 主役 */
  --ai-deep: #163B52;
  --ai-tint: #E8EFF4;     /* 藍の淡い面(第二ボタン・チップ) */
  --ai-wash: #F0F5F8;
  --shu: #AD2E24;         /* 朱: 危険・注意のみ */
  --warn-bg: #FBEAE8; --warn-line: #E5B7B2;
  --ok: #2D6A4A; --ok-bg: #E8F1EC;
  --gold: #C4A052;
  --shadow-s: 0 1px 2px rgba(33, 31, 28, .05), 0 2px 8px rgba(33, 31, 28, .05);
  --shadow-m: 0 2px 6px rgba(33, 31, 28, .06), 0 8px 24px rgba(33, 31, 28, .07);
  --r-card: 16px; --r-btn: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  /* Windowsでは游ゴシックが細く印刷で薄いため、Meiryo を先に指定する */
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", "Yu Gothic", sans-serif;
  font-size: 18px; line-height: 1.8;
}
button, a, select, input { touch-action: manipulation; } /* ダブルタップ拡大の抑止 */
.mincho { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 600; letter-spacing: .04em; }
#app { max-width: 720px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }


/* ------- 画面遷移のなじみ(控えめに) ------- */
@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise .2s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ------- ボタン(枠線をやめ、塗りで階層をつくる) ------- */
.primary {
  width: 100%; min-height: 56px; background: var(--ai); color: #FFF; border: none;
  border-radius: var(--r-btn); font-size: 19px; font-weight: 700; letter-spacing: .06em;
  cursor: pointer; font-family: inherit; box-shadow: var(--shadow-s);
  transition: transform .12s ease, background .12s ease;
}
.primary:active { transform: scale(.98); background: var(--ai-deep); }
.ghost, .minibtn {
  font-size: 16px; font-weight: 700; color: var(--ai); background: var(--ai-tint); border: none;
  border-radius: var(--r-btn); padding: 10px 16px; min-height: 44px; cursor: pointer; font-family: inherit;
  white-space: nowrap; flex: none; transition: transform .12s ease, background .12s ease;
}
.ghost:active, .minibtn:active { transform: scale(.97); }
.minibtn { font-size: 15px; min-height: 44px; }
.minibtn.pay { background: var(--ai); color: #FFF; box-shadow: var(--shadow-s); }
.minibtn.pay:active { background: var(--ai-deep); }
.minibtn.tel { background: #FFF; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.primary:focus-visible, .ghost:focus-visible, .minibtn:focus-visible, .navbtn:focus-visible,
.datebtn:focus-visible, .segc button:focus-visible { outline: 3px solid rgba(28,74,102,.5); outline-offset: 2px; }

/* ------- 入力 ------- */
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 15px; font-weight: 700; color: var(--sub); margin-bottom: 7px; }
input, select, textarea {
  width: 100%; min-height: 54px; background: #FFF; border: 1.5px solid #DDD8CC;
  border-radius: var(--r-btn); font-size: 20px; padding: 10px 14px; color: var(--ink); font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--ai); outline: 3px solid rgba(28,74,102,.3); outline-offset: 1px; }
.search-wrap { position: relative; margin-bottom: 16px; }
.search-wrap input { border-radius: 999px; padding-left: 48px; background: #FFF; }
.search-wrap::before { content: "🔍"; position: absolute; left: 17px; top: 50%; transform: translateY(-50%); font-size: 17px; opacity: .55; }

/* ------- シェル ------- */
header.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.brand { font-size: 21px; }
.who { font-size: 13.5px; color: var(--sub); display: block; line-height: 1.4; }
main { flex: 1; padding: 20px 18px 30px; }
h2.screen { font-size: 24px; font-weight: 700; margin: 0 0 14px; letter-spacing: .01em; }
.card { background: var(--card); border: none; border-radius: var(--r-card); padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-s); }
.card .t { font-size: 18px; font-weight: 700; margin: 0 0 10px; }

nav.bottom {
  position: sticky; bottom: 0; z-index: 30; display: flex;
  background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); /* iPadのホームバーを避ける */
}
.navbtn {
  flex: 1; min-height: 66px; background: none; border: none; font-size: 13.5px; font-weight: 700;
  color: var(--sub); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; font-family: inherit; position: relative; transition: color .12s ease;
}
.navbtn svg { width: 26px; height: 26px; }
.navbtn.on { color: var(--ai); }
.nbadge {
  position: absolute; top: 7px; left: calc(50% + 6px);
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: #D2382C; color: #FFF; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ------- 丸いイニシャル(電話帳の作法) ------- */
.av {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ai-tint); color: var(--ai);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700;
}
.av.lg { width: 54px; height: 54px; font-size: 23px; }
.av.guest { background: #EFEBE0; color: var(--sub); }

/* ------- チップ(枠線なしの淡い面) ------- */
.chip { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 12px; margin: 3px 5px 0 0; white-space: nowrap; border: none; }
.c-warn { background: var(--warn-bg); color: var(--shu); }
.c-soft { background: var(--ai-tint); color: var(--ai); }
.c-rank { background: var(--ai); color: #FFF; }
.c-plain { background: #EFEBE0; color: var(--sub); }
.c-ok { background: var(--ok-bg); color: var(--ok); }
button.chip { cursor: pointer; font-family: inherit; min-height: 32px; transition: transform .12s ease; }
button.chip:active { transform: scale(.95); }

/* ------- 予約 ------- */
.todo { background: var(--warn-bg); border: none; border-radius: var(--r-card); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow-s); }
.todo .tt { font-size: 16.5px; font-weight: 700; color: var(--shu); margin-bottom: 3px; }
.todo .ti { font-size: 14.5px; line-height: 1.7; }
.datenav { display: flex; align-items: stretch; gap: 10px; margin-bottom: 12px; }
.datebtn {
  flex: none; width: 56px; background: #FFF; border: none; color: var(--ai);
  border-radius: var(--r-btn); font-size: 24px; font-weight: 700; cursor: pointer; font-family: inherit;
  min-height: 58px; box-shadow: var(--shadow-s); transition: transform .12s ease;
}
.datebtn:active { transform: scale(.94); }
.datenow {
  flex: 1; background: #FFF; border: none; border-radius: var(--r-btn); box-shadow: var(--shadow-s);
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; line-height: 1.3;
}
.datenow .d { font-size: 21px; font-weight: 700; }
.datenow .tag { font-size: 12.5px; font-weight: 700; color: var(--ai); }
.daterow { display: flex; gap: 8px; margin-bottom: 16px; }
.daterow input[type="date"] { min-height: 48px; font-size: 16px; background: transparent; border-color: transparent; color: var(--sub); font-weight: 700; }
.daterow input[type="date"]:focus { background: #FFF; }
.daterow .ghost { min-height: 48px; }

.sum { background: linear-gradient(135deg, var(--ai) 0%, #27587A 100%); color: #FFF; border: none; border-radius: var(--r-card); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow-m); }
.sum .st { font-size: 14px; font-weight: 700; opacity: .8; margin-bottom: 4px; letter-spacing: .04em; }
.sum .big { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.sum .cline { font-size: 15.5px; padding: 2px 0; opacity: .95; }
.sum .cline b { font-variant-numeric: tabular-nums; }
.sum-alert { background: rgba(255,255,255,.94); border-radius: 12px; padding: 10px 14px; margin-top: 12px; }
.sum-alert .al { font-size: 15.5px; font-weight: 700; color: var(--shu); display: block; line-height: 1.6; }

.res-row { padding: 15px 2px; border-bottom: 1px solid var(--line); }
.res-row:last-child { border-bottom: none; }
.res-namewrap { display: flex; align-items: center; gap: 10px; }
.res-title { min-width: 0; }
/* 時刻は左の列にせず、お名前と同じ行に置く(スマホで幅を無駄にしないため) */
.res-line1 { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.res-time { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.namebtn {
  background: none; border: none; padding: 0; font-family: inherit; font-size: 19px; font-weight: 700;
  color: var(--ai); cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 2px;
}
.namebtn .chev { font-size: 15px; opacity: .6; }
.res-meta { font-size: 15px; color: var(--sub); }
.rowbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* 電話ボタン: 広い画面では番号を、スマホでは「電話」とだけ表示する */
.minibtn.tel .tel-sp { display: none; }
.done { color: var(--ok); font-size: 16px; font-weight: 700; margin: 10px 0 0; }
.muted { color: var(--sub); font-size: 15px; }

.up-row { display: flex; align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; font-family: inherit; color: var(--ink); min-height: 56px; }
.up-row:last-child { border-bottom: none; }
.up-date { flex: 1; font-size: 18px; font-weight: 700; }
.up-sub { font-size: 15px; color: var(--sub); font-weight: 400; }
.arrow { color: #B9B2A2; font-size: 20px; }

/* ------- お客さま ------- */
.cust-row { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; font-family: inherit; color: var(--ink); }
.cust-row:last-child { border-bottom: none; }
/* お名前の欄はチップに幅を奪わせない(min-width:0で潰れ防止)。チップは名前の下の行に置く */
.cust-body { flex: 1; min-width: 0; }
.cust-name { font-size: 19px; font-weight: 700; }
.cust-kana { font-size: 13.5px; color: var(--sub); display: block; font-weight: 400; }
.cust-sub { font-size: 13.5px; color: var(--sub); display: block; font-weight: 400; }
.cust-chips { display: block; margin-top: 3px; }
.backbtn { background: none; border: none; color: var(--ai); font-size: 17px; font-weight: 700; padding: 6px 0; margin-bottom: 8px; cursor: pointer; font-family: inherit; }

/* ------- カルテ ------- */
.karte-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.karte-head h2 { margin: 0; font-size: 23px; font-weight: 700; }
.alert-band { background: var(--warn-bg); border: none; border-radius: var(--r-card); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow-s); }
.alert-band .lb { font-size: 14.5px; font-weight: 700; color: var(--shu); display: block; }
.alert-band .val { font-size: 22px; font-weight: 700; color: var(--shu); }
.k-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.k-row:last-child { border-bottom: none; }
.k-row .k { flex: 0 0 92px; font-size: 13.5px; font-weight: 700; color: var(--sub); }
.k-row .v { font-size: 17px; flex: 1; }
.k-row .v .kana { font-size: 13.5px; color: var(--sub); display: block; }
.visit { padding: 14px 0; border-bottom: 1px solid var(--line); }
.visit:last-child { border-bottom: none; }
.visit-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.visit-date { font-size: 17.5px; font-weight: 700; }
.visit-sub { font-size: 15px; color: var(--sub); }
.visit-course { font-size: 16.5px; font-weight: 700; margin-top: 4px; }
.visit-detail { font-size: 14.5px; color: var(--sub); line-height: 1.7; }
.visit-amount { font-size: 16px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ctx-note { background: var(--ai-tint); border-radius: var(--r-card); padding: 14px 18px; font-size: 15px; color: var(--ai-deep); margin-bottom: 14px; }

/* ------- 会計 ------- */
.bill-line { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 17px; gap: 10px; }
.bill-line:last-child { border-bottom: none; }
.bill-line .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 2px; border-top: 2px solid var(--ink); margin-top: 6px; }
.bill-total .lb { font-size: 18px; font-weight: 700; }
.bill-total .amt { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 9px; margin-bottom: 12px; }
.itembtn {
  background: var(--ai-tint); border: none; color: var(--ai-deep); border-radius: var(--r-btn);
  padding: 10px 8px; min-height: 62px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
  line-height: 1.4; transition: transform .1s ease, background .1s ease;
}
.itembtn:active { transform: scale(.95); background: #D9E5EC; }
.itembtn span { display: block; font-size: 13px; font-weight: 400; color: var(--sub); }
.qtyrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qtyrow .nm { flex: 1; font-size: 16.5px; font-weight: 700; }
.qtyrow .sub { font-size: 14px; color: var(--sub); font-weight: 400; display: block; }
.qbtn { width: 44px; min-height: 44px; border-radius: 50%; border: none; background: var(--ai-tint); color: var(--ai); font-size: 22px; font-weight: 700; cursor: pointer; font-family: inherit; flex: none; transition: transform .1s ease; }
.qbtn:active { transform: scale(.9); }
.qnum { min-width: 34px; text-align: center; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pays { display: flex; gap: 8px; flex-wrap: wrap; }
.paybtn { flex: 1 1 44%; min-height: 54px; border-radius: var(--r-btn); border: none; background: var(--ai-tint); color: var(--ai-deep); font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; transition: transform .1s ease; }
.paybtn:active { transform: scale(.97); }
.paybtn.on { background: var(--ai); color: #FFF; box-shadow: var(--shadow-s); }

/* ------- 売上 ------- */
.segc { display: flex; background: #E9E4D8; border-radius: var(--r-btn); padding: 4px; gap: 2px; margin-bottom: 12px; }
.segc button {
  flex: 1; min-height: 46px; font-size: 17px; font-weight: 700; border-radius: 9px; border: none;
  background: transparent; color: var(--sub); cursor: pointer; font-family: inherit; transition: all .15s ease;
}
.segc .segon { background: #FFF; color: var(--ai); box-shadow: var(--shadow-s); }
.kpi { background: linear-gradient(135deg, var(--ai) 0%, #27587A 100%); color: #FFF; border-radius: var(--r-card); padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-m); }
.kpi .lb { font-size: 14.5px; opacity: .85; }
.kpi .big { font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; letter-spacing: .01em; }
.kpi .cmp { font-size: 15px; font-weight: 700; }
.kpi .grid3 { display: flex; gap: 10px; margin-top: 14px; border-top: 1px solid rgba(255,255,255,.25); padding-top: 12px; }
.kpi .grid3 div { flex: 1; }
.kpi .grid3 .n { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .grid3 .l { font-size: 12.5px; opacity: .85; }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.bar-row .nm { flex: 0 0 132px; font-weight: 700; }
.bar-row .track { flex: 1; min-width: 40px; background: #F0EDE4; border-radius: 5px; height: 18px; overflow: hidden; }
.bar-row .fill { display: block; background: var(--ai); height: 100%; border-radius: 5px; }
.bar-row .fill.alt { background: var(--gold); }
.bar-row .vv { flex: 0 0 96px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.chart { display: flex; align-items: stretch; gap: 3px; height: 140px; margin: 10px 0 4px; }
.chart .col { flex: 1; height: 100%; background: var(--ai-wash); border-radius: 4px 4px 0 0; position: relative; }
.chart .col i { position: absolute; inset: auto 0 0 0; background: var(--ai); border-radius: 4px 4px 0 0; display: block; min-height: 1px; }
.chart-x { display: flex; gap: 3px; font-size: 11px; color: var(--sub); }
.chart-x span { flex: 1; text-align: center; }
.sale-row { display: flex; gap: 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; background: none; border-left: none; border-right: none; border-top: none; font-family: inherit; color: var(--ink); cursor: pointer; }
.sale-row:last-child { border-bottom: none; }
.sale-d { font-size: 14.5px; color: var(--sub); flex: 0 0 92px; font-variant-numeric: tabular-nums; }
.sale-n { flex: 1; font-size: 16.5px; font-weight: 700; }
.sale-n .s { display: block; font-size: 13.5px; color: var(--sub); font-weight: 400; }
.sale-a { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.sale-a .arrow { display: block; text-align: right; }

.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 430px) {
  .g2 { grid-template-columns: 1fr; }
  .bar-row { font-size: 13px; }
  .bar-row .nm { flex: 0 0 92px !important; font-size: 13px; }
  .bar-row .vv { flex: 0 0 82px; font-size: 13px; }
  /* スマホ: チップを小型化して2〜3個/行に収める */
  .chip { font-size: 12px; padding: 3px 9px; margin: 2px 4px 0 0; }
  /* スマホ: 操作ボタンは3等分の1行に */
  .rowbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .rowbtns .minibtn { padding: 8px 4px; font-size: 14.5px; text-align: center; justify-content: center; }
  .rowbtns .paid-chip { grid-column: 1 / -1; text-align: center; }
  .minibtn.tel .tel-num { display: none; }
  .minibtn.tel .tel-sp { display: inline; }
  /* スマホ: 会計の品目ボタンは2列固定 */
  .items { grid-template-columns: repeat(2, 1fr); }
}

/* ------- 管理 ------- */
.acc-row { display: flex; align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid var(--line); min-height: 56px; }
.acc-row:last-child { border-bottom: none; }
.acc-name { flex: 1; font-size: 18px; font-weight: 600; }

/* ------- ログイン ------- */
.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 22px; }
.login { width: 100%; max-width: 420px; background: var(--card); border-radius: 20px; padding: 32px 26px; box-shadow: var(--shadow-m); }
.brand-lg { font-size: 28px; text-align: center; margin: 0 0 4px; }
.login-sub { text-align: center; color: var(--sub); font-size: 15px; margin: 0 0 26px; }
/* ログインのロゴ(筆文字)。墨がにじみ出るように、ぼかしから濃く浮かび上がる */
.login-logo { margin: 4px 0 18px; text-align: center; line-height: 0; }
.login-logo img { height: clamp(170px, 32vh, 280px); width: auto; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .login-logo img { animation: ink-rise 2.4s cubic-bezier(.22,.61,.36,1) both; }
  .login .login-sub, .login form, .login .note { animation: login-fade .8s ease-out 1.5s both; }
}
@keyframes ink-rise {
  0%   { opacity: 0;   filter: blur(14px); transform: scale(1.06); }
  45%  { opacity: .55; filter: blur(5px); }
  100% { opacity: 1;   filter: blur(0);    transform: scale(1); }
}
@keyframes login-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.note { background: var(--ai-tint); border-radius: var(--r-card); padding: 14px 16px; font-size: 14.5px; color: var(--ai-deep); margin-top: 20px; line-height: 1.7; }

/* ============================================================
   iPad(横向き・幅1000px以上): 2ペインと2列で「幅で解決」
   ============================================================ */
.split-ph {
  display: none;
}
@media (min-width: 1000px) {
  #app { max-width: 1180px; }
  main { padding: 24px 26px 34px; }
  /* 予約・お客さま: 左=一覧 / 右=カルテ・会計 */
  .split { display: grid; grid-template-columns: minmax(430px, 47%) 1fr; gap: 22px; align-items: start; }
  .pane-r { position: sticky; top: 82px; max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overflow-y: auto; border-radius: var(--r-card); padding: 2px; }
  .split-ph {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    min-height: 380px; border: 2px dashed #DDD8CA; border-radius: var(--r-card);
    color: var(--sub); font-size: 16px; text-align: center; padding: 30px;
  }
  .split-ph .big-ic { font-size: 44px; opacity: .45; }
  /* 売上: 2列グリッド */
  .sales-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .sales-grid .full { grid-column: 1 / -1; }
  .sales-grid .card, .sales-grid .kpi { margin-bottom: 0; }
  /* 会計: 左=品目 / 右=伝票(レジ型) */
  .bill-split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }
  .bill-split .bill-r { position: sticky; top: 82px; }
  .items { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  /* 管理: 2列 */
  .admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .admin-grid .card { margin-bottom: 0; }
}

/* ===== 印刷用のご予約表(画面には出さない) =====
   バックヤードに貼り、少し離れて見ても読めるように大きな文字・1組1ブロックで組む */
#print-sheet { display: none; }
@page { size: A4 portrait; margin: 10mm 10mm 9mm; }
@media print {
  #app { display: none !important; }
  body { background: #FFF; color: #000; font-size: 12pt; }
  #print-sheet { display: block; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .p-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6mm;
    border-bottom: 1.2mm solid #000; padding-bottom: 2mm; margin-bottom: 3mm; }
  .p-date { font-size: 28pt; font-weight: 800; letter-spacing: .02em; line-height: 1.15; }
  .p-date small { font-size: 16pt; font-weight: 700; margin-left: 2mm; }
  .p-total { font-size: 24pt; font-weight: 800; white-space: nowrap; }
  .p-shop { font-size: 10pt; color: #333; text-align: right; }
  .p-courses { display: flex; flex-wrap: wrap; gap: 1.5mm 2.5mm; margin-bottom: 3mm; }
  .p-courses span { border: .5mm solid #000; border-radius: 1.5mm; padding: .6mm 2.5mm; font-size: 13pt; font-weight: 700; }
  .p-courses b { font-size: 17pt; margin-left: 1.5mm; }
  .p-res { border: .6mm solid #000; border-radius: 2mm; margin-bottom: 2.2mm; break-inside: avoid; page-break-inside: avoid; }
  .p-main { display: grid; grid-template-columns: 35mm 1fr 28mm; align-items: center; gap: 0 3mm; padding: 1.6mm 4mm; }
  .p-time { font-size: 28pt; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
  .p-who { min-width: 0; }
  .p-name { font-size: 22pt; font-weight: 800; line-height: 1.15; word-break: keep-all; overflow-wrap: anywhere; }
  .p-name small { font-size: 15pt; font-weight: 700; margin-left: 1mm; }
  .p-kana { font-size: 11pt; color: #333; margin-left: 2mm; font-weight: 400; }
  .p-course { font-size: 15pt; font-weight: 700; margin-top: .5mm; line-height: 1.25; }
  .p-num { text-align: right; line-height: 1.15; }
  .p-num b { font-size: 28pt; font-weight: 800; }
  .p-num span { display: block; font-size: 14pt; font-weight: 700; word-break: keep-all; }
  .p-ng { background: #000; color: #FFF; padding: 1.2mm 4mm; font-size: 16pt; font-weight: 800; line-height: 1.35; }
  .p-ng + .p-ng { border-top: .3mm solid #FFF; }
  .p-ng em { font-style: normal; font-size: 12pt; border: .4mm solid #FFF; border-radius: 1mm; padding: 0 1.5mm; margin-right: 2.5mm; vertical-align: .15em; }
  .p-memo { border-top: .3mm dashed #000; padding: 1.2mm 4mm; font-size: 12.5pt; line-height: 1.4; }
  .p-chk { display: inline-block; border: .5mm solid #000; padding: 0 2mm; font-size: 11pt; font-weight: 800; margin-top: .8mm; }
  .p-empty { font-size: 22pt; font-weight: 700; text-align: center; padding: 30mm 0; }
  .p-foot { margin-top: 3mm; font-size: 9pt; color: #333; border-top: .3mm solid #999; padding-top: 1.5mm; line-height: 1.5; }
}

/* ============================================================
   本番で追加した部品(入力画面・確認・エラー)
   ============================================================ */
textarea { min-height: 96px; line-height: 1.6; resize: vertical; }
.err { color: var(--shu); font-size: 16px; font-weight: 700; margin: 10px 0 0; }
.hint { color: var(--sub); font-size: 14px; margin: -10px 0 16px; line-height: 1.6; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btns .primary { flex: 1 1 220px; width: auto; }
.danger { font-size: 16px; font-weight: 700; color: var(--shu); background: var(--warn-bg); border: none; border-radius: var(--r-btn); padding: 10px 16px; min-height: 44px; cursor: pointer; font-family: inherit; }
.danger:active { transform: scale(.97); }
.linkbtn { background: none; border: none; color: var(--ai); font-size: 15px; font-weight: 700; padding: 4px 0; cursor: pointer; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; }
.card .t .act { float: right; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: #FFF; border-radius: 999px; padding: 10px 20px; font-size: 16px; font-weight: 700; box-shadow: var(--shadow-m);
  max-width: calc(100vw - 32px); text-align: center; line-height: 1.5; }
.loading { color: var(--sub); text-align: center; padding: 40px 0; }
/* カルテ候補(予約入力でお名前を打つと出る) */
.suggest { background: var(--ai-wash); border-radius: var(--r-btn); padding: 6px 10px; margin: -10px 0 16px; }
.suggest button { display: flex; width: 100%; gap: 8px; align-items: center; background: none; border: none; padding: 8px 2px; font-family: inherit; color: var(--ink); text-align: left; cursor: pointer; font-size: 16px; border-bottom: 1px solid var(--line); }
.suggest button:last-child { border-bottom: none; }
.suggest .s-sub { color: var(--sub); font-size: 13.5px; }
.picked { display: flex; align-items: center; gap: 10px; background: var(--ai-tint); border-radius: var(--r-btn); padding: 10px 14px; margin-bottom: 18px; }
.picked .nm { flex: 1; font-weight: 700; }
.menu-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.menu-row:last-child { border-bottom: none; }
.menu-row .nm { flex: 1; font-size: 16.5px; font-weight: 600; min-width: 0; }
.menu-row .nm.off { color: var(--sub); text-decoration: line-through; }
.menu-row .pr { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.menu-row .mv { width: 40px; min-height: 40px; border-radius: 10px; border: none; background: var(--ai-wash); color: var(--ai); font-size: 15px; cursor: pointer; }
.cancel-row { opacity: .7; }
