:root {
  scrollbar-gutter: stable;
  color-scheme: light dark;
  --ink: light-dark(#142622, #eef5f1);
  --header-padding: 16px;
  --page-gutter: max(4vw, calc((100% - 1000px) / 2));
  --mint: light-dark(#00685a, #63f1d9);
  --line: light-dark(#b7c6bf, #34403f);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: light-dark(#f6f8f3, #0a0d10);
  color: var(--ink);
  font:
    16px/1.45 Inter,
    system-ui,
    sans-serif;
}
header,
footer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px var(--page-gutter);
  border-bottom: 1px solid var(--line);
}
header {
  padding-block: var(--header-padding);
}
header nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .42em;
}
header nav {
  display: flex;
  gap: 18px;
  flex: 1;
}
a {
  color: var(--mint);
  text-underline-offset: 4px;
}
header a,
footer a {
  padding: 10px 0;
}
header a {
  text-decoration: none;
}
.brand {
  font: bold italic 32px/1 Arial;
  letter-spacing: -2px;
  color: var(--ink);
}
.brand span,
h1 em {
  color: var(--mint);
}
main {
  margin: 0;
  padding: 32px var(--page-gutter);
  min-height: 62vh;
}
/* Top-level route fragments should bring the header into view as well. */
main > section[id] {
  scroll-margin-block-start: 100vh;
}
header + main {
  padding-top: var(--header-padding);
}
header + main > h1:first-child,
#route-heading,
main > section > h1:first-child,
.hero h1 {
  margin-top: 0;
}
h1 {
  font:
    900 italic clamp(42px, 6vw, 76px) / 0.95 Arial,
    sans-serif;
  letter-spacing: -0.065em;
  margin: 12px 0 24px;
}
@media (max-width:650px) {
  body:has(#home:not([hidden])) {min-height:100svh;display:flex;flex-direction:column}
  main:has(#home:not([hidden])) {flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
  main:has(#home:not([hidden])) #notice:empty {display:none}
  body:has(#shorten:focus-within) {min-height:var(--home-visible-height,100svh)}
  main:has(#shorten:focus-within) {padding-block:var(--header-padding)}
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero h1 {
  align-self: flex-start;
  font-size: clamp(76px, 13vw, 160px);
}
.hero img {
  width: 44%;
  max-width: 400px;
}
form,
fieldset,
article {
  max-width: 650px;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  margin: 12px 0;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  font: inherit;
  background: light-dark(white, #151e20);
  color: var(--ink);
  border: 1px solid light-dark(#718079, #596663);
  border-radius: 5px;
  padding: 11px;
}
textarea {
  min-height: 76px;
}
button,
.action {
  cursor: pointer;
  background: var(--mint);
  color: light-dark(white, #09211b);
  border: 0;
  border-radius: 5px;
  padding: 11px 16px;
  min-height: 44px;
  font: 700 16px/1.3 system-ui;
}
:is(button, .action).secondary {
  background: light-dark(#e2eae4, #202b2a);
  color: var(--ink);
}
button:disabled {
  opacity: 0.65;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row input {
  flex: 1 1 190px;
}
fieldset,
article {
  border: 1px solid var(--line);
  padding: 16px;
  margin: 14px 0;
  border-radius: 6px;
}
fieldset legend,
small,
p {
  color: light-dark(#41544b, #bdcdc7);
}
#card-list button {
  margin: 4px;
}
article canvas {
  display: block;
  width: min(100%, 260px) !important;
  height: auto !important;
  margin: 15px 0;
}
.poster {
  width: min(300px, 100%);
}
footer {
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
a,
article,
main > h1,
#identity p {
  overflow-wrap: anywhere;
}
#notice:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  :root {
    --header-padding: 8px;
    --page-gutter: 12px;
  }
  header {
    flex-wrap: nowrap;
    gap: clamp(4px, 2vw, 14px);
  }
  header .brand {
    font-size: clamp(24px, 6vw, 32px);
  }
  header .wide-label {
    display: none;
  }
  header nav {
    flex: 1;
    justify-content: center;
    gap: clamp(2px, 1.8vw, 12px);
  }
  header a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    white-space: nowrap;
    font-size: clamp(14px, 3.8vw, 16px);
  }
  .hero img {
    width: 48%;
  }
}
article button + button {
  margin-inline-start: 0.4rem;
}
.wallet-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 0.5rem;
  max-width: 650px;
}
.wallet-entry small {
  font-weight: 400;
}
#wallet {
  max-width: 650px;
}
#wallet pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#wallet details {
  margin: 0.75rem 0;
}
#wallet summary {
  cursor: pointer;
  padding: 0.5rem 0;
  font-weight: bold;
}
.bio-help {
  margin-block: 0.5rem 1rem;
}
.bio-help summary,
:is(#page-link-section, #page-files-section) > summary {
  padding-block: 0.625rem;
  cursor: pointer;
  color: var(--mint);
}
.markdown-examples {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.625rem 1rem;
  margin: 0 0 0.75rem;
}
.markdown-examples dd {
  margin: 0;
  overflow-wrap: anywhere;
}
:is(#page-link-section, #page-files-section) {
  border-block: 1px solid var(--line);
  margin-block: 1rem;
}
:is(#page-link-section, #page-files-section)[open] {
  padding-bottom: 1rem;
}
:is(#page-link-section, #page-files-section) > summary {
  font-weight: 600;
}
.bio {
  overflow-wrap: anywhere;
}
.bio :is(h1, h2, h3, h4, h5, h6) {
  font: 700 1.2em/1.25 system-ui;
  letter-spacing: normal;
}
.bio :is(h1, h2) { font-size: 1.5em; }
canvas:fullscreen {
  object-fit: contain;
  background: white;
}
button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}
#page-form textarea[name="bio"] {
  resize: vertical;
  min-height: 12rem;
  line-height: 1.55;
}
#bio-count {
  float: right;
  margin-left: 1rem;
  font-variant-numeric: tabular-nums;
}

.header-tools {
  display:flex; flex:none; align-items:center; gap:4px; margin-inline-start:auto;
}
.header-tools :is(a, button.appearance-toggle) {
  display:grid; place-items:center; flex:none; width:44px; height:44px; min-width:0;
  padding:0; margin:0; color:var(--ink); border-radius:50%;
}
.header-tools svg {
  width:22px; height:22px; fill:none; stroke:currentColor;
  stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round;
}
.header-tools :is(a,button):hover {color:var(--mint)}
.header-tools :focus-visible {outline:2px solid currentColor; outline-offset:-3px}
html[data-mode="dark"] .moon-icon, html:not([data-mode="dark"]) .sun-icon {display:none}
@media(max-width:420px) {
  header:has(.header-tools) {gap:4px}
  header:has(.header-tools) nav {gap:clamp(8px, 2.8vw, 12px)}
  header:has(.header-tools) nav a {min-width:0}
  .header-tools {gap:0}
}
@media(max-width:370px) {
  header:has(#ops-link:not([hidden])) .cards-prefix {display:none}
}
#identity,
#identity article,
#identity article form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
#identity > :is(p, h2, form, div),
#identity article > :is(p, strong, form),
#identity article label {
  flex-basis: 100%;
}
#identity > p,
#identity article p,
#identity article label {
  margin: 0;
}
#identity h2 {
  margin: 16px 0 0;
}
#identity article button + button {
  margin-inline-start: 0;
}
#identity > form {
  margin-bottom: 4px;
}
#identity {
  max-width: 650px;
}
#page { position: relative; max-width: 650px; }
#page-more {
  position: absolute;
  inset: 0 0 auto auto;
  min-width: 44px;
  anchor-name: --page-more;
}
#page-menu {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
#page-menu:popover-open { display: grid; gap: 4px; }
#page-menu a { display: grid; place-items: center; text-decoration: none; }
@supports (top: anchor(bottom)) {
  #page-menu { position-anchor: --page-more; inset: anchor(bottom) anchor(right) auto auto; margin: 4px 0 0; }
}
#page-form .row { gap: 12px; }
#page-actions a { display: inline-flex; align-items: center; min-height: 44px; }
#page-links:not(:empty) { margin-bottom: 12px; }
#page-link-section { border-bottom: 0; }
#publish-page { min-width: 8rem; }
#publish-page:disabled { background: var(--line); color: var(--ink); cursor: default; }
#publish-page[aria-busy="true"]::before {
  content: ""; display: inline-block; width: .8em; height: .8em; margin-inline-end: .45em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: save-spin .7s linear infinite;
}
@keyframes save-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { #publish-page[aria-busy="true"]::before { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#pending form { margin-bottom: 1rem; }
#link-filter { max-width: 650px; }
#link-list article {
  border: 0; border-top: 1px solid var(--line); border-radius: 0;
  margin: 0; padding: 1rem 0 .4rem;
}
#link-list .address-row { align-items: start; row-gap: .35rem; }
#link-list .address-info { display: grid; align-content: start; gap: .15rem; }
#link-list .address-info strong { font-size: 1.125rem; line-height: 1.3; }
#link-list .address-info p, .saved-destination summary {
  margin: 0; font-size: .875rem; color: light-dark(#41544b, #bdcdc7);
}
.saved-destination summary { width: fit-content; cursor: pointer; }
#link-list .saved-destination[open] p { padding-block: .35rem; user-select: all; }
#link-list .link-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: .35rem; }
#link-list .link-actions > button { background: transparent; color: var(--ink); min-width: 44px; padding: 0 .5rem; font-size: .9rem; }
#link-list .link-actions > button:first-child { min-inline-size: max(44px, 7ch); color: var(--mint); padding-left: 0; text-align: start; }
#link-list .link-actions > button:last-of-type { margin-inline-start: auto; font-size: 1.25rem; }
#link-list button + button { margin-inline-start: 0; }
.saved-link-menu { border: 1px solid var(--line); border-radius: .4rem; padding: .35rem; color: var(--ink); }
.saved-link-menu:popover-open { display: grid; gap: .25rem; }
@supports (top: anchor(bottom)) {
  .saved-link-menu { inset: anchor(bottom) anchor(right) auto auto; margin: 0; position-try-fallbacks: flip-block; }
}
#app-update {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  max-width: calc(100% - 24px);
  color: var(--ink);
  background: Canvas;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 18px #0004;
}
.feedback-kind {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.feedback-kind label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  margin: 0;
}
.feedback-kind input {
  width: auto;
  accent-color: var(--mint);
}
.wallet-search {
  font-size: 0;
  margin: 0 0 12px;
  gap: 0;
}
.wallet-search input {
  font-size: 1rem;
}
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr));
  gap: 10px;
}
@media (max-width: 480px) {
  .wallet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.wallet-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.wallet-tag-strip {
  flex-wrap: nowrap;
  align-items: center;
}
.wallet-tag-choices {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  padding-block: 3px;
}
.wallet-tag-strip:has(.wallet-tag-choices:empty):not(:has(> button)) { display:none; }
#wallet .wallet-tag-strip button {
  flex: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#wallet .wallet-tag-choices .tag-edit-link { margin: 0 }
#wallet .wallet-filters button {
  margin: 0;
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 24px;
}
#wallet .wallet-filters [aria-pressed="true"] {
  color: Canvas;
  background: var(--ink);
  outline: 2px solid var(--mint);
  outline-offset: -2px;
}
.wallet-entry strong,
.wallet-entry small {
  display: block;
  overflow-wrap: anywhere;
}
.wallet-entry small {
  margin-top: 2px;
}
.wallet-add {
  margin: 12px 0;
}
.wallet-add::before {
  content: "＋";
  margin-right: 0.3em;
}
.wallet-empty {
  text-align: center;
  padding: 2.5rem 0;
}
.qr-face {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 auto 16px;
  border: 0;
  background: transparent;
}
#wallet .qr-face canvas {
  width: min(100%, 420px) !important;
  height: auto !important;
  margin: 0 auto;
}
#wallet [data-card-id] {
  padding: 12px;
}
#wallet [data-card-id] .row {
  justify-content: center;
}
#wallet [data-card-id] button + button {
  margin-inline-start: 0;
}
@media (max-width: 650px) {
  .wallet-list-heading {
    font-size: 1.12rem;
    margin: 1rem 0 0.25rem;
  }
  .wallet-add {
    display: block;
    position: sticky;
    bottom: max(14px, env(safe-area-inset-bottom));
    margin: 16px 0 12px auto;
    border-radius: 2rem;
    box-shadow: 0 2px 8px #0004;
  }
  #wallet .wallet-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #wallet .wallet-types button {
    min-height: 52px;
  }
  #wallet [data-card-id] {
    padding: 8px;
  }
  #wallet [data-card-id] .row {
    gap: 8px;
  }
  body:has(#app-update:not([hidden])) .wallet-add {
    bottom: 84px;
  }
}
.address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.address-info {
  min-width: 0;
  overflow-wrap: anywhere;
}
#page-identity {
  display: grid;
  grid-template-columns: max-content minmax(0,1fr) auto;
  --identity-height: 42px;
  --identity-gap: 3px;
  gap: var(--identity-gap) .35rem;
  align-items: center;
}
.identity-fields { display: contents; }
.identity-fields label, #theme-label { grid-column: 1; }
.identity-fields input, #published-handle { grid-column: 2; height: var(--identity-height); min-height: 0; }
#published-handle { border: 1px dashed var(--line); padding: 0 11px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--mint) 6%, transparent); color: var(--mint); text-decoration: underline; font: inherit; }
#theme-label { grid-row: 3; }
#page-identity .page-themes { grid-column: 2 / -1; grid-row: 3; }

#page-qr {
  grid-column: 3; grid-row: 1 / 3; align-self: center;
  padding-inline-start: .25rem;
}
#page-qr .qr-thumb {
  gap: 8px;
}
#page-qr .qr-thumb canvas {
  width: calc(var(--identity-height) * 2 + var(--identity-gap)) !important;
}
#page-qr:empty {
  display: none;
}
a.qr-thumb {
  display: grid;
  text-align: center;
  justify-items: center;
  gap: 4px;
  align-items: center;
  font-size: 0.8rem;
  margin: 0;
}
article .qr-thumb canvas,
.qr-thumb canvas {
  display: block;
  width: var(--qr-size) !important;
  height: auto !important;
  margin: 0;
  image-rendering: pixelated;
}
#address-qr {
  max-width: 480px;
}
#address-qr h1 {
  margin-top: 16px;
}
#address-qr canvas {
  display: block;
  width: min(100%, 360px) !important;
  height: auto !important;
  image-rendering: pixelated;
}
#address-qr label {
  max-width: 360px;
}
#address-qr p {
  overflow-wrap: anywhere;
}
.wallet-list-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 10px;
}
.wallet-list-actions button:last-child {
  anchor-name: --wallet-options;
  min-width: 44px;
}
#wallet-backup-menu {
  width: min(250px, calc(100% - 24px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
@supports (top: anchor(bottom)) {
  #wallet-backup-menu {
    position-anchor: --wallet-options;
    inset: anchor(bottom) anchor(right) auto auto;
    margin: 4px 0 0;
  }
}
#wallet-backup-menu:popover-open {
  display: grid;
  gap: 6px;
}
#wallet-backup-menu label {
  margin: 4px 0 0;
}
#wallet .wallet-add {
  position: static;
  display: block;
  margin: 0;
}
@media (max-width: 360px) {
  .wallet-add::before {
    content: none;
  }
  .wallet-list-actions button {
    padding-inline: 10px;
  }
}
#cards:has(.wallet-add) > h1 {
  margin: 0;
  float: left;

}
#wallet .wallet-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto auto;
  justify-items: start;
  min-height: 140px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-inline-start: 5px solid var(--label);
  border-radius: 12px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--label) 12%, transparent), transparent 80%);
}
.wallet-entry strong {
  font-size: 1.125rem;
  line-height: 1.2;
}
.wallet-entry small {
  font-size: .8125rem;
  line-height: 1.35;
  font-weight: 500;
}

.wallet-sticker {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  background: url("/card-stickers.webp") 0 0 / 300% 300% no-repeat;
}
.wallet-sticker[data-kind="wifi"] { background-position: 50% 0; }
.wallet-sticker[data-kind="url"] { background-position: 100% 0; }
.wallet-sticker[data-kind="location"] { background-position: 0 50%; }
.wallet-sticker[data-kind="text"] { background-position: 50% 50%; }
.wallet-sticker[data-kind="email"] { background-position: 100% 50%; }
.wallet-sticker[data-kind="phone"] { background-position: 0 100%; }
.wallet-sticker[data-kind="sms"] { background-position: 50% 100%; }
.wallet-sticker[data-kind="calendar_event"] { background-position: 100% 100%; }
body:has(#cards:not([hidden]) #wallet > .card-bar) > :is(header, footer),
#cards:has(#wallet > .card-bar) > h1 {
  display: none;
}
body:has(#cards:not([hidden]) #wallet > .card-bar) main {
  padding: 0 var(--page-gutter) 12px;
}
.card-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 4px 0;
  background: Canvas;
  color: CanvasText;
  border-bottom: 1px solid var(--line);
}
#wallet .card-bar:has(+ .card-present) {border-color:transparent}
#wallet .card-bar:has(+ .card-present) button,
#wallet .wallet-present-actions button {background:transparent;color:var(--ink);min-width:44px;min-height:44px}
#wallet .wallet-present-actions {display:grid;grid-template-columns:1fr 1fr;align-items:center;width:min(100%,17rem);gap:.5rem}
#wallet .wallet-present-actions button {font-size:.875rem}
#wallet .card-present .qr-presentation img {image-rendering:pixelated}
.card-bar-actions { display: flex; align-items: center; gap: 6px; }
.card-bar h1 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.card-bar button {
  padding: 8px 12px;
}
.card-present {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  min-height: calc(100dvh - 84px);
}
#wallet .card-present canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  margin: 0;
}
#wallet .card-present canvas:fullscreen {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}
#wallet-card-menu {
  box-sizing: border-box;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  inset: 56px max(var(--page-gutter), calc(100% - var(--page-gutter) - 650px))
    auto auto;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
#wallet-card-menu:popover-open {
  display: grid;
  gap: 5px;
}
.card-present {
  grid-template-columns: minmax(0, 1fr);
}
.card-flip {
  position: relative;
  width: min(100%, 420px, calc(100dvh - 190px));
  aspect-ratio: 1;
  perspective: 1200px;
}
.card-flip .card-front,
.card-flip .card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  border-radius: 0;
  backface-visibility: hidden;
  transition: transform 0.24s ease;
}
.card-front {
  padding: 0;
  background: white;
}
.card-back {
  overflow: auto;
  overscroll-behavior: contain;
  cursor: pointer;
  padding: 16px;
  border: 1px solid var(--line);
  background: Canvas;
  color: CanvasText;
  transform: rotateY(180deg);
}
.card-back dl {
  margin: 0;
}
.card-flip.turned .card-front {
  transform: rotateY(-180deg);
}
.card-flip.turned .card-back {
  transform: rotateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .card-flip .card-front,
  .card-flip .card-back {
    transition: none;
  }
}
.card-back .card-web-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
#wallet .flip-hint {
  font-size: 0.875rem;
  background: transparent;
  color: var(--ink);
}
#wallet .flip-hint {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px}
#wallet .flip-icon {font:1.25rem/1 system-ui}
#wallet .flip-hint.discovered .flip-caption {display:none}
.card-back dt {
  font-size: 0.875rem;
  font-weight: bold;
}
.card-back dd {
  margin: 0 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#wallet .tag-edit-link {
  display: block;
  background: transparent;
  color: var(--mint);
  padding: 0 4px;
  margin: 0 0 0 auto;
  text-decoration: underline;
  font-size: 0.875rem;
}
#wallet .card-bar + .wallet-filters {
  margin-top: 12px;
}

#file-list {
  display: grid;
  gap: 12px;
}
.file-group { padding-block: .25rem; min-width: 0; }
.file-heading { display: grid; grid-template-columns: 40px minmax(0,1fr); justify-items: start; align-items: center; gap: .65rem; min-height: 44px; cursor: pointer; color: var(--mint); overflow-wrap: anywhere; }
.file-heading > span:last-child { grid-column: 2; }
.file-heading img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.file-group label { margin: 0; }
.file-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}
.file-group input[type="checkbox"] { width: auto; }

.color-swatches {
  padding: 0;
  border: 0;
  min-width: 0;
  margin: 16px 0;
}
.color-swatches legend {
  padding: 0;
  font-weight: 600;
}
.color-swatches legend span {
  font-weight: 400;
}
.color-swatches > div {
  display: flex;
  flex-wrap: wrap;
}
.color-swatches input[type="radio"] {
  appearance: none;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--swatch) 0 14px,
    var(--line) 14px 15px,
    transparent 16px
  );
}
.color-swatches input:checked::after {
  content: "✓";
  display: grid;
  place-items: center;
  color: white;
  background: #131313;
  border: 1px solid white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font: bold 12px/1 system-ui;
}
.color-swatches input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
@media (forced-colors: active) {
  .color-swatches input[type="radio"] {
    forced-color-adjust: none;
  }
  .color-swatches input:focus-visible {
    outline-color: Highlight;
  }
}

#ops-directory table { border-collapse: collapse; width: 100%; }
#ops-results { overflow-x: auto; }
#ops-directory :is(th, td) { padding: .65rem; border-bottom: 1px solid var(--line); text-align: start; overflow-wrap: anywhere; }
#ops-directory .ops-person { color: var(--mint); background: transparent; padding: 0; text-align: start; overflow-wrap: anywhere; text-decoration: underline; }
#ops-views [aria-pressed="false"] { color: var(--ink); background: transparent; }
@media (max-width: 370px) {
  header:has(#ops-link:not([hidden])) { gap: 2px; }
  header:has(#ops-link:not([hidden])) { padding-inline: 4px; }
}
@media (max-width: 600px) {
  #ops-directory thead { position: absolute; clip-path: inset(50%); }
  #ops-directory tbody, #ops-directory tr { display: block; }
  #ops-directory tr { padding: .4rem 0; border-bottom: 1px solid var(--line); }
  #ops-directory td { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); align-items: baseline; padding: .18rem 0; border: 0; }
  #ops-directory td::before { content: attr(data-label); font-size: .875rem; }
  #ops-directory .ops-person { min-height: 32px; }
}

.wallet-entry:has(.wallet-pin) { position: relative; }
.wallet-pin { position: absolute; top: 8px; right: 8px; font-size: 14px; }

.wallet-find { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px; margin-bottom: 12px; }
.wallet-find .wallet-search { margin: 0; }
.wallet-find > button { inline-size: 7.5em; white-space: nowrap; }

.qr-presentation[open] {
  position: fixed; inset: 0; margin: 0; border: 0; padding: 16px;
  width: 100%; height: 100%; max-width: none; max-height: none;
  background: white; color: #101414;
  display: grid; grid-template-rows: auto minmax(0,1fr) auto; justify-items: center; gap: 8px;
}
.qr-presentation button { justify-self: end; }
.qr-presentation img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }

#wallet .wallet-entry.is-dragging { opacity: .55; }
#wallet .wallet-entry[data-drop] {
  position: relative;
  outline: 2px solid var(--mint);
  background-color: color-mix(in srgb, var(--mint) 15%, Canvas);
}
.wallet-entry[data-drop]::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: 1;
  top: -3px;
  bottom: -3px;
  width: 6px;
  border-radius: 6px;
  background: #ff40bc;
  box-shadow: 0 0 0 1px #38112f;
}
.wallet-entry[data-drop="before"]::after { left: -9px; }
.wallet-entry[data-drop="after"]::after { right: -6px; }

#handle-dialog {
  width: min(26rem, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
#handle-dialog::backdrop { background: #0009; }
#handle-heading { margin-top: 0; }
#handle-status { min-height: 1.5em; }

#wallet-backup-menu .wallet-readiness { margin: 0 0 .3rem; font-size: .875rem; line-height: 1.35; }
#wallet-backup-menu .offline-switch { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.offline-switch input { width: auto; }

.link-editor + .link-editor, .file-group + .file-group { border-top: 1px solid var(--line); }
.link-editor { padding-block: .25rem; }
.link-editor label, .file-group label { margin: 0; }
.link-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.link-editor .link-toggle {
  flex: 1 1 7rem; min-width: 0; overflow-wrap: anywhere; text-align: left;
  background: transparent; color: var(--mint); padding: .35rem 0;
}
.link-fields, .file-fields { display: grid; gap: .6rem; margin-block: .5rem; }
.link-fields button { justify-self: start; }
.identity-fields label, .identity-fields input { font: inherit; margin: 0; }
.identity-fields label { display: block; }
.image-options { display: grid; grid-template-columns: minmax(0,9rem) minmax(0,1fr); gap: .5rem; }
.file-preview { width: 40px; height: 40px; display: grid; place-items: center; color: var(--mint); font-size: .8rem; }
.file-preview canvas { max-width: 100%; max-height: 100%; }
@media (max-width: 600px) {
  .link-editor .link-controls { flex-wrap: nowrap; gap: .3rem; }
  .link-editor .link-toggle { flex: 1 1 0; }
  .link-editor .link-logo-choice span:last-child { display: none; }
  .link-editor :is(.link-logo-choice,.feature-choice) { gap: 2px; font-size: .9rem; }
  .link-editor .link-moves { gap: 2px; }
}
@media (max-width: 400px) {
  .image-options { grid-template-columns: minmax(0, 45%) minmax(0, 1fr); }
}
.link-logo-choice:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; }
.link-logo-choice input { width: auto; }
.social-icon { display: inline-block; width: 1.35em; height: 1.35em; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.public-links { border-top: 1px solid var(--line); padding-top: 8px; justify-content: center; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-block: 12px; }
.public-links a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.social-links { gap: 4px; }
.social-links a { position: relative; justify-content: center; min-width: 44px; }
.social-tip { display: none; position: absolute; z-index: 1; bottom: 95%; inset-inline-start: 0; width: max-content; max-width: min(16rem, 65vw); padding: 4px 8px; background: Canvas; color: CanvasText; border: 1px solid; border-radius: 4px; }
.social-links a:is(:hover,:focus-visible) .social-tip { display: block; }

.link-moves { display: inline-flex; gap: 4px; }
.link-moves button { min-width: 44px; padding-inline: 8px; }

.file-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.file-order { display: grid; gap: .35rem; }
#add-page-file { margin-block: 1rem .75rem; }
.file-order:empty { display: none; }
.file-gallery {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px 12px; margin-block: 20px;
}
@media (min-width: 760px) { .file-gallery { grid-template-columns: repeat(4,minmax(0,1fr)); } }
.file-gallery.full-width { grid-template-columns: minmax(0,1fr); }
.file-gallery figure { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.file-gallery figure:only-child { grid-column: 1 / -1; }
.gallery-photo, .gallery-document { display: block; }
.gallery-photo img, .pdf-cover {
  width: 100%; aspect-ratio: 4 / 3; display: grid; border-radius: 6px;
}
.bio hr { border: 0; border-top: 1px solid var(--line); margin: 1.5lh 0; }
.gallery-divider { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.gallery-divider + .public-links { border-top: 0; }
.gallery-photo img { display: block; object-fit: cover; }
.gallery-photo img.fit-image { object-fit: contain; }
.full-width .gallery-photo img, .file-gallery figure:only-child .gallery-photo img { height: auto; aspect-ratio: auto; }
.pdf-cover { place-items: center; background: color-mix(in srgb, currentColor 7%, transparent); }
.pdf-cover canvas { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.document-icon { width: 2rem; height: 2.6rem; border: 2px solid; border-radius: 3px; }
.document-title, .file-gallery figcaption { display: block; padding-top: 6px; }
.photo-viewer { max-width: 96vw; max-height: 96dvh; padding: 10px; }
.photo-viewer img { display: block; max-width: 88vw; max-height: 78dvh; object-fit: contain; }
.photo-viewer button { display: block; margin: 0 0 8px auto; }
.photo-viewer::backdrop { background: #000b; }

.footer-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-block: 0;
}
.footer-home img { object-fit: contain; }
.page-themes { display: flex; flex-wrap: wrap; gap: 4px; }
.page-themes label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  position: relative; justify-content: center; padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--page-bg, light-dark(#f6f8f3, #0a0d10));
  color: var(--mint);
  cursor: pointer;
}
.page-themes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.page-themes label:has(:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.page-themes label:has(:checked) { box-shadow: inset 0 0 0 2px var(--mint); }
[data-page-theme="lagoon"] {
  --page-bg: light-dark(#e6f7ff, #071e31);
  --ink: light-dark(#113448, #e4f5ff);
  --mint: light-dark(#005e80, #72d8ff);
}
[data-page-theme="dusk"] {
  --page-bg: light-dark(#f5edff, #20152e);
  --ink: light-dark(#382044, #f5eafe);
  --mint: light-dark(#69368a, #e3a6ff);
}
[data-page-theme="coral"] {
  --page-bg: light-dark(#fff0e9, #301914);
  --ink: light-dark(#49291f, #fff0e5);
  --mint: light-dark(#963e24, #ffac8b);
}
html[data-page-theme]:not([data-page-theme="classic"]) {
  --line: color-mix(in srgb, var(--mint) 40%, var(--page-bg));
}
html[data-page-theme]:not([data-page-theme="classic"]) body { background: var(--page-bg); }
html[data-page-theme]:not([data-page-theme="classic"]) :is(p, small) { color: var(--ink); }

#stats { max-width: 48rem; }
#stats details { margin-block: .5rem; }
.stats-filters { display: flex; flex-wrap: wrap; gap: 1rem; }
.stats-filters label { min-width: 0; max-width: 100%; }
.stats-filters select { max-width: 100%; }
.traffic-chart { height: 5rem; display: flex; align-items: end; gap: 2px; border-bottom: 1px solid currentColor; }
.traffic-chart span { flex: 1; background: currentColor; }

.feature-choice { display: inline-flex; align-items: center; gap: .4rem; }
.feature-choice input { width: auto; }
.page-feature { display: block; width: fit-content; max-width: 100%; margin: 1rem auto; padding: .7rem 1.4rem; background: var(--mint); color: var(--page-bg, light-dark(#f6f8f3, #0a0d10)); border-radius: .5rem; font-weight: 700; overflow-wrap: anywhere; text-decoration: none; }
.qr-capture { width: min(94vw, 30rem); max-height: 90vh; overflow: auto; }
.qr-capture video { display: block; width: 100%; max-height: 55vh; object-fit: contain; }
.qr-capture button { margin: .25rem; }

#address-qr #wallet .card-bar:has(+ .card-present) {border-color:transparent}
#wallet .card-bar:has(+ .card-present) button,
#wallet .wallet-present-actions button {background:transparent;color:var(--ink);min-width:44px;min-height:44px}
#wallet .wallet-present-actions {display:grid;grid-template-columns:1fr 1fr;align-items:center;width:min(100%,17rem);gap:.5rem}
#wallet .wallet-present-actions button {font-size:.875rem}
#wallet .card-present .qr-presentation img {image-rendering:pixelated}
.card-bar-actions { display: flex; align-items: center; gap: 6px; }
.card-bar h1 { margin: 0; }
#address-qr .card-front canvas { width: 100% !important; margin: 0; }
#address-qr .flip-hint { background: transparent; color: var(--ink); }
#page-qr-menu:popover-open { display: grid; gap: .75rem; padding: 1rem; max-width: min(24rem, 90vw); }
body:has(#address-qr:not([hidden]) > .card-bar) > :is(header, footer) { display: none; }
body:has(#address-qr:not([hidden]) > .card-bar) main { padding-block-start: 0; }

.file-summary { display: flex; align-items: center; justify-content: space-between; gap: .25rem; }
.file-summary .file-heading { min-width: 0; flex: 1; text-align: left; background: transparent; padding: 0; }
.file-summary .link-controls { flex-wrap: nowrap; gap: .25rem; }
.file-fields > button { justify-self: start; }
.link-fields { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.link-fields label:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
.link-fields > button { grid-column: 2; grid-row: 1; }
.bio-toolbar { display: flex; align-items: center; justify-content: space-between; }
.bio-toolbar button { min-width: 44px; padding: .25rem; background: transparent; color: var(--mint); font-size: 1.4rem; }
#bio-dialog[open] { display: flex; flex-direction: column; box-sizing: border-box; inset: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; border: 0; padding: 1rem; background: Canvas; color: CanvasText; }
#page-form #bio-dialog textarea { flex: 1; min-height: 0; resize: none; }
.page-versions { width: min(44rem, 94vw); max-height: 90dvh; overflow: auto; border: 1px solid var(--line); border-radius: .6rem; color: CanvasText; background: Canvas; }
.page-versions::backdrop { background: #0009; }
.version-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.version-cards section { padding: .7rem; border: 1px solid var(--line); overflow-wrap: anywhere; }
.version-cards h3 { margin-top: 0; }
.version-cards details p { white-space: pre-wrap; }
.page-versions form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
@media (max-width: 540px) { .version-cards { grid-template-columns: minmax(0,1fr); } }

.version-differences { margin-block: 1rem; overflow-wrap: anywhere; }
.version-differences li { margin-block: .5rem; white-space: pre-wrap; }

main:has(> #route-shell:not([hidden])) > section { display: none; }
#route-loading::before {
  content: ""; display: inline-block; width: .85em; height: .85em; margin-inline-end: .5em;
  border: 2px solid var(--mint); border-right-color: transparent; border-radius: 50%;
  animation: save-spin .7s linear infinite;
}
@media (prefers-reduced-motion: reduce) { #route-loading::before { animation: none; } }

.page-search-choice {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
}
.page-search-choice input { width: auto; }

.bio-columns { display: grid; gap: .375rem .75rem; margin-block: .5rem; }
.bio-columns > div > :first-child { margin-top: 0; }
.bio-columns > div > :last-child { margin-bottom: 0; }
@media (min-width: 42rem) {
  .bio-columns { width: fit-content; max-width: 100%; grid-template-columns: repeat(2, minmax(0, auto)); }
}
#bio-tools { display: inline-flex; margin-left: auto; }
#bio-tools button { display: grid; place-items: center; }
#bio-tools svg { width: 18px; height: 18px; }

.bio-table { border-collapse: collapse; max-width: 100%; margin-block: .75rem; font: inherit; }
.bio-table td { padding: .35rem .5rem; vertical-align: top; }
.bio-table td:first-child { padding-left: .25rem; }
.bio-table .ruled > td { border-top: 1px solid var(--line); }
.bio-table .bottom-rule > tr:last-child > td { border-bottom: 1px solid var(--line); }
.bio hr:has(+ :is(.bio-table, .bio-columns)) { margin-bottom: .5rem; }
.bio :is(.bio-table, .bio-columns) + hr { margin-top: .5rem; }

.bio blockquote { margin: .5rem 0; padding-inline-start: .875rem; border-inline-start: 2px solid var(--line); }
.bio blockquote > :first-child { margin-top: 0; }
.bio blockquote > :last-child { margin-bottom: 0; }
.bio-table .indented td { padding-inline-start: 1.25rem; }
.bio-table .indented td:first-child { border-inline-start: 2px solid var(--line); }

.bio-end-space { height: 1lh; }
.bio-table tr + tr td { padding-top: .75rem; }
.bio-row-space { display: block; height: .4rem; }

#studio-management .address-info { min-width:0; }
#studio-management h2 { margin:0 0 .5rem; }
#studio-management .row { margin-top:1rem; gap:.75rem; }
#studio-management .address-row { align-items:center; }
