.sn-report-open {
  overflow: hidden;
}

.sn-report-layer {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 20px;
  /* Плотная подложка и без размытия перекрывает страницу, зато текст окна
     рисуется в обычном слое — без цветной каймы у заголовка. */
  background: rgba(0, 0, 0, .72);
  opacity: 0;
  transition: opacity .32s cubic-bezier(.16, 1, .3, 1);
}

.sn-report-layer.is-open {
  opacity: 1;
}

.sn-report-layer.is-closing {
  opacity: 0;
  pointer-events: none;
}

.sn-report-sheet {
  width: min(500px, 100%);
  max-height: min(760px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  color: var(--content-primary, var(--text-strong, #fff));
  background: var(--surface-panel, var(--panel, var(--bg-elev, #0d0d0d)));
  border: 1px solid var(--border-default, var(--line, #303030));
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .035), 0 28px 80px rgba(0, 0, 0, .62);
  transform: translateY(18px) scale(.982);
  transition: transform .38s cubic-bezier(.16, 1, .3, 1);
}

.sn-report-layer.is-open .sn-report-sheet {
  transform: none;
}

.sn-report-layer.is-closing .sn-report-sheet {
  transform: translateY(14px) scale(.985);
}

.sn-report-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 64px;
  padding: 10px 14px;
  background: var(--surface-panel, var(--panel, var(--bg-elev, #0d0d0d)));
  border-bottom: 1px solid var(--border-subtle, var(--line-soft, #242424));
}

.sn-report-sheet.is-success .sn-report-head {
  display: none;
}

.sn-report-head h2 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.25;
}

.sn-report-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-full, 999px);
  color: var(--content-secondary, var(--text, #c7c7c7));
  background: transparent;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.sn-report-icon:hover {
  color: var(--content-primary, var(--text-strong, #fff));
  background: var(--surface-muted, var(--card-soft, #202020));
}

.sn-report-icon:active {
  transform: scale(.94);
}

.sn-report-icon svg {
  width: 20px;
  height: 20px;
}

.sn-report-icon[hidden] {
  visibility: hidden;
  display: grid;
}

.sn-report-viewport {
  position: relative;
  min-height: 330px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface-panel, var(--panel, var(--bg-elev, #0d0d0d)));
  transition: height .3s var(--ease-emph, cubic-bezier(.16, 1, .3, 1));
}

/* Шаг живёт в трёх состояниях: въезжает, текущий, уезжает. Класс въезда
   снимается сразу после появления, поэтому «Назад» больше не оставляет
   панель сдвинутой. */
.sn-report-step {
  position: relative;
  inset: auto;
  box-sizing: border-box;
  width: 100%;
  padding: 20px 22px 22px;
  opacity: 1;
  transform: none;
  transition: opacity .2s var(--ease-out, cubic-bezier(.22, .61, .36, 1)),
              transform .3s var(--ease-emph, cubic-bezier(.16, 1, .3, 1));
}

.sn-report-step.is-entering,
.sn-report-step.is-entering-back {
  position: absolute;
  inset: 0 auto auto 0;
  opacity: 0;
}

.sn-report-step.is-entering { transform: translateX(18px) }
.sn-report-step.is-entering-back { transform: translateX(-18px) }

.sn-report-step.is-leaving {
  position: absolute;
  inset: 0 auto auto 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s var(--ease-out, cubic-bezier(.22, .61, .36, 1)),
              transform .26s var(--ease-emph, cubic-bezier(.16, 1, .3, 1));
}

.sn-report-step.is-leaving.to-left { transform: translateX(-18px) }
.sn-report-step.is-leaving.to-right { transform: translateX(18px) }

.sn-report-context {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 20px;
  background: var(--surface-card, var(--card, #141414));
  border: 1px solid var(--border-default, var(--line, #303030));
  border-radius: var(--radius-lg, 16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.sn-report-context-image,
.sn-report-context-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border-radius: var(--radius-md, 12px);
  background: var(--surface-muted, var(--card-soft, #202020));
}

.sn-report-context-icon {
  display: grid;
  place-items: center;
  color: var(--content-secondary, var(--text, #c7c7c7));
}

.sn-report-context-icon svg {
  width: 23px;
  height: 23px;
}

.sn-report-context-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sn-report-context-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.sn-report-context-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--content-muted, var(--muted, #929292));
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sn-report-step-head {
  margin: 0 2px 16px;
}

.sn-report-step-head h3 {
  margin: 0;
  color: var(--content-primary, var(--text-strong, #fff));
  font-size: 21px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sn-report-step-head p {
  margin: 6px 0 0;
  color: var(--content-muted, var(--muted, #929292));
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.sn-report-actions,
.sn-report-list {
  display: grid;
  gap: 9px;
}

.sn-report-row,
.sn-report-choice {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border-subtle, var(--line-soft, #242424));
  border-radius: var(--radius-lg, 16px);
  color: var(--content-primary, var(--text-strong, #fff));
  background: var(--surface-card, var(--card, #141414));
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.sn-report-row:hover,
.sn-report-choice:hover {
  background: var(--surface-card-hover, var(--card-hover, #202020));
  border-color: var(--border-default, var(--line, #303030));
}

.sn-report-row:active,
.sn-report-choice:active {
  transform: scale(.987);
}

.sn-report-row-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: var(--radius-md, 12px);
  color: var(--content-secondary, var(--text, #c7c7c7));
  background: var(--surface-muted, var(--card-soft, #202020));
}

.sn-report-row-icon svg {
  width: 19px;
  height: 19px;
}

.sn-report-row-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  flex: 1;
}

.sn-report-row-copy strong,
.sn-report-row-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sn-report-row-copy strong {
  font-size: 15px;
}

.sn-report-row-copy small {
  color: var(--content-muted, var(--muted, #929292));
  font-size: 12px;
  line-height: 1.35;
}

.sn-report-row-arrow {
  flex: 0 0 auto;
  color: var(--content-muted, var(--muted, #929292));
}

.sn-report-row-arrow svg {
  width: 18px;
  height: 18px;
}

.sn-report-choice {
  min-height: 54px;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sn-report-choice > span:first-child {
  min-width: 0;
}

.sn-report-choice-mark svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sn-report-choice-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  margin-left: auto;
  border: 1px solid var(--border-default, var(--line, #303030));
  border-radius: var(--radius-full, 999px);
  color: transparent;
  background: transparent;
  transform: scale(.9);
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .28s cubic-bezier(.16, 1, .3, 1);
}

.sn-report-choice.is-selected {
  border-color: var(--content-secondary, var(--text, #c7c7c7));
  background: var(--surface-muted, var(--card-soft, #202020));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--content-secondary, #c7c7c7) 20%, transparent);
}

.sn-report-choice.is-selected .sn-report-choice-mark {
  border-color: var(--action-primary, var(--accent, #ededed));
  color: var(--action-on-primary, var(--on-accent, #0b0b0b));
  background: var(--action-primary, var(--accent, #ededed));
  transform: scale(1);
}

.sn-report-reasons {
  max-height: min(420px, 52dvh);
  overflow: auto;
  padding-right: 2px;
}

.sn-report-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle, var(--line-soft, #242424));
}

.sn-report-primary {
  box-sizing: border-box;
  min-height: 46px;
  width: 100%;
  padding: 0 18px;
  border: 1px solid var(--action-primary, var(--accent, #ededed));
  border-radius: var(--radius-md, 12px);
  color: var(--action-on-primary, var(--on-accent, #0b0b0b));
  background: var(--action-primary, var(--accent, #ededed));
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease;
}

.sn-report-primary:hover {
  background: var(--action-primary-hover, var(--accent-hover, #fff));
}

.sn-report-primary:active {
  transform: scale(.985);
}

.sn-report-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.sn-report-details {
  box-sizing: border-box;
  width: 100%;
  min-height: 136px;
  resize: none;
  padding: 13px 14px;
  color: var(--content-primary, var(--text-strong, #fff));
  background: var(--surface-card, var(--card, #141414));
  border: 1px solid var(--border-default, var(--line, #303030));
  border-radius: var(--radius-lg, 16px);
  font: inherit;
  line-height: 1.5;
  outline: none;
  overflow-wrap: anywhere;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.sn-report-details:focus {
  border-color: var(--content-secondary, var(--text, #c7c7c7));
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(255, 255, 255, .09));
}

.sn-report-details::placeholder {
  color: var(--content-muted, var(--muted, #929292));
}

.sn-report-count {
  display: block;
  margin-top: 7px;
  color: var(--content-muted, var(--muted, #929292));
  font-size: 12px;
  text-align: right;
}

.sn-report-summary {
  display: grid;
  grid-template-columns: minmax(86px, 108px) minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 2px 0;
  border-top: 1px solid var(--border-subtle, var(--line-soft, #242424));
}

.sn-report-summary dt,
.sn-report-summary dd {
  min-width: 0;
  margin: 0;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border-subtle, var(--line-soft, #242424));
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sn-report-summary dt {
  color: var(--content-muted, var(--muted, #929292));
}

.sn-report-summary dd {
  color: var(--content-primary, var(--text-strong, #fff));
  font-weight: 650;
}

.sn-report-live {
  min-height: 0;
  padding: 0 18px 14px;
  color: var(--danger, #e76d73);
  background: var(--surface-panel, var(--panel, var(--bg-elev, #0d0d0d)));
  font-size: 13px;
  text-align: center;
}

.sn-report-live:empty {
  display: none;
}

.sn-report-success {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sn-report-success-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--radius-full, 999px);
  color: var(--action-on-primary, var(--on-accent, #0b0b0b));
  background: var(--action-primary, var(--accent, #ededed));
  transform: scale(.7);
  animation: sn-report-pop .34s var(--ease-emph) forwards;
}

.sn-report-success-icon svg {
  width: 30px;
  height: 30px;
}

.sn-report-success h3 {
  margin: 0;
  font-size: 22px;
}

.sn-report-success p {
  margin: 8px 0 0;
  color: var(--content-muted, var(--muted, #929292));
  font-size: 14px;
}

@keyframes sn-report-pop {
  to { transform: scale(1); }
}

@media (max-width: 600px) {
  .sn-report-layer {
    align-items: end;
    padding: 0;
  }

  .sn-report-sheet {
    width: 100%;
    max-height: min(90dvh, 760px);
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  .sn-report-layer.is-open .sn-report-sheet {
    transform: translateY(0);
  }

  .sn-report-layer.is-closing .sn-report-sheet {
    transform: translateY(100%);
  }

  .sn-report-head {
    min-height: 58px;
  }

  .sn-report-step {
    padding: 18px 16px 20px;
  }

  .sn-report-reasons {
    max-height: 54dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sn-report-layer,
  .sn-report-sheet,
  .sn-report-viewport,
  .sn-report-step,
  .sn-report-row,
  .sn-report-choice,
  .sn-report-choice-mark {
    transition-duration: .01ms !important;
  }

  .sn-report-success-icon {
    animation: none;
    transform: none;
  }
}
