/* ===== Secondary pages: custom plan + leaderboard ===== */
.hot { color: var(--ember); }

.page { padding: 72px 0 40px; min-height: calc(100vh - var(--header-h)); border-bottom: 1px solid var(--line); }
.page__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
.page__intro { position: sticky; top: calc(var(--header-h) + 40px); animation: rise .8s var(--ease) both; }
.page__title { font-size: clamp(2.2rem, 4.6vw, 3.8rem); font-weight: 700; letter-spacing: -0.045em; margin: 18px 0 20px; }
.page__lede { color: var(--text-2); font-size: 1.05rem; max-width: 46ch; }
.page__form { animation: rise .8s .12s var(--ease) both; padding: 32px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.spec-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.spec-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--line-2); }
.spec-list .ic { color: var(--ember); margin-top: 3px; }
.spec-list strong { display: block; font-weight: 600; }
.spec-list span { font-size: .88rem; color: var(--muted); }
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset legend { margin-bottom: 10px; padding: 0; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.field.has-error .input, .field.has-error .textarea { border-color: var(--bad); }
.field-error { font-size: .8rem; color: #FF8A8A; }
.success { text-align: left; display: grid; gap: 16px; padding: 20px 4px; animation: rise .5s var(--ease); }
.success__mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; color: #1A0A03; background: linear-gradient(160deg, var(--hot), var(--ember)); box-shadow: 0 0 40px -6px var(--ember-glow); }
.success h2 { font-size: 2rem; letter-spacing: -0.03em; }
.success__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 920px) { .page__grid { grid-template-columns: 1fr; gap: 36px; } .page__intro { position: static; } .page__form { padding: 22px; } }

/* Leaderboard */
.lb { padding: 56px 0 40px; min-height: calc(100vh - var(--header-h)); border-bottom: 1px solid var(--line); }
.lb__head { margin-bottom: 40px; }
.lb__guild { display: flex; align-items: center; gap: 20px; }
.lb__icon { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; border: 1px solid var(--line-2); flex: none; }
.lb__icon--fallback { display: grid; place-items: center; background: var(--iron-3); font: 700 1.4rem var(--f-display); color: var(--brass-2); }
.lb__title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.04em; margin-top: 10px; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; margin-bottom: 28px; }
.podium:empty { display: none; }
.pod {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 26px 18px 0; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden;
  background: linear-gradient(180deg, var(--iron-2), var(--iron-1));
  border: 1px solid var(--line); border-bottom: 0;
  animation: rise .7s var(--ease) both;
}
.pod--1 { animation-delay: .1s; border-color: rgba(255, 90, 31, .45); background: radial-gradient(90% 60% at 50% 0%, rgba(255, 90, 31, .2), transparent 70%), linear-gradient(180deg, var(--iron-2), var(--iron-1)); }
.pod--2 { animation-delay: .2s; }
.pod--3 { animation-delay: .3s; }
.pod__avatar { position: relative; }
.pod__img { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--iron-4); object-fit: cover; background: var(--iron-3); }
.pod--1 .pod__img { width: 96px; height: 96px; border-color: var(--ember); box-shadow: 0 0 40px -6px var(--ember-glow); }
.pod--2 .pod__img { border-color: var(--steel-2); }
.pod--3 .pod__img { border-color: var(--brass); }
.pod__rank { position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font: 700 .8rem var(--f-display); background: var(--iron-4); border: 2px solid var(--iron-1); }
.pod--1 .pod__rank { background: var(--ember); color: #1A0A03; }
.pod--2 .pod__rank { background: var(--steel-2); color: #111; }
.pod--3 .pod__rank { background: var(--brass); color: #1A1206; }
.pod__name { font-size: 1rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.pod__lvl { font: 700 1.4rem var(--f-display); color: var(--text); }
.pod__lvl .mono { font-size: .7rem; color: var(--muted); letter-spacing: .1em; }
.pod--1 .pod__lvl { color: var(--hot); }
.pod .xpbar { width: 80%; }
.pod__meta { font-size: .72rem; color: var(--muted); }
.pod__base { width: calc(100% + 36px); margin-top: 14px; display: grid; place-items: center; background: var(--iron-3); border-top: 1px solid var(--line-2); color: var(--muted); height: 56px; }
.pod--1 .pod__base { height: 96px; color: var(--hot); background: linear-gradient(180deg, rgba(255,90,31,.18), var(--iron-3)); }
.pod--2 .pod__base { height: 72px; }

.xpbar { display: block; height: 6px; border-radius: 6px; background: var(--iron-4); overflow: hidden; }
.xpbar__fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ember-deep), var(--ember), var(--hot)); }

.lb__list { overflow: hidden; }
.lb__list:has(.lb__rows:empty) { display: none; }
.lb-row { display: grid; grid-template-columns: 44px 40px minmax(0, 1fr) minmax(120px, 220px) 72px; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-row:not(.lb-row--head):hover { background: rgba(255,255,255,.015); }
.lb-row--head { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 14px; padding-bottom: 14px; background: var(--iron-1); }
.lb-row--skel { grid-template-columns: 44px 40px 1fr 72px; }
.lb-rank { color: var(--muted); font-size: .9rem; }
.lb-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--iron-3); }
.lb-name { display: flex; flex-direction: column; min-width: 0; }
.lb-name strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-prog { display: grid; gap: 4px; }
.lb-lvl { font: 700 1.15rem var(--f-display); display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.lb__rows .empty { border: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 24px; }
@media (max-width: 640px) {
  .podium { gap: 8px; }
  .pod { padding: 18px 8px 0; }
  .pod__img { width: 56px; height: 56px; }
  .pod--1 .pod__img { width: 68px; height: 68px; }
  .pod__base { width: calc(100% + 16px); }
  .pod .xpbar, .pod__meta { display: none; }
  .lb-row { grid-template-columns: 32px 36px minmax(0, 1fr) 56px; padding: 10px 14px; gap: 10px; }
  .lb-hide-sm { display: none !important; }
}

/* Leaderboard list scrolls inside its own box on narrow screens */
.lb__list { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 400px) {
  .lb-row { min-width: 300px; }
  .mkt .lb-get { display: none; }
  .lb__guild { gap: 14px; }
}
@media (max-width: 560px) {
  .page { padding-top: 40px; }
  .form-foot .btn { width: 100%; }
}
