/* 网页内确认 / 输入弹窗，使用独立 top layer 保留下方页面与弹窗。 */
.app-dialog {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 40px);
  margin: auto; padding: 0; overflow: auto; color: var(--text);
  border: 1px solid #3a404b; border-radius: 20px; background: #20252d;
  box-shadow: 0 32px 100px #0009, 0 2px 8px #0005; color-scheme: dark;
}
.app-dialog::backdrop { background: #080b12b3; backdrop-filter: blur(5px); }
.app-dialog[open] { animation: dialog-enter .16s ease-out; }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.app-dialog-content { padding: 26px 28px 24px; }
.app-dialog-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 19px; }
.app-dialog-symbol { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; border: 1px solid #f0b90b30; background: #f0b90b12; color: #f2cc54; }
.app-dialog-symbol .icon { width: 23px; height: 23px; }
.app-dialog.is-danger .app-dialog-symbol { color: #ff7a8c; border-color: #f6465d35; background: #f6465d14; }
.app-dialog-close { width: 30px; height: 30px; margin: -4px -6px 0 0; color: #8f98a7; border-radius: 8px; }
.app-dialog h2 { margin: 0; font-size: 22px; font-weight: 650; line-height: 1.4; letter-spacing: -.4px; }
.app-dialog-description { margin: 10px 0 0; color: #9ba4b3; font-size: 13px; line-height: 1.8; }
.app-dialog-subject { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 12px 14px; border: 1px solid #39414c; border-radius: 10px; background: #181d25; color: #dce1e8; }
.app-dialog-subject > .icon { color: #8993a3; }
.app-dialog-subject span { min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.app-dialog-details { display: grid; gap: 10px; margin: 17px 0 0; padding: 0; list-style: none; }
.app-dialog-details li { display: flex; gap: 9px; align-items: flex-start; color: #9ba4b3; font-size: 12px; line-height: 1.7; }
.app-dialog-details .icon { margin-top: 2px; color: #747f91; }
.app-dialog-footer { display: flex; gap: 10px; padding: 18px 28px 22px; border-top: 1px solid #ffffff0a; background: #1c212933; }
.app-dialog-footer button { display: inline-flex; align-items: center; justify-content: center; flex: 1; min-height: 42px; padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: background .15s, border-color .15s, opacity .15s; }
.app-dialog-cancel { border: 1px solid #444c5a; background: #2a303b; color: #d4dae3; }
.app-dialog-cancel:hover { border-color: #5b6575; background: #333b48; }
.app-dialog-confirm { background: #f0c443; color: #1c2028; }
.app-dialog-confirm:hover:not(:disabled) { background: #ffda66; }
.app-dialog.is-danger .app-dialog-confirm { background: #e54b61; color: #fff; }
.app-dialog.is-danger .app-dialog-confirm:hover { background: #f36176; }
.app-dialog-confirm:disabled { opacity: .4; }
.app-dialog button:focus-visible { outline: 2px solid #d5deec; outline-offset: 3px; }
.app-dialog-field { margin-top: 22px; }
.app-dialog-field label { display: block; margin-bottom: 9px; color: #c6cfdb; font-size: 12px; font-weight: 600; }
.app-dialog-field input { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid #414b5c; border-radius: 10px; background: #151a22; color: #eaecef; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.app-dialog-field input:focus { border-color: #c9a43e; box-shadow: 0 0 0 3px #f0b90b12; }
.app-dialog-field input::placeholder { color: #667185; }
.app-dialog-input-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: #7f8999; font-size: 11px; line-height: 1.6; }
.app-dialog-input-meta [data-dialog-count] { flex: none; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .app-dialog { width: calc(100vw - 28px); border-radius: 18px; }
  .app-dialog-content { padding: 22px 22px 20px; }
  .app-dialog-footer { padding: 16px 22px 20px; }
  .app-dialog h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .app-dialog[open] { animation: none; } }
