.profile-passport {
  --pp-panel: #111214;
  --pp-line: rgba(255, 255, 255, 0.10);
  --pp-line-strong: rgba(255, 255, 255, 0.18);
  --pp-soft: rgba(255, 255, 255, 0.68);
  --pp-faint: rgba(255, 255, 255, 0.46);

  display: grid;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.profile-passport-intro {
  max-width: 720px;
  line-height: 1.55;
  color: var(--pp-soft);
}

.profile-passport-intro p {
  margin: 0;
}

.profile-passport-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--pp-line);
  border-radius: 24px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.035),
      rgba(255, 255, 255, 0)
    ),
    var(--pp-panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.20);
}

.profile-passport-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.95),
      rgba(255, 255, 255, 0.08)
    );
}

.profile-passport-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-passport-card-head > div {
  display: grid;
  gap: 7px;
}

.profile-passport-card-head strong,
.profile-passport-card > strong {
  font-size: 1.02rem;
}

.profile-passport-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--pp-line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-passport-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.profile-passport-status[data-state="active"] {
  color: rgba(255, 255, 255, 0.94);
}

.profile-passport-status[data-state="revoked"] {
  color: var(--pp-faint);
}

.profile-passport-link-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--pp-soft);
}

.profile-passport-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.profile-passport-link-row input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--pp-line-strong);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.88);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: 0.78rem;
}

.profile-passport-link-row .profile-save {
  min-width: 92px;
  height: 44px;
  margin: 0;
  padding: 0 15px;
  border-radius: 12px;
}

.profile-passport-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-passport-actions .profile-save {
  width: auto;
  min-width: 180px;
  margin: 0;
  border-radius: 999px;
}

.profile-passport-danger {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

.profile-passport-error {
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-passport-qr-block {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--pp-line);
  border-radius: 18px;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.07),
      transparent 58%
    ),
    rgba(0, 0, 0, 0.18);
}

.profile-passport-qr-block > strong {
  justify-self: start;
  font-size: 0.78rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--pp-soft);
}

.profile-passport-qr {
  display: grid;
  place-items: center;
  width: min(100%, 264px);
  aspect-ratio: 1;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.profile-passport-qr img,
.profile-passport-qr canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
}

.profile-passport-qr-block small {
  max-width: 30rem;
  color: var(--pp-faint);
  line-height: 1.45;
  font-size: 0.76rem;
}

.profile-passport > .profile-passport-card:first-of-type {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(238px, 292px);
  grid-template-areas:
    "head qr"
    "label qr"
    "link qr"
    "actions qr";
  align-items: start;
}

.profile-passport > .profile-passport-card:first-of-type
.profile-passport-card-head {
  grid-area: head;
}

.profile-passport > .profile-passport-card:first-of-type
.profile-passport-link-label {
  grid-area: label;
}

.profile-passport > .profile-passport-card:first-of-type
.profile-passport-link-row {
  grid-area: link;
}

.profile-passport > .profile-passport-card:first-of-type
.profile-passport-qr-block {
  grid-area: qr;
}

.profile-passport > .profile-passport-card:first-of-type
.profile-passport-actions {
  grid-area: actions;
}

.profile-passport-preview-help {
  margin: -8px 0 0;
  max-width: 720px;
  color: var(--pp-soft);
  line-height: 1.48;
}

.profile-passport-preview {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: clamp(16px, 2.6vw, 24px);
  border: 1px solid var(--pp-line-strong);
  border-radius: 22px;
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.035),
      transparent
    ),
    #0b0c0e;
}

.profile-passport-preview::after {
  content: "GRFTSH / PASSPORT";
  position: absolute;
  top: 16px;
  right: 18px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.profile-passport-preview-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-right: 120px;
}

.profile-passport-preview-avatar {
  width: 78px;
  height: 78px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  border: 1px solid var(--pp-line-strong);
  background: #15171a;
}

.profile-passport-preview-avatar img,
.profile-passport-avatar-default {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-passport-preview-names {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-passport-preview-names strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.12rem, 3vw, 1.38rem);
}

.profile-passport-preview-names span {
  overflow-wrap: anywhere;
  color: var(--pp-soft);
}

.profile-passport-preview-section {
  display: grid;
  gap: 11px;
  padding-top: 16px;
  border-top: 1px solid var(--pp-line);
}

.profile-passport-preview-section h3 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.80);
}

.profile-passport-preview-section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.58;
  white-space: pre-wrap;
}

.profile-passport-preview-list {
  display: grid;
  grid-template-columns:
    minmax(122px, 0.36fr)
    minmax(0, 1fr);
  gap: 9px 16px;
  margin: 0;
}

.profile-passport-preview-list dt {
  color: var(--pp-faint);
  font-size: 0.82rem;
}

.profile-passport-preview-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.88);
}

.profile-passport-gear-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-passport-gear-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--pp-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

.profile-passport-gear-card > strong {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.profile-passport-gear-item {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-passport-gear-item span {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.profile-passport-gear-relations {
  overflow-wrap: anywhere;
  color: var(--pp-faint);
  font-size: 0.70rem;
}

@media (max-width: 760px) {
  .profile-passport > .profile-passport-card:first-of-type {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "qr"
      "label"
      "link"
      "actions";
  }

  .profile-passport-qr-block > strong,
  .profile-passport-qr-block small {
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .profile-passport-card {
    padding: 16px;
    border-radius: 20px;
  }

  .profile-passport-link-row {
    grid-template-columns: 1fr;
  }

  .profile-passport-link-row .profile-save,
  .profile-passport-actions .profile-save {
    width: 100%;
  }

  .profile-passport-preview {
    padding: 15px;
    border-radius: 18px;
  }

  .profile-passport-preview::after {
    position: static;
    order: -1;
    justify-self: start;
  }

  .profile-passport-preview-head {
    padding-right: 0;
  }

  .profile-passport-preview-avatar {
    width: 68px;
    height: 68px;
    border-radius: 16px;
  }

  .profile-passport-preview-list {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .profile-passport-preview-list dd + dt {
    margin-top: 7px;
  }

  .profile-passport-gear-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .profile-passport-gear-card {
    padding: 10px;
  }
}
