/* =====================================================================
   GT Dynamics — designer.css
   Gauge Designer app layout (Discord-style: rail · panel · stage ·
   inspector) and its unique pieces (bezel, stage, sim bar, tiles,
   layers). Shared UI comes from components.css. Tokens only.
   Owner: web-gauge-designer
   ===================================================================== */

/* ---------- 1. App frame (full height under the site header) ---------- */
.dz-body { height: 100vh; height: 100dvh; overflow: hidden; }
.dz-main { flex: 1 1 auto; min-height: 0; display: flex; }
.dz-app {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 64px var(--dz-panel-col, minmax(264px, 308px)) minmax(0, 1fr) minmax(248px, 288px);
  grid-template-rows: 48px minmax(0, 1fr);
  grid-template-areas: "top top top top" "rail panel stage insp";
  background: var(--bg-1);
}

/* ---------- 2. Top bar ---------- */
.dz-top {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-width: 0;
  padding: 0 var(--sp-3) 0 var(--sp-4);
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
}
.dz-top__name { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; flex: 1 1 auto; }
.dz-top__badge { flex-shrink: 0; }
.dz-name {
  min-width: 0;
  width: clamp(120px, 22vw, 280px);
  height: var(--sp-8);
  padding: 0 var(--sp-2);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  text-overflow: ellipsis;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.dz-name::placeholder { color: var(--text-4); }
.dz-name:hover { border-color: var(--line-2); }
.dz-name:focus, .dz-name:focus-visible { outline: none; border-color: var(--brand); background: var(--bg-2); box-shadow: 0 0 0 3px var(--brand-soft-2); }
.dz-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[lang="ja"] .dz-status { font-family: var(--font-body); letter-spacing: 0; text-transform: none; }
.dz-status__dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--ok); }
.dz-status[data-tone="busy"] .dz-status__dot { background: var(--text-3); animation: gtd-pulse calc(var(--dur-4) * 2) var(--ease) infinite; }
.dz-status[data-tone="warn"] .dz-status__dot { background: var(--warn); }
.dz-top__actions { display: flex; align-items: center; gap: var(--sp-1); flex-shrink: 0; }
.dz-top__sep { width: 1px; height: 20px; margin: 0 var(--sp-1); background: var(--line-2); }
.dz-insp-btn { display: none; }
/* Layers & package: hidden by default (2026-10-30), the top-bar button opens the column (> 1200 px) */
@media (min-width: 1201px) {
  .dz-app:not(.is-insp) {
    grid-template-columns: 64px var(--dz-panel-col, minmax(264px, 308px)) minmax(0, 1fr);
    grid-template-areas: "top top top" "rail panel stage";
  }
  .dz-app:not(.is-insp) .dz-insp { display: none; }
  .dz-insp-btn { display: inline-flex; }
  .dz-insp-btn[aria-pressed="true"] { border-color: var(--brand-line); background: var(--brand-soft); color: var(--text-1); }
}

/* ---------- 3. Rail (Discord server column) ---------- */
.dz-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  min-height: 0;
  padding: var(--sp-3) 0;
  border-right: 1px solid var(--line-1);
  background: var(--bg-0);
  overflow: visible;            /* keeps the right-side tooltips unclipped */
  scrollbar-width: none;
}
.dz-rail::-webkit-scrollbar { display: none; }
.dz-rail__btn {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--text-3);
  transition: border-radius var(--dur-2) var(--ease), background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.dz-rail__btn::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 4px;
  height: 0;
  border-radius: 0 4px 4px 0;
  background: var(--text-1);
  transform: translateY(-50%);
  transition: height var(--dur-2) var(--ease-out);
}
.dz-rail__btn:hover { border-radius: var(--r-lg); background: var(--bg-4); color: var(--text-1); }
.dz-rail__btn:hover::before { height: 16px; }
.dz-rail__btn[aria-selected="true"] { border-radius: var(--r-lg); background: var(--bg-5); color: var(--brand); }
.dz-rail__btn[aria-selected="true"]::before { height: 28px; background: var(--brand); }
.dz-rail__btn:focus-visible { outline-offset: 3px; }
.dz-rail__label { display: none; }
.dz-rail__num {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-family: var(--font-mono);
  font-size: calc(var(--fs-2xs) - 2px);
  line-height: 1;
  color: var(--text-4);
}

/* ---------- 4. Controls panel ---------- */
.dz-panel {
  grid-area: panel;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line-1);
  background: var(--bg-2);
}
.dz-panel__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 var(--sp-4) var(--sp-10); }
.dz-pane:focus-visible { outline: none; }
.dz-sec { padding: var(--sp-4) 0; border-bottom: 1px solid var(--line-1); }
.dz-sec:last-child { border-bottom: 0; }
/* a click on an element of the face opened this block (NS.reveal, 2026-11-06): a short brand flash */
.dz-sec.is-revealed, .dz-advgrp.is-revealed { border-radius: var(--r-md); animation: dz-reveal 1.6s ease-out; }
@keyframes dz-reveal {
  0%, 25% { background: var(--brand-soft-2); box-shadow: 0 0 0 var(--sp-2) var(--brand-soft-2); }
  100% { background: transparent; box-shadow: 0 0 0 var(--sp-2) transparent; }
}
@media (prefers-reduced-motion: reduce) { .dz-sec.is-revealed, .dz-advgrp.is-revealed { animation: none; } }
.dz-sec__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.dz-sec__title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-3);
}
.dz-sec__body { display: flex; flex-direction: column; gap: var(--sp-3); }
.dz-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.dz-ctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dz-ctl__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-height: 26px; }
.dz-ctl__label {
  min-width: 0;
  overflow: hidden;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* a switch row: label left, toggle right (.dz-ctl's column must not win over .check--between) */
.dz-ctl--check { flex-direction: row; align-items: center; min-height: 32px; font-size: var(--fs-sm); }
.dz-ctl--check .check__hint { max-width: 32ch; }
.dz-num { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.dz-num__input.input { width: 62px; height: 26px; padding: 0 6px; font-size: var(--fs-xs); text-align: right; }
.dz-num__unit { min-width: 1.4em; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-4); }
.dz-sub {
  margin: var(--sp-1) 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
}
.dz-hint { margin: 0; }
.dz-btnrow { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.dz-btnrow > .btn { flex: 1 1 auto; }
.dz-btnrow > .btn[aria-pressed="true"] { background: var(--bg-6); box-shadow: inset 0 0 0 1px var(--line-3); }
.dz-color .color-field { gap: 6px; }
.dz-color .color-input, .dz-zone__color { width: var(--sp-8); height: var(--sp-8); padding: 3px; }
.dz-color__accent { height: 24px; padding-inline: var(--sp-2); font-size: var(--fs-2xs); }
.dz-callout { padding: var(--sp-3); font-size: var(--fs-xs); }
.dz-callout .callout__title { font-size: var(--fs-xs); }
.dz-font-badge { margin: -2px 0 0; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ok); }
.dz-font-badge.is-extra { color: var(--warn); }
.dz-swatches { gap: var(--sp-2); }
.dz-drop.dropzone { padding: var(--sp-6) var(--sp-4); }

/* uploaded file row */
.dz-file { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg-1); }
.dz-file__thumb { flex-shrink: 0; width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; background: var(--bg-0); }
.dz-file__meta { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.dz-file__name { overflow: hidden; font-size: var(--fs-sm); color: var(--text-1); text-overflow: ellipsis; white-space: nowrap; }
.dz-file__info { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-3); }

/* style tiles (dial / needle) */
.dz-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.dz-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: var(--sp-2) var(--sp-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-1);
  color: var(--text-3);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.dz-tile:hover { border-color: var(--line-3); background: var(--bg-3); color: var(--text-1); }
.dz-tile[aria-checked="true"] { border-color: var(--brand-line); background: var(--brand-soft); color: var(--text-1); }
.dz-tile__cv { width: 100%; max-width: 72px; height: auto; aspect-ratio: 1; border-radius: 50%; background: var(--bg-0); }

/* zones */
.dz-zones { display: flex; flex-direction: column; gap: var(--sp-2); }
.dz-zone { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) var(--sp-8) var(--sp-8); align-items: center; gap: 6px; }
.dz-zone__dash { color: var(--text-4); }

/* templates + My designs */
.dz-tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.dz-tpl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  padding: var(--sp-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-1);
  text-align: left;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.dz-tpl:hover { border-color: var(--line-3); background: var(--bg-3); transform: translateY(-1px); }
.dz-tpl__cv { width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 4px; border-radius: 50%; background: var(--bg-0); }
.dz-tpl__name { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 600; color: var(--text-1); }
.dz-tpl__desc { font-size: var(--fs-2xs); line-height: 1.4; color: var(--text-3); }
.dz-saved-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.dz-saved { display: flex; align-items: center; gap: var(--sp-2); padding: 6px; border-radius: var(--r-md); transition: background-color var(--dur-1) var(--ease); }
.dz-saved:hover { background: var(--bg-3); }
.dz-saved.is-current { background: var(--bg-4); }
.dz-saved__thumb { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-0); }
.dz-saved__meta { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.dz-saved__name { overflow: hidden; font-size: var(--fs-sm); color: var(--text-1); text-overflow: ellipsis; white-space: nowrap; }
.dz-saved__date { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-3); }
.dz-empty { padding: var(--sp-6) var(--sp-2); }

/* ---------- 5. Stage ---------- */
.dz-stage { grid-area: stage; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-0); -webkit-user-select: none; user-select: none; }
/* lead: a drag that starts on the bezel must not paint a text selection across the panels */
.dz-stage__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
}
.dz-zoom { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg-2); }
.dz-zoom .btn { height: 26px; width: 26px; min-width: 26px; }
.dz-zoom__label { min-width: 44px; font-family: var(--font-mono); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; text-align: center; color: var(--text-2); }
.dz-stage__toggles { display: inline-flex; gap: 2px; }
.dz-stage__toggles .btn[aria-pressed="true"] { background: var(--bg-5); color: var(--brand); }
.dz-stage__coord { margin-left: auto; font-variant-numeric: tabular-nums; }

.dz-view {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--sp-4);
  overflow: hidden;
  background-image: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 7%, transparent), transparent), var(--dot-grid);
  background-size: 100% 100%, var(--grid-size) var(--grid-size);
  background-repeat: no-repeat, repeat;
}
.dz-view.is-zoomed { overflow: auto; }

/* device bezel: brushed metal ring + dark lip + glass glare (canvas inside) */
.dz-bezel {
  --dz-size: 400px;
  --dz-ring: calc(var(--dz-size) * 0.085);
  position: relative;
  flex-shrink: 0;
  width: calc(var(--dz-size) + var(--dz-ring) * 2);
  height: calc(var(--dz-size) + var(--dz-ring) * 2);
  margin: auto;
  padding: var(--dz-ring);
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--bg-6), var(--text-4), var(--bg-5), var(--text-3), var(--bg-6), var(--text-4), var(--bg-4), var(--text-3), var(--bg-6));
  box-shadow: var(--shadow-3), inset 0 1px 0 var(--line-3), inset 0 -2px 6px color-mix(in srgb, var(--bg-0) 60%, transparent);
}
.dz-bezel::before {
  content: "";
  position: absolute;
  inset: calc(var(--dz-ring) * 0.5);
  border-radius: 50%;
  background: var(--bg-0);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 1px color-mix(in srgb, var(--bg-0) 70%, transparent);
}
.dz-bezel::after {
  content: "";
  position: absolute;
  inset: var(--dz-ring);
  z-index: 2;
  border-radius: 50%;
  background: linear-gradient(155deg, color-mix(in srgb, var(--text-1) 7%, transparent), transparent 38%);
  pointer-events: none;
}
.dz-bezel.is-clean { --dz-ring: calc(var(--dz-size) * 0.02); background: transparent; box-shadow: none; }
.dz-bezel.is-clean::before { inset: calc(var(--dz-ring) - 1px); background: transparent; box-shadow: 0 0 0 1px var(--line-2); }
.dz-bezel.is-clean::after { display: none; }
.dz-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  border-radius: 50%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.dz-canvas:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.dz-view.is-dragging .dz-canvas { cursor: grabbing !important; }
.dz-drop-hint {
  position: absolute;
  inset: var(--sp-4);
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: 2px dashed var(--brand);
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--bg-0) 72%, transparent);
  color: var(--text-1);
  font-weight: 600;
  pointer-events: none;
}
.dz-view.is-drop .dz-drop-hint { display: flex; }
.dz-drop-one { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
/* J1: a picture → two drop zones (element on the face / background) */
.dz-drop-zones { display: none; width: 100%; height: 100%; gap: var(--sp-3); padding: var(--sp-3); }
.dz-view.is-drop-img .dz-drop-hint { border-color: transparent; background: color-mix(in srgb, var(--bg-0) 55%, transparent); pointer-events: auto; }
.dz-view.is-drop-img .dz-drop-one { display: none; }
.dz-view.is-drop-img .dz-drop-zones { display: flex; }
.dz-drop-zone {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-width: 0;
  padding: var(--sp-4);
  border: 2px dashed var(--line-3);
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--bg-0) 60%, transparent);
  text-align: center;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.dz-drop-zone[data-drop="element"] { flex-grow: 1.6; }
.dz-drop-zone .icon { color: var(--text-3); }
.dz-drop-zone strong { font-family: var(--font-display); font-size: var(--fs-md); color: var(--text-1); }
.dz-drop-zone span { font-size: var(--fs-xs); font-weight: 400; color: var(--text-3); }
.dz-drop-zone > * { pointer-events: none; }
.dz-drop-zone.is-over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--bg-0)); }
.dz-drop-zone.is-over .icon { color: var(--brand); }
@media (max-width: 720px) { .dz-drop-zones { flex-direction: column; } }

/* direct editing on the stage (designer-handles.js): selection frame, handles, smart guides,
   value tooltip — an SVG layer exactly over the canvas, allowed to reach outside the circle */
.dz-hd {
  position: absolute;
  inset: var(--dz-ring);
  z-index: 3;
  pointer-events: none;
}
.dz-hd__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.dz-hd__frame { fill: none; stroke: var(--brand); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dz-hd__frame.dz-hd__thin { stroke-width: 1; stroke-opacity: 0.55; }
.dz-hd__hover { fill: none; stroke: color-mix(in srgb, var(--text-1) 55%, transparent); stroke-width: 1; stroke-dasharray: 4 3; }
.dz-hd__dash { stroke-dasharray: 5 4; }
.dz-hd__guide { fill: none; stroke: var(--info); stroke-width: 1; }
.dz-hd__gap { fill: none; stroke: var(--info); stroke-width: 1.5; }
.dz-hd__h { pointer-events: all; touch-action: none; }
.dz-hd__hit { fill: transparent; stroke: none; }
.dz-hd__knob { fill: var(--bg-0); stroke: var(--brand); stroke-width: 1.5; transition: fill var(--dur-1) ease; }
.dz-hd__knob--rot { fill: var(--brand); stroke: var(--bg-0); }
.dz-hd__h:hover .dz-hd__knob, .dz-hd__h.is-active .dz-hd__knob { fill: var(--brand); }
.dz-hd__tip {
  position: absolute;
  top: 0; left: 0;
  padding: 2px var(--sp-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--bg-0) 88%, transparent);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
}
.dz-hd__tip[hidden] { display: none; }
.dz-view.is-resizing, .dz-view.is-resizing * { cursor: var(--dz-hd-cursor, grabbing) !important; }
html[data-perf="lite"] .dz-hd__knob { transition: none; }
@media (pointer: coarse) {
  .dz-hd__knob { stroke-width: 2; }
}
.dz-app.is-preview .dz-hd { display: none; }

/* sim bar */
.dz-sim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--line-1);
  background: var(--bg-1);
}
.dz-sim__name { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.dz-sim__range { flex: 1 1 160px; min-width: 120px; }
.dz-sim__readout { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 4px; min-width: 104px; }
.dz-sim__value { font-family: var(--font-mono); font-size: var(--fs-md); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-1); }
.dz-sim__unit { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-3); }
.dz-sim__btns { display: flex; align-items: center; gap: var(--sp-1); }
.dz-sim__btns .btn[aria-pressed="true"] { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand); }
.dz-sim__gear { min-width: 52px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 6. Inspector ---------- */
.dz-insp { grid-area: insp; min-width: 0; min-height: 0; overflow-y: auto; border-left: 1px solid var(--line-1); background: var(--bg-2); }
.dz-insp__inner { padding: var(--sp-1) var(--sp-3) var(--sp-8); }
#dz-insp-sheet-body .dz-insp__inner { padding: 0; }
.dz-insp__sec { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-1); }
.dz-insp__sec:last-child { border-bottom: 0; }
.dz-insp__title {
  margin: 0 0 var(--sp-2) var(--sp-1);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-3);
}
.dz-layers { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; list-style: none; }
.dz-layer { display: flex; align-items: center; gap: 2px; border-radius: var(--r-sm); transition: background-color var(--dur-1) var(--ease); }
.dz-layer:hover { background: var(--bg-4); }
.dz-layer.is-selected { background: var(--bg-5); box-shadow: inset 2px 0 0 var(--brand); }
.dz-layer__main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  height: 30px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-align: left;
}
.dz-layer__main .icon { width: 16px; height: 16px; color: var(--text-4); }
.dz-layer__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-layer.is-off .dz-layer__main { color: var(--text-4); }
.dz-layer .dz-layer__eye { width: 28px; height: 28px; min-width: 28px; color: var(--text-3); }
.dz-layer.is-off .dz-layer__eye { color: var(--text-4); }
.dz-datacard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-1);
  text-align: left;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.dz-datacard:hover { border-color: var(--line-3); background: var(--bg-3); }
.dz-datacard .kv { justify-content: space-between; width: 100%; }
.dz-export { display: flex; flex-direction: column; gap: var(--sp-3); }
.dz-files { display: flex; flex-direction: column; gap: 2px; margin: 0; font-family: var(--font-mono); font-size: var(--fs-2xs); }
.dz-files__row { display: flex; justify-content: space-between; gap: var(--sp-2); color: var(--text-3); }
.dz-files__row dt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-files__row dd { margin: 0; color: var(--text-2); white-space: nowrap; }
.dz-export__total { margin: 0; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-1); }
html[lang="ja"] .dz-export__total { font-family: var(--font-body); }
.dz-notes__list { margin: 4px 0 0; padding-left: 1.1em; font-size: var(--fs-xs); line-height: 1.5; }
.dz-notes__list li + li { margin-top: 4px; }
.dz-export__help { align-self: flex-start; font-size: var(--fs-xs); }
.dz-export__calc { font-family: var(--font-body); font-size: var(--fs-xs); vertical-align: baseline; }

/* ---------- 7. Modals content ---------- */
.dz-keys { display: flex; flex-direction: column; margin: 0; }
.dz-keys__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line-1); }
.dz-keys__row dt { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.dz-keys__row dd { margin: 0; font-size: var(--fs-sm); color: var(--text-2); text-align: right; }
.dz-keys__note { margin: var(--sp-3) 0 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--text-3); }
.dz-install__upload { margin-top: var(--sp-3); }
.dz-install__note { margin-top: var(--sp-6); }

/* JA: no caps / wide tracking on translated mono labels */
html[lang="ja"] :is(.dz-sec__title, .dz-insp__title, .dz-sub, .dz-font-badge) { font-family: var(--font-body); letter-spacing: 0.02em; text-transform: none; }
html[lang="ja"] :is(.dz-sec__title, .dz-insp__title) { font-size: var(--fs-xs); }

/* ---------- 8. Responsive ---------- */
@media (hover: none) { .dz-hide-touch { display: none; } }

/* ≤ 1200: inspector → bottom sheet */
@media (max-width: 1200px) {
  .dz-app {
    grid-template-columns: 64px var(--dz-panel-col, minmax(260px, 300px)) minmax(0, 1fr);
    grid-template-areas: "top top top" "rail panel stage";
  }
  .dz-insp { display: none; }
  .dz-insp-btn { display: inline-flex; }
}

/* ≤ 960: stage on top, tabs under it, panel below — page scrolls */
@media (max-width: 960px) {
  .dz-body { height: auto; overflow: visible; }
  .dz-main { display: block; }
  .dz-app { display: flex; flex-direction: column; }
  .dz-top { flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); }
  .dz-top__label { display: none; }
  .dz-stage { order: 1; }
  .dz-rail { order: 2; }
  .dz-panel { order: 3; border-right: 0; }
  .dz-view { flex: none; width: 100%; aspect-ratio: 1 / 1; padding: var(--sp-2); }
  .dz-rail {
    position: sticky;
    top: var(--header-h);
    z-index: 5;
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    border-right: 0;
    border-block: 1px solid var(--line-1);
    background: color-mix(in srgb, var(--bg-0) 92%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .dz-rail__btn {
    display: inline-flex;
    gap: var(--sp-2);
    width: auto;
    height: 38px;
    padding: 0 var(--sp-3);
    border-radius: var(--r-pill);
  }
  .dz-rail__btn:hover, .dz-rail__btn[aria-selected="true"] { border-radius: var(--r-pill); }
  .dz-rail__btn[aria-selected="true"] { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
  .dz-rail__btn::before, .dz-rail__num { display: none; }
  .dz-rail__btn .icon { width: 18px; height: 18px; }
  .dz-rail__label { display: inline; font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
  .dz-rail [data-tip]::after { display: none; }
  .dz-panel__body { overflow: visible; padding-bottom: var(--sp-12); }
}
@media (max-width: 480px) {
  .dz-top__name { flex: 1 1 100%; }
  .dz-name { width: auto; flex: 1 1 auto; }
  .dz-top__actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; }
  .dz-top__sep { display: none; }
  .dz-stage__coord { display: none; }
  .dz-view .coord { display: none; }
  .dz-sim { padding: var(--sp-3); }
  .dz-sim__readout { min-width: 0; }
  .dz-tiles { gap: 6px; }
}

/* lead: the sim bar (phones) and the device callouts (desktop) live at the bottom of the
   stage — show the designer's toasts at the top, under the app bar, at every width */
/* 2026-10-30: --dz-toast-top is measured under the (wrapping) top bar / sticky step rail — designer-app.js placeToasts() */
html[data-page="designer"] .toast-stack { top: var(--dz-toast-top, calc(var(--header-h) + var(--sp-12) + var(--sp-2))); bottom: auto; }

/* =====================================================================
   Phase 5 — device callouts on the stage (DESIGN.md §14), quality menu,
   device summary, Lite rules (DESIGN.md §13)
   ===================================================================== */
.dz-callouts { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.dz-callouts.is-compact .dz-co { display: none; }
.dz-co__lines { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.dz-co__line { fill: none; stroke: var(--line-3); stroke-width: 1; stroke-dasharray: 3 3; }
.dz-co__line--warn { stroke: color-mix(in srgb, var(--warn) 70%, transparent); }
.dz-co__line--unavailable { stroke: color-mix(in srgb, var(--danger) 70%, transparent); }
.dz-co__dot { fill: var(--bg-0); stroke: var(--info); stroke-width: 1.5; }
.dz-co__dot--warn { stroke: var(--warn); }
.dz-co__dot--unavailable { stroke: var(--danger); }

.dz-co {
  --co-c: var(--info);
  position: absolute;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--co-c);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg-1) 94%, transparent);
  box-shadow: var(--shadow-2);
  pointer-events: auto;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease-out), translate var(--dur-2) var(--ease);
  translate: 0 6px;
}
.dz-co.is-in { opacity: 1; translate: 0 0; }
.dz-co.is-out { opacity: 0; translate: 0 -4px; pointer-events: none; }
.dz-co[data-level="warn"] { --co-c: var(--warn); }
.dz-co[data-level="unavailable"] { --co-c: var(--danger); }
.dz-co--static { position: static; opacity: 1; translate: none; box-shadow: none; }
.dz-co__head { display: flex; align-items: center; gap: var(--sp-2); min-height: 24px; }
.dz-co__lvl { display: inline-flex; color: var(--co-c); }
.dz-co__el {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  color: var(--co-c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dz-co__close { margin: -4px -6px -4px 0; }
.dz-co__title { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-1); line-height: 1.35; }
.dz-co__text { margin: 0; font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; }
.dz-co__fix { align-self: flex-start; margin-top: var(--sp-1); }
.dz-co__more { position: absolute; top: 0; left: 0; pointer-events: auto; }

.dz-issues-badge {
  position: absolute;
  top: var(--sp-3);
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  gap: var(--sp-1);
  cursor: pointer;
}
.dz-issues-badge[hidden] { display: none; }
.dz-issues__lead { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); color: var(--text-2); }
.dz-issues__list { display: grid; gap: var(--sp-2); }
.dz-issues__none { margin: 0; color: var(--text-3); }

.dz-perf__menu { min-width: 280px; padding: var(--sp-3); }
.dz-perf__title { margin: 0 0 var(--sp-2); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.dz-perf__hint { margin: var(--sp-2) 0 0; font-size: var(--fs-2xs); color: var(--text-3); line-height: 1.5; }
.dz-perf .perf-switch__label { display: none; }

.dz-device { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.dz-device__lead { margin: 0; font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; }
.dz-device__issues { justify-self: start; gap: var(--sp-1); }

@media (prefers-reduced-motion: reduce) {
  .dz-co { transition: none; translate: none; }
}
/* Lite: solid panels, no blur / big shadows (same look, cheaper) */
html[data-perf="lite"] .dz-co { background: var(--bg-1); box-shadow: none; transition: none; translate: none; }
html[data-perf="lite"] .dz-rail { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg-0); }
html[data-perf="lite"] .dz-bezel { box-shadow: inset 0 0 0 1px var(--line-2); }

/* =====================================================================
   Phase 6 — Upload to gauge (WebSerial, GTD_FORMAT.md §11) and the
   "name on the gauge" hint (§10 label)
   ===================================================================== */
.dz-top__name { position: relative; }
.dz-name-hint {
  position: absolute;
  top: calc(100% + var(--sp-1));
  left: 0;
  z-index: 5;
  max-width: min(360px, calc(100vw - var(--sp-8)));
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  box-shadow: var(--shadow-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  line-height: 1.45;
  letter-spacing: 0.04em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-1) var(--ease), visibility 0s linear var(--dur-1);
}
.dz-name-hint.is-diff { border-left: 2px solid var(--info); color: var(--text-1); }
.dz-top__name:focus-within .dz-name-hint { opacity: 1; visibility: visible; transition: opacity var(--dur-1) var(--ease); }
html[lang="ja"] .dz-name-hint { font-family: var(--font-body); letter-spacing: 0; }

.dz-export__upload { margin-top: calc(var(--sp-1) * -1); }

.dz-up .modal__box { width: min(100%, 720px); }
.dz-up .modal__body { display: grid; gap: var(--sp-4); align-content: start; }
.dz-up__nosupport { margin: 0; }
.dz-up__pkg { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.dz-up__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-0);
  box-shadow: 0 0 0 1px var(--line-2), 0 0 0 4px var(--bg-2);
}
.dz-up__facts { display: grid; gap: var(--sp-2); min-width: 0; margin: 0; }
.dz-up__fact { display: grid; gap: 2px; min-width: 0; }
.dz-up__fact dt {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-3);
}
.dz-up__fact dd { margin: 0; color: var(--text-1); font-family: var(--font-mono); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.dz-up__label { font-weight: 600; letter-spacing: 0.06em; }
html[lang="ja"] .dz-up__fact dt { font-family: var(--font-body); letter-spacing: 0; text-transform: none; }

.dz-up__checklist {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + var(--sp-5));
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--bg-2);
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}
.dz-up__checklist li::marker { color: var(--brand); font-family: var(--font-mono); font-size: var(--fs-xs); }
.dz-up__checklist code { overflow-wrap: anywhere; }

.dz-up__progress { display: grid; gap: var(--sp-2); }
.dz-up__progress[hidden] { display: none; }
.dz-up__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); min-width: 0; }
.dz-up__phase { color: var(--text-1); font-size: var(--fs-sm); font-weight: 500; }
.dz-up__pct, .dz-up__meta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dz-up__pct { color: var(--brand); font-size: var(--fs-sm); }
.dz-up__meta { color: var(--text-3); font-size: var(--fs-2xs); }
.dz-up__bar {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--bg-5);
  box-shadow: inset 0 0 0 1px var(--line-1);
}
.dz-up__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand-glow);
  transition: width var(--dur-2) var(--ease);
}
.dz-up__bar.is-indeterminate .dz-up__fill { width: 32%; animation: dz-up-slide 1.2s var(--ease) infinite; }
@keyframes dz-up-slide { from { transform: translateX(-100%); } to { transform: translateX(320%); } }

.dz-up__result:empty, .dz-up__result[hidden] { display: none; }
.dz-up__result .callout { margin: 0; }
.dz-up__tech { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-3); }
.dz-up__tech summary { cursor: pointer; }
.dz-up__tech pre {
  max-height: 180px;
  margin: var(--sp-2) 0 0;
  padding: var(--sp-2) var(--sp-3);
  overflow: auto;
  border-radius: var(--r-sm);
  background: var(--bg-0);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dz-up__gauge { display: grid; gap: var(--sp-2); padding-top: var(--sp-4); border-top: 1px solid var(--line-1); min-width: 0; }
.dz-up__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.dz-up__title { margin: 0; font-size: var(--fs-md); }
.dz-up__dev, .dz-up__empty { margin: 0; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.5; }
.dz-up__list { min-width: 0; }
.dz-up__table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-sm); }
.dz-up__table :where(th, td) { padding: var(--sp-2) var(--sp-2); border-top: 1px solid var(--line-1); text-align: left; vertical-align: middle; }
.dz-up__table th {
  padding-block: var(--sp-1);
  border-top: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
html[lang="ja"] .dz-up__table th { font-family: var(--font-body); letter-spacing: 0; text-transform: none; }
.dz-up__table th:first-child, .dz-up__slot { width: 48px; }
.dz-up__table th:last-child, .dz-up__act { width: 288px; text-align: right; }
.dz-up__act-btns { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--sp-1); }
.dz-up__param { width: 84px; }
.dz-up__bytes { width: 84px; text-align: right; }
.dz-up__slot, .dz-up__bytes, .dz-up__param { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-2); }
.dz-up__name { color: var(--text-1); font-family: var(--font-mono); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.dz-up__table tr.is-mine .dz-up__name { color: var(--brand); }
.dz-up__confirm td { background: var(--danger-soft); }
.dz-up__confirm p { margin: 0 0 var(--sp-2); color: var(--text-1); font-size: var(--fs-sm); }
.dz-up__confirm-btns { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.dz-up__port { margin-right: auto; }
.dz-up .modal__foot [hidden] { display: none; }
/* Show on gauge / Gauge status (GTD_FORMAT.md §11.1) */
.dz-up__table tr.is-shown td { background: var(--info-soft); }
.dz-up__diag { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); min-width: 0; }
.dz-up__stat {
  min-width: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.dz-up__stat:empty { display: none; }
.dz-up__stat.is-error { color: var(--danger); font-family: var(--font-body); font-size: var(--fs-xs); }
/* Put it on the gauge (GTD+PAGES / GTD+PLACE, GTD_FORMAT.md §11.2) */
.dz-up__place[hidden], .dz-up__place:empty { display: none; }
.dz-up__place .callout { margin: 0; }
.dz-up__place-box {
  display: grid;
  gap: var(--sp-3);
  min-width: 0;
  padding: var(--sp-4);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.dz-up__place-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-3); min-width: 0; }
.dz-up__place-sub {
  min-width: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.dz-up__choices {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-height: min(320px, 46vh);
  margin: 0;
  padding: var(--sp-1);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background: var(--bg-1);
}
.dz-up__choice { display: flex; width: 100%; min-width: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-xs); }
.dz-up__choice:hover { background: var(--bg-3); }
.dz-up__choice:has(.radio:checked) { background: var(--brand-soft); color: var(--text-1); }
.dz-up__choice:has(.radio:focus-visible) { box-shadow: var(--ring); }
.dz-up__choice.is-off:hover { background: transparent; }
.dz-up__choice .check__text { min-width: 0; }
.dz-up__choice-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); min-width: 0; overflow-wrap: anywhere; }
.dz-up__place-params { margin: 0; color: var(--text-2); font-size: var(--fs-xs); line-height: 1.7; overflow-wrap: anywhere; }
.dz-up__pp {
  padding: 1px var(--sp-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: var(--bg-4);
  color: var(--text-1);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.dz-up__place-note { display: flex; align-items: center; gap: var(--sp-2); margin: 0; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.5; }
.dz-up__place-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
/* three row actions: icons only below 760 px (aria-label keeps the names) */
@media (max-width: 760px) {
  .dz-up__table th:last-child, .dz-up__act { width: 132px; }
  .dz-up__show-txt { display: none; }
}
@media (max-width: 480px) {
  .dz-up__table th:first-child, .dz-up__slot { width: 36px; }
  .dz-up__table th:last-child, .dz-up__act { width: 124px; }
  .dz-up__place-box { padding: var(--sp-3); }
  .dz-up__place-actions > .btn { flex: 1 1 auto; }
  .dz-up__show-txt { display: none; }
  .dz-up__param { display: none; }
  .dz-up__bytes { width: 72px; }
  .dz-up__pkg { gap: var(--sp-3); }
  .dz-up__thumb { width: 56px; height: 56px; }
  .dz-up .modal__foot > .btn { flex: 1 1 auto; }
  .dz-up__port { flex: 1 1 100%; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dz-up__fill { transition: none; }
  .dz-up__bar.is-indeterminate .dz-up__fill { animation: none; width: 100%; opacity: 0.4; }
}
html[data-perf="lite"] .dz-up__fill { box-shadow: none; }

/* =====================================================================
   2026-10-30 — step-by-step designer (ROADMAP §7): step plate + lead,
   Back / Next, rail ticks, Advanced, ⓘ tips, Data chips, Blank card,
   Preview step (parameter cards on the stage), browser gate
   ===================================================================== */
.dz-panel__step {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.dz-panel__lead { margin: 0; padding: var(--sp-3) var(--sp-4) 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--text-2); }
.dz-panel__lead:empty { display: none; }
.dz-panel__foot { justify-content: space-between; flex-shrink: 0; background: var(--bg-2); }
.dz-panel__foot [hidden] { display: none; }
.dz-step-next { margin-left: auto; min-width: 0; }
.dz-step-next [data-step-next] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* rail: number + "done" tick */
.dz-rail__done {
  position: absolute;
  top: -2px;
  right: -2px;
  display: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 2px solid var(--bg-0);
  border-radius: 50%;
  background: var(--ok);
  color: var(--bg-0);
}
.dz-rail__done .icon { width: 10px; height: 10px; stroke-width: 3; }
.dz-rail__btn.is-done .dz-rail__done { display: grid; }
.dz-rail__btn.is-done .dz-rail__num { color: var(--text-3); }

/* section title with ⓘ; label + ⓘ in a control row */
.dz-sec__title { display: inline-flex; align-items: center; gap: var(--sp-1); }
.dz-ctl__lw { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; }
.dz-ctl__lw .dz-ctl__label { flex: 0 1 auto; }
.dz-info {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--text-4);
  vertical-align: middle;
  transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.dz-info .icon { width: 14px; height: 14px; }
.dz-info:hover, .dz-info:focus-visible, .dz-info[aria-describedby] { color: var(--text-1); background: var(--bg-4); }
.dz-info[data-tip]::after { display: none; }     /* the fixed .dz-tipbox shows it instead */
.dz-tipbox {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-toast);
  width: max-content;
  max-width: min(280px, calc(100vw - var(--sp-4)));
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-6);
  box-shadow: var(--shadow-2);
  color: var(--text-1);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-1) var(--ease), visibility 0s linear var(--dur-1);
}
.dz-tipbox.is-on { opacity: 1; visibility: visible; transition: opacity var(--dur-1) var(--ease); }
.dz-lead-row { display: flex; align-items: center; gap: var(--sp-1); margin: var(--sp-4) 0 0; font-size: var(--fs-xs); color: var(--text-2); }

/* Advanced (accordion__item from components.css, compact) */
.dz-adv { border-top: 1px solid var(--line-1); border-bottom: 0; margin-top: var(--sp-1); }
.dz-adv > .dz-adv__head {
  padding: var(--sp-2) 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-3);
}
.dz-adv > .dz-adv__head:hover { color: var(--text-1); }
.dz-adv .accordion__icon { width: 22px; height: 22px; }
.dz-adv__body { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-1) 0 var(--sp-2); }
.dz-advgrp { display: flex; flex-direction: column; gap: var(--sp-3); }
html[lang="ja"] .dz-adv > .dz-adv__head { font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: 0.02em; text-transform: none; }

/* Data: parameter chips */
.dz-chips { gap: 6px; }
.dz-chip .icon { width: 14px; height: 14px; }
.dz-chips .chip[role="radio"][aria-checked="true"] { box-shadow: inset 0 0 0 1px var(--brand-line); }

/* Data: layout switch + value cells (.gtd v3.2, GTD_FORMAT §13) */
.dz-layouts > button { min-width: 0; padding-inline: var(--sp-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-cell-chip { gap: 6px; }
.dz-cell-chip__n {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--r-sm); background: var(--bg-1); color: var(--text-3);
  font-family: var(--font-mono); font-size: var(--fs-2xs); line-height: 1;
}
.dz-cell-chip[aria-checked="true"] .dz-cell-chip__n { background: var(--brand); color: var(--bg-0); }
.dz-cell-badge { flex: none; }
.dz-single[hidden] { display: none; }

/* Templates: Blank card */
.dz-tpl--blank { border-style: dashed; }
.dz-tpl__plus { display: inline-grid; place-items: center; margin-right: 4px; color: var(--brand); vertical-align: -2px; }
.dz-tpl__plus .icon { width: 14px; height: 14px; }

/* Templates: gallery (designer-gallery.js) — search, category chips, lazy thumbnails, param badge */
.dz-gal { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.dz-gal__bar { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.dz-gal__search { width: 100%; }
.dz-gal__search .input { width: 100%; }
.dz-gal__chips { gap: 6px; }
.dz-gal__chips .chip { padding-inline: 8px; }
.dz-gal__count { margin: 0; font-size: var(--fs-2xs); color: var(--text-3); }
.dz-gal .dz-tpl-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.dz-gal__chips + .dz-gal__chips { margin-top: -2px; }
.dz-tpl.is-current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.dz-tpl.is-current .dz-tpl__name { color: var(--brand); }
.dz-gal__empty { padding-block: var(--sp-4); }
.dz-tpl__thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; margin-bottom: 4px; border-radius: 50%; background: var(--bg-0); box-shadow: inset 0 0 0 1px var(--line-1); }
.dz-tpl__img, .dz-tpl__live { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.dz-tpl__img:not([src]) { visibility: hidden; }
.dz-tpl__badge { position: absolute; right: -2px; bottom: 0; pointer-events: none; box-shadow: 0 0 0 1px var(--bg-1); }
.dz-tpl__name { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .dz-tpl:hover { transform: none; } }

/* top bar: the main CTA */
.dz-upload-top { flex-shrink: 0; }
.dz-pv-reason { margin: calc(var(--sp-1) * -1) 0 0; color: var(--warn); }

/* Preview step: the stage shows a card per parameter instead of the single gauge */
.dz-stage__pv { display: none; }
.dz-app.is-preview .dz-stage__bar > :not(.dz-stage__pv) { display: none; }
.dz-app.is-preview .dz-stage__pv {
  display: inline;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-3);
}
html[lang="ja"] .dz-app.is-preview .dz-stage__pv { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: var(--fs-xs); }
.dz-app.is-preview :is(.dz-bezel, .dz-callouts, .dz-issues-badge, .dz-sim, .dz-view > .coord) { display: none; }
.dz-app.is-preview .dz-view { overflow: auto; }
.dz-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: var(--sp-4);
  width: 100%;
  min-width: 0;
  margin: auto;
  padding: var(--sp-2);
}
.dz-cards[hidden] { display: none; }
.dz-pcard {
  display: flex;
  flex: 0 1 var(--pc-w, 220px);   /* --pc-w: designer-preview.js fitCards() — bigger with 1–3 parameters */
  flex-direction: column;
  gap: var(--sp-2);
  width: var(--pc-w, auto);
  min-width: 148px;
  padding: var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.dz-pcard.is-current { border-color: var(--brand-line); }
.dz-pcard.is-missing { border-color: color-mix(in srgb, var(--warn) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); }
.dz-pcard.is-invalid { border-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.dz-pcard__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-height: 20px; }
.dz-pcard__name {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-1);
}
.dz-pcard__face { position: relative; aspect-ratio: 1; border-radius: 50%; background: var(--bg-0); box-shadow: 0 0 0 3px var(--bg-3), 0 0 0 4px var(--line-2); }
.dz-pcard__cv { display: block; width: 100%; height: 100%; border-radius: 50%; }
.dz-pcard__range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); align-items: end; }
.dz-pcard__field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dz-pcard__lbl { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
html[lang="ja"] .dz-pcard__lbl { font-family: var(--font-body); letter-spacing: 0; text-transform: none; }
.dz-pcard__field .input { width: 100%; min-width: 0; text-align: right; }
.dz-pcard__unit { grid-column: 1 / -1; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-4); text-align: right; }
.dz-pcard__unit:empty { display: none; }
.dz-pcard__msg { margin: 0; font-size: var(--fs-2xs); line-height: 1.4; color: var(--warn); }
.dz-pcard.is-invalid .dz-pcard__msg { color: var(--danger); }
.dz-pcard__msg[hidden] { display: none; }
/* per parameter (v3): Decimals · Linear / Split, zones (collapsed) */
.dz-pcard__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.dz-pcard__opts .select { width: 100%; min-width: 0; }
.dz-pcard__more { border-top: 1px solid var(--line-1); padding-top: var(--sp-1); }
.dz-pcard__sum { display: flex; align-items: center; gap: var(--sp-2); min-height: 28px; cursor: pointer; list-style: none; }
.dz-pcard__sum::-webkit-details-marker { display: none; }
.dz-pcard__sum:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
.dz-pcard__zsum { flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: var(--fs-2xs); color: var(--text-3); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.dz-pcard__sum .accordion__icon { width: 20px; height: 20px; }
.dz-pcard__more[open] .accordion__icon { transform: rotate(45deg); color: var(--text-1); }
.dz-pcard__morebody { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-2); }
.dz-pcard__mid[hidden] { display: none; }
.dz-pcard__mid .input { width: 100%; text-align: right; }
.dz-pcard__hint { margin: 0; font-size: var(--fs-2xs); line-height: 1.4; color: var(--text-3); }
.dz-pzone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px 28px; align-items: center; gap: 4px; }
.dz-pzone .input { min-width: 0; padding-inline: 6px; text-align: right; }
.dz-pzone__color { width: 28px; height: 28px; padding: 0; }
.dz-pcard__zbtns { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1); }
.dz-pv-size { margin-top: var(--sp-1); color: var(--text-3); }
html[data-perf="lite"] .dz-pcard { box-shadow: none; transition: none; }
.dz-up__locked { margin: 0; }
.dz-up__locked[hidden] { display: none; }

/* browser gate (not Chrome / Edge on a computer) */
.dz-gate { display: grid; flex: 1 1 auto; place-items: center; min-width: 0; padding: var(--sp-8) var(--sp-4); }
.dz-gate[hidden] { display: none; }
.dz-gate__box { width: min(100%, 600px); padding: var(--sp-12) var(--sp-6); }
.dz-gate__note { font-size: var(--fs-xs); color: var(--text-3); }
.dz-body.dz-gated { height: auto; min-height: 100vh; overflow: visible; }

@media (max-width: 960px) {
  .dz-panel__foot { position: sticky; bottom: 0; z-index: 4; }
  .dz-rail__num { display: inline; position: static; order: -1; font-size: var(--fs-2xs); color: var(--text-4); }
  .dz-rail__btn.is-done .dz-rail__done { position: static; display: inline-grid; width: 14px; height: 14px; border-width: 0; }
  .dz-app.is-preview .dz-view { flex: none; aspect-ratio: auto; min-height: 0; }
  .dz-cards { gap: var(--sp-3); padding: var(--sp-1); }
}
@media (max-width: 480px) {
  .dz-pcard { flex-basis: calc(50% - var(--sp-3)); padding: var(--sp-2); }
  .dz-upload-top { flex: 1 1 auto; }
}

/* ---------- Resizable controls panel (designer-resize.js, 2026-11-01) ---------- */
/* the panel column = --dz-panel-col (set by the splitter, 260…700 px); the stage follows (ResizeObserver) */
.dz-panel { position: relative; }
.dz-split {
  position: absolute;
  top: 0;
  right: -5px;
  bottom: 0;
  z-index: 6;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
  outline: none;
}
.dz-split::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: transparent;
  transition: background var(--dur-2) var(--ease);
}
.dz-split:hover::after, .dz-app.is-resizing .dz-split::after { background: var(--brand-line); }
.dz-split:focus-visible::after { background: var(--brand); }
.dz-app.is-resizing, .dz-app.is-resizing * { cursor: col-resize !important; -webkit-user-select: none; user-select: none; }
@media (hover: none) { .dz-split { right: -9px; width: 18px; } .dz-split::after { left: 8px; } }
@media (max-width: 960px) { .dz-split { display: none; } }
@media (prefers-reduced-motion: reduce) { .dz-split::after { transition: none; } }

/* ---------- "+ Add element" (designer-elements.js, 2026-11-01) ----------
   the button in the top right corner of the stage, the window with the catalog,
   "Elements on the face" in the Background step */
/* J2: Layers + "+ Add element" side by side in the top right corner of the stage */
.dz-fabs {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.dz-layers-fab {
  height: 36px;
  padding-inline: 10px 14px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-2);
  font-weight: 600;
}
.dz-layers-fab .btn__icon .icon { width: 18px; height: 18px; }
.dz-app.is-preview .dz-fabs { display: none; }
.dz-add-fab {
  height: 36px;
  padding-inline: 10px 14px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-2), 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent);
  font-weight: 600;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.dz-add-fab .btn__icon .icon { width: 18px; height: 18px; }
.dz-add-fab:hover { transform: translateY(-1px); box-shadow: var(--shadow-2), 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.dz-app.is-preview .dz-add-fab { display: none; }
@media (max-width: 720px) {
  .dz-add-fab, .dz-layers-fab { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .dz-add-fab__label { display: none; }
}

.dz-add .modal__box { width: min(100%, 960px); height: min(800px, calc(100dvh - var(--gutter) * 2)); }
.dz-add__head { align-items: flex-start; padding-bottom: var(--sp-3); }
.dz-add__mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-lg);
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.dz-add__heading { flex: 1 1 auto; min-width: 0; }
.dz-add__sub { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--text-3); }
.dz-add__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: 0 var(--sp-6) var(--sp-3);
  border-bottom: 1px solid var(--line-1);
}
.dz-add__search { flex: 1 1 200px; max-width: 300px; }
.dz-add__search .input { width: 100%; }
.dz-add__chips { gap: 6px; }
.dz-add__chips .chip { gap: 6px; padding-inline: 10px; }
.dz-add__chips .chip .icon { width: 14px; height: 14px; }
.dz-add__chips .chip[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--brand-line); }
.dz-add__count { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; color: var(--text-3); }
.dz-add__count.is-full { color: var(--warn); }
.dz-add__body { padding-top: var(--sp-5); }
.dz-add__grp + .dz-add__grp { margin-top: var(--sp-6); }
.dz-add__gh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--sp-3); margin-bottom: var(--sp-3); }
.dz-add__gt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-1);
}
.dz-add__gt .icon { width: 16px; height: 16px; color: var(--brand); }
.dz-add__gd { margin: 0; font-size: var(--fs-xs); color: var(--text-3); }
html[lang="ja"] .dz-add__gt { letter-spacing: 0.02em; text-transform: none; }
.dz-add__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
.dz-add__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  padding: var(--sp-2) var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.dz-add__card:hover { border-color: var(--brand-line); background: var(--bg-4); transform: translateY(-2px); }
.dz-add__card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.dz-add__card[data-state="on"] { border-color: color-mix(in srgb, var(--ok) 35%, var(--line-2)); }
.dz-add__card[aria-disabled="true"] { cursor: not-allowed; opacity: 0.55; }
.dz-add__card[aria-disabled="true"]:hover { border-color: var(--line-2); background: var(--bg-2); transform: none; }
.dz-add__thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 6px;
  border-radius: var(--r-md);
  background-color: var(--bg-1);
  background-image: var(--dot-grid);
  background-size: var(--grid-size) var(--grid-size);
}
.dz-add__cv {
  display: block;
  width: 80%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg-0);
  box-shadow: 0 0 0 1px var(--line-2), 0 8px 18px color-mix(in srgb, var(--bg-0) 55%, transparent);
}
.dz-add__plus {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.dz-add__plus .icon { width: 14px; height: 14px; }
.dz-add__card:hover .dz-add__plus, .dz-add__card:focus-visible .dz-add__plus { opacity: 1; transform: none; }
.dz-add__name { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 600; color: var(--text-1); overflow-wrap: anywhere; }
.dz-add__desc { font-size: var(--fs-2xs); line-height: 1.4; color: var(--text-3); }
.dz-add__state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 1px 8px 1px 6px;
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: 600;
}
.dz-add__state .icon { width: 12px; height: 12px; }
.dz-add__state--on { background: var(--ok-soft); color: var(--ok); }
.dz-add__state--na { background: var(--bg-4); color: var(--text-3); font-weight: 500; }
.dz-add__foot { gap: var(--sp-2) var(--sp-4); }
.dz-add__note, .dz-add__tip { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-xs); color: var(--text-3); }
.dz-add__note .icon { flex: none; width: 14px; height: 14px; color: var(--brand); }
@media (max-width: 720px) {
  .dz-add__bar { padding-inline: var(--sp-4); }
  .dz-add__search { max-width: none; flex-basis: 100%; }
  .dz-add__count { margin-left: 0; }
  .dz-add__grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: var(--sp-2); }
}
@media (prefers-reduced-motion: reduce) {
  .dz-add-fab, .dz-add__card, .dz-add__plus { transition: none; }
  .dz-add-fab:hover, .dz-add__card:hover { transform: none; }
}
html[data-perf="lite"] .dz-add__card, html[data-perf="lite"] .dz-add__plus { transition: none; }

/* Background step: Elements on the face */
.dz-el-sec .dz-sec__head { flex-wrap: wrap; }
.dz-el-count { margin-left: 4px; font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 400; font-variant-numeric: tabular-nums; color: var(--text-3); }
.dz-els { display: flex; flex-direction: column; gap: 1px; max-height: 236px; margin: 0; padding: 0; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.dz-el { display: flex; align-items: center; gap: 2px; border-radius: var(--r-sm); transition: background-color var(--dur-1) var(--ease); }
.dz-el:hover { background: var(--bg-4); }
.dz-el.is-selected { background: var(--bg-5); box-shadow: inset 2px 0 0 var(--brand); }
.dz-el__main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  height: 30px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-align: left;
}
.dz-el__main .icon { flex: none; width: 16px; height: 16px; color: var(--text-4); }
.dz-el.is-selected .dz-el__main .icon { color: var(--brand); }
.dz-el__name { flex: 1 1 auto; overflow: hidden; color: var(--text-1); text-overflow: ellipsis; white-space: nowrap; }
.dz-el__z { flex: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-4); }
.dz-el .btn { width: 28px; height: 28px; min-width: 28px; color: var(--text-3); }
.dz-el-props {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-1);
}
.dz-el-props__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.dz-el-props__name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 600; color: var(--text-1); }
.dz-el-props__name .icon { flex: none; width: 16px; height: 16px; color: var(--brand); }
.dz-el-props__name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-el-tools { display: inline-flex; flex: none; gap: 2px; }
.dz-el-empty { padding: var(--sp-4) var(--sp-2); }

/* ---------- J1: your pictures (designer-images.js, 2026-11-04) ---------- */
/* Add window: Upload image card (click → file picker, drop a file on it or anywhere in the window) */
.dz-add__card--upload { border-style: dashed; border-color: var(--brand-line); }
.dz-add__card--upload.is-drag { border-color: var(--brand); background: var(--brand-soft); }
.dz-add__card--upload.is-busy { cursor: progress; opacity: 0.7; }
.dz-add__drop { grid-auto-flow: row; align-content: center; gap: var(--sp-1); color: var(--brand); }
.dz-add__drop .icon { width: 26px; height: 26px; }
.dz-add__dropt { padding-inline: var(--sp-2); font-size: var(--fs-2xs); font-weight: 600; text-align: center; color: var(--text-3); }
.dz-add__card--upload .dz-add__state:not(.dz-add__state--na) { background: var(--bg-4); color: var(--text-3); font-family: var(--font-mono); font-weight: 500; }
/* the picture in its properties: a checkerboard shows its transparent parts */
.dz-img-file__thumb {
  object-fit: contain;
  background-color: var(--bg-3);
  background-image: linear-gradient(45deg, var(--bg-5) 25%, transparent 25%, transparent 75%, var(--bg-5) 75%), linear-gradient(45deg, var(--bg-5) 25%, transparent 25%, transparent 75%, var(--bg-5) 75%);
  background-position: 0 0, 5px 5px;
  background-size: 10px 10px;
}
.dz-el-head { display: inline-flex; align-items: center; gap: var(--sp-1); }
.dz-el.is-off .dz-el__name, .dz-el.is-off .dz-el__main .icon { color: var(--text-4); }
.dz-rmbg { gap: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--line-1); }
.dz-rmbg__row { display: flex; align-items: center; gap: var(--sp-2); }
.dz-rmbg__color { flex: none; width: var(--sp-8); height: var(--sp-8); padding: 3px; }
.dz-rmbg__tol { flex: 1 1 auto; min-width: 60px; }
.dz-rmbg__out { flex: none; min-width: 40px; font-family: var(--font-mono); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; text-align: right; color: var(--text-3); }
.dz-rmbg .btn.is-loading { pointer-events: none; opacity: 0.6; }

/* Crop editor (dialog #dz-crop) */
.dz-crop .modal__box { width: min(100%, 820px); }
.dz-crop__body { display: flex; flex-direction: column; gap: var(--sp-3); }
.dz-crop__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); }
.dz-crop__size { font-family: var(--font-mono); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--text-3); }
.dz-crop__wrap {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background-color: var(--bg-1);
  background-image: var(--dot-grid);
  background-size: var(--grid-size) var(--grid-size);
  overflow: hidden;
}
.dz-crop__stage {
  position: relative;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  background-color: var(--bg-3);
  background-image: linear-gradient(45deg, var(--bg-5) 25%, transparent 25%, transparent 75%, var(--bg-5) 75%), linear-gradient(45deg, var(--bg-5) 25%, transparent 25%, transparent 75%, var(--bg-5) 75%);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
}
.dz-crop__cv { display: block; }
.dz-crop__box {
  position: absolute;
  box-sizing: border-box;
  border: 1.5px solid var(--brand);
  box-shadow: 0 0 0 9999px color-mix(in srgb, var(--bg-0) 62%, transparent);
  cursor: move;
  touch-action: none;
}
.dz-crop__box:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.dz-crop__thirds {
  --dz-third: color-mix(in srgb, var(--text-1) 35%, transparent);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), var(--dz-third) 0, var(--dz-third) calc(33.33% + 0.5px), transparent 0, transparent calc(66.66% - 0.5px), var(--dz-third) 0, var(--dz-third) calc(66.66% + 0.5px), transparent 0),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), var(--dz-third) 0, var(--dz-third) calc(33.33% + 0.5px), transparent 0, transparent calc(66.66% - 0.5px), var(--dz-third) 0, var(--dz-third) calc(66.66% + 0.5px), transparent 0);
}
.dz-crop__h {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 1.5px solid var(--brand);
  border-radius: 2px;
  background: var(--bg-0);
}
.dz-crop__h::after { content: ""; position: absolute; inset: -8px; }   /* a bigger target than it looks */
.dz-crop__h--nw { left: 0; top: 0; cursor: nwse-resize; }
.dz-crop__h--n { left: 50%; top: 0; cursor: ns-resize; }
.dz-crop__h--ne { left: 100%; top: 0; cursor: nesw-resize; }
.dz-crop__h--e { left: 100%; top: 50%; cursor: ew-resize; }
.dz-crop__h--se { left: 100%; top: 100%; cursor: nwse-resize; }
.dz-crop__h--s { left: 50%; top: 100%; cursor: ns-resize; }
.dz-crop__h--sw { left: 0; top: 100%; cursor: nesw-resize; }
.dz-crop__h--w { left: 0; top: 50%; cursor: ew-resize; }
@media (pointer: coarse) { .dz-crop__h { width: 18px; height: 18px; margin: -9px 0 0 -9px; } }
.dz-crop__hint { margin: 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--text-3); }
.dz-crop__btns { display: inline-flex; gap: var(--sp-2); }

/* ---------- J2: Layers panel (designer-layers.js) — inspector column / sheet ---------- */
.dz-lp { position: relative; display: flex; flex-direction: column; gap: var(--sp-1); -webkit-user-select: none; user-select: none; }
.dz-lp__head { margin-bottom: 2px; }
.dz-lp__hint { margin: 0 0 0 var(--sp-1); font-size: var(--fs-2xs); color: var(--text-3); }
.dz-lp__fix { border-radius: var(--r-sm); background: var(--bg-1); }
.dz-lp__fixrow {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 34px;
  padding: 4px var(--sp-2);
  border-radius: var(--r-sm);
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
}
.dz-lp__fixrow::-webkit-details-marker { display: none; }
.dz-lp__fixrow:hover { background: var(--bg-4); }
.dz-lp__fixrow:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.dz-lp__lock { display: inline-grid; flex: none; place-items: center; width: 16px; color: var(--text-4); }
.dz-lp__lock .icon { width: 14px; height: 14px; }
.dz-lp__fixtext { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; line-height: 1.25; }
.dz-lp__fixname { overflow: hidden; font-size: var(--fs-sm); font-weight: 600; color: var(--text-1); text-overflow: ellipsis; white-space: nowrap; }
.dz-lp__fixnote { overflow: hidden; font-size: var(--fs-2xs); color: var(--text-3); text-overflow: ellipsis; white-space: nowrap; }
.dz-lp__chev { display: inline-grid; flex: none; place-items: center; color: var(--text-4); transition: transform var(--dur-1) var(--ease); }
.dz-lp__fix[open] .dz-lp__chev { transform: rotate(180deg); }
.dz-lp__parts { padding: 0 0 var(--sp-1) var(--sp-5); }
.dz-lp__grp { padding: var(--sp-1) 0; border-radius: var(--r-sm); transition: background-color var(--dur-1) var(--ease); }
.dz-lp__grp.is-target { background: var(--brand-soft); }
.dz-lp__gh { display: flex; align-items: baseline; gap: var(--sp-2); padding: 2px var(--sp-2) 4px; }
.dz-lp__gt { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--brand); }
.dz-lp__gd { flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: var(--fs-2xs); color: var(--text-3); text-overflow: ellipsis; white-space: nowrap; }
.dz-lp__n { font-family: var(--font-mono); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; color: var(--text-4); }
html[lang="ja"] .dz-lp__gt { font-family: var(--font-body); letter-spacing: 0.02em; text-transform: none; }
.dz-lp__list { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; list-style: none; }
.dz-lp__empty {
  padding: var(--sp-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-2xs);
  text-align: center;
  color: var(--text-4);
}
.dz-lp__el { position: relative; }
.dz-lp__grip {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 30px;
  color: var(--text-4);
  cursor: grab;
  touch-action: none;
}
.dz-lp__grip .icon { width: 16px; height: 16px; }
.dz-lp__el:hover .dz-lp__grip { color: var(--text-2); }
.dz-lp__el .dz-layer__main { padding-left: 2px; }
.dz-lp__el.is-selected .dz-layer__main .icon { color: var(--brand); }
.dz-lp__el.is-dragging { opacity: 0.35; }
.dz-lp__mv { width: 24px; height: 28px; min-width: 24px; color: var(--text-4); }
.dz-lp__mv:hover:not(:disabled) { color: var(--text-1); }
.dz-lp__mv:disabled { opacity: 0.3; }
@media (pointer: coarse) { .dz-lp__grip { width: 32px; height: 40px; } .dz-lp__mv { width: 32px; height: 36px; min-width: 32px; } }
.dz-lp.is-sorting, .dz-lp.is-sorting * { cursor: grabbing !important; }
.dz-lp__ghost {
  position: absolute;
  top: 0;
  z-index: 3;
  margin: 0;
  border: 1px solid var(--brand-line);
  border-radius: var(--r-sm);
  background: var(--bg-5);
  box-shadow: var(--shadow-2);
  opacity: 0.95;
  pointer-events: none;
}
.dz-lp__ind {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 4;
  height: 2px;
  border-radius: 1px;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
  pointer-events: none;
}
.dz-lp__ind[hidden] { display: none; }
.dz-lp__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-2); }
.dz-lp__count { font-family: var(--font-mono); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; color: var(--text-4); }
@media (prefers-reduced-motion: reduce) { .dz-lp__chev, .dz-lp__grp, .dz-drop-zone { transition: none; } }
html[data-perf="lite"] .dz-lp__chev, html[data-perf="lite"] .dz-lp__grp { transition: none; }

/* ---------- My designs in the account (accounts stage 1, designer-cloud.js) ---------- */
.dz-cloud { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.dz-cloud .callout { margin: 0; }
.dz-cloud__callout .callout__actions { margin-top: var(--sp-2); }
.dz-cloud__aside { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; }
.dz-cloud__count { font-family: var(--font-mono); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; color: var(--text-3); white-space: nowrap; }
.dz-cloud__count.is-full { color: var(--warn); }
.dz-my:focus { outline: none; }
.dz-my:focus-visible { outline: 2px solid var(--brand-line); outline-offset: 2px; border-radius: var(--r-md); }

/* the line under Save: saving… / in your account / changed / failed + Retry */
.dz-cloud__state {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-1) var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--bg-2);
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--text-2);
}
.dz-cloud__state[data-tone="ok"] .dz-cloud__stateicon { color: var(--ok); }
.dz-cloud__state[data-tone="info"] .dz-cloud__stateicon { color: var(--text-3); }
.dz-cloud__state[data-tone="busy"] .dz-cloud__stateicon { color: var(--brand); }
.dz-cloud__state[data-tone="warn"] { border-color: var(--warn-soft); background: var(--warn-soft); color: var(--text-1); }
.dz-cloud__state[data-tone="warn"] .dz-cloud__stateicon { color: var(--warn); }
.dz-cloud__stateicon { display: inline-flex; flex: none; align-items: center; height: 1.45em; }
.dz-cloud__stateicon .spinner { width: 12px; height: 12px; border-width: 2px; }
.dz-cloud__statetext { flex: 1 1 14ch; min-width: 0; }
.dz-cloud__stateacts { display: inline-flex; flex: none; gap: var(--sp-2); margin-left: auto; }
.dz-cloud__stateacts .btn { min-height: 0; padding-block: 0; }
.dz-cloud__tech { flex: 1 1 100%; min-width: 0; margin-top: 0; }
.dz-cloud__hint { margin: calc(var(--sp-1) * -1) 0 0; }
.dz-cloud__stale { margin: 0; color: var(--warn); }

/* account cards (same rows as the local list) */
img.dz-saved__thumb { object-fit: cover; }
.dz-saved--cloud.is-busy { opacity: 0.72; }
.dz-saved--cloud.is-current .dz-saved__name { color: var(--brand); }

/* loading skeleton */
.dz-cloud__skel .dz-saved:hover { background: transparent; }
.dz-cloud__skel .dz-saved__meta { gap: 6px; }
.dz-skel {
  display: block;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--bg-3) 0%, var(--bg-5) 50%, var(--bg-3) 100%) 0 0 / 200% 100%;
  animation: dz-skel 1.4s linear infinite;
}
.dz-saved__thumb.dz-skel { border-radius: 50%; }
.dz-skel--name { width: 58%; height: 12px; }
.dz-skel--date { width: 34%; height: 9px; }
@keyframes dz-skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* signed in: the designs that are only in this browser */
.dz-cloud__localdet { margin-top: var(--sp-2); }
.dz-cloud__localdet > summary { width: max-content; max-width: 100%; font-size: var(--fs-xs); color: var(--text-2); cursor: pointer; }
.dz-cloud__localdet > summary:hover { color: var(--text-1); }
.dz-cloud__localdet[open] > summary { margin-bottom: var(--sp-2); }
.dz-cloud__localdet .dz-saved:hover { background: var(--bg-4); }

/* conflict window */
.dz-cc__text { margin: 0 0 var(--sp-4); color: var(--text-1); }
.dz-cc__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.dz-cc__pair[hidden] { display: none; }
.dz-cc__side { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); min-width: 0; margin: 0; padding: var(--sp-3); border: 1px solid var(--line-1); border-radius: var(--r-md); background: var(--bg-2); }
.dz-cc__thumb { display: block; width: 96px; height: 96px; border-radius: 50%; background: var(--bg-0); object-fit: cover; }
.dz-cc__side figcaption { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; font-size: var(--fs-xs); color: var(--text-3); }
.dz-cc__side figcaption strong { color: var(--text-1); font-weight: 600; }
.dz-cc__hint { margin: 0; }
.dz-cc__hint[hidden] { display: none; }

/* move window */
.dz-mv__lead { margin: 0 0 var(--sp-3); color: var(--text-1); }
.dz-mv__list { max-height: min(40vh, 320px); margin-bottom: var(--sp-3); overflow-y: auto; }
.dz-mv__item:hover { background: transparent; }
.dz-mv__st { display: inline-flex; flex: none; color: var(--text-4); }
.dz-mv__item[data-status="busy"] .dz-mv__st { color: var(--brand); animation: gtd-spin var(--dur-4) linear infinite; }
.dz-mv__item[data-status="ok"] .dz-mv__st { color: var(--ok); }
.dz-mv__item[data-status="skip"] .dz-mv__st { color: var(--text-3); }
.dz-mv__item[data-status="fail"] .dz-mv__st, .dz-mv__item[data-status="fail"] .dz-saved__date { color: var(--danger); }
.dz-mv__progress { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.dz-mv__progress[hidden] { display: none; }
.dz-mv__result:empty { display: none; }
.dz-mv__result .callout { margin: 0 0 var(--sp-3); }
.dz-mv__ask { margin-top: var(--sp-2); }
.dz-mv__note { margin: 0; }

/* ≤ 960 px: hidden tooltips ([data-tip]::after, centred under a button at the right edge — "Fit · R" of the
   stage bar, longer in JA) widened the page: 369 px at 360 (web-qa 2026-11-05). Clip sideways only (no scroll
   container, sticky still works); touch has no hover */
@media (max-width: 960px) {
  .dz-app { overflow-x: clip; }
}

/* ---------- Public library (accounts stage 2, designer-library.js) ---------- */
/* the editor's block in My designs: Publish · Published ♥ N · used N · Changed since published */
.dz-lib {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
  padding: var(--sp-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.dz-lib__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.dz-lib__title { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.dz-lib__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); min-width: 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-2); }
.dz-lib__state .badge .icon { width: 12px; height: 12px; }
.dz-lib__stats { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.dz-lib__changed { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); }
.dz-lib__changed::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dz-lib__acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-width: 0; }
.dz-lib__unpub { color: var(--text-3); }
.dz-lib__unpub:hover { color: var(--danger); }
.dz-lib__checking { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); }
.dz-lib__checking .spinner { width: 12px; height: 12px; border-width: 2px; }
.dz-lib__hint, .dz-lib__note, .dz-lib__err { margin: 0; }
.dz-lib__err { color: var(--warn); }
.dz-lib__err .btn { min-height: 0; padding-block: 0; }

/* cards: a line under the date, the globe button */
.dz-saved__pub { overflow: hidden; font-family: var(--font-mono); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; color: var(--brand); text-overflow: ellipsis; white-space: nowrap; }
.dz-saved__pub[data-tone="warn"] { color: var(--warn); }
.dz-saved__pub[data-tone="hidden"] { color: var(--text-3); }
.dz-saved__lib.is-published { color: var(--brand); }

/* the Publish window */
.dz-pub__body { display: flex; flex-direction: column; gap: var(--sp-4); }
.dz-pub__top { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.dz-pub__thumb { display: block; flex: none; width: 112px; height: 112px; border-radius: 50%; background: var(--bg-0); object-fit: cover; box-shadow: 0 0 0 1px var(--line-2); }
.dz-pub__intro { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.dz-pub__lead { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
.dz-pub__state[hidden], .dz-pub__loading[hidden] { display: none; }
.dz-pub__loading { display: inline-flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-xs); color: var(--text-3); }
.dz-pub__loading .spinner { width: 12px; height: 12px; border-width: 2px; }
.dz-pub__view { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: var(--fs-xs); color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.dz-pub__view:hover { color: var(--text-1); }
.dz-pub__msg:empty { display: none; }
.dz-pub__msg .callout { margin: 0; }
.dz-pub__count { color: var(--text-3); }
.dz-pub__desc { min-height: 84px; }
.dz-pub__tags { gap: 6px; }
.dz-pub__rightsf { gap: var(--sp-1); }
/* "In the library:" — the avatar + public name as everyone sees them */
.dz-pub__as { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: var(--sp-2) var(--sp-3); border: 1px dashed var(--line-2); border-radius: var(--r-md); font-size: var(--fs-sm); }
.dz-pub__aslabel { flex: none; font-size: var(--fs-xs); color: var(--text-3); }
.dz-pub__asav { display: inline-flex; flex: none; }
.dz-pub__asname { overflow: hidden; min-width: 0; color: var(--text-1); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dz-pub__warnhint { color: var(--warn); }
.dz-pub__warnhint[hidden] { display: none; }
.dz-pub__rules { margin: 0; }
.dz-pub__rules a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.dz-pub__rules a:hover { color: var(--text-1); }
.dz-pub__foot { flex-wrap: wrap; }
.dz-pub__foot .dz-pub__unpub { margin-right: auto; color: var(--text-3); }
.dz-pub__foot .dz-pub__unpub:hover { color: var(--danger); }
.dz-pub__foot [hidden] { display: none; }

@media (max-width: 560px) {
  .dz-cc__foot > .btn, .dz-mv__foot > .btn { flex: 1 1 100%; }
  .dz-cc__thumb { width: 72px; height: 72px; }
  .dz-pub__top { align-items: flex-start; }
  .dz-pub__thumb { width: 80px; height: 80px; }
  .dz-pub__foot > .btn { flex: 1 1 100%; }
  .dz-pub__foot .dz-pub__unpub { margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dz-skel, .dz-mv__item[data-status="busy"] .dz-mv__st { animation: none; }
}
html[data-perf="lite"] .dz-skel { animation: none; }
