:root {
  --steel: #D9DFDD;
  --steel-deep: #C5CDCA;
  --ticket: #FFFFFF;
  --ink: #1D2A31;
  --ink-soft: #55656D;
  --rail: #34444C;
  --rail-ink: #F2F5F4;
  --hi: #FFD23F;
  --hi-soft: #FFF3C4;
  --go: #1C7A4A;
  --go-ink: #FFFFFF;
  --stop: #B42318;
  --info: #2E5E9E;
  --line: #E3E7E5;
  --tap: 54px;
  --r-ticket: 4px;
  --r-ctl: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --steel: #1E272B; --steel-deep: #151C1F; --ticket: #2A353A; --ink: #EEF2F1; --ink-soft: #A3B1B6;
    --rail: #0F1518; --hi-soft: #4A4120; --line: #3A474D; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --steel: #1E272B; --steel-deep: #151C1F; --ticket: #2A353A; --ink: #EEF2F1; --ink-soft: #A3B1B6;
  --rail: #0F1518; --hi-soft: #4A4120; --line: #3A474D; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--steel);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.hidden { display: none !important; }

/* ---------- 레일(상단) ---------- */
.rail {
  position: sticky; top: 0; z-index: 10;
  background: var(--rail); color: var(--rail-ink);
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18);
}
.rail h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail select { background: transparent; border: 0; color: inherit; font-weight: 600; font-size: 19px; max-width: 100%; }
.rail select option { color: #1D2A31; }
.status {
  grid-column: 1 / -1; justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.1); font-size: 15px; font-weight: 500;
}
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #6FD39B; }
.status.staff::before { background: #8FB6EA; }
.status.paused::before, .status.closed::before { background: var(--hi); }
.status.blocked::before { background: #FF7A6E; }
.sound {
  white-space: nowrap; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.35);
  background: transparent; color: inherit; font-size: 15px; font-weight: 500;
}
.sound.on { background: rgba(255,255,255,.14); border-color: transparent; }

/* ---------- 알림 띠 ---------- */
.banner {
  margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--r-ctl);
  background: var(--hi); color: #1D2A31; font-weight: 600;
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
}
.banner button { flex: 0 0 auto; white-space: nowrap; border: 0; background: #1D2A31; color: #fff; border-radius: 8px; min-height: 44px; padding: 0 14px; font-weight: 600; }
.banner.error { background: #FCE4E1; color: var(--stop); }

/* ---------- 주문 화면 ---------- */
main { padding: 0 0 calc(96px + env(safe-area-inset-bottom)); }
.filters { display: flex; gap: 8px; padding: 14px 16px 4px; overflow-x: auto; }
.filters button {
  flex: 0 0 auto; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--steel-deep); background: transparent; font-weight: 600; color: var(--ink-soft);
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--steel); border-color: var(--ink); }
.filters .count { margin-left: 6px; }
.filters .count.hot { background: var(--hi); color: #1D2A31; border-radius: 999px; padding: 0 8px; }

.board { padding: 8px 16px; display: grid; gap: 18px; }
.lane h2 { margin: 6px 2px 10px; font-size: 16px; font-weight: 600; color: var(--ink-soft); display: flex; gap: 8px; align-items: baseline; }
.lane h2 b { color: var(--ink); font-size: 18px; }
.lane .empty { color: var(--ink-soft); padding: 22px 4px; font-size: 15px; }
.tickets { display: grid; gap: 16px; }

/* 영수증 티켓: 위쪽이 찢어진 종이 */
.ticket {
  position: relative; background: var(--ticket); border-radius: 0 0 var(--r-ticket) var(--r-ticket);
  padding: 18px 16px 14px; margin-top: 8px;
  box-shadow: 0 1px 0 var(--steel-deep), 0 6px 14px -10px rgba(20,30,35,.45);
}
.ticket::before {
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
  background:
    linear-gradient(135deg, transparent 50%, var(--ticket) 50%) 0 0 / 12px 8px repeat-x,
    linear-gradient(-135deg, transparent 50%, var(--ticket) 50%) 0 0 / 12px 8px repeat-x;
}
.ticket.new { box-shadow: inset 6px 0 0 var(--hi), 0 1px 0 var(--steel-deep), 0 8px 18px -10px rgba(20,30,35,.55); }
.ticket.new.fresh { animation: drop .5s cubic-bezier(.2,.9,.3,1.2); }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.ticket.done { opacity: .72; }
.ticket.cancelled .items { text-decoration: line-through; }

.t-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.t-no { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.t-no small { font-size: 14px; font-weight: 500; color: var(--ink-soft); margin-left: 6px; letter-spacing: 0; }
.t-time { text-align: right; font-size: 14px; color: var(--ink-soft); line-height: 1.3; }
.t-time b { display: block; color: var(--ink); font-size: 16px; }
.t-time .late { color: var(--stop); }
.who { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 16px; }
.who a { color: var(--info); font-weight: 500; text-decoration: none; }
.tag { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--steel); color: var(--ink); }
.tag.lang { background: #DCE7F6; color: #1F4377; }
.tag.alert { background: #FCE4E1; color: var(--stop); }
.items { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 2px dashed var(--line); display: grid; gap: 6px; }
.items li { font-size: 18px; font-weight: 500; }
.items .note, .order-note { display: inline-block; margin-top: 2px; background: var(--hi-soft); color: var(--ink); font-size: 15px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.order-note { margin-top: 10px; }
.t-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.t-foot .pickup { font-size: 17px; font-weight: 600; }
.t-foot .total { font-size: 17px; font-weight: 600; }

.actions { margin-top: 14px; display: grid; gap: 8px; }
.actions .row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  min-height: var(--tap); border-radius: var(--r-ctl); border: 0; padding: 0 18px;
  font-weight: 600; font-size: 18px; display: inline-flex; align-items: center; justify-content: center;
}
.btn.go { background: var(--go); color: var(--go-ink); width: 100%; font-size: 20px; }
.btn.next { background: var(--ink); color: var(--steel); width: 100%; }
.btn.ghost { background: transparent; border: 1.5px solid var(--steel-deep); color: var(--ink); min-height: 46px; font-size: 16px; flex: 1; }
.btn.quiet { background: transparent; color: var(--ink-soft); min-height: 44px; font-size: 15px; padding: 0 8px; }
.btn.danger { color: var(--stop); }
.btn.danger.armed { background: var(--stop); color: #fff; }
.btn[disabled] { opacity: .5; cursor: wait; }

/* ---------- 설정 ---------- */
.panel { padding: 14px 16px; display: grid; gap: 14px; max-width: 720px; }
.setting { background: var(--ticket); border-radius: var(--r-ctl); padding: 16px; }
.setting h2 { margin: 0 0 4px; font-size: 18px; }
.setting p { margin: 0 0 12px; color: var(--ink-soft); font-size: 15px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  flex: 1 1 0; min-width: 84px; min-height: 50px; border-radius: var(--r-ctl);
  border: 1.5px solid var(--steel-deep); background: transparent; font-weight: 600; font-size: 16px;
}
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--steel); }
.seg.mode button[aria-pressed="true"][data-v="ai"] { background: var(--go); border-color: var(--go); color: #fff; }
.phone-form { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.phone-form label { font-weight: 600; font-size: 15px; }
.phone-form .inline { display: flex; gap: 8px; }
.phone-form input { flex: 1; min-width: 0; width: 100%; min-height: 50px; border-radius: var(--r-ctl); border: 1.5px solid var(--steel-deep); padding: 0 14px; font-size: 18px; background: var(--ticket); }
.phone-form .btn { width: auto; flex: 0 0 auto; min-height: 50px; font-size: 16px; }
.resume { margin-bottom: 10px; }
.linkish { background: none; border: 0; color: var(--info); padding: 8px 0; font-weight: 500; }

/* ---------- 메뉴 품절 ---------- */
.search { width: 100%; min-height: 50px; border-radius: var(--r-ctl); border: 1.5px solid var(--steel-deep); background: var(--ticket); padding: 0 14px; }
.cat h2 { font-size: 15px; color: var(--ink-soft); margin: 18px 2px 8px; font-weight: 600; }
.mrow { background: var(--ticket); padding: 8px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center; border-bottom: 1px solid var(--line); }
.mrow:first-of-type { border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
.mrow:last-child { border-radius: 0 0 var(--r-ctl) var(--r-ctl); border-bottom: 0; }
.mrow .nm { font-weight: 600; }
.mrow .nm small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.mrow.off .nm { color: var(--ink-soft); text-decoration: line-through; }
.mrow .seg { grid-column: 1 / -1; }
.mrow .seg button { min-height: 42px; font-size: 14px; min-width: 0; }
.mrow .seg button[aria-pressed="true"][data-v="on"] { background: var(--go); border-color: var(--go); color: #fff; }
.mrow .seg button[aria-pressed="true"][data-v="today"], .mrow .seg button[aria-pressed="true"][data-v="off"] { background: var(--stop); border-color: var(--stop); color: #fff; }

/* ---------- 주문 찾기 ---------- */
.find .dates { flex-wrap: nowrap; }
.find .dates button { min-width: 0; }
.datepick { flex: 1.3 1 0; display: flex; }
.datepick input { width: 100%; min-height: 50px; border-radius: var(--r-ctl); border: 1.5px solid var(--steel-deep); background: var(--ticket); padding: 0 10px; font-weight: 600; }
.find-sum { margin: 2px 2px 0; font-weight: 600; font-size: 16px; }
.muted { color: var(--ink-soft); font-size: 15px; margin: 8px 2px; }
.tag.st-RECEIVED { background: var(--hi); color: #1D2A31; }
.tag.st-PICKED_UP { background: #DDEFE5; color: #14532D; }
.tag.st-CANCELLED { background: #FCE4E1; color: var(--stop); }
.t-time .tag { display: inline-block; margin-top: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 960px) { .find .tickets { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } .panel.find { max-width: none; } }

/* ---------- 통화 기록 · AI 가르치기 ---------- */
.subtabs button { min-height: 46px; }
.subtabs .count.hot { background: var(--hi); color: #1D2A31; border-radius: 999px; padding: 0 8px; margin-left: 4px; }
.inline-filters { padding: 0; }
.calls { display: grid; gap: 1px; background: var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.call-row { display: grid; gap: 4px; text-align: left; background: var(--ticket); border: 0; padding: 12px 14px; width: 100%; }
.call-row.seen { opacity: .7; }
.cr-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--ink-soft); font-size: 15px; }
.cr-top b { color: var(--ink); font-size: 17px; }
.cr-who { font-size: 15px; color: var(--ink-soft); }
.cr-preview { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.oc-order { background: #DDEFE5; color: #14532D; }
.tag.oc-transfer { background: var(--hi-soft); color: var(--ink); }
.tag.oc-hangup { background: var(--steel); color: var(--ink-soft); }
.call-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 17px; }
audio { width: 100%; }
.convo { display: grid; gap: 8px; }
.bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: 16px; position: relative; }
.bubble .who { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 2px; }
.bubble.customer { background: var(--ticket); justify-self: start; border-bottom-left-radius: 4px; }
.bubble.ai { background: var(--rail); color: var(--rail-ink); justify-self: end; border-bottom-right-radius: 4px; }
.bubble.ai .who { color: #B9C7CC; }
.bubble .fix { display: block; padding: 6px 0 0; font-size: 14px; }
.teach-form { display: grid; gap: 8px; background: var(--hi-soft); padding: 14px; border-radius: var(--r-ctl); }
.teach-form input, .teach-form select, .teach-form textarea {
  width: 100%; min-height: 48px; border-radius: var(--r-ctl); border: 1.5px solid var(--steel-deep); background: var(--ticket); padding: 10px 12px; font-size: 16px; }
.teach-form textarea { resize: vertical; }
.setting .teach-form { margin-top: 12px; background: var(--steel); }
.btn.wide { width: 100%; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); }
.plain li { background: var(--ticket); display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; }
.linkish.danger { color: var(--stop); }
.proposal { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.proposal ul { margin: 8px 0; padding-left: 20px; }
.proposal .row { display: flex; gap: 8px; }
.proposal .btn { flex: 1; min-height: 46px; font-size: 16px; }

/* ---------- 메뉴 수정 ---------- */
.row2 { display: flex; gap: 8px; }
.row2 > * { flex: 1; }
.btn.file { cursor: pointer; text-align: center; }
.mprice { text-align: right; white-space: nowrap; }
.mprice .linkish { margin-left: 6px; padding: 6px 0; }
.edit-form { grid-column: 1 / -1; display: grid; gap: 10px; background: var(--steel); padding: 14px; border-radius: var(--r-ctl); margin-top: 4px; }
.edit-form.add { background: var(--ticket); }
.fld { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.fld input, .fld textarea, .opt input { width: 100%; min-height: 46px; border-radius: var(--r-ctl); border: 1.5px solid var(--steel-deep); background: var(--ticket); padding: 8px 12px; font-size: 16px; color: var(--ink); font-weight: 400; }
.opts { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.opts legend { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.opt { display: grid; grid-template-columns: 1fr 96px auto; gap: 8px; align-items: center; font-size: 15px; }
.edit-form.add .opt { grid-template-columns: 1fr 110px; }
.chk { display: flex; gap: 4px; align-items: center; font-size: 14px; white-space: nowrap; }
.chk input { width: 20px; height: 20px; min-height: 0; }
details.cat summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); margin: 18px 2px 8px; }
.working .bar { height: 6px; background: var(--steel); border-radius: 3px; overflow: hidden; }
.working .bar i { display: block; height: 100%; width: 40%; background: var(--go); animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .working .bar i { animation: none; width: 100%; } }
.draft { display: grid; gap: 1px; background: var(--line); margin-bottom: 12px; }
.drow { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 46%); gap: 10px; align-items: center; background: var(--ticket); padding: 10px 2px; }
.drow input[type=checkbox] { width: 22px; height: 22px; }
.drow.dim { opacity: .55; }
.drow small { color: var(--ink-soft); }
.dr-right { text-align: right; font-weight: 600; font-size: 15px; }
.tag.k-new { background: #DDEFE5; color: #14532D; }
.tag.k-price { background: var(--hi); color: #1D2A31; }
.hours { display: grid; gap: 8px; margin-bottom: 12px; }
.hrow { display: grid; grid-template-columns: 36px 1fr; gap: 8px; align-items: start; }
.hrow b { padding-top: 10px; }
.ranges { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.range { display: inline-flex; gap: 4px; align-items: center; }
.range input { min-height: 42px; border-radius: 8px; border: 1.5px solid var(--steel-deep); background: var(--ticket); padding: 0 6px; font-size: 15px; }

/* ---------- 아래 탭 ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--ticket); border-top: 1px solid var(--steel-deep);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button { min-height: 62px; border: 0; background: transparent; font-weight: 600; font-size: 14px; padding: 0 2px; letter-spacing: -.02em; color: var(--ink-soft); position: relative; }
.tabs button[aria-current="page"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--ink); }
.tabs .dot { position: absolute; top: 12px; margin-left: 4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--hi); color: #1D2A31; font-size: 13px; line-height: 20px; }

/* ---------- 로그인 ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login form { width: 100%; max-width: 380px; background: var(--ticket); padding: 28px 22px 22px; border-radius: 0 0 var(--r-ticket) var(--r-ticket); position: relative; display: grid; gap: 14px; }
.login form::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
  background: linear-gradient(135deg, transparent 50%, var(--ticket) 50%) 0 0 / 12px 8px repeat-x,
              linear-gradient(-135deg, transparent 50%, var(--ticket) 50%) 0 0 / 12px 8px repeat-x; }
.login h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.login p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.login label { font-weight: 600; font-size: 15px; display: grid; gap: 6px; }
.login input { min-height: 54px; border-radius: var(--r-ctl); border: 1.5px solid var(--steel-deep); padding: 0 14px; font-size: 20px; background: var(--ticket); letter-spacing: .02em; }
.login .err { color: var(--stop); font-weight: 600; font-size: 15px; min-height: 1.4em; }
.login .lang { justify-self: end; }

/* ---------- 태블릿: 주문 레일을 칸으로 ---------- */
@media (min-width: 960px) {
  .filters { display: none; }
  .board { grid-template-columns: 1.15fr 1fr 1fr; align-items: start; padding: 16px 20px; gap: 20px; }
  .lane.past { grid-column: 1 / -1; }
  .lane.past .tickets { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .lane .tickets { max-height: none; }
  .rail { grid-template-columns: auto auto 1fr; padding-left: 20px; padding-right: 20px; }
  .rail .status { grid-row: 1; grid-column: 2; }
  .rail .sound { grid-column: 3; justify-self: end; }
  .panel { padding: 16px 20px; }
}
@media (max-width: 959px) {
  .board[data-filter="new"] .lane:not(.new-lane),
  .board[data-filter="doing"] .lane:not(.doing-lane):not(.ready-lane),
  .board[data-filter="past"] .lane:not(.past) { display: none; }
  .board[data-filter="new"] .lane h2, .board[data-filter="past"] .lane h2 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ticket.new.fresh { animation: none; }
}
.panel > .linkish, .panel > div > .linkish { justify-self: start; }
.mrow > .btn { grid-column: 1 / -1; }

.tag.admin { background: var(--hi); color: #1D2A31; vertical-align: middle; }

.import .btn.file { width: 100%; }
.imp-row { display: grid; gap: 6px; }
.imp-row .btn { justify-self: start; }
.fld textarea { min-height: 96px; resize: vertical; }

.drow .dprice { width: 96px; height: 38px; margin-bottom: 4px; min-height: 38px; border-radius: 8px; border: 1.5px solid var(--hi); background: var(--ticket); padding: 0 8px; font: inherit; text-align: right; }
.tag.k-noprice { background: var(--hi-soft); color: var(--ink); }
.tr-box { display: grid; gap: 4px; }

/* 메뉴 목록: 한 줄에 선택·이름·가격·상태, 한 번에 여러 개 */
.mchk { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.mrow.hid { background: color-mix(in srgb, var(--ticket) 82%, var(--line)); }
.mrow.hid .nm, .mrow.hid .mprice { opacity: .55; }
.mrow.sel { background: var(--hi-soft); }
.tag.hid { background: var(--line); color: var(--ink); font-size: 12px; padding: 1px 7px; vertical-align: 1px; }
.mrow .mprice { font-variant-numeric: tabular-nums; }
.mact { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.mact .linkish { padding: 6px 0; font-size: 14px; }
.linkish.quiet { color: var(--ink-soft); }
.msold { min-height: 34px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--ticket); font: inherit; font-size: 14px; font-weight: 600; padding: 0 6px; }
.msold.s-on { border-color: var(--go); color: var(--go); }
.msold.s-today, .msold.s-off { border-color: var(--stop); color: var(--stop); }
.mrow > .edit-form { grid-column: 1 / -1; }
.mdesc { margin-top: 4px; display: grid; gap: 2px; font-weight: 400; font-size: 13px; color: var(--ink); }
.mdesc i { font-style: normal; display: inline-block; min-width: 24px; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.mtools { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 4px 2px 0; }
.mtools .chk { margin-right: auto; }
.mtools .chk, .cat h2 .chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.mtools .linkish { font-size: 14px; }
.mbulk { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--ink); color: var(--steel);
  padding: 8px 10px; border-radius: var(--r-ctl); margin-top: 8px; }
.mbulk strong { margin-right: 4px; font-size: 14px; }
.mbulk .chip { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.mbulk .chip.danger { border-color: #e9a29a; color: #ffd6d0; }
.mbulk .chip.danger.armed { background: var(--stop); border-color: var(--stop); color: #fff; }
.mbulk .linkish { color: inherit; font-size: 13px; margin-left: auto; }
.cat h2 { margin: 14px 2px 6px; }
@media (max-width: 560px) {
  .mrow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .mact { grid-column: 2 / -1; justify-content: flex-start; }
}
