/* ClashVision screen — based on Figma `Clashvision_UX_V1.1.0`. The target is desktop 1280px and wider (web_ui.md
   §3.8.6). Fonts are the system font stack — nothing is loaded from external origins (§3.8.1). */

:root {
  --ink: #111111;
  --ink-2: #333333;
  --muted: #6b6b6b;
  --muted-2: #9a9a9a;
  --line: #e2e2e2;
  --surface: #ffffff;
  --canvas: #efefef;
  --soft: #ececec;
  --soft-2: #e3e3e3;
  --accent: #2f6fed;
  --accent-soft: #e8f0ff;
  --warn: #e8792b;
  --warn-soft: #fdeee3;
  --danger: #d23b3b;
  --radius: 12px;
  --header-h: 64px;
  --panel-w: 320px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR",
    sans-serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--canvas);
  min-width: 1280px;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
  color: inherit;
}

/* ── Header (GNB) ────────────────────────────────────────────────────────────────────────────────── */

.gnb {
  flex: 0 0 var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}

.gnb-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 0;
}

.gnb-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.gnb-item {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-2);
  padding: 6px 0;
}

.gnb-item.current {
  font-weight: 700;
  color: var(--ink);
  cursor: default;
}

.gnb-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
}

main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.stage {
  flex: 1 1 auto;
  min-height: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  cursor: default;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:disabled,
.btn-primary.looks-disabled {
  background: var(--soft-2);
  color: var(--muted-2);
}

.btn-soft {
  background: var(--soft);
  color: var(--ink);
}

.btn-soft:hover {
  background: var(--soft-2);
}

.btn-large {
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--soft);
  color: var(--ink);
}

.btn-icon:disabled {
  color: var(--muted-2);
}

.btn-icon.tool {
  background: none;
  border: 1px solid transparent;
}

.btn-icon.tool.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.icon {
  display: inline-flex;
}

/* ── Landing ─────────────────────────────────────────────────────────────────────────────────────── */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 40px;
  background: var(--soft-2);
  overflow: auto;
}

.landing h1 {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 48px;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 440px));
  gap: 16px;
}

.landing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 32px;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: box-shadow 0.15s;
}

.landing-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.landing-card-icon {
  width: 56px;
  height: 56px;
  background: var(--soft-2);
  margin-bottom: 18px;
}

.landing-card-title {
  font-size: 20px;
  font-weight: 700;
}

.landing-card-text {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 300px;
}

.badge-soon {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* ── Work area: canvas + right panel ─────────────────────────────────────────────────────────────── */

.workspace {
  display: flex;
}

.canvas-area {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: var(--canvas);
  overflow: hidden;
}

.canvas-area.dragging {
  outline: 2px dashed var(--accent);
  outline-offset: -8px;
}

.viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.viewport.panning {
  cursor: grabbing;
}

.viewport[data-tool="crop"] {
  cursor: crosshair;
}

.viewport[data-tool="eyedropper"] {
  cursor: cell;
}

/* Before a drawing is uploaded (sample selection mode), only the upload guide shows. Result mode always has a
   drawing. */
.upload-prompt {
  display: none !important;
}

.workspace[data-mode="select"] .canvas-empty .upload-prompt,
#stage-dcc .upload-prompt {
  display: flex !important;
}

.workspace[data-mode="select"] .canvas-empty .viewport,
.workspace[data-mode="select"] .canvas-empty .bottom-bar {
  display: none;
}

.viewer-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.viewer-stage canvas,
.viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.crop-rect {
  position: absolute;
  border: 2px dashed var(--accent);
  background: rgba(47, 111, 237, 0.12);
  pointer-events: none;
}

.tabs {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: 12px;
  background: var(--soft-2);
  z-index: 2;
}

.tab {
  min-width: 150px;
  padding: 10px 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
}

.tab.active {
  background: var(--surface);
  color: var(--ink);
}

.tab:disabled {
  cursor: default;
}

.canvas-area .upload-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.upload-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.upload-sub {
  margin: 8px 0 32px;
  font-size: 16px;
}

/* Bottom bar — file info · Reselect · zoom · tools (result summary · zoom in the result stage) */
.bottom-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: 3;
}

.bar-left,
.bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-title {
  font-size: 16px;
  font-weight: 700;
}

.bar-sub {
  font-size: 13px;
  color: var(--muted);
}

.bar-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 0 4px;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #555;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.file-meta {
  display: flex;
  flex-direction: column;
  max-width: 260px;
}

.file-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 11px;
  color: var(--muted);
}

/* `Page 1 of N is used.` — a notice for a multi-page PDF, in the same style as the size line (plan11.0.0). */
.file-page-note {
  font-size: 11px;
  color: var(--muted);
}

.zoom-input {
  width: 58px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  font: inherit;
  font-size: 13px;
}

/* Display per mode — sample selection (select) and result (result) use the same work area. */
.workspace[data-mode="result"] .select-only,
.workspace[data-mode="select"] .result-only {
  display: none !important;
}

.workspace[data-mode="result"] .viewport {
  cursor: grab;
}

/* ── Right panel ─────────────────────────────────────────────────────────────────────────────────── */

.side-panel {
  flex: 0 0 var(--panel-w);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px 16px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  min-height: 0;
  min-width: 0; /* so that content truncated to one line (the memo line of the list) does not push the panel wider */
}

.panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.panel-title {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 700;
}

.panel-title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title-row .panel-title {
  margin: 0;
}

.panel-subtitle {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.panel-subtitle-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.colors-selected {
  font-size: 13px;
  color: var(--muted);
}

.colors-selected span {
  color: var(--accent);
}

.panel-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.hint-box {
  padding: 20px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}

.reference-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.reference-thumb {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--soft);
  border: 1px solid var(--line);
}

.reference-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.item-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}

.item-label-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.item-label-input {
  width: 170px;
  padding: 2px 6px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font: inherit;
}

.btn-pencil,
.btn-remove {
  display: inline-flex;
  border: 0;
  background: none;
  padding: 2px;
  cursor: pointer;
  color: var(--muted);
}

.btn-pencil:hover,
.btn-remove:hover {
  color: var(--ink);
}

.candidate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.candidate-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.swatch {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.candidate-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.candidate-hex {
  font-size: 11px;
  color: var(--muted);
}

.btn-add-color {
  width: 100%;
  margin-top: 10px;
}

/* ── Result panel · markers · overlay ────────────────────────────────────────────────────────────── */

.btn-info {
  display: inline-flex;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
}

.tooltip {
  position: absolute;
  top: 28px;
  right: -8px;
  width: 210px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  font-size: 11px;
  line-height: 1.4;
  z-index: 4;
}

.tooltip p {
  margin: 0 0 6px;
}

.tooltip p:last-child {
  margin: 0;
}

/* ── Picking the clashes for the report (web_ui.md §3.8.8, design 83:10100 · 93:14308) ── */

.select-all-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.select-all-row + .clash-list {
  margin-top: 0;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.selected-count {
  font-size: 12px;
  color: var(--muted);
}

/* Checkbox — the black square check of the design. Only the color is matched on top of the browser's default look
   (indeterminate included). */
.check {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.clash-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.clash-item:hover {
  background: #fafafa;
}

.clash-item.active {
  background: var(--soft);
  border-color: var(--ink);
}

.clash-item-main {
  flex: 1 1 auto; /* starts right next to the checkbox — the number badge is at the right end */
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.clash-item-title {
  font-size: 14px;
  font-weight: 700;
}

.clash-item-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The one memo line at the bottom of a list item — truncated if it overflows; the full text is seen in the overlay
   (design 112:17399). */
.clash-item-memo {
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dot {
  flex: 0 0 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-2);
}

.clash-item-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--soft);
  font-size: 10px;
  font-weight: 700;
}

.clash-item.active .clash-item-badge {
  background: var(--ink);
  color: #fff;
}

.marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Pin-shaped marker — the sharp tip points at the clash center. The selected one is dark, the rest light (design
   112:16947-2). */
.marker {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -32px 0 0 -13px;
  border: 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #d9d9d9;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker > * {
  transform: rotate(45deg);
}

.marker.active {
  background: var(--ink);
  color: #fff;
  z-index: 2;
}

.clash-overlay {
  position: absolute;
  width: 260px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  z-index: 3;
}

.overlay-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.overlay-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
}

.compare {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: var(--soft);
}

.compare-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.compare-thumb,
.compare-swatch {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--soft-2);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.compare-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.compare-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.compare-hex {
  font-size: 10px;
  color: var(--muted);
}

.compare-vs {
  font-size: 11px;
  color: var(--muted);
}

/* Memo input field (design 112:17211) — a multi-line input field on a light gray background. result.js grows its
   height to fit the content, up to MEMO_MAX_ROWS rows (line-height must be in px for that calculation to work). */
.memo-label {
  display: block;
  margin-top: 14px;
}

.memo-input {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 18px;
  resize: none;
  overflow-y: hidden;
}

.memo-input::placeholder {
  color: var(--muted);
}

.memo-input:focus {
  outline: none;
  border-color: var(--ink-2);
  background: var(--surface);
}

.memo-status {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
}

/* ── Eyedropper magnifier grid ───────────────────────────────────────────────────────────────────── */

.loupe {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  z-index: 4;
}

.loupe canvas {
  border-radius: 4px;
  image-rendering: pixelated;
}

.loupe-rgb {
  font-size: 14px;
  font-weight: 700;
}

.loupe-hex {
  font-size: 12px;
  color: var(--ink-2);
}

.loupe-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* ── Report done (web_ui.md §3.8.8, design 93:15694) ── */

.report-ready {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
}

.report-ready-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  margin-top: -80px;
}

.report-ready-title {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 800;
  color: #1f2430;
  white-space: nowrap;
}

.report-ready-summary {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.report-ready-button {
  width: 288px;
  padding: 13px 16px;
  margin-bottom: 8px;
  border-radius: 10px;
}

.report-ready .btn-soft {
  background: var(--soft-2);
  color: var(--ink-2);
}

/* ── Modal ───────────────────────────────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  z-index: 100;
}

.modal {
  position: relative;
  width: 348px;
  padding: 24px 16px 16px;
  border-radius: 20px;
  background: var(--surface);
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 4px;
}

.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 50%;
}

.modal-icon-warning {
  background: var(--warn-soft);
  color: var(--warn);
}

.modal-icon-glyph {
  font-size: 22px;
  font-weight: 700;
}

.modal-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.modal-message {
  margin: 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.progress {
  position: relative;
  height: 8px;
  margin: 24px 16px 8px;
  border-radius: 4px;
  background: var(--soft);
  overflow: hidden;
}

/* Indeterminate bar — there is no progress percentage (§3.6.2). */
.progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  border-radius: 4px;
  background: var(--accent);
  animation: indeterminate 1.4s ease-in-out infinite;
}

@keyframes indeterminate {
  0% {
    left: -45%;
  }
  100% {
    left: 100%;
  }
}

/* ── Author modal — the common modal with three input fields (design 112:16095, web_ui.md §3.8.8) ── */

.modal-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
  text-align: left;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-field-label {
  font-size: 12px;
  font-weight: 700;
}

.modal-field-input {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f1f1f3;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}

.modal-field-input:focus {
  outline: none;
  border-color: var(--ink-2);
  background: var(--surface);
}

.modal-error {
  margin: 12px 4px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--danger);
  text-align: left;
}

.modal-fields:not([hidden]) ~ .modal-buttons {
  flex-direction: column;
}

/* `Skip` — like text, not a button (design 112:16095). */
.btn-text {
  background: none;
  color: var(--muted);
  font-weight: 600;
}

.btn-text:hover {
  color: var(--ink);
}

/* DCC uses the same viewport and zoom controls as H1. */
.dcc-intro { padding: 48px; max-width: 620px; margin: auto; }
.dcc-upload-fields { border: 0; padding: 0; margin: 16px 0; }
.dcc-upload-fields label { display: grid; gap: 10px; margin: 20px 0; font-weight: 600; }
.dcc-upload-fields input { max-width: 100%; }
.dcc-upload-fields p, #dcc-results p { font-size: 13px; line-height: 1.5; }
#dcc-progress { width: 100%; margin-bottom: 12px; }
#dcc-overlay { display: block; }
#dcc-zones { position: absolute; inset: 0; pointer-events: none; }
.dcc-zone { position: absolute; border: 2px solid #c53030; background: #c5303012; color: #971b1b;
  pointer-events: auto; text-align: left; font-weight: bold; cursor: pointer; }
.dcc-zone.selected, .dcc-zone:focus-visible { border-color: #1b61b4; background: #1b61b433; outline: 2px solid #fff; }
#dcc-results { display: flex; flex-direction: column; gap: 16px; flex: 1 1 auto; min-height: 0; }
#dcc-results[hidden] { display: none; }
.dcc-zone-list { padding: 0; list-style: none; }
.dcc-zone-list button { width: 100%; padding: 12px; text-align: left; border: 1px solid #ddd; background: white; cursor: pointer; }
.dcc-zone-list button[aria-pressed="true"] { background: #edf4ff; border-color: #1b61b4; }
.dcc-downloads { display: grid; gap: 8px; margin-bottom: 16px; }
#dcc-view-controls .zoom-control { display: flex; align-items: center; gap: 8px; }

/* Keep H1's desktop sizing; the DCC workflow must remain reachable on narrow screens. */
@media (max-width: 900px) {
  html.h2-responsive, html.h2-responsive body { min-width: 0; }
  html.h2-responsive .gnb { flex-basis: auto; flex-wrap: wrap; height: auto; min-height: var(--header-h); gap: 8px; padding: 10px 12px; }
  html.h2-responsive .gnb-menu { position: static; left: auto; transform: none; flex: 1 0 100%; justify-content: space-between; gap: 8px; margin-left: 0; }
  html.h2-responsive .gnb-item { font-size: 12px; }
  html.h2-responsive .landing { padding: 24px 16px; overflow-y: auto; }
  html.h2-responsive .landing h1 { font-size: 24px; }
  html.h2-responsive .landing-cards { flex-direction: column; width: 100%; }
  html.h2-responsive .landing-card { width: 100%; }
  #stage-dcc { flex-direction: column; overflow-y: auto; }
  #stage-dcc .canvas-area { flex: 0 0 45vh; min-height: 260px; }
  #stage-dcc .side-panel { flex: 0 0 auto; width: 100%; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  #stage-dcc .panel-scroll { overflow-y: visible; }
  #dcc-view-controls { flex-wrap: wrap; left: 8px; right: 8px; }
  .dcc-intro { padding: 24px; }
}
.modal-checkbox-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.modal-checkbox-row .modal-field-label { margin: 0; }
.modal-field-checkbox { width: 16px; height: 16px; accent-color: var(--ink); }
