/* ALYSSIUN ID — public profile card, dashboard & upload controls.
   Atmosphere-aware (Ceramic Mist by default, Infinite Void when selected);
   one coherent glass artifact built from themed variables (see style.css). */

.profile-wrap { max-width: 580px; margin: 24px auto 0; display: grid; gap: 22px; }
.profile-section { margin: 0; }
.section-eyebrow {
  display: block; margin: 0 0 10px 3px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.profile-card {
  position: relative; border-radius: 16px; overflow: hidden;
  background: var(--glass); border: 1px solid var(--hair);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.profile-card:hover { transform: translateY(-2px); border-color: var(--hair-2); }

/* Avatar section — placeholder for the forthcoming 3D avatar system */
.avatar-card-body { display: flex; align-items: center; gap: 18px; padding: 22px 26px; }
.av-object {
  width: 76px; height: 76px; border-radius: 16px; flex: 0 0 auto; object-fit: cover;
  border: 1px solid var(--hair-2); background: var(--void-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 300; font-size: 26px; color: var(--text); letter-spacing: 1px;
}
.av-object.ph { box-shadow: inset 0 0 0 1px var(--hair-2); }
.av-copy { min-width: 0; }
.av-copy h2 { font-size: 18px; font-weight: 300; letter-spacing: -0.01em; margin: 10px 0 6px; }
.av-copy .pill { color: var(--muted); }
.av-copy .av-sub { font-size: 12.5px; margin-top: 8px; }

/* 3D model viewer — one premium glass surface, atmosphere-aware ceramic ground */
.avatar-viewer {
  position: relative; height: 320px; background: var(--banner);
  border-bottom: 1px solid var(--hair); display: flex; align-items: center; justify-content: center;
}
.av-mv { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.av-loading { font-size: 12px; letter-spacing: 0.04em; }

/* Banner — atmosphere surface (Ceramic Mist by default), not a generic gradient */
.banner {
  height: 156px; position: relative;
  background: var(--banner);
  border-bottom: 1px solid var(--hair);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.05);
}
.banner.has-image { background-size: cover; background-position: center; }
/* legibility wash so the avatar reads against any uploaded image */
.banner.has-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,6,8,0.05) 0%, rgba(6,6,8,0.55) 100%);
}

.profile-body { padding: 0 26px 28px; margin-top: -54px; position: relative; z-index: 1; }
.profile-avatar {
  width: 112px; height: 112px; border-radius: 18px; object-fit: cover;
  border: 4px solid var(--frame); background: var(--void-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 300; font-size: 40px; color: var(--text); letter-spacing: 1px;
  box-shadow: var(--thumb-shadow);
}
.profile-avatar.ph {
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(255,255,255,0.07), rgba(255,255,255,0) 60%),
    var(--void-2);
  box-shadow: var(--thumb-shadow), inset 0 0 0 1px var(--hair-2);
}

.profile-name { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; flex-wrap: wrap; }
.profile-name h1 { font-size: 27px; margin: 0; line-height: 1.15; font-weight: 200; letter-spacing: -0.02em; }
.profile-handle { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }
.profile-role { margin: 14px 0 0; font-size: 15px; color: var(--text); font-weight: 400; }
.profile-role .co { color: var(--muted); }
.profile-bio { color: var(--muted); margin: 12px 0 0; font-size: 14.5px; }

/* Verified / trust badge — a quiet mark of standing, not a sticker */
.vbadge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 10px;
  border-radius: 5px; white-space: nowrap; align-self: center;
  border: 1px solid var(--hair-2); color: var(--muted); background: var(--glass);
}
.vbadge svg { width: 12px; height: 12px; }
.vbadge.verified { color: var(--jade); border-color: rgba(134,224,192,0.42); box-shadow: 0 0 24px -10px rgba(134,224,192,0.5); }
.vbadge.trusted { color: var(--text); }
.vbadge.limited { color: #e6c07a; border-color: rgba(230,192,122,0.42); }

/* Sub panels */
.subpanel { margin-top: 18px; padding: 16px; border: 1px solid var(--hair); border-radius: 12px; background: rgba(255,255,255,0.015); }
.subpanel .eyebrow { margin: 0 0 12px; }
.av-row { display: flex; align-items: center; gap: 14px; }
.av-chip {
  width: 50px; height: 50px; border-radius: 12px; flex: 0 0 auto; object-fit: cover;
  border: 1px solid var(--hair-2); background: var(--void-2);
  display: flex; align-items: center; justify-content: center; font-weight: 300; color: var(--text);
}
.link-list { display: grid; gap: 8px; margin-top: 16px; }
.link-list a {
  display: flex; align-items: center; gap: 10px; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--hair); border-radius: 8px;
  background: rgba(255,255,255,0.015); font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.link-list a:hover { border-color: var(--hair-2); background: var(--glass-2); transform: translateY(-1px); text-decoration: none; }

.qr-row { display: flex; gap: 16px; align-items: center; margin-top: 14px; }
.qr-row img { width: 108px; height: 108px; border-radius: 8px; background: #fff; padding: 7px; flex: 0 0 auto; }
.qr-meta { min-width: 0; }
.qr-url { font-size: 12px; word-break: break-all; color: var(--muted); }
.trust-note { margin-top: 18px; font-size: 11.5px; color: var(--muted); line-height: 1.55; }

/* ---------- Upload controls (dashboard / edit card) ---------- */
.media-edit { display: grid; gap: 16px; margin: 6px 0 4px; }
.media-field { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.media-thumb {
  width: 74px; height: 74px; border-radius: 14px; flex: 0 0 auto; object-fit: cover;
  border: 1px solid var(--hair-2); background: var(--void-2);
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px;
}
.media-thumb.wide { width: 150px; height: 74px; border-radius: 10px; }
.media-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.media-hint { font-size: 11px; color: var(--muted); letter-spacing: 0; text-transform: none; }
input[type="file"] { display: none; }

/* ---------- Dashboard identity cards ---------- */
/* overflow stays visible so the 3-dot menu can escape the card; the rounded top
   corners that overflow:hidden used to provide are applied to the strip itself. */
.id-card { position: relative; padding: 0; }
.id-card .id-strip {
  height: 64px;
  background: var(--banner);
  background-size: cover; background-position: center; border-bottom: 1px solid var(--hair);
  border-radius: var(--radius) var(--radius) 0 0;
}
.id-card .id-inner { padding: 18px 20px 20px; }
.id-card .id-head { display: flex; align-items: flex-start; gap: 12px; }
.id-card h3 { margin: 0; font-size: 17px; }

/* ---------- 3-dot overflow menu (dashboard card actions) ---------- */
.menu { position: relative; margin-left: auto; }
.menu-btn { padding: 9px 11px; line-height: 1; font-size: 16px; letter-spacing: 1px; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 184px;
  background: var(--glass); border: 1px solid var(--hair-2); border-radius: 10px;
  padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,0.28);
}
.menu-pop button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--text); font: inherit; padding: 9px 11px; border-radius: 7px; cursor: pointer;
}
.menu-pop button:hover:not(:disabled) { background: var(--glass-2); }
.menu-pop button.danger { color: var(--danger); }
.menu-pop button:disabled { opacity: 0.5; cursor: not-allowed; }
.menu-pop .menu-note { padding: 4px 11px 8px; font-size: 12px; color: var(--muted); }

/* ---------- Editor tabs (unified ID Card | Avatar editor) ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--hair); margin: 4px 0 22px; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font: inherit; font-size: 14px; padding: 10px 14px; margin-bottom: -1px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--primary); }

@media (max-width: 580px) {
  .profile-wrap { margin-top: 18px; }
  .profile-body { padding: 0 16px 22px; }
  .banner { height: 128px; }
  .profile-avatar { width: 100px; height: 100px; border-radius: 16px; font-size: 36px; }
  .profile-name h1 { font-size: 23px; }
  .qr-row { flex-direction: column; align-items: flex-start; }
  .qr-row img { width: 132px; height: 132px; }
  .qr-meta .btn { width: 100%; }
  .avatar-card-body { padding: 18px 16px; gap: 14px; align-items: flex-start; }
  .avatar-viewer { height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-card, .link-list a { transition: none; }
  .profile-card:hover, .link-list a:hover { transform: none; }
}
