/* ─────────────────────────────────────────────────────────────────────────
   PipChat! Web — design tokens, app shell, and shared components.
   Palette and type scale carried over from the original profile page so the
   profile keeps its exact look while the commerce surfaces inherit it.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --bg:       #F6F5F2;
  --bg-2:     #FBFAF8;
  --paper:    #FFFFFF;
  --ink:      #15110D;
  --body:     #423B33;
  --muted:    #837A6F;
  --subtle:   #ADA398;
  --hairline: #ECE7DF;
  --divider:  #F2EEE7;

  --orange:      #F08A2E;
  --orange-deep: #C8762A;
  --orange-soft: #FCE9D5;

  --type-normal:      #0E9F6E;
  --type-normal-2:    #057A52;
  --type-normal-soft: #E3F6EE;
  --type-biz:         #2563EB;
  --type-biz-2:       #1E40AF;
  --type-biz-soft:    #E5EDFF;
  --type-gov:         #7C3AED;
  --type-gov-2:       #5B21B6;
  --type-gov-soft:    #EFE9FE;

  --green:      #1F7A4A;
  --green-soft: #E0F3E8;
  --red:        #C53030;
  --red-soft:   #FBE7E7;
  --amber:      #E08A00;
  --amber-soft: #FDF1DC;
  --blue:       #2563EB;
  --blue-soft:  #E5EDFF;
  --star:       #F5A623;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(21,17,13,.04), 0 1px 3px rgba(21,17,13,.05);
  --shadow-md: 0 6px 18px rgba(21,17,13,.06), 0 2px 6px rgba(21,17,13,.04);
  --shadow-lg: 0 24px 48px rgba(21,17,13,.10), 0 6px 14px rgba(21,17,13,.05);

  --nav-h: 60px;

  /* Active accent — overridden per profile type, orange everywhere else. */
  --accent:      var(--orange);
  --accent-2:    var(--orange-deep);
  --accent-soft: var(--orange-soft);
}
body[data-type="Normal"]     { --accent: var(--type-normal); --accent-2: var(--type-normal-2); --accent-soft: var(--type-normal-soft); }
body[data-type="Business"]   { --accent: var(--type-biz);    --accent-2: var(--type-biz-2);    --accent-soft: var(--type-biz-soft); }
body[data-type="Government"] { --accent: var(--type-gov);    --accent-2: var(--type-gov-2);    --accent-soft: var(--type-gov-soft); }
body[data-type="PipChat"]    { --accent: var(--orange);      --accent-2: var(--orange-deep);   --accent-soft: var(--orange-soft); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

/* ── Top navigation ───────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246,245,242,.82);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.topnav-inner {
  max-width: 1140px; margin: 0 auto; padding: 11px 24px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 16px; letter-spacing: -.01em; flex-shrink: 0; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(240,138,46,.28);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.crumbs { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; min-width: 0; }
.crumbs .sep { color: var(--subtle); }
.crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-spacer { flex: 1; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 13px;
  color: var(--body); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--paper); color: var(--ink); }
.nav-link.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav-link svg { width: 16px; height: 16px; }
.nav-btn {
  padding: 8px 15px; border-radius: 999px; font-weight: 600; font-size: 13px;
  color: #fff; background: var(--ink);
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
}
.nav-btn:hover { background: #000; }
.nav-btn svg { width: 14px; height: 14px; }
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}

/* Account menu */
.acct { position: relative; flex-shrink: 0; }
.acct-btn {
  display: flex; align-items: center; gap: 8px; padding: 4px 11px 4px 4px;
  border-radius: 999px; border: 1px solid var(--hairline); background: var(--paper);
  box-shadow: var(--shadow-sm); font-weight: 700; font-size: 13px; color: var(--ink);
}
.acct-btn:hover { background: var(--bg-2); }
.acct-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 214px;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; display: none;
}
.acct-menu.open { display: block; }
.acct-head { padding: 10px 12px 11px; border-bottom: 1px solid var(--divider); margin-bottom: 5px; }
.acct-head .h-name { font-weight: 800; color: var(--ink); font-size: 14px; }
.acct-head .h-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.acct-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--body);
}
.acct-item:hover { background: var(--bg-2); color: var(--ink); }
.acct-item svg { width: 16px; height: 16px; color: var(--muted); }
.acct-item.danger { color: var(--red); }
.acct-item.danger svg { color: var(--red); }

/* ── Avatars ──────────────────────────────────────────────────────────── */
.avatar {
  position: relative; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.avatar-ini { color: #fff; font-weight: 800; line-height: 1; z-index: 1; user-select: none; }
.avatar.xl { width: 132px; height: 132px; border-radius: 28px; border: 5px solid var(--bg); box-shadow: var(--shadow-md); }
.avatar.xl .avatar-ini { font-size: 46px; }
.avatar.lg { width: 60px; height: 60px; border-radius: 16px; }
.avatar.lg .avatar-ini { font-size: 22px; }
.avatar.sm { width: 44px; height: 44px; border-radius: 12px; }
.avatar.sm .avatar-ini { font-size: 16px; }
.avatar.xs { width: 36px; height: 36px; border-radius: 10px; }
.avatar.xs .avatar-ini { font-size: 13px; }
.avatar.tiny { width: 28px; height: 28px; border-radius: 8px; }
.avatar.tiny .avatar-ini { font-size: 11px; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; transition: transform .12s, background .15s, box-shadow .15s, opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 32%, transparent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover:not(:disabled) { background: #000; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--hairline); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-2); }
.btn-ghost { background: transparent; color: var(--body); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-2); color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #A32626; }
.btn-danger-soft { background: var(--red-soft); color: var(--red); }
.btn-danger-soft:hover:not(:disabled) { background: #F6D6D6; }
.btn-icon { width: 40px; height: 40px; padding: 0; background: var(--paper); border-color: var(--hairline); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-icon:hover:not(:disabled) { background: var(--bg-2); }
.btn-lg { padding: 13px 22px; font-size: 14.5px; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-secondary .btn-spin, .btn-ghost .btn-spin { border-color: var(--hairline); border-top-color: var(--ink); }

/* ── Chips / tags / badges ────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--paper); border: 1px solid var(--hairline); color: var(--body);
}
.chip svg { width: 13px; height: 13px; }
.chip.accent { background: var(--accent-soft); color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 24%, #fff); }
.chip.ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.muted { color: var(--muted); }
.chip.live { background: var(--red); color: #fff; border-color: var(--red); }
.tag { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-2); border: 1px solid var(--hairline); color: var(--body); }
.taglist { display: flex; flex-wrap: wrap; gap: 7px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border-radius: 999px; font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.pill svg { width: 12px; height: 12px; }
.pill-green  { background: var(--green-soft); color: var(--green); }
.pill-amber  { background: var(--amber-soft); color: #9A5F00; }
.pill-red    { background: var(--red-soft); color: var(--red); }
.pill-blue   { background: var(--blue-soft); color: var(--type-biz-2); }
.pill-grey   { background: var(--bg-2); color: var(--muted); border: 1px solid var(--hairline); }
.pill-ink    { background: var(--ink); color: #fff; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-head {
  display: flex; align-items: center; gap: 9px; padding: 15px 18px;
  border-bottom: 1px solid var(--divider);
}
.card-head svg.h-ic { width: 16px; height: 16px; color: var(--accent-2); flex-shrink: 0; }
.card-head .h-ic { display: inline-flex; color: var(--accent-2); flex-shrink: 0; }
.card-head .h-ic svg { width: 16px; height: 16px; }
.card-head h2 { font-size: 13px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.card-head .h-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 14px 18px; border-top: 1px solid var(--divider); background: var(--bg-2); }

/* ── Section headers ──────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 30px 0 20px; }
.page-title { font-size: 28px; font-weight: 900; letter-spacing: -.028em; color: var(--ink); line-height: 1.15; }
.page-sub { color: var(--muted); margin-top: 5px; font-size: 14px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13px; margin-top: 24px; }
.backlink:hover { color: var(--ink); }
.backlink svg { width: 15px; height: 15px; }

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--muted); border: 1px solid transparent; white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.tab:hover { background: var(--paper); color: var(--ink); }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab .t-count { font-size: 11px; opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field-label .req { color: var(--red); margin-left: 2px; }
.input, .textarea, .select {
  width: 100%; padding: 11px 13px; border-radius: var(--r-sm);
  border: 1px solid var(--hairline); background: var(--paper); color: var(--ink);
  font-size: 14.5px; font-weight: 500; transition: border-color .14s, box-shadow .14s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--subtle); font-weight: 400; }
.input:disabled, .textarea:disabled, .select:disabled { background: var(--bg-2); color: var(--muted); cursor: not-allowed; }
.textarea { resize: vertical; min-height: 86px; line-height: 1.5; }
.select { appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23837A6F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.field.invalid .input, .field.invalid .textarea, .field.invalid .select { border-color: var(--red); }
.field-err { font-size: 12px; color: var(--red); font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-rows { display: flex; flex-direction: column; gap: 14px; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { appearance: none; width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--subtle); border-radius: 6px; background: var(--paper); cursor: pointer; transition: background .12s, border-color .12s; }
.check input:checked { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat; border-color: var(--accent); }
.check input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, #fff); outline-offset: 2px; }
.check-tx { font-size: 13.5px; color: var(--body); line-height: 1.45; }
.check-tx a { color: var(--accent-2); font-weight: 600; text-decoration: underline; }

.radio-cards { display: grid; gap: 10px; }
.radio-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border: 1.5px solid var(--hairline); border-radius: var(--r-md); background: var(--paper); cursor: pointer;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.radio-card:hover { background: var(--bg-2); }
.radio-card.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--paper)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.rc-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; flex-shrink: 0; }
.rc-ic svg { width: 18px; height: 18px; }
.rc-tx { min-width: 0; flex: 1; }
.rc-name { font-weight: 800; color: var(--ink); font-size: 14px; }
.rc-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ── Alerts ───────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px;
  border-radius: var(--r-md); font-size: 13.5px; font-weight: 500; line-height: 1.5;
}
.alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.alert b { font-weight: 800; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-warn  { background: var(--amber-soft); color: #8A5500; }
.alert-info  { background: var(--blue-soft); color: var(--type-biz-2); }
.alert-ok    { background: var(--green-soft); color: var(--green); }
.alert-neutral { background: var(--bg-2); color: var(--body); border: 1px solid var(--hairline); }

/* ── Empty / loading / error states ───────────────────────────────────── */
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid var(--hairline); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.spinner.sm { width: 22px; height: 22px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 15px; padding: 70px 24px; text-align: center; min-height: 46vh;
}
.state-icon {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--paper); box-shadow: var(--shadow-md);
  display: grid; place-items: center; color: var(--muted);
}
.state-icon svg { width: 28px; height: 28px; }
.state-title { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.state-sub { color: var(--muted); max-width: 420px; }
.state-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); font-size: 13.5px; }
.empty-strong { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

.skel { background: linear-gradient(90deg, var(--divider) 25%, var(--bg-2) 50%, var(--divider) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-line { height: 12px; margin-bottom: 8px; }
.skel-card { height: 260px; border-radius: var(--r-md); }

/* ── Toasts ───────────────────────────────────────────────────────────── */
#toasts {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 9px;
  align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 440px;
}
.toast {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: #fff;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: toast-in .2s cubic-bezier(.2,.9,.3,1);
  pointer-events: auto;
}
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }
.toast.err { background: var(--red); }
.toast.ok  { background: var(--green); }
.toast.out { animation: toast-out .18s ease-in forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ── Modal / sheet ────────────────────────────────────────────────────── */
.modal-back {
  position: fixed; inset: 0; z-index: 150; background: rgba(10,8,6,.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade-in .16s ease-out; overflow-y: auto;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 470px; overflow: hidden; margin: auto;
  animation: modal-in .2s cubic-bezier(.2,.9,.3,1);
}
.modal.wide { max-width: 620px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-head { display: flex; align-items: center; gap: 11px; padding: 17px 20px; border-bottom: 1px solid var(--divider); }
.modal-head h3 { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -.015em; flex: 1; }
.modal-x { width: 32px; height: 32px; border-radius: 9px; color: var(--muted); display: grid; place-items: center; flex-shrink: 0; }
.modal-x:hover { background: var(--bg-2); color: var(--ink); }
.modal-x svg { width: 18px; height: 18px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 10px; padding: 15px 20px; border-top: 1px solid var(--divider); background: var(--bg-2); }
.modal-foot .btn { flex: 1; }

/* ── Lightbox ─────────────────────────────────────────────────────────── */
#lightbox { position: fixed; inset: 0; z-index: 180; background: rgba(10,8,6,.86); display: none; align-items: center; justify-content: center; padding: 30px; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
#lightbox .lb-close { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
#lightbox .lb-close svg { width: 20px; height: 20px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { text-align: center; padding: 34px 24px 44px; color: var(--subtle); font-size: 12.5px; }
.footer a { color: var(--accent-2); font-weight: 600; }
.footer .f-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ── Focus ────────────────────────────────────────────────────────────── */
:is(.btn, .nav-btn, .nav-link, .tab, .brand, .acct-btn, .acct-item, .modal-x, .state-link, .linkrow, .pay-row, .docrow, .form-cta, .loc-cta, .asset-img, .cat-thumb.zoom, .qty-btn, .prod, .varchip):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, #fff);
  outline-offset: 3px;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr; }
  .nav-links .nav-link span { display: none; }
  .nav-links .nav-link { padding: 8px 10px; }
}
@media (max-width: 600px) {
  .wrap, .wrap-narrow, .topnav-inner { padding-left: 15px; padding-right: 15px; }
  .crumbs { display: none; }
  .page-title { font-size: 23px; }
  .acct-name { display: none; }
  .acct-btn { padding: 4px; }
  .modal-back { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; animation: sheet-in .22s cubic-bezier(.2,.9,.3,1); }
  @keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } }
}
