/* ============================================================
   Окна симулятора рабочего места
   ============================================================ */

.windows {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
  min-height: 0;
}
.windows--rows { grid-template-columns: minmax(0, 1fr); }
.windows--wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }

/* два окна: журнал, касса и зал получают больше места */
.windows--two { display: flex; flex-wrap: wrap; align-items: flex-start; }
.windows--two .win { flex: 1 1 320px; min-width: 0; }
.windows--two .win[data-window="journal"],
.windows--two .win[data-window="cashier"],
.windows--two .win[data-window="hall"] { flex-grow: 1.5; }

.win {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  overflow: hidden;
  animation: pop .3s var(--ease) both;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.win__bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: linear-gradient(180deg, #fff, var(--surface-2));
  border-bottom: 1px solid var(--line-2);
  min-height: 44px;
}
.win__dots { display: flex; gap: 5px; flex: none; }
.win__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.win__dots i:nth-child(1) { background: #EAD3CE; }
.win__dots i:nth-child(2) { background: #F0E3CB; }
.win__dots i:nth-child(3) { background: #D9E7DE; }
.win__title { font-size: 13px; font-weight: 620; display: flex; align-items: center; gap: 7px; }
.win__title .icon { width: 16px; height: 16px; color: var(--ink-3); }
.win__meta { margin-left: auto; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.win__body { padding: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.win__body--flush { padding: 0; }
.win--tall .win__body { max-height: min(56vh, 520px); overflow: auto; overscroll-behavior: contain; }

/* ---------- подсветка цели (guided_click) ---------- */
.is-target {
  position: relative;
  z-index: 2;
  animation: targetPulse 1.6s var(--ease) infinite;
}
.is-target::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 14px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(201, 136, 127, .16);
  pointer-events: none;
}
.is-target::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 14px;
  pointer-events: none;
  animation: targetInk 1.6s var(--ease) infinite;
}
.is-clicked { animation: clickPulse .5s var(--ease); }
.is-wrong { animation: shake .4s var(--ease); }

@keyframes targetPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 136, 127, .4); }
  50% { box-shadow: 0 0 0 9px rgba(201, 136, 127, 0); }
}
@keyframes targetInk { from { opacity: .9; } to { opacity: .1; } }
@keyframes clickPulse { 0% { transform: scale(1); } 45% { transform: scale(.965); } 100% { transform: scale(1); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
}

/* ---------- точечные области («найди ошибку») ---------- */
.spots { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); }
.spots__scene { display: block; width: 100%; height: auto; }
.spot {
  position: absolute;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(43, 39, 37, .18);
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.spot:hover { background: rgba(255, 255, 255, .3); border-color: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.spot.is-found-ok { border: 2px solid var(--bad); background: rgba(196, 104, 92, .22); }
.spot.is-found-miss { border: 2px solid var(--warn); background: rgba(207, 154, 75, .2); }
.spot.is-done { border: 2px solid var(--ok); background: rgba(99, 161, 132, .18); }

/* ============================================================
   ЖУРНАЛ ЗАПИСИ
   ============================================================ */
.journal { display: grid; gap: 10px; }
.journal__toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.journal__day { font-size: 13px; font-weight: 650; }
.journal__nav { display: flex; gap: 4px; }
.journal__legend { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.legend { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); }
.legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--ink-3); }

.journal__grid {
  display: grid;
  grid-template-columns: 58px repeat(var(--masters, 4), minmax(96px, 1fr));
  grid-auto-rows: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: auto;
  max-height: min(36vh, 344px);
  overscroll-behavior: contain;
  background: var(--surface);
}
.journal__corner, .journal__master {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  font-size: 12px;
  font-weight: 650;
  padding: 8px 6px;
  text-align: center;
}
.journal__corner { left: 0; z-index: 4; color: var(--ink-3); }
.journal__master { display: grid; gap: 2px; justify-items: center; }
.journal__master small { font-weight: 500; color: var(--ink-3); font-size: 10.5px; }
.journal__time {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface-2);
  border-right: 1px solid var(--line-2);
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding: 6px 5px;
  text-align: center;
}
.journal__cell {
  border-bottom: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  min-height: 40px;
  padding: 3px;
  position: relative;
  transition: background .16s;
}
.journal__cell--free { cursor: pointer; }
.journal__cell--free:hover { background: var(--accent-soft); }
.journal__cell--free::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  opacity: 0;
  transition: opacity .18s;
}
.journal__cell--free:hover::after { opacity: 1; border-color: var(--accent); }
.journal__cell--closed { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); }

.booking {
  position: relative;
  z-index: 2;
  border-radius: 9px;
  padding: 5px 7px;
  font-size: 11.5px;
  line-height: 1.35;
  color: #fff;
  display: grid;
  gap: 1px;
  cursor: pointer;
  border: 0;
  text-align: left;
  width: 100%;
  height: 100%;
  box-shadow: 0 4px 10px -6px rgba(43, 39, 37, .5);
  transition: transform .16s var(--ease), filter .16s;
}
.booking:hover { transform: translateY(-1px); filter: brightness(1.04); }
.booking b { font-size: 11.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking small { font-size: 10.5px; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking.is-selected { outline: 2px solid var(--ink); outline-offset: 1px; }
.booking.is-suggested { animation: targetPulse 1.6s var(--ease) infinite; }
.booking--new { background: #A79A93; }
.booking--confirmed { background: var(--info); }
.booking--arrived { background: var(--warn); }
.booking--in_progress { background: #7FA793; }
.booking--paid { background: var(--ok); }
.booking--no_show { background: var(--bad); }
.booking--cancelled { background: #C0B4AC; text-decoration: line-through; opacity: .8; }

.journal__masterpager { display: none; }

/* ---------- форма записи ---------- */
.form { display: grid; gap: 11px; }
.form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.form__row { display: grid; gap: 6px; }
.form__label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.form__hint { font-size: 11.5px; color: var(--ink-3); }
.select, .input--sm {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
}
.select:focus, .input--sm:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
.select.is-bad, .input--sm.is-bad { border-color: var(--bad); background: var(--bad-soft); }
.slots-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.slotpill {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12.5px;
  cursor: pointer;
  min-height: 40px;
  font-variant-numeric: tabular-nums;
}
.slotpill:hover { border-color: var(--accent); color: var(--accent-ink); }
.slotpill.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.slotpill:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* ============================================================
   ТЕЛЕФОН
   ============================================================ */
.phone { display: grid; gap: 12px; }
.phone__shell {
  background: linear-gradient(180deg, #3B3532, #2A2523);
  border-radius: 26px;
  padding: 14px;
  color: #fff;
  display: grid;
  gap: 12px;
  box-shadow: var(--sh-2);
  min-height: 250px;
  align-content: start;
}
.phone__top { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; opacity: .72; }
.phone__caller { display: grid; justify-items: center; gap: 6px; padding: 10px 0 4px; }
.phone__avatar { width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, .1); animation: ring 1.8s var(--ease) infinite; }
.phone__name { font-size: 19px; font-weight: 650; }
.phone__sub { font-size: 12.5px; opacity: .75; }
.phone__actions { display: flex; gap: 10px; justify-content: center; }
.phone__btn {
  min-height: 48px;
  min-width: 120px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform .16s var(--ease), filter .18s;
}
.phone__btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.phone__btn--accept { background: #63A184; color: #fff; }
.phone__btn--decline { background: #C4685C; color: #fff; }
.phone__live { display: flex; align-items: center; justify-content: space-between; font-size: 12px; opacity: .8; }
.phone__pulse { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.phone__pulse i { width: 3px; background: rgba(255, 255, 255, .65); border-radius: 2px; animation: wave 1s ease-in-out infinite; }
.phone__pulse i:nth-child(2) { animation-delay: .12s; }
.phone__pulse i:nth-child(3) { animation-delay: .24s; }
.phone__pulse i:nth-child(4) { animation-delay: .36s; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: 15px; } }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .18); } 50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }

.notes {
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 10px 12px;
  font-size: 13px;
}
.notes__title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 650; margin-bottom: 5px; }
.notes ul { display: grid; gap: 4px; }
.notes li { display: flex; gap: 7px; }
.notes li::before { content: "—"; color: var(--ink-3); }

/* ============================================================
   МЕССЕНДЖЕР
   ============================================================ */
.chat { display: grid; gap: 0; border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; }
.chat__top { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.chat__avatar { width: 32px; height: 32px; border-radius: 50%; }
.chat__scroll {
  padding: 12px;
  display: grid;
  gap: 8px;
  max-height: min(38vh, 340px);
  overflow: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #FBF7F4, #F7F1EC);
}
.msg { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; box-shadow: var(--sh-1); animation: pop .25s var(--ease) both; }
.msg--in { background: var(--surface); border-top-left-radius: 5px; justify-self: start; }
.msg--out { background: linear-gradient(180deg, #D2958C, var(--accent)); color: #fff; border-top-right-radius: 5px; justify-self: end; }
.msg__time { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; }
.msg--typing { display: flex; gap: 4px; align-items: center; }
.msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: wave .9s infinite; }
.chat__quick { display: flex; gap: 6px; padding: 9px 10px; flex-wrap: wrap; border-top: 1px solid var(--line-2); background: var(--surface); }
.chat__composer { display: flex; gap: 8px; padding: 9px 10px; border-top: 1px solid var(--line-2); background: var(--surface); }

/* ============================================================
   КАССА
   ============================================================ */
.cashier { display: grid; gap: 12px; }
.cashier__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 12px; align-items: start; }
.goods { display: grid; gap: 6px; max-height: min(34vh, 300px); overflow: auto; overscroll-behavior: contain; }
.good {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, background .18s;
  min-height: 44px;
}
.good:hover { border-color: var(--accent); background: var(--accent-soft); }
.good small { color: var(--ink-3); }
.good b { margin-left: auto; font-variant-numeric: tabular-nums; }
.receipt { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px; background: var(--surface-2); display: grid; gap: 9px; }
.receipt__row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.receipt__row--total { border-top: 1px dashed var(--line); padding-top: 8px; font-weight: 700; font-size: 15px; }
.pay { display: flex; gap: 6px; flex-wrap: wrap; }
.pay__btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  min-height: 44px;
  font-size: 13px;
}
.pay__btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }

/* ============================================================
   КАРТОЧКА КЛИЕНТА
   ============================================================ */
.clientcard { display: grid; gap: 12px; }
.clientcard__head { display: flex; gap: 12px; align-items: center; }
.clientcard__avatar { width: 54px; height: 54px; border-radius: 16px; }
.clientcard__name { font-size: 16px; font-weight: 650; }
.clientcard__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.clientcard__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.mini { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; background: var(--surface-2); }
.mini__label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }
.mini__value { font-size: 14px; margin-top: 2px; }
.visits { display: grid; gap: 5px; }
.visit-row { display: flex; gap: 9px; font-size: 12.5px; color: var(--ink-2); padding: 6px 8px; border-radius: 9px; }
.visit-row:nth-child(odd) { background: var(--surface-2); }
.visit-row b { color: var(--ink); font-weight: 600; }
.visit-row time { margin-left: auto; color: var(--ink-3); }

/* ============================================================
   ЗАЛ / СТОЙКА
   ============================================================ */
.hall { display: grid; gap: 12px; }
.hall__scene { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); position: relative; background: var(--surface-2); }
.hall__scene svg { display: block; width: 100%; height: auto; }
.zone-hot { cursor: pointer; }
.zone-hot:hover .zone-fill { filter: brightness(.96); }
.guest {
  position: absolute;
  width: 44px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
.guest img, .guest svg { width: 100%; display: block; }
.guest__mood { position: absolute; top: -8px; right: -6px; font-size: 15px; }
.guest--walking { animation: walk 1.4s var(--ease) both; }
@keyframes walk { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ============================================================
   СКЛАД
   ============================================================ */
.stock { display: grid; gap: 7px; }
.stock__row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 64px; gap: 10px; align-items: center; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 13px; }
.stock__row.is-low { border-color: rgba(207, 154, 75, .4); background: var(--warn-soft); }
.stock__bar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.stock__bar i { display: block; height: 100%; background: var(--ok); }
.stock__row.is-low .stock__bar i { background: var(--warn); }
.stock__val { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ============================================================
   ДИАЛОГ / ВАРИАНТЫ ОТВЕТА
   ============================================================ */
.sayings { display: grid; gap: 9px; }
.saying {
  display: flex; gap: 11px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--sh-1);
  transition: transform .18s var(--ease), border-color .18s, background .18s, box-shadow .18s;
  min-height: 52px;
  align-items: flex-start;
}
.saying:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--sh-2); }
.saying__key {
  width: 24px; height: 24px; border-radius: 8px;
  background: var(--surface-3); color: var(--ink-2);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none;
}
.saying__text { flex: 1; }
.saying__note { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.saying.is-ok { background: var(--ok-soft); border-color: rgba(99, 161, 132, .4); }
.saying.is-bad { background: var(--bad-soft); border-color: rgba(196, 104, 92, .4); }
.saying.is-picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.saying:disabled { opacity: .6; cursor: default; transform: none; }

.dialog { display: grid; gap: 12px; }
.dialog__line { display: flex; gap: 10px; align-items: flex-start; animation: rise .3s var(--ease) both; }
.dialog__line--client .bubble-txt {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 4px 16px 16px 16px;
  padding: 11px 14px;
  font-size: 14px;
  box-shadow: var(--sh-1);
  max-width: 60ch;
}
.dialog__avatar { width: 40px; height: 40px; border-radius: 14px; flex: none; }
.dialog__who { font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; font-weight: 600; }

/* сортировка / перетаскивание */
.sortable { display: grid; gap: 8px; }
.sortable__item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: grab;
  min-height: 48px;
  box-shadow: var(--sh-1);
  transition: border-color .18s, transform .18s, opacity .18s;
}
.sortable__item:hover { border-color: var(--accent); }
.sortable__item.is-dragging { opacity: .45; }
.sortable__item.is-over { border-color: var(--accent); border-style: dashed; }
.sortable__handle { color: var(--ink-3); cursor: grab; }
.sortable__hint { font-size: 12px; color: var(--ink-3); }
.dropzone {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px;
  min-height: 62px;
  display: grid;
  gap: 6px;
  align-content: start;
  background: var(--surface-2);
  transition: border-color .18s, background .18s;
}
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__title { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.dropzone.is-ok { border-color: var(--ok); background: var(--ok-soft); }
.dropzone.is-bad { border-color: var(--bad); background: var(--bad-soft); }
.chip-drag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 11px; font-size: 12.5px;
  cursor: grab;
}

/* ============================================================
   ПУЛЬС: настроение, спарклайн, цепочка
   ============================================================ */
.mood { display: grid; gap: 7px; }
.mood__top { display: flex; align-items: baseline; gap: 8px; }
.mood__label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.mood__val { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.mood__scale { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #E4A69B, #EBCB9C, #C6D8B8, #9CC7A6); }
.mood__mark { position: absolute; top: -3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transform: translateX(-50%); box-shadow: var(--sh-1); transition: left .5s var(--ease); }
.mood__faces { display: flex; justify-content: space-between; font-size: 13px; opacity: .85; }
.mood__hint { font-size: 11.5px; color: var(--ink-3); }

.delta {
  position: absolute;
  right: 0; top: -6px;
  font-size: 12.5px;
  font-weight: 700;
  animation: floatUp 1.2s var(--ease) both;
  pointer-events: none;
}
.delta--up { color: #3F7359; }
.delta--down { color: #94453A; }
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(6px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-16px); }
}

.spark { width: 100%; height: 34px; display: block; }
.spark path.line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark path.area { fill: rgba(201, 136, 127, .14); stroke: none; }
.spark circle.dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.spark circle.dot--bad { fill: var(--bad); stroke: #fff; }
.spark circle.dot--ok { fill: var(--ok); stroke: #fff; }

.repline { display: flex; align-items: center; gap: 9px; }
.repline__bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.repline__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--bad), var(--warn), var(--ok)); transition: width .5s var(--ease); }
.repline__val { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 34px; text-align: right; }

.errchip {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(196, 104, 92, .3);
  background: var(--bad-soft);
  color: #94453A;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  min-height: 40px;
}
.errchip:hover { background: #F5DED9; }
.errchip b { margin-left: auto; }

.chain { display: grid; gap: 10px; }
.chain__step {
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 11px 13px;
  background: var(--surface-2);
  position: relative;
}
.chain__step::after {
  content: "↓";
  position: absolute;
  left: 50%; bottom: -14px;
  transform: translateX(-50%);
  color: var(--ink-3);
  font-size: 13px;
}
.chain__step:last-child::after { display: none; }
.chain__label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }
.chain__value { font-size: 13.5px; margin-top: 3px; }
.chain__price { color: #94453A; font-weight: 650; }

.debrief { display: grid; gap: 12px; }
.debrief__chart { position: relative; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px; background: var(--surface-2); }
.debrief__err {
  position: absolute;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--bad);
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: var(--sh-1);
  transition: transform .18s var(--ease);
}
.debrief__err:hover { transform: translate(-50%, -50%) scale(1.25); }
.debrief__err.is-open { background: var(--ink); }
.debrief__legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 6px; }

@media (max-width: 1023px) {
  .journal__grid { grid-template-columns: 54px minmax(0, 1fr); max-height: min(40vh, 340px); }
  .journal__masterpager {
    display: flex; align-items: center; gap: 8px; justify-content: space-between;
    border: 1px solid var(--line-2); border-radius: 12px; padding: 6px 8px; background: var(--surface-2);
  }
  .journal__masterpager .win__title { font-size: 12.5px; }
  .map-toggle { display: none; }
  .mobile-hint { display: flex; gap: 7px; align-items: center; font-size: 12px; color: var(--ink-3); }
  .cashier__grid { grid-template-columns: minmax(0, 1fr); }
  .windows, .windows--wide { grid-template-columns: minmax(0, 1fr); }
  .msg { max-width: 88%; }
}

@media (min-width: 1024px) {
  .mobile-hint { display: none; }
}
