/* 30 — ready prompts (tutorial step ready while a dialog is up, hero quest steps). */
.sg30-stack {
  position: fixed;
  z-index: 250; /* above the dungeon run (200), below toasts */
  /* top-right, under the header and resource bar: clear of the bottom nav and of the toasts */
  right: 16px;
  top: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(24rem, calc(100vw - 32px));
  pointer-events: none;
}
/* The journal is already on screen: its own UI says it all. */
body:has(.st-backdrop--tut) .sg30-stack { visibility: hidden; }

.sg30-notice {
  --sg30-accent: #e2a48c;
  position: relative;
  width: 100%;
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  border-radius: 12px;
  border: 1px solid rgba(171, 169, 155, 0.28);
  border-left: 3px solid var(--sg30-accent);
  background: linear-gradient(180deg, rgba(34, 33, 28, 0.97), rgba(20, 20, 17, 0.97));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #e8e4d6;
  animation: sg30-in 0.38s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}
.sg30-notice--quest { --sg30-accent: #5eead4; }
.sg30-notice--fail { --sg30-accent: #c98a7a; }
.sg30-out { animation: sg30-out 0.24s ease-in both; }

.sg30-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 6px 12px 14px;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  border-radius: 12px 0 0 12px;
}
.sg30-main:focus-visible, .sg30-close:focus-visible { outline: 2px solid var(--sg30-accent); outline-offset: -2px; }
.sg30-main:hover .sg30-action { background: var(--sg30-accent); color: #16150f; }

.sg30-mark {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--sg30-accent) 55%, transparent);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--sg30-accent) 30%, transparent), transparent 70%), #1b1b19;
  position: relative;
}
.sg30-mark::after { /* check mark */
  content: '';
  position: absolute;
  left: 10px;
  top: 7px;
  width: 7px;
  height: 12px;
  border: solid var(--sg30-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sg30-notice--fail .sg30-mark::after { left: 13px; top: 6px; width: 0; height: 14px; border-width: 0 2px 0 0; transform: none; }

.sg30-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sg30-eyebrow {
  font-family: 'Alegreya SC', Cinzel, Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sg30-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg30-title {
  font-family: Cinzel, Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sg30-body { font-family: 'Alegreya Sans', Georgia, serif; font-size: 13px; color: #b0aea2; line-height: 1.3; }
.sg30-action {
  flex: 0 0 auto;
  align-self: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--sg30-accent) 60%, transparent);
  color: var(--sg30-accent);
  font-family: Cinzel, Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.sg30-close {
  flex: 0 0 auto;
  width: 34px;
  background: none;
  border: 0;
  color: #8f8c80;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0 12px 12px 0;
}
.sg30-close:hover { color: #e8e4d6; }

@keyframes sg30-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes sg30-out { to { opacity: 0; transform: translateX(28px); } }

@media (max-width: 640px) {
  .sg30-stack { right: 16px; left: 16px; top: auto; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); align-items: stretch; }
  @keyframes sg30-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes sg30-out { to { opacity: 0; transform: translateY(18px); } }
}
@media (prefers-reduced-motion: reduce) { .sg30-notice, .sg30-out { animation: none; } }
