.lf-dashboard { min-height: 100vh; }
.dashboard-grid { width: 100%; padding-bottom: 90px; }

.dashboard-hero { min-height: 520px; padding: clamp(58px,6vw,88px) max(24px,calc((100vw - 1400px)/2)); display: grid; grid-template-columns: minmax(0,1.08fr) minmax(440px,.92fr); align-items: center; gap: clamp(40px,5vw,78px); position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); background: linear-gradient(90deg,rgba(7,7,6,.98) 24%,rgba(7,7,6,.76) 60%,rgba(55,10,8,.46)),url("assets/welcome_moon_dashboard.png") right center/auto 100% no-repeat; }
.dashboard-hero::before { content: ""; position: absolute; z-index: -1; right: 4%; bottom: -215px; width: 680px; height: 680px; border: 1px solid rgba(221,174,77,.14); border-radius: 50%; }
.hero-copy { max-width: 740px; }
.hero-copy h1 { margin: 0; color: var(--gold-bright); font: 500 clamp(2.75rem,5.25vw,5.15rem)/.98 var(--display); letter-spacing: -.035em; }
.hero-copy h1 span { color: var(--blood-bright); }
.hero-copy > p:not(.portal-kicker) { max-width: 600px; margin: 28px 0; color: #d2c19d; font-size: 1.34rem; line-height: 1.38; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }

.profile-card { min-height: 360px; padding: 30px; display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 26px; position: relative; border: 1px solid rgba(214,173,85,.58); background: linear-gradient(145deg,rgba(45,20,15,.78),rgba(8,8,7,.88)); box-shadow: 0 32px 90px rgba(0,0,0,.38); backdrop-filter: blur(12px); }
.profile-card::before { content: ""; position: absolute; inset: 8px; pointer-events: none; border: 1px solid rgba(214,173,85,.12); }
.profile-portrait { width: 170px; height: 250px; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 38%,rgba(146,30,22,.6),transparent 50%),url("assets/profile_silhouette_placeholder.png") center 34%/152% auto no-repeat,#090807; }
.profile-portrait > .profile-photo-crop { position:absolute; inset:9px; overflow:hidden; z-index:0; }
.profile-portrait .profile-photo-crop img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform:scale(1.12); }
.profile-portrait.has-photo { background:#090807; }
.profile-portrait.has-photo .portrait-silhouette { display:none; }
.profile-portrait::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(214,173,85,.25); }
.profile-identity { min-width: 0; position: relative; z-index: 1; }
.profile-identity h2 { margin: 0; color: var(--gold-bright); font: 500 clamp(1.45rem,2.1vw,2rem)/1.1 var(--display); }
.member-quote { margin: 8px 0 20px; color: #c7b790; font-size: 1.05rem; font-style: italic; }
.profile-meta { padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.profile-meta span { padding: 5px 0; display: flex; justify-content: space-between; gap: 15px; }
.profile-meta small,.profile-honor small { color: var(--quiet); font: .68rem var(--display); letter-spacing: .07em; text-transform: uppercase; }
.profile-meta b { color: var(--cream); font-size: .92rem; font-weight: 600; text-align: right; }
.profile-honor { margin: 15px 0; display: flex; flex-direction: column; color: var(--gold); font-style: italic; }
.profile-edit { width: 100%; }

.legacy-overview { width: min(1400px,calc(100% - 40px)); margin: 66px auto 0; display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 46px; align-items: stretch; }
.side-panel,.dashboard-panel,.path-panel { min-width: 0; }
.wallet { padding: 3px 0 0; border-top: 1px solid var(--line); }
.wallet header { padding: 27px 0 18px; }
.wallet h2,.path-panel h2,.dashboard-panel h2,.side-panel h2 { margin: 0; color: var(--gold-bright); font: 500 1.5rem/1.18 var(--display); }
.wallet-figures { border-top: 1px solid var(--line-soft); }
.wallet-row { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.wallet-row > span { display: flex; align-items: center; gap: 12px; }
.wallet-row i { width: 34px; height: 34px; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line); font: .68rem var(--display); }
.wallet-row b { display: flex; flex-direction: column; color: var(--cream); font-size: 1rem; }
.wallet-row small { color: var(--quiet); font-size: .72rem; font-weight: 400; }
.wallet-row strong { color: var(--gold-bright); font: 500 2rem var(--display); }
.wallet-row:first-child::after { content: attr(data-tier); width: 30px; height: 38px; display: grid; place-items: center; order: 3; color: var(--gold-bright); border: 1px solid var(--gold); clip-path: polygon(50% 0,100% 18%,100% 75%,50% 100%,0 75%,0 18%); background: #4f130f; font: .68rem var(--display); }
.wallet .gold-button { width: 100%; margin-top: 18px; }

.path-panel { padding: 0; }
.path-panel > header { min-height: 100px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.paths-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); }
.path { min-height: 245px; padding: 32px 25px; display: block; border-right: 1px solid var(--line); background: linear-gradient(145deg,rgba(36,27,19,.5),rgba(9,9,8,.2)); transition: background .25s; }
.path:last-child { border-right: 0; }
.path:hover { background: linear-gradient(145deg,rgba(82,21,15,.44),rgba(15,13,10,.65)); }
.path > i { display: grid; place-items: center; width: 48px; height: 48px; color: var(--gold); border: 1px solid rgba(213,173,82,.58); border-radius: 50%; font: .68rem var(--display); }
.path > div { margin-top: 28px; }
.path > div > span { display: flex; flex-direction: column; }
.path b { color: var(--gold-bright); font: 500 1.12rem var(--display); }
.path span small { margin-top: 4px; color: var(--gold-muted); font: .72rem var(--display); }
.path > div > small { color: var(--quiet); font-size: .84rem; }
meter { width: 100%; height: 5px; margin: 18px 0 8px; display: block; border: 0; background: rgba(214,173,85,.13); }
meter::-webkit-meter-bar { height: 5px; border: 0; border-radius: 0; background: rgba(214,173,85,.13); }
meter::-webkit-meter-optimum-value { background: linear-gradient(90deg,var(--blood-bright),var(--gold)); transition: width .8s; }
meter::-moz-meter-bar { background: linear-gradient(90deg,var(--blood-bright),var(--gold)); }

.dashboard-content { margin-top: 88px; }
.dashboard-primary { display: grid; gap: 82px; }
.feature-grid { min-height: 560px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(90deg,#0b0a09,#140a08); }
.upcoming { padding: clamp(52px,6vw,85px) clamp(28px,5vw,75px) clamp(45px,5vw,70px) max(24px,calc((100vw - 1400px)/2)); align-self: center; }
.dashboard-panel > header,.side-panel > header { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 30px; }
.dashboard-panel header a,.side-panel header a { color: var(--gold); font: .75rem var(--display); letter-spacing: .05em; }
#upcoming-events { min-height: 230px; border-top: 1px solid var(--line-soft); }
.event-mini { min-height: 112px; padding: 16px 0; display: grid; grid-template-columns: 66px 1fr 26px; gap: 18px; align-items: center; border-bottom: 1px solid var(--line-soft); }
.event-date { width: 62px; height: 72px; display: grid; place-items: center; align-content: center; color: var(--gold); border: 1px solid rgba(190,65,48,.62); background: #2c0c09; }
.event-date span { font: .55rem var(--display); letter-spacing: .12em; }
.event-date b { color: var(--gold-bright); font: 500 1.65rem var(--display); }
.event-mini strong { display: block; color: var(--gold-bright); font: 600 1.28rem var(--serif); }
.event-mini small { display: block; margin-top: 3px; color: var(--muted); font-size: .92rem; }
.event-mini > i { color: var(--gold); font-style: normal; }
.link-button { width: 100%; min-height: 46px; padding: 0; display: flex; align-items: center; justify-content: space-between; color: var(--gold); border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; font: .75rem var(--display); cursor: pointer; }
.crystal-card { display: grid; grid-template-columns: 48% 52%; overflow: hidden; background: radial-gradient(circle at 25% 48%,rgba(145,29,20,.36),transparent 45%),#090807; }
.crystal-visual { min-height: 560px; display: grid; place-items: center; overflow: hidden; position: relative; }
.crystal-visual::before { content: ""; position: absolute; inset: 8%; border: 1px solid rgba(206,159,57,.22); }
.crystal-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 35% center; filter: drop-shadow(0 18px 30px rgba(0,0,0,.55)); }
.crystal-copy { padding: clamp(45px,5vw,75px) clamp(30px,4vw,62px); align-self: center; }
.crystal-copy h2 { font-size: clamp(1.7rem,2.2vw,2.4rem); }
.crystal-copy h2 em { display: block; margin-top: 8px; color: var(--blood-bright); font: .66rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.crystal-copy > p:not(.portal-kicker) { color: #c9b891; font-size: 1.18rem; }
.crystal-copy .gold-button { margin-top: 18px; }
.crystal-card.is-dormant .crystal-visual img { filter: saturate(.35) brightness(.65); }

.collection-grid { width: min(1400px,calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: 1.45fr .55fr; gap: 60px; }
.badge-panel,.activity-panel { padding-top: 2px; border-top: 1px solid var(--line); }
.badge-panel > header,.activity-panel > header { padding-top: 28px; }
.badge-row { min-height: 260px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); }
.dashboard-badge { min-height: 260px; padding: 34px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-right: 1px solid var(--line); background: linear-gradient(150deg,rgba(34,27,19,.58),rgba(8,8,7,.88)); }
.dashboard-badge:last-child { border-right: 0; }
.dashboard-badge i { width: 74px; height: 82px; display: grid; place-items: center; color: var(--gold-bright); background: radial-gradient(circle,#7a241b,#210b08 70%); clip-path: polygon(50% 0,90% 17%,90% 75%,50% 100%,10% 75%,10% 17%); font-style: normal; font-size: 1.55rem; }
.dashboard-badge img { width: 118px; height: 118px; display: block; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0,0,0,.62)); }
.dashboard-badge small { margin-top: 18px; color: var(--gold-bright); font-size: 1rem; }
.dashboard-badge b { margin-top: 5px; color: var(--gold-muted); font: .58rem var(--display); }
.dashboard-empty { color: var(--quiet); font-style: italic; }
.chart { height: 210px; padding: 24px 10px 30px; display: flex; justify-content: space-around; align-items: end; gap: 10px; border-bottom: 1px solid var(--line-soft); background: repeating-linear-gradient(to top,transparent 0,transparent 43px,rgba(214,173,85,.08) 44px); }
.bar-group { height: 100%; flex: 1; display: flex; align-items: end; justify-content: center; gap: 5px; position: relative; }
.bar-group::after { content: attr(data-date); position: absolute; top: calc(100% + 10px); color: var(--quiet); font-size: .72rem; }
.bar { width: 14px; min-height: 3px; background: linear-gradient(#b9362b,#6e1712); border-top: 1px solid #df5e50; }
.bar.challenge { background: linear-gradient(#c69428,#705112); border-color: #edc25f; }
.chart-key { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 18px; color: var(--quiet); font-size: .72rem; }
.chart-key span::before { content: ""; width: 8px; height: 8px; margin-right: 7px; display: inline-block; background: var(--blood-bright); }
.chart-key span + span::before { background: var(--gold); }

.dashboard-right { width: min(1400px,calc(100% - 40px)); margin: 82px auto 0; display: grid; grid-template-columns: 1.1fr 1.1fr .8fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.dashboard-right .side-panel { min-height: 390px; padding: 36px 32px; background: linear-gradient(145deg,rgba(26,22,17,.72),rgba(8,8,7,.96)); }
.challenges header small { color: var(--blood-bright); font-size: .72rem; white-space: nowrap; }
.challenge-row { padding: 17px 0; border-top: 1px solid var(--line-soft); }
.challenge-row > div { display: flex; justify-content: space-between; gap: 12px; color: var(--cream); }
.challenge-row b { color: var(--gold); font-size: .86rem; }
.challenge-row meter { margin: 10px 0 0; }
.notifications > header h2 a { transition: color .2s; }
.notifications > header h2 a:hover { color: var(--gold); }
.notifications > header > span { width: 30px; height: 30px; display: grid; place-items: center; color: #fff0cf; border-radius: 50%; background: #862119; font: .68rem var(--display); }
.notice { padding: 15px 0; display: grid; grid-template-columns: 25px 1fr; gap: 9px; border-top: 1px solid var(--line-soft); color: var(--cream); }
.notice i { color: var(--gold); font-style: normal; }
.notice small { display: block; color: var(--quiet); font-size: .76rem; }
.notifications > .text-link { margin-top: 25px; }
.leaderboard-panel ol { margin: 0; padding: 0; list-style-position: inside; }
.leaderboard-panel li { padding: 15px 0; color: var(--cream); border-top: 1px solid var(--line-soft); }
.leaderboard-panel li span { float: right; color: var(--gold); }
.leaderboard-panel li.current { color: var(--gold-bright); background: linear-gradient(90deg,rgba(115,26,17,.2),transparent); }

@media(max-width:1180px) {
  .dashboard-hero { grid-template-columns: 1fr; background-position: center; }
  .profile-card { max-width: 720px; }
  .legacy-overview { grid-template-columns: 1fr; }
  .wallet { display: grid; grid-template-columns: 1fr 1.6fr auto; align-items: center; gap: 25px; }
  .wallet-figures { display: grid; grid-template-columns: 1fr 1fr; }
  .wallet-row { padding: 0 15px; }
  .wallet .gold-button { margin: 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .upcoming { padding-left: max(24px,calc((100vw - 960px)/2)); padding-right: max(24px,calc((100vw - 960px)/2)); }
  .collection-grid { grid-template-columns: 1fr; }
}

@media(max-width:900px) {
  .paths-grid { grid-template-columns: 1fr 1fr; }
  .path:nth-child(2) { border-right: 0; }
  .path:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .dashboard-right { grid-template-columns: 1fr; }
  .dashboard-right .side-panel { min-height: 0; }
}

@media(max-width:700px) {
  .dashboard-hero { min-height: 0; padding: 70px 22px 35px; }
  .hero-copy h1 { font-size: 2.75rem; }
  .hero-copy > p:not(.portal-kicker) { font-size: 1.15rem; }
  .profile-card { padding: 22px; grid-template-columns: 110px 1fr; }
  .profile-portrait { width: 110px; height: 200px; }
  .profile-meta span:nth-child(1),.profile-honor { display: none; }
  .legacy-overview { margin-top: 70px; }
  .wallet { display: block; }
  .wallet-figures { grid-template-columns: 1fr; }
  .wallet-row { padding: 0; }
  .wallet .gold-button { margin-top: 18px; }
  .path-panel > header { align-items: start; }
  .path-panel > header .text-link { display: none; }
  .crystal-card { grid-template-columns: 1fr; }
  .crystal-visual { min-height: 420px; }
  .collection-grid,.dashboard-right { width: calc(100% - 32px); }
  .badge-row { grid-template-columns: 1fr; }
  .dashboard-badge { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media(max-width:480px) {
  .profile-card { grid-template-columns: 1fr; }
  .profile-portrait { width: 100%; height: 220px; }
  .paths-grid { grid-template-columns: 1fr; }
  .path { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .path:last-child { border-bottom: 0; }
  .feature-grid { min-height: 0; }
  .upcoming { padding: 55px 18px; }
  .crystal-visual { min-height: 330px; }
  .crystal-copy { padding: 45px 22px; }
}
