/* DONEI product design system. Visual-only layer; all controls and page flows remain intact. */
:root {
  color-scheme: light;
  --ds-canvas: #fff;
  --ds-surface: #fff;
  --ds-subtle: #f7f7f5;
  --ds-subtle-strong: #f0f0ed;
  --ds-ink: #20211f;
  --ds-secondary: #50514e;
  --ds-muted: #73746f;
  --ds-line: #e6e6e2;
  --ds-line-strong: #d3d4ce;
  --ds-yellow: #f3c422;
  --ds-yellow-hover: #e7b70e;
  --ds-yellow-soft: #fff7d9;
  --ds-danger: #a54034;
  --ds-success: #236a50;
  --ds-radius-sm: 7px;
  --ds-radius-md: 12px;
  --ds-radius-lg: 18px;
  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 24px;
  --ds-space-6: 32px;
  --ds-space-7: 48px;
  --ds-space-8: 64px;
  --ds-shadow-pop: 0 14px 38px rgba(25,25,21,.08);
  --ds-ease: cubic-bezier(.2,.7,.2,1);
  --ds-fast: 140ms;
  --ds-normal: 220ms;
}

html:has(.wrap), body:has(.wrap) { background: var(--ds-canvas); color: var(--ds-ink); }
html .wrap { --bg: var(--ds-canvas); --panel: var(--ds-surface); --ink: var(--ds-ink); --text: var(--ds-ink); --muted: var(--ds-muted); --line: var(--ds-line); --accent: var(--ds-yellow); --purple: var(--ds-yellow); width: 100%; max-width: 1440px; padding-inline: clamp(20px,3.2vw,52px); }
html .wrap:not(.backend-wrap) { max-width: 1400px; }
html .wrap, html .wrap button, html .wrap input, html .wrap select, html .wrap textarea { font-family: 'Noto Sans TC', system-ui, sans-serif; }
html .wrap { font-size: 15px; line-height: 1.65; }
html .wrap :is(h1,h2,h3,h4) { color: var(--ds-ink); letter-spacing: -.035em; text-wrap: balance; }
html .wrap h1 { font-size: clamp(30px,3vw,44px); line-height: 1.22; font-weight: 800; }
html .wrap h2 { font-size: clamp(22px,2vw,30px); line-height: 1.3; font-weight: 750; }
html .wrap h3 { font-size: clamp(18px,1.35vw,22px); line-height: 1.38; font-weight: 700; }
html .wrap :is(p,li,td) { overflow-wrap: break-word; }
html .wrap :is(.muted,.small,.sub) { color: var(--ds-muted); }
html .wrap .small { font-size: 13px; line-height: 1.65; }
html .wrap .eyebrow { color: var(--ds-secondary); font-size: 11px; font-weight: 750; line-height: 1.4; letter-spacing: .13em; text-transform: uppercase; }
html .wrap .page-title { margin-block: var(--ds-space-7) var(--ds-space-6); }
html .wrap .page-title h1 { margin: 8px 0 10px; }
html .wrap .page-title p { max-width: 68ch; margin-block: 0; line-height: 1.7; }
html .wrap .section-top { margin-block: var(--ds-space-7) var(--ds-space-5); }

/* Global navigation keeps every original destination reachable at every width. */
html .wrap > header { min-height: 86px; height: auto; padding-block: 18px; gap: 24px; border-bottom: 1px solid var(--ds-line); }
html .wrap > header .brand { gap: 11px; flex: none; }
html .wrap > header .brand img { width: 42px; height: 42px; max-width: 42px; filter: none; }
html .wrap > header .brand strong { color: var(--ds-ink); font-size: 27px; line-height: 1; font-weight: 700; letter-spacing: .055em; }
html .wrap > header nav { display: flex; align-items: center; gap: clamp(12px,1.6vw,24px); min-width: 0; }
html .wrap > header nav a { color: var(--ds-secondary); font-size: 13px; font-weight: 650; line-height: 1.35; white-space: nowrap; transition: color var(--ds-fast), background var(--ds-fast), border-color var(--ds-fast); }
html .wrap > header nav a:hover, html .wrap > header nav a[aria-current=page] { color: var(--ds-ink); }
html .wrap > header nav a:last-child { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 8px 14px; border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-sm); background: #fff; }
html .wrap > header nav a:last-child:hover { background: var(--ds-subtle); border-color: #a6a7a0; }
html .wrap > footer { margin-top: var(--ds-space-8); padding-block: var(--ds-space-5) var(--ds-space-6); border-top: 1px solid var(--ds-line); color: var(--ds-muted); }
html .wrap > footer a:hover { color: var(--ds-ink); text-decoration: underline; text-underline-offset: 4px; }

/* A compact, predictable control language across public and authenticated pages. */
html .wrap .btn,
html .wrap button.btn { min-height: 44px; padding: 10px 18px; border: 1px solid var(--ds-yellow); border-radius: var(--ds-radius-sm); background: var(--ds-yellow); color: var(--ds-ink); font-size: 14px; line-height: 1.3; font-weight: 700; box-shadow: none; transition: background var(--ds-fast) var(--ds-ease),border-color var(--ds-fast) var(--ds-ease),color var(--ds-fast),transform var(--ds-fast) var(--ds-ease),box-shadow var(--ds-fast); }
html .wrap .btn:hover:not(:disabled) { background: var(--ds-yellow-hover); border-color: var(--ds-yellow-hover); color: var(--ds-ink); box-shadow: 0 4px 12px rgba(151,109,0,.11); transform: translateY(-1px); }
html .wrap .btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
html .wrap .btn.secondary { background: #fff; border-color: var(--ds-line-strong); color: var(--ds-ink); }
html .wrap .btn.secondary:hover:not(:disabled) { background: var(--ds-subtle); border-color: #a6a7a0; }
html .wrap .btn.danger { background: var(--ds-danger); border-color: var(--ds-danger); color: #fff; }
html .wrap .btn.danger:hover:not(:disabled) { background: #8e3126; border-color: #8e3126; color: #fff; }
html .wrap .btn.sm { min-height: 36px; padding: 7px 12px; font-size: 12px; }
html .wrap .btn:disabled, html .wrap button:disabled { opacity: .53; cursor: not-allowed; transform: none; box-shadow: none; }
/* Older palette sheets used a high-specificity :is() selector; keep button variants distinct. */
html .wrap:not(.backend-wrap) :is(.btn,.quick-form .donate-submit .btn,.reward-wall-grid .btn) { background: var(--ds-yellow); border-color: var(--ds-yellow); color: var(--ds-ink); }
html .wrap:not(.backend-wrap) :is(.btn,.quick-form .donate-submit .btn,.reward-wall-grid .btn):hover:not(:disabled) { background: var(--ds-yellow-hover); border-color: var(--ds-yellow-hover); color: var(--ds-ink); }
html .wrap:not(.backend-wrap) :is(.btn.secondary,.quick-form .donate-submit .btn.secondary,.reward-wall-grid .btn.secondary) { background: #fff; border-color: var(--ds-line-strong); color: var(--ds-ink); }
html .wrap:not(.backend-wrap) :is(.btn.secondary,.quick-form .donate-submit .btn.secondary,.reward-wall-grid .btn.secondary):hover:not(:disabled) { background: var(--ds-subtle); border-color: #a6a7a0; color: var(--ds-ink); }
html .wrap:not(.backend-wrap) :is(.btn.danger,.quick-form .donate-submit .btn.danger,.reward-wall-grid .btn.danger) { background: var(--ds-danger); border-color: var(--ds-danger); color: #fff; }
html .wrap:not(.backend-wrap) :is(.btn.danger,.quick-form .donate-submit .btn.danger,.reward-wall-grid .btn.danger):hover:not(:disabled) { background: #8e3126; border-color: #8e3126; color: #fff; }
html .wrap:not(.backend-wrap) :is(.btn,.quick-form .donate-submit .btn,.reward-wall-grid .btn):disabled { background: var(--ds-subtle-strong); border-color: var(--ds-line); color: var(--ds-muted); }
html .wrap :is(a,button,summary,input,select,textarea):focus-visible { outline: 2px solid #a77d00; outline-offset: 3px; }
html .wrap :is(a,button,summary):focus:not(:focus-visible) { outline: none; }
html .wrap .field { margin-block: var(--ds-space-5); }
html .wrap .field > span { margin-bottom: 8px; color: var(--ds-secondary); font-size: 13px; line-height: 1.5; font-weight: 650; }
html .wrap :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { min-width: 0; min-height: 44px; border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-sm); background: #fff; color: var(--ds-ink); font-size: 14px; line-height: 1.5; transition: border-color var(--ds-fast),background var(--ds-fast),box-shadow var(--ds-fast); }
html .wrap :is(input:not([type=checkbox]):not([type=radio]),select,textarea):hover:not(:disabled) { border-color: #a8a9a2; }
html .wrap :is(input:not([type=checkbox]):not([type=radio]),select,textarea):focus { border-color: #a77d00; outline: none; box-shadow: 0 0 0 3px rgba(243,196,34,.22); }
html .wrap :is(input,textarea)::placeholder { color: #898a84; opacity: 1; }
html .wrap :is(input,select,textarea):disabled { background: var(--ds-subtle); color: var(--ds-muted); cursor: not-allowed; }
html .wrap :is(input,select,textarea)[aria-invalid=true], html .wrap .field.error :is(input,select,textarea) { border-color: var(--ds-danger); box-shadow: 0 0 0 3px rgba(165,64,52,.09); }
html .wrap :is(input,select,textarea)[aria-invalid=false] { border-color: var(--ds-success); }
html .wrap :is(input[type=checkbox],input[type=radio]) { width: 18px; height: 18px; flex: none; accent-color: #bb8d00; }
html .wrap input[type=file] { width: 100%; padding: 7px 9px; }
html .wrap input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 12px; border: 1px solid var(--ds-line-strong); border-radius: 5px; background: var(--ds-subtle); color: var(--ds-ink); font: inherit; cursor: pointer; }
html .wrap input[type=file]::file-selector-button:hover { background: var(--ds-yellow-soft); }
html .wrap .check { gap: 10px; line-height: 1.55; }
html .wrap .check a, html .wrap .field a { text-decoration: underline; text-decoration-color: #b1b2aa; text-underline-offset: 3px; }
html .wrap :is(.error,.donor-field-error), html .wrap form[data-save-state=error] .form-save-status { color: var(--ds-danger); }
html .wrap :is(.success), html .wrap form[data-save-state=saved] .form-save-status { color: var(--ds-success); }
html .wrap :is(.note,.member-choice,.info-strip) { border-color: var(--ds-line); background: var(--ds-subtle); color: var(--ds-secondary); }
html .wrap .note { border-left: 2px solid #d6af2a; border-radius: 0 var(--ds-radius-sm) var(--ds-radius-sm) 0; }
html .wrap .badge { border: 1px solid #e8d99d; border-radius: 4px; background: var(--ds-yellow-soft); color: #514112; font-size: 11px; font-weight: 650; }

/* Panels are for true groups; metrics and empty states use the page canvas. */
html .wrap .panel { border: 1px solid var(--ds-line); border-radius: var(--ds-radius-md); background: var(--ds-surface); box-shadow: none; }
html .wrap .panel h2 { margin-bottom: var(--ds-space-5); }
html .wrap .layout { gap: var(--ds-space-5); }
html .wrap .stats, html .wrap .admin-overview-stats { gap: 0; margin-block: var(--ds-space-5); border-top: 1px solid var(--ds-line); border-bottom: 1px solid var(--ds-line); }
html .wrap .stats > .stat, html .wrap .admin-overview-stats > .stat, html .backend-wrap .admin-overview-stats .stat { min-width: 0; margin: 0; padding: 20px 22px; border: 0; border-right: 1px solid var(--ds-line); border-radius: 0; background: transparent; box-shadow: none; }
html .wrap .stats > .stat:last-child, html .wrap .admin-overview-stats > .stat:last-child { border-right: 0; }
html .wrap .stat > span { color: var(--ds-muted); font-size: 12px; line-height: 1.5; }
html .wrap .stat strong { display: block; margin: 8px 0 3px; color: var(--ds-ink); font-size: clamp(23px,2.3vw,32px); line-height: 1.25; font-weight: 750; font-variant-numeric: tabular-nums; }
html .wrap .stat small { color: var(--ds-muted); font-size: 12px; }
html .wrap .panel:has(> .stats > p:only-child) > .stats { display: block; margin-block: var(--ds-space-4) 0; padding-block: var(--ds-space-4); border-bottom: 0; }
html .wrap .panel:has(> .stats > p:only-child) > .stats p { max-width: 62ch; margin: 0; }
html .wrap .empty { min-height: 90px; display: grid; place-items: center; padding: var(--ds-space-5); color: var(--ds-muted); font-size: 14px; }
html .wrap .tabs { gap: 4px; padding: 3px; width: fit-content; max-width: 100%; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-sm); background: var(--ds-subtle); }
html .wrap .tabs a { min-height: 37px; display: inline-flex; align-items: center; padding: 7px 13px; border: 0; border-radius: 5px; color: var(--ds-secondary); font-size: 13px; font-weight: 600; transition: background var(--ds-fast),color var(--ds-fast); }
html .wrap .tabs a:hover { background: #fff; color: var(--ds-ink); }
html .wrap .tabs a.active, html .wrap .tabs a[aria-current=page] { background: #fff; color: var(--ds-ink); box-shadow: 0 1px 4px rgba(30,30,25,.08); }
html .wrap .table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-sm); }
html .wrap table { min-width: 650px; font-size: 13px; font-variant-numeric: tabular-nums; }
html .wrap :is(th,td) { padding: 13px 15px; border-bottom: 1px solid var(--ds-line); vertical-align: top; }
html .wrap th { background: var(--ds-subtle); color: var(--ds-secondary); font-size: 11px; font-weight: 700; letter-spacing: .035em; white-space: nowrap; }
html .wrap tbody tr { transition: background var(--ds-fast); }
html .wrap tbody tr:hover { background: #fafaf8; }
html .wrap tbody tr:last-child td { border-bottom: 0; }
html .wrap details > summary { cursor: pointer; transition: color var(--ds-fast),background var(--ds-fast); }
html .wrap details > summary:hover { color: #775900; }
html .wrap dialog { max-width: min(620px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-lg); background: #fff; color: var(--ds-ink); box-shadow: var(--ds-shadow-pop); animation: ds-dialog-in var(--ds-normal) var(--ds-ease) both; }
html .wrap dialog::backdrop { background: rgba(26,27,25,.45); }
@keyframes ds-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Homepage: one strong editorial hero, quieter supporting sections. */
html .wrap:not(.backend-wrap) .simple-home .simple-intro { min-height: 510px; margin: 26px 0 var(--ds-space-8); padding: clamp(40px,5vw,72px); gap: clamp(32px,5vw,72px); border-radius: var(--ds-radius-md); background: var(--ds-subtle); }
html .wrap:not(.backend-wrap) .simple-intro .eyebrow { padding: 0; border-radius: 0; background: transparent; color: #765d00; font-size: 11px; letter-spacing: .12em; }
html .wrap:not(.backend-wrap) .simple-home .simple-intro h1 { max-width: 10em; margin: 20px 0; font-size: clamp(43px,4.3vw,61px); line-height: 1.2; font-weight: 800; letter-spacing: -.055em; }
html .wrap:not(.backend-wrap) .simple-home .simple-intro p { max-width: 36em; margin-bottom: 30px; color: var(--ds-secondary); font-size: 15px; line-height: 1.85; }
html .simple-home .donei-hero-actions .btn { min-height: 46px; border-radius: var(--ds-radius-sm); }
html .simple-home .donei-guide-link { color: var(--ds-secondary); }
html .simple-home .donei-guide-link:hover { color: var(--ds-ink); text-decoration: underline; text-underline-offset: 4px; }
.donei-hero-showcase { min-height: 355px; border: 1px solid #e9e0bd; border-radius: var(--ds-radius-md); background: #f6edcc; }
.showcase-window { transform: rotate(-1deg); box-shadow: 0 16px 35px rgba(82,68,20,.1); }
.showcase-spark { display: none; }
html .wrap:not(.backend-wrap) .simple-home :is(.hg-payments,.artist-selection,.home-guide) { scroll-margin-top: 24px; }
html .wrap:not(.backend-wrap) .simple-home .hg-payments { margin-bottom: var(--ds-space-8); }
html .wrap:not(.backend-wrap) .simple-home .hg-payment-grid article { min-height: 0; padding: 26px; border-radius: var(--ds-radius-sm); background: var(--ds-subtle); }
html .simple-home .hg-payment-grid h4 { font-size: 18px; }
html .wrap:not(.backend-wrap) .simple-home .artist-selection { padding-block: var(--ds-space-8); }
html .simple-home .artist-avatar { border-radius: var(--ds-radius-sm); }
html .simple-home .artist-avatar:hover { transform: translateY(-3px); box-shadow: var(--ds-shadow-pop); }
html .wrap:not(.backend-wrap) .simple-home .artist-avatar .artist-avatar-name { border-top-width: 2px; }
html .wrap:not(.backend-wrap) .home-guide { padding-top: var(--ds-space-8); }
html .wrap:not(.backend-wrap) .home-guide .hg-step { overflow: visible; border: 0; border-top: 1px solid var(--ds-line); border-radius: 0; background: transparent; }
html .wrap:not(.backend-wrap) .home-guide .hg-illustration { margin-top: 14px; border-radius: var(--ds-radius-sm); background: var(--ds-subtle); }
html .wrap:not(.backend-wrap) .home-guide .hg-copy { padding: 20px 0; }
html .wrap:not(.backend-wrap) .home-guide .hg-member { border-radius: var(--ds-radius-sm); background: var(--ds-yellow-soft); }
html .wrap:not(.backend-wrap) .home-guide .hg-faq { margin-top: var(--ds-space-7); }
html .wrap .hg-animate :is(.hg-pick,.hg-write,.hg-confirm,.hg-pop,.hg-spark) { animation-iteration-count: 1; }

/* Donation: keep all fields and both methods, but give the action a clearer rhythm. */
html .wrap .quick-donate .donor-cover { border: 0; border-radius: var(--ds-radius-sm); }
html .wrap .quick-donate .quick-layout { gap: var(--ds-space-5); }
html .wrap .quick-donate .quick-aside .panel, html .wrap .quick-donate .quick-form { border-color: var(--ds-line); border-radius: var(--ds-radius-sm); }
html .wrap .quick-donate .quick-form { padding: clamp(22px,2.8vw,38px); }
html .wrap .quick-donate .quick-form > label.field { margin-block: var(--ds-space-5); }
html .wrap .quick-donate .quick-form > label.field > span:first-child { color: var(--ds-secondary); font-size: 13px; }
html .wrap .quick-donate .quick-form > label.field > small { font-size: 12px; }
html .wrap .quick-donate .quick-form > label.field > :is(input,textarea) { border-color: var(--ds-line-strong); border-radius: var(--ds-radius-sm); }
html .wrap .quick-donate .donation-method { border-color: var(--ds-line); border-radius: var(--ds-radius-sm); transition: background var(--ds-fast),border-color var(--ds-fast),box-shadow var(--ds-fast),transform var(--ds-fast); }
html .wrap .quick-donate .donation-method:hover { border-color: #b9a044; transform: translateY(-1px); }
html .wrap .quick-donate .donation-method.active { background: var(--ds-yellow-soft); border-color: #cfb348; box-shadow: inset 2px 0 var(--ds-yellow); }
html .wrap .quick-donate .video-sponsor { background: var(--ds-subtle); border-color: var(--ds-line); border-radius: var(--ds-radius-sm); }
html .wrap .quick-donate .video-sponsor.is-active { background: var(--ds-yellow-soft); border-color: #ddc46a; }
html .wrap .quick-donate .donor-order-summary { background: var(--ds-subtle); border: 0; border-top: 1px solid var(--ds-line); border-bottom: 1px solid var(--ds-line); border-radius: 0; }
html .wrap .quick-donate .donate-submit .btn { min-height: 48px; border-radius: var(--ds-radius-sm); }
html .wrap .quick-donate > .page-ranking { border-color: var(--ds-line); border-radius: var(--ds-radius-sm); }

/* Authenticated workspaces: fewer boxes, denser but calmer data. */
html .backend-wrap .backend-frame { grid-template-columns: 224px minmax(0,1fr); gap: clamp(24px,3vw,42px); margin-top: var(--ds-space-6); }
html .backend-wrap .backend-frame .backend-sidebar { top: 18px; padding: 15px 10px; border: 0; border-radius: var(--ds-radius-md); background: #242522; }
html .backend-wrap .backend-sidebar h2 { margin: 5px 11px 12px; color: #d8bd58; font-size: 11px; }
html .backend-wrap .backend-sidebar .backend-nav { gap: 2px; }
html .backend-wrap .backend-sidebar .backend-nav a { min-height: 43px; padding: 9px 11px; border: 0; border-radius: 6px; color: #e7e7e3; font-size: 13px; font-weight: 550; transition: color var(--ds-fast),background var(--ds-fast); }
html .backend-wrap .backend-sidebar .backend-nav a:hover { background: #363833; color: #fff; }
html .backend-wrap .backend-sidebar .backend-nav a.active { background: var(--ds-yellow); color: #242522; font-weight: 750; }
html .backend-wrap .backend-nav-icon { background: #383a36; color: #e9e9e4; }
html .backend-wrap .backend-nav .active .backend-nav-icon { background: #242522; color: var(--ds-yellow); }
html .backend-wrap .backend-main { min-width: 0; }
html .backend-wrap .backend-main .page-title { margin: 0 0 var(--ds-space-6); }
html .backend-wrap .backend-main .panel { padding: clamp(20px,2.3vw,30px); border-color: var(--ds-line); border-radius: var(--ds-radius-md); }
html .backend-wrap .backend-main .panel > h2:first-child { margin-bottom: var(--ds-space-5); }
html .backend-wrap .backend-main .eyebrow { padding: 0; border: 0; border-radius: 0; background: transparent; color: #796516; }
html .wrap.backend-wrap .backend-main .btn { background: var(--ds-yellow); border-color: var(--ds-yellow); color: var(--ds-ink); }
html .wrap.backend-wrap .backend-main .btn:hover:not(:disabled) { background: var(--ds-yellow-hover); border-color: var(--ds-yellow-hover); color: var(--ds-ink); }
html .wrap.backend-wrap .backend-main .btn.secondary { background: #fff; border-color: var(--ds-line-strong); color: var(--ds-ink); }
html .wrap.backend-wrap .backend-main .btn.secondary:hover:not(:disabled) { background: var(--ds-subtle); border-color: #a6a7a0; color: var(--ds-ink); }
html .wrap.backend-wrap .backend-main .btn.danger { background: var(--ds-danger); border-color: var(--ds-danger); color: #fff; }
html .wrap.backend-wrap .backend-main .btn.danger:hover:not(:disabled) { background: #8e3126; border-color: #8e3126; color: #fff; }
html .backend-wrap .backend-main .admin-overview-stats { margin-bottom: var(--ds-space-5); }
html .backend-wrap .backend-main .admin-orders-panel { padding: clamp(20px,2.3vw,30px); }
html .backend-wrap .backend-main .admin-advanced summary { min-height: 54px; align-items: center; }
html .backend-wrap .backend-main .form-savebar { gap: 12px; border-color: var(--ds-line); border-radius: var(--ds-radius-sm); background: #fffdf5; box-shadow: 0 8px 26px rgba(25,25,21,.08); }
html .backend-wrap .backend-main .form-savebar .btn { min-width: 126px; }
html .backend-wrap .backend-main :is(.obs-settings-fold,.obs-source-box,.code) { border-color: var(--ds-line); background: var(--ds-subtle); border-radius: var(--ds-radius-sm); }
html .backend-wrap .backend-main .order-report th { background: var(--ds-subtle); color: var(--ds-secondary); }

/* Initial route data loads can otherwise produce a blank white flash. */
body:not(.overlay-body) #app:empty { max-width: 1360px; margin: auto; padding: 32px clamp(20px,3.2vw,52px); }
body:not(.overlay-body) #app:empty::before, body:not(.overlay-body) #app:empty::after { content: ''; display: block; border-radius: var(--ds-radius-sm); background: linear-gradient(100deg,#f4f4f1 25%,#ededeb 45%,#f4f4f1 65%); background-size: 220% 100%; animation: ds-shimmer 1.5s ease-in-out infinite; }
body:not(.overlay-body) #app:empty::before { width: 180px; height: 42px; margin-bottom: 44px; }
body:not(.overlay-body) #app:empty::after { width: 100%; height: min(44vw,420px); }
@keyframes ds-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
html .wrap > main { animation: ds-page-in var(--ds-normal) var(--ds-ease) both; }
@keyframes ds-page-in { from { opacity: .7; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1024px) {
  html .backend-wrap .backend-frame { grid-template-columns: 196px minmax(0,1fr); gap: 22px; }
  html .wrap .stats, html .wrap .admin-overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html .wrap .stats > .stat:nth-child(2), html .wrap .admin-overview-stats > .stat:nth-child(2) { border-right: 0; }
  html .wrap .stats > .stat:nth-child(n+3), html .wrap .admin-overview-stats > .stat:nth-child(n+3) { border-top: 1px solid var(--ds-line); }
}
@media (min-width: 621px) {
  html .wrap .stats:has(> .stat:nth-child(3):last-child), html .wrap .admin-overview-stats:has(> .stat:nth-child(3):last-child) { grid-template-columns: repeat(3,minmax(0,1fr)); }
  html .wrap .stats:has(> .stat:nth-child(3):last-child) > .stat, html .wrap .admin-overview-stats:has(> .stat:nth-child(3):last-child) > .stat { border-top: 0; border-right: 1px solid var(--ds-line); }
  html .wrap .stats:has(> .stat:nth-child(3):last-child) > .stat:last-child, html .wrap .admin-overview-stats:has(> .stat:nth-child(3):last-child) > .stat:last-child { border-right: 0; }
}
@media (max-width: 768px) {
  html .wrap { padding-inline: 22px; }
  html .wrap > header { min-height: 74px; }
  html .backend-wrap .backend-frame { display: flex; flex-direction: column; gap: 20px; }
  html .backend-wrap .backend-frame .backend-sidebar { position: static; width: 100%; max-height: none; padding: 10px; }
  html .backend-wrap .backend-menu-toggle { min-height: 42px; padding: 9px 12px; color: var(--ds-yellow); }
  html .backend-wrap .backend-main { width: 100%; }
  html .backend-wrap .backend-main .layout, html .backend-wrap .backend-main .grid { grid-template-columns: minmax(0,1fr); }
  html .wrap .layout { grid-template-columns: minmax(0,1fr); }
  html .wrap .tabs { width: 100%; }
  html .wrap .tabs a { flex: 1 1 auto; justify-content: center; }
  html .wrap:not(.backend-wrap) .simple-home .simple-intro { min-height: 0; padding: 42px; }
}
@media (max-width: 620px) {
  html .wrap { padding-inline: 18px; }
  html .wrap > header { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-block: 16px 13px; }
  html .wrap > header .brand { width: 100%; justify-content: flex-start; }
  html .wrap > header .brand img { width: 34px; height: 34px; }
  html .wrap > header .brand strong { font-size: 23px; }
  html .wrap > header nav { display: flex; width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 5px 14px; }
  html .wrap > header nav > a:first-child, body:has(.quick-donate) header nav > a:first-child { display: inline-flex !important; }
  html .wrap > header nav a { min-height: 34px; display: inline-flex; align-items: center; font-size: 12px; }
  html .wrap > header nav a:last-child { min-height: 34px; padding: 5px 9px; }
  html .wrap .page-title { margin-block: var(--ds-space-6) var(--ds-space-5); }
  html .wrap .section-top { margin-block: var(--ds-space-6) var(--ds-space-4); }
  html .wrap .panel, html .backend-wrap .backend-main .panel { padding: 20px; }
  html .wrap .stats, html .wrap .admin-overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); margin-block: var(--ds-space-4); }
  html .wrap .stats > .stat, html .wrap .admin-overview-stats > .stat, html .backend-wrap .admin-overview-stats .stat { padding: 15px 10px; border-right: 0; border-top: 1px solid var(--ds-line); }
  html .wrap .stats > .stat:nth-child(odd), html .wrap .admin-overview-stats > .stat:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--ds-line); }
  html .wrap .stats > .stat:nth-child(even), html .wrap .admin-overview-stats > .stat:nth-child(even) { padding-right: 0; }
  html .wrap .stats > .stat:nth-child(-n+2), html .wrap .admin-overview-stats > .stat:nth-child(-n+2) { border-top: 0; }
  html .wrap .stats:has(> .stat:nth-child(3):last-child) > .stat:last-child, html .wrap .admin-overview-stats:has(> .stat:nth-child(3):last-child) > .stat:last-child { grid-column: 1 / -1; padding-inline: 0; border-right: 0; }
  html .wrap .tabs { gap: 2px; padding: 3px; }
  html .wrap .tabs a { min-height: 36px; padding: 6px 9px; font-size: 12px; }
  html .wrap:not(.backend-wrap) .simple-home .simple-intro { margin-block: 14px var(--ds-space-7); padding: 30px 23px; gap: 27px; }
  html .wrap:not(.backend-wrap) .simple-home .simple-intro h1 { font-size: clamp(34px,9vw,44px); }
  html .wrap:not(.backend-wrap) .simple-home .simple-intro p { font-size: 14px; }
  .donei-hero-showcase { min-height: 230px; padding: 15px; }
  .showcase-window { transform: none; }
  html .wrap:not(.backend-wrap) .simple-home .hg-payments { margin-bottom: var(--ds-space-7); }
  html .wrap:not(.backend-wrap) .simple-home .artist-selection { padding-block: var(--ds-space-7); }
  html .wrap:not(.backend-wrap) .home-guide { padding-top: var(--ds-space-7); }
  html .wrap .quick-donate .quick-form { padding: 20px; }
  html .wrap .quick-donate .donation-method { min-height: 66px; }
  html .wrap .quick-donate .donate-submit .btn { width: 100%; min-height: 50px; }
  html .wrap dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 20px; border-radius: var(--ds-radius-md); }
  html .backend-wrap .backend-main .form-savebar { bottom: 0; margin-inline: -10px; border-radius: var(--ds-radius-sm) var(--ds-radius-sm) 0 0; }
  html .backend-wrap .backend-main .form-savebar .btn { width: 100%; }
}
@media (max-width: 430px) {
  html .wrap { padding-inline: 16px; }
  html .wrap > header nav { gap: 4px 11px; }
  html .wrap > header nav a { font-size: 11.5px; }
  html .wrap .page-title h1 { font-size: 29px; }
  html .wrap .tabs { justify-content: flex-start; flex-wrap: wrap; overflow: visible; }
  html .wrap .tabs a { flex: 1 1 auto; white-space: nowrap; }
  html .wrap .quick-donate .quick-identity .actions { padding-left: 0; }
  html .wrap .quick-donate .quick-identity .actions a { min-height: 38px; display: inline-flex; align-items: center; }
  html .wrap .quick-donate .donation-methods { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html .wrap .quick-donate .donation-method { min-width: 0; padding: 7px; }
  html .wrap .quick-donate .donation-method small { font-size: 10px; }
}
@media (max-width: 340px) {
  html .wrap .stats, html .wrap .admin-overview-stats { grid-template-columns: minmax(0,1fr); }
  html .wrap .stats > .stat, html .wrap .admin-overview-stats > .stat { padding-inline: 0; border-right: 0 !important; border-top: 1px solid var(--ds-line) !important; }
  html .wrap .stats > .stat:first-child, html .wrap .admin-overview-stats > .stat:first-child { border-top: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  html .wrap *, body:not(.overlay-body) #app:empty::before, body:not(.overlay-body) #app:empty::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
