/* ===== base.css — фундамент Детектив-Квеста ===== */
:root {
  --dt-bg: #17141f;
  --dt-bg2: #221d2f;
  --dt-panel: #262033;
  --dt-panel2: #2e2740;
  --dt-line: #3d3452;
  --dt-text: #ece4d4;
  --dt-muted: #a99d8a;
  --dt-gold: #e8a33d;
  --dt-gold2: #c9882a;
  --dt-paper: #f3e9d2;
  --dt-paper2: #e6d7b8;
  --dt-ink: #2b2318;
  --dt-red: #c0392b;
  --dt-green: #2e8b57;
  --dt-blue: #4a7fb5;
  --dt-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --dt-radius: 16px;
  --dt-font: 'Comfortaa', 'Comic Sans MS', cursive, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--dt-font);
  background: var(--dt-bg);
  color: var(--dt-text);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Фоновая сцена */
.dt-bg {
  position: fixed;
  inset: 0;
  background: url('../img/main-bg.jpg') center / cover no-repeat;
  z-index: -2;
}
.dt-bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 20, 31, .82), rgba(23, 20, 31, .93) 55%, rgba(23, 20, 31, .97));
  z-index: -1;
}

#dt-main { flex: 1 0 auto; width: 100%; }

/* Футер — всегда у низа */
.dt-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  color: var(--dt-muted);
  font-size: clamp(.72rem, 2.4vw, .85rem);
}

/* ===== Экраны ===== */
.screen { display: none; padding: 8px 12px 24px; max-width: 1180px; margin: 0 auto; width: 100%; }
.screen-active { display: block; animation: screenIn .35s ease; }

/* ===== HUD ===== */
.dt-hud {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(23, 20, 31, .9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--dt-line);
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.hud-chip {
  background: var(--dt-panel2);
  border: 1px solid var(--dt-line);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: clamp(.72rem, 2.6vw, .82rem);
  white-space: nowrap;
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}
.hud-score { color: var(--dt-gold); font-weight: 700; }
.hud-btn {
  background: var(--dt-panel2);
  border: 1px solid var(--dt-line);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  font-size: 1.05rem;
  color: var(--dt-text);
  cursor: pointer;
  touch-action: manipulation;
}
.hud-btn:active { transform: translateY(2px); }
.hud-exit { margin-left: auto; }
.hud-bump { animation: scoreBump .5s ease; }

/* ===== Кнопки ===== */
.btn {
  font-family: var(--dt-font);
  border: none;
  border-radius: 14px;
  padding: 13px 22px;
  min-height: 46px;
  font-size: clamp(.9rem, 3vw, 1rem);
  font-weight: 700;
  cursor: pointer;
  color: var(--dt-ink);
  background: var(--dt-paper);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  touch-action: manipulation;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(2px) scale(.99); }
.btn-primary {
  background: linear-gradient(135deg, var(--dt-gold), var(--dt-gold2));
  color: #241a08;
  box-shadow: 0 6px 18px rgba(232, 163, 61, .28);
}
.btn-danger {
  background: linear-gradient(135deg, #d9534f, var(--dt-red));
  color: #fff;
  box-shadow: 0 6px 18px rgba(192, 57, 43, .3);
}
.btn-info { background: #cfd8dc; color: #1c2a33; }
.btn-ghost {
  background: var(--dt-panel);
  color: var(--dt-text);
  border: 1.5px solid var(--dt-line);
}
.btn-ghost:hover { border-color: var(--dt-gold); color: var(--dt-gold); }
.btn-xl { padding: 16px 30px; font-size: clamp(1rem, 3.6vw, 1.15rem); }
.btn-sm { padding: 8px 14px; min-height: 40px; font-size: .82rem; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-link {
  background: none;
  border: none;
  color: var(--dt-gold);
  text-decoration: underline;
  cursor: pointer;
  font-family: var(--dt-font);
  font-size: .88rem;
  padding: 8px;
  min-height: 44px;
}
.row { display: flex; }
.row.center { justify-content: center; align-items: center; }
.gap-md { gap: 14px; }
.wrap { flex-wrap: wrap; }
.mt-md { margin-top: 16px; }
.muted { color: var(--dt-muted); }
.small { font-size: .82em; }
.w-full { width: 100%; }

/* ===== Модалки ===== */
.dt-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 8, 15, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalIn .25s ease;
}
.dt-modal-card {
  width: min(560px, 94vw);
  max-height: 86dvh;
  overflow-y: auto;
  background: var(--dt-paper);
  color: var(--dt-ink);
  border-radius: var(--dt-radius);
  box-shadow: var(--dt-shadow);
  animation: bounceIn .4s ease;
}
.dt-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px 8px;
}
.dt-modal-head h3 { margin: 0; font-size: clamp(1.05rem, 4vw, 1.25rem); }
.dt-modal-x {
  border: none;
  background: var(--dt-ink);
  color: var(--dt-paper);
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: manipulation;
}
.dt-modal-body { padding: 6px 18px 20px; }
.dt-modal-body p { margin: 8px 0; }

/* ===== Тосты ===== */
#dt-toasts {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(430px, 92vw);
  pointer-events: none;
}
.dt-toast {
  background: var(--dt-panel2);
  border: 1px solid var(--dt-line);
  border-left: 5px solid var(--dt-gold);
  color: var(--dt-text);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: .88rem;
  box-shadow: var(--dt-shadow);
  animation: toastIn .3s ease;
  transition: opacity .4s ease, transform .4s ease;
}
.dt-toast-ok { border-left-color: var(--dt-green); }
.dt-toast-err { border-left-color: var(--dt-red); }
.dt-toast-out { opacity: 0; transform: translateY(-8px); }

/* ===== FX-слой ===== */
#fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 400;
  overflow: hidden;
}
.fx-confetti {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  opacity: .95;
  animation: confettiFall linear forwards;
}
.fx-float {
  position: absolute;
  font-weight: 700;
  font-size: 1.15rem;
  transform: translate(-50%, -50%);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
  animation: floatUp 1.15s ease forwards;
  pointer-events: none;
}
.fx-stamp {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-14deg) scale(3);
  font-size: clamp(1.6rem, 7vw, 3rem);
  font-weight: 700;
  color: var(--dt-red);
  border: 6px solid var(--dt-red);
  border-radius: 14px;
  padding: 10px 26px;
  background: rgba(243, 233, 210, .88);
  letter-spacing: .06em;
  animation: stampIn .5s cubic-bezier(.2, 2.2, .4, 1) forwards;
  pointer-events: none;
}

/* ===== Движки задач ===== */
.pz-host { margin-top: 12px; }
.pz-wrap { display: flex; flex-direction: column; gap: 14px; }
/* Контейнеры движков без wrap(): кнопка «Проверить» не должна прилипать к полям */
.pz-numin, .pz-hl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.pz-numin .pz-cipher-line, .pz-hl .pz-hl-grid { width: 100%; }
.pz-error { color: #ff9e9e; padding: 10px; }
.pz-host.pz-ok { animation: bounceIn .45s ease; }
.pz-host.pz-bad { animation: shake .4s ease; }

.pz-options { display: grid; gap: 10px; }
.pz-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pz-cols-1 { grid-template-columns: 1fr; }
.pz-option {
  font-family: var(--dt-font);
  text-align: left;
  background: var(--dt-panel);
  border: 2px solid var(--dt-line);
  color: var(--dt-text);
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 48px;
  font-size: clamp(.9rem, 3vw, 1rem);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
  touch-action: manipulation;
  line-height: 1.35;
}
.pz-option:hover { border-color: var(--dt-gold); }
.pz-option:active { transform: scale(.98); }
.pz-option.selected {
  border-color: var(--dt-gold);
  background: rgba(232, 163, 61, .16);
}
.pz-option.picked {
  border-color: var(--dt-green);
  background: rgba(46, 139, 87, .22);
}
.pz-option.picked::after { content: ' ✔'; color: #7ed6a2; }
.pz-option.wrongpick { animation: shake .45s ease; border-color: var(--dt-red); background: rgba(192, 57, 43, .2); }
.pz-options.locked .pz-option { cursor: default; }

.pz-input {
  font-family: var(--dt-font);
  background: var(--dt-panel);
  border: 2px solid var(--dt-line);
  border-radius: 12px;
  color: var(--dt-text);
  padding: 12px 14px;
  font-size: 1.05rem;
  width: 100%;
  max-width: 240px;
  min-height: 48px;
  outline: none;
}
.pz-input:focus { border-color: var(--dt-gold); }
.pz-cipher-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pz-unit { color: var(--dt-muted); }

.pz-hl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 420px; }
.pz-hl-cell {
  background: var(--dt-panel);
  border: 1.5px solid var(--dt-line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pz-hl-label { font-size: .85rem; color: var(--dt-gold); }
.pz-hl-cell .pz-input { max-width: 100%; }

.pz-order { display: flex; flex-direction: column; gap: 8px; }
.pz-order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--dt-panel);
  border: 1.5px solid var(--dt-line);
  border-radius: 12px;
  padding: 8px 10px;
}
.pz-order-num {
  background: var(--dt-gold);
  color: #241a08;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
}
.pz-order-text { flex: 1; min-width: 0; font-size: clamp(.85rem, 3vw, .95rem); }
.pz-order-btns { display: flex; gap: 6px; }
.pz-move {
  background: var(--dt-panel2);
  border: 1px solid var(--dt-line);
  color: var(--dt-text);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  font-size: .95rem;
  cursor: pointer;
  touch-action: manipulation;
}
.pz-move:disabled { opacity: .3; }
.pz-move:hover { border-color: var(--dt-gold); }
.pz-order.locked .pz-move { visibility: hidden; }

.pz-word { display: flex; flex-direction: column; gap: 12px; }
.pz-word-slot {
  background: var(--dt-panel);
  border: 2px dashed var(--dt-gold);
  border-radius: 12px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  letter-spacing: .25em;
  color: var(--dt-gold);
  font-weight: 700;
}
.pz-word-keys { display: flex; flex-wrap: wrap; gap: 8px; }
.pz-key {
  font-family: var(--dt-font);
  background: var(--dt-paper);
  color: var(--dt-ink);
  border: none;
  border-radius: 10px;
  width: 46px;
  height: 46px;
  min-width: 46px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.pz-key:active { transform: scale(.92); }
.pz-word-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Досье (suspect) */
.pz-dossier { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pz-suspect {
  font-family: var(--dt-font);
  background: var(--dt-panel);
  border: 2px solid var(--dt-line);
  border-radius: 14px;
  padding: 14px 12px;
  color: var(--dt-text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  transition: border-color .15s ease, transform .12s ease;
  touch-action: manipulation;
}
.pz-suspect:hover { border-color: var(--dt-gold); transform: translateY(-2px); }
.pz-suspect:active { transform: scale(.97); }
.pz-suspect-avatar { font-size: 2rem; }
.pz-suspect-img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  background: var(--dt-paper);
  border: 3px solid var(--dt-gold);
}
.pz-suspect-name { font-weight: 700; color: var(--dt-gold); font-size: .95rem; }
.pz-suspect-desc { font-size: .8rem; color: var(--dt-muted); line-height: 1.4; }
.pz-suspect.picked { border-color: var(--dt-green); background: rgba(46, 139, 87, .18); }
.pz-suspect.picked::after { content: '✔ АРЕСТОВАН'; color: #7ed6a2; font-weight: 700; font-size: .8rem; }
.pz-suspect.wrongpick { animation: shake .5s ease; border-color: var(--dt-red); background: rgba(192, 57, 43, .16); }

/* Подсказки */
.hint-panel { margin-top: 16px; }
.hint-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hint-out {
  margin-top: 10px;
  background: var(--dt-panel);
  border: 1.5px solid var(--dt-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: .9rem;
  animation: screenIn .25s ease;
}
.hint-hint { border-left: 4px solid var(--dt-gold); }
.hint-reveal { border-left: 4px solid var(--dt-green); }

/* ===== Адаптив ===== */
@media (max-width: 620px) {
  .pz-cols-2 { grid-template-columns: 1fr; }
  .pz-hl-grid { grid-template-columns: 1fr; }
  .pz-dossier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hud-chip { max-width: 34vw; padding: 6px 10px; }
}

/* ===== Доступность ===== */
:focus-visible { outline: 3px solid var(--dt-gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ===== Анимации ===== */
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(.7); }
  60% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
@keyframes scoreBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -30%); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -180%); }
}
@keyframes confettiFall {
  0% { transform: translateY(-30px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(104vh) rotate(720deg); opacity: .4; }
}
@keyframes stampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(3); }
  70% { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(.94); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 163, 61, .5); }
  50% { box-shadow: 0 0 0 14px rgba(232, 163, 61, 0); }
}

/* ===== Печать ===== */
@media print {
  .dt-bg, .dt-bg-overlay, .dt-hud, .dt-footer, #dt-toasts, #fx-layer, .btn, .hud-btn { display: none !important; }
  body { background: #fff; color: #111; }
  .screen { display: none !important; }
  .screen-active { display: block !important; }
}

/* ================= НОВЫЕ МЕХАНИКИ ================= */
.pz-note {
  font-size: .82rem; color: var(--dt-muted);
  background: var(--dt-bg2); border: 1px dashed var(--dt-line);
  border-radius: 10px; padding: 8px 12px; line-height: 1.45;
}

/* ---- witness: допрос свидетелей ---- */
.pz-witness { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.wt-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.wt-char {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--dt-panel); border: 2px solid var(--dt-line);
  border-radius: var(--dt-radius); padding: 12px 10px; min-height: 44px;
  cursor: pointer; transition: border-color .2s, transform .15s; color: var(--dt-text);
  font-family: var(--dt-font); text-align: center; position: relative;
}
.wt-char:hover { border-color: var(--dt-gold); transform: translateY(-2px); }
.wt-badge {
  position: absolute; top: -10px; right: -6px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--dt-panel2); border: 2px solid var(--dt-line);
  font-size: .85rem;
}
.wt-face { font-size: 2rem; line-height: 1; }
.wt-name { font-weight: bold; font-size: .88rem; }
.wt-bubble {
  font-size: .78rem; color: var(--dt-muted); line-height: 1.4;
  background: var(--dt-bg2); border-radius: 10px; padding: 6px 8px; width: 100%;
}
.wt-char.is-truth { border-color: var(--dt-green); background: rgba(46, 139, 87, .15); }
.wt-char.is-truth .wt-badge { background: var(--dt-green); border-color: var(--dt-green); }
.wt-char.is-liar { border-color: var(--dt-red); background: rgba(192, 57, 43, .15); }
.wt-char.is-liar .wt-badge { background: var(--dt-red); border-color: var(--dt-red); }
.wt-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--dt-muted); align-items: center; }
.wt-legend-item { display: inline-flex; gap: 6px; align-items: center; }

/* ---- logtab: логическая таблица ---- */
.pz-logtab { display: flex; flex-direction: column; gap: 14px; width: 100%; align-items: center; }
.lt-table { border-collapse: collapse; max-width: 100%; }
.lt-table th {
  font-size: .8rem; color: var(--dt-gold); padding: 6px 8px; font-weight: bold;
  max-width: 110px; overflow-wrap: break-word;
}
.lt-table thead th { border-bottom: 2px solid var(--dt-line); }
.lt-cell {
  width: 52px; height: 52px; min-width: 44px; min-height: 44px;
  border: 2px solid var(--dt-line); border-radius: 10px;
  background: var(--dt-panel); color: var(--dt-text);
  font-size: 1.3rem; font-weight: bold; cursor: pointer;
  transition: border-color .2s, background .2s; font-family: var(--dt-font);
}
.lt-cell:hover { border-color: var(--dt-gold); }
.lt-cell.plus { color: #7ed6a2; border-color: var(--dt-green); background: rgba(46, 139, 87, .18); }
.lt-cell.minus { color: #e08a8a; border-color: #8a3d3d; background: rgba(192, 57, 43, .12); }
.lt-cell.lt-pre { cursor: default; opacity: .8; border-style: dashed; }
.lt-cell.revealed { cursor: default; }
.lt-cell.locked-cell { cursor: default; }

/* ---- cipher: слово-шифровка ---- */
.pz-cipher { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.cp-match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cp-col { display: flex; flex-direction: column; gap: 8px; }
.cp-col-title { margin: 0 0 2px; font-size: .82rem; color: var(--dt-gold); text-align: center; }
.cp-item {
  background: var(--dt-panel); border: 2px solid var(--dt-line);
  color: var(--dt-text); border-radius: 12px; padding: 12px 8px;
  font-size: clamp(.9rem, 3.4vw, 1.05rem); font-weight: bold; cursor: pointer;
  min-height: 48px; transition: border-color .2s, transform .15s; font-family: var(--dt-font);
  word-break: break-word;
}
.cp-item:hover { border-color: var(--dt-gold); transform: translateY(-1px); }
.cp-item.sel { border-color: var(--dt-gold); background: rgba(232, 163, 61, .15); }
.cp-item.done { border-color: var(--dt-green); background: rgba(46, 139, 87, .18); color: #7ed6a2; cursor: default; }
.cp-item.done.revealed { border-style: dashed; }
.cp-item.wrongpick { animation: shake .45s ease; border-color: var(--dt-red); background: rgba(192, 57, 43, .2); }

/* ---- scales: весы ---- */
.pz-scales { display: flex; flex-direction: column; gap: 14px; width: 100%; align-items: center; }
.sc-stage { width: 100%; max-width: 480px; }
.sc-beam {
  display: flex; align-items: flex-end; justify-content: center; gap: 14px;
  transition: transform .4s ease;
}
.sc-beam.tilt-left { transform: rotate(-5deg); }
.sc-beam.tilt-right { transform: rotate(5deg); }
.sc-pan {
  flex: 1; max-width: 180px; min-height: 74px;
  background: var(--dt-panel); border: 2px solid var(--dt-line);
  border-radius: 12px; padding: 8px; text-align: center;
}
.sc-pan-label { display: block; font-size: .75rem; color: var(--dt-muted); margin-bottom: 4px; }
.sc-pan-coins { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 28px; }
.sc-mini {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--dt-gold); color: var(--dt-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: bold;
}
.sc-post { font-size: 2rem; align-self: center; }
.sc-result {
  text-align: center; font-size: .88rem; color: var(--dt-gold);
  background: var(--dt-bg2); border-radius: 10px; padding: 8px 10px; margin-top: 10px;
  min-height: 40px; display: flex; align-items: center; justify-content: center;
}
.sc-coins { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sc-coin {
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f0c268, var(--dt-gold2));
  border: 2px solid #a97b1e; color: var(--dt-ink);
  font-size: 1.1rem; font-weight: bold; cursor: pointer;
  transition: transform .15s, box-shadow .15s; font-family: var(--dt-font);
}
.sc-coin:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(0, 0, 0, .4); }
.sc-coin.on-left { box-shadow: 0 0 0 3px var(--dt-blue); }
.sc-coin.on-right { box-shadow: 0 0 0 3px var(--dt-green); }
.sc-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.sc-answer { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.sc-answer-label { font-size: .85rem; color: var(--dt-muted); }
.sc-answer-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sc-ans-btn { width: 52px; min-height: 44px; padding: 8px 4px; text-align: center; justify-content: center; display: inline-flex; align-items: center; }

/* ---- clockfix: табло времени ---- */
.pz-clockfix { display: flex; flex-direction: column; gap: 14px; width: 100%; align-items: center; }
.cf-goal { font-size: .9rem; color: var(--dt-gold); text-align: center; }
.cf-row {
  display: flex; align-items: center; gap: 6px;
  background: var(--dt-bg); border: 2px solid var(--dt-line);
  border-radius: 14px; padding: 12px 16px;
}
.cf-digit { width: clamp(34px, 9vw, 52px); height: auto; }
.cf-seg {
  stroke: #3a3349; stroke-width: 7; stroke-linecap: round; cursor: pointer;
  transition: stroke .15s;
}
.cf-seg:hover { stroke: #57507a; }
.cf-seg.cf-on { stroke: var(--dt-gold); filter: drop-shadow(0 0 3px rgba(232, 163, 61, .6)); }
.cf-colon { display: flex; flex-direction: column; gap: 12px; margin: 0 2px; }
.cf-colon i { width: 7px; height: 7px; border-radius: 50%; background: var(--dt-gold); display: block; }
.cf-counter { font-size: .82rem; color: var(--dt-muted); }

/* ---- route: маршрут по карте ---- */
.pz-route { display: flex; flex-direction: column; gap: 14px; width: 100%; align-items: center; }
.rt-map {
  position: relative; width: 100%; max-width: 520px;
  aspect-ratio: 10 / 7;
  background: var(--dt-bg2);
  border: 2px solid var(--dt-line); border-radius: var(--dt-radius);
  overflow: hidden;
}
.rt-edges { position: absolute; inset: 0; width: 100%; height: 100%; }
.rt-edges line {
  stroke: var(--dt-line); stroke-width: 1.4; stroke-dasharray: 2.6 1.8;
  stroke-linecap: round;
}
.rt-node {
  position: absolute; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--dt-panel); border: 2px solid var(--dt-line);
  color: var(--dt-text); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  cursor: pointer; font-family: var(--dt-font);
  transition: border-color .2s, transform .15s; padding: 0; overflow: hidden;
}
.rt-node:hover { border-color: var(--dt-gold); transform: translate(-50%, -50%) scale(1.06); }
.rt-node-icon { font-size: 1.15rem; line-height: 1; }
.rt-node-label { font-size: .62rem; font-weight: bold; color: var(--dt-muted); line-height: 1.1; max-width: 54px; }
.rt-node.rt-start { border-color: var(--dt-green); }
.rt-node.rt-start .rt-node-label { color: #7ed6a2; }
.rt-node.rt-finish { border-color: var(--dt-red); }
.rt-node.rt-finish .rt-node-label { color: #e08a8a; }
.rt-node.rt-in-path { border-color: var(--dt-gold); background: rgba(232, 163, 61, .2); }
.rt-node.rt-current { box-shadow: 0 0 0 3px rgba(232, 163, 61, .45); }
.rt-node.revealed { border-style: dashed; }
.rt-path-line {
  font-size: .85rem; color: var(--dt-gold); text-align: center;
  min-height: 24px; max-width: 100%;
}

@media (max-width: 540px) {
  .cp-match { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cp-item { padding: 10px 6px; }
  .wt-row { grid-template-columns: 1fr 1fr; }
  .lt-cell { width: 44px; height: 44px; }
  .sc-coin { width: 48px; height: 48px; }
  .rt-node { width: 50px; height: 50px; }
  .rt-node-label { max-width: 46px; font-size: .56rem; }
}

/* ===== cutline: разрезы и интервалы (шнур / кольцо / столбы) ===== */
.pz-cutline { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.cl-stage { width: 100%; max-width: 560px; margin: 0 auto; }
.cl-strip {
  position: relative; height: 64px; border-radius: 14px;
  background: linear-gradient(180deg, #f3e2bd, #e2c48a);
  border: 3px solid #8a5a2b; cursor: crosshair; touch-action: manipulation;
  overflow: visible;
}
.cl-ruler { position: relative; height: 30px; margin-top: 4px; pointer-events: none; }
.cl-tick { position: absolute; top: 0; width: 2px; height: 10px; background: #8a5a2b; transform: translateX(-1px); }
.cl-tick b {
  position: absolute; top: 11px; left: 0; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: #7a5228; white-space: nowrap;
}
.cl-seg { position: absolute; top: 0; height: 100%; pointer-events: none; }
.cl-seg:first-child { border-radius: 10px 0 0 10px; }
.cl-seg:last-child { border-radius: 0 10px 10px 0; }
.cl-mark {
  position: absolute; top: -10px; width: 4px; height: 84px;
  background: #b3382c; transform: translateX(-2px); border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .65); pointer-events: none;
}
.cl-mark::after {
  content: '✂'; position: absolute; top: -22px; left: 50%;
  transform: translateX(-50%); font-size: 15px;
}
.cl-mark.cl-peg {
  width: 16px; height: 30px; top: -34px; background: #5d4037;
  border-radius: 5px 5px 2px 2px; transform: translateX(-8px); box-shadow: 0 0 0 2px rgba(255,255,255,.5);
}
.cl-mark.cl-peg::after { content: ''; }
.cl-ring {
  position: relative; width: 200px; height: 200px; border-radius: 50%;
  border: 24px solid #d9a441; background: #fdf6e4; cursor: crosshair;
  touch-action: manipulation; margin: 10px auto 6px;
}
.cl-ringmode .cl-stage { display: flex; justify-content: center; }
.cl-ring .cl-mark {
  width: 15px; height: 15px; border-radius: 50%;
  background: #b3382c; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); top: auto; height: auto;
}
.cl-ring .cl-mark::after { content: ''; }
.cl-actions { justify-content: flex-start; }
.cl-strip.revealed, .cl-ring.revealed { cursor: default; }

@media (max-width: 540px) {
  .cl-strip { height: 52px; }
  .cl-mark { height: 68px; top: -8px; }
  .cl-mark.cl-peg { height: 26px; top: -30px; }
  .cl-ring { width: 150px; height: 150px; border-width: 19px; }
  .cl-tick b { font-size: 9px; }
}
