/* Feedback: dialog (game pop-up), toast (scroll), skeleton loaders, empty and error states, "coming next" card. */

/* ---------------------------------------------------------------- dialog */
.bfc-dialog-wrap { position: fixed; inset: 0; z-index: var(--bfc-z-dialog); display: grid; place-items: center; padding: 18px; background: rgba(0, 4, 16, .66); }
.bfc-dialog-wrap[hidden] { display: none; }
.bfc-dialog {
  width: 100%; max-width: 400px; max-height: calc(100dvh - 36px); overflow-y: auto; text-align: center;
  border-style: solid; border-color: transparent; border-width: 12px;
  border-image: url(../assets/ui/frame-gold.png) 16 fill / 12px stretch;
  /* The frame's centre is only 75% opaque: a solid fill under it keeps text readable over busy tiles and art. */
  background: rgba(8, 10, 18, .82) padding-box;
  padding: 2px 6px 6px;
}
@media (prefers-reduced-motion: no-preference) { .bfc-dialog { animation: bfc-pop .26s var(--bfc-ease-out); } }
.bfc-dialog__head { margin: 0 -6px 12px; padding: 6px 8px 10px; font: 800 var(--bfc-fs-l)/1.25 var(--bfc-font-game); color: #fff; text-shadow: var(--bfc-outline); border-bottom: 2px solid rgba(214, 164, 62, .55); }
.bfc-dialog__body { margin: 0 0 16px; color: var(--bfc-ink-soft); font-size: var(--bfc-fs-m); }
.bfc-dialog__body p + p { margin-top: 8px; }
.bfc-dialog__btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@keyframes bfc-pop { from { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.04); opacity: 1; } to { transform: none; } }

/* ---------------------------------------------------------------- toast (mission_select area name scroll) */
.bfc-toast {
  position: fixed; left: 50%; bottom: 150px; z-index: var(--bfc-z-toast); transform: translate(-50%, 20px); opacity: 0;
  min-width: min(300px, 80vw); max-width: min(440px, 92vw); padding: 12px 30px; text-align: center;
  font: 800 14.5px/1.3 var(--bfc-font-game); color: var(--bfc-ink-dark);
  background: url(../assets/ui/scroll.png) center / 100% 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6));
  pointer-events: none; transition: opacity .2s, transform var(--bfc-dur) var(--bfc-ease-out);
}
.bfc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- skeleton loaders: dim stone shapes with a slow sheen */
.bfc-skel { position: relative; overflow: hidden; border-radius: 8px; background: rgba(40, 56, 96, .55); box-shadow: inset 0 0 0 1px rgba(214, 164, 62, .18); }
.bfc-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 240, 200, .12), transparent); }
@media (prefers-reduced-motion: no-preference) { .bfc-skel::after { animation: bfc-sheen 1.4s ease-in-out infinite; } }
@keyframes bfc-sheen { to { transform: translateX(100%); } }
.bfc-skel--row { height: 56px; }
.bfc-skel--card { height: 82px; }
.bfc-skel--tile { aspect-ratio: 1; border-radius: 12%; }
.bfc-skel--line { height: 14px; border-radius: 7px; }
.bfc-skel--floor { height: 360px; }
.bfc-skel-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 8px; }

/* ---------------------------------------------------------------- empty / error / coming-next states */
.bfc-state { display: grid; justify-items: center; gap: 12px; padding: 22px 16px 24px; text-align: center; }
.bfc-state__art { width: 150px; height: 150px; object-fit: contain; object-position: 50% 0; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); }
.bfc-state__title { font: 800 var(--bfc-fs-l)/1.25 var(--bfc-font-game); color: #fff; text-shadow: var(--bfc-outline); }
.bfc-state__text { max-width: 36ch; color: var(--bfc-ink-soft); font-size: var(--bfc-fs-m); }
.bfc-state--error .bfc-state__title { color: var(--bfc-ink-bad); }
.bfc-state--error .bfc-state__mark {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  font: 800 30px/1 var(--bfc-font-game); color: #fff; text-shadow: var(--bfc-outline);
  background: radial-gradient(circle at 35% 30%, #ffb2a6, #e0301c 55%, #6a0000); box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--bfc-gold-2), 0 0 0 6px #000;
}

/* the honest "coming next" screen: a closed gate with a plain list of what it will do */
.bfc-soon { display: grid; gap: 14px; }
.bfc-soon__crest { position: relative; display: grid; place-items: center; height: 190px; margin: 4px 0 -6px; }
.bfc-soon__crest img { max-height: 190px; width: auto; filter: grayscale(.35) brightness(.85) drop-shadow(0 8px 10px rgba(0, 0, 0, .6)); }
.bfc-soon__seal {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%) rotate(-4deg); padding: 6px 16px; border-radius: 6px;
  font: 800 14px/1 var(--bfc-font-game); letter-spacing: .08em; text-transform: uppercase; color: var(--bfc-ink-dark);
  background: linear-gradient(#fff3c4, #e2b450 60%, #b07a1c); box-shadow: 0 0 0 2px #000, 0 4px 0 rgba(0, 0, 0, .5);
}
.bfc-soon__list { display: grid; gap: 8px; list-style: none; }
.bfc-soon__list li { display: flex; gap: 10px; align-items: baseline; color: var(--bfc-ink-soft); font-size: var(--bfc-fs-m); }
.bfc-soon__list li::before { content: ""; flex: none; width: 9px; height: 9px; transform: rotate(45deg) translateY(-1px); background: linear-gradient(135deg, #fff6c2, #e2a73a); box-shadow: 0 0 0 1px #000; }
