/* Unsaved-changes exit warning dialog (staged 2026-10-03). */
.tfh-exit[hidden] { display: none; }
.tfh-exit {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  font-family: inherit;
}
.tfh-exit__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.58);
}
.tfh-exit__dialog {
  position: relative;
  width: min(100%, 26rem);
  padding: clamp(1.4rem, 4vw, 1.9rem);
  border: 1px solid #e7e5e4;
  border-radius: 1.15rem;
  background: #fff;
  color: #1c1917;
  box-shadow: 0 1.5rem 4rem rgba(28, 25, 23, 0.25);
}
.tfh-exit__dialog:focus { outline: none; }
.tfh-exit__title {
  margin: 0 0 0.6rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 1.65rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.tfh-exit__body {
  margin: 0 0 1.4rem;
  color: #57534e;
  font-size: 1rem;
  line-height: 1.5;
}
.tfh-exit__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}
.tfh-exit__btn {
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.tfh-exit__btn--stay { background: #b45309; color: #fff; }
.tfh-exit__btn--stay:hover { filter: brightness(0.95); }
.tfh-exit__btn--leave { background: transparent; color: #1c1917; border-color: #d6d3d1; }
.tfh-exit__btn--leave:hover { border-color: #a8a29e; background: #faf7f2; }
.tfh-exit__btn:focus-visible { outline: 3px solid #1c1917; outline-offset: 2px; }
.tfh-exit__btn--stay:focus-visible { outline-color: #1c1917; box-shadow: 0 0 0 2px #fff; }
html.tfh-exit-open { overflow: hidden; }
@media (max-width: 480px) {
  .tfh-exit { align-items: end; padding: 0.75rem; }
  .tfh-exit__actions { flex-direction: column-reverse; }
  .tfh-exit__btn { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .tfh-exit:not([hidden]) .tfh-exit__dialog { animation: tfh-exit-in 140ms ease-out; }
  @keyframes tfh-exit-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
