/* «Заметь»: вид. Общие токены — в shared/base.css. Акцент — сливовый. */

.g-zamet {
  --zm-acc: #8a1f5c;
  --zm-on: #ffffff;
  --accent: var(--zm-acc);
  --on-accent: var(--zm-on);
  /* Поле тёмное и в светлой теме: цвета фигур светлее 3:1 к светлому полю не получаются (замер: от 1,8:1),
     к полю #1c2631 все цвета палитры дают от 3,3:1 (в тёмной теме #1f2933 — от 3,15:1). Отметки на нём — светлые. */
  --zm-board: #1c2631;
  --zm-mask: #3a4753;
  --zm-ring: #f29ac9;
  --zm-miss: #ff8a93;
  --zm-bad: #b3262f;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
}
:root[data-theme='dark'] .g-zamet {
  --zm-acc: #f29ac9;
  --zm-on: #240a18;
  --zm-board: #1f2933;
  --zm-mask: #34414d;
  --zm-bad: #ff8a93;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .g-zamet {
    --zm-acc: #f29ac9;
    --zm-on: #240a18;
    --zm-board: #1f2933;
    --zm-mask: #34414d;
    --zm-bad: #ff8a93;
  }
}

/* ---------- верх: жизни — глазки ---------- */

.zm-life { width: 22px; height: 22px; fill: none; stroke: var(--zm-acc); stroke-width: 2; stroke-linejoin: round; transition: opacity 0.2s; }
.zm-life.off { stroke: var(--muted); opacity: 0.55; }
.zm-life:not(.off) circle { fill: var(--zm-acc); }

.zm-msg { padding: 8px 20px 0; text-align: center; }
.zm-status { font-size: 22px; font-weight: 600; line-height: 1.2; min-height: 1.2em; }

/* полоска времени: место есть всегда, видна только когда время ограничено */
.zm-time {
  height: 6px;
  margin: 10px 20px 0;
  border-radius: 3px;
  background: transparent;
  overflow: hidden;
}
.zm-time.on { background: var(--line); }
.zm-fill { height: 100%; width: 100%; border-radius: 3px; background: var(--zm-acc); transform-origin: left center; }
.zm-time:not(.on) .zm-fill { display: none; }
.zm-fill { visibility: hidden; }
.g-zamet[data-phase='pre'] .zm-fill, .g-zamet[data-phase='watch'] .zm-fill { visibility: visible; }
@keyframes zmDrain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- поле ---------- */

.zm-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 10px 12px 10px;
}
.zm-board {
  position: relative;
  width: var(--side, min(92vw, 480px));
  height: var(--side, min(92vw, 480px));
  border-radius: 16px;
  background: var(--zm-board);
  overflow: hidden;
}
.zm-svg { display: block; width: 100%; height: 100%; touch-action: manipulation; }
.g-zamet[data-phase='find'] .zm-svg { cursor: pointer; }
.zm-mask { position: absolute; inset: 0; background: var(--zm-mask); visibility: hidden; }
.g-zamet.blank .zm-mask { visibility: visible; }

.zm-ring {
  fill: none;
  stroke: var(--zm-ring);
  stroke-width: 3.5px;
  pointer-events: none;
}
.zm-ring.dashed { stroke-dasharray: 5 4; stroke-width: 3px; }
.zm-miss { fill: none; stroke: var(--zm-miss); stroke-width: 3px; pointer-events: none; }

/* ---------- низ: кнопка ---------- */

.zm-foot { padding: 4px 20px 20px; }
.zm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  background: var(--zm-acc);
  color: var(--zm-on);
  font-size: 18px;
  font-weight: 600;
  transition: transform 0.1s ease-out;
}
.zm-btn:active { transform: scale(0.98); }
.zm-ready { visibility: hidden; }
.g-zamet[data-phase='watch'] .zm-ready { visibility: visible; }

@media (max-height: 640px) {
  .zm-time { margin-top: 6px; }
  .zm-foot { padding-bottom: 12px; }
}

