@font-face {
  font-family: Roboto;
  src: url("/assets/roboto-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("/assets/roboto-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Saira Extra Condensed";
  src: url("/assets/saira-extra-condensed-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  --ink: #241a1e;
  --black: #171215;
  --canvas: #f7f4f3;
  --quiet: #60545a;
  --paper: #fff;
  --line: #e6dce0;
  --border: #cfbec7;
  --accent-tint: #fbeef2;
  --accent: #b50039;
  --brand-red: #e50044;
  --brand-blue: #7ec9d3;
  --focus: #076875;
  --shadow: 0 12px 30px #30152008;
  --display: "Saira Extra Condensed", "Arial Narrow", Roboto, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.sr-only,
.skip-link:not(:focus) {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: .5rem;
  left: .5rem;
  background: var(--paper);
  padding: .8rem 1rem;
  border-radius: .4rem;
}

.wrap { width: min(100% - 4rem, 73rem); margin-inline: auto; }
.site-header { background: var(--black); color: var(--paper); }
.site-header-inner { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header :focus-visible, .page-heading :focus-visible { outline-color: var(--brand-blue); }
.brand { display: flex; align-items: center; flex: none; gap: .65rem; color: var(--paper); text-decoration: none; }
.brand-logo { display: block; width: 6.35rem; height: auto; }
.brand-qr { padding-inline-start: .65rem; border-inline-start: 1px solid #77636d; color: var(--brand-blue); font: 700 1.48rem/.8 var(--display); letter-spacing: .06em; }
.brand-mark {
  display: inline-grid;
  flex: none;
  place-content: center;
  width: 2.15rem;
  height: 2.15rem;
  grid: repeat(2, 7px) / repeat(2, 7px);
  gap: 3px;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: .55rem;
}
.brand-mark i { border: 1.5px solid currentColor; border-radius: 1px; }
.brand-mark i:last-child { background: currentColor; border: 0; width: 4px; height: 4px; align-self: center; justify-self: center; }
.header-meta { display: flex; align-items: center; min-width: 0; gap: .82rem; }
.environment { flex: none; padding: .26rem .56rem; border: 1px solid #68747c; border-radius: 2rem; color: #cdeef1; font-size: .73rem; font-weight: 500; }
.account { color: #f5edf1; min-width: 0; display: flex; align-items: center; gap: .6rem; font-size: .86rem; }
.account-mark { display: grid; place-content: center; flex: none; width: 1.95rem; height: 1.95rem; background: var(--brand-blue); color: var(--black); border-radius: 50%; font-weight: 700; }
.account-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-button { flex: none; border: 0; padding: .4rem 0; background: transparent; color: #f5edf1; font-size: .8rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.main { padding-block: clamp(1.4rem, 4.4vw, 3.5rem) 4rem; }
.page-heading {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  overflow: hidden;
  gap: 1.35rem;
  margin-bottom: 1.45rem;
  padding: clamp(1.35rem, 4vw, 2.65rem);
  border-top: 3px solid var(--brand-red);
  border-radius: .95rem;
  background: linear-gradient(108deg, var(--black) 38%, #321b25 100%);
  color: var(--paper);
}
.page-heading::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -4.75rem -1rem auto auto;
  width: min(47%, 23rem);
  aspect-ratio: 1;
  background-image: radial-gradient(circle, #7ec9d3 1.4px, transparent 1.8px);
  background-size: 15px 15px;
  mask-image: radial-gradient(ellipse, #000 8%, transparent 73%);
  opacity: .38;
  pointer-events: none;
}
.page-heading h1 { font: 700 clamp(3.15rem, 8vw, 5.65rem)/.88 var(--display); letter-spacing: .012em; }
.page-heading p { margin-top: .7rem; max-width: 34ch; color: #eee0e7; line-height: 1.45; }
.page-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.page-actions .button:not(.button-primary) { color: var(--paper); background: #ffffff12; border-color: #a68c9a; }
.page-actions .button:not(.button-primary):hover:not(:disabled) { background: #ffffff24; border-color: #d5bbc8; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  min-height: 2.55rem;
  padding: .55rem .95rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-tint); }
.button-primary { background: var(--brand-red); color: var(--paper); border-color: var(--brand-red); }
.button-primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.button-small { min-height: 2.15rem; padding: .4rem .7rem; font-size: .8rem; }
.button-text {
  border: 0;
  padding: .15rem 0;
  border-radius: .15rem;
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: .84rem;
  font-weight: 630;
}
.button-text:hover { text-decoration-thickness: 2px; }
.button-icon { display: grid; place-content: center; width: 2.3rem; height: 2.3rem; flex: none; border: 1px solid transparent; border-radius: .5rem; background: transparent; color: var(--quiet); }
.button-icon:hover { background: var(--accent-tint); border-color: var(--line); color: var(--ink); }
.icon { display: inline-block; width: 1rem; height: 1rem; position: relative; flex: none; }
.icon-plus::before, .icon-plus::after, .icon-close::before, .icon-close::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: .8rem; height: 2px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); }
.icon-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.icon-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.icon-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.icon-search::before { content: ""; position: absolute; left: 0; top: 0; width: .59rem; height: .59rem; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-search::after { content: ""; position: absolute; left: .64rem; top: .65rem; width: .37rem; height: 1.5px; border-radius: 2px; background: currentColor; transform: rotate(45deg); transform-origin: left; }

.catalog { border: 1px solid var(--line); border-radius: .95rem; background: var(--paper); box-shadow: var(--shadow); }
.filters { display: grid; grid-template-columns: minmax(11rem, 1.35fr) minmax(0, 4fr); gap: .8rem; padding: 1.3rem 1.4rem 1rem; }
.filters-extra { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.filter-toggle { display: none; }
.filter-count { min-width: 1.2rem; padding: .1rem .3rem; border-radius: 1rem; background: var(--accent-tint); color: var(--accent); }
.field { display: grid; gap: .38rem; min-width: 0; }
.field > span:first-child { font-size: .84rem; font-weight: 650; line-height: 1.35; }
.field input, .field select {
  width: 100%;
  min-width: 0;
  min-height: 2.55rem;
  padding: .52rem .67rem;
  border-radius: .5rem;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: .92rem;
}
.field input::placeholder { color: #71646b; opacity: 1; }
.field input[readonly] { background: #f7f2f4; color: var(--quiet); }
.search-input { position: relative; }
.search-input .icon { position: absolute; top: .76rem; left: .68rem; color: var(--quiet); pointer-events: none; }
.search-input input { padding-left: 2rem; }
.catalog-summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .05rem 1.45rem .85rem; min-height: 2rem; color: var(--quiet); font-size: .83rem; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th {
  border-block: 1px solid var(--line);
  padding: .7rem .65rem;
  background: #f8f3f5;
  color: var(--quiet);
  text-align: left;
  font-size: .78rem;
  font-weight: 680;
}
th:first-child, td:first-child { padding-left: 1.45rem; }
th:last-child, td:last-child { padding-right: 1.45rem; }
.table-group { width: 19%; }
.table-destination { width: 25%; }
th:nth-child(4) { width: 8rem; }
.table-actions { width: 11rem; }
td { padding: .9rem .65rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fdf9fa; }
.row-title {
  border: 0;
  border-radius: .15rem;
  background: transparent;
  padding: 0;
  text-align: left;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 680;
}
.row-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.row-title, .secondary, .cell-text { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.secondary { margin-top: .24rem; color: var(--quiet); font-size: .77rem; }
.group-tag { display: block; width: fit-content; max-width: 100%; margin-top: .3rem; padding: .2rem .45rem; border-radius: .3rem; background: #e5f4f5; color: #155461; font-size: .73rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions [data-action="details"] { border-color: #e2acbe; background: var(--accent-tint); color: var(--accent); }
.row-actions { display: flex; justify-content: flex-end; gap: .37rem; }
.status {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  padding: .28rem .48rem;
  border-radius: 2rem;
  background: #f3edf0;
  color: var(--quiet);
  font-size: .72rem;
  line-height: 1.2;
  font-weight: 680;
  white-space: nowrap;
}
.status::before { content: ""; width: .38rem; height: .38rem; flex: none; border-radius: 50%; background: currentColor; }
.status-active { background: #e5f4e9; color: #275c3b; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: .8rem; padding: .85rem 1.45rem; border-top: 1px solid var(--line); color: var(--quiet); font-size: .84rem; }

.empty { display: grid; justify-items: center; gap: .65rem; text-align: center; padding: 2.7rem 1rem 3.15rem; border-top: 1px solid var(--line); }
.empty-mark { width: 3.15rem; height: 3.15rem; margin-bottom: .15rem; border-radius: .75rem; background: var(--accent-tint); color: var(--accent); grid: repeat(2, 9px) / repeat(2, 9px); }
.empty h2 { font: 700 1.75rem/1 var(--display); }
.empty p { color: var(--quiet); font-size: .9rem; }
.empty button { margin-top: .25rem; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 1.45rem 1.1rem; padding: .65rem .7rem .65rem .9rem; border: 1px solid #f0c9d0; border-radius: .55rem; background: #fff2f4; color: #8f293f; font-size: .9rem; }

.dialog {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  width: min(100% - 2rem, 34rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 75px #1e10193d;
  overscroll-behavior: contain;
}
.dialog::backdrop { background: #1a0f16a8; }
.dialog-details { width: min(100% - 2rem, 42rem); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; padding: 1.25rem 1.45rem .8rem; background: var(--paper); }
.dialog-heading h2 { align-self: center; overflow-wrap: anywhere; font: 700 2.3rem/.96 var(--display); }
.editor-fields { display: grid; gap: .92rem; min-width: 0; margin: 0; padding: .4rem 1.45rem 1.2rem; border: 0; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.single-field { grid-template-columns: minmax(0, 1fr); }
.field small { color: var(--quiet); font-size: .76rem; line-height: 1.35; }
.editor-group-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem .6rem; }
.editor-group-heading label { font-size: .84rem; font-weight: 650; line-height: 1.35; }
.editor-group-create { display: grid; gap: .65rem; margin-top: .2rem; padding: .75rem; border: 1px solid var(--line); border-radius: .5rem; background: #fbf6f8; }
.editor-group-create .form-error { margin: 0; }
.editor-group-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.fixed-preview, .detail-url { overflow-wrap: anywhere; color: var(--accent); font-size: .78rem; line-height: 1.45; }
.fixed-preview { display: block; padding: .5rem .65rem; border-radius: .4rem; background: var(--accent-tint); }
.dialog-footer { display: flex; justify-content: flex-end; gap: .55rem; padding: .95rem 1.45rem; border-top: 1px solid var(--line); background: var(--paper); }
.form-error { margin: 0 1.45rem 1rem; padding: .55rem .7rem; border-radius: .45rem; background: #fff2f4; color: #8f293f; font-size: .85rem; }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-top: .45rem; color: var(--quiet); font-size: .82rem; }
.detail-body { display: grid; gap: 1.25rem; padding: .35rem 1.45rem 1.45rem; }
.download-card { display: flex; gap: 1rem; align-items: center; padding: .95rem; border: 1px solid #ebc8d4; border-radius: .75rem; background: #fcf3f6; }
.qr-preview { display: grid; place-items: center; flex: none; width: 8.5rem; height: 8.5rem; border-radius: .45rem; background: var(--paper); }
.qr-preview img { width: 100%; height: auto; border-radius: inherit; image-rendering: pixelated; }
.qr-preview p { padding: .5rem; text-align: center; font-size: .8rem; color: var(--quiet); }
.download-info { min-width: 0; }
.detail-body h3 { font-size: .9rem; font-weight: 700; }
.download-info .detail-url { display: block; margin-top: .35rem; }
.download-info .button-text { margin-top: .3rem; }
.copy-result { margin-top: .3rem; color: var(--quiet); font-size: .78rem; }
.copy-result:empty { display: none; }
.download-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.local-scan-note { margin: .55rem 0 0; color: var(--quiet); font-size: .79rem; }
.detail-destination { display: flex; justify-content: space-between; align-items: flex-start; gap: .65rem; }
.detail-destination a { display: block; margin-top: .36rem; overflow-wrap: anywhere; font-size: .85rem; }
.history-section { border-top: 1px solid var(--line); padding-top: .95rem; min-width: 0; }
#history-message { margin-top: .38rem; color: var(--quiet); font-size: .82rem; }
#history-message:empty { display: none; }
.history-list { display: grid; gap: .55rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.history-list:empty { display: none; }
.history-entry { border: 1px solid var(--line); border-radius: .55rem; padding: .62rem .72rem; }
.history-entry-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .3rem .8rem; flex-wrap: wrap; font-size: .84rem; }
.history-entry-heading time { color: var(--quiet); font-size: .77rem; }
.history-entry-user { margin-top: .26rem; overflow-wrap: anywhere; color: var(--quiet); font-size: .79rem; }
.history-changes { padding-left: 1.05rem; margin: .45rem 0 0; color: var(--quiet); font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.history-changes strong { color: var(--ink); font-weight: 600; }
.history-more { margin-top: .65rem; }

.sign-in { width: min(100%, 29rem); margin-inline: auto; padding: clamp(1.15rem, 5vw, 2rem); border-top: 3px solid var(--brand-red); }
.notice.session-notice { width: min(100%, 29rem); margin-inline: auto; }
.sign-in h1 { font: 700 clamp(2.2rem, 7vw, 2.8rem)/.96 var(--display); }
.sign-in > p { margin-top: .55rem; color: var(--quiet); font-size: .9rem; line-height: 1.45; }
.sign-in form { display: grid; justify-items: start; gap: .85rem; margin-top: 1.2rem; }
.sign-in form .field { width: 100%; }
.sign-in form .form-error { margin: 0; width: 100%; }
.sign-in-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; }
.sign-in-recovery {
  display: grid;
  gap: .4rem;
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: .85rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.management-dialog { width: min(100% - 2rem, 37rem); }
.management-body { display: grid; gap: 1rem; padding: .35rem 1.45rem 1.45rem; }
.management-body h3 { font-size: .95rem; }
.management-form { display: grid; gap: .75rem; }
.management-section { padding-top: .9rem; border-top: 1px solid var(--line); }
.management-note { margin-top: .35rem; color: var(--quiet); font-size: .82rem; line-height: 1.45; }
.management-list { display: grid; gap: .45rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.management-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem; min-width: 0; padding: .6rem .68rem; border: 1px solid var(--line); border-radius: .5rem; }
.management-info { display: grid; gap: .18rem; min-width: 0; overflow-wrap: anywhere; font-size: .85rem; }
.management-info span { color: var(--quiet); font-size: .77rem; }
.management-error { margin: 0; }
.generated-key { display: grid; gap: .5rem; justify-items: start; padding: .75rem; border: 1px solid #ebc8d4; border-radius: .6rem; background: #fcf3f6; }
.generated-key p { color: var(--quiet); font-size: .82rem; line-height: 1.4; }
.generated-key code { max-width: 100%; padding: .45rem .55rem; border-radius: .32rem; background: var(--paper); color: var(--accent); overflow-wrap: anywhere; }

.toast { position: fixed; inset: auto 1.25rem 1.25rem auto; z-index: 1; max-width: calc(100% - 2.5rem); padding: .7rem .95rem; border-radius: .6rem; background: var(--black); color: var(--paper); box-shadow: var(--shadow); font-size: .88rem; }

@media (max-width: 840px) {
  .wrap { width: calc(100% - 2rem); }
  .table-destination { display: none; }
  .table-group { width: 26%; }
}

@media (max-width: 680px) {
  .site-header { padding-top: env(safe-area-inset-top); }
  .site-header-inner { min-height: 3.75rem; gap: .55rem; }
  .brand { gap: .35rem; }
  .brand-logo { width: 4.8rem; }
  .brand-qr { padding-inline-start: .35rem; font-size: 1.25rem; }
  .header-meta { gap: .4rem; }
  .account-mark { display: none; }
  .account-email { font-size: .77rem; }
  .header-meta:has(.header-button:not([hidden])) .environment { display: none; }
  .header-button { min-height: 2.75rem; font-size: .77rem; }
  .main { padding-block: .9rem max(2rem, env(safe-area-inset-bottom)); }
  .page-heading { flex-direction: column; align-items: stretch; gap: 1rem; margin-bottom: .85rem; padding: 1.05rem; }
  .page-heading::after { inset: -1rem -.75rem auto auto; width: 63%; opacity: .29; }
  .page-heading p { font-size: .88rem; }
  .page-actions { justify-content: flex-start; }
  .page-actions #new-qr { order: -1; }
  .button, .button-small, .button-icon { min-height: 2.75rem; }
  .button-icon { width: 2.75rem; }
  .button-text { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .field input, .field select { min-height: 2.75rem; font-size: 1rem; }
  .filters { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: .85rem .9rem .45rem; gap: .65rem; }
  .filter-toggle { display: inline-flex; padding-inline: .7rem; }
  .filters-extra { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-bottom: .35rem; }
  .filters[data-filters-open="false"] > .filters-extra { display: none; }
  .catalog-summary { padding-inline: .9rem; }
  .catalog-summary:has(#clear-filters[hidden]) { min-height: 0; padding-bottom: .55rem; }
  .table-scroll { padding: .7rem; border-top: 1px solid var(--line); background: #fcf8fa; }
  .table-scroll table, .table-scroll tbody { display: block; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table-scroll tbody { display: grid; gap: .55rem; }
  .table-scroll tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "code status" "metadata metadata" "actions actions";
    gap: .55rem;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: .72rem;
    background: var(--paper);
  }
  .table-scroll td { min-width: 0; width: auto; padding: 0; border: 0; }
  .table-code { grid-area: code; }
  .table-status { grid-area: status; align-self: start; }
  .table-group { grid-area: metadata; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .55rem; }
  .table-group > span { overflow-wrap: anywhere; white-space: normal; }
  .table-group > .secondary { margin-top: 0; }
  .table-group > .group-tag { margin: 0; }
  .table-actions { grid-area: actions; }
  .table-code > .secondary { overflow-wrap: anywhere; white-space: normal; }
  .row-title { color: var(--accent); overflow-wrap: anywhere; white-space: normal; }
  .row-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .row-actions .button { width: 100%; }
  .pagination { padding-inline: .9rem; }
  .notice { margin-inline: .9rem; }
  .dialog {
    inset-block: auto 0;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - .7rem);
    max-height: calc(100dvh - max(.7rem, env(safe-area-inset-top)));
    margin-block: 0;
    border-radius: 1.12rem 1.12rem 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    scroll-padding-block: 4.2rem 4.8rem;
  }
  .dialog-heading { position: sticky; top: 0; z-index: 2; padding-block: .7rem .6rem; border-bottom: 1px solid var(--line); }
  .dialog-heading h2 { font-size: 2rem; }
  .dialog .field :is(input, select) { scroll-margin-block: .5rem; }
  .dialog-footer { position: sticky; bottom: 0; z-index: 1; padding-block: .7rem; }
  .dialog-footer .button { flex: 1; }
}

@media (max-width: 420px) {
  .site-header .wrap { width: calc(100% - 1.4rem); }
  .page-actions .button { padding-inline: .65rem; }
  .page-actions #new-qr { flex: 1 1 100%; }
  .page-actions .button:not(.button-primary) { flex: 1; }
  .page-actions:has(#open-users[hidden]) #new-qr { flex: 1; }
  .account-email { max-width: 37vw; }
  .dialog-heading { padding-inline: .9rem; }
  .editor-fields, .detail-body, .dialog-footer, .management-body { padding-inline: .9rem; }
  .form-error { margin-inline: .9rem; }
  .sign-in .form-error, .management-error { margin-inline: 0; }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .download-card { align-items: stretch; flex-direction: column; }
  .qr-preview { align-self: center; }
  .download-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-actions .button { padding-inline: .35rem; }
  .detail-destination { flex-wrap: wrap; }
  .detail-destination > div { min-width: 0; }
}
