/* Badge profile: the page shown on / after a passkey.
   Everything is scoped to .pf and the tokens are --pf-* so the passkey gate's own styles are untouched. */

@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --pf-bg: #ffffff;
  --pf-ink: #1d1f24;
  --pf-muted: #6b6e75;
  --pf-panel: #f6f6f4;
  --pf-panel-line: rgba(0,0,0,.07);
  --pf-row-line: rgba(0,0,0,.07);
  --pf-underline: rgba(29,31,36,.4);
  --pf-accent: #9c7d36; /* darker gold so icons read on white */
  --pf-accent-hover: rgba(156,125,54,.1);
  --pf-menu: #ffffff;
  --pf-field: #fff;
  --pf-gold: linear-gradient(180deg, #fffbef 0%, #f4e8c8 100%);
}

/* Page colours apply only once unlocked, so the white gate is unchanged. */
html.is-unlocked, html.is-unlocked body { background: var(--pf-bg); color: var(--pf-ink); transition: background .2s ease, color .2s ease; }
html.is-unlocked { color-scheme: light; }

.pf { width: min(560px, 100%); margin: 0 auto; padding: 72px 16px 80px; text-align: center; color: var(--pf-ink);
  font-family: Inter, system-ui, -apple-system, sans-serif; letter-spacing: -0.02em; -webkit-font-smoothing: antialiased; }
.pf *, .pf *::before, .pf *::after { box-sizing: border-box; }
.pf .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; }
.pf .dim { color: var(--pf-muted); }

/* Badge: same visible size as the gate's badge, 440 x 62% x 92% ≈ 251px (phones: 380 x 68% x 92%). */
.pf-pic { position: relative; width: min(251px, 62vw); aspect-ratio: 1; margin: 0 auto; }
.pf-pic .b3 { width: 100%; height: 100%; }
.pf-pic .b3__face svg rect[fill="none"] { display: none; } /* no rim line on the default art */
@media (max-width: 520px) { .pf-pic { width: min(238px, 59vw); } }

.pf h1 { margin: 26px 0 0; font-size: 40px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.2; }
.pf-sec { margin: 34px 0 10px 4px; text-align: left; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--pf-muted); }

/* Tables */
.pf-panel { text-align: left; border-radius: 20px; background: var(--pf-panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--pf-panel-line); }
.pf-r { position: relative; display: grid; grid-template-columns: 116px 1fr 32px; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; min-height: 58px; }
.pf-r + .pf-r { border-top: 1px solid var(--pf-row-line); }
.pf-k { font-size: 13px; color: var(--pf-muted); }
.pf-v { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 0; }
.pf-v a, .pf-v .u { color: var(--pf-ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--pf-underline); }
.pf-v a:hover { text-decoration-color: var(--pf-ink); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; white-space: normal; }
.pf-chip { padding: 5px 10px; border-radius: 999px; font-size: 13px; background: var(--pf-gold); color: #2b2614; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.pf-mask { letter-spacing: .18em; color: var(--pf-muted); }
.pf-words { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; white-space: normal; font-size: 13px; }
.pf-words span { overflow: hidden; text-overflow: ellipsis; }
.pf-words i { font-style: normal; color: var(--pf-muted); font-size: 11px; margin-right: 5px; }

/* Identities and Wallets: list rows with a small logo, the name, and a right-aligned Connect / Verified / balance */
.pf-r.pf-lr { grid-template-columns: 40px 1fr auto; }
.pf-r.pf-wr { grid-template-columns: 40px 1fr auto auto; }
.pf-logo { width: 40px; height: 40px; display: block; }
.pf-logo svg, .pf-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.pf-amt { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.pf-amt .dim { font-size: 12px; }
.pf-acts { display: flex; gap: 2px; }
.pf-end { justify-self: end; font-size: 14px; color: var(--pf-muted); white-space: nowrap; }
.pf-ok svg { width: 22px; height: 22px; display: block; }
.pf-linkic { width: 32px; display: grid; place-items: center; }
.pf-linkic svg { width: 18px; height: 18px; display: block; } /* same size and stroke as the other row icons */
.pf-linkic { color: var(--pf-muted); }
/* Whole-row links */
a.pf-rowlink { color: inherit; text-decoration: none; cursor: pointer; transition: background .15s ease; }
a.pf-rowlink:hover { background: rgba(29,31,36,.035); }
a.pf-rowlink:hover .pf-linkic { color: var(--pf-ink); }
a.pf-rowlink:focus-visible { outline: 2px solid var(--pf-muted); outline-offset: -2px; border-radius: 6px; }
.pf-panel > .pf-r:first-child { border-top-left-radius: 20px; border-top-right-radius: 20px; }
.pf-panel > .pf-r:last-child { border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; }
/* Send / receive: black outline */
.pf-ib.pf-send { color: var(--pf-ink); }

/* One icon per row, all in the same right-hand column, in the same grey as the row labels */
.pf-ib { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--pf-muted); display: grid; place-items: center; cursor: pointer; text-decoration: none; padding: 0; }
.pf-ib:hover:not(:disabled) { background: rgba(29,31,36,.06); color: var(--pf-ink); }
.pf-ib:focus-visible { outline: 2px solid var(--pf-muted); outline-offset: 1px; }
.pf-ib:disabled { opacity: .35; cursor: default; }
.pf-ib svg { width: 18px; height: 18px; }
.st-grp .pf-ib svg { width: 16px; height: 16px; } /* match the chevron's weight */


/* Change picture + Log out, at the bottom of the Badge table. The name is shown only in that table. */
.pf-pic + .pf-body > .pf-sec:first-child { margin-top: 40px; }
.pf-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 16px; border-top: 1px solid var(--pf-row-line); }
.pf-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 132px; height: 44px; padding: 0 22px;
  border: 0; border-radius: 999px; font: 600 16px Inter, sans-serif; letter-spacing: -0.015em; line-height: 1; cursor: pointer;
  color: var(--pf-ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.05); transition: transform .18s ease, background .18s ease; }
.pf-btn:hover { transform: translateY(-1px); background: #fafafa; }
.pf-btn:focus-visible { outline: 2px solid #2a2c31; outline-offset: 3px; }
/* Graphite, same as the gate's "Access your Badge" button (.enter in landing.css). */
.pf-logout { display: inline-flex; align-items: center; justify-content: center; min-width: 132px; height: 44px; padding: 0 26px;
  border: 1px solid #1e2024; border-radius: 999px; font: 600 16px Inter, sans-serif; letter-spacing: -0.015em; line-height: 1; cursor: pointer;
  color: #e6e8eb; background: linear-gradient(180deg, #3a3d43 0%, #2a2c31 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 4px 12px rgba(0,0,0,.16);
  transition: transform .18s ease, filter .18s ease; }
.pf-logout:hover { transform: translateY(-1px); filter: brightness(1.08); }
.pf-logout:active { transform: translateY(0); }
.pf-logout:focus-visible { outline: 2px solid #2a2c31; outline-offset: 3px; }

/* Apps and Wallets: at least three per row */
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(96px, 30%), 1fr)); gap: 8px; padding: 18px 12px; }
.pf-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 14px; font-size: 14px; }
.pf-tile img { width: 72px; height: 72px; display: block; }
/* Official wallet marks sit on a light rounded square, same 72px box as the app icons. */
.pf-tile[data-wallet] img {
  box-sizing: border-box;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  object-fit: contain; /* official marks keep their aspect; do not stretch */
}

/* QR dialog */
.pf-dialog { border: 0; padding: 0; background: transparent; color: var(--pf-ink); }
.pf-dialog:focus { outline: none; } /* focused itself on touch screens (js/softfocus.js) */
.pf-dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pf-qrbox { width: min(320px, 86vw); padding: 22px; border-radius: 24px; background: var(--pf-menu); box-shadow: inset 0 0 0 1px var(--pf-panel-line); text-align: center;
  font-family: Inter, system-ui, sans-serif; letter-spacing: -0.02em; }
.pf-qrbox h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.pf-qrbox .code { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--pf-panel-line); }
.pf-qrbox .code svg { display: block; width: 100%; height: auto; }
.pf-qrbox p { margin: 12px 0 0; font-size: 12px; color: var(--pf-muted); word-break: break-all; }
/* Done: graphite, same as Log out */
.pf-qrbox button { margin-top: 16px; min-width: 132px; height: 44px; padding: 0 26px; border: 1px solid #1e2024; border-radius: 999px;
  font: 600 16px Inter, sans-serif; letter-spacing: -0.015em; line-height: 1; cursor: pointer; color: #e6e8eb;
  background: linear-gradient(180deg, #3a3d43 0%, #2a2c31 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 4px 12px rgba(0,0,0,.16);
  transition: transform .18s ease, filter .18s ease; }
.pf-qrbox button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.pf-qrbox button:active { transform: translateY(0); }
.pf-qrbox button:focus-visible { outline: 2px solid #2a2c31; outline-offset: 3px; }

/* Crop picture dialog. Same cream box / dark backdrop / graphite Save as the QR dialog and Log out. */
.pf-crop { border: 0; padding: 0; max-width: none; max-height: calc(100% - 24px); background: transparent; color: var(--pf-ink); }
.pf-crop::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pf-crop-box { width: min(420px, 92vw); max-height: calc(100vh - 32px); overflow: auto; padding: 20px; border-radius: 24px;
  background: var(--pf-menu); box-shadow: inset 0 0 0 1px var(--pf-panel-line);
  font-family: Inter, system-ui, sans-serif; letter-spacing: -0.02em; text-align: left; box-sizing: border-box; }
.pf-crop-box *, .pf-crop-box *::before, .pf-crop-box *::after { box-sizing: border-box; }
.pf-crop-stage { position: relative; height: min(340px, 50vh); background: #1a1c20; border-radius: 16px; overflow: hidden;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.pf-crop-stage.is-dragging { cursor: grabbing; }
.pf-crop-stage:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.pf-crop-stage img { position: absolute; max-width: none; display: block; pointer-events: none; -webkit-user-drag: none; }
/* Exact same rounded-square as the badge tile (.b3__face). The spread shadow dims everything outside the frame. */
.pf-crop-frame { position: absolute; width: var(--crop-f, 280px); height: var(--crop-f, 280px); left: 50%; top: 50%;
  transform: translate(-50%, -50%); border-radius: 21.74%; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.72), 0 0 0 9999px rgba(0,0,0,.55); }
.pf-crop-zoom { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--pf-muted); }
.pf-crop-zoom-label { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-crop-zoom-label > span { flex: 0 0 52px; }
.pf-crop-q { flex: 0 0 38px; text-align: right; font-variant-numeric: tabular-nums; color: var(--pf-ink); }
.pf-crop-zoom input[type="range"] { flex: 1; min-width: 0; height: 28px; margin: 0; accent-color: #2a2c31; cursor: pointer; }
.pf-crop-zoom input[type="range"]:focus-visible { outline: 2px solid #2a2c31; outline-offset: 2px; }
.pf-crop-budget { margin-top: 6px; min-width: 0; }
.pf-crop-budget [data-budget-size] { display: block; white-space: nowrap; color: var(--pf-ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pf-crop-budget-track { height: 4px; margin-top: 6px; border-radius: 999px; background: rgba(29,31,36,.1); overflow: hidden; }
.pf-crop-budget-fill { height: 100%; width: 0; border-radius: inherit; background: #1a7f37; transition: width .16s ease, background .16s ease; }
.pf-crop-budget.is-tight .pf-crop-budget-fill { background: #9c7d36; }
.pf-crop-budget.is-over .pf-crop-budget-fill { background: #8a2f2f; }
.pf-crop-err { margin: 10px 0 0; font-size: 13px; color: #8a2f2f; text-align: center; }
.pf-crop-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pf-logout:disabled, .pf-btn:disabled { opacity: .5; cursor: default; transform: none; filter: none; }
/* Steps 2 and 3 of the picture popup: confirm the permanent upload, then the instant Arweave IDs. */
.pf-up { text-align: center; }
.pf-up[hidden], .pf-crop-box[hidden], .pf-up [hidden] { display: none !important; }
.pf-up-pic { position: relative; width: 132px; height: 132px; margin: 6px auto 0; }
.pf-up-pic img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 21.74%; box-shadow: 0 0 0 1px var(--pf-panel-line), 0 10px 24px rgba(0,0,0,.12); }
/* Username / display name upload: the change, old → new. */
.pf-up-name { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px; margin: 6px auto 0; padding: 14px 16px; max-width: 330px;
  border-radius: 14px; background: rgba(29,31,36,.05); font-size: 15px; overflow-wrap: anywhere; }
.pf-up-name .pf-up-k { width: 100%; font-size: 12px; }
.pf-up-old { color: var(--pf-muted); text-decoration: line-through; }
.pf-up-arrow { color: var(--pf-muted); }
.pf-up-new { font-weight: 600; color: var(--pf-ink); }
.pf-up-size { margin: 12px 0 0; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--pf-muted); }
.pf-up-h { margin: 14px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--pf-ink); display: inline-flex; align-items: center; gap: 10px; }
.pf-up-p { margin: 8px auto 0; max-width: 330px; font-size: 14px; line-height: 1.45; color: var(--pf-muted); }
.pf-up-rows { margin-top: 14px; display: grid; gap: 8px; text-align: left; }
.pf-up-rows:empty { display: none; }
.pf-up-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(29,31,36,.05); font-size: 13px; }
.pf-up-k { flex: 0 0 auto; color: var(--pf-muted); font-weight: 600; }
.pf-up-v { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pf-ink); }
.pf-up-v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; font-size: 12px; }
.pf-up-copy { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 5px 9px; background: #2a2c31; color: #fff; font: 600 12px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.pf-up-copy:focus-visible { outline: 2px solid #2a2c31; outline-offset: 2px; }
.pf-up-err { text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  padding: 10px 12px; border-radius: 12px; background: rgba(138,47,47,.08); }
.pf-up-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(29,31,36,.18); border-top-color: #2a2c31; animation: pf-spin .8s linear infinite; }
@keyframes pf-spin { to { transform: rotate(360deg); } }
.pf-up-pk { margin: 10px auto 0; font-size: 13px; color: var(--pf-muted); }
.pf-up-link { border: 0; padding: 0; background: none; color: var(--pf-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pf-up-link:focus-visible { outline: 2px solid #2a2c31; outline-offset: 2px; border-radius: 4px; }
.pf-up-alt { margin: 10px 0 0; font-size: 13px; color: var(--pf-muted); }
/* Full-width buttons in the picture / upload popups (Continue, Upload to Arweave): as wide as the size bar,
   with the same rounded-square corners as the inputs and the Access popup's buttons. */
.pf-up-wide { width: 100%; border-radius: 12px; }
.pf-tbtn { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 5px 10px; background: rgba(29,31,36,.07); color: var(--pf-ink); font: 600 12px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.pf-tbtn:hover { background: rgba(29,31,36,.12); }
.pf-tbtn:disabled { opacity: .5; cursor: default; }
.pf-pk-err { color: #8a2f2f; font-size: 12px; white-space: normal; }
.st-waddr { gap: 12px; }
.st-waddr { flex-wrap: nowrap; }
.st-addrw { display: flex; align-items: center; gap: 0; min-width: 0; margin-right: -5px; }
.st-waddr .st-copy { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; }
.st-waddr .st-addr { margin-right: 4px; }
.st-waddr .st-copy svg { width: 15px; height: 15px; }
.st-waddr .st-copy.is-copied { color: var(--pf-ink); }
.st-waddr .st-addr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--pf-ink); }
.pf-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2; }
.pf-confetti[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .pf-up-spin { animation: none; border-top-color: rgba(29,31,36,.18); border-right-color: #2a2c31; } }

@media (max-width: 460px) {
  .pf-crop-box { width: min(420px, 96vw); padding: 14px; border-radius: 20px; }
  .pf-crop-stage { height: min(300px, 46vh); }
}

@media (max-width: 460px) {
  .pf-r { grid-template-columns: 1fr 32px; padding-left: 16px; }
  .pf-k { grid-column: 1 / -1; margin-bottom: -6px; }
  .pf-r.pf-lr { grid-template-columns: 40px 1fr auto; }
  .pf-r.pf-wr { grid-template-columns: 40px 1fr auto auto; }
}

/* ---------- Settings layout (design variant 04, now the live page) ---------- */
/* Badge keeps the home-page size from .pf-pic above. */
.pf .st-name { margin: 18px 0 6px; font-size: 26px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.2; }
.st-txt { border: 0; background: none; padding: 4px 8px; font: 600 14px Inter, sans-serif; letter-spacing: -0.01em; color: var(--pf-accent); cursor: pointer; border-radius: 8px; }
.st-txt:hover { background: var(--pf-accent-hover); }
.st-txt:focus-visible { outline: 2px solid var(--pf-accent); outline-offset: 2px; }
.st-h { margin: 22px 0 8px 16px; text-align: left; font-size: 13px; font-weight: 500; letter-spacing: -0.01em; color: var(--pf-muted); }
.st-grp { margin-top: 34px; border-radius: 14px; background: var(--pf-panel); overflow: hidden; text-align: left; }
.st-h + .st-grp { margin-top: 0; }
.st-li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px 8px 16px; font-size: 15px; color: inherit; text-decoration: none; }
.st-li + .st-li { border-top: 1px solid var(--pf-row-line); margin-left: 16px; padding-left: 0; }
/* the Badge rows reuse .pf-r for the name editor; undo its grid and borders here */
.st-grp .pf-r { display: flex; grid-template-columns: none; border-top: 0; }
.st-grp .pf-r + .pf-r { border-top: 1px solid var(--pf-row-line); }
.st-k { flex: none; width: 130px; color: var(--pf-muted); font-size: 14px; }
.st-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; padding: 0; }
.st-li .pf-logo { width: 30px; height: 30px; flex: none; }
.st-li .pf-logo svg, .st-li .pf-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.st-app { border-radius: 8px; }
.st-st { display: inline-flex; align-items: center; gap: 6px; color: var(--pf-muted); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.st-st svg { width: 16px; height: 16px; }
.st-chev { box-sizing: content-box; width: 16px; height: 16px; padding: 8px; margin: -8px; border-radius: 8px; flex: none; color: var(--pf-muted); transition: background .15s ease, color .15s ease; }
/* Rows don't highlight on hover; only the control on the far right does */
.st-chev:hover { color: var(--pf-ink); background: rgba(29,31,36,.06); }
.st-link:focus-visible { outline: 2px solid var(--pf-muted); outline-offset: -2px; }
.st-acts { justify-content: space-around; }
.st-acts button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--pf-ink);
  font: 600 15px Inter, sans-serif; letter-spacing: -0.01em; cursor: pointer; }
.st-acts button:hover { background: rgba(0,0,0,.05); }
.st-acts svg { width: 18px; height: 18px; }
.st-out { display: flex; justify-content: center; margin-top: 30px; }
.st-grp .pf-words { padding: 6px 0; }
@media (max-width: 460px) { .st-k { width: 104px; } }

/* Wallets: a row per wallet showing its USD value; click to expand balance, value, Send and Receive. */
.st-w + .st-w { border-top: 1px solid var(--pf-row-line); margin-left: 16px; }
.st-w + .st-w .st-wbtn { padding-left: 0; }
.st-wbtn { width: 100%; border: 0; background: none; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.st-wbtn:focus-visible { outline: 2px solid var(--pf-muted); outline-offset: -2px; }
.st-wbtn .st-chev { transition: transform .2s ease, background .15s ease, color .15s ease; }
.st-w.is-open .st-wbtn .st-chev { transform: rotate(90deg); }
.st-wx { box-sizing: border-box; padding: 2px 14px 14px 58px; } /* border-box: the slide animates padding too */
.st-w + .st-w .st-wx { padding-left: 42px; }
.st-wamt { display: flex; gap: 28px; padding: 4px 0 12px; }
.st-wamt > span { display: flex; flex-direction: column; gap: 3px; }
.st-wk { font-size: 12px; color: var(--pf-muted); }
.st-wamt b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; font-family: Inter, system-ui, -apple-system, sans-serif; }
.st-wx .st-acts { display: flex; gap: 8px; justify-content: flex-start; }
.st-wx .st-acts button { background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.st-wx .st-acts button:hover { background: #fafafa; }

/* Picture thumbnail in the Badge list */
.st-thumb { display: block; width: 32px; height: 32px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.st-thumb img, .st-thumb svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-thumb svg rect[fill="none"] { display: none; }
/* Identities: + to connect, gold check once connected, in the same right-hand column as the other icons */
.st-end { width: 32px; height: 32px; flex: none; display: grid; place-items: center; }
.st-end svg { width: 16px; height: 16px; } /* same size and stroke as the chevron */
.st-ok svg { width: 22px; height: 22px; }
/* Right-hand controls: the same 32px rounded square as the Badge section's buttons (.pf-ib), highlighted on hover */
.st-plus, .st-go { width: 32px; height: 32px; margin: 0; border-radius: 8px; transition: background .15s ease, color .15s ease; }
.st-plus, .st-go { color: var(--pf-muted); } /* every right-hand icon shares one colour */
.st-plus:hover, .st-go:hover { color: var(--pf-ink); background: rgba(29,31,36,.06); }
/* Log out: as wide as the badge */
.st-out .pf-logout { width: min(251px, 62vw); }
@media (max-width: 520px) { .st-out .pf-logout { width: min(238px, 59vw); } }

/* "Badge" heading over the first list */
.st-h.st-h-first { margin-top: 34px; }
/* Expanded wallet: balance and value on the left, graphite Send / Receive on the right, one row */
.st-wrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.st-wrow .st-wamt { padding: 4px 0; }
.st-wbtns { display: flex; gap: 8px; }
.st-gbtn { height: 36px; padding: 0 18px; border: 1px solid #1e2024; border-radius: 999px; cursor: pointer;
  font: 600 14px Inter, sans-serif; letter-spacing: -0.01em; color: #e6e8eb; background: linear-gradient(180deg, #3a3d43 0%, #2a2c31 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 8px rgba(0,0,0,.14); transition: transform .18s ease, filter .18s ease; }
.st-gbtn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.st-gbtn:focus-visible { outline: 2px solid #2a2c31; outline-offset: 2px; }

/* Rows that open a popup are buttons */
button.st-li { width: 100%; border: 0; background: none; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
button.st-li + .st-li, .st-li + button.st-li { width: calc(100% - 16px); }
/* Passkeys: one line per passkey, domain then user name */
.st-pk { display: flex; flex-direction: column; gap: 6px; white-space: normal; padding: 4px 0; }
.st-pk > span { display: flex; gap: 10px; align-items: baseline; }
.st-pk b { font-weight: 500; }
.st-pk .dim { font-size: 13px; }
/* Hover the badge: a small edit button in the middle */
.pf-picedit { position: absolute; left: 50%; top: 50%; z-index: 3; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(29,31,36,.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0,0,0,.2);
  opacity: 0; transform: scale(.9); transition: opacity .18s ease, transform .18s ease; }
.pf-picedit svg { width: 18px; height: 18px; }
.pf-pic:hover .pf-picedit, .pf-picedit:focus-visible { opacity: 1; transform: scale(1); }
.pf-picedit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: none) { .pf-picedit { opacity: 1; transform: scale(1); } } /* touch: no hover, so always show it */
/* Popups */
/* The ✕ in every popup's top-right corner (publish.js CLOSE_X). */
.pf-qrbox, .pf-crop-box { position: relative; }
.pf-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 32px; height: 32px; margin: 0 !important; min-width: 0 !important; padding: 0 !important;
  display: grid; place-items: center; border: 0 !important; border-radius: 8px !important; background: none !important; box-shadow: none !important;
  color: var(--pf-muted) !important; cursor: pointer; transform: none !important; filter: none !important; }
.pf-x:hover { background: rgba(29,31,36,.06) !important; color: var(--pf-ink) !important; }
.pf-x:focus-visible { outline: 2px solid #2a2c31; outline-offset: 1px; }
.pf-x svg { width: 18px; height: 18px; }
/* The ‹ in the top-left corner, back to the step before (publish.js BACK); same look as the ✕. */
.pf-back { position: absolute; top: 12px; left: 12px; z-index: 3; width: 32px; height: 32px; margin: 0 !important; min-width: 0 !important; padding: 0 !important;
  display: grid; place-items: center; border: 0 !important; border-radius: 8px !important; background: none !important; box-shadow: none !important;
  color: var(--pf-muted) !important; cursor: pointer; transform: none !important; filter: none !important; }
.pf-back[hidden] { display: none; }
.pf-back:hover { background: rgba(29,31,36,.06) !important; color: var(--pf-ink) !important; }
.pf-back:focus-visible { outline: 2px solid #2a2c31; outline-offset: 1px; }
.pf-back svg { width: 18px; height: 18px; }
/* Confirm step: the real badge with the new picture, draggable. */
.pf-crop-box:not(.pf-up) { padding-top: 52px; } /* room for the ✕ above the crop area */
.pf-up-badge { width: 170px; height: 170px; margin: 8px auto 6px; }
.pf-up-badge .b3 { width: 100%; height: 100%; }
.pf-up .pf-up-p:first-of-type { margin-top: 18px; }
.pf-pop-logo { width: 56px; height: 56px; margin: 4px auto 12px; }
.pf-pop-logo svg, .pf-pop-logo img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 12px; }
.pf-pop-body p { margin: 10px 0 0; font-size: 14px; color: var(--pf-muted); word-break: normal; }
.pf-pop-body p b { color: var(--pf-ink); font-weight: 600; }
.pf-pop-body .mono { word-break: break-all; }
.pf-pop-ok { display: inline-flex; align-items: center; gap: 8px; color: var(--pf-ink) !important; }
.pf-pop-ok svg { width: 20px; height: 20px; }
.pf-pop-acts { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.pf-pop-acts .pf-pop-done, .pf-pop-acts .pf-pop-go { margin-top: 0; min-width: 104px; }
.pf-pop-go { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 24px; border-radius: 999px; text-decoration: none;
  font: 600 16px Inter, sans-serif; letter-spacing: -0.015em; color: var(--pf-ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.pf-pop-go:hover { background: #fafafa; }

/* A popup with one button: Continue, full width, graphite like Log out. Hover only lifts it. */
.pf-pop-acts.is-single { display: block; }
.pf-pop-acts .pf-pop-wide { width: 100%; margin-top: 0; border-radius: 12px; } /* as the gate's Use passkey button */
.pf-pop-acts .pf-pop-wide:hover { transform: translateY(-1px); filter: none; }

.st-gbtn:disabled { opacity: .45; cursor: default; transform: none; filter: none; }

/* Verified identity with a profile: an arrow to the top right */

/* "Show on public profile" switch at the bottom of an expanded wallet or app */
.st-pub { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pf-row-line); font-size: 14px; cursor: pointer; }
.st-sw { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: #d5d7db; cursor: pointer; transition: background .2s ease; }
.st-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s ease; }
.st-sw:checked { background: #2a2c31; }
.st-sw:checked::after { transform: translateX(16px); }
.st-sw:focus-visible { outline: 2px solid var(--pf-muted); outline-offset: 2px; }
a.st-gbtn { display: inline-flex; align-items: center; text-decoration: none; }


/* Username under the badge: same type as the public page's name (heading style, bigger). */
.pf .st-uname { margin: 24px 0 0; font-size: 24px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; color: var(--pf-muted); }
.pf .st-uname + .st-h-first { margin-top: 26px; }

/* Test site only (added by scripts/deploy.mjs --target test): a fixed notice at the bottom. */
.test-banner { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); box-sizing: border-box;
  padding: 8px 14px; border-radius: 999px; background: #fff4d6; color: #6b4e00; box-shadow: 0 0 0 1px rgba(107,78,0,.18), 0 4px 14px rgba(0,0,0,.08);
  font: 600 12px/1.3 Inter, system-ui, sans-serif; text-align: center; pointer-events: none; }

/* Every button in a popup looks like the Access popup's "Use passkey": as wide as the popup, with
   12px rounded-square corners. Two buttons in one row (Try again + Done, Open + Done) share it.
   The ✕ and ‹ corner buttons and the small Copy buttons keep their own shapes. */
.pf-pop-acts { width: 100%; }
.pf-pop-acts > button, .pf-pop-acts > a { flex: 1 1 0; min-width: 0 !important; border-radius: 12px !important; }
.pf-pop-acts.is-single > * { width: 100%; }
.pf-crop-actions { width: 100%; }
.pf-crop-actions > .pf-logout, .pf-crop-actions > .pf-btn { flex: 1 1 0; min-width: 0; border-radius: 12px; }
.pf-crop-actions > [hidden] { display: none; }

/* Raw manifest / sandbox link (landing/canonical.js): read-only preview, sign-in is on the canonical host. */
.preview-note { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60; margin: 0; padding: 6px 14px; border-radius: 999px; background: #fff7d6; color: #5a4300; font: 600 13px/1.3 Inter, system-ui, -apple-system, sans-serif; box-shadow: 0 2px 10px rgba(0,0,0,.12); white-space: nowrap; }
.preview-note a { color: inherit; }
.enter:disabled { opacity: .7; cursor: default; }
.pf-claim { border: 0; background: none; padding: 0 0 0 6px; font: inherit; color: var(--pf-ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--pf-underline); cursor: pointer; }

/* Badge Profile row while the first profile record uploads (landing/profile/profile.js startNewBadgeProfile). */
.pf-saving { cursor: default; }
.pf-saving .pf-up-spin { width: 14px; height: 14px; }
.pf-save-note { font-size: 12px; color: var(--pf-muted); white-space: nowrap; }
.pf-save-note.is-bad { color: #8a2f2f; }
.pf-up-note { max-width: 330px; margin: 10px auto 0; font-size: 13px; line-height: 1.4; color: var(--pf-muted); text-align: center; }

/* Groups: member list and add-row inside the group popup. */
.st-end.st-muted { font-size: 13px; color: var(--pf-muted); font-weight: 400; }
.st-glabel { margin: 16px 0 8px; font-size: 13px; font-weight: 500; color: var(--pf-muted); }
.st-glist { display: flex; flex-direction: column; gap: 0; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; overflow: hidden; background: #fff; }
.st-gmem { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--pf-row-line); }
.st-gmem:first-child { border-top: 0; }
.st-gmem .st-v { flex: 1 1 auto; min-width: 0; font-size: 14px; }
.st-grole { height: 32px; padding: 0 8px; border: 1px solid rgba(0,0,0,.18); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--pf-ink); }
.st-grole:disabled { opacity: .65; }
.st-grm { width: 32px; height: 32px; min-width: 32px; margin: 0 !important; padding: 0 !important; border-radius: 8px !important; font-size: 18px; line-height: 1; color: var(--pf-muted); }
.st-gadd { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.st-gadd .gate-input { flex: 1 1 auto; min-width: 0; }
.st-gadd-go { height: 44px; padding: 0 14px; border: 1px solid rgba(0,0,0,.18); border-radius: 12px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.st-gadd-go:hover { background: #fafafa; }
.st-gadd-go:disabled { opacity: .55; cursor: default; }

/* Apps > Signed in with your Badge: the private, local list (js/connectedapps.js). */
.st-sub { margin: 12px 18px 6px; font-size: 13px; color: var(--pf-muted); text-align: left; }
.st-sub .dim { opacity: .75; }
