/* 镶口大师 — 与排石/壁厚/指环同系深色 UI */
:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --border: #555;
  --text: #e8e8e8;
  --muted: #9a9a9a;
  --accent: #7ec8e3;
  --preset-active: #e8d98a;
  --input-bg: #1a1a1a;
  --btn-bg: #1c1c1c;
  --btn-hover: #2a2a2a;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html.no-scribble,
html.no-scribble body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* 抑制 iPad Scribble：touch-action 不含 auto/manipulation/handwriting */
.no-scribble #panel {
  touch-action: pan-y;
}

.no-scribble #panel .btn,
.no-scribble #panel .switch,
.no-scribble #view-modes button,
.no-scribble #shapes-bar button {
  touch-action: none;
}

.no-scribble #panel input[type="number"],
.no-scribble #panel input[type="text"],
.no-scribble #panel textarea,
.no-scribble #panel input.param-num {
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
}

#app {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 340px);
  grid-template-rows: 1fr 96px;
  width: 100%;
  height: 100%;
}

#viewport-wrap {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  background: #0c0c0c;
  border-right: 1px solid #333;
  border-bottom: 1px solid #333;
  min-width: 0;
  min-height: 0;
}

#viewport {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#viewport-top-left {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: min(280px, calc(100% - 24px));
  pointer-events: none;
}

#viewport-ops {
  min-width: 168px;
  padding: 8px 10px 9px;
  background: rgba(10, 10, 10, 0.84);
  border: 1px solid #454545;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.ops-title {
  font-size: 10px;
  color: #6a6a6a;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

#viewport-ops-body {
  color: #d0d0d0;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-line;
}

#hint-stack {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: min(46%, 420px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
  z-index: 2;
}

#status {
  position: static;
  color: var(--muted);
  font-size: 11px;
  opacity: 0.95;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1.35;
  max-width: 100%;
  white-space: pre-line;
}

#view-hud {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 3;
  pointer-events: none;
}

#view-hud > * {
  pointer-events: auto;
}

#view-modes {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 6px;
}

#app-brand {
  align-self: center;
  margin-right: 2px;
  color: #c8c8c8;
  font-size: 12px;
  letter-spacing: 0.06em;
  user-select: none;
  white-space: nowrap;
}

#app-version {
  align-self: center;
  margin-right: 4px;
  color: #888;
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  user-select: none;
}

#view-modes button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 52px;
  height: 48px;
  padding: 4px 2px;
  border: 1px solid #666;
  background: rgba(22, 22, 22, 0.88);
  color: #c8c8c8;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

#view-modes button svg {
  width: 20px;
  height: 20px;
  display: block;
}

#view-modes button span {
  font-size: 10px;
  line-height: 1;
  user-select: none;
}

#view-modes button:hover {
  border-color: #aaa;
  color: #fff;
  background: rgba(40, 40, 40, 0.95);
}

#view-modes button.active {
  border-color: var(--accent);
  color: #0a1a22;
  background: var(--accent);
}

#view-modes button.active svg {
  color: #0a1a22;
}

#view-modes button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  border-color: #444;
  color: #777;
  background: rgba(18, 18, 18, 0.7);
}

#view-modes button:disabled:hover {
  border-color: #444;
  color: #777;
  background: rgba(18, 18, 18, 0.7);
}

#shapes-bar {
  grid-column: 1;
  grid-row: 2;
  background: #0d0d0d;
  border-top: 1px solid #333;
  border-right: 1px solid #333;
  display: flex;
  align-items: center;
  padding: 0 12px;
  overflow: hidden;
  gap: 10px;
}

.shapes-bar-label {
  flex: 0 0 auto;
  color: #888;
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  user-select: none;
}

#stone-shapes {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 8px 0;
}

.shape-btn {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  background: #141414;
  border: 1px solid #888;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px 4px;
  transition: background 0.12s ease, border-color 0.12s ease;
  color: #ddd;
}

.shape-btn:hover {
  border-color: #ccc;
  background: #1c1c1c;
}

.shape-btn.active {
  background: var(--preset-active);
  border-color: #c4b56a;
  color: #222;
}

.shape-btn.unsupported {
  opacity: 0.55;
}

.shape-btn .shape-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  /* 资源为白线透明底：深色按钮直接显示；选中金底则压成黑线 */
  filter: none;
  pointer-events: none;
  user-select: none;
}

.shape-btn.active .shape-icon {
  filter: brightness(0);
}

.shape-btn .shape-name {
  font-size: 10px;
  line-height: 1.1;
  user-select: none;
  white-space: nowrap;
}

#panel {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid #444;
  padding: 10px 10px 14px 12px;
  gap: 8px;
  overflow: hidden;
  min-height: 0;
}

#panel-tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #333;
}

.panel-tab {
  flex: 1;
  appearance: none;
  border: 1px solid #444;
  background: #1a1a1a;
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.panel-tab.active {
  background: #2a4a5a;
  border-color: #4a9bbb;
  color: #e8f4f8;
}

.panel-pane {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.panel-pane.active {
  display: flex;
  overflow-y: auto;
  overflow-x: hidden;
  /* 预留滚动条槽，避免滑块压住开关/数值框 */
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.pane-placeholder {
  margin-top: 24px;
  padding: 16px;
  border: 1px dashed #555;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  line-height: 1.5;
}

.pane-placeholder-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.param-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 8px;
  border-radius: 5px;
  border-left: 4px solid var(--group-accent, #555);
  background: var(--group-bg, rgba(255, 255, 255, 0.03));
}

.param-group[data-group="stone"] {
  --group-accent: #6eb8d6;
  --group-bg: rgba(110, 184, 214, 0.1);
}

.param-group[data-group="prong"] {
  --group-accent: #c48ad4;
  --group-bg: rgba(196, 138, 212, 0.1);
}

.param-group[data-group="setting"] {
  --group-accent: #d4a35c;
  --group-bg: rgba(212, 163, 92, 0.11);
}

.param-advanced {
  margin-top: 4px;
  border: 1px solid rgba(196, 138, 212, 0.28);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.param-advanced-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #d2b0e0;
  background: rgba(196, 138, 212, 0.12);
}

.param-advanced-summary::-webkit-details-marker {
  display: none;
}

.param-advanced-summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s ease;
  opacity: 0.85;
}

.param-advanced[open] > .param-advanced-summary::before {
  transform: rotate(90deg);
}

.param-advanced[open] > .param-advanced-summary {
  border-bottom: 1px solid rgba(196, 138, 212, 0.22);
}

.param-advanced .outline-editor {
  padding: 8px 8px 10px;
}

.param-advanced-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 8px 10px;
}

.param-group[data-group="stone"] .param-advanced {
  border-color: rgba(110, 184, 214, 0.28);
}

.param-group[data-group="stone"] .param-advanced-summary {
  color: #9ecfe0;
  background: rgba(110, 184, 214, 0.12);
}

.param-group[data-group="stone"] .param-advanced[open] > .param-advanced-summary {
  border-bottom-color: rgba(110, 184, 214, 0.22);
}

.param-group[data-group="setting"] .param-advanced {
  border-color: rgba(212, 163, 92, 0.35);
  margin-top: 8px;
}

.param-group[data-group="setting"] .param-advanced-summary {
  color: #e0c08a;
  background: rgba(212, 163, 92, 0.14);
}

.param-group[data-group="setting"] .param-advanced[open] > .param-advanced-summary {
  border-bottom-color: rgba(212, 163, 92, 0.28);
}

.outline-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 0 4px;
}

.outline-sym-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.outline-sym-btn {
  appearance: none;
  padding: 6px 4px;
  font-size: 12px;
  background: #141414;
  cursor: pointer;
  border-style: solid;
  border-width: 1px;
}

.outline-sym-btn.sym-x {
  color: #e05555;
  border-color: #e05555;
}

.outline-sym-btn.sym-y {
  color: #4caf6a;
  border-color: #4caf6a;
}

.outline-sym-btn.sym-z {
  color: #5b8def;
  border-color: #5b8def;
}

.outline-sym-btn.sym-x.active {
  background: rgba(224, 85, 85, 0.22);
  color: #ff8a8a;
}

.outline-sym-btn.sym-y.active {
  background: rgba(76, 175, 106, 0.22);
  color: #7ddea0;
}

.outline-sym-btn.sym-z.active {
  background: rgba(91, 141, 239, 0.22);
  color: #9bb8ff;
}

.outline-canvas-wrap {
  display: flex;
  justify-content: center;
  background: #111;
  border: 1px solid #555;
}

.outline-canvas-wrap canvas {
  width: 100%;
  max-width: 260px;
  height: auto;
  aspect-ratio: 1;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.outline-toggle-pair {
  padding: 2px 0;
}

.outline-toggle-triple {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  width: 100%;
}

.outline-toggle-triple .mode-side {
  justify-content: center;
  gap: 6px;
}

.mode-side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c8c8c8;
  flex-shrink: 0;
  line-height: 0;
}

.mode-side-icon svg {
  display: block;
}

.outline-toggle-triple .mode-side:has(input:checked) .mode-side-icon,
.outline-snap-side:has(input:checked) .mode-side-icon {
  color: #6eb8e8;
}

.outline-snap-side {
  gap: 6px;
}

.outline-snap-row,
.outline-roundness-row,
.outline-angle-snap-row {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  width: 100%;
}

.outline-angle-snap-row {
  padding-top: 4px;
}

.outline-angle-snap-row.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.outline-angle-snap-val {
  width: 32px;
}

.outline-snap-side {
  flex-shrink: 0;
}

.outline-grid-density,
.outline-roundness-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  max-width: 180px;
  margin: 0;
  justify-self: start;
}

.outline-grid-label {
  font-size: 12px;
  color: var(--text, #ddd);
  flex-shrink: 0;
}

.outline-grid-density input[type='range'],
.outline-roundness-controls input[type='range'] {
  flex: 1;
  min-width: 0;
  accent-color: #6eb8e8;
}

.outline-grid-val,
.outline-roundness-val {
  font-size: 11px;
  color: #aaa;
  width: 28px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.outline-roundness-row {
  padding: 4px 0 2px;
}

.outline-roundness-label {
  font-size: 12px;
  color: var(--text, #ddd);
  flex-shrink: 0;
}

.outline-tools {
  display: flex;
  gap: 6px;
}

.outline-tool-btn {
  flex: 1;
  padding: 5px 4px;
  font-size: 11px;
  background: #1a1a1a;
  border: 1px solid #666;
  color: #ccc;
  cursor: pointer;
}

.outline-tool-btn:hover {
  border-color: #999;
  color: #fff;
}

.outline-hint {
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
  color: #888;
}

.dia-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #2a2a2a;
}

.dia-seg-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.dia-seg-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dia-seg-label {
  font-size: 12px;
  color: var(--text, #ddd);
}

.dia-reset-row {
  display: flex;
  gap: 8px;
  padding: 2px 0 0;
}

.dia-reset-btn,
.module-reset-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  background: #1a1a1a;
  border: 1px solid #555;
  color: #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.dia-reset-btn:hover,
.module-reset-btn:hover {
  border-color: #888;
  color: #fff;
  background: #222;
}

.module-reset-row {
  display: flex;
  padding: 8px 0 2px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.param-group-title {
  padding: 8px 4px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--group-accent, #8a8a8a);
}

.param-row {
  display: grid;
  grid-template-columns: 72px 1fr 52px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.param-row.param-row-select {
  grid-template-columns: 72px 1fr;
}

.param-row.param-row-readonly {
  grid-template-columns: 72px 1fr;
}

.param-select {
  width: 100%;
  height: 28px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
  padding: 0 6px;
}

.param-select:focus {
  border-color: var(--accent);
}

.param-readonly-value {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  color: #c8c8c8;
  font-size: 12px;
  border-radius: 2px;
}

.param-row label {
  font-size: 11px;
  color: var(--text);
  line-height: 1.25;
}

.param-row input.param-num {
  width: 100%;
  height: 28px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: center;
  font-size: 12px;
  outline: none;
}

.param-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  border: none;
  outline: none;
  min-width: 0;
  touch-action: none;
  cursor: pointer;
}

.param-group[data-group="stone"] .param-row input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(110, 184, 214, 0.22);
  border-radius: 3px;
  border: 1px solid rgba(110, 184, 214, 0.4);
}

.param-group[data-group="prong"] .param-row input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(196, 138, 212, 0.22);
  border-radius: 3px;
  border: 1px solid rgba(196, 138, 212, 0.4);
}

.param-group[data-group="setting"] .param-row input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(212, 163, 92, 0.22);
  border-radius: 3px;
  border: 1px solid rgba(212, 163, 92, 0.4);
}

.param-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid #1a1a1a;
  cursor: pointer;
}

.param-group[data-group="prong"] .param-row input[type="range"]::-webkit-slider-thumb {
  background: #c48ad4;
}

.param-group[data-group="setting"] .param-row input[type="range"]::-webkit-slider-thumb {
  background: #d4a35c;
}

.param-row input.from-table,
.param-row input[type="range"].from-table::-webkit-slider-thumb {
  border-color: #6eb8e8;
}

.param-row input.param-num.from-table {
  border-color: #6eb8e8;
  background: #152028;
}

/* 低于表格推荐：20% 黄 / 30% 橙 / 35% 红 */
.param-row.below-table-warn-yellow label {
  color: #e6c84a;
}
.param-row.below-table-warn-orange label {
  color: #e89a3c;
}
.param-row.below-table-warn-red label {
  color: #e85a4a;
}

.param-row input.param-num.below-table-warn-yellow {
  border-color: #e6c84a;
  background: #2a2614;
  color: #f0e28a;
}
.param-row input.param-num.below-table-warn-orange {
  border-color: #e89a3c;
  background: #2a1e12;
  color: #f0c080;
}
.param-row input.param-num.below-table-warn-red {
  border-color: #e85a4a;
  background: #2a1414;
  color: #f0a098;
}

.param-row input[type="range"].below-table-warn-yellow::-webkit-slider-thumb {
  background: #e6c84a;
  border-color: #8a7020;
}
.param-row input[type="range"].below-table-warn-orange::-webkit-slider-thumb {
  background: #e89a3c;
  border-color: #8a5020;
}
.param-row input[type="range"].below-table-warn-red::-webkit-slider-thumb {
  background: #e85a4a;
  border-color: #8a2820;
}

.param-row input:focus {
  border-color: var(--accent);
}

.param-row.disabled {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.35);
}

.param-row.disabled label {
  color: #888;
}

.mode-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}

.mode-switch-left {
  justify-content: flex-start;
}

.mode-switch-pair {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}

.mode-switch-pair .mode-side:last-child {
  margin-left: auto;
}

.mode-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mode-side.disabled {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.35);
}

.mode-side-label {
  font-size: 12px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 999px;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: #d0d0d0;
  border-radius: 50%;
  transition: transform 0.18s ease;
}

.switch input:checked + .switch-slider {
  background: #6eb8e8;
  border-color: #6eb8e8;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(22px);
}

.btn {
  height: 32px;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  width: 100%;
  border-radius: 2px;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s;
}

.btn:hover:not(:disabled) { background: var(--btn-hover); }

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.btn-primary {
  border-color: #5a9bb0;
  background: var(--accent);
  color: #0a1a22;
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: #6eb4cc;
  border-color: #6eb4cc;
}

#panel-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #2a2a2a;
}

.btn-export {
  height: 40px;
  margin: 0;
  border-color: #5a9bb0;
  background: var(--accent);
  color: #0a1a22;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.btn-export:hover:not(:disabled) {
  background: #6eb4cc;
  border-color: #6eb4cc;
}

.btn-export:disabled {
  opacity: 0.55;
  cursor: wait;
}

#confirm-overlay,
#choice-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#confirm-overlay[hidden],
#choice-overlay[hidden] {
  display: none !important;
}

.confirm-card {
  min-width: 320px;
  max-width: min(440px, 92vw);
  padding: 18px 20px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(22, 22, 22, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.confirm-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.confirm-message {
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
  margin-bottom: 16px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-actions .btn {
  width: auto;
  min-width: 96px;
  padding: 0 22px;
  height: 36px;
}

.choice-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.choice-options .choice-option {
  width: 100%;
  justify-content: center;
  text-align: center;
  height: 36px;
  font-size: 13px;
}

.panel-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.45;
  padding: 0 4px;
}

@media (max-width: 900px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 1fr) auto;
  }
  #panel { max-height: 42vh; border-left: none; border-top: 1px solid #444; }
}
