@font-face {
  font-family: "SoraBrand";
  src: url("/static/fonts/Sora-Variable.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --panel: #ffffff;
  --text: #24292f;
  --muted: #57606a;
  --line: #d0d7de;
  --line-soft: #d8dee4;
  --accent: #1a7f37;
  --accent-strong: #116329;
  --link: #0969da;
  --brand: #cf222e;
  --danger: #cf222e;
  --warning: #fb8500;
  --success: #1a7f37;
  --status-neutral-bg: #f6f8fa;
  --status-neutral-text: #57606a;
  --status-neutral-border: #d0d7de;
  --status-ok-bg: #dafbe1;
  --status-ok-text: #116329;
  --status-ok-border: #8ddb8c;
  --status-info-bg: #ddf4ff;
  --status-info-text: #0969da;
  --status-info-border: #80ccff;
  --status-warning-bg: #fff8c5;
  --status-warning-text: #7d4e00;
  --status-warning-border: #d29922;
  --status-danger-bg: #ffebe9;
  --status-danger-text: #cf222e;
  --status-danger-border: #ff8182;
  --paper: #ffffff;
  --paper-line: #d8dee4;
  --soft: #f6f8fa;
  --soft-2: #f0f3f6;
  --shadow: rgba(140, 149, 159, 0.18);
  --focus-shadow: 0 0 0 3px rgba(9, 105, 218, 0.2);
  --popover-shadow: 0 8px 24px rgba(140, 149, 159, 0.25);
}
html.theme-dark {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #161b22;
  --text: #e6edf3;
  --muted: #8b949e;
  --line: #30363d;
  --line-soft: #21262d;
  --accent: #238636;
  --accent-strong: #2ea043;
  --link: #58a6ff;
  --brand: #f85149;
  --danger: #f85149;
  --warning: #d29922;
  --success: #3fb950;
  --status-neutral-bg: #21262d;
  --status-neutral-text: #c9d1d9;
  --status-neutral-border: #30363d;
  --status-ok-bg: rgba(46, 160, 67, 0.22);
  --status-ok-text: #7ee787;
  --status-ok-border: rgba(63, 185, 80, 0.58);
  --status-info-bg: rgba(56, 139, 253, 0.18);
  --status-info-text: #79c0ff;
  --status-info-border: rgba(88, 166, 255, 0.52);
  --status-warning-bg: rgba(187, 128, 9, 0.24);
  --status-warning-text: #f2cc60;
  --status-warning-border: rgba(210, 153, 34, 0.58);
  --status-danger-bg: rgba(248, 81, 73, 0.18);
  --status-danger-text: #ff7b72;
  --status-danger-border: rgba(248, 81, 73, 0.56);
  --paper: #0d1117;
  --paper-line: #30363d;
  --soft: #161b22;
  --soft-2: #21262d;
  --shadow: rgba(0, 0, 0, 0.28);
  --focus-shadow: 0 0 0 3px rgba(56, 139, 253, 0.26);
  --popover-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(31, 35, 40, 0.03);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--text);
  font-family: "SoraBrand", Arial, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  color: var(--brand);
  font: inherit;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

.brand-mark::after {
  content: "";
  width: 1px;
  height: 15px;
  margin-left: 8px;
  background: var(--line);
}

.brand-title {
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

nav a:hover {
  background: var(--soft-2);
  color: var(--text);
  text-decoration: none;
}

nav a,
nav button,
nav .button,
.user-chip {
  flex: 0 0 auto;
}

.logout-form {
  margin: 0;
}

.button.small,
button.small {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.user-chip {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.page {
  width: min(1480px, calc(100% - 40px));
  margin: 24px auto 48px;
}

.page.has-customer-side-rails {
  width: min(1180px, calc(100vw - 380px));
  margin-left: 360px;
  margin-right: auto;
}

.article-page {
  transition: width 120ms ease;
}

html.wide-article .article-page {
  width: min(1920px, calc(100% - 28px));
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.summary,
.filters,
.article-head,
.meta,
.history {
  margin-bottom: 16px;
}

.summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.customer-detail-page .summary {
  min-width: 0;
  flex-wrap: wrap;
  gap: 12px;
}

.customer-detail-page .summary > div {
  min-width: 0;
}

.customer-detail-page .summary h1 {
  overflow-wrap: anywhere;
}

.muted,
.url {
  color: var(--muted);
}

.url {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 90px 90px;
  gap: 8px;
}

.filters.document-search {
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.9fr) minmax(260px, 1fr) 90px 90px;
  grid-template-areas: "menu product search submit reset";
  align-items: center;
}

.document-search-menu {
  grid-area: menu;
}

.document-search-product {
  grid-area: product;
}

.document-search-text {
  grid-area: search;
}

.document-search-submit {
  grid-area: submit;
}

.document-search-reset {
  grid-area: reset;
}

input,
select,
button,
.button {
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
button:focus-visible,
.button:focus-visible {
  outline: none;
  border-color: var(--link);
  box-shadow: var(--focus-shadow);
}

button:hover,
.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
  text-decoration: none;
}

.button.secondary:hover,
.top-toggle:hover {
  background: var(--soft-2);
  border-color: var(--line);
  color: var(--text);
}

.button.secondary {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

.button.danger,
button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.top-toggle {
  height: 30px;
  padding: 0 10px;
  border-color: var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.top-toggle.active {
  border-color: var(--accent);
  background: rgba(26, 127, 55, 0.12);
  color: var(--accent-strong);
}

html.theme-dark .top-toggle.active {
  background: rgba(35, 134, 54, 0.18);
}

.title-with-pin {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.title-with-pin.no-pin {
  grid-template-columns: minmax(0, 1fr);
}

.pin-form {
  margin: 0;
}

.pin-button {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.pin-button:hover,
.pin-button.active {
  border-color: var(--warning);
  background: rgba(251, 133, 0, 0.12);
  color: var(--warning);
  text-decoration: none;
}

.pin-button.large {
  width: 38px;
  height: 38px;
  min-width: 38px;
  font-size: 20px;
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.split {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
}

.filter-layout,
.filter-detail-grid {
  display: grid;
  gap: 18px;
}

.filter-layout {
  grid-template-columns: minmax(420px, 520px) minmax(0, 1fr);
}

.filter-layout-wide {
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  align-items: start;
}

.filter-editor,
.filter-list,
.filter-detail-grid > section,
.catalog-picker,
.chat-panel,
.chat-answer,
.knowledge-paths,
.panel {
  min-width: 0;
}

.filter-editor {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.catalog-picker,
.chat-panel,
.chat-answer,
.knowledge-paths,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.login-shell {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
}

.login-panel label {
  display: grid;
  gap: 6px;
}

.login-panel label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.customer-product-form,
.customer-name-form,
.user-create-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 90px;
  gap: 8px;
  margin-bottom: 12px;
}

.customer-name-form {
  grid-template-columns: minmax(240px, 1fr) 90px;
  margin-bottom: 0;
}

.customer-create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 90px;
  gap: 8px;
  margin-bottom: 8px;
}

.customer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.customer-products-panel,
.customer-history-panel,
.customer-permission-section,
.customer-permission-panel {
  min-width: 0;
}

.customer-permission-section {
  margin-bottom: 16px;
}

.customer-side-rail {
  position: fixed;
  top: 84px;
  height: 520px;
  max-height: calc(100vh - 108px);
  z-index: 8;
  contain: layout paint;
}

.customer-todo-rail {
  --customer-todo-rail-height: max(260px, calc(100vh - 300px));
  left: 20px;
  width: 320px;
  height: var(--customer-todo-rail-height);
  min-height: 260px;
  max-height: var(--customer-todo-rail-height);
}

.customer-permission-rail {
  right: 20px;
  width: 360px;
}

.customer-todo-rail .mobile-rail-details {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.customer-todo-panel {
  min-height: 0;
}


.customer-side-rail .panel {
  height: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.customer-todo-rail .customer-todo-panel {
  flex: 1 1 0;
  height: var(--customer-todo-rail-height);
  max-height: 100%;
}

.mobile-rail-details {
  height: 100%;
}

.mobile-rail-summary {
  display: none;
}

.customer-todo-panel .section-head,
.customer-permission-panel .section-head {
  flex: 0 0 auto;
}

.todo-list {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 8px;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.todo-item {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--paper);
  color: var(--text);
}

.todo-item:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.todo-item strong,
.todo-item span,
.todo-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-item strong {
  white-space: nowrap;
  font-size: 13px;
}

.todo-item span,
.todo-item small {
  color: var(--muted);
  font-size: 12px;
}

.customer-permission-panel .editor-permission-form {
  display: grid;
  gap: 10px;
}

.customer-permission-panel .permission-tree {
  max-height: min(44vh, 460px);
  overflow: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.customer-permission-panel .permission-children {
  content-visibility: auto;
  contain-intrinsic-size: 96px;
}

.visibility-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}

.visibility-tree {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.visibility-node {
  display: grid;
  gap: 6px;
}

.visibility-children {
  display: grid;
  gap: 6px;
  margin-left: 18px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--text);
}

.check-row input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.check-row small {
  color: var(--muted);
  font-size: 12px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.owner-filter-row {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  overflow: visible;
}

.customer-list-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.customer-list-table-scroll table {
  min-width: 680px;
}

.customer-list-table-scroll th:nth-child(4),
.customer-list-table-scroll th:nth-child(5),
.customer-list-table-scroll th:nth-child(6),
.customer-list-table-scroll td:nth-child(4),
.customer-list-table-scroll td:nth-child(5),
.customer-list-table-scroll td:nth-child(6) {
  width: 112px;
  text-align: center;
  vertical-align: middle;
}

.customer-list-table-scroll th:nth-child(4) .sort-link,
.customer-list-table-scroll th:nth-child(5) .sort-link,
.customer-list-table-scroll th:nth-child(6) .sort-link {
  justify-content: center;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  background: var(--paper);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--accent);
  background: rgba(26, 127, 55, 0.12);
  color: var(--accent-strong);
  text-decoration: none;
}

html.theme-dark .filter-chip.active {
  background: rgba(35, 134, 54, 0.18);
}

.customer-admin-panel {
  margin-bottom: 16px;
}

.customer-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.customer-admin-section,
.customer-admin-form,
.customer-editor-form,
.multi-select-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.customer-admin-section h3 {
  margin: 0;
  font-size: 14px;
}

.customer-admin-form {
  grid-template-columns: minmax(0, 1fr) 74px;
}

.customer-admin-form input,
.customer-admin-form select {
  width: 100%;
}

.customer-editor-section {
  grid-column: 1 / -1;
}

.customer-editor-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.multi-select-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.multi-select-field select {
  height: auto;
  min-height: 146px;
  padding: 8px;
}

.customer-editor-help {
  margin: 0;
}

.checkbox-select-field {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--paper);
}

.checkbox-select-field legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checkbox-select-list {
  max-height: 236px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}

.checkbox-select-option {
  min-width: 0;
  min-height: 40px;
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: var(--panel);
}

.checkbox-select-option input {
  width: auto;
  height: auto;
  flex: 0 0 auto;
}

.checkbox-select-option span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.checkbox-select-option small {
  color: var(--muted);
  font-size: 12px;
}

.customer-list-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

tr.active-row td {
  background: rgba(26, 127, 55, 0.08);
}

html.theme-dark tr.active-row td {
  background: rgba(35, 134, 54, 0.14);
}

.button.secondary.small.active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: rgba(26, 127, 55, 0.12);
}

.pin-col {
  width: 48px;
  text-align: center;
}

.pin-col .pin-form {
  display: inline-flex;
}

.compact-table th,
.compact-table td {
  padding: 8px 10px;
}

.inline-version-form,
.action-update-form,
.user-inline-form {
  display: grid;
  gap: 6px;
}

.product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 6px;
  align-items: start;
}

.product-actions form {
  margin: 0;
}

.inline-version-form {
  grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) minmax(120px, 1fr) 64px;
}

.action-update-form {
  grid-template-columns: 120px minmax(160px, 1fr) 64px;
}

.user-inline-form {
  grid-template-columns: minmax(120px, 1fr) 70px;
  margin: 0;
}

.user-handover-note {
  grid-column: 1 / -1;
}

.inline-version-form input,
.action-update-form input,
.action-update-form select,
.user-inline-form input,
.user-inline-form select {
  width: 100%;
}

.user-table th:nth-child(1) {
  width: 18%;
}

.user-table th:nth-child(5),
.user-table th:nth-child(6) {
  width: 20%;
}

.action-group {
  margin-top: 18px;
}

.action-table th:nth-child(1) {
  width: 40%;
}

.action-table th:nth-child(4) {
  width: 36%;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.scope-chip.target {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  margin-bottom: 12px;
}

.form-grid label {
  display: grid;
  gap: 5px;
}

.form-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.item-editor input {
  width: 100%;
}

.item-editor th:last-child,
.item-editor td:last-child {
  width: 78px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.form-message {
  min-height: 20px;
  margin: 8px 0 0;
  color: #b91c1c;
}

.notice {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 700;
}

.notice.success {
  border-color: #99d6c9;
  background: #ecfdf8;
  color: #115e59;
}

.notice.error-text {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.inline-warning {
  margin: 10px 0 0;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

html.theme-dark .inline-warning {
  background: #451a03;
  color: #fbbf24;
}

.danger-zone {
  border-color: #fecaca;
}

.danger-zone summary {
  cursor: pointer;
  color: #991b1b;
  font-weight: 800;
}

.danger-zone-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.customer-delete-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr) 120px;
  gap: 8px;
}

.selected-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--paper);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin-bottom: 0;
}

.product-delete-preview {
  margin: 12px 0;
}

.impact-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.impact-metrics span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  background: var(--paper);
  color: var(--text);
  font-size: 13px;
}

.impact-metrics strong {
  color: var(--accent);
}

.compact-table {
  margin-top: 8px;
}

.compact-table th,
.compact-table td {
  padding: 8px;
  font-size: 13px;
}

.muted-row {
  opacity: 0.62;
}

.delete-confirm-form {
  margin-top: 12px;
}

.selected-empty {
  min-height: 56px;
  display: flex;
  align-items: center;
}

.selected-table th:last-child,
.selected-table td:last-child {
  width: 78px;
}

.saved-filter-menu {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.saved-filter-links,
.editor-checks {
  display: grid;
  gap: 8px;
}

.permission-tree,
.user-group-list {
  display: grid;
  gap: 8px;
}

.permission-tree.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.permission-node,
.user-group-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  overflow: hidden;
}

.permission-node summary,
.user-group-card summary {
  cursor: pointer;
  list-style-position: inside;
  padding: 8px 10px;
  background: var(--soft);
}

.permission-node summary .permission-toggle,
.user-group-card summary {
  margin-left: 4px;
}

.permission-children,
.user-group-body {
  display: grid;
  gap: 8px;
  padding: 9px 10px 10px;
}

.permission-toggle,
.permission-heading,
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.permission-toggle {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  background: var(--panel);
}

.permission-toggle.child-toggle {
  margin-left: 18px;
}

.permission-toggle input,
.inline-check input {
  width: auto;
  height: auto;
}

.permission-toggle span,
.permission-heading {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.permission-toggle small,
.permission-heading small {
  color: var(--muted);
  font-size: 12px;
}

.readonly-action-state {
  display: grid;
  gap: 3px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--paper);
}

.readonly-action-state span {
  color: var(--muted);
  font-size: 12px;
}

.permission-empty {
  padding: 7px 10px;
}

.user-group-edit,
.account-password-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 2fr) auto auto;
  gap: 8px;
  align-items: center;
}

.account-password-form {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.notice-editor {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px auto;
  gap: 8px;
}

.notice-editor textarea {
  grid-column: 1 / -1;
  min-height: 140px;
}

.notice-preview-box {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--paper);
}

.notice-preview,
.app-notice-body {
  overflow-wrap: anywhere;
}

.notice-preview.plain,
.app-notice-body.plain {
  white-space: pre-wrap;
}

.app-notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
}

.app-notice-dialog {
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
  padding: 18px;
}

.app-notice-body {
  min-height: 120px;
  overflow: auto;
  padding: 8px 2px 14px;
}

.app-notice-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.saved-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.saved-filter-link {
  min-width: 0;
  min-height: 42px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--paper);
  color: var(--text);
}

.saved-filter-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.saved-filter-link span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  background: var(--paper);
}

.editor-checks input {
  width: auto;
  height: auto;
}

.condition-line {
  margin-bottom: 5px;
  color: #334155;
  font-size: 12px;
}

.condition-line strong {
  color: var(--text);
  text-transform: uppercase;
}

.side,
.content,
.article-view {
  min-width: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
}

th,
td {
  vertical-align: top;
}

.catalog {
  display: grid;
  gap: 10px;
}

.catalog-group {
  border: 1px solid var(--line);
  background: var(--panel);
}

.catalog-group summary {
  cursor: pointer;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  color: var(--text);
  list-style-position: inside;
}

.top-product-details {
  border-bottom: 1px solid var(--paper-line);
}

.top-product-details:last-child {
  border-bottom: 0;
}

.top-product-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  list-style-position: inside;
}

.top-product-details > summary strong {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.top-product-link {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.top-product-link:hover,
.top-product-link.active {
  color: var(--accent);
}

.top-product-details[open] > summary {
  background: var(--soft);
  border-bottom: 1px solid var(--paper-line);
}

.top-product-body {
  padding: 2px 0 4px;
}

.product-block {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--paper-line);
}

.product-block:last-child {
  border-bottom: 0;
}

.child-products,
.relation-products {
  display: grid;
  gap: 8px;
  margin: 8px 0 0 10px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.child-products .product-block,
.relation-products .product-block {
  padding: 4px 0 6px;
  border-bottom: 0;
}

.relation-label {
  margin: 1px 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.toggle,
.product-toggle,
.version-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 9px;
  text-decoration: none;
}

.toggle {
  margin-bottom: 10px;
}

.priority-toggle {
  font-weight: 800;
}

.side-heading {
  margin-top: 18px;
}

.toggle span,
.product-toggle strong,
.version-toggle span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.product-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-toggle.active,
.version-toggle.active,
.toggle.active {
  border-color: var(--accent);
  background: rgba(26, 127, 55, 0.12);
  color: var(--accent-strong);
}

html.theme-dark .product-toggle.active,
html.theme-dark .version-toggle.active,
html.theme-dark .toggle.active {
  background: rgba(35, 134, 54, 0.18);
  color: var(--accent-strong);
}

.version-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.option-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.version-toggle {
  justify-content: center;
  min-width: 68px;
  min-height: 30px;
  font-size: 12px;
}

.match-results {
  display: grid;
  gap: 14px;
}

.match-kind-group {
  min-width: 0;
}

.match-kind-group .section-head {
  margin-bottom: 8px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 12px;
  color: var(--muted);
  background: var(--soft);
  font-weight: 700;
}

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

.article-table th:nth-child(1) {
  width: 42%;
}

.article-title-link {
  font-weight: 700;
}

.article-subline {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.article-search-snippet {
  margin-top: 6px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  opacity: 0.82;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.kind-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.kind-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
}

.table-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.table-filter select {
  min-width: 120px;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
}

.sort-link.active {
  color: var(--accent-strong);
}

.sort-link span {
  font-size: 10px;
  font-weight: 700;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 0;
}

.button.disabled {
  opacity: 0.45;
  cursor: default;
}

.article-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.meta div {
  background: var(--panel);
  padding: 10px 12px;
}

.meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meta dd {
  margin: 2px 0 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  max-width: 100%;
  border: 1px solid #b7d7d2;
  background: #f0fdfa;
  color: #134e4a;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.tag-chip strong {
  color: var(--accent-strong);
  font-size: 11px;
  text-transform: uppercase;
}

.tag-chip em {
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.tag-chip.manual {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.tag-chip.manual strong {
  color: #1d4ed8;
}

.manual-tags {
  margin: 0 0 18px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.manual-tag-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.manual-tag-table {
  margin-bottom: 10px;
}

.manual-tag-table th:last-child,
.manual-tag-table td:last-child {
  width: 82px;
}

.manual-tag-table th:nth-child(3),
.manual-tag-table td:nth-child(3) {
  width: 120px;
}

.manual-tag-table th:nth-child(4),
.manual-tag-table td:nth-child(4) {
  width: 64px;
  text-align: center;
}

.manual-tag-table input,
.manual-tag-table select {
  width: 100%;
}

.manual-tag-table input[type="checkbox"] {
  width: auto;
}

.button.compact {
  min-width: 58px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.manual-tag-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.manual-tag-primary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tag-kind-create {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 96px;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}

.tag-kind-create input {
  min-width: 0;
}

.tag-kind-create .button {
  width: 96px;
  white-space: nowrap;
}

.manual-tag-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.manual-tag-message.error-text {
  color: #b91c1c;
}

.conditions {
  margin: 0 0 18px;
}

.article-image {
  margin: 14px 0;
}

.article-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.condition-list {
  display: grid;
  gap: 8px;
}

.condition-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-left: 4px solid #94a3b8;
  border-radius: 6px;
  padding: 10px 12px;
}

details.condition-card {
  padding: 0;
  overflow: hidden;
}

.condition-affected {
  border-left-color: #dc2626;
}

.condition-excluded {
  border-left-color: #16a34a;
}

.condition-fixed {
  border-left-color: #2563eb;
}

.condition-action_required {
  border-left-color: #d97706;
}

.condition-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
}

details .condition-head {
  cursor: pointer;
  padding: 10px 12px;
  list-style-position: inside;
}

.condition-head strong {
  color: var(--text);
  text-transform: uppercase;
  font-size: 12px;
}

.condition-head span {
  color: var(--muted);
}

.condition-head em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.condition-card p {
  margin: 0 0 8px;
  font-weight: 700;
}

.condition-rules {
  margin: 0;
  padding: 0 18px 8px 34px;
}

.condition-card blockquote {
  margin: 0 12px 10px;
  padding: 8px 10px;
  background: var(--soft);
  border-left: 3px solid var(--line);
  color: var(--text);
}

.document-body {
  margin: 0 0 18px;
  padding: 22px 28px;
  overflow-wrap: break-word;
  background: var(--paper);
  color: var(--text);
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  font-family: Arial, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  box-shadow: 0 1px 2px var(--shadow);
}

.document-body h1,
.document-body h2,
.document-body h3,
.document-body h4 {
  margin: 18px 0 10px;
  line-height: 1.35;
}

.document-body h1 {
  font-size: 22px;
}

.document-body h2 {
  font-size: 19px;
}

.document-body h3 {
  font-size: 16px;
}

.document-body p,
.document-body ul,
.document-body ol,
.document-body table,
.document-body pre {
  margin: 0 0 14px;
}

.document-body a {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.document-body ul,
.document-body ol {
  padding-left: 24px;
}

.document-body table {
  width: auto;
  max-width: none;
  border: 1px solid var(--line);
  table-layout: auto;
}

.document-body figure {
  max-width: 100%;
  margin: 14px 0;
  overflow-x: auto;
}

.document-body img {
  display: block;
  max-width: 100%;
  height: auto;
}

.document-body .table-scroll {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--panel);
}

.document-body .table-scroll table {
  display: table;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  border: 0;
  table-layout: auto;
}

.document-body .table-scroll th,
.document-body .table-scroll td {
  border: 1px solid var(--line);
  border-width: 0 1px 1px 0;
}

.document-body .table-scroll th:last-child,
.document-body .table-scroll td:last-child {
  border-right: 0;
}

.document-body th,
.document-body td {
  min-width: 0;
  max-width: none;
  padding: 7px 9px;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.document-body th {
  background: var(--soft);
  font-weight: 700;
}

.document-body td img,
.document-body th img {
  max-width: min(100%, 980px);
  height: auto;
}

.document-body code {
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}

.document-body pre {
  overflow: auto;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

html.theme-dark .document-body pre,
html.theme-dark .document-body code {
  color: #e5e7eb;
}

html.theme-dark .document-body [style] {
  color: var(--text) !important;
  background-color: transparent !important;
}

html.theme-dark .document-body a {
  color: var(--accent-strong) !important;
}

.corner-credit {
  position: fixed;
  right: 14px;
  bottom: 10px;
  z-index: 20;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.72;
  pointer-events: none;
}

.error {
  margin: 0 0 18px;
  padding: 18px;
  overflow: auto;
  background: #7f1d1d;
  color: #f4f7fb;
  border-radius: 6px;
  white-space: pre-wrap;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  line-height: 1.6;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.chat-filter {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.chat-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.answer-box {
  min-height: 180px;
  white-space: pre-wrap;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 18px;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--panel);
}

.source-card p {
  margin: 8px 0 0;
}

.knowledge-paths ul {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 1180px) {
  .filters.document-search {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 90px 90px;
    grid-template-areas:
      "menu product product product"
      "search search submit reset";
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  body {
    font-size: 13px;
  }

  .page {
    width: min(100% - 24px, 1480px);
    margin-top: 16px;
  }

  .page.has-customer-side-rails,
  html.wide-article .article-page {
    width: min(100% - 24px, 1480px);
  }

  .topbar {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .brand-group {
    flex: 1 1 100%;
  }

  nav {
    width: 100%;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  nav a,
  nav button,
  nav .button {
    min-height: 32px;
  }

  .user-chip {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .corner-credit {
    display: none;
  }

  h1 {
    font-size: 22px;
  }

  .summary,
  .article-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .summary .article-actions,
  .article-head .article-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .filters,
  .split,
  .filter-layout,
  .filter-detail-grid,
  .visibility-layout,
  .chat-layout,
  .customer-grid,
  .customer-create-grid,
  .customer-product-form,
  .user-create-grid,
  .user-inline-form,
  .user-group-edit,
  .account-password-form,
  .notice-editor,
  .product-actions,
  .inline-version-form,
  .action-update-form,
  .meta {
    grid-template-columns: 1fr;
  }

  .filters.document-search {
    grid-template-columns: 1fr;
    grid-template-areas:
      "menu"
      "product"
      "search"
      "submit"
      "reset";
  }

  .customer-admin-grid,
  .customer-admin-form,
  .customer-editor-selects {
    grid-template-columns: 1fr;
  }

  .panel,
  .document-body,
  .article-view,
  .content {
    max-width: 100%;
  }

  .panel,
  .content {
    overflow-x: auto;
  }

  .panel:has(.owner-filter-row) {
    overflow: visible;
  }

  table {
    min-width: 680px;
  }

  .document-body {
    padding: 16px;
    overflow-x: auto;
    font-size: 14px;
  }

  .document-body table {
    min-width: max-content;
  }

  .document-body img,
  .article-image img {
    max-width: 100%;
    height: auto;
  }

  .document-body pre {
    max-width: 100%;
    overflow-x: auto;
  }

  .customer-side-rail {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    margin: 0 0 12px;
    contain: none;
  }

  .customer-side-rail .panel {
    height: auto;
    max-height: min(70vh, 520px);
  }

  .customer-side-rail .panel .section-head {
    display: none;
  }

  .mobile-rail-details {
    height: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    overflow: hidden;
  }

  .mobile-rail-summary {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: var(--soft);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    list-style-position: inside;
  }

  .mobile-rail-summary strong {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-rail-details .panel {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }

  .todo-list,
  .customer-permission-panel .permission-tree {
    max-height: min(56vh, 420px);
  }

  .manual-tag-table,
  .action-table,
  .user-table,
  .product-admin-table,
  .selected-table,
  .compact-table {
    min-width: 720px;
  }

}

@media (max-width: 600px), (hover: none) and (pointer: coarse) and (max-device-width: 600px) {
  .admin-sidebar {
    top: 0;
    margin: 0 -4px 4px;
    border-radius: 7px;
  }

  .admin-sidebar strong {
    display: none;
  }

  .admin-sidebar a {
    min-height: 32px;
    padding: 6px 10px;
  }

  .page,
  .page.has-customer-side-rails,
  html.wide-article .article-page {
    width: min(100% - 16px, 1480px);
  }

  .topbar {
    position: static;
  }

  .brand {
    gap: 8px;
  }

  nav {
    gap: 6px;
  }

  nav a,
  .top-toggle,
  .button.small,
  button.small {
    font-size: 12px;
    padding: 0 8px;
  }

  input,
  select,
  button,
  .button {
    min-width: 0;
  }

  .panel {
    padding: 12px;
  }

  .document-body {
    padding: 12px;
    line-height: 1.65;
  }
}

@media (min-width: 901px) {
  body:has(.page.has-customer-side-rails) {
    overflow-x: hidden;
  }

  .page.has-customer-side-rails {
    width: min(1180px, calc(100vw - 380px));
    min-width: 0;
    margin-left: 360px;
    margin-right: 20px;
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  body:has(.page.has-customer-side-rails) {
    min-width: 0;
  }

  .page.has-customer-side-rails {
    min-width: 0;
  }
}

.help-toggle[hidden] {
  display: none;
}

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.help-scrim {
  position: absolute;
  inset: 0;
  background: rgba(31, 35, 40, 0.54);
  pointer-events: auto;
}

.help-target {
  position: fixed;
  border: 2px solid var(--link);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(31, 35, 40, 0.18), var(--focus-shadow);
  background: rgba(9, 105, 218, 0.08);
  transition: left 100ms ease, top 100ms ease, width 100ms ease, height 100ms ease;
  z-index: 1001;
}

.help-pointer {
  position: fixed;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  transform: rotate(45deg);
  z-index: 1002;
  pointer-events: none;
}

.help-tooltip {
  position: fixed;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--popover-shadow);
  padding: 16px;
  pointer-events: auto;
  z-index: 1003;
}

.help-tooltip-kicker,
.help-tooltip-progress {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.help-tooltip-title {
  margin: 4px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.help-tooltip-body {
  display: grid;
  gap: 8px;
}

.help-tooltip-body p,
.help-tooltip-list,
.help-tooltip-action,
.help-tooltip-direction {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.help-tooltip-list {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-left: 18px;
}

.help-tooltip-action,
.help-tooltip-direction {
  margin-top: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--soft);
  padding: 9px 10px;
}

.help-tooltip-action::before {
  content: "다음 행동";
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.help-tooltip-direction::before {
  content: "화면 방향";
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.help-tooltip-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.help-tooltip-actions button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.help-tooltip-progress {
  justify-self: center;
}

/* Operations, dashboard, and admin console */
.dashboard-nav {
  position: sticky;
  top: 48px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 1px 2px var(--shadow);
  backdrop-filter: blur(8px);
}

.dashboard-nav a {
  min-height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--text);
  background: var(--paper);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-nav a:hover {
  border-color: var(--accent);
  background: var(--soft);
}

[id^="dashboard-"] {
  scroll-margin-top: 112px;
}

#dashboard-release-notes {
  scroll-margin-top: 112px;
}

.release-note-failure-list {
  margin: 12px 0;
  border: 1px solid var(--status-danger-border);
  border-radius: 6px;
  background: var(--status-danger-bg);
}

.release-note-failure-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 9px 12px;
  color: var(--status-danger-text);
  font-weight: 900;
}

.release-note-failure-list summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.release-note-failure-panel .release-note-failure-list {
  margin: 0;
}

.release-note-failure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.release-note-failure-summary div {
  display: grid;
  gap: 3px;
}

.release-note-failure-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-release-note-failure-list {
  margin-bottom: 10px;
}

.release-note-failure-items {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}

.release-note-failure-items a {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--paper);
  text-decoration: none;
}

.release-note-failure-items code {
  overflow-wrap: anywhere;
  color: var(--muted);
  white-space: normal;
}

.release-note-failure-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--paper);
}

.release-note-failure-card > a {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.release-note-exception-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.release-note-exception-form input {
  min-width: 0;
}

.dashboard-user-list {
  display: grid;
  gap: 10px;
}

.dashboard-user-row {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--paper);
  text-decoration: none;
}

.dashboard-user-row:hover {
  border-color: var(--accent);
  background: var(--soft);
}

.dashboard-user-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.flash-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--status-ok-border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--status-ok-text);
  background: var(--status-ok-bg);
  box-shadow: 0 12px 28px var(--shadow);
  font-weight: 800;
}

.flash-toast.error {
  border-color: var(--status-danger-border);
  color: var(--status-danger-text);
  background: var(--status-danger-bg);
}
.dashboard-metrics,
.log-overview-grid,
.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--panel);
  box-shadow: 0 1px 2px var(--shadow);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.metric-card .metric-path {
  font-size: 13px;
  line-height: 1.35;
}

.metric-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.metric-card-link:hover,
.metric-card-link:focus-visible {
  border-color: var(--link);
  box-shadow: 0 8px 18px var(--shadow);
  text-decoration: none;
  transform: translateY(-1px);
}

.metric-card-link small {
  margin-top: 6px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.dashboard-card,
.dashboard-section-placeholder {
  min-width: 0;
}

.dashboard-card.wide-card,
.dashboard-section-wide {
  grid-column: 1 / -1;
}

.dashboard-loading-card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-section-placeholder.is-loading .dashboard-loading-card {
  opacity: 0.78;
}

.dashboard-customer-list,
.bar-list,
.review-candidate-list {
  display: grid;
  gap: 10px;
}

.dashboard-customer-row,
.review-candidate,
.log-detail {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.dashboard-customer-row,
.review-candidate {
  padding: 10px 12px;
}

.dashboard-row-head,
.bar-row > div:first-child,
.review-candidate {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.dashboard-row-head span,
.bar-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bar {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft-2);
  border: 1px solid var(--line-soft);
}

.bar span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--accent);
}

.dashboard-product-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dashboard-product-mini span {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.bar-row {
  display: grid;
  gap: 2px;
}

.dashboard-link-list a.bar-row,
.dashboard-recent-list a,
.quality-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--paper);
  text-decoration: none;
}

.dashboard-link-list a.bar-row:hover,
.dashboard-recent-list a:hover {
  border-color: var(--accent);
  background: var(--soft);
}

.dashboard-recent-list,
.quality-list {
  display: grid;
  gap: 10px;
}

.dashboard-recent-list a {
  display: grid;
  gap: 4px;
}

.dashboard-recent-list strong {
  overflow-wrap: anywhere;
}

.dashboard-recent-list span,
.quality-row span,
.quality-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.quality-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.quality-row strong {
  color: var(--accent-strong);
}

.version-impact-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 56px;
  z-index: 7;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px var(--shadow);
}

.admin-sidebar strong {
  flex: 0 0 auto;
  margin: 0 4px 0 2px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.admin-sidebar a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--soft);
  text-decoration: none;
}

.admin-sidebar a.active {
  color: var(--accent);
  font-weight: 800;
}

.admin-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-main > .summary {
  margin-bottom: 0;
}

.admin-content {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-content.is-loading {
  opacity: 0.58;
  pointer-events: none;
}

.admin-loading-panel {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.backup-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto 96px;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.backup-schedule-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  margin: 14px 0;
  background: var(--paper);
}

.backup-schedule-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.backup-schedule-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto auto auto auto 112px;
  gap: 8px;
  align-items: end;
}

.backup-schedule-form label:not(.inline-check) {
  display: grid;
  gap: 5px;
}

.backup-schedule-form label:not(.inline-check) span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-disabled {
  border-color: var(--status-neutral-border);
  color: var(--status-neutral-text);
  background: var(--status-neutral-bg);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--status-neutral-border);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.status-success,
.status-complete,
.status-completed {
  border-color: var(--status-ok-border);
  color: var(--status-ok-text);
  background: var(--status-ok-bg);
}

.status-running {
  border-color: var(--status-info-border);
  color: var(--status-info-text);
  background: var(--status-info-bg);
}

.status-failed,
.status-error,
.status-incomplete {
  border-color: var(--status-danger-border);
  color: var(--status-danger-text);
  background: var(--status-danger-bg);
}

.log-detail {
  padding: 8px 10px;
}

.log-detail summary {
  cursor: pointer;
  font-weight: 700;
}

.log-detail pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow: auto;
}

.review-candidate p {
  margin: 4px 0 0;
  color: var(--muted);
}

.compact-candidates .review-candidate {
  display: block;
}

/* Customer detail regression guard: panels must scroll instead of overlapping. */
.customer-detail-page .customer-grid {
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
}

.customer-detail-page .customer-products-panel,
.customer-detail-page .customer-history-panel,
.customer-detail-page .customer-permission-panel {
  overflow-x: auto;
}

.customer-detail-page .customer-products-panel table {
  min-width: 1120px;
}

.customer-detail-page .customer-products-panel th {
  white-space: nowrap;
}

.customer-detail-page .customer-products-panel th:nth-child(2),
.customer-detail-page .customer-products-panel td:nth-child(2),
.customer-detail-page .customer-products-panel th:nth-child(3),
.customer-detail-page .customer-products-panel td:nth-child(3) {
  width: 110px;
  min-width: 110px;
  white-space: nowrap;
}

.customer-detail-page .customer-products-panel th:nth-child(4),
.customer-detail-page .customer-products-panel td:nth-child(4) {
  width: 96px;
  min-width: 96px;
  white-space: nowrap;
}

.customer-detail-page .customer-products-panel th:nth-child(5),
.customer-detail-page .customer-products-panel td:nth-child(5) {
  min-width: 520px;
}
.customer-detail-page .customer-history-panel table {
  min-width: 720px;
}

.customer-detail-page .product-actions {
  min-width: 420px;
}

@media (max-width: 1180px) {
  body:has(.customer-detail-page.has-customer-side-rails) {
    min-width: 0;
    overflow-x: hidden;
  }

  .customer-detail-page.has-customer-side-rails {
    width: min(100% - 24px, 1180px);
    margin-left: auto;
    margin-right: auto;
  }

  .customer-detail-page .customer-side-rail {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    margin: 0 0 12px;
    contain: none;
  }

  .customer-detail-page .customer-side-rail .panel {
    height: auto;
    max-height: min(56vh, 420px);
  }

  .customer-detail-page .customer-side-rail .panel .section-head {
    display: none;
  }

  .customer-detail-page .mobile-rail-details {
    height: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    overflow: hidden;
  }

  .customer-detail-page .mobile-rail-summary {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: var(--soft);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    list-style-position: inside;
  }

  .customer-detail-page .mobile-rail-summary strong {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .customer-detail-page .mobile-rail-details .panel {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 1240px) {
  .dashboard-grid,
  .admin-layout,
  .customer-detail-page .customer-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    top: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .backup-create-form,
  .backup-schedule-form {
    grid-template-columns: 1fr;
  }
}
/* Mobile customer detail hardening: keep desktop side-rail offsets from leaking into narrow viewports. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 10px 12px;
  }

  .topbar .brand-group,
  .topbar .brand {
    min-width: 0;
  }

  .topbar nav {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .topbar nav .admin-nav-link {
    order: -1;
    color: var(--text);
    background: var(--soft-2);
  }

  .page.customer-detail-page.has-customer-side-rails {
    width: calc(100% - 16px) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 12px auto 32px !important;
  }

  .customer-detail-page .summary,
  .customer-detail-page .customer-grid,
  .customer-detail-page .panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .customer-detail-page .customer-side-rail {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 0 12px !important;
    contain: none !important;
  }

  .customer-detail-page .customer-products-panel,
  .customer-detail-page .customer-history-panel,
  .customer-detail-page .customer-permission-panel {
    overflow-x: auto;
  }

  .customer-detail-page .customer-product-form {
    grid-template-columns: 1fr;
  }

  .customer-detail-page .customer-products-panel table {
    min-width: 760px;
  }

  .customer-detail-page .product-actions {
    min-width: 360px;
  }

  .manual-tag-actions {
    align-items: stretch;
  }

  .manual-tag-actions .tag-kind-create {
    width: min(100%, 330px);
    margin-left: 0;
    grid-template-columns: minmax(0, 1fr) 96px;
  }
}

@media (max-width: 480px) {
  .topbar nav {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .customer-detail-page .customer-products-panel table {
    min-width: 700px;
  }

  .customer-detail-page .product-actions {
    min-width: 320px;
  }
}
@media (max-width: 600px) {
  .customer-detail-page .customer-products-panel {
    overflow-x: visible;
  }

  .customer-detail-page .customer-products-panel table,
  .customer-detail-page .customer-products-panel tbody,
  .customer-detail-page .customer-products-panel tr,
  .customer-detail-page .customer-products-panel td {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .customer-detail-page .customer-products-panel table {
    border: 0;
  }

  .customer-detail-page .customer-products-panel thead {
    display: none;
  }

  .customer-detail-page .customer-products-panel tr {
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
  }

  .customer-detail-page .customer-products-panel td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    border-bottom: 0;
    padding: 5px 0;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .customer-detail-page .customer-products-panel td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .customer-detail-page .customer-products-panel td[colspan] {
    grid-template-columns: 1fr;
  }

  .customer-detail-page .product-actions,
  .customer-detail-page .inline-version-form {
    min-width: 0 !important;
    grid-template-columns: 1fr;
  }

  .customer-detail-page .product-actions .button,
  .customer-detail-page .product-actions button {
    width: 100%;
  }
}

.operation-check-panel {
  margin-bottom: 16px;
}

.operation-check-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.operation-check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--text);
  text-decoration: none;
  background: var(--soft);
}

.operation-check-row:hover {
  border-color: var(--link);
  text-decoration: none;
}

.operation-check-row strong,
.operation-check-row p {
  margin: 0;
}

.operation-check-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.operation-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--status-info-text);
  background: var(--status-info-bg);
  border-color: var(--status-info-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.operation-check-row.level-ok .operation-status {
  color: var(--status-ok-text);
  background: var(--status-ok-bg);
  border-color: var(--status-ok-border);
}

.operation-check-row.level-warning .operation-status {
  color: var(--status-warning-text);
  background: var(--status-warning-bg);
  border-color: var(--status-warning-border);
}

.operation-check-row.level-danger .operation-status {
  color: var(--status-danger-text);
  background: var(--status-danger-bg);
  border-color: var(--status-danger-border);
}
.owner-filter-group {
  position: relative;
  flex: 0 0 auto;
  min-width: 150px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--paper);
}

.owner-filter-group[open] {
  z-index: 30;
}

.owner-filter-group summary {
  min-height: 30px;
  padding: 5px 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.owner-filter-group summary span,
.filter-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.owner-filter-group-body {
  position: absolute;
  top: calc(100% + 4px);
  left: -1px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: max(220px, 100%);
  max-width: min(420px, calc(100vw - 32px));
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 8px;
  background: var(--paper);
  box-shadow: var(--popover-shadow);
}

.filter-chip.primary {
  border-color: var(--accent);
}

.customer-relation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}

.customer-relation-badge.owner {
  border-color: rgba(26, 127, 55, 0.35);
  background: rgba(26, 127, 55, 0.12);
  color: var(--accent-strong);
}

.customer-relation-badge.editor {
  border-color: rgba(9, 105, 218, 0.32);
  background: rgba(9, 105, 218, 0.11);
  color: #0969da;
}

html.theme-dark .customer-relation-badge.editor {
  border-color: rgba(88, 166, 255, 0.36);
  background: rgba(88, 166, 255, 0.14);
  color: #58a6ff;
}

.release-note-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.release-note-summary-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: var(--paper);
}

.release-note-summary-grid span,
.release-note-summary-grid strong {
  display: block;
}

.release-note-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.release-note-summary-grid strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.compact-release-list {
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.release-note-file-list {
  display: grid;
  gap: 16px;
}

.release-note-file-card {
  scroll-margin-top: 84px;
}

.release-note-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.release-note-meta-grid div {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px;
  background: var(--paper);
}

.release-note-meta-grid span,
.release-note-meta-grid strong {
  display: block;
}

.release-note-meta-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.release-note-links,
.release-note-version-list {
  display: grid;
  gap: 8px;
}

.release-note-links {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  margin-bottom: 12px;
}

.release-note-version-card {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--paper);
}

.release-note-version-card summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.release-note-version-card ul {
  margin: 0;
  padding: 0 18px 12px 30px;
}

.release-note-unsectioned {
  white-space: pre-wrap;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 12px;
  background: var(--paper);
  color: var(--text);
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .release-note-meta-grid {
    grid-template-columns: 1fr;
  }
}

.release-note-filter-panel {
  display: grid;
  gap: 14px;
}

.release-note-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.release-note-filter-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.release-note-filter-form input {
  min-width: 0;
}

.release-note-change-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.release-note-change-summary div,
.release-note-change-file {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.release-note-change-summary div {
  padding: 12px;
  display: grid;
  gap: 4px;
}

.release-note-change-summary span,
.release-note-change-file header span {
  color: var(--muted);
  font-size: 0.82rem;
}

.release-note-change-summary strong {
  color: var(--text);
  font-size: 1.15rem;
}

.release-note-change-list {
  display: grid;
  gap: 12px;
}

.customer-release-note-changes {
  display: grid;
  gap: 14px;
}

.customer-release-note-change-list {
  display: grid;
  gap: 12px;
}

.customer-release-note-change-card header {
  gap: 12px;
}

.release-note-change-summary.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.customer-release-note-version-block {
  padding: 8px 0 0;
}

.customer-release-note-version-block ul {
  margin: 6px 0 0;
}

.release-note-change-file {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.release-note-change-file header {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
}

.release-note-change-version {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.release-note-change-version summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.release-note-change-version summary span {
  color: var(--muted);
  font-size: 0.84rem;
}

.release-note-change-version ul {
  margin: 0;
  padding: 0 18px 12px 30px;
}

@media (max-width: 900px) {
  .release-note-filter-form,
  .release-note-change-summary {
    grid-template-columns: 1fr;
  }

  .release-note-filter-form .button,
  .release-note-filter-form button {
    width: 100%;
  }
}



.release-note-mail-copy {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.release-note-mail-body {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg, var(--surface-subtle));
  color: var(--text);
  padding: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.risk-formula {
  max-width: min(100%, 640px);
  text-align: right;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .risk-formula {
    text-align: left;
  }
}

.action-update-form .action-form-message {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--status-ok-text);
  font-size: 12px;
  font-weight: 800;
}

.action-update-form .action-form-message.error {
  color: var(--status-danger-text);
}

.article-search-evidence {
  margin-top: 6px;
  border-left: 3px solid var(--accent);
  padding: 6px 8px;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
  line-height: 1.45;
}

.article-search-evidence span {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-weight: 900;
}

.article-search-evidence p {
  margin: 0;
}

.article-search-evidence mark {
  border-radius: 3px;
  padding: 0 2px;
  color: var(--status-warning-text);
  background: var(--status-warning-bg);
}

.release-note-empty-result {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.release-note-empty-result strong {
  display: block;
  margin-bottom: 4px;
}

.release-note-empty-result p {
  margin: 0;
}

.release-note-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.release-note-diagnostic-grid div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px;
  background: var(--paper);
}

.release-note-diagnostic-grid dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.release-note-diagnostic-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .release-note-diagnostic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .release-note-diagnostic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .release-note-failure-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .release-note-failure-list summary {
    align-items: flex-start;
    flex-direction: column;
  }
}
.page-jump-panel {
  position: fixed;
  right: 18px;
  bottom: 42px;
  z-index: 35;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

.page-jump-panel[hidden] {
  display: none;
}

.page-jump-panel button,
.page-jump-panel details {
  pointer-events: auto;
}

.page-jump-button,
.page-jump-sections summary {
  min-width: 52px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--popover-shadow);
  font-size: 12px;
  font-weight: 800;
}

.page-jump-button:hover,
.page-jump-sections summary:hover {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-strong);
}

.page-jump-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.page-jump-sections {
  position: relative;
}

.page-jump-sections summary {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}

.page-jump-sections summary::-webkit-details-marker {
  display: none;
}

.page-jump-sections nav {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  gap: 4px;
  width: min(260px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 150px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel);
  box-shadow: var(--popover-shadow);
}

.page-jump-sections nav a {
  display: block;
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.page-jump-sections nav a:hover {
  background: var(--soft);
  text-decoration: none;
}

@media (max-width: 720px) {
  .page-jump-panel {
    right: 10px;
    bottom: 18px;
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .page-jump-button,
  .page-jump-sections summary {
    min-width: 48px;
    height: 32px;
    padding: 0 9px;
  }
}

.lni-cat-widget {
  position: fixed;
  left: 18px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  z-index: 34;
  display: grid;
  grid-template-columns: auto minmax(220px, 320px);
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
  pointer-events: none;
}

body:has(.customer-detail-page) .lni-cat-widget {
  top: auto;
  bottom: 72px;
  transform: none;
  align-items: end;
}

body:has(.customer-detail-page) .lni-cat-bubble {
  align-self: end;
  max-height: min(360px, calc(100vh - 130px));
  overflow-y: auto;
}

.lni-cat-avatar {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--popover-shadow);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.lni-cat-avatar:hover {
  border-color: var(--accent);
  background: var(--panel);
  transform: translateY(-2px);
}

.lni-cat-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lni-cat-bubble {
  pointer-events: auto;
  grid-column: 2;
  grid-row: 1;
  width: min(320px, calc(100vw - 150px));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #ffffff;
  color: #111827;
  box-shadow: var(--popover-shadow);
  white-space: pre-line;
}

.lni-cat-bubble[hidden] {
  display: none;
}

.lni-cat-bubble strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.lni-cat-bubble p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.lni-cat-line {
  display: block;
  min-height: 1.45em;
}

.lni-cat-inline-link {
  margin-left: 6px;
  white-space: nowrap;
}

.lni-cat-bubble a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.lni-cat-widget[data-state="loading"] .lni-cat-avatar,
.lni-cat-widget[data-state="scanning"] .lni-cat-avatar,
.lni-cat-widget[data-state="thinking"] .lni-cat-avatar {
  border-color: var(--accent);
  animation: lni-cat-working 900ms ease-in-out infinite alternate;
}

@keyframes lni-cat-working {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

html.theme-dark .lni-cat-avatar {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
}

html.theme-dark .lni-cat-bubble {
  border-color: var(--line);
  background: #101826;
  color: #e5edf8;
}

html.theme-dark .lni-cat-bubble strong {
  color: #f8fafc;
}

html.theme-dark .lni-cat-bubble p {
  color: #cbd5e1;
}

@media (max-width: 720px) {
  /* mobile toast: keep messages, hide the persistent mascot button on narrow screens. */
  .lni-cat-widget {
    right: 10px;
    left: 10px;
    top: auto;
    bottom: 12px;
    transform: none;
    display: block;
    max-width: none;
  }

  .lni-cat-avatar {
    display: none;
  }

  .lni-cat-bubble {
    width: auto;
    max-width: none;
    border-radius: 9px;
    padding: 10px 12px;
  }
}
.document-label-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  background: var(--panel);
}

.document-label-chip-row,
.document-label-filter-bar,
.article-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.document-label-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-bg);
  color: var(--text);
  padding: 7px 11px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.document-label-chip:hover,
.document-label-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.document-label-chip.active {
  background: rgba(17, 134, 118, 0.14);
  border-color: var(--accent);
  color: var(--accent);
}

.document-label-chip:disabled {
  cursor: wait;
  opacity: 0.65;
}

.document-label-create {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.document-label-create input {
  width: min(260px, 100%);
}
.document-label-message {
  min-height: 1.3em;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-label-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

.account-label-form input {
  width: min(320px, 100%);
}

.account-label-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.account-label-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-bg);
}

.account-label-item form {
  margin: 0;
}
.document-label-filter-bar {
  margin: 12px 0 16px;
}

.action-label-section {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.label-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-bg);
}

.label-section-head h3 {
  margin: 0;
  font-size: 0.98rem;
}

.action-label-section .action-table {
  margin: 0;
  border: 0;
}

.article-label-row {
  margin-top: 6px;
}

.article-label-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--muted);
  font-size: 0.78rem;
}
.section-pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

[data-log-section-content].is-loading {
  opacity: 0.62;
  pointer-events: none;
}

.log-loading-panel {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-add-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 0.8fr) minmax(180px, 1fr) 140px 100px minmax(160px, 1fr) 96px;
  gap: 8px;
  align-items: center;
  margin: 14px 0;
}

.product-tree-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.product-tree,
.product-tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-tree-children {
  margin-left: 18px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.product-tree-item {
  margin: 8px 0;
}

.product-tree-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: 10px;
}

.product-tree-main {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(240px, auto);
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.product-order-controls {
  display: inline-flex;
  gap: 4px;
}

.product-order-controls .icon-button {
  min-width: 34px;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 900;
}

.product-tree-metrics {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-tree-edit {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 130px 90px minmax(160px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.product-active-check {
  min-width: 64px;
}

@media (max-width: 980px) {
  .product-add-form,
  .product-tree-edit,
  .product-tree-main {
    grid-template-columns: 1fr;
  }

  .product-tree-metrics {
    justify-content: flex-start;
  }
}
/* Shared console navigation for dense operational pages. */
.section-console-nav,
.dashboard-nav[data-section-console-nav] {
  position: sticky;
  top: 48px;
  z-index: 8;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 1px 2px var(--shadow);
  backdrop-filter: blur(8px);
}

.section-console-nav strong,
.dashboard-nav[data-section-console-nav] strong {
  flex: 0 0 auto;
  margin: 0 6px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.section-console-nav a,
.section-console-nav .filter-chip,
.dashboard-nav[data-section-console-nav] a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--text);
  background: var(--paper);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.section-console-nav a:hover,
.section-console-nav .filter-chip:hover,
.section-console-nav a.active,
.section-console-nav .filter-chip.active,
.dashboard-nav[data-section-console-nav] a:hover,
.dashboard-nav[data-section-console-nav] a.active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--status-ok-bg);
  text-decoration: none;
}

.section-console-nav a.active,
.section-console-nav .filter-chip.active,
.dashboard-nav[data-section-console-nav] a.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.section-console-spacer {
  flex: 1 1 12px;
  min-width: 12px;
}

.release-note-console-nav + .panel,
.release-note-console-nav + .dashboard-metrics,
.log-section-nav + [data-log-section-content] {
  margin-top: 0;
}

.page section[id],
.page article[id],
.page .panel[id] {
  scroll-margin-top: 104px;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .section-console-nav,
  .dashboard-nav[data-section-console-nav] {
    top: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 0 14px;
    -webkit-overflow-scrolling: touch;
  }

  .section-console-nav strong,
  .dashboard-nav[data-section-console-nav] strong,
  .section-console-spacer {
    display: none;
  }

  .section-console-nav a,
  .section-console-nav .filter-chip,
  .dashboard-nav[data-section-console-nav] a {
    min-height: 32px;
  }
}

.help-admin-page-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.help-admin-page-list .kind-chip.active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--status-ok-bg);
}
.help-admin-list {
  display: grid;
  gap: 14px;
}
.help-admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}
.help-admin-default {
  margin: 10px 0 14px;
  color: var(--muted);
}
.help-admin-default pre {
  white-space: pre-wrap;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}
.help-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.help-admin-grid label,
.help-admin-full {
  display: grid;
  gap: 6px;
}
.help-admin-full {
  margin-top: 10px;
}
.help-admin-form textarea {
  resize: vertical;
  min-height: 96px;
}
.help-admin-form .secondary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 10px;
}
.help-admin-actions {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}
.help-tooltip-body.is-bold {
  font-weight: 700;
}
.help-tooltip-body.font-small {
  font-size: 0.9rem;
}
.help-tooltip-body.font-large {
  font-size: 1.08rem;
}
.help-tooltip-body.font-x-large {
  font-size: 1.18rem;
}
.help-tooltip-body .help-html-body :first-child {
  margin-top: 0;
}
.help-tooltip-body .help-html-body :last-child {
  margin-bottom: 0;
}


/* Operation manual page */
.docs-page {
  max-width: 1280px;
}
.docs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: start;
  gap: 28px;
  margin-bottom: 16px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--line);
}
.docs-hero-copy {
  min-width: 0;
}
.docs-hero .manual-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}
.docs-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}
.docs-hero .lead {
  max-width: 820px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}
.docs-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.docs-meta-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--soft);
  line-height: 1.45;
}
.docs-meta-grid dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.docs-meta-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}
.docs-toc {
  position: sticky;
  top: 52px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
}
.docs-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--link);
  background: var(--bg);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.docs-section {
  margin-bottom: 16px;
  scroll-margin-top: 112px;
}
.docs-section h2 {
  margin-top: 0;
  font-size: 24px;
}
.docs-section h3 {
  margin: 22px 0 8px;
  font-size: 18px;
}
.docs-section h4 {
  margin: 18px 0 8px;
  font-size: 15px;
}
.docs-section p,
.docs-section li {
  line-height: 1.72;
}
.docs-section ul,
.docs-section ol {
  padding-left: 22px;
}
.docs-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.docs-callout {
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--soft);
  margin: 14px 0;
}
.docs-callout p {
  margin: 4px 0 0;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  table-layout: auto;
}
.docs-table th,
.docs-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
  line-height: 1.55;
}
.docs-table th {
  background: var(--soft-2);
  color: var(--text);
  text-align: left;
  font-weight: 800;
}
.docs-table.compact th,
.docs-table.compact td {
  padding: 8px 10px;
  font-size: 13px;
}
.docs-page pre {
  margin: 10px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg, #0f172a);
  color: var(--code-text, #e5e7eb);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.55;
}
.docs-page code {
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: .92em;
}
.docs-page :not(pre) > code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--inline-code-bg, rgba(127, 127, 127, .12));
  color: var(--text);
}
.check-list li {
  margin-bottom: 6px;
}
@media (max-width: 900px) {
  .docs-hero,
  .docs-grid.two {
    grid-template-columns: 1fr;
  }
  .docs-meta-grid {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    position: static;
  }
}
