/* One-time statistic tutorial modal */
.stat-tutorial[hidden] { display: none !important; }

.stat-tutorial {
  position: fixed;
  inset: 0;
  z-index: 12050;
}

.stat-tutorial__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 28, 0.66);
  backdrop-filter: blur(4px);
}

.stat-tutorial__panel {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100dvh - 30px);
  overflow: auto;
  margin: 16px auto;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(117, 171, 255, 0.26);
  background: linear-gradient(180deg, rgba(12, 26, 58, 0.98), rgba(8, 20, 48, 0.98));
  color: #e8f0ff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

.stat-tutorial__close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(143, 185, 255, 0.32);
  background: rgba(16, 35, 76, 0.68);
  color: #e8f0ff;
  cursor: pointer;
}

.stat-tutorial__hero {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
  margin-right: 36px;
}

.stat-tutorial__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: linear-gradient(160deg, rgba(54, 114, 255, 0.35), rgba(30, 217, 212, 0.22));
  border: 1px solid rgba(143, 185, 255, 0.35);
}

.stat-tutorial__hero h2 {
  margin: 2px 0 6px;
  font-size: clamp(20px, 2.8vw, 28px);
  line-height: 1.2;
}

.stat-tutorial__hero p {
  margin: 0;
  color: #bfd2f5;
}

.stat-tutorial__grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-tip-card {
  border-radius: 14px;
  padding: 12px 12px 11px;
  border: 1px solid rgba(127, 176, 255, 0.2);
  background: rgba(10, 24, 56, 0.72);
}

.stat-tip-card__title {
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 5px;
}

.stat-tip-card p {
  margin: 0;
  color: #b8ccf2;
  line-height: 1.45;
}

.stat-tutorial__actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

body.tutorial-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 700px) {
  .stat-tutorial__panel {
    width: calc(100vw - 18px);
    margin: 9px auto;
    padding: 14px;
    border-radius: 16px;
  }

  .stat-tutorial__hero {
    grid-template-columns: 46px 1fr;
    gap: 10px;
    margin-right: 30px;
  }

  .stat-tutorial__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 22px;
  }

  .stat-tutorial__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

html[data-theme="light"] .stat-tutorial__backdrop {
  background: rgba(19, 31, 52, 0.42);
}

html[data-theme="light"] .stat-tutorial__panel {
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(239, 246, 255, 0.98));
  color: #0e2348;
  border-color: rgba(72, 121, 210, 0.24);
}

html[data-theme="light"] .stat-tutorial__close {
  background: rgba(222, 234, 252, 0.9);
  border-color: rgba(72, 121, 210, 0.3);
  color: #17396e;
}

html[data-theme="light"] .stat-tutorial__hero p,
html[data-theme="light"] .stat-tip-card p {
  color: #3e5f92;
}

html[data-theme="light"] .stat-tip-card {
  background: rgba(226, 238, 255, 0.7);
  border-color: rgba(72, 121, 210, 0.22);
}
