:root {
  --bg: #f4eef1;
  --card: #fff;
  --line: #e2d4da;
  --ink: #2a1f24;
  --muted: #7a5f68;
  --accent: #c43b6e;
  --accent-ink: #fff;
  --ok: #15803d;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Malgun Gothic", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
.wrap { width: calc(100% - 24px); max-width: none; margin: 0 auto; }
.top {
  position: relative;
  z-index: 30;
  background: #3b1f2a;
  color: #fff;
  padding: 14px 0;
  margin-bottom: 22px;
}
.brand { font-weight: 700; letter-spacing: .02em; padding: 5px 0; line-height: 1.45; }
.brand span { font-weight: 400; opacity: .72; margin-left: 8px; }
.top .wrap { display: flex; align-items: flex-start; gap: 8px 18px; flex-wrap: wrap; }
nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-left: auto;
  width: max-content;
  max-width: 100%;
}
nav a,
.nav-drop,
.nav-account { flex: 0 0 auto; }
nav a {
  color: #ffd7e4;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  word-break: keep-all;
}
nav a.on, nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
nav .who { color: #f0c8d4; font-size: 12px; margin: 0 6px; white-space: nowrap; }
.nav-account { display: inline-flex; align-items: center; margin-left: 6px; }
.nav-drop { position: relative; }
.nav-drop-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #ffd7e4;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  word-break: keep-all;
}
.nav-drop-btn::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  vertical-align: 2px;
}
.nav-drop.on > .nav-drop-btn,
.nav-drop.open > .nav-drop-btn,
.nav-drop-btn:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 132px;
  margin: 0;
  padding: 6px;
  background: #3b1f2a;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-drop-menu[hidden] { display: none; }
.nav-drop-menu.align-end { left: auto; right: 0; }
.nav-drop-menu a { display: block; white-space: nowrap; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px 22px;
  margin-bottom: 18px;
}
h1, h2 { margin: 0 0 8px; font-size: 18px; }
.sub { color: var(--muted); margin: 0 0 14px; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: #e8f7ee; color: var(--ok); }
.flash.error { background: #fdecea; color: var(--danger); }
.toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.toolbar .toolbar-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.toolbar label.per-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.toolbar select.per-select {
  width: auto;
  min-width: 88px;
  height: 34px;
  padding: 6px 8px;
}
.toolbar .user-search-form { display: inline-flex; align-items: center; margin: 0; }
.toolbar #userSearch {
  box-sizing: border-box;
  width: 220px;
  height: 34px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.toolbar #userSearch:hover { border-color: #d4c0c7; }
.toolbar #userSearch:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(196, 59, 110, 0.16);
}
.toolbar #userSearch::placeholder { color: #b89aa4; }
.toolbar #userSearch::-webkit-search-decoration,
.toolbar #userSearch::-webkit-search-cancel-button,
.toolbar #userSearch::-webkit-search-results-button,
.toolbar #userSearch::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #faf5f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.bulk-bar[hidden] { display: none; }
.bulk-bar .bulk-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}
.bulk-bar .bulk-all input,
.user-check input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}
.bulk-bar .bulk-count { color: var(--muted); font-size: 13px; }
.user-check {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  vertical-align: middle;
}
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.pager .pager-info { color: var(--muted); font-size: 13px; margin-right: 4px; }
dialog.modal.wide { width: min(720px, calc(100% - 32px)); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  border: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
th { background: #faf5f7; font-size: 12px; color: var(--muted); }
.expired { color: var(--danger); }
.muted { color: var(--muted); }
.proxy-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 12px; font-size: 13px; }
.proxy-sum b { font-variant-numeric: tabular-nums; }
.proxy-scroll { max-height: calc(100vh - 230px); overflow: auto; }
.proxy-scroll thead th { position: sticky; top: 0; z-index: 1; }
.proxy-pill {
  display: inline-block; min-width: 4.5rem; text-align: center;
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px;
}
.proxy-on { color: #067647; background: #e8f7ee; }
.proxy-off { color: #b42318; background: #fdecea; }
.proxy-unk { color: #667085; background: #f2f4f7; }
.grid { display: block; }
.shop-server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  max-height: 240px;
  overflow: auto;
  margin: 4px 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf5f7;
}
.shop-server-grid .shop-server-all {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  font-weight: 700;
}
.shop-server-grid label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}
.shop-server-grid label.checkbox input { margin: 0; }
dialog.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px 18px;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  height: fit-content;
  overflow: auto;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 12px 40px rgba(40, 16, 24, .22);
}
dialog.modal::backdrop { background: rgba(30, 16, 22, .45); }
dialog.modal h2 { margin-bottom: 6px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
label { display: block; margin: 10px 0 4px; font-size: 13px; }
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
textarea { min-height: 360px; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.btn, button.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
button.btn.ok-del { padding: 2px 8px; font-size: 12px; }
.ok-check-col { width: 36px; text-align: center; }
.ok-check, .ok-check-all { width: 16px; height: 16px; margin: 0; cursor: pointer; vertical-align: middle; }
.row-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.login-box { max-width: 380px; margin: 48px auto; }
.hint { color: var(--muted); font-size: 12px; }
.auth-acc-layout { display: flex; gap: 16px; align-items: flex-start; }
.auth-acc-side { width: 280px; flex: 0 0 280px; }
.auth-acc-main { flex: 1; min-width: 0; }
.auth-acc-holders { max-height: calc(100vh - 280px); overflow: auto; margin: 8px 0 12px; }
.auth-acc-holders a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.auth-acc-holders a.on { background: #fde7ef; color: #9d2454; font-weight: 700; }
.auth-acc-holders a:hover { background: #faf5f7; }
.auth-acc-holders .count { color: var(--muted); font-size: 12px; }
.auth-acc-table td { white-space: normal; }
.auth-acc-table input[type=text] { min-width: 120px; }
.auth-acc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 900px) {
  .auth-acc-layout { flex-direction: column; }
  .auth-acc-side { width: auto; flex: 1 1 auto; }
  .auth-acc-holders { max-height: 240px; }
}

body.app-paths { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.app-paths .top { margin-bottom: 8px; padding: 10px 0; flex: 0 0 auto; }
body.app-paths main.wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
.path-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 12px;
  margin-bottom: 0;
}
.path-card .card-head { margin-bottom: 6px; flex-shrink: 0; }
.path-card .card-head h2 { font-size: 16px; margin: 0; }
.path-card .card-head .sub { margin: 2px 0 0; font-size: 12px; }
.path-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.path-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 6px 8px;
  background: #faf5f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  flex-shrink: 0;
}
.path-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink);
}
.path-toolbar label.checkbox { font-weight: 600; }
.path-toolbar select,
.path-toolbar input[type=number] {
  width: auto;
  padding: 4px 8px;
  font-size: 12px;
}
.path-toolbar input[type=number] { width: 100px; }
.path-toolbar input[type=range] { width: 140px; }
.path-toolbar #pathZoomVal {
  width: 42px; text-align: right; font-variant-numeric: tabular-nums;
}
.path-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 10px;
}
.path-canvas-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#pathCanvas {
  display: block;
  background: #f0f0f0;
  outline: none;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.path-status {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink);
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.path-status[data-kind="ok"] { color: var(--ok); }
.path-status[data-kind="error"] { color: var(--danger); }
.path-help {
  padding: 4px 8px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.85);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.path-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
}
.path-file-box,
.path-list-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.path-file-box label { display: block; font-size: 12px; margin: 0 0 4px; }
.path-file-box select,
.path-file-box input[type=text] { width: 100%; padding: 5px 7px; font-size: 13px; }
.path-row { display: flex; gap: 6px; margin-top: 6px; }
.path-row .btn { flex: 1; padding: 5px 8px; font-size: 12px; }
.path-row input { flex: 1; }
.path-meta { margin-top: 6px; font-size: 11px; color: var(--muted); }
.path-list-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.path-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  min-height: 24px;
  line-height: 1;
}
.path-list-head-title {
  display: inline-flex;
  align-items: center;
  height: 24px;
  white-space: nowrap;
}
.path-list-head-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  min-height: 24px;
}
.path-list-head .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
}
.path-auto-vision {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  height: 24px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}
.path-auto-vision select {
  display: inline-block;
  width: 46px;
  height: 24px;
  margin: 0;
  padding: 0 2px;
  font-size: 11px;
  line-height: 22px;
  box-sizing: border-box;
  vertical-align: middle;
}
.path-wp-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 12px;
}
.path-wp-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  gap: 6px;
}
.path-wp-list li.path-wp-active {
  background: #fff4e6;
  outline: 1px solid #fab387;
  border-radius: 4px;
  padding-left: 4px;
}
.path-wp-list .wp-label {
  font-family: Consolas, monospace;
  cursor: pointer;
  flex: 1;
}
.path-wp-list .wp-label:hover { color: var(--accent); text-decoration: underline; }
.path-wp-list .btn.small { padding: 1px 6px; font-size: 10px; }
.path-mode-tabs { display: inline-flex; gap: 4px; margin-right: 8px; }
.path-mode-tabs .path-mode {
  padding: 6px 12px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
}
.path-mode-tabs .path-mode.active {
  background: #fde7ef;
  color: var(--accent);
  border-color: #e7a0b6;
}
.path-panel-dim { opacity: 0.72; }
.path-panel-active { box-shadow: inset 0 0 0 2px #e7a0b6; border-radius: 8px; }
.path-step-list .step-row { flex-wrap: wrap; gap: 4px; }
.path-step-list .step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}
.path-step-add {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.path-step-add label { display: block; font-size: 11px; margin-bottom: 4px; }
.path-step-form {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf5f7;
}
.path-step-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.path-step-fields label {
  display: block;
  font-size: 11px;
  margin: 6px 0 2px;
}
.path-step-fields input[type=text],
.path-step-fields input[type=number] {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
}
.path-step-fields .sub { font-size: 10px; margin: 6px 0 2px; color: var(--muted); }
#pathTravelPanel .path-step-list {
  flex: 0 1 auto;
  max-height: min(240px, 32vh);
  min-height: 48px;
}
#pathTravelPanel.path-form-open .path-step-list {
  max-height: min(160px, 22vh);
}
#pathTravelPanel.path-form-open .path-step-form { flex-shrink: 0; }
#pathSave.dirty { background: #b45309; border-color: #b45309; color: #fff; }
@media (max-width: 1100px) {
  body.app-paths { height: auto; overflow: auto; }
  body.app-paths main.wrap { height: auto; }
  .path-body { grid-template-columns: 1fr; }
  .path-side { max-height: none; }
}

body.app-control { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.app-control .top { margin-bottom: 8px; padding: 10px 0; flex: 0 0 auto; }
body.app-control main.wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
.control-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 12px;
  margin-bottom: 0;
}
.control-card .card-head { margin-bottom: 6px; flex-shrink: 0; }
.control-card .card-head h2 { font-size: 16px; margin: 0; }
.control-card .card-head .sub { margin: 2px 0 0; font-size: 12px; }
.control-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.control-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  padding: 6px 8px; background: #faf5f7; border: 1px solid var(--line); border-radius: 8px;
}
.control-toolbar .btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; margin: 0; line-height: 1;
}
.control-toolbar label.checkbox {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; margin: 0; padding: 0;
  font-size: 13px; line-height: 1; color: var(--ink); white-space: nowrap;
}
.control-toolbar label.checkbox input[type=checkbox] {
  margin: 0; padding: 0; width: 14px; height: 14px;
  flex: 0 0 14px; align-self: center; accent-color: var(--accent);
}
.control-toolbar label.checkbox span { line-height: 1; }
#controlExcelCopy { display: none; }
.control-panel[data-view="excel"] #controlExcelCopy { display: inline-flex; }
.control-memo-filter { display: none; }
.control-panel[data-view="excel"] .control-memo-filter {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; margin: 0;
  font-size: 13px; line-height: 1; color: var(--muted); white-space: nowrap;
}
.control-memo-filter input {
  width: 140px; height: 28px; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  color: var(--ink); font-size: 12px;
}
.control-sort-label {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; margin: 0;
  font-size: 13px; line-height: 1; color: var(--muted); white-space: nowrap;
}
.control-sort-label select {
  width: auto; min-width: 96px; height: 28px; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  color: var(--ink); font-size: 12px;
}
#controlViewMode[aria-pressed="true"] {
  border-color: var(--accent); color: var(--accent); font-weight: 700;
}
.control-summary { font-size: 13px; font-weight: 600; color: #334155; }
.control-summary[data-kind="ok"] { color: var(--ok); }
.control-summary[data-kind="error"] { color: var(--danger); }
.control-role-filters {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  padding: 6px 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.control-role-filters-label {
  display: inline-flex; align-items: center;
  height: 22px; margin: 0;
  font-size: 12px; font-weight: 600; line-height: 1; color: var(--muted);
}
.control-role-filter {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; margin: 0; padding: 0;
  font-size: 12px; line-height: 1; white-space: nowrap;
}
.control-role-filter input[type=checkbox] {
  margin: 0; padding: 0; width: 13px; height: 13px;
  flex: 0 0 13px; align-self: center; accent-color: var(--accent);
}
.control-role-filter span { line-height: 1; }
.control-server-filters { align-items: flex-start; }
.control-server-filter-all span { font-weight: 700; }
.control-table-wrap { flex: 1; min-height: 280px; }
.control-panel[data-view="card"] .control-table-wrap,
.control-panel[data-view="excel"] .control-table-wrap,
.control-panel[data-view="srvmap"] .control-table-wrap { display: none; }
.control-panel[data-view="table"] .control-cards-wrap,
.control-panel[data-view="excel"] .control-cards-wrap,
.control-panel[data-view="srvmap"] .control-cards-wrap { display: none; }
.control-panel[data-view="table"] .control-excel-wrap,
.control-panel[data-view="card"] .control-excel-wrap,
.control-panel[data-view="srvmap"] .control-excel-wrap { display: none; }
.control-panel[data-view="table"] .control-srvmap-wrap,
.control-panel[data-view="card"] .control-srvmap-wrap,
.control-panel[data-view="excel"] .control-srvmap-wrap { display: none; }
.control-srvmap-wrap { flex: 1; min-height: 280px; overflow: auto; }
.control-srvmap-empty {
  padding: 24px 12px; text-align: center; color: var(--muted); font-size: 13px;
}
.control-srvmap-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 1200px;
  table-layout: fixed;
  font-size: 14px;
  background: #fff;
}
.control-srvmap-cell {
  border: 1px solid #c5cdd6;
  padding: 12px 10px;
  text-align: center;
  font-weight: 700;
  line-height: 1.35;
  background: var(--srv, #f8fafc);
  color: #111827;
  cursor: pointer;
  user-select: none;
}
.control-srvmap-cell:hover { filter: brightness(0.97); }
.control-srvmap-cell-empty {
  background: #eceff3;
  color: #8b95a5;
  font-weight: 600;
  cursor: default;
}
.control-srvmap-cell-empty:hover { filter: none; }
.control-excel-wrap { flex: 1; min-height: 280px; }
.control-excel {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 13px;
  background: #fff;
}
.control-excel th,
.control-excel td {
  border: 1px solid #c5cdd6;
  padding: 3px 8px;
  white-space: nowrap;
  line-height: 1.35;
  text-align: center;
}
.control-excel th {
  background: #e8eef4;
  font-weight: 700;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1;
  cursor: grab;
  user-select: none;
}
.control-excel th.control-excel-col-drag {
  opacity: 0.45;
  cursor: grabbing;
}
.control-excel th.control-excel-col-over-before {
  box-shadow: inset 3px 0 0 #2563eb;
}
.control-excel th.control-excel-col-over-after {
  box-shadow: inset -3px 0 0 #2563eb;
}
.control-excel td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: Consolas, monospace;
}
.adena-status-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow: auto;
}
.adena-excel {
  width: max-content;
  min-width: 0;
  margin-left: 0;
  margin-right: auto;
}
.adena-status-row .adena-excel {
  flex: 0 0 auto;
  margin-right: 0;
}
.adena-excel th,
.adena-excel td {
  padding: 3px 18px;
}
.adena-excel th {
  cursor: default;
  user-select: text;
}
.adena-excel th,
.adena-excel td,
.adena-excel th.num,
.adena-excel td.num {
  text-align: center;
}
.adena-excel a {
  color: inherit;
  text-decoration: none;
}
.adena-excel a:hover { text-decoration: underline; }
.adena-total {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.adena-total strong {
  margin-left: 8px;
  font-family: Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
.adena-excel tr.adena-excel-total td {
  font-weight: 700;
  background: #e8eef4;
}
.adena-wh-items td.adena-wh-has,
.control-excel tr:hover td.adena-wh-has {
  background: #fde7d4;
}
.adena-excel button.adena-hist-btn,
.pledge-wh-table button.adena-hist-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.adena-excel button.adena-hist-btn {
  font-family: Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.adena-excel button.adena-hist-btn:hover,
.pledge-wh-table button.adena-hist-btn:hover { color: inherit; text-decoration: none; }
.adena-hist-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(30, 16, 22, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.adena-hist-overlay[hidden] { display: none !important; }
.adena-hist-dialog {
  width: min(820px, 100%);
  max-height: none;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(40, 16, 24, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.adena-hist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.adena-hist-head h2 { margin: 0; font-size: 18px; }
.adena-hist-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.adena-hist-days {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.adena-hist-days[hidden] { display: none !important; }
.adena-hist-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 4px;
}
.adena-hist-close:hover { color: var(--ink); }
.adena-hist-body { overflow: visible; padding: 12px 16px 16px; }
.adena-hist-chart {
  display: block;
  width: 100%;
  height: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.adena-hist-chart[hidden] { display: none !important; }
.adena-hist-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.adena-hist-tabs[hidden] { display: none !important; }
.adena-hist-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.adena-hist-tab:hover { background: #fdf2f6; }
.adena-hist-tab.is-on,
.adena-hist-tab.is-on:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.adena-hist-bar { fill: #2563eb; }
.adena-hist-grid { stroke: #e2e8f0; stroke-width: 1; }
.adena-hist-area { fill: rgba(190, 24, 93, 0.12); stroke: none; }
.adena-hist-line { fill: none; stroke: #be185d; stroke-width: 2; }
.adena-hist-dot { fill: #be185d; }
.adena-hist-axis { fill: #64748b; font-size: 11px; font-family: Consolas, "Malgun Gothic", monospace; }
.adena-hist-yaxis { fill: #334155; font-size: 15px; font-weight: 400; font-family: Consolas, "Malgun Gothic", monospace; }
.adena-hist-empty { margin: 12px 0; color: var(--muted); }
.adena-hist-table-wrap {
  height: 341px;
  max-height: 341px;
  overflow-y: scroll;
  margin-top: 12px;
}
.adena-hist-table-wrap[hidden] { display: none !important; }
.adena-hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adena-hist-table th,
.adena-hist-table td {
  border: 1px solid #c5cdd6;
  height: 31px;
  padding: 0 12px;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}
.adena-hist-table th {
  background: #e8eef4;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}
.adena-hist-table td.num {
  font-family: Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.adena-delta-up { color: #15803d; font-weight: 700; }
.adena-delta-down { color: #b91c1c; font-weight: 700; }
.control-excel td.center { text-align: center; font-weight: 700; }
.control-excel .control-open-name { font-weight: 700; }
.control-excel td.control-excel-role-sword,
.control-excel td.control-excel-role-bow,
.control-excel td.control-excel-role-ai {
  color: rgb(0, 0, 0);
}
.control-excel td.control-excel-role-sword {
  background: rgb(151, 255, 51);
}
.control-excel td.control-excel-role-bow {
  background: rgb(255, 168, 168);
}
.control-excel td.control-excel-role-ai {
  background: rgb(168, 216, 255);
}
.control-excel th.control-excel-col-server {
  background: rgb(255, 254, 54);
  color: rgb(0, 0, 0);
}
.control-excel th.control-excel-col-id {
  background: rgb(151, 255, 51);
  color: rgb(0, 0, 0);
}
.control-excel th.control-excel-col-lv {
  background: rgb(230, 148, 32);
  color: rgb(0, 0, 0);
}
.control-excel th.control-excel-col-hp {
  background: rgb(216, 0, 12);
  color: rgb(255, 255, 255);
}
.control-excel th.control-excel-col-mp {
  background: rgb(98, 136, 229);
  color: rgb(255, 255, 255);
}
.control-excel th.control-excel-col-feather {
  background: rgb(204, 204, 204);
  color: rgb(0, 0, 0);
}
.control-excel-owner,
.control-excel-memo {
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  padding: 1px 4px;
  margin: 0;
  text-align: center;
  font: inherit;
  background: #fff;
}
.control-excel th.control-excel-owner-col,
.control-excel td.control-excel-owner-cell {
  padding: 2px 2px;
  width: 1%;
}
.control-excel input[type=text].control-excel-owner {
  box-sizing: border-box;
  width: 3.7em;
  min-width: 3.7em;
  max-width: 3.7em;
  padding: 0 2px;
  border-radius: 4px;
}
.control-excel input[type=text].control-excel-owner.is-filled {
  font-weight: 700;
  border-color: transparent;
  background: transparent;
  color: inherit;
}
.control-excel input[type=text].control-excel-owner.is-filled:focus {
  border-color: var(--accent, #c2410c);
  background: #fff;
}
.control-excel-memo {
  width: 12em;
  max-width: 18em;
}
.control-excel-owner:focus,
.control-excel-memo:focus {
  outline: 1px solid var(--accent, #c2410c);
  border-color: var(--accent, #c2410c);
}
.control-excel-owner:disabled,
.control-excel-memo:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}
.control-excel td.control-excel-alarm-cell {
  padding: 2px 4px;
  width: 1%;
}
.control-excel-alarm-btn {
  box-sizing: border-box;
  margin: 0;
  padding: 1px 6px;
  min-width: 0;
  width: auto;
  height: auto;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.control-excel-alarm-btn.is-set {
  border-color: var(--accent, #c2410c);
  color: var(--accent, #c2410c);
  font-weight: 700;
}
.control-excel-alarm-btn:hover { background: #fff7ed; }
dialog.modal.control-alarm-fire {
  width: min(440px, calc(100% - 32px));
  text-align: center;
  z-index: 80;
}
dialog.modal.control-alarm-fire h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--accent, #c2410c);
}
.control-alarm-fire-body {
  margin: 12px 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}
.control-alarm-fire .modal-actions { justify-content: center; }
.control-excel tr.row-offline td { color: #64748b; background: #f8fafc; }
.control-table td.control-id-chaotic,
.control-table tr.row-offline td.control-id-chaotic,
.control-inst-card-title .control-id-chaotic {
  color: var(--danger);
}
.control-excel td.control-id-chaotic,
.control-excel tr.row-offline td.control-id-chaotic,
.control-excel tr:hover td.control-id-chaotic {
  background: #b91c1c;
  color: #fff;
}
.control-excel tr:hover td { background: #fff7ed; }
.control-excel td.control-excel-srv,
.control-excel tr.row-offline td.control-excel-srv,
.control-excel tr:hover td.control-excel-srv {
  background: var(--srv);
  color: #111827;
}
.control-excel td.control-excel-alarm-on,
.control-excel tr.row-offline td.control-excel-alarm-on {
  background: #e8f6e9;
  box-shadow: inset 0 0 0 2px rgb(216, 0, 12);
}
.control-excel tr:hover td.control-excel-alarm-on {
  background: #d8f0dc;
}
.control-cards-wrap { flex: 1; min-height: 280px; overflow: auto; }
.control-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  align-content: start;
}
.control-cards-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}
.control-inst-card {
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.control-inst-card.row-offline { opacity: 0.72; }
.control-inst-card-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.control-inst-card-pc {
  font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.control-inst-card-title {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.control-status-lamp {
  display: inline-block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.control-status-lamp.is-live {
  background: #16a34a;
  box-shadow: 0 0 0 2px #bbf7d0, 0 0 6px rgba(34, 197, 94, 0.7);
}
.control-status-lamp.is-online {
  background: #86efac;
  box-shadow: 0 0 0 2px #dcfce7;
}
.control-status-lamp.is-offline {
  background: #94a3b8;
  box-shadow: 0 0 0 2px #e2e8f0;
}
.control-inst-card-ver { font-size: 13px; color: var(--muted); font-weight: 600; }
.control-inst-card-title strong {
  font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.control-inst-card-sub {
  font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.control-inst-card-sub .mono { font-family: Consolas, monospace; }
.control-inst-card-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 0;
}
.control-inst-card-meta > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0;
}
.control-inst-card-meta > div.wide { grid-column: 1 / -1; }
.control-inst-card-meta dt {
  margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.control-inst-card-meta dd {
  margin: 0; font-family: Consolas, monospace; font-size: 13px; font-weight: 700;
  text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.control-inst-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line);
  font-family: Consolas, monospace; font-size: 12px; color: var(--muted);
}
.control-inst-card-foot span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.control-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.25;
}
.control-stack-sub { color: var(--muted); font-weight: 600; }
.control-table { font-size: 14px; }
.control-table th { font-size: 13px; }
.control-table th, .control-table td { padding: 8px 10px; }
.control-table .mono { font-family: Consolas, monospace; font-size: 13px; }
.control-table .control-open-name { font-size: 15px; font-weight: 700; }
.control-table .control-hunt-stat { font-size: 14px; font-weight: 700; color: var(--ink); }
.control-table th.control-hunt-col,
.control-table td.control-hunt-col { white-space: nowrap; }
.control-table td.control-hunt-col.num { text-align: right; font-variant-numeric: tabular-nums; }
.control-table th.control-center-num,
.control-table td.control-center-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.control-table .small { font-size: 12px; color: var(--muted); }
.control-panel .badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 700;
}
.control-panel .badge.online { background: #dcfce7; color: #15803d; }
.control-panel .badge.offline { background: #f1f5f9; color: #64748b; }
.control-table tr.row-offline { opacity: 0.72; }
.control-table tr.control-server-break > td {
  border-top: 3px solid #0f172a;
}
.control-vitals { min-width: 148px; }
.control-vital { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.control-table td.control-vitals-cell { padding: 2px 8px; vertical-align: middle; }
.control-table .control-vitals {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.control-table .control-vital { margin: 0; }
.control-table .control-vital-label,
.control-table .control-vital-none { line-height: 1; }
.control-table .control-vital-track { height: 11px; }
.control-vital-label {
  flex: 0 0 64px; font-family: Consolas, monospace; font-size: 12px;
  color: var(--muted); text-align: right; white-space: nowrap;
}
.control-vital-track {
  flex: 1; height: 13px; min-width: 72px; background: #e2e8f0;
  border-radius: 4px; overflow: hidden; border: 1px solid #cbd5e1;
}
.control-vital-fill { height: 100%; border-radius: 3px; min-width: 0; }
.control-vital-fill.hp { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.control-vital-fill.mp { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.control-vital-fill.weight { background: linear-gradient(90deg, #a16207, #f59e0b); }
.control-vital-none { font-size: 13px; color: #94a3b8; }
.control-empty { text-align: center; color: var(--muted); padding: 24px !important; }
.control-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.control-table th.control-actions-col,
.control-table td.control-actions-cell {
  width: 1%;
  min-width: 280px;
  white-space: nowrap;
}
.control-table .control-actions {
  flex-wrap: nowrap;
  width: max-content;
}
.control-table .control-actions .btn,
.control-table .control-pending {
  flex: 0 0 auto;
  white-space: nowrap;
}
.control-actions .btn { padding: 4px 10px; font-size: 13px; }
.control-actions .control-cmd-wait {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #cbd5e1;
}
.control-pending { font-size: 12px; color: var(--accent); font-weight: 700; }

th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }

body.app-pshop { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.app-pshop .top { margin-bottom: 8px; padding: 10px 0; flex: 0 0 auto; }
body.app-pshop main.wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
.pshop-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 12px;
  margin-bottom: 0;
}
.pshop-card .card-head { margin-bottom: 6px; flex-shrink: 0; }
.pshop-card .card-head h2 { font-size: 16px; margin: 0; }
.pshop-card .card-head .sub { margin: 2px 0 0; font-size: 12px; }
.pshop-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.pshop-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  padding: 8px 10px; background: #faf5f7; border: 1px solid var(--line); border-radius: 8px;
  flex-shrink: 0;
}
.pshop-field { display: flex; flex-direction: column; gap: 0; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0; }
.pshop-header-field,
.pshop-header-auto {
  display: inline-flex; align-items: center; gap: 4px; margin: 0;
  font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.pshop-header-field input[type=number] {
  width: 4.5em; padding: 4px 6px; font-size: 12px;
}
.pshop-header-auto input { margin: 0; }
.pshop-field select,
.pshop-field input[type=search] {
  box-sizing: border-box; width: auto; min-width: 160px; margin: 0;
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 500;
  line-height: 1.25; outline: none;
}
.pshop-field select:focus,
.pshop-field input[type=search]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(196, 59, 110, 0.15);
}
.pshop-field input[type=search]::placeholder { color: #b89aa4; font-weight: 500; }
.pshop-field-grow { flex: 1; min-width: 200px; }
.pshop-field-grow input { width: 100%; }
.pshop-toolbar .btn { margin-right: 0; }
.pshop-summary { font-size: 13px; font-weight: 600; color: var(--ink); margin-left: auto; align-self: center; }
.pshop-split {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.pshop-pane {
  min-height: 0; min-width: 0;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden;
}
.pshop-pane-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 8px 10px; background: #faf5f7; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.pshop-pane-head h3 { margin: 0; font-size: 14px; }
.pshop-pane-head small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.pshop-count {
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: #fde7ef; padding: 2px 8px; border-radius: 999px;
}
.pshop-pin-block {
  flex-shrink: 0; display: flex; flex-direction: column;
  border-bottom: 1px solid var(--line); background: #fffbeb; overflow: visible;
}
.pshop-pin-block[hidden] { display: none !important; }
.pshop-pin-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; background: #fef3c7; border-bottom: 1px solid #fde68a; flex-shrink: 0;
}
.pshop-pin-head h4 { margin: 0; font-size: 12px; font-weight: 700; color: #92400e; }
.pshop-pin-count { background: #fde68a; color: #92400e; }
.pshop-pin-wrap { flex: 0 0 auto; border: 0; border-radius: 0; overflow: visible !important; max-height: none !important; }
.pshop-pin-table tbody tr { background: #fffbeb; }
.pshop-col-act { width: 3.2rem; text-align: center; white-space: nowrap; }
.pshop-pin-btn,
.pshop-unpin-btn {
  border: 1px solid #d97706; background: #fff7ed; color: #9a3412;
  border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700;
  cursor: pointer; line-height: 1.4;
}
.pshop-pin-btn:hover { background: #ffedd5; }
.pshop-pin-btn:disabled {
  border-color: #cbd5e1; background: #f1f5f9; color: #94a3b8; cursor: default;
}
.pshop-unpin-btn { border-color: #94a3b8; background: #f8fafc; color: #475569; }
.pshop-unpin-btn:hover { background: #e2e8f0; }
tr.pshop-pin-row { cursor: grab; user-select: none; }
tr.pshop-pin-row:active { cursor: grabbing; }
tr.pshop-pin-row button { cursor: pointer; }
.pshop-pin-row.is-dragging { opacity: 0.45; }
.pshop-pin-row.is-drop-before { box-shadow: inset 0 2px 0 #c43b6e; }
.pshop-pin-row.is-drop-after { box-shadow: inset 0 -2px 0 #c43b6e; }
.pshop-table-wrap { flex: 1; min-height: 200px; border: 0; border-radius: 0; }
.pshop-table {
  margin: 0;
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  font-size: 12px;
}
.pshop-table th,
.pshop-table td {
  padding: 3px 6px;
  line-height: 1.25;
  vertical-align: middle;
  font-size: 12px;
}
.pshop-table .num { text-align: center; font-variant-numeric: tabular-nums; }
.pshop-table thead { position: sticky; top: 0; z-index: 1; }
.pshop-item-row { cursor: pointer; }
.pshop-item-row:hover:not(.pshop-row-flash) { background: #fde7ef; }
.pshop-item-row.pshop-row-flash,
.pshop-seller-row.pshop-row-flash { animation: pshop-flash-fade 2s ease-out forwards; }
@keyframes pshop-flash-fade {
  0% { background-color: #fde047; }
  100% { background-color: #ffffff; }
}
.pshop-item-name { font-weight: 600; color: var(--ink); }
.pshop-col-blessed { width: 2.5rem; text-align: center; white-space: nowrap; }
.pshop-blessed {
  display: inline-block; min-width: 1.5rem;
  font-size: 11px; font-weight: 700; color: #b45309;
  background: #fef3c7; border: 1px solid #fcd34d;
  border-radius: 4px; padding: 0 4px; line-height: 1.4;
}
.pshop-cursed {
  display: inline-block; min-width: 1.5rem;
  font-size: 11px; font-weight: 700; color: #6d28d9;
  background: #ede9fe; border: 1px solid #c4b5fd;
  border-radius: 4px; padding: 0 4px; line-height: 1.4;
}
.pshop-unidentified {
  display: inline-block; min-width: 1.5rem;
  font-size: 11px; font-weight: 700; color: #1d4ed8;
  background: #dbeafe; border: 1px solid #93c5fd;
  border-radius: 4px; padding: 0 4px; line-height: 1.4;
}
.pshop-empty { text-align: center; color: var(--muted); padding: 20px !important; }
.pshop-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(30, 16, 22, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.pshop-overlay[hidden] { display: none !important; }
.pshop-dialog {
  width: min(980px, 100%);
  max-height: min(80vh, 720px);
  background: #fff; border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(40, 16, 24, 0.25);
  display: flex; flex-direction: column; overflow: hidden;
}
.pshop-dialog .pshop-table,
.pshop-dialog .pshop-table td { font-size: 13px; }
.pshop-dialog .pshop-table th { font-size: 12px; }
.pshop-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.pshop-dialog-titleline {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.pshop-dialog-head h2 { margin: 0; font-size: 1.2rem; }
.pshop-craft-btn {
  flex-shrink: 0; border: 1px solid var(--line); background: #faf5f7; color: var(--ink);
  border-radius: 6px; padding: 2px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.pshop-craft-btn:hover,
.pshop-craft-btn.is-on { background: #fde7ef; border-color: var(--accent); color: var(--accent); }
.pshop-craft-btn[hidden] { display: none !important; }
.pshop-craft {
  flex-shrink: 0; border-bottom: 1px solid var(--line); background: #fffafb;
  padding: 8px 16px 10px;
}
.pshop-craft[hidden] { display: none !important; }
.pshop-craft-head,
.pshop-craft-total { margin: 0; font-size: 12px; color: var(--muted); }
.pshop-craft-total { margin-top: 6px; font-weight: 700; color: var(--ink); }
.pshop-craft-scroll { margin-top: 6px; overflow: visible; }
.pshop-dialog-close {
  border: 0; background: transparent; font-size: 26px; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 0 4px;
}
.pshop-dialog-close:hover { color: var(--ink); }
.pshop-dialog-sub {
  margin: 0; padding: 8px 16px; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line); flex-shrink: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
}
.pshop-dialog-body { flex: 1; min-height: 0; border: 0; border-radius: 0; }
.pshop-shop-link {
  border: 0; background: transparent; padding: 0; margin: 0;
  font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; text-align: left;
}
.pshop-shop-link:hover { text-decoration: underline; }
.pshop-back-link {
  border: 1px solid var(--line); background: #faf5f7; color: var(--ink);
  border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer;
}
.pshop-back-link:hover { background: #fde7ef; }
.pshop-shop-view { display: flex; flex-direction: column; min-height: 0; padding: 0; }
.pshop-shop-view[hidden] { display: none !important; }
.pshop-shop-split {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.pshop-shop-pane {
  min-height: 0; min-width: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
}
.pshop-shop-pane:last-child { border-right: 0; }
.pshop-shop-pane-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: #faf5f7; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.pshop-shop-pane-head h3 { margin: 0; font-size: 13px; }
.pshop-shop-pane-head small { font-weight: 500; color: var(--muted); margin-left: 4px; }
.pshop-shop-table-wrap { flex: 1; min-height: 160px; border: 0; }
.pshop-banner { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.pshop-dialog .pshop-banner { font-size: 12px; }
.pshop-loc, .pshop-when { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pshop-dialog .pshop-loc,
.pshop-dialog .pshop-when { font-size: 12px; }
.pshop-loc-btn {
  border: 0; background: transparent; padding: 0; margin: 0;
  font: inherit; color: var(--accent); cursor: pointer; white-space: nowrap;
}
.pshop-loc-btn:hover { text-decoration: underline; }

/* 시장 지도 팝업 — 가로는 브라우저 95%, 세로는 이미지 높이만큼 */
#pshopMapOverlay { z-index: 85; padding: 0; }
.pshop-map-dialog {
  width: 95vw;
  max-width: 95vw;
  height: auto;
  max-height: 95vh;
}
.pshop-map-body {
  flex: 0 0 auto;
  overflow: auto;
  padding: 10px 12px 12px;
  background: #1c1a18;
}
.pshop-map-stage {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
}
.pshop-map-stage[hidden] { display: none !important; }
.pshop-map-stage img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.pshop-map-pin {
  position: absolute; left: 0; top: 0;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; border: 3px solid #fff;
  background: var(--danger, #e11d48);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
/* 눈에 띄게 한 번 퍼지는 고리 */
.pshop-map-pin::after {
  content: ""; position: absolute; inset: -7px;
  border-radius: 50%; border: 2px solid var(--danger, #e11d48);
  animation: pshop-pin-pulse 1.6s ease-out infinite;
}
@keyframes pshop-pin-pulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}
.pshop-map-none { margin: 0; padding: 24px; text-align: center; color: #cbb8c0; }
.pshop-map-none[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .pshop-map-pin::after { animation: none; }
}
@media (max-width: 1000px) {
  .pshop-split { grid-template-columns: 1fr; }
  .pshop-shop-split { grid-template-columns: 1fr; }
  .pshop-shop-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .pshop-shop-pane:last-child { border-bottom: 0; }
  body.app-pshop { height: auto; overflow: auto; }
  body.app-pshop main.wrap { height: auto; }
}

.control-open-name { cursor: pointer; text-decoration: none; }
.control-inst-card-title .control-open-name { min-width: 0; }
.control-stats-pop {
  position: fixed;
  z-index: 90;
  min-width: 148px;
  max-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  padding: 10px 12px;
  font-size: 13px;
}
.control-stats-pop-name {
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.control-stats-pop-body {
  margin: 0;
  display: grid;
  gap: 3px 0;
}
.control-stats-pop-body > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.control-stats-pop-body dt {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.control-stats-pop-body dd {
  margin: 0;
  font-family: Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.control-stats-pop-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.control-cell-menu {
  position: fixed;
  z-index: 91;
  min-width: 148px;
  margin: 0;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}
.control-cell-menu[hidden] { display: none !important; }
.control-cell-menu-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.control-cell-menu-item:hover,
.control-cell-menu-item:focus {
  background: #f8eef2;
  outline: none;
}
.control-cell-menu-item:disabled {
  color: var(--ok);
  cursor: default;
  background: transparent;
}
.control-inst-card { cursor: pointer; }
dialog.modal.control-inv-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(1100px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  height: min(720px, calc(100vh - 24px));
  padding: 0;
  overflow: hidden;
}
.control-inv-dialog .control-drawer-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.control-inv-dialog .control-inv-wrap {
  flex: 1 1 auto;
  max-height: none;
  min-height: 200px;
}
.control-excel td.control-excel-scroll {
  cursor: pointer;
}
.control-excel td.control-excel-scroll:hover { background: #eef4fa; }
dialog.modal.control-settings-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  height: min(880px, calc(100vh - 24px));
  padding: 0;
  overflow: hidden;
}
.control-drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.control-drawer-head h3 { margin: 0; font-size: 16px; }
.control-drawer-head .sub { margin: 0; font-size: 12px; }
.control-drawer-body { padding: 14px 18px 18px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.control-drawer-sec { margin-bottom: 18px; }
.control-drawer-sec h4 { margin: 0 0 8px; font-size: 13px; }
.control-drawer-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.control-drawer-row select { height: 34px; min-width: 140px; }
.control-drawer-aux { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.control-settings-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 12px;
}
.control-settings-tabs button {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer;
}
.control-settings-tabs button.on {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.control-settings-pane[hidden] { display: none !important; }
.control-settings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px;
}
.control-settings-box {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 10px;
}
.control-settings-box h5 { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.control-settings-field {
  display: flex; align-items: center; gap: 8px; margin: 0 0 6px; min-height: 22px;
}
.control-settings-field label {
  flex: 0 0 auto; width: auto; min-width: 0; margin: 0; font-size: 12px; color: var(--muted);
}
.control-settings-field label.checkbox {
  display: inline-flex; align-items: center; gap: 4px; color: var(--ink);
}
.control-settings-field label.checkbox input { width: auto; margin: 0; }
.control-settings-field input[type=number] { width: 72px; flex: 0 0 auto; }
.control-settings-field input[type=text],
.control-settings-field select { flex: 1; min-width: 0; }
.control-heal-slot input[type=number] { width: 64px; }
.control-heal-slot span { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.control-heal-slot select.control-heal-item { flex: 0 0 148px; width: 148px; max-width: 148px; }
.control-settings input[type=text],
.control-settings input[type=number],
.control-settings select,
.control-settings textarea {
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 4px;
}
.control-settings .control-settings-table input.wide-text {
  padding: 3px 6px;
}
.control-settings-table-wrap { overflow: auto; max-height: 320px; border: 1px solid var(--line); border-radius: 6px; }
.shop-sell-table-wrap { max-height: 68vh; width: 100%; }
.shop-sell-table-wrap .control-settings-table {
  width: max-content;
  max-width: none;
  table-layout: auto;
}
.shop-sell-col-name,
.shop-sell-col-npc {
  width: 12.5rem;
  max-width: 12.5rem;
}
.shop-sell-table-wrap .shop-sell-col-name input,
.shop-sell-table-wrap .shop-sell-col-npc input {
  width: 100%;
  min-width: 0;
  max-width: 12.5rem;
  box-sizing: border-box;
}
.shop-sell-col-dest {
  width: auto;
  white-space: nowrap;
}
.shop-sell-table-wrap .shop-sell-col-dest select {
  width: max-content;
  min-width: calc(var(--shop-sell-dest-ch, 18) * 1em + 2.75em);
  max-width: none;
  box-sizing: border-box;
}
.shop-sell-col-approach { width: 1%; white-space: nowrap; }
.shop-sell-col-del { width: 1%; white-space: nowrap; }
.item-value-toolbar { margin-bottom: 6px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.item-value-toolbar input[type="search"] { width: 14rem; }
.item-value-table-wrap { max-height: 68vh; width: 100%; }
.item-value-col-name { width: 16rem; max-width: 16rem; }
.item-value-col-id { width: 1%; white-space: nowrap; text-align: right; color: #6b7280; font-family: ui-monospace, Menlo, Consolas, monospace; }
.item-value-col-bless { width: 1%; white-space: nowrap; text-align: center; }
.item-value-col-enc { width: 1%; white-space: nowrap; text-align: center; }
.item-value-col-disp { width: 1%; white-space: nowrap; }
.item-value-col-num { width: 7rem; text-align: right; white-space: nowrap; }
.item-value-col-obs { width: auto; color: #6b7280; white-space: nowrap; }
.item-value-col-sig { width: 1%; color: #6b7280; white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; }
.item-value-col-manual { width: 8rem; }
.item-value-table-wrap .item-value-col-manual input { width: 100%; min-width: 0; box-sizing: border-box; text-align: right; }
.item-value-col-del { width: 1%; white-space: nowrap; }
.item-value-table-wrap tr.item-value-missing td { background: #fff7ed; }
.item-value-table-wrap tr.item-value-mixed td { background: #fee2e2; }
.item-value-warn { color: #b91c1c; font-weight: 600; }

/* 드랍 측정 */
.hunt-drop-group { margin-top: 18px; }
.hunt-drop-group h2 { margin: 0 0 6px; font-size: 1.05rem; }
.hunt-drop-meta { margin-left: 8px; font-size: 0.85rem; font-weight: 400; color: #6b7280; }
.hunt-drop-table-wrap { max-height: none; width: 100%; }
.hunt-drop-col-name { width: 16rem; max-width: 16rem; }
.hunt-drop-col-id { width: 1%; white-space: nowrap; text-align: right; color: #6b7280; font-family: ui-monospace, Menlo, Consolas, monospace; }
.hunt-drop-col-enc { width: 1%; white-space: nowrap; text-align: center; }
.hunt-drop-col-num { width: 8.5rem; text-align: right; white-space: nowrap; }
.hunt-drop-table-wrap .ai-zone-table {
  table-layout: fixed;
  width: 100%;
}
.hunt-drop-table-wrap .ai-zone-table th,
.hunt-drop-table-wrap .ai-zone-table td {
  width: calc(100% / 7);
  text-align: center;
  white-space: nowrap;
}
.hunt-drop-table-wrap tr.hunt-drop-unpriced td { background: #fff7ed; }
.hunt-drop-warn { color: #b45309; font-weight: 600; }
.hunt-drop-clear { margin-top: 22px; display: flex; gap: 10px; align-items: center; }
body.app-pshop .pledge-wh-pane { flex: 1; min-height: 0; }
body.app-pshop .pledge-wh-pane .pshop-table-wrap { overflow: auto; min-height: 0; }
.pledge-wh-pane .pledge-wh-table {
  width: max-content;
  min-width: 0;
  margin-left: 0;
  margin-right: auto;
}
.pledge-wh-pane .pledge-wh-table th,
.pledge-wh-pane .pledge-wh-table td {
  padding: 4px 14px;
  text-align: center;
}
.pledge-wh-pane .pledge-wh-table th.num,
.pledge-wh-pane .pledge-wh-table td.num,
.pledge-wh-pane .pledge-wh-table .pshop-col-blessed,
.pledge-wh-pane .pledge-wh-table .pshop-item-name {
  text-align: center;
}
.pledge-wh-pane .pledge-wh-table .pshop-col-blessed { width: auto; min-width: 3rem; }
.pledge-wh-pane .pledge-wh-table th:nth-child(1),
.pledge-wh-pane .pledge-wh-table td:nth-child(1) { min-width: 3rem; }
.pledge-wh-pane .pledge-wh-table th:nth-child(3),
.pledge-wh-pane .pledge-wh-table td:nth-child(3) { min-width: 14rem; }
.pledge-wh-pane .pledge-wh-table th:nth-child(4),
.pledge-wh-pane .pledge-wh-table td:nth-child(4) { min-width: 6.5rem; }
.pledge-wh-pane .pledge-wh-table th:nth-child(5),
.pledge-wh-pane .pledge-wh-table td:nth-child(5),
.pledge-wh-pane .pledge-wh-table th:nth-child(6),
.pledge-wh-pane .pledge-wh-table td:nth-child(6) { min-width: 3.4rem; }
.pledge-wh-pane .pledge-wh-table th:nth-child(7),
.pledge-wh-pane .pledge-wh-table td:nth-child(7) { min-width: 11rem; }
.pledge-wh-pane .pledge-wh-table th:nth-child(8),
.pledge-wh-pane .pledge-wh-table td:nth-child(8) { min-width: 3.6rem; }
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(1),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(1) { min-width: 3.2rem; }
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(2),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(2) { min-width: 3rem; }
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(3),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(3) { min-width: 3rem; }
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(4),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(4) { min-width: 14rem; }
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(5),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(5) { min-width: 6.5rem; }
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(6),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(6),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(7),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(7) { min-width: 3.4rem; }
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(8),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(8) { min-width: 11rem; }
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin th:nth-child(9),
.pledge-wh-pane .pledge-wh-table.pledge-wh-has-pin td:nth-child(9) { min-width: 3.6rem; }
.pledge-wh-pane .pshop-pin-wrap { overflow-x: auto !important; max-width: 100%; }
.pledge-wh-pane .pshop-pin-table { box-sizing: border-box; }
.pledge-wh-pane .pshop-pin-table th,
.pledge-wh-pane .pshop-pin-table td { box-sizing: border-box; text-align: center; }
.pledge-wh-pane .pshop-pin-table .pshop-item-name { min-width: 14rem; }
.pledge-wh-pane .pshop-pin-table .pshop-col-act { width: auto; white-space: normal; }
.pledge-wh-pane tr.pshop-pin-row { cursor: grab; user-select: none; }
.pledge-wh-pane tr.pshop-pin-row:active { cursor: grabbing; }
.pledge-wh-pane tr.pshop-pin-row button { cursor: pointer; }
.pledge-wh-pane .pledge-wh-table td.pshop-empty { min-width: 36rem; }
.pshop-toolbar #pledgeWhItemFilter { width: 16rem; }
.pledge-wh-pane .pledge-wh-row.is-filtered-out,
.pledge-wh-pane tr.pledge-wh-filter-empty[hidden] { display: none; }
.pledge-wh-pane .pledge-wh-row { cursor: pointer; }
.pledge-wh-pane .pledge-wh-row:hover { background: #fde7ef; }
.pledge-wh-pane .pledge-wh-row.is-on,
.pledge-wh-pane .pledge-wh-row.is-on:hover { background: #fbcfe8; }
.control-settings-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.control-settings-table th, .control-settings-table td {
  border-bottom: 1px solid var(--line); padding: 4px; text-align: left; vertical-align: middle;
}
.hunt-drop-table-wrap .hunt-drop-table {
  table-layout: fixed;
  width: 100%;
}
.hunt-drop-table-wrap .hunt-drop-table th,
.hunt-drop-table-wrap .hunt-drop-table td {
  width: calc(100% / 9);
  max-width: none;
  text-align: center;
  white-space: nowrap;
}
.hunt-drop-table-wrap .hunt-drop-table th.hunt-drop-col-name,
.hunt-drop-table-wrap .hunt-drop-table td.hunt-drop-col-name {
  width: calc(200% / 9);
  max-width: none;
  white-space: normal;
  word-break: keep-all;
}
.control-settings-table input[type=text],
.control-settings-table input[type=number],
.control-settings-table select { width: 100%; min-width: 64px; }
.control-settings-table .tiny { width: 56px; }
.control-settings-table th.control-col-wide,
.control-settings-table td.control-col-wide { min-width: 240px; width: 38%; }
.control-settings-table input.wide-text { min-width: 220px; width: 100%; padding: 8px 10px; }
.control-approach-cell { white-space: nowrap; }
.control-approach-cell .btn { min-width: 132px; }
.control-approach-fields { margin-top: 10px; }
#controlApproachDlg label.checkbox,
#shopSellAddDlg label.checkbox {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 0;
}
#controlApproachDlg label.checkbox input,
#shopSellAddDlg label.checkbox input { width: auto; margin: 0; }
.control-hide-pop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(30, 16, 22, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.control-hide-pop[hidden] { display: none !important; }
.control-hide-dialog {
  width: min(420px, 100%);
  max-height: min(80vh, 640px);
  background: #fff; border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(40, 16, 24, 0.25);
  display: flex; flex-direction: column; padding: 14px 16px 12px;
}
.control-hide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-hide-head h2 { margin: 0; font-size: 16px; }
.control-hide-close {
  border: 0; background: transparent; font-size: 26px; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 0 4px;
}
.control-hide-note { margin: 8px 0; font-size: 12px; color: var(--muted); }
.control-hide-dialog input[type=search] { width: 100%; margin: 0; }
.control-hide-list { margin-top: 8px; overflow: auto; min-height: 8rem; }
.control-hide-list label.checkbox { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 0; }
.control-hide-list label.checkbox input { width: auto; margin: 0; }
.control-hide-empty { margin: 12px 0; color: var(--muted); font-size: 13px; }
.control-hide-msg { margin: 8px 0 0; min-height: 1.2em; font-size: 12px; color: #b91c1c; }
#controlHideAccountsOpen.is-on { border-color: var(--accent); color: var(--accent); }
#controlApproachDlg .control-settings-field label { min-width: 40px; }
#shopSellAddDlg .control-settings-field label { min-width: 64px; }
#controlApproachDlg[open] .control-approach-fields[data-off="1"] input,
#shopSellAddDlg[open] .control-approach-fields[data-off="1"] input {
  opacity: .45; pointer-events: none;
}
#shopSellAddDlg .control-settings-field { margin-top: 8px; }
#shopSellAddErr[hidden] { display: none; }
#shopSellAddErr { color: #b91c1c; }
.control-settings-note { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
@media (max-width: 720px) {
  .control-settings-grid { grid-template-columns: 1fr; }
}
.control-inv-filter { flex: 1; min-width: 160px; max-width: 280px; height: 32px; }
.control-inv-wrap {
  overflow: auto;
  max-height: 360px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.control-inv-wrap .control-settings-table { font-size: 11px; }
.control-inv-wrap th, .control-inv-wrap td { white-space: nowrap; }
.control-inv-empty { padding: 12px; color: var(--muted); font-size: 12px; }
.control-drawer-msg { min-height: 1.3em; font-size: 13px; color: var(--muted); }
.control-drawer-msg[data-kind="ok"] { color: var(--ok); }
.control-drawer-msg[data-kind="error"] { color: var(--danger); }
.learn-bot-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.learn-bot-bar .btn:disabled { opacity: 0.55; cursor: default; }
.learn-bot-state { margin: 0 0 12px; font-size: 22px; font-weight: 700; }
.learn-bot-bar .learn-bot-state { margin: 0; }
.learn-bot-state.is-on { color: var(--ok); }
.learn-bot-state.is-off { color: var(--danger); }
.learn-bot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0 0 14px; }
.learn-bot-stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #faf7f8; }
.learn-bot-stat span { display: block; color: var(--muted); font-size: 12px; }
.learn-bot-stat b { display: block; margin-top: 4px; font-size: 18px; }
.learn-bot-url { word-break: break-all; }
.learn-bot-log td:first-child { white-space: nowrap; color: var(--muted); width: 11rem; }

