/* Flutter: app_dialog.dart, app_toast.dart, modal.dart and loading.dart. */
html.app-feedback-locked, html.app-feedback-locked body { overflow: hidden !important; }
.app-dialog, .app-loading, .app-toast-host {
  --feedback-card: var(--app-modal-surface);
  --feedback-text: var(--app-modal-text);
  --feedback-secondary: rgb(0 0 0 / .5);
  --feedback-soft: rgb(0 0 0 / .045);
  --feedback-border: var(--app-modal-border);
  font-family: var(--app-modal-font);
  color: var(--feedback-text); box-sizing: border-box;
}
html[data-theme="dark"] .app-dialog, html[data-theme="dark"] .app-loading, html[data-theme="dark"] .app-toast-host {
  --feedback-secondary: rgb(246 246 246 / .62);
  --feedback-soft: rgb(255 255 255 / .08);
}
.app-dialog {
  position: fixed; inset: 0; width: min(320px, calc(100% - 56px)); max-width: none;
  max-height: calc(100dvh - 48px); margin: auto; padding: 20px 18px 16px;
  border: 1px solid var(--feedback-border); border-radius: var(--app-modal-confirm-radius); overflow: auto;
  background: var(--feedback-card);
  box-shadow: var(--app-modal-shadow); overscroll-behavior: contain;
}
.app-dialog[open] { animation: app-modal-enter var(--app-modal-duration) ease-out; }
.app-dialog h2 { margin: 0; color: var(--feedback-text); font-size: 18px; line-height: 1.4; font-weight: 600; text-align: center; }
.app-dialog-message { margin: 8px 0 0; font-size: 13px; line-height: 1.45; text-align: center; color: var(--feedback-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.app-dialog-actions { display: flex; gap: 10px; margin-top: 18px; }
.app-dialog button { font: inherit; cursor: pointer; }
.app-dialog-actions button {
  flex: 1; min-width: 0; min-height: 42px; padding: 9px 12px; border: 0; border-radius: 21px;
  background: var(--feedback-soft); color: rgb(0 0 0 / .62); font-size: 14.5px; line-height: 24px; font-weight: 600;
  overflow-wrap: anywhere; transition: filter .15s, transform .15s;
}
html[data-theme="dark"] .app-dialog-actions button { color: rgb(246 246 246 / .78); }
.app-dialog-actions .app-dialog-primary { color: #fff; background: var(--g-primary, #0092ff); }
.app-dialog[data-kind="danger"] .app-dialog-primary { background: #ef5350; }
.app-dialog button:hover { filter: brightness(.96); }
.app-dialog button:active { transform: scale(.98); }
.app-dialog :focus-visible, .app-toast-card :focus-visible { outline: 2px solid var(--g-primary, #0092ff); outline-offset: 3px; }
.app-dialog[data-kind="input"] { padding-top: 18px; border-radius: var(--app-modal-radius); }
.app-dialog[data-kind="input"] h2 { font-size: 17px; text-align: left; }
.app-dialog[data-kind="input"] .app-dialog-message { text-align: left; margin-top: 6px; }
.app-dialog-input { display: block; box-sizing: border-box; width: 100%; margin-top: 14px; padding: 12px; border: 0; border-radius: 14px; background: rgb(0 0 0 / .035); color: var(--feedback-text); font: inherit; font-size: 15px; line-height: 1.45; resize: vertical; }
html[data-theme="dark"] .app-dialog-input { background: rgb(255 255 255 / .05); }
.app-dialog-input::placeholder { color: var(--feedback-secondary); }
.app-dialog-counter { display: block; margin-top: 5px; text-align: right; font-size: 11px; color: var(--feedback-secondary); }
.app-dialog[data-kind="actions"] { width: min(640px, 100%); max-height: calc(100dvh - 24px); margin: auto auto 0; padding: 0 15px calc(15px + env(safe-area-inset-bottom)); border: 0; border-radius: var(--app-modal-radius) var(--app-modal-radius) 0 0; }
.app-sheet-handle { width: 30px; height: 5px; border-radius: 10px; background: #ccc; margin: 10px auto; }
html[data-theme="dark"] .app-sheet-handle { background: #ffffff22; }
.app-dialog[data-kind="actions"] h2 { font-size: 15px; padding: 5px 0; }
.app-dialog[data-kind="actions"] .app-dialog-message { margin: 0 0 10px; }
.app-sheet-option { display: flex; align-items: center; gap: 15px; width: 100%; min-height: 50px; margin: 10px 0; padding: 10px 20px; text-align: left; border: 0; border-radius: 10px; color: var(--feedback-text); background: var(--app-modal-soft); font-size: 15px !important; font-weight: 700 !important; }
.app-sheet-option[data-danger="true"] { color: #ef5350; }
.app-sheet-divider { height: 1px; margin: 10px 0; background: var(--feedback-border); }
.app-toast-host {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: max(48px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  border: 0; background: transparent; overflow: hidden; pointer-events: none; z-index: 2147483647;
  align-items: flex-end; justify-content: center;
}
.app-toast-host:popover-open, .app-toast-host.is-visible { display: flex; }
.app-toast-host::backdrop { background: transparent; pointer-events: none; }
.app-toast-host[data-gravity^="top"] { align-items: flex-start; }
.app-toast-host[data-gravity^="center"] { align-items: center; padding-block: 16px; }
.app-toast-host[data-gravity$="left"] { justify-content: flex-start; }
.app-toast-host[data-gravity$="right"] { justify-content: flex-end; }
.app-toast-card, .app-loading-card {
  display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 10px 16px; border-radius: 14px;
  background: #303030b3; color: #fff; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  font-size: 15px; font-weight: 400; line-height: 1.4; animation: app-toast-in .15s ease-out;
}
.app-toast-card.is-stacked, .app-loading-card { box-sizing: border-box; width: 120px; height: 120px; flex-direction: column; justify-content: center; gap: 15px; padding: 14px 12px; font-size: 14px; text-align: center; }
.app-toast-message { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.is-stacked .app-toast-message { -webkit-line-clamp: 3; }
.app-feedback-icon { display: block; width: 20px; height: 20px; flex-shrink: 0; }
.is-stacked > .app-feedback-icon { width: 45px; height: 45px; }
.app-toast-card.is-notification { width: 320px; pointer-events: auto; }
.app-toast-card.is-notification img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.app-toast-card.is-notification strong { display: block; margin-bottom: 3px; font-size: 14px; }
.app-toast-content { min-width: 0; flex: 1; }
.app-toast-dismiss { align-self: flex-start; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; font-size: 20px; line-height: 24px; width: 24px; flex-shrink: 0; }
.app-loading { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0; background: transparent; outline: none; }
.app-loading[open] { display: grid; place-items: center; }
#global-loading-text { overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.app-spinner { position: relative; display: block; width: 36px; height: 36px; flex-shrink: 0; }
.app-spinner i { position: absolute; left: 16px; top: 1px; width: 4px; height: 10px; border-radius: 3px; background: currentColor; transform-origin: 2px 17px; transform: rotate(calc(var(--tick) * 45deg)); animation: app-spinner-tick 1s linear infinite; animation-delay: calc(var(--tick) * -.125s); }
.app-loading[data-mode="page"] { background: var(--feedback-card); }
.app-page-loading { display: flex; flex-direction: column; align-items: center; padding-bottom: 100px; max-width: 100%; text-align: center; }
.app-page-animation { width: 200px; height: 150px; display: grid; place-items: center; color: #bbb; }
.app-page-loading #global-loading-text { width: 280px; max-width: 100%; color: #bbb; font-size: 14px; line-height: 1.8; }
.app-page-loading button { margin-top: 10px; padding: 3.5px 15px; border: 1px solid #bbb; border-radius: 100px; color: #bbb; font: inherit; font-size: 14px; background: transparent; cursor: pointer; }
@keyframes app-toast-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes app-spinner-tick { 0% { opacity: 1; } 100% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .app-dialog[open], .app-toast-card, .app-loading-card, .app-spinner i { animation: none; } .app-spinner i { opacity: calc(.2 + var(--tick) * .1); } }
