:root {
  --bg: #1b1a17;
  --panel: #262420;
  --panel-2: #2f2c27;
  --line: #3d3933;
  --text: #f3ede2;
  --muted: #b3aa9b;
  --accent: #e8a33d;      /* 提灯の灯り */
  --accent-ink: #2a1c05;
  --ok: #6cc08b;
  --warn: #e0675a;
  --radius: 16px;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
a { color: var(--accent); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.topbar .title { font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.topbar .sub { color: var(--muted); font-size: 14px; margin-left: 10px; }
.pill {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-size: 16px;
}
.pill:active { transform: scale(.98); }

/* ---------- テーブル端末 ---------- */
.table-app { display: grid; grid-template-columns: 1.2fr 1fr; height: calc(100% - 61px); }
@media (max-width: 760px) { .table-app { grid-template-columns: 1fr; height: auto; } }
.talk { display: flex; flex-direction: column; align-items: center; padding: 20px; gap: 18px; min-height: 0; }
.log { width: 100%; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; min-height: 160px; }
.bubble { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 18px; line-height: 1.5; }
.bubble.ai { background: var(--panel-2); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.me { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble.interim { opacity: .6; }

.mic {
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4bd62, var(--accent) 60%, #b97a20);
  color: var(--accent-ink); font-weight: 800; font-size: 22px; line-height: 1.3;
  box-shadow: 0 10px 30px rgba(232,163,61,.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: transform .1s;
}
.mic svg { width: 46px; height: 46px; }
.mic:active { transform: scale(.97); }
.mic.listening { animation: pulse 1.2s infinite; background: radial-gradient(circle at 35% 30%, #ff8f7f, var(--warn) 60%, #a83c31); color: #fff; }
.mic.busy { filter: grayscale(.6) brightness(.8); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224,103,90,.6); } 100% { box-shadow: 0 0 0 30px rgba(224,103,90,0); } }
.hint { color: var(--muted); font-size: 15px; text-align: center; min-height: 1.4em; }

.textform { display: none; width: 100%; gap: 8px; }
.textform.show { display: flex; }
.textform input { flex: 1; font-size: 17px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.textform button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }

.cart { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px; gap: 12px; min-height: 0; }
.cart h2 { margin: 0; font-size: 18px; color: var(--muted); font-weight: 600; }
.lines { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.line { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border-radius: 12px; padding: 12px 14px; font-size: 18px; }
.line .name { flex: 1; }
.line .qty { font-weight: 700; min-width: 2.5em; text-align: right; }
.line .tag { font-size: 12px; background: var(--warn); color: #fff; border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 2px; }
.line .del { background: transparent; color: var(--muted); font-size: 22px; padding: 0 4px; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }
.total { display: flex; justify-content: space-between; font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.confirm { background: var(--ok); color: #0d2416; font-weight: 800; font-size: 20px; padding: 18px; border-radius: var(--radius); }
.confirm:disabled { background: var(--panel-2); color: var(--muted); }
.engine { color: var(--muted); font-size: 12px; text-align: right; }

/* ---------- 厨房 ---------- */
.kitchen { padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-content: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.new { border-color: var(--accent); }
.card.done { opacity: .45; }
.card .head { display: flex; justify-content: space-between; align-items: baseline; }
.card .tno { font-size: 26px; font-weight: 800; }
.card .time { color: var(--muted); font-size: 14px; }
.card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 18px; }
.card li { display: flex; justify-content: space-between; gap: 10px; }
.card li b { color: var(--accent); }
.card button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 16px; }
.alerts { position: fixed; top: 70px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 10; }
.alert { background: var(--warn); color: #fff; padding: 14px 18px; border-radius: 12px; font-size: 18px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.alert button { margin-left: 12px; background: rgba(255,255,255,.2); border-radius: 8px; padding: 4px 10px; }
.tabs { display: flex; gap: 8px; }
.tabs .pill.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- 管理・トップ ---------- */
.page { max-width: 820px; margin: 0 auto; padding: 24px 20px 60px; }
.page h1 { font-size: 24px; }
.table-list { display: flex; flex-wrap: wrap; gap: 10px; }
.items { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.item-row .n { flex: 1; }
.item-row .n small { display: block; color: var(--muted); }
.toggle { border-radius: 999px; padding: 8px 14px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
.toggle.on-sold { background: var(--warn); border-color: var(--warn); color: #fff; }
.toggle.on-rec { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.note { color: var(--muted); font-size: 14px; }
