/* モリレジ：レジ・キッチン画面の見た目 */
:root {
  /* モリレジの色（MORIMOの緑）。白版＝昼・黒版＝夜 */
  --bg: #f6f5f0; --panel: #ffffff; --panel2: #fafaf6; --ink: #141a16; --sub: #6d756f; --line: #dfe3de;
  --accent: #1f5c47; --accent-ink: #ffffff; --accent-soft: #eef4f0;
  --warn: #b9532e; --warn-soft: #f8e9e1; --danger: #b42318; --gold: #9a6a1c; --gold-soft: #f6eedd;
  --shadow: none;
  --font: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --head: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --r: 4px;
  /* 角の丸み（設定の「画面の角」で丸いにすると下の round の値になる） */
  --r1: 3px; --r2: 4px; --rp: 4px;
}
:root[data-shape="round"] { --r: 14px; --r1: 9px; --r2: 14px; --rp: 999px; }
:root[data-theme="dark"] {
  --bg: #0c0f0d; --panel: #121713; --panel2: #0f1411; --ink: #e8eee9; --sub: #8b968f; --line: #1f2b23;
  --accent: #3fbf8f; --accent-ink: #08130d; --accent-soft: #14231a;
  --warn: #e0a24a; --warn-soft: #2e2416; --danger: #f2705f; --gold: #d9b45f; --gold-soft: #2e2818;
  --shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px 100px; }

/* 上の帯 */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { font-family: var(--head); font-weight: 800; font-size: 20px; letter-spacing: .12em; display: flex; align-items: center; gap: 10px; }
.brand .mark { height: 26px; width: auto; display: none; }
:root:not([data-theme="dark"]) .brand .mark.d, :root[data-theme="dark"] .brand .mark.n { display: inline-block; }
.brand .shoplogo { height: 30px; width: auto; max-width: 140px; object-fit: contain; }
.top { border-bottom-color: var(--accent) !important; }
.bizday { color: var(--sub); font-size: 13px; }
.nav { display: flex; gap: 4px; margin-left: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--rp); padding: 4px; }
.nav button { border: 0; background: transparent; padding: 8px 18px; border-radius: var(--rp); cursor: pointer; font-weight: 600; color: var(--sub); }
.nav button.on { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 760px) {
  .nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; border-width: 1px 0 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; z-index: 30; }
  .nav button { padding: 8px 6px; flex: 1; font-size: 13px; }
}

h2 { font-family: var(--head); font-size: 21px; margin: 18px 0 10px; letter-spacing: .04em; }
h3 { font-size: 16px; margin: 14px 0 8px; }
.muted { color: var(--sub); font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp { flex: 1; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r1); padding: 9px 14px; cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--accent); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.warn { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: var(--r1); }
.btn.big { padding: 14px 18px; font-size: 17px; }
.btn:disabled { opacity: .45; cursor: default; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: var(--rp); padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stat .k { color: var(--sub); font-size: 13px; }
.stat .v { font-family: var(--head); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .v.small { font-size: 18px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: var(--rp); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tag.gold { background: var(--gold-soft); color: var(--gold); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { font-size: 12px; color: var(--sub); font-weight: 600; }
.scroll { overflow-x: auto; }
input[type=text], input[type=number], input[type=time], input[type=date], input[type=password], select, textarea { border: 1px solid var(--line); background: var(--panel2); border-radius: var(--r1); padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
label.f { display: grid; gap: 4px; font-size: 13px; color: var(--sub); }
label.f > input, label.f > select, label.f > textarea { color: var(--ink); font-size: 15px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* 席 */
.floor-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0 10px; }
.board-wrap { overflow-x: auto; border-radius: var(--r); }
.board { position: relative; background: var(--panel2); border: 1px dashed var(--line); border-radius: var(--r); min-width: 640px; }
.seat { position: absolute; border-radius: var(--r2); border: 1px solid var(--line); background: var(--panel); padding: 6px 8px; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.seat .nm { font-family: var(--head); font-weight: 800; font-size: 14px; }
.seat .meta { font-size: 12px; color: var(--sub); line-height: 1.3; }
.seat .amt { font-family: var(--head); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; line-height: 1.2; color: var(--accent); }
.seat.busy { border-color: var(--accent); background: var(--accent-soft); }
.seat.over { border-color: var(--warn); background: var(--warn-soft); }
.seat.empty .meta { opacity: .7; }
.seatlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.seatlist .seat { position: relative; min-height: 96px; }
.edit .seat { cursor: grab; touch-action: none; user-select: none; }
.edit .seat.sel { outline: 3px solid var(--accent); }
.edit .seat .rs { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--accent) 50%); border-radius: 0 0 var(--r1) 0; }

/* 伝票 */
.slip { display: grid; grid-template-columns: 1fr 380px; gap: 14px; margin-top: 14px; }
@media (max-width: 900px) { .slip { grid-template-columns: 1fr; } }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.item { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r2); padding: 10px; text-align: left; cursor: pointer; min-height: 70px; display: flex; flex-direction: column; justify-content: space-between; }
.item:hover { border-color: var(--accent); }
.item .p { font-weight: 700; color: var(--sub); font-variant-numeric: tabular-nums; font-size: 13px; }
.item.k-set, .item.k-ext { border-left: 4px solid var(--accent); }
.item.k-nom { border-left: 4px solid var(--gold); }
.lines .ln { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lines .ln .q { display: flex; align-items: center; gap: 6px; }
.lines .ln .q button { width: 30px; height: 30px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 800; }
.lines .ln select { font-size: 12px; padding: 3px 6px; }
.tot { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.tot .big { font-family: var(--head); font-size: 30px; font-weight: 700; color: var(--accent); }
.timer.over { color: var(--warn); font-weight: 800; }

/* モーダル */
.mask { position: fixed; inset: 0; background: rgba(20,20,15,.45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: var(--r2); padding: 18px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 760px; }
.modal h3 { margin-top: 0; }
.pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pad button { padding: 12px 0; border-radius: var(--r1); border: 1px solid var(--line); background: var(--panel2); font-weight: 700; cursor: pointer; }
.pad button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* 集計のグラフ */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 8px; }
.bars .b { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars .b.zero { background: var(--line); }
.bars-x { display: flex; gap: 3px; font-size: 10px; color: var(--sub); }
.bars-x span { flex: 1; text-align: center; }
.hbar { height: 8px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--accent); }

/* 設定 */
.set-layout { display: grid; grid-template-columns: 220px 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 760px) { .set-layout { grid-template-columns: 1fr; } }
.set-menu { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 760px) { .set-menu { flex-direction: row; overflow-x: auto; } .set-menu button { white-space: nowrap; } }
.set-menu button { border: 0; background: transparent; text-align: left; padding: 9px 12px; border-radius: var(--r1); cursor: pointer; font-weight: 600; color: var(--sub); }
.set-menu button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }

/* レシート */
.receipt { font-family: "Hiragino Mincho ProN", serif; max-width: 300px; margin: 0 auto; background: #fff; color: #111; padding: 16px; border: 1px solid #ddd; font-size: 13px; }
.receipt .c { text-align: center; }
.receipt .r { display: flex; justify-content: space-between; gap: 8px; }
.receipt hr { border: 0; border-top: 1px dashed #999; }
@media print {
  body * { visibility: hidden; }
  .receipt, .receipt * { visibility: visible; }
  .receipt { position: absolute; left: 0; top: 0; border: 0; }
  .bulk-print .receipt { position: static; break-after: page; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; }
}
/* お試し期間・止めたお店のお知らせ */
.plan-banner { max-width: 1280px; margin: 10px auto 0; padding: 8px 16px; border-radius: var(--r1); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.plan-banner.warn { background: var(--warn-soft); color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: var(--rp); z-index: 80; font-weight: 600; }
/* キッチン画面 */
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-top: 12px; }
.k-card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r2); padding: 12px; }
.k-card.warn { border-color: var(--gold); }
.k-card.late { border-color: var(--danger); }
.k-card .hd { display: flex; align-items: baseline; gap: 8px; }
.k-card .k-seat { font-size: 22px; font-weight: 800; }
.k-card .age { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.k-card.warn .age { color: var(--gold); } .k-card.late .age { color: var(--danger); }
.k-line { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.k-line .nm { flex: 1; font-size: 18px; font-weight: 700; line-height: 1.3; }
.k-line .nm small { display: block; font-size: 12px; color: var(--sub); font-weight: 400; }
.k-line .q { font-size: 22px; font-weight: 800; min-width: 44px; text-align: right; }
.k-line .btn { padding: 12px 14px; }
/* iPadからの注文・呼び出しの知らせ（画面を描き直しても消えないよう、#app の外に置く） */
#notices { position: fixed; right: 16px; top: 70px; z-index: 70; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.notice { background: var(--panel); border: 2px solid var(--accent); border-radius: var(--r2); padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; gap: 10px; align-items: flex-start; }
.notice.call { border-color: var(--warn); }
.notice b { display: block; }
.notice .x { margin-left: auto; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--sub); }
.thumb { width: 44px; height: 44px; border-radius: var(--r1); object-fit: contain; background: var(--panel2); border: 1px solid var(--line); display: block; }
