.reliquary-shell { padding-bottom: 64px; }
.reliquary-hero {
  margin-top: 30px;
  border: 1px solid #2a2a2a;
  border-radius: 22px;
  background:
    radial-gradient(circle at 15% 0, rgba(255,255,255,.055), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.008));
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  overflow: hidden;
}
.reliquary-identity { display:flex; align-items:center; gap:26px; padding:34px; }
.reliquary-pfp {
  width: 142px; height:142px; flex:0 0 142px; border-radius:24px;
  border:1px solid #414141; background:#090909; overflow:hidden;
  display:grid; place-items:center;
  box-shadow: inset 0 1px rgba(255,255,255,.05);
}
.reliquary-pfp img { width:100%; height:100%; object-fit:cover; }
.reliquary-pfp img[src$="relic-forge-logo.svg"] { padding:25px; object-fit:contain; opacity:.78; }
.reliquary-identity-copy { min-width:0; flex:1; }
.reliquary-identity-copy h1 {
  max-width:none; margin:7px 0 4px; font-size:clamp(34px,5vw,56px); line-height:1;
}
.reliquary-wallet { color:#747474; font-size:11px; overflow-wrap:anywhere; }
.reliquary-bio { max-width:780px; margin:14px 0 0; color:#aaa; line-height:1.6; white-space:pre-wrap; }
.reliquary-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:19px; }
.reliquary-status { border-top:1px solid #292929; padding:12px 34px; color:#888; font-size:10px; line-height:1.45; }
.reliquary-status.good { color:#bfc8c1; }
.reliquary-status.bad { color:#c9aaaa; }

.reliquary-stat-section,.reliquary-showcase {
  margin-top:22px; border:1px solid #2a2a2a; border-radius:18px; background:rgba(17,17,17,.94); padding:24px;
}
.reliquary-section-head { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:17px; }
.reliquary-section-head > div > span { color:#888; font-size:8px; font-weight:900; letter-spacing:.16em; }
.reliquary-section-head h2 { margin:5px 0 0; font:500 27px/1 Georgia,serif; }
.reliquary-section-head small { max-width:540px; color:#717171; font-size:9px; line-height:1.5; text-align:right; }
.reliquary-head-tools { display:flex; align-items:flex-end; flex-direction:column; gap:8px; }
.reliquary-testnet-toggle { display:flex; align-items:center; gap:7px; color:#8d8d8d; font-size:9px; cursor:pointer; user-select:none; }
.reliquary-testnet-toggle input { accent-color:#aaa; }
.reliquary-testnet-section { border-color:#343434; background:linear-gradient(145deg,rgba(255,255,255,.025),rgba(14,14,14,.96)); }
.reliquary-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.reliquary-stat { min-width:0; border:1px solid #292929; border-radius:11px; background:#0a0a0a; padding:14px; }
.reliquary-stat span { display:block; color:#676767; font-size:7px; font-weight:900; letter-spacing:.11em; text-transform:uppercase; }
.reliquary-stat strong { display:block; margin-top:7px; color:#e1e1e1; font-size:16px; overflow-wrap:anywhere; }

.reliquary-grid,.reliquary-pfp-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.reliquary-token {
  min-width:0; border:1px solid #292929; border-radius:12px; background:#090909; overflow:hidden;
  color:inherit; text-align:left; padding:0; position:relative;
}
button.reliquary-token { cursor:pointer; }
button.reliquary-token:hover,button.reliquary-token.selected { border-color:#777; }
.reliquary-token-media { aspect-ratio:1; background:#050505; display:grid; place-items:center; overflow:hidden; }
.reliquary-token-media img { width:100%; height:100%; object-fit:contain; }
.reliquary-token-placeholder { width:46%; opacity:.3; }
.reliquary-token-copy { padding:9px; }
.reliquary-token-copy strong { display:block; font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reliquary-token-copy small { display:block; margin-top:4px; color:#666; font-size:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reliquary-token-badge {
  position:absolute; top:7px; left:7px; border:1px solid rgba(255,255,255,.22); border-radius:999px;
  padding:4px 6px; background:rgba(4,4,4,.82); color:#ccc; font-size:7px; font-weight:800; letter-spacing:.06em;
}
.reliquary-token-badge.not-owned { color:#a18d8d; }
.reliquary-token-network {
  position:absolute; top:7px; right:7px; max-width:62%; border:1px solid rgba(255,255,255,.22); border-radius:999px;
  padding:4px 6px; background:rgba(4,4,4,.86); color:#d1d1d1; font-size:7px; font-weight:800; letter-spacing:.04em;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.reliquary-token-network.testnet { color:#d5b98a; border-color:rgba(213,185,138,.4); }
.reliquary-testnet-pfp { margin-top:18px; padding-top:16px; border-top:1px solid #292929; }
.reliquary-testnet-pfp-head { margin-bottom:10px; }
.reliquary-empty { grid-column:1/-1; border:1px dashed #333; border-radius:11px; padding:24px; color:#707070; font-size:10px; text-align:center; }

.reliquary-modal {
  position:fixed; inset:0; z-index:1600; display:grid; place-items:center; padding:20px;
  background:rgba(0,0,0,.78); backdrop-filter:blur(5px);
}
.reliquary-modal-panel {
  width:min(820px,100%); max-height:min(880px,92vh); overflow:auto;
  border:1px solid #383838; border-radius:18px; background:linear-gradient(180deg,#141414,#0b0b0b);
  box-shadow:0 28px 90px rgba(0,0,0,.65);
}
.reliquary-modal-head { display:flex; justify-content:space-between; gap:20px; padding:22px; border-bottom:1px solid #2a2a2a; }
.reliquary-modal-head span { color:#777; font-size:8px; font-weight:900; letter-spacing:.14em; }
.reliquary-modal-head h2 { margin:5px 0 0; font:500 25px/1 Georgia,serif; }
.reliquary-edit-section { padding:20px 22px; border-bottom:1px solid #242424; }
.reliquary-edit-copy { margin-bottom:11px; }
.reliquary-edit-copy strong { display:block; font-size:12px; }
.reliquary-edit-copy small { display:block; max-width:680px; margin-top:5px; color:#777; font-size:9px; line-height:1.5; }
.reliquary-username-row { display:grid; grid-template-columns:1fr auto; gap:8px; }
.reliquary-edit-section textarea {
  width:100%; resize:vertical; min-height:105px; border:1px solid #353535; border-radius:10px;
  background:#080808; color:#eee; padding:11px; font:inherit;
}
.reliquary-field-status { margin-top:8px; min-height:15px; color:#777; font-size:9px; line-height:1.45; }
.reliquary-field-status.good { color:#bfc8c1; }
.reliquary-field-status.bad { color:#c9aaaa; }
.reliquary-locked-username { border:1px solid #343434; border-radius:10px; padding:12px; background:#0a0a0a; }
.reliquary-locked-username strong { display:block; font-size:13px; }
.reliquary-locked-username small { display:block; margin-top:4px; color:#777; font-size:9px; }
.reliquary-bio-counter { margin-top:6px; color:#666; text-align:right; font-size:9px; }
.reliquary-privacy-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.reliquary-privacy-option {
  display:flex; align-items:flex-start; gap:9px; min-width:0; border:1px solid #303030; border-radius:10px;
  padding:11px; background:#090909; cursor:pointer;
}
.reliquary-privacy-option input { margin-top:2px; accent-color:#aaa; flex:0 0 auto; }
.reliquary-privacy-option > span { min-width:0; }
.reliquary-privacy-option strong { display:block; color:#d7d7d7; font-size:9px; }
.reliquary-privacy-option small { display:block; margin-top:4px; color:#6f6f6f; font-size:8px; line-height:1.4; }
.reliquary-pfp-grid { grid-template-columns:repeat(5,minmax(0,1fr)); max-height:360px; overflow:auto; padding-right:3px; }
.reliquary-modal-actions { display:flex; justify-content:flex-end; gap:8px; padding:18px 22px 4px; }
.reliquary-modal-actions + .reliquary-field-status { padding:0 22px 18px; }

@media(max-width:950px) {
  .reliquary-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .reliquary-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(max-width:700px) {
  .reliquary-identity { align-items:flex-start; padding:24px; }
  .reliquary-pfp { width:96px; height:96px; flex-basis:96px; border-radius:18px; }
  .reliquary-status { padding:12px 24px; }
  .reliquary-section-head { align-items:flex-start; flex-direction:column; }
  .reliquary-section-head small { text-align:left; }
  .reliquary-head-tools { align-items:flex-start; width:100%; }
  .reliquary-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reliquary-grid,.reliquary-pfp-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .reliquary-privacy-grid { grid-template-columns:1fr; }
}
@media(max-width:480px) {
  .reliquary-identity { display:grid; grid-template-columns:74px 1fr; gap:15px; }
  .reliquary-pfp { width:74px; height:74px; }
  .reliquary-identity-copy .rc47b-kicker { margin-top:2px; }
  .reliquary-identity-copy h1 { font-size:30px; }
  .reliquary-wallet,.reliquary-bio,.reliquary-actions { grid-column:1/-1; }
  .reliquary-stat-section,.reliquary-showcase { padding:17px; }
  .reliquary-grid,.reliquary-pfp-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reliquary-username-row { grid-template-columns:1fr; }
}
