/* 普通未保存离页确认；使用现有主题变量，保留日夜模式。 */
.tul-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(0 0 0 / 60%);
}
.tul-dialog {
  box-sizing: border-box;
  width: min(100%, 440px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--border-color, #54545c);
  border-radius: 14px;
  background: var(--bg-primary, #191b22);
  color: var(--text-primary, #f6f4ed);
  box-shadow: 0 18px 70px rgb(0 0 0 / 30%);
  overflow-wrap: anywhere;
}
.tul-dialog h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.5; font-weight: 700; }
.tul-dialog p { margin: 0; color: var(--text-secondary, #c8c5bc); font-size: 15px; line-height: 1.7; }
.tul-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.tul-actions button {
  min-height: 44px;
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border-color, #54545c);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  background: var(--bg-card, #252731);
  color: var(--text-primary, #f6f4ed);
}
.tul-actions .tul-leave { background: #a72b25; border-color: #a72b25; color: #fff; }
.tul-actions button:focus-visible { outline: 3px solid var(--accent-primary, #c7a147); outline-offset: 3px; }
html.light-mode .tul-dialog { background: var(--bg-primary, #fffdf7); color: var(--text-primary, #302b24); }
html.light-mode .tul-dialog p { color: var(--text-secondary, #665f54); }
html.light-mode .tul-actions .tul-stay { background: var(--bg-card, #f4efe4); color: var(--text-primary, #302b24); }
@media (max-width: 420px) {
  .tul-dialog { padding: 20px; }
  .tul-actions { flex-direction: column; }
  .tul-actions button { width: 100%; }
}
