:root {
  --paper: #f3f6f5;
  --panel: #ffffff;
  --ink: #17252c;
  --muted: #56676d;
  --line: #d5dfdd;
  --line-soft: #e3eae8;
  --field: #c9d6d3;
  --water: #2f7d8c;
  --water-ink: #1f5f6b;
  --pool: #dcefee;
  --pool-soft: #eef6f6;
  --amber: #a86a12;
  --amber-ink: #6b440b;
  --amber-bg: #fff8ec;
  --amber-line: #e7c58e;
  --off: #44545a;
  --off-bg: #e6eaeb;
  --danger: #a8352a;
  --focus: #1f6fd1;
  --side: #17252c;
  --side-ink: #dfe8e6;
  --side-muted: #9fb3b0;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 14px/1.55 Pretendard, "Pretendard Variable", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--water-ink); }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.error { color: var(--danger); font-size: 14px; margin: 0; }
.error:empty { display: none; }
.error ul { margin: 6px 0 0; padding-left: 20px; }
.ok-text { color: var(--water-ink); }
.warn-text { color: #8a5408; }
.danger-text { color: var(--danger); }
.ok-text svg, .warn-text svg { vertical-align: -2px; }
.inline { display: inline-flex; align-items: center; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
[hidden] { display: none !important; }

/* ── 전체 배치: 왼쪽 메뉴 + 본문 ── */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; min-height: 100dvh; }
.view { flex: 999 1 560px; min-width: 0; padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 20px; max-width: 1400px; }
.view:focus { outline: none; }

.side {
  flex: 1 1 240px; max-width: 100%; background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; gap: 18px; padding: 20px 14px;
}
@media (min-width: 900px) {
  .side { flex: 0 0 248px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
}
.brand { display: flex; align-items: center; gap: 8px; padding: 0 8px; text-decoration: none; color: #fff; }
.brand svg { color: #7cc4cf; }
.brand strong { font-size: 16px; }
.brand span { font-size: 12px; color: var(--side-muted); }
.brand.dark { color: var(--ink); padding: 0; }
.brand.dark svg { color: var(--water); }
.brand.dark span { color: var(--muted); }
.side-label { display: block; font-size: 11px; color: var(--side-muted); padding: 0 12px 6px; letter-spacing: .02em; }
.tenant-pick { display: flex; flex-direction: column; }
.tenant-box { display: flex; flex-direction: column; gap: 2px; background: #233640; border: 1px solid #34505c; border-radius: 10px; padding: 8px 10px; }
.tenant-select {
  font: inherit; font-weight: 600; color: #fff; background: transparent; border: 0; padding: 2px 0; width: 100%; cursor: pointer;
}
.tenant-select option { color: var(--ink); }
.tenant-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--side-muted); }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-group.sep { border-top: 1px solid #2c4350; padding-top: 14px; }
.side-link { color: var(--side-ink); text-decoration: none; padding: 9px 12px; border-radius: 8px; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link[aria-current="page"] { background: var(--water); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 8px 0; border-top: 1px solid #2c4350; font-size: 13px; }
.who { display: flex; flex-direction: column; }
.who-name { color: #fff; }
.who-mail { color: var(--side-muted); }
.side-foot-links { display: flex; gap: 14px; }
.side-foot-links a, .side-foot .link { color: var(--side-ink); }

/* ── 제목 ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.page-title { display: flex; flex-direction: column; gap: 2px; }
.page-sub { font-size: 13px; color: var(--muted); }
.page-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head-right > span:empty { display: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; border-radius: 999px; padding: 5px 12px; }
.badge.ok { color: var(--water-ink); background: var(--pool); }
.badge.warn { color: var(--amber-ink); background: #f6ead6; }
.live { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--water); }
.live.stale::before { background: var(--danger); }

/* ── 버튼·입력 ── */
.btn {
  font: inherit; font-weight: 600; min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--field);
  background: var(--panel); color: var(--ink); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.primary { background: var(--water); border-color: var(--water); color: #fff; }
.btn.primary:hover { background: #276b78; color: #fff; }
.btn.amber { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--water-ink); text-decoration: underline; text-underline-offset: 3px; }
.link.danger-text { color: var(--danger); font-size: 13px; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-btn:hover { background: var(--off-bg); color: var(--ink); }
input, textarea, select.field {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--field); border-radius: 8px; padding: 8px 10px; width: 100%; min-height: 38px;
}
input.warn { border-color: #d9a85a; }
textarea { min-height: 72px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--water); }
input[type=range] { padding: 0; border: 0; min-height: 0; accent-color: var(--water); width: 160px; }
label.f, div.f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); min-width: 0; }
label.f > span:first-child, .f-label { color: var(--ink); font-weight: 600; font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.ttl-custom { width: 110px; }

.switch {
  width: 46px; height: 26px; border-radius: 999px; border: 0; background: #b7c4c1; position: relative; cursor: pointer; flex: none; padding: 0;
  transition: background .15s;
}
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch[aria-checked="true"] { background: var(--water); }
.switch[aria-checked="true"] .knob { left: 23px; }
.switch:disabled { opacity: .5; cursor: default; }

/* ── 상태 표시 ── */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { background: var(--pool); color: var(--water-ink); }
.pill.released { background: #f6ead6; color: #8a5408; }
.pill.off { background: var(--off-bg); color: var(--off); }
.pill.off .dot { background: transparent; border: 1.5px solid currentColor; }
.pill.idle { background: var(--off-bg); color: var(--off); }
.tag { font-size: 11px; font-weight: 600; color: #8a5408; background: #f6ead6; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.note { border-radius: 10px; padding: 10px 14px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.note.warn { background: var(--amber-bg); border: 1px solid var(--amber-line); color: #5e3a06; display: block; }
.note.info { background: var(--pool-soft); border: 1px solid #cfe3e3; color: var(--water-ink); }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 12px; flex-wrap: wrap; }
.banner p { margin: 2px 0 0; font-size: 14px; }
.banner.warn { background: #f6ead6; color: var(--amber-ink); }
.banner.off { background: var(--off-bg); color: var(--ink); margin-bottom: 8px; }
#banner:empty { display: none; }

/* ── 카드·표 ── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.card-foot { border-top: 1px solid var(--line-soft); padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.card-foot h3 { font-size: 14px; }
p.card-foot { display: block; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 500; }
table.data th:first-child, table.data td:first-child { padding-left: 18px; }
table.data th:last-child, table.data td:last-child { padding-right: 18px; }
.card:not(.flush) table.data th:first-child, .card:not(.flush) table.data td:first-child { padding-left: 4px; }
table.data td { vertical-align: middle; }
th.r, td.r { text-align: right; }
td.big { font-size: 17px; font-weight: 700; }
td.nowrap, td.num { white-space: nowrap; }
td.ok-0 { color: var(--danger); }
td.empty { text-align: center; padding: 28px; }
.empty { color: var(--muted); padding: 20px 0; }
.strong-link { font-weight: 600; text-decoration: none; color: var(--ink); }
.strong-link:hover { text-decoration: underline; }
.chip { display: inline-block; font-size: 13px; padding: 1px 8px; margin: 0 4px 4px 0; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }

/* ── ① 현황 ── */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 30px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tile-value small { font-size: 15px; font-weight: 500; color: var(--muted); }
.tile-text { font-size: 15px; font-weight: 600; }
.tile.warn { background: var(--amber-bg); border-color: var(--amber-line); }
.tile.warn .tile-label { color: #8a5408; font-weight: 600; }
.tile.warn .tile-text { color: #5e3a06; }

.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .grow { flex: 999 1 520px; }
.room-panel { flex: 1 1 340px; max-width: 100%; }
@media (min-width: 1200px) { .room-panel { flex: 0 0 380px; position: sticky; top: 20px; } }

.rooms-table tbody tr { cursor: pointer; }
.rooms-table tbody tr:hover { background: #f7faf9; }
.rooms-table tbody tr.selected { background: var(--pool-soft); box-shadow: inset 3px 0 0 var(--water); }
.row-pick { font: inherit; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); text-align: left; }
.rule-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.rule-chips code { background: #e6eeed; border-radius: 4px; padding: 1px 6px; font-size: 12px; }
.spark { display: block; }
.spark .area { fill: var(--pool); }
.spark .line { fill: none; stroke: var(--water); stroke-width: 1.5; }
.recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.recent li { display: flex; gap: 12px; }
.recent li > span:first-child { flex: 0 0 72px; }
.recent strong { font-weight: 600; }

.panel-inner { display: flex; flex-direction: column; gap: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.panel-head h2 { font-size: 18px; }
.ext-link { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.panel-sec { display: flex; flex-direction: column; gap: 8px; }
.panel-sec.sep { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rate-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rate-row input { min-height: 32px; padding: 4px 8px; font-size: 13px; }
.rate-row .inline { flex: 1 1 130px; gap: 6px; }
.action {
  font: inherit; text-align: left; border: 1px solid var(--field); background: #fff; color: var(--ink); border-radius: 10px; padding: 11px 14px;
  cursor: pointer; display: flex; flex-direction: column; gap: 2px; width: 100%;
}
.action:hover:not(:disabled) { border-color: var(--muted); }
.action.amber { border-color: #d9a85a; background: var(--amber-bg); color: #5e3a06; }
.action.primary { border-color: var(--water); background: var(--pool-soft); color: var(--water-ink); }
.action:disabled { opacity: .5; cursor: default; }
.action-title { font-weight: 600; }
.action-desc { font-size: 12px; opacity: .85; }
.power-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.power-text { display: flex; flex-direction: column; }
.panel-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }

/* ── ② 대기실 ── */
.room-list { flex: 1 1 280px; max-width: 100%; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@media (min-width: 1100px) { .room-list { flex: 0 0 300px; } }
.room-card {
  text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px;
  display: flex; flex-direction: column; gap: 4px;
}
.room-card:hover { border-color: var(--muted); color: var(--ink); }
.room-card[aria-current="true"] { border: 2px solid var(--water); padding: 12px 14px; }
.room-card.new { border-style: dashed; }
.room-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-card-top strong { font-size: 15px; }
.rules-line { font-size: 12px; color: var(--off); word-break: break-all; }
.pad { padding: 4px; }

.editor { flex: 999 1 560px; padding: 0; gap: 0; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.editor-head h2 { font-size: 18px; }
.power-label { cursor: pointer; }
.editor-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 24px; }
.sec { display: flex; flex-direction: column; gap: 12px; border: 0; margin: 0; padding: 0; min-width: 0; }
.sec legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 12px; }
.sec.platform { border: 1px solid var(--amber-line); border-radius: 12px; padding: 16px; }
.sec.more summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.sec.more[open] summary { margin-bottom: 12px; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode-opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; gap: 8px; cursor: pointer; }
.mode-opt span { display: flex; flex-direction: column; }
.mode-opt:has(input:checked) { border: 2px solid var(--water); background: var(--pool-soft); padding: 11px; }
.mode-opt.disabled { color: var(--muted); cursor: default; }
.mode-opt input { margin-top: 3px; }
.tag-box { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--field); border-radius: 8px; padding: 6px; background: #fff; min-height: 42px; cursor: text; }
.tag-box:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.tag-item { display: inline-flex; align-items: center; gap: 2px; background: #e6eeed; border-radius: 6px; padding: 2px 2px 2px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--ink); }
.tag-item button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 6px; font-size: 15px; line-height: 1; min-height: 24px; }
.tag-item button:hover { color: var(--danger); }
.tag-entry { border: 0; outline: none; flex: 1 1 140px; min-width: 0; min-height: 28px; padding: 2px 4px; font-size: 13px; }
.test-box { background: var(--paper); border-radius: 10px; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.test-box label { flex: 1 1 260px; font-size: 13px; }
.test-box strong { white-space: nowrap; }
.test-box input { background: #fff; min-height: 34px; }
.test-out { flex: 1 1 260px; font-size: 13px; }
.test-out code { background: #e6eeed; border-radius: 4px; padding: 0 5px; }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 16px; }

.save-bar {
  position: sticky; bottom: 0; z-index: 3; border-top: 1px solid var(--line); background: #f7faf9; border-radius: 0 0 12px 12px;
  padding: 12px 22px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -6px 14px rgba(23, 37, 44, .06);
}
.save-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.save-summary { font-size: 13px; }

/* ── ③ 대기 화면 ── */
.display-split .editor { flex: 999 1 480px; }
.preview { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; }
@media (min-width: 1200px) { .preview { position: sticky; top: 20px; } }
.pv-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; width: 100%; max-width: 440px; }
.seg { display: inline-flex; border: 1px solid var(--field); border-radius: 8px; overflow: hidden; font-size: 13px; }
.seg button { font: inherit; border: 0; background: #fff; color: var(--ink); padding: 6px 12px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pv-stage { width: 360px; max-width: 100%; border: 10px solid var(--ink); border-radius: 34px; overflow: hidden; box-shadow: 0 10px 30px rgba(23,37,44,.18); }
.pv-stage.pc { width: 100%; max-width: 440px; border-width: 8px; border-radius: 12px; }
.pv-page { min-height: 560px; padding: 32px 22px 22px; display: flex; flex-direction: column; }
.pv-stage.pc .pv-page { min-height: 380px; padding: 28px; }
.pv-inner { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.pv-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-height: 18px; }
.pv-logo { max-height: 28px; max-width: 120px; }
.pv-title { font-size: 21px; line-height: 1.35; color: inherit; }
.pv-vessel { position: relative; height: 200px; border-radius: 24px; border: 1.5px solid; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; isolation: isolate; }
.pv-water { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; transition: height .6s ease; }
.pv-wave { position: absolute; left: 0; top: -13px; width: 200%; height: 14px; animation: pv-drift 7s linear infinite; }
.pv-wave svg { display: block; width: 100%; height: 100%; }
@keyframes pv-drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .pv-wave { animation: none; } }
.pv-ahead-label { font-size: 13px; }
.pv-ahead { font-size: 64px; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pv-ahead small { font-size: .36em; font-weight: 700; margin-left: 2px; letter-spacing: 0; }
.pv-facts { display: grid; grid-template-columns: 1fr; margin: 0; border-top: 1px solid; border-bottom: 1px solid; }
.pv-facts div { padding: 10px 0; }
.pv-facts div + div { padding-left: 14px; border-left: 1px solid; border-left-color: inherit; }
.pv-facts dt { font-size: 12px; }
.pv-facts dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pv-status { margin: -6px 0 0; font-size: 13px; }
.pv-msg { margin: 6px 0 0; font-size: 14px; line-height: 1.6; white-space: pre-line; }
.pv-notice { border-left: 3px solid; padding: 2px 0 2px 12px; font-size: 13px; line-height: 1.6; white-space: pre-line; }
.pv-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.color-in { display: flex; gap: 6px; align-items: center; }
.color-in input[type=color] { width: 40px; height: 38px; padding: 2px; flex: none; }

/* ── ④ 고객사 관리 ── */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { font: inherit; font-size: 13px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--field); background: #fff; color: var(--ink); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.search { max-width: 240px; min-height: 34px; font-size: 13px; }

.dialog { border: 0; border-radius: 14px; padding: 0; max-width: 440px; width: calc(100% - 32px); color: var(--ink); }
.dialog.wide { max-width: 520px; }
.dialog::backdrop { background: rgba(23, 37, 44, .45); }
.dialog form { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.dialog p { margin: 0; color: var(--muted); white-space: pre-line; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.dlg-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.dlg-foot { border-top: 1px solid var(--line-soft); padding: 12px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; gap: 8px; font-size: 12px; }
.steps li { flex: 1; border-top: 3px solid var(--line); padding-top: 6px; color: var(--muted); }
.steps li.cur { border-color: var(--water); color: var(--water-ink); font-weight: 600; }
.steps li.done { border-color: #8fc3cb; }
.ok-line { display: flex; align-items: center; gap: 6px; color: var(--water-ink) !important; }

/* ── 그 밖의 화면 ── */
.tab-body { display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; align-items: start; }
.grid2 .wide, .grid3 .wide { grid-column: 1 / -1; }
.card.danger-zone { border-color: #e2c3bf; }
.temp-pw { background: #f6ead6; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.temp-pw p { color: var(--amber-ink); }
.temp-pw strong { font-size: 18px; letter-spacing: .04em; color: var(--ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; }
pre.code {
  margin: 0; padding: 14px 16px; background: #10202a; color: #dfe9e8; border-radius: 10px; overflow-x: auto;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; word-break: normal; overflow-wrap: normal;
}
pre.code code { word-break: break-all; white-space: pre-wrap; }

/* ── 로그인 ── */
.auth { max-width: 380px; width: 100%; margin: 12vh auto 0; display: flex; flex-direction: column; gap: 18px; }
.auth h1 { font-size: 22px; }
.auth .brand strong { font-size: 22px; }
.auth form { display: flex; flex-direction: column; gap: 14px; }

/* ── 알림 ── */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; z-index: 10;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; }
.toast.err { background: var(--danger); }

@media (max-width: 899px) {
  .side { gap: 12px; padding: 14px; }
  .side-group:not(.sep) { flex-direction: row; flex-wrap: wrap; }
  .side-group.sep { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side-group.sep .side-label { width: 100%; }
  .side-link { padding: 7px 10px; }
  .side-foot { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (max-width: 760px) {
  .view { padding: 20px 14px 60px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .grid3, .mode-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .search { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .toast, .switch, .switch .knob { transition: none; } }

/* 단위·짧은 라벨은 줄바꿈하지 않음, 표는 좁은 화면에서 가로 스크롤 */
.inline > .muted, .nowrap, .nowrap > * { white-space: nowrap; }
table.data th, table.data td { overflow-wrap: normal; word-break: keep-all; }
.table-scroll > table.data { min-width: 640px; }
.table-scroll > table.rooms-table { min-width: 720px; }
.platform-card { border-color: var(--amber-line); }
.steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.steps-list code { background: #e6eeed; border-radius: 4px; padding: 0 5px; }

/* 대기 화면: 적용 범위 */
.scope-bar { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line-soft); background: #f7faf9; border-radius: 12px 12px 0 0; }
.scope-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.scope-label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.scope-sep { width: 1px; height: 28px; background: var(--line); margin: 0 4px; }
.scope-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--field); background: #fff; color: var(--ink); text-decoration: none; white-space: nowrap; line-height: 1;
}
.scope-chip:hover { border-color: var(--muted); color: var(--ink); }
.scope-name { font-weight: 600; font-size: 14px; }
.scope-sub { font-size: 12px; color: var(--muted); }
.scope-chip.marked .scope-sub { color: var(--water-ink); font-weight: 600; }
.scope-chip[aria-current="page"] { background: var(--water); border-color: var(--water); color: #fff; }
.scope-chip[aria-current="page"] .scope-sub { color: rgba(255,255,255,.85); }
.scope-hint { margin-top: -8px; }
@media (max-width: 760px) { .scope-bar { flex-direction: column; align-items: flex-start; } .scope-sep { display: none; } }

/* 어두운 왼쪽 메뉴 안의 링크는 마우스를 올려도 밝게 (전역 a:hover 의 짙은 색 덮어쓰기) */
.side a:hover, .side .link:hover { color: #fff; }
.brand:hover { color: #fff; }
.brand.dark:hover { color: var(--ink); }

/* 대기 현황: 목록 ↔ 조작 패널 연결 */
.mode-tag { font-size: 12px; font-weight: 600; color: var(--off); background: var(--off-bg); border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
.mode-tag.sm { font-size: 11px; padding: 1px 6px; }
.pick-cell { white-space: nowrap; width: 1%; }
.pick-badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--water); border-radius: 999px; padding: 3px 10px; }
.pick-arrow { color: var(--muted); font-size: 18px; padding-right: 6px; }
.rooms-table tbody tr:hover .pick-arrow { color: var(--water); }
.room-panel { border-top: 4px solid var(--water); }
.panel-head { flex-direction: column; align-items: flex-start; gap: 6px; }
.panel-kicker { font-size: 12px; font-weight: 600; color: var(--water-ink); letter-spacing: .02em; }
.panel-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-title h2 { font-size: 20px; }
.panel-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.panel-metrics > div { background: var(--paper); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.panel-metrics dt { font-size: 12px; color: var(--muted); }
.panel-metrics dd { margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-quick { display: flex; gap: 6px; }
.rate-quick .btn { flex: 1; justify-content: center; }
.rate-form { display: flex; gap: 6px; align-items: center; }
.rate-form .inline { gap: 6px; }
.rate-form input { min-height: 32px; padding: 4px 8px; font-size: 13px; }
.panel-links { align-items: center; }

/* 대기 현황: 목록은 좁게, 오른쪽 대기실 제어는 넓게 */
.live-split > .grow { flex: 1 1 440px; }
.live-split > .room-panel { flex: 1 1 460px; }
@media (min-width: 1200px) {
  .live-split > .grow { flex: 1 1 0; min-width: 0; }
  .live-split > .room-panel { flex: 0 0 52%; position: sticky; top: 20px; }
}
.live-split .table-scroll > table.rooms-table { min-width: 560px; }
.live-split .rooms-table th, .live-split .rooms-table td { padding-left: 6px; padding-right: 6px; }
.live-split .rooms-table td:first-child, .live-split .rooms-table th:first-child { padding-left: 16px; }
.live-split .rooms-table td:last-child, .live-split .rooms-table th:last-child { padding-right: 16px; }
.live-split .panel-inner { gap: 18px; }
.live-split .room-panel .panel-sec .action { padding: 12px 16px; }
.note.block { display: block; }

/* 대기 현황: 목록 6 : 제어 4 */
@media (min-width: 1200px) {
  .live-split > .room-panel { flex: 0 0 calc(40% - 8px); }
}

/* 입력 항목 그룹: 소제목이 있는 테두리 영역 (대기실·대기 화면·고객사 설정 공통) */
.editor-body > .sec {
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; padding: 0 18px 18px; gap: 14px;
}
.editor-body > .sec > h3,
.editor-body > .sec > legend,
.editor-body > details.sec > summary {
  font-size: 15px; font-weight: 700; color: var(--ink);
  margin: 0 -18px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); background: #f3f7f6; border-radius: 12px 12px 0 0;
}
/* fieldset 의 legend 를 테두리 위가 아니라 영역 안쪽 머리줄로 */
.editor-body > fieldset.sec > legend { float: left; width: calc(100% + 36px); box-sizing: border-box; }
.editor-body > fieldset.sec > legend + * { clear: both; }
.editor-body > details.sec:not([open]) { padding-bottom: 0; }
.editor-body > details.sec:not([open]) > summary { border-bottom: 0; border-radius: 12px; }
.editor-body > details.sec > summary { cursor: pointer; }
.editor-body > details.sec[open] > summary { margin-bottom: 14px; }
.editor-body > .sec > h3 + .hint { margin-top: -4px; }
.editor-body > .sec.platform { border-color: var(--amber-line); }
.editor-body > .sec.platform > h3 { background: var(--amber-bg); }
.editor-body > .sec .test-box { background: #eef3f2; }
.editor-body { gap: 18px; }
/* 접힌 그룹은 머리줄만 */
.editor-body > details.sec:not([open]) { padding: 0; }
.editor-body > details.sec:not([open]) > summary { margin: 0; }
