/* ---------------------------------------------------------------------- */
/* Design tokens                                                          */
/* ---------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  --bg: #f6f7fb;
  --bg-hero-1: #eef1ff;
  --bg-hero-2: #f9eefc;
  --bg-hero-3: #eafcf4;
  --surface: #ffffff;
  --surface-2: #f1f2f7;
  --border: #e5e7f0;
  --text: #14151f;
  --muted: #6b7080;
  --muted-2: #9296a3;

  --accent: #3a5cf0;
  --accent-hover: #2c48d6;
  --accent-tint: rgba(58, 92, 240, 0.1);
  --accent-ring: rgba(58, 92, 240, 0.22);
  --accent-contrast: #ffffff;

  --danger: #e5484d;
  --danger-tint: rgba(229, 72, 77, 0.1);
  --ok: #12b76a;
  --ok-tint: rgba(18, 183, 106, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 21, 31, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(20, 21, 31, 0.16), 0 2px 6px rgba(20, 21, 31, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(20, 21, 31, 0.28), 0 4px 12px rgba(20, 21, 31, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", "Inter",
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d12;
    --bg-hero-1: #14162a;
    --bg-hero-2: #1c1424;
    --bg-hero-3: #0f1f1c;
    --surface: #16171f;
    --surface-2: #1d1f29;
    --border: #2a2c38;
    --text: #f1f2f8;
    --muted: #9a9eae;
    --muted-2: #6f7383;

    --accent: #6f8dff;
    --accent-hover: #86a0ff;
    --accent-tint: rgba(111, 141, 255, 0.16);
    --accent-ring: rgba(111, 141, 255, 0.3);
    --accent-contrast: #0c0d12;

    --danger: #ff6b70;
    --danger-tint: rgba(255, 107, 112, 0.14);
    --ok: #34d399;
    --ok-tint: rgba(52, 211, 153, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}

/* ---------------------------------------------------------------------- */
/* Base                                                                   */
/* ---------------------------------------------------------------------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.35rem; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; margin-bottom: 1rem; }
p { margin: 0 0 0.5rem; }
p:empty { display: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--accent-tint); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------- */
/* Layout                                                                 */
/* ---------------------------------------------------------------------- */

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.wrap.wide { max-width: 1080px; }

.hero-bg {
  min-height: 100vh;
  background:
    radial-gradient(46rem 34rem at 18% 15%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(50rem 38rem at 100% 100%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(155deg, #dde3ff 0%, #cdd6ff 20%, #e2cbfb 42%, #f8cfe6 62%, #cdf3e0 84%, #c7ecf9 100%);
  background-attachment: fixed;
}

@media (prefers-color-scheme: dark) {
  .hero-bg {
    background:
      radial-gradient(46rem 34rem at 18% 15%, rgba(255, 255, 255, 0.05), transparent 60%),
      radial-gradient(50rem 38rem at 100% 100%, rgba(255, 255, 255, 0.04), transparent 55%),
      linear-gradient(155deg, #12142a 0%, #191233 20%, #2a1638 42%, #331b2c 62%, #10261f 84%, #0e1f2b 100%);
    background-attachment: fixed;
  }
}

.center-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.page-hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.page-hero h1 { margin-bottom: 0.4rem; }
.page-hero .hint { font-size: 0.95rem; }

/* ---------------------------------------------------------------------- */
/* Brand                                                                  */
/* ---------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

a.brand:hover { opacity: 0.8; text-decoration: none; }
a.brand:active { transform: scale(0.98); }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #7b5cf0);
  color: #fff;
  flex: none;
  box-shadow: var(--shadow-sm);
}

.brand-mark svg { width: 18px; height: 18px; }

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.brand-lockup .brand { font-size: 1.3rem; }

/* ---------------------------------------------------------------------- */
/* Cards & surfaces                                                       */
/* ---------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.card.floating {
  box-shadow: var(--shadow-lg);
  animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .card.floating { animation: none; }
}

/* ---------------------------------------------------------------------- */
/* Forms                                                                  */
/* ---------------------------------------------------------------------- */

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0.7rem 0 0.3rem;
}

label:first-child { margin-top: 0; }

input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input::placeholder { color: var(--muted-2); }

input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                */
/* ---------------------------------------------------------------------- */

button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 650;
  font-family: inherit;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}

button:hover { background: var(--accent-hover); }
button:active { transform: translateY(1px) scale(0.99); }

button.secondary {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text);
  box-shadow: none;
}
button.secondary:hover { background: var(--border); }

button.danger {
  background: var(--danger-tint);
  color: var(--danger);
  box-shadow: none;
}
button.danger:hover { background: var(--danger); color: #fff; }

button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

button.block { width: 100%; }

/* ---------------------------------------------------------------------- */
/* Utility rows                                                          */
/* ---------------------------------------------------------------------- */

.row { display: flex; gap: 0.65rem; align-items: center; flex-wrap: wrap; }
.row.fields > * { flex: 1; min-width: 170px; }
.row.spread { justify-content: space-between; }

.form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.1rem; }

.error {
  color: var(--danger);
  background: var(--danger-tint);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}
.hint { color: var(--muted); font-size: 0.85rem; }
.ok {
  color: var(--ok);
  background: var(--ok-tint);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------------- */
/* Tables                                                                 */
/* ---------------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 0.7rem 0.5rem; vertical-align: middle; }
thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; }

/* ---------------------------------------------------------------------- */
/* Tabs (segmented control)                                               */
/* ---------------------------------------------------------------------- */

.tabs {
  display: inline-flex;
  gap: 0.2rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.tabs button {
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-pill);
  box-shadow: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
}
.tabs button:hover { background: transparent; color: var(--text); }
.tabs button.active {
  color: var(--accent-contrast);
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------------- */
/* Share / QR result box                                                  */
/* ---------------------------------------------------------------------- */

.qr-box {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}
.qr-box img {
  width: 132px;
  height: 132px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  flex: none;
}
.link-url {
  word-break: break-all;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
}

/* ---------------------------------------------------------------------- */
/* Badges                                                                 */
/* ---------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.ok { background: var(--ok-tint); color: var(--ok); }
.badge.danger { background: var(--danger-tint); color: var(--danger); }

/* ---------------------------------------------------------------------- */
/* Dashboard chrome                                                       */
/* ---------------------------------------------------------------------- */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

/* ---------------------------------------------------------------------- */
/* File list (download page)                                              */
/* ---------------------------------------------------------------------- */

.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--border);
}
.file-list li:last-child { border-bottom: none; }
.file-list .file-name {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.file-list .file-name span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-icon svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------------- */
/* File picker (select files for a download share)                       */
/* ---------------------------------------------------------------------- */

.file-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.file-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.file-picker-toolbar input[type="text"] {
  flex: 1;
  margin: 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
}
.file-picker-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  font-size: 0.8rem;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
}
.link-btn:hover { text-decoration: underline; background: none; }
.file-picker .file-picker-groups {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.75rem 0.9rem;
}
.file-picker .file-list li { padding: 0.55rem 0; }
.file-picker .file-list .file-name { flex: 1; }

/* ---------------------------------------------------------------------- */
/* File groups (files tab, grouped by originating upload link)           */
/* ---------------------------------------------------------------------- */

.file-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
}
.file-group:last-child { margin-bottom: 0; }
.file-group-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.file-group-title { font-weight: 650; }
.file-group .file-list { padding: 0.15rem 0.9rem; margin: 0; }
.file-group .file-list .file-name { flex: 1; }

/* ---------------------------------------------------------------------- */
/* Info tooltip                                                           */
/* ---------------------------------------------------------------------- */

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: help;
  flex: none;
}
.info-tip svg { width: 13px; height: 13px; }
.info-tip:hover, .info-tip:focus-visible {
  color: var(--accent);
  background: var(--accent-tint);
  outline: none;
}
.info-tip-content {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 260px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}
.info-tip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
}
.info-tip:hover .info-tip-content,
.info-tip:focus-visible .info-tip-content,
.info-tip:focus-within .info-tip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---------------------------------------------------------------------- */
/* Uppy Dashboard theming                                                 */
/* ---------------------------------------------------------------------- */

.uppy-Dashboard-inner {
  border: 1.5px dashed var(--border) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface-2) !important;
  font-family: var(--font) !important;
}
.uppy-Dashboard-AddFiles { border: none !important; }
.uppy-Dashboard-AddFiles-title { color: var(--text) !important; }

/* The default drag-over overlay ships a hardcoded flat-blue bitmap icon and a plain dashed
   box that clashes badly with the rest of the design — replace it with a themed one. */
.uppy-Dashboard-dropFilesHereHint {
  background-image: none !important;
  background-color: var(--accent-tint) !important;
  border: 2px dashed var(--accent) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--accent) !important;
  font-family: var(--font) !important;
  font-weight: 650 !important;
  font-size: 0.95rem !important;
  padding-top: 0 !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
}
.uppy-Dashboard-dropFilesHereHint::before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a5cf0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5'/%3E%3Cpath d='M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  .uppy-Dashboard-dropFilesHereHint::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f8dff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5'/%3E%3Cpath d='M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
  }
}
.uppy-Dashboard-browse { color: var(--accent) !important; }
.uppy-Dashboard-dropFilesHereHint { border-color: var(--accent) !important; }
.uppy-c-btn-primary,
.uppy-StatusBar-actionBtn--upload {
  background-color: var(--accent) !important;
  border-radius: var(--radius-md) !important;
}
.uppy-c-btn-primary:hover,
.uppy-StatusBar-actionBtn--upload:hover { background-color: var(--accent-hover) !important; }
.uppy-StatusBar-statusPrimary,
.uppy-Dashboard-Item-name { color: var(--text) !important; }
.uppy-Dashboard-Item { border-radius: var(--radius-sm) !important; }
.uppy-size--md .uppy-Dashboard-inner,
.uppy-Dashboard-inner * { --uppy-blue: var(--accent); }

/* ---------------------------------------------------------------------- */
/* Modals                                                                 */
/* ---------------------------------------------------------------------- */

dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: calc(100% - 2rem);
}
dialog.wide { max-width: 680px; }
dialog::backdrop { background: rgba(10, 10, 20, 0.5); backdrop-filter: blur(2px); }
dialog[open] { animation: rise 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }
.dialog-body { padding: 1.4rem 1.5rem; }
.dialog-scroll { max-height: 50vh; overflow-y: auto; margin: 0 -0.25rem; padding: 0 0.25rem; }

/* ---------------------------------------------------------------------- */
/* Utility classes                                                        */
/* Replace one-off inline `style="..."` attributes: the app's CSP sends   */
/* style-src 'self' with no 'unsafe-inline', so the browser silently      */
/* blocks any inline style attribute instead of applying it.              */
/* ---------------------------------------------------------------------- */

.wrap-narrow { max-width: 380px; padding: 0; }
.card-narrow { max-width: 380px; margin: 0 auto; }
.banner-narrow { max-width: 480px; margin: 0 auto 1.25rem; }
.m-0 { margin: 0; }
.mt-05 { margin-top: 0.5rem; }
.mt-1 { margin-top: 1rem; }
.hint-row { margin-top: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.hint-row-center { margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: 0.4rem; text-align: center; }
.truncate-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------------- */
/* Responsive                                                             */
/* ---------------------------------------------------------------------- */

@media (max-width: 560px) {
  .wrap { padding: 1.5rem 1rem 3rem; }
  .card { padding: 1.15rem; border-radius: var(--radius-md); }
  h1 { font-size: 1.4rem; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 0.6rem;
  }
  tbody td {
    border: none;
    padding: 0.25rem 0.1rem;
  }
  tbody td:empty { display: none; }

  /* A 4-button segmented control doesn't fit a phone width — let it scroll horizontally
     as a swipeable pill bar instead of squeezing or wrapping mid-word. */
  .tabs {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; white-space: nowrap; }

  /* Toolbars built for a wide row (search + counts + actions) stack instead of
     squeezing onto one line. */
  .file-picker-toolbar { flex-wrap: wrap; }
  .file-picker-toolbar input[type="text"] { flex-basis: 100%; }
  .file-group-header { flex-wrap: wrap; row-gap: 0.3rem; }
  .top-bar .file-picker-actions,
  .row.spread .file-picker-actions { flex-wrap: wrap; row-gap: 0.4rem; }

  /* Table-heavy modal content scrolls sideways rather than overflowing the dialog. */
  .dialog-scroll { overflow-x: auto; }

  .qr-box { justify-content: center; text-align: center; }
  .qr-box > div { min-width: 0; }
}
