/**
 * ODP shared UI — dual-theme (Fraunces + DM Mono)
 * Author: Andrei Chernikov
 * Used by creator.html, passport.html, verify.html
 * Themes: blue (light, default), dark — switched via data-theme on <html> (see odp-theme.js)
 */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;1,9..144,300;1,9..144,400&family=DM+Mono:wght@300;400;500&display=swap');

/* ── Dark theme (default) ── */
:root {
  --bg:      #0f0e0c;
  --bg2:     #171612;
  --bg3:     #1f1d18;
  --bg4:     #272420;
  --border:  #2e2b25;
  --border2: #3d3930;
  --text:    #f0ebe3;
  --text2:   #b8b0a4;
  --text3:   #9a9488;
  --accent:  #d4a853;
  --accent2: #9a7a3a;
  --green:   #5a9e72;
  --green-bg:#0e1f14;
  --green-bd:#2d4a38;
  --red:     #c47a7a;
  --red-bg:  #1f0e0e;
  --red-bd:  #5a3030;
  --amber:   #c9a227;
  --amber-bg:#1a1608;
  --amber-bd:#6b5a20;
  --gray-bg: #1a1916;
  --warn-bg: #1a1508;
  --badge-digital-bg: #1a222e;
  --badge-digital-text: #8fb0e0;
  --overlay-bg: rgba(0, 0, 0, 0.72);
  --overlay-bg-heavy: rgba(8, 7, 6, 0.94);
  --overlay-bg-modal: rgba(10, 9, 8, 0.72);
  --overlay-bg-alt: rgba(10, 9, 8, 0.75);
  --shadow-modal: rgba(0, 0, 0, 0.55);
  --shadow-dialog: rgba(0, 0, 0, 0.45);
  --tap-highlight: rgba(212, 168, 83, 0.12);
  --focus-ring: rgba(212, 175, 55, 0.25);
  --serif:   'Fraunces', Georgia, serif;
  /* ID card main title: Bookman Old Style where installed (macOS/Windows); else URW Bookman / Times */
  --odp-id-card-display: "Bookman Old Style", Bookman, "URW Bookman L", "Times New Roman", serif;
  --mono:    'DM Mono', monospace;
  --ink:     var(--text);
  --ink2:    var(--text2);
  --ink3:    var(--text3);
  /* Single content column: matches .page width (680px ≈ 42.5rem @ 16px) */
  --page-max: 680px;
  --text-measure: min(100%, 42rem);
  /* Passport form panels on page — same geometry as light (blue) theme */
  --page-section-bg: var(--bg3);
  --page-section-border: var(--border);
  --page-section-label-border: var(--border);
  --page-tt-bg: var(--bg2);
  --page-tt-border: var(--border);
  --page-tt-hover-bg: var(--bg2);
  --page-tt-hover-border: var(--border2);
  --page-tt-sel-bg: var(--bg3);
  --page-tt-sel-border: var(--accent2);
  --page-fdrop-bg: var(--bg2);
  --page-fdrop-border: var(--border2);
  --page-fdrop-hover-bg: var(--bg3);
  --page-fdrop-hover-border: var(--accent2);
  --nav-active-bg: rgba(255, 255, 255, 0.06);
  /* ID card mono passport/profile number */
  --odp-id-card-id-color: var(--accent);
}

/* ── Blue theme (light) ── */
html[data-theme="blue"] {
  color-scheme: light;
  --bg:      #2B4C9B;
  --bg2:     #FFFFFF;
  --bg3:     #F0F2F8;
  --bg4:     #E0E4EE;
  --border:  #C8D0E0;
  --border2: #A8B4D0;
  --text:    #121520;
  --text2:   #2a2f42;
  --text3:   #4a5068;
  --accent:  #E8C060;
  --accent2: #C8A040;
  --green:   #1E7A3E;
  --green-bg:#E6F5EC;
  --green-bd:#A8D4B8;
  --red:     #C0392B;
  --red-bg:  #FDECEA;
  --red-bd:  #E8A9A3;
  --amber:   #B8860B;
  --amber-bg:#FFF8E1;
  --amber-bd:#E0C97A;
  --gray-bg: #E0E4F0;
  --warn-bg: #FFF8E1;
  --badge-digital-bg: #DCE4F8;
  --badge-digital-text: #2B4C9B;
  --overlay-bg: rgba(20, 30, 70, 0.55);
  --overlay-bg-heavy: rgba(20, 30, 70, 0.80);
  --overlay-bg-modal: rgba(20, 30, 70, 0.55);
  --overlay-bg-alt: rgba(20, 30, 70, 0.60);
  --shadow-modal: rgba(0, 0, 0, 0.20);
  --shadow-dialog: rgba(0, 0, 0, 0.18);
  --tap-highlight: rgba(232, 192, 96, 0.15);
  --focus-ring: rgba(232, 192, 96, 0.30);
  --ink:     var(--text);
  --ink2:    var(--text2);
  --ink3:    var(--text3);
  /* on-bg: for text that sits directly on the blue page background */
  --on-bg:   #FFFFFF;
  --on-bg2:  rgba(255, 255, 255, 0.95);
  --on-bg3:  rgba(255, 255, 255, 0.80);
  --on-bg-border: rgba(255, 255, 255, 0.28);
  --page-section-bg: rgba(255, 255, 255, 0.10);
  --page-section-border: rgba(255, 255, 255, 0.18);
  --page-section-label-border: rgba(255, 255, 255, 0.25);
  --page-tt-bg: rgba(255, 255, 255, 0.07);
  --page-tt-border: rgba(255, 255, 255, 0.18);
  --page-tt-hover-bg: rgba(255, 255, 255, 0.12);
  --page-tt-hover-border: rgba(255, 255, 255, 0.40);
  --page-tt-sel-bg: rgba(255, 255, 255, 0.15);
  --page-tt-sel-border: var(--accent);
  --page-fdrop-bg: rgba(255, 255, 255, 0.07);
  --page-fdrop-border: rgba(255, 255, 255, 0.22);
  --page-fdrop-hover-bg: rgba(255, 255, 255, 0.14);
  --page-fdrop-hover-border: rgba(255, 255, 255, 0.40);
  --nav-active-bg: rgba(255, 255, 255, 0.10);
  --odp-id-card-id-color: #2B4C9B;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* RU: avoid English flash before async i18n (odp-i18n-boot.js + odpInitI18n reveal) */
html.odp-i18n-pending body {
  visibility: hidden;
}
html.odp-i18n-ready body {
  visibility: visible;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: env(safe-area-inset-top, 0px) max(24px, env(safe-area-inset-right, 0px)) max(80px, calc(80px + env(safe-area-inset-bottom, 0px))) max(24px, env(safe-area-inset-left, 0px));
}

/* ── Header (verify-style row + unified typography) ── */
header {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

header.header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

/* Italic display serif reads uneven next to the mono subline; keep page titles stable */
header.header-row h1 {
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.header-left {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.header-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Wallet disconnect — compact red control in header (replaces bottom wallet bar) */
.odp-header-disconnect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #c0392b;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
/* Author `display` on the button overrides UA `[hidden]` (same specificity) — force hide when disconnected */
.odp-header-disconnect[hidden] {
  display: none !important;
}
.odp-header-disconnect:hover {
  background: #a93226;
}
.odp-header-disconnect:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.odp-header-disconnect svg {
  display: block;
  stroke: currentColor;
  fill: none;
}
html[data-theme="blue"] .odp-header-disconnect {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.odp-lang-switch {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Closed chip control; other locales only in the native dropdown list */
.odp-lang-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg2);
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
/* Chevron on wrapper — WebKit often tiles background-image on <select> (repeat glitch) */
.odp-lang-wrap::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}
.odp-lang-wrap:hover::after,
.odp-lang-wrap:focus-within::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23e8e6e3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.odp-lang-wrap:hover {
  border-color: var(--text3);
}

.odp-lang-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--focus-ring);
}

/* No chevron on <select> — see .odp-lang-wrap::after */
.odp-lang-select {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 8px 26px 8px 10px;
  border: none;
  border-radius: 100px;
  background-color: transparent;
  background-image: none;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  color: var(--text2);
  cursor: pointer;
  min-width: 0;
  width: fit-content;
  max-width: 11rem;
}

.odp-lang-select:hover {
  color: var(--text);
}

.odp-lang-select:focus {
  outline: none;
  color: var(--text);
}

.odp-lang-select option {
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 8px;
}

header:not(.header-row) {
  text-align: center;
}

header:not(.header-row) h1 { margin-bottom: 8px; }

h1 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.12;
  overflow-wrap: break-word;
  word-break: normal;
  /* `balance` can split short titles oddly when the title column is narrow */
  text-wrap: wrap;
  max-width: 100%;
}

.sub {
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 8px;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: manual;
  max-width: 42rem;
}

.header-left .sub {
  margin-top: 6px;
  max-width: none;
  text-wrap: balance;
  line-height: 1.4;
}

/* Nav */
.nav {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.nav a {
  font-size: 14px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  border-color: var(--accent2);
}
.nav a.active {
  background: var(--nav-active-bg);
}

/* Steps (creator) */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.si-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.si-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  background: var(--bg2);
  transition: all 0.2s;
}

.si-item.active .si-num { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 500; }
.si-item.active { color: var(--text2); }
.si-item.done .si-num { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.si-item.done { color: var(--text2); }

.si-line { width: 48px; height: 1px; background: var(--border); margin: 0 4px 18px; }

/* Cards */
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg2);
  margin-bottom: 20px;
  animation: up 0.25s ease;
}

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

.card-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  font-weight: 300;
  color: var(--text);
}

.card-body { padding: 24px 28px; }

/* Creator type grid */
.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
@media (min-width: 900px) {
  .type-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.type-opt {
  padding: 18px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg3);
}

.type-opt:hover { border-color: var(--border2); }
.type-opt.sel   { border-color: var(--accent2); background: var(--bg4); }

.type-letter {
  font-family: var(--serif);
  font-size: 30px;
  font-style: italic;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}

.type-name { font-size: 14px; color: var(--text); margin-bottom: 3px; }
.type-desc { font-size: 12px; color: var(--text3); line-height: 1.4; }

.wallet-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.wallet-opt {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg3);
  text-align: center;
}

.wallet-opt:hover { border-color: var(--border2); }
.wallet-opt-icon  { font-size: 22px; margin-bottom: 8px; }
.wallet-opt-name  { font-size: 14px; color: var(--text); margin-bottom: 3px; }
.wallet-opt-desc  { font-size: 12px; color: var(--text3); line-height: 1.4; }

.checklist { list-style: none; }

.checklist li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
}

.checklist li:last-child { border-bottom: none; }
.checklist-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.checklist li strong { color: var(--text); display: block; margin-bottom: 2px; }

.confirm-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 3px;
  cursor: pointer;
  margin: 16px 0;
}

.confirm-row input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  flex-shrink: 0; margin-top: 2px; cursor: pointer;
}

.confirm-row label {
  font-size: 14px; color: var(--text2);
  cursor: pointer; line-height: 1.5;
}

/* Info boxes */
.info  { padding: 13px 16px; border-radius: 6px; font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.info.neutral, .info.n { background: var(--bg3); border: 1px solid var(--border2); color: var(--text2); }
.info.warn,    .info.w { background: var(--warn-bg); border: 1px solid var(--accent2); color: var(--accent); }
.info.success, .info.s { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); }
.info.error,   .info.e { background: var(--red-bg); border: 1px solid var(--red); color: var(--red); }

.btn {
  width: 100%;
  padding: 16px 20px;
  min-height: 48px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: var(--accent);
  color: var(--bg);
}

.btn:hover    { opacity: 0.85; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Primary/secondary actions as links (valid HTML; same look as .btn) */
a.btn,
a.btn-sec {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
a.btn:hover,
a.btn-sec:hover {
  opacity: 0.85;
}

.btn-sec {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
  margin-top: 8px;
}

.btn-sec:hover { border-color: var(--text2); color: var(--text); }

/* Profile — institution structure (P parent/child): avoid full-width .btn stacks */
.creator-p-aff-card .p-aff-lead {
  font-size: 12px;
  color: var(--text2);
  margin: 0 0 14px;
  line-height: 1.6;
}
.creator-p-aff-card .p-aff-status {
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.5;
}
.creator-p-aff-card .p-aff-section {
  margin-bottom: 20px;
}
.creator-p-aff-card .p-aff-section:last-of-type {
  margin-bottom: 16px;
}
.creator-p-aff-card .search-label {
  font-size: 13px;
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text2);
  margin-bottom: 8px;
  line-height: 1.4;
}
.creator-p-aff-card .p-aff-input {
  display: block;
  width: 100%;
  max-width: 28rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.creator-p-aff-card .p-aff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.creator-p-aff-card .p-aff-actions .btn,
.creator-p-aff-card .p-aff-actions .btn-sec {
  flex: 1 1 12rem;
  min-width: 0;
  width: auto;
  margin-top: 0;
  min-height: 44px;
  padding: 12px 18px;
  font-size: 12px;
  letter-spacing: 0.05em;
}
.creator-p-aff-card .p-aff-actions--single .btn,
.creator-p-aff-card .p-aff-actions--single .btn-sec {
  flex: 0 1 auto;
  max-width: min(100%, 22rem);
}
.creator-p-aff-card .p-aff-result {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
}
.creator-p-aff-card .p-aff-result + .p-aff-result {
  margin-top: 6px;
}
.creator-p-aff-card .p-aff-hint {
  font-size: 11px;
  color: var(--text3);
  margin: 10px 0 0;
  line-height: 1.45;
}
.creator-p-aff-card .p-aff-children-title {
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.creator-p-aff-card .p-aff-children-list {
  font-size: 12px;
  word-break: break-word;
  line-height: 1.45;
}
.creator-p-aff-card .p-aff-children-footer {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.creator-p-aff-card .p-aff-children-meta {
  flex: 1 1 140px;
  font-size: 11px;
  color: var(--text3);
  line-height: 1.35;
  min-width: 0;
}
.creator-p-aff-card .p-aff-children-footer .btn,
.creator-p-aff-card .p-aff-children-footer .btn-sec {
  flex: 0 0 auto;
  width: auto;
  margin-top: 0;
  min-height: 40px;
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.06em;
}
@media (max-width: 520px) {
  .creator-p-aff-card .p-aff-actions .btn,
  .creator-p-aff-card .p-aff-actions .btn-sec {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }
  .creator-p-aff-card .p-aff-actions--single .btn,
  .creator-p-aff-card .p-aff-actions--single .btn-sec {
    max-width: none;
  }
}

.result-id {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: center;
  margin: 20px 0 8px;
  display: block;
}

.result-full {
  font-size: 13px;
  color: var(--text3);
  text-align: center;
  font-family: var(--mono);
  word-break: break-all;
  margin-bottom: 24px;
  line-height: 1.6;
}

.publish-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 20px;
}

.publish-list li {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.publish-list li:last-child { border-bottom: none; }
.publish-list li span { flex-shrink: 0; font-size: 15px; }

.wallet-bar, .wbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg2);
  margin-bottom: 24px;
  font-size: 14px;
  font-family: var(--mono);
  color: var(--text2);
}

.wdot, .wdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text3);
  flex-shrink: 0;
}
.wdot.on, .wdot.on  { background: var(--green); box-shadow: 0 0 5px var(--green); }
.wdot.off, .wdot.off { background: var(--red); }

.w-addr, .wbar-addr { flex: 1; }
.wbar-id { color: var(--accent); font-weight: 500; }
.w-switch, .wbar-dis { color: var(--text3); cursor: pointer; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.w-switch:hover, .wbar-dis:hover { color: var(--accent); }
button.w-switch,
button.wbar-dis {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

/* Passport form */
.section {
  margin-bottom: 28px;
  background: var(--page-section-bg);
  border: 1px solid var(--page-section-border);
  border-radius: 10px;
  padding: 20px;
}
/* Nested workflow blocks inside tool cards must not double the panel */
.card .section {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  margin-bottom: 28px;
}
.section-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.section .section-label {
  border-bottom-color: var(--page-section-label-border);
}
.card .section .section-label {
  border-bottom-color: var(--border);
}

.field { margin-bottom: 14px; }
label { display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); margin-bottom: 6px; }

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.field-label-row label { margin-bottom: 0; flex: 1; }
.btn-inline-info {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text3);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--serif);
  font-style: italic;
  transition: border-color 0.15s, color 0.15s;
}
.btn-inline-info:hover {
  border-color: var(--accent2);
  color: var(--accent);
}
.req { color: var(--accent2); }

input[type=text], input[type=number], input[type=url], select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: 15px; font-weight: 400;
  padding: 14px 16px; border-radius: 6px; outline: none; transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--border2); }
input::placeholder, textarea::placeholder { color: var(--text3); }
textarea { resize: vertical; min-height: 72px; }
select option { background: var(--bg2); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.fhint {
  font-size: 13px;
  color: var(--text2);
  margin-top: 6px;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: normal;
}

.type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 28px; }
.tt-opt {
  padding: 16px; border: 1.5px solid var(--border); border-radius: 6px;
  cursor: pointer; background: var(--bg2); transition: all 0.15s; text-align: center;
}
.tt-opt:hover { border-color: var(--border2); }
.tt-opt.sel   { border-color: var(--accent2); background: var(--bg3); }
.section .tt-opt {
  background: var(--page-tt-bg);
  border-color: var(--page-tt-border);
}
.section .tt-opt:hover {
  border-color: var(--page-tt-hover-border);
  background: var(--page-tt-hover-bg);
}
.section .tt-opt.sel {
  border-color: var(--page-tt-sel-border);
  background: var(--page-tt-sel-bg);
}
.tt-icon { font-size: 22px; margin-bottom: 8px; }
.tt-name { font-size: 14px; color: var(--text); margin-bottom: 3px; font-family: var(--serif); font-style: italic; }
.tt-desc { font-size: 13px; color: var(--text3); }

.creator-banner {
  padding: 14px 18px;
  border: 1px solid var(--page-section-border);
  border-radius: 10px;
  background: var(--page-section-bg);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cb-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); margin-bottom: 3px; }
.cb-val   { font-size: 15px; font-weight: 500; letter-spacing: 0.06em; color: var(--accent); }

.fdrop {
  border: 1px dashed var(--border2); border-radius: 3px; padding: 18px;
  text-align: center; cursor: pointer; transition: all 0.15s; background: var(--bg2);
}
.fdrop:hover { border-color: var(--accent2); background: var(--bg3); }
.section .fdrop {
  background: var(--page-fdrop-bg);
  border-color: var(--page-fdrop-border);
}
.section .fdrop:hover {
  background: var(--page-fdrop-hover-bg);
  border-color: var(--page-fdrop-hover-border);
}
.fdrop input { display: none; }
.fdrop-icon { font-size: 20px; margin-bottom: 7px; opacity: 0.5; }
.fdrop-text { font-size: 14px; color: var(--text3); line-height: 1.6; }
.fdrop.has-file { border-style: solid; border-color: var(--green); background: var(--green-bg); }
.finfo { font-size: 13px; color: var(--green); margin-top: 8px; font-family: var(--mono); word-break: break-all; }

/* Passport — P/M passport attestation (pmProof); also used on Creator if reintroduced */
.pm-proof-layout { max-width: 36rem; margin: 0 auto; }
.pm-proof-callout {
  text-align: left;
  margin-bottom: 14px;
  line-height: 1.55;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 8px;
}
.pm-proof-callout strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.pm-proof-lead {
  text-align: center;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}
.pm-proof-mint-note {
  text-align: center;
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text3);
}
.pm-proof-section {
  margin-top: 1.1rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}
.pm-proof-sec-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin: 0 0 12px;
  text-align: center;
}
.pm-proof-layout .search-label {
  display: block;
  text-align: center;
  margin-bottom: 6px;
}
.pm-proof-hint {
  text-align: center;
  margin: 0 auto 12px;
  max-width: 32rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text3);
}
.pm-proof-input {
  display: block;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  box-sizing: border-box;
}
textarea.pm-proof-textarea {
  min-height: 4.25rem;
  resize: vertical;
  font-family: var(--mono, ui-monospace, monospace);
  line-height: 1.45;
}
.pm-proof-fdrop-wrap {
  max-width: 28rem;
  margin: 0 auto 8px;
}
.pm-proof-fdrop-wrap .fdrop { margin-bottom: 0; }
.pm-proof-hash-line {
  text-align: center;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 4px;
  color: var(--text3);
  font-family: var(--mono, ui-monospace, monospace);
}
.pm-proof-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.pm-proof-list-block {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.pm-proof-list-title {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
  text-align: center;
}

.seal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.seal-opt {
  padding: 12px 8px; border: 1.5px solid var(--border); border-radius: 6px;
  text-align: center; cursor: pointer; background: var(--bg2); transition: all 0.15s;
  font-size: 13px; color: var(--text2);
}
.seal-opt:hover { border-color: var(--border2); }
.seal-opt.sel   { border-color: var(--accent2); color: var(--accent); background: var(--bg3); }
.seal-icon { font-size: 18px; display: block; margin-bottom: 6px; }
.seal-sub { color: var(--text3); }

.acc { border: 1px solid var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.acc-head {
  padding: 11px 14px; background: var(--bg3); cursor: pointer;
  display: flex; justify-content: space-between; font-size: 14px; color: var(--text2);
  user-select: none; transition: background 0.15s;
}
.acc-head:hover { background: var(--bg4); }
.acc-arr { font-size: 12px; transition: transform 0.2s; }
.acc.open .acc-arr { transform: rotate(90deg); }
.acc-body { display: none; padding: 14px; border-top: 1px solid var(--border); }
.acc.open .acc-body { display: block; }

.btn-row { display: flex; gap: 10px; margin-top: 28px; }
.btn-row .btn { flex: 1; }

/* Passport mint: compact fee copy + prominent CTA */
.passport-mint-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  margin-top: 28px;
}
.passport-mint-fee {
  flex: 1 1 14rem;
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  max-width: min(100%, 36rem);
}
.passport-mint-bar .passport-mint-btn {
  flex: 0 1 auto;
  width: auto;
  min-width: 12.5rem;
  max-width: 100%;
  padding: 18px 34px;
  min-height: 56px;
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}
@media (max-width: 640px) {
  .passport-mint-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .passport-mint-fee {
    max-width: none;
    font-size: 10.5px;
  }
  .passport-mint-bar .passport-mint-btn {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 20px 24px;
    font-size: 15px;
  }
}
.btn-ghost {
  background: transparent; color: var(--text2); border: 1px solid var(--border2);
  flex: 0; padding: 14px 20px; width: auto;
}
.btn-ghost:hover { border-color: var(--text2); color: var(--text); }

.success { text-align: center; padding: 32px 0; animation: up 0.3s ease; }
.success-icon { font-size: 48px; margin-bottom: 16px; }
.success-id { font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: 0.07em; color: var(--accent); display: block; margin: 16px 0 6px; }
.success-title { font-family: var(--serif); font-size: 26px; font-style: italic; font-weight: 300; margin-bottom: 6px; }
.success-sub { font-size: 14px; color: var(--text2); margin-bottom: 28px; }
/* Creator profile share modal — large centered QR */
#shareModalQr:not(.share-modal-qr-box) {
  display: inline-block;
  padding: 14px;
  background: white;
  border-radius: 4px;
  margin: 0 auto 16px;
  min-width: 168px;
  min-height: 168px;
  vertical-align: top;
}
.qr-fail { font-size: 14px; color: var(--red); text-align: left; max-width: 320px; margin: 0 auto; line-height: 1.5; }
.qr-fail a { color: var(--accent); word-break: break-all; }

.qr-share-block { text-align: center; margin: 8px 0 28px; }
.qr-share-caption {
  font-size: 13px; color: var(--text2); max-width: 380px; margin: 0 auto 14px;
  line-height: 1.55; text-align: center;
}
.qr-share-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }

/* Share modal (passport + creator) */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
.share-modal[hidden] {
  display: none !important;
}
/* Mint success: blocking notice above default share modal */
.odpass-critical-modal {
  z-index: 1001;
}
.odpass-critical-modal .share-modal-backdrop {
  cursor: default;
}
.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  cursor: pointer;
}
.share-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: min(92vh, 720px);
  overflow: auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px 22px 18px;
  text-align: center;
  box-shadow: 0 24px 80px var(--shadow-modal);
  animation: up 0.22s ease;
}
.share-modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text3);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.share-modal-x:hover { color: var(--text); background: var(--bg3); }
.share-modal-title {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  font-weight: 300;
  color: var(--text);
  margin: 0 28px 10px 0;
  text-align: left;
}
.share-modal-hint {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  text-align: left;
  margin-bottom: 16px;
}
.share-modal-url {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--mono);
  word-break: break-all;
  line-height: 1.45;
  text-align: left;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 16px;
  max-height: 88px;
  overflow: auto;
}
.share-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share-modal-actions .btn { width: 100%; justify-content: center; }

/* Passport: export card PNG + secondary QR row */
.share-modal-panel--export {
  max-width: 32rem;
  text-align: left;
}

.share-modal-preview-wrap {
  margin: 0 0 12px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.share-modal-preview-wrap--busy {
  opacity: 0.92;
}
.share-modal-preview-loading {
  margin: 0;
  font-size: 13px;
  color: var(--text2);
}
.share-modal-preview-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(40vh, 360px);
  margin: 0 auto;
  border-radius: 12px;
  /* PNG already includes card shape; extra shadow reads as a second frame */
  box-shadow: none;
}
.share-modal-title--export {
  font-family: var(--odp-id-card-display);
  font-style: italic;
  font-weight: normal;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.share-modal-lead {
  margin-bottom: 18px;
}
.share-modal-png-block {
  margin-bottom: 18px;
}
.share-modal-panel--export .share-modal-png-block {
  margin-bottom: 8px;
}
.share-modal-panel--export .share-modal-share-block {
  margin-top: 0;
}
.share-modal-panel--export .share-modal-share-block .btn-sec {
  margin-top: 0;
}
.share-modal-btn-png {
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
  letter-spacing: 0.03em;
}
.share-modal-share-block {
  margin-top: 10px;
}
.share-modal-btn-share-wide {
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
  letter-spacing: 0.03em;
  justify-content: center;
}
.share-modal-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text3);
  margin: 0 0 14px;
}
.share-modal-qr-row {
  display: grid;
  grid-template-columns: minmax(128px, 140px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.share-modal-panel--export .share-modal-url-block {
  min-width: 0;
}
.share-modal-panel--export #shareModalQr.share-modal-qr-box {
  display: inline-flex;
  margin: 0;
  padding: 10px;
  min-width: 128px;
  min-height: 128px;
  max-width: 140px;
  max-height: 140px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.share-modal-url-block {
  flex: 1;
  min-width: min(100%, 12rem);
}
.share-modal-mini-label {
  display: block;
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.share-modal-actions--split {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}
.share-modal-actions--split .btn {
  flex: 1 1 calc(50% - 5px);
  min-width: min(100%, 9rem);
  width: auto;
}

@media (max-width: 480px) {
  .share-modal-qr-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
  }
  .share-modal-panel--export .share-modal-url-block {
    width: 100%;
    justify-self: stretch;
  }
}

.next-steps { text-align: left; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 24px; }
.ns-item {
  display: flex; gap: 14px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text2); line-height: 1.5;
}
.ns-item:last-child { border-bottom: none; }
.ns-num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--bg3);
  border: 1px solid var(--border2); display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text3); flex-shrink: 0; margin-top: 1px;
}

/* My passports list (passport.html) */
.passport-list-card { margin-bottom: 28px; }
.pl-loading, .pl-empty {
  font-size: 14px;
  color: var(--text3);
  padding: 8px 0;
}
.pl-table {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.pl-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  font-size: 14px;
}
.pl-row:last-child { border-bottom: none; }
.pl-row:hover { background: var(--bg4); }
.pl-id {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: break-word;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}
.pl-meta { color: var(--text2); font-size: 13px; }
.pl-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  align-items: stretch;
}
/* Пять действий (2 колонки): последняя кнопка на всю ширину */
.pl-actions > *:nth-child(5):last-child {
  grid-column: 1 / -1;
}
@media (min-width: 640px) {
  .pl-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pl-actions > *:nth-child(5):last-child {
    grid-column: auto;
  }
  /* Четыре действия (3 колонки): нижняя строка одна кнопка на всю ширину */
  .pl-actions > *:nth-child(4):last-child {
    grid-column: 1 / -1;
  }
}
.pl-actions a,
.pl-actions button.pl-url-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  box-sizing: border-box;
  min-height: 38px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: var(--mono);
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  border: 1px solid var(--border2);
  border-radius: 6px;
  touch-action: manipulation;
}
.pl-actions a {
  color: var(--text2);
  text-decoration: none;
  background: transparent;
}
/* Gold accent on light --bg3 rows was unreadable; match readable .btn-sec-style hover */
.pl-actions a:hover,
.pl-actions a:focus-visible {
  color: var(--text);
  border-color: var(--accent2);
  background: var(--bg2);
}
.pl-actions a:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.pl-actions button.pl-url-btn {
  color: var(--text2);
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pl-actions button.pl-url-btn:hover,
.pl-actions button.pl-url-btn:focus-visible {
  color: var(--text);
  border-color: var(--accent2);
  background: var(--bg2);
}
.pl-actions button.pl-url-btn:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}
.pl-actions button.pl-url-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pl-actions button.pl-url-btn:disabled:hover,
.pl-actions button.pl-url-btn:disabled:focus-visible {
  color: var(--text2);
  background: transparent;
  border-color: var(--border2);
  outline: none;
}

/* Modal — update passport URLs */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--overlay-bg-alt);
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
.modal-backdrop.open { display: flex; }
/* Stack above Update URLs modal when opened from it */
#hostingJsonInfoModal { z-index: 210; }
#preMintModal { z-index: 220; }
.modal-panel {
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  animation: up 0.2s ease;
}

/* ── Verify page ── */
.odp-verify-primary {
  margin-bottom: 8px;
}

/* ID / QR row + .odp drop as one visual block; long hint below */
.odp-quick-verify-wrap--tight {
  margin-top: 28px;
  padding-top: 0;
  border-top: none;
}

.odp-quick-verify-label {
  margin-bottom: 8px;
}

.odp-quick-verify-lead {
  margin: 0 0 12px;
  line-height: 1.55;
}

/* Air gap before secondary tools (doc attest / hash check) */
.verify-tools-region {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}

.verify-tools-region > .section-title {
  margin-top: 0;
}

.verify-tools-region-lead {
  margin: 0 0 12px;
  line-height: 1.55;
}

/* Verify tool panels (doc attest / hash check) — same chrome as tools menu card */
.verify-tool-card {
  margin-bottom: 16px;
}

.verify-tool-card-pad {
  padding: 18px 20px;
}

.verify-tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.verify-tool-workspace {
  margin-top: 12px;
}

.verify-tool-workspace > .section-title:first-of-type {
  margin-top: 0;
}

.verify-tool-workspace-lead {
  margin: 0 0 12px;
  line-height: 1.55;
}

.verify-tool-wallet-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.verify-tool-wallet-addr {
  font-size: 14px;
  color: var(--text2);
}

.verify-tool-field-label {
  margin-top: 2px;
}

.verify-tool-hash-line {
  font-size: 13px;
  word-break: break-all;
  margin: 0 0 12px;
  min-height: 1.2em;
  color: var(--ink3);
}

.verify-tool-input {
  width: 100%;
  max-width: 36rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.verify-tool-uri-preview {
  margin: 0 0 12px;
  min-height: 1.2em;
  max-width: 48rem;
  line-height: 1.5;
}

.verify-tool-inset-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg3);
}

.verify-tool-inset-title {
  font-size: 12px;
}

.verify-tool-preview-mono {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text2);
}

.verify-tool-result {
  margin-top: 12px;
}

.verify-tool-result--doc-check {
  margin-top: 14px;
}

.drop-zone.json-drop.has-file {
  border-style: solid;
  border-color: var(--green);
  background: var(--green-bg);
}

.odp-verify-signature-divider {
  border: none;
  height: 0;
  margin: 36px 0 28px;
  padding: 0;
  border-top: 1px solid var(--border);
  opacity: 1;
}

.odp-proof-card {
  margin-top: 0;
}

.odp-proof-card > .section-title:first-of-type {
  margin-top: 0;
}

.odp-proof-lead {
  margin: 0 0 4px;
  line-height: 1.55;
}

.odp-proof-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 20px 0 0;
  border-bottom: 1px solid var(--border);
}

.odp-proof-tab {
  flex: 1 1 auto;
  min-width: 8rem;
  max-width: 14rem;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text2);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  text-align: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.odp-proof-tab:hover {
  color: var(--text);
}

.odp-proof-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.odp-proof-panel {
  padding: 20px 0 4px;
  max-width: 36rem;
}

.odp-proof-panel-hint {
  margin: 0 0 18px;
  max-width: 36rem;
  line-height: 1.55;
  font-size: 14px;
}

.odp-proof-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.odp-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.odp-proof-wallet-label {
  margin: -4px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text2);
  min-height: 1.2em;
}

.odp-proof-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
}

.odp-proof-input:focus {
  outline: none;
  border-color: var(--accent2);
  box-shadow: 0 0 0 1px var(--accent2);
}

.odp-proof-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  min-height: 4rem;
}

.odp-proof-textarea--readonly {
  background: var(--bg2);
  color: var(--text2);
}

.odp-proof-textarea:focus {
  outline: none;
  border-color: var(--accent2);
}

.odp-proof-optional {
  font-weight: 400;
  font-style: italic;
  color: var(--text3);
  text-transform: none;
  letter-spacing: 0;
}

.odp-proof-copy-btn {
  align-self: flex-start;
}

.odp-proof-verify-result {
  margin-top: 4px;
}

@media (max-width: 520px) {
  .odp-proof-tablist {
    flex-direction: column;
    border-bottom: none;
    gap: 0;
  }
  .odp-proof-tab {
    max-width: none;
    text-align: left;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
  }
  .odp-proof-tab.is-active {
    border-bottom-color: var(--border);
    border-left: 3px solid var(--accent);
    padding-left: 11px;
  }
}

.search-wrap { margin-bottom: 32px; }

.search-label {
  font-size: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin-bottom: 12px;
  display: block;
  line-height: 1.45;
}

.search-row { display: flex; gap: 8px; align-items: stretch; }

.search-row input[type="text"] {
  flex: 1;
  width: auto;
  min-width: 0;
}

.search-row .btn {
  width: auto;
  flex: 0 0 auto;
  padding: 14px 24px;
}

.search-row .btn-qr-scan {
  flex: 0 0 auto;
  width: 48px;
  min-width: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
}
.search-row .btn-qr-scan:hover {
  border-color: var(--accent2);
  color: var(--accent);
}

.qr-scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay-bg-heavy);
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
.qr-scan-overlay[hidden] {
  display: none !important;
}
.qr-scan-panel {
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.qr-scan-title {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--text);
  margin-bottom: 8px;
}
.qr-scan-hint {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 16px;
}
.qr-scan-video-wrap {
  position: relative;
  width: 100%;
  max-width: min(92vw, 360px);
  margin: 0 auto 16px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.qr-scan-video-wrap video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Full-width cancel; flex centers text (mono + letter-spacing misaligns on WebKit otherwise) */
button.btn.btn-ghost.qr-scan-cancel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 14px 20px max(14px, env(safe-area-inset-bottom, 0px));
}

.search-hint {
  font-size: 13px;
  color: var(--text2);
  margin-top: 14px;
  font-family: var(--mono);
  font-weight: 400;
  line-height: 1.6;
}

.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  color: var(--text2);
  font-family: var(--mono);
  font-size: 14px;
}

.spin {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Result card — dark */
#result .card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.status-bar.authentic  { background: var(--green-bg); border-bottom-color: var(--green-bd); }
.status-bar.invalid    { background: var(--red-bg);   border-bottom-color: var(--red-bd); }
.status-bar.tampered   { background: var(--amber-bg); border-bottom-color: var(--amber-bd); }
.status-bar.unverif    { background: var(--gray-bg);  border-bottom-color: var(--border); }

.status-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0; font-weight: 600;
  font-family: var(--serif);
}

.authentic  .status-icon { background: var(--green-bd); color: var(--green); }
.invalid    .status-icon { background: var(--red-bd);   color: var(--red); }
.tampered   .status-icon { background: var(--amber-bd); color: var(--amber); }
.unverif    .status-icon { background: var(--bg4);      color: var(--text2); }

.status-text { flex: 1; }
.status-label {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.authentic .status-label  { color: var(--green); }
.invalid   .status-label  { color: var(--red); }
.tampered  .status-label  { color: var(--amber); }
.unverif   .status-label  { color: var(--text2); }

.status-desc { font-size: 14px; color: var(--text2); margin-top: 2px; }

.obj-title {
  font-size: 22px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.obj-creator {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 28px;
  font-family: var(--mono);
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.fields .field {
  background: var(--bg3);
  padding: 12px 14px;
}

.field.full { grid-column: 1 / -1; }

.fl {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 4px;
}

.fv {
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}

.fv.mono { font-family: var(--mono); font-size: 13px; color: var(--text2); }

.human-id-val {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.creator-id-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg4);
  color: var(--text2);
}

.type-badge.digital { background: var(--badge-digital-bg); color: var(--badge-digital-text); }

.section-title {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 20px 0 10px;
}

.verify-tool-inset-card > .section-title {
  margin: 0 0 8px;
}

.vrow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--bg3);
  font-size: 14px;
}

.vrow:first-of-type { border-radius: 4px 4px 0 0; }
.vrow:last-of-type  { border-bottom: 1px solid var(--border); border-radius: 0 0 4px 4px; }
.vrow:only-of-type  { border-radius: 4px; border-bottom: 1px solid var(--border); }

.vbadge {
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}

.vbadge.ok     { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.vbadge.bad    { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-bd); }
.vbadge.warn   { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-bd); }
.vbadge.na     { background: var(--bg4);      color: var(--text3);  border: 1px solid var(--border); }

.vinfo { flex: 1; }
.vinfo-label { font-size: 12px; font-family: var(--mono); color: var(--text3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.vinfo-val   { font-family: var(--mono); font-size: 13px; color: var(--text2); word-break: break-all; }

.drop-zone {
  margin-top: 10px;
  border: 1.5px dashed var(--border2);
  border-radius: 8px;
  padding: 24px 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg2);
}

.drop-zone:hover { border-color: var(--accent2); background: var(--bg3); }
.drop-zone.drop-zone-over { border-color: var(--accent); background: var(--bg3); border-style: solid; }
/* Hidden file inputs — not display:none so programmatic click / overlay still works where needed */
.drop-zone:not(.json-drop) input {
  display: none;
}

/* Local passport.json verify: full-area transparent input — must stay "activatable" (not display:none) */
.drop-zone.json-drop {
  position: relative;
  min-height: 72px;
}
.drop-zone.json-drop input[type="file"] {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 16px;
}
.drop-zone.json-drop p {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.drop-zone p {
  font-size: 14px;
  color: var(--text3);
  font-family: var(--mono);
  line-height: 1.6;
}

.proof-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 8px;
  background: var(--bg3);
}

.proof-id   { font-family: var(--mono); font-size: 13px; color: var(--text3); }
.proof-who  { font-size: 14px; font-family: var(--serif); font-style: italic; margin: 4px 0 2px; color: var(--text); }
.proof-date { font-size: 13px; font-family: var(--mono); color: var(--text3); }

.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }

.ext-link {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: 3px;
  transition: all 0.15s;
}

.ext-link:hover { color: var(--accent); border-color: var(--accent2); }

.err-box {
  padding: 14px 18px;
  background: var(--red-bg);
  border: 1px solid var(--red-bd);
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--mono);
  color: var(--red);
  animation: up 0.2s ease;
}

footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 24px;
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 12px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text2);
  letter-spacing: 0.05em;
}

footer > * {
  flex: 0 1 auto;
  white-space: nowrap;
}

footer > :nth-child(1) {
  text-align: left;
}

footer > :nth-child(2) {
  text-align: center;
}

footer > :nth-child(3) {
  text-align: right;
}

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

/* Touch targets, no accidental zoom on focus (iOS Safari / MetaMask in-app browser) */
a, button, .btn, label[for], select {
  -webkit-tap-highlight-color: var(--tap-highlight);
}

@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}

@media (pointer: coarse) {
  .btn, .btn-sec, .btn-ghost {
    min-height: 48px;
    touch-action: manipulation;
  }
  .nav a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }
  .odp-lang-wrap {
    min-height: 48px;
  }
  .odp-lang-select {
    min-height: 48px;
    padding: 12px 30px 12px 12px;
  }
  .w-switch, .wbar-dis, .share-modal-x, .odp-header-disconnect {
    min-width: 48px;
    min-height: 48px;
    touch-action: manipulation;
  }
  .pl-actions a,
  .pl-actions button.pl-url-btn {
    min-height: 44px;
    padding: 8px 12px;
  }
}

/* Verify / ID search: avoid one cramped row (input + QR + action) between ~520–768px */
@media (max-width: 768px) {
  .search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
  }
  .search-row input[type="text"] {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .search-row .btn-qr-scan,
  .search-row .btn:not(.btn-qr-scan) {
    width: 100%;
    min-width: 0;
  }
  .search-row .btn:not(.btn-qr-scan) {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Header: before this breakpoint title + toolbar stay in one row and squeeze the title into a very narrow column → broken words (e.g. «Про/вер/ка»). Stack earlier. */
@media (max-width: 880px) {
  header.header-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .header-left {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: center;
  }
  .header-toolbar {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  h1 {
    max-width: min(22rem, 92vw);
    margin-left: auto;
    margin-right: auto;
  }
  .header-left .sub {
    margin-left: auto;
    margin-right: auto;
    max-width: min(36rem, 94vw);
  }
}

@media (max-width: 520px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .row2, .row3 { grid-template-columns: 1fr; }
  .seal-grid { grid-template-columns: 1fr; }
  .type-toggle { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  header {
    padding: 28px 0 24px;
    margin-bottom: 24px;
  }
  header.header-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .header-left {
    text-align: center;
    width: 100%;
  }
  .header-toolbar {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0;
  }
  h1 {
    font-size: clamp(1.65rem, 7.5vw, 2.25rem);
    line-height: 1.15;
    text-wrap: wrap;
    overflow-wrap: normal;
    max-width: 100%;
  }
  .sub {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
  .nav {
    gap: 8px;
    margin-bottom: 32px;
  }
  .nav a {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    font-size: 12px;
    letter-spacing: 0.05em;
  }
  .pl-row {
    gap: 8px;
    padding: 12px 10px;
  }
  .step-indicator {
    gap: 0;
    margin-bottom: 28px;
  }
  .si-label {
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .section-title {
    font-size: 11px;
  }
  footer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    row-gap: 6px;
    column-gap: 10px;
    margin-top: 36px;
    padding-top: 18px;
    font-size: 11px;
    line-height: 1.35;
  }
  footer > * {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: center;
  }
  footer > :nth-child(1),
  footer > :nth-child(2),
  footer > :nth-child(3),
  footer > :nth-child(4),
  footer > :nth-child(5) {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .type-grid { grid-template-columns: 1fr; }
  .wallet-options-grid { grid-template-columns: 1fr; }
  .odp-stack-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .odp-stack-details-btn {
    margin-left: 0;
    align-self: stretch;
    text-align: center;
  }
  .odp-stack-flag {
    align-self: flex-start;
  }
  .header-toolbar {
    gap: 8px;
  }
  .odp-lang-wrap {
    border-width: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  }
}

@media (max-width: 380px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .nav a {
    flex: none;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }
  h1 {
    font-size: clamp(1.5rem, 9vw, 1.85rem);
    line-height: 1.12;
  }
  .nav a {
    padding: 10px 6px;
    font-size: 11px;
  }
  .btn {
    font-size: 12px;
    padding: 14px 14px;
  }
}

/* Stack panel — site SemVer trust + read policy (creator / passport / verify) */
.odp-stack-wrap {
  font-size: 13px;
  line-height: 1.55;
}
.odp-stack-block {
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: 8px;
  padding: 10px 12px 12px;
}
.odp-stack-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
  margin-bottom: 2px;
}
.odp-stack-flag {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border2);
  flex-shrink: 0;
  line-height: 1.3;
}
.odp-stack-flag--red {
  color: var(--red);
  border-color: var(--red-bd);
  background: var(--red-bg);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  letter-spacing: 0.07em;
  border-radius: 6px;
  line-height: 1.25;
}
.odp-stack-flag--yellow {
  color: var(--amber);
  border-color: var(--amber-bd);
  background: var(--amber-bg);
}
.odp-stack-flag--green {
  color: var(--green);
  border-color: var(--green-bd);
  background: var(--green-bg);
}
.odp-stack-meta {
  color: var(--text2);
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.odp-stack-meta strong {
  color: var(--text);
  font-weight: 500;
}
.odp-stack-note {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.55;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.odp-stack-block--compact {
  padding: 8px 10px;
}
.odp-stack-block--compact .odp-stack-row {
  margin-bottom: 0;
  align-items: center;
}
.odp-stack-block--compact .odp-stack-meta {
  font-size: 13px;
}
.odp-stack-details-btn {
  margin-left: auto;
  flex-shrink: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--panel);
  color: var(--accent);
  cursor: pointer;
}
.odp-stack-details-btn:hover {
  border-color: var(--accent);
  opacity: 0.95;
}
.odp-stack-under-steps {
  margin: 0 0 14px;
}
.odp-passport-stack-strip {
  margin: 0 0 16px;
}

/* Passport: single CTA in #passportToolsMenu — avoid transparent .btn-sec on card (reads as two stacked whites) */
.passport-tools-menu-inner {
  padding-top: 16px;
  padding-bottom: 16px;
}
.passport-tools-mint-btn {
  margin-top: 0;
  width: 100%;
  max-width: 28rem;
  background: var(--bg3);
  border-color: var(--border2);
}
.passport-tools-mint-btn:hover {
  background: var(--bg4);
  border-color: var(--border2);
}
html[data-theme="blue"] #passportToolsMenu .passport-tools-mint-btn {
  background: var(--bg3);
  color: var(--text2);
  border-color: var(--border2);
}
html[data-theme="blue"] #passportToolsMenu .passport-tools-mint-btn:hover {
  background: var(--bg4);
  color: var(--text);
  border-color: var(--text3);
}

/* Verify tool sub-navigation (back + current tool label) */
.verify-subnav-card {
  margin-top: 12px;
  border: 1px solid var(--border2);
}
.verify-subnav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.verify-subnav-back {
  padding: 7px 11px;
  line-height: 1.1;
  white-space: nowrap;
}
.verify-subnav-title {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text2);
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
  margin-left: auto;
}

/* First-visit site trust modal (0.x red-flag disclosure) */
.odp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--overlay-bg-modal);
  backdrop-filter: blur(4px);
}
.odp-modal-backdrop[hidden] {
  display: none !important;
}
/*
 * Always use a light “paper” panel + dark ink — matches light-theme cards and stays
 * readable even if page theme variables (--bg / --text) would fight the cascade.
 */
.odp-modal-dialog {
  width: 100%;
  max-width: 26rem;
  max-height: min(85vh, 32rem);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: #2a3142;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  padding: 18px 18px 16px;
}
.odp-modal-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 500;
  font-family: var(--serif);
  letter-spacing: -0.01em;
  color: #121520;
}
.odp-modal-body {
  font-size: 14px;
  line-height: 1.6;
  color: #3d4454;
}
.odp-modal-body .odp-stack-note {
  color: #3d4454;
  border-top-color: rgba(0, 0, 0, 0.12);
}
.odp-modal-body .odp-stack-note strong {
  color: #121520;
  font-weight: 600;
}
.odp-modal-body .odp-stack-note:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.odp-modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}
.odp-modal-actions .btn {
  color: #1a1d2e;
}
.odp-prior-deploy-note {
  font-size: 13px;
  color: var(--amber);
  line-height: 1.55;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--amber-bd);
  background: var(--amber-bg);
  border-radius: 6px;
}
.odp-prior-deploy-note .mono {
  font-family: var(--mono);
  font-size: 13px;
}

/* ── Theme switcher button ── */
.odp-theme-switch {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.odp-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg2);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 7px 12px;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text2);
}
.odp-theme-btn:hover {
  border-color: var(--text3);
}
.odp-theme-btn:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--focus-ring);
  outline: none;
}
@media (pointer: coarse) {
  .odp-theme-btn {
    min-height: 48px;
    padding: 10px 16px;
    font-size: 18px;
    touch-action: manipulation;
  }
}

/* ══════════════════════════════════════════════════════════
   Blue theme overrides — elements sitting ON the blue --bg
   (header, nav, footer, fhint outside cards, stepper, etc.)
   Cards/inputs/dropzones use --bg2 (#FFF) and inherit --text
   automatically, so they need no overrides.
   ══════════════════════════════════════════════════════════ */

/* Header */
html[data-theme="blue"] header {
  border-bottom-color: var(--on-bg-border);
}
html[data-theme="blue"] h1 {
  color: var(--on-bg);
}
html[data-theme="blue"] .sub {
  color: var(--on-bg2);
}
html[data-theme="blue"] .header-left .fhint {
  color: var(--on-bg3);
}

/* Toolbar: theme + lang */
html[data-theme="blue"] .odp-theme-btn {
  border-color: var(--on-bg-border);
  background: rgba(255,255,255,0.12);
  color: var(--on-bg);
}
html[data-theme="blue"] .odp-theme-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.40);
}
/* Light “chip” so label stays readable (dark text); avoids white-on-white on mobile */
html[data-theme="blue"] .odp-lang-wrap {
  border-color: rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
html[data-theme="blue"] .odp-lang-wrap:hover {
  border-color: rgba(255,255,255,0.65);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
html[data-theme="blue"] .odp-lang-select {
  color: var(--text2);
  background-color: transparent;
  background-image: none;
}
html[data-theme="blue"] .odp-lang-select:hover,
html[data-theme="blue"] .odp-lang-select:focus {
  color: var(--text);
}
html[data-theme="blue"] .odp-lang-wrap::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23334155' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="blue"] .odp-lang-wrap:hover::after,
html[data-theme="blue"] .odp-lang-wrap:focus-within::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%231e293b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Nav tabs */
html[data-theme="blue"] .nav a {
  color: var(--on-bg2);
  border-color: var(--on-bg-border);
}
html[data-theme="blue"] .nav a:hover {
  color: var(--on-bg);
  border-color: rgba(255,255,255,0.45);
}
html[data-theme="blue"] .nav a.active {
  color: var(--on-bg);
  border-color: var(--on-bg);
  background: var(--nav-active-bg);
}

/* Footer */
html[data-theme="blue"] footer {
  border-top-color: var(--on-bg-border);
  color: var(--on-bg2);
}
html[data-theme="blue"] footer a {
  color: var(--on-bg2);
}
html[data-theme="blue"] footer a:hover {
  color: var(--on-bg);
}

/* Stepper (creator) */
html[data-theme="blue"] .si-item {
  color: var(--on-bg3);
}
html[data-theme="blue"] .si-item.active {
  color: var(--on-bg);
}
html[data-theme="blue"] .si-item.done {
  color: var(--on-bg2);
}
html[data-theme="blue"] .si-num {
  background: rgba(255,255,255,0.12);
  border-color: var(--on-bg-border);
  color: var(--on-bg2);
}
html[data-theme="blue"] .si-item.active .si-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #1A1D2E;
}
html[data-theme="blue"] .si-item.done .si-num {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green);
}
html[data-theme="blue"] .si-line {
  background: var(--on-bg-border);
}

/* Labels/hints that sit on --bg (outside cards) */
html[data-theme="blue"] .page > .fhint,
html[data-theme="blue"] .page > .search-wrap > .fhint,
html[data-theme="blue"] .search-hint {
  color: var(--on-bg2);
}
html[data-theme="blue"] .search-label {
  color: var(--on-bg);
}
html[data-theme="blue"] .odp-stack-wrap {
  color: var(--on-bg2);
}
html[data-theme="blue"] .section-label {
  color: var(--on-bg2);
  border-bottom-color: var(--on-bg-border);
}
html[data-theme="blue"] .section-title {
  color: var(--on-bg2);
}

/* Verify page: quick-verify labels sit on --bg */
html[data-theme="blue"] .odp-quick-verify-label {
  color: var(--on-bg);
}
html[data-theme="blue"] .odp-quick-verify-lead {
  color: var(--on-bg2);
}
html[data-theme="blue"] .odp-verify-signature-divider {
  border-top-color: var(--on-bg-border);
}
html[data-theme="blue"] .verify-tools-region {
  border-top-color: var(--on-bg-border);
}
html[data-theme="blue"] .verify-tools-region-lead,
html[data-theme="blue"] .verify-tools-title {
  color: var(--on-bg2);
}

/* Buttons */
html[data-theme="blue"] .btn {
  color: #1A1D2E;
}
html[data-theme="blue"] .page .btn-sec {
  color: var(--on-bg2);
  border-color: var(--on-bg-border);
}
html[data-theme="blue"] .page .btn-sec:hover {
  color: var(--on-bg);
  border-color: rgba(255,255,255,0.45);
}
html[data-theme="blue"] .page .btn-ghost {
  color: var(--on-bg2);
  border-color: var(--on-bg-border);
}
/* #shareModal lives under .page but panels are white --bg2; must follow .page .btn-* */
html[data-theme="blue"] .share-modal-panel .btn-sec,
html[data-theme="blue"] .share-modal-panel .btn-ghost {
  color: var(--text2);
  border-color: var(--border2);
}
html[data-theme="blue"] .share-modal-panel .btn-sec:hover,
html[data-theme="blue"] .share-modal-panel .btn-ghost:hover {
  color: var(--text);
  border-color: var(--text2);
}
html[data-theme="blue"] .card-body .btn-sec,
html[data-theme="blue"] .card .btn-sec {
  color: var(--text2);
  border-color: var(--border2);
}
html[data-theme="blue"] .card-body .btn-sec:hover,
html[data-theme="blue"] .card .btn-sec:hover {
  color: var(--text);
  border-color: var(--text2);
}

/*
 * ── Blue theme: form elements on --bg ──
 * Section panels use the same layout as dark via --page-section-* tokens.
 * Inside white cards (.card) normal dark-text colors are restored.
 */

/* Text colours on blue bg */
html[data-theme="blue"] .page label {
  color: var(--on-bg2);
}
html[data-theme="blue"] .page .req {
  color: var(--accent);
}
html[data-theme="blue"] .page .fhint {
  color: var(--on-bg3);
}
html[data-theme="blue"] .page .info.n,
html[data-theme="blue"] .page .info.neutral {
  color: var(--text2);
}
html[data-theme="blue"] .page .info.w,
html[data-theme="blue"] .page .info.warn {
  color: var(--amber);
}
html[data-theme="blue"] .page .info.s,
html[data-theme="blue"] .page .info.success {
  color: var(--green);
}
html[data-theme="blue"] .page .info.e,
html[data-theme="blue"] .page .info.error {
  color: var(--red);
}
html[data-theme="blue"] .page .section-label {
  color: var(--on-bg);
}

/* Inputs: translucent white — blends with the frosted panel */
html[data-theme="blue"] .page input[type="text"],
html[data-theme="blue"] .page input[type="number"],
html[data-theme="blue"] .page input[type="url"],
html[data-theme="blue"] .page select,
html[data-theme="blue"] .page textarea {
  background: rgba(255,255,255,0.88);
  border-color: rgba(255,255,255,0.35);
  color: #1a1d2e;
}
html[data-theme="blue"] .page input:focus,
html[data-theme="blue"] .page select:focus,
html[data-theme="blue"] .page textarea:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.96);
}
html[data-theme="blue"] .page input::placeholder,
html[data-theme="blue"] .page textarea::placeholder {
  color: #6a70888a;
}

/* Drop zones on blue page (outside section panels); in-section uses .section .fdrop */
html[data-theme="blue"] .page .fdrop-text {
  color: var(--on-bg2);
}

/* Creator banner */
html[data-theme="blue"] .page .cb-label {
  color: var(--on-bg3);
}
html[data-theme="blue"] .page .cb-val {
  color: var(--accent);
}

/* Type-toggle inside .section: light text on semi-transparent --page-tt-* (not plain .tt-opt on --bg2=white) */
html[data-theme="blue"] .page .section .tt-name {
  color: var(--on-bg);
}
html[data-theme="blue"] .page .section .tt-desc {
  color: var(--on-bg3);
}

/* Seal options */
html[data-theme="blue"] .page .seal-opt {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
  color: var(--on-bg2);
}
html[data-theme="blue"] .page .seal-opt:hover {
  border-color: rgba(255,255,255,0.40);
}
html[data-theme="blue"] .page .seal-opt.sel {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,255,255,0.15);
}
html[data-theme="blue"] .page .seal-sub {
  color: var(--on-bg3);
}
html[data-theme="blue"] .page .seal-opt.sel .seal-sub {
  color: var(--accent2);
}

/* Accordion */
html[data-theme="blue"] .page .acc {
  border-color: rgba(255,255,255,0.18);
  border-radius: 8px;
  overflow: hidden;
}
html[data-theme="blue"] .page .acc-head {
  background: rgba(255,255,255,0.12);
  color: var(--on-bg);
}
html[data-theme="blue"] .page .acc-head:hover {
  background: rgba(255,255,255,0.18);
}
html[data-theme="blue"] .page .acc-body {
  background: rgba(255,255,255,0.06);
  border-top-color: rgba(255,255,255,0.15);
  color: var(--on-bg2);
}
html[data-theme="blue"] .page .acc-arr {
  color: var(--on-bg3);
}

/* Misc form helpers */
html[data-theme="blue"] .page .field-label-row label {
  color: var(--on-bg2);
}
html[data-theme="blue"] .page .btn-inline-info {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  color: var(--on-bg3);
}
html[data-theme="blue"] .page .btn-inline-info:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Inside white cards: restore dark-text colors ── */
html[data-theme="blue"] .card {
  color: var(--text);
}
html[data-theme="blue"] .card label {
  color: var(--text2);
}
html[data-theme="blue"] .card .fhint {
  color: var(--text3);
}
html[data-theme="blue"] .card .search-label {
  color: var(--text);
}
html[data-theme="blue"] .card.creator-p-aff-card .search-label {
  font-size: 13px;
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  color: var(--text2);
}
html[data-theme="blue"] .card .info {
  color: inherit;
}
html[data-theme="blue"] .card .section-title {
  color: var(--text2);
}
html[data-theme="blue"] .card .section-label {
  color: var(--text3);
  border-bottom-color: var(--border);
}
html[data-theme="blue"] .card input[type="text"],
html[data-theme="blue"] .card input[type="number"],
html[data-theme="blue"] .card input[type="url"],
html[data-theme="blue"] .card select,
html[data-theme="blue"] .card textarea {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--text);
}
/* Card inputs sit on light --bg3; .page placeholder (#6a70888a) is too faint here */
html[data-theme="blue"] .card input::placeholder,
html[data-theme="blue"] .card textarea::placeholder {
  color: var(--text2);
  opacity: 1;
}
html[data-theme="blue"] .card input:focus,
html[data-theme="blue"] .card select:focus,
html[data-theme="blue"] .card textarea:focus {
  border-color: var(--border2);
  background: var(--bg3);
}
html[data-theme="blue"] .card .fdrop {
  background: var(--bg3);
  border-color: var(--border2);
}
html[data-theme="blue"] .card .fdrop:hover {
  background: var(--bg4);
  border-color: var(--accent2);
}
html[data-theme="blue"] .card .fdrop-text {
  color: var(--text3);
}
html[data-theme="blue"] .card .drop-zone {
  background: var(--bg3);
  border-color: var(--border2);
  color: var(--text2);
}
html[data-theme="blue"] .card .req {
  color: var(--accent2);
}
html[data-theme="blue"] .card .btn-inline-info {
  background: var(--bg2);
  border-color: var(--border2);
  color: var(--text3);
}
html[data-theme="blue"] .card .acc {
  border-color: var(--border);
}
html[data-theme="blue"] .card .acc-head {
  background: var(--bg3);
  color: var(--text2);
}
html[data-theme="blue"] .card .acc-head:hover {
  background: var(--bg4);
}
html[data-theme="blue"] .card .acc-body {
  background: transparent;
  border-top-color: var(--border);
  color: var(--text2);
}

/* Share modal: URL field sits inside white panel */
html[data-theme="blue"] .share-modal-url {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--text2);
}

/* Wallet bar (sits on --bg, make it white card-like) */
html[data-theme="blue"] .wbar,
html[data-theme="blue"] .wallet-bar {
  background: var(--bg2);
  border-color: var(--border);
  color: var(--text2);
}

/* Loading indicators on --bg */
html[data-theme="blue"] .page .loading {
  color: var(--on-bg2);
}
html[data-theme="blue"] .page .spin {
  border-color: var(--on-bg-border);
  border-top-color: var(--accent);
}
html[data-theme="blue"] .page .pl-loading,
html[data-theme="blue"] .page .pl-empty {
  color: var(--on-bg2);
}
html[data-theme="blue"] .card .loading {
  color: var(--text2);
}
html[data-theme="blue"] .card .spin {
  border-color: var(--border);
  border-top-color: var(--accent);
}
html[data-theme="blue"] .card .pl-loading,
html[data-theme="blue"] .card .pl-empty {
  color: var(--text3);
}

/* Passport page: JS-generated text on --bg */
html[data-theme="blue"] #app > .info.n,
html[data-theme="blue"] #app > .info.neutral {
  color: var(--text2);
}
html[data-theme="blue"] #app > .info.w,
html[data-theme="blue"] #app > .info.warn {
  color: var(--amber);
}
html[data-theme="blue"] #app > .info.e,
html[data-theme="blue"] #app > .info.error {
  color: var(--red);
}
html[data-theme="blue"] #app > div > p {
  color: var(--on-bg2) !important;
}
html[data-theme="blue"] #app > div > p a {
  color: var(--accent) !important;
}
html[data-theme="blue"] .odp-verify-primary .fhint {
  color: var(--on-bg3);
}

/* Verify page: fhint outside cards */
html[data-theme="blue"] .odp-verify-primary > .fhint,
html[data-theme="blue"] #idExistsHint {
  color: var(--on-bg3) !important;
}
html[data-theme="blue"] .odp-verify-toc {
  border-bottom-color: var(--on-bg-border);
}
html[data-theme="blue"] .odp-verify-toc a {
  color: var(--on-bg2);
  border-bottom-color: var(--on-bg-border);
}
html[data-theme="blue"] .odp-verify-toc a:hover {
  color: var(--on-bg);
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

/* Index / demo footer line */
.page-footer-meta {
  margin-top: 24px;
  font-size: 0.875em;
  color: var(--text3);
  line-height: 1.55;
}
.page-footer-meta a {
  color: var(--accent);
}

/* Verify: jump links (on-page sections) */
.odp-verify-toc {
  margin: -24px 0 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.odp-verify-toc ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
}
.odp-verify-toc li { margin: 0; }
.odp-verify-toc a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  text-decoration: none;
  border-bottom: 1px solid var(--border2);
  padding-bottom: 3px;
}
.odp-verify-toc a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent2);
}

/* ── ODP ID card (portrait plate, phone-friendly) ─────────────────────────── */
.odp-id-card-page-wrap {
  width: 100%;
  max-width: min(300px, 90vw);
  margin: 0 auto 20px;
  padding: 0 4px;
  box-sizing: border-box;
}

.odp-id-card__shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 0;
  filter: drop-shadow(0 14px 28px var(--shadow-dialog));
}

/* Surfaces + type: same tokens as the rest of the page (dark :root vs html[data-theme="blue"]) */
.odp-id-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 26px;
  background: linear-gradient(165deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 32px -14px var(--shadow-dialog);
  color: var(--text);
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html[data-theme="blue"] .odp-id-card {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 12px 32px -14px var(--shadow-dialog);
}

.odp-id-card__body {
  padding: 18px 18px 16px;
  position: relative;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.odp-id-card__brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.odp-id-card__brand {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 500;
}

.odp-id-card__stamp {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px dashed var(--border2);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-12deg);
  background: var(--bg3);
}

.odp-id-card__hero {
  font-family: var(--mono);
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--text);
  word-break: break-word;
  margin: 0 0 10px;
}

/* Profile: display title — Bookman Old Style italic */
.odp-id-card__hero-title {
  font-family: var(--odp-id-card-display);
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: normal;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Profile / passport: mono ID line — theme accent (gold dark / blue light) */
.odp-id-card__id-line {
  font-family: var(--mono);
  font-size: clamp(0.78rem, 2.6vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.35;
  color: var(--odp-id-card-id-color);
  word-break: break-word;
  margin: 0 0 10px;
}

.odp-id-card__id-line--accent {
  color: var(--odp-id-card-id-color);
  letter-spacing: 0.06em;
}

.odp-id-card__hero--serif {
  font-family: var(--odp-id-card-display);
  font-size: clamp(1.28rem, 4.2vw, 1.68rem);
  font-weight: normal;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  margin: 0 0 8px;
}

/* Passport: optional object title above ODP id */
.odp-id-card__object-subtitle {
  font-family: var(--serif);
  font-size: clamp(0.72rem, 2.1vw, 0.88rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text2);
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Passport: ODP id — single row, ellipsis if needed */
.odp-id-card__hero--passport-id {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: clamp(0.88rem, 2.7vw, 1.15rem);
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}

.odp-id-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.odp-id-card__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  background: var(--gray-bg);
  color: var(--text2);
  border: 1px solid var(--border);
  max-width: 100%;
  text-align: center;
  line-height: 1.25;
}

.odp-id-card__rule {
  margin: 8px 0 10px;
  flex-shrink: 0;
  height: 0;
  border: none;
  border-top: 1px dashed var(--border2);
}

.odp-id-card__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.odp-id-card__bottom--qr-only {
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  padding-top: 0;
}

.odp-id-card__qr-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.odp-id-card__qr-hint {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  text-align: center;
  line-height: 1.3;
  max-width: 12rem;
}

.odp-id-card__qr {
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
  padding: 5px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-sizing: border-box;
}

.odp-id-card__qr .qr-fail {
  color: var(--red);
  font-size: 9px;
  line-height: 1.35;
}

.odp-id-card__qr canvas,
.odp-id-card__qr img {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.odp-id-card__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;
}

/* Wallet line below profile card */
.odp-id-card-wallet-line {
  font-size: 13px;
  color: var(--text3);
  text-align: center;
  font-family: var(--mono);
  word-break: break-all;
  margin: 0 0 20px;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .odp-id-card__body {
    padding: 18px 16px 16px;
  }
}
