/* ==========================================================================
   TRIUMPH SOREVIA - pages.css
   Home, Profile, Avatar picker, Career, Chapter, Level map, Level preview.
   (Screens written by the meta/mode modules add their own rules to screens.css.)
   ========================================================================== */

/* =============================================================== HOME ==== */
.screen--home .screen__scroll { padding-top: calc(var(--safe-t) + 10px); }

.homehead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.idstrip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.idstrip:active { transform: scale(.98); }
.idstrip__txt { flex: 1; min-width: 0; }
.idstrip__top { display: flex; align-items: baseline; gap: 7px; margin-bottom: 4px; }
.idstrip__rank { font-size: 14px; font-weight: 900; }
.idstrip__title {
  font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idstrip__xp { font-size: 10.5px; color: var(--txt-4); margin-top: 3px; }

/* --- the one big call to action --- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 17px 18px 15px;
  background: linear-gradient(150deg, #2F7BFF 0%, #1A4FBF 46%, #0E2E7A 100%);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 14px 34px rgba(20, 70, 180, .38), var(--shadow-1);
  cursor: pointer;
  transition: transform .14s ease;
}
.hero:active { transform: scale(.985); }
.hero__glow {
  position: absolute;
  top: -60%; right: -25%;
  width: 78%; height: 190%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 62%);
  pointer-events: none;
}
.hero__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .92);
}
.hero__eyebrow .ic { width: 14px; height: 14px; }
.hero__chapter {
  font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
  padding: 3px 8px; border-radius: 100px; background: rgba(0, 0, 0, .22);
}
.hero__level {
  font-size: 34px; font-weight: 900; letter-spacing: -.03em; line-height: 1.05;
  margin-top: 9px;
}
.hero__ch { font-size: 13.5px; font-weight: 700; color: rgba(255, 255, 255, .84); margin-bottom: 11px; }
.hero__bar .bar { background: rgba(0, 0, 0, .3); border-color: rgba(255, 255, 255, .12); }
.hero__foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .82);
  margin-top: 8px;
}
.hero__stars { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-l); }
.hero__stars .ic { width: 13px; height: 13px; }
.hero__cta {
  position: absolute;
  right: 16px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 100px;
  background: #fff;
  color: #12459F;
  font-size: 13.5px; font-weight: 900;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.hero__cta .ic { width: 15px; height: 15px; }
.homespace { height: 12px; }

/* --- daily --- */
.daily-card { border-color: rgba(53, 208, 127, .3); }
.daily-card__ic { background: rgba(53, 208, 127, .18); color: var(--green); }
.daily-card__foot { margin-top: 11px; }
.dim-card { opacity: .6; }

/* --- mode tiles --- */
.modetile {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 13px 14px 12px;
  border-radius: var(--r-l);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  transition: transform .13s ease, border-color .16s ease;
}
.modetile::after {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: var(--acc, var(--blue));
  opacity: .16;
}
.modetile:active { transform: scale(.97); border-color: var(--line-3); }
.modetile__ic { color: var(--acc, var(--blue)); line-height: 0; margin-bottom: 5px; }
.modetile__ic .ic { width: 24px; height: 24px; }
.modetile__n { font-size: 14px; font-weight: 800; }
.modetile__s { font-size: 11px; color: var(--txt-3); }
.modetile.is-locked { opacity: .5; cursor: default; }
.modetile__lock { position: absolute; top: 12px; right: 12px; color: var(--txt-3); line-height: 0; }
.modetile__lock .ic { width: 15px; height: 15px; }

/* --- meta tiles --- */
.mtile {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 13px 5px 11px;
  border-radius: var(--r-m);
  background: rgba(5, 11, 26, .5);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .13s ease, border-color .16s ease;
}
.mtile:active { transform: scale(.94); border-color: var(--line-3); }
.mtile__ic { position: relative; color: var(--blue-l); line-height: 0; }
.mtile__ic .ic { width: 22px; height: 22px; }
.mtile__ic .badge { position: absolute; top: -7px; right: -11px; }
.mtile__n { font-size: 10.5px; font-weight: 800; color: var(--txt-2); }

.linkish {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--blue-l); font-weight: 800; cursor: pointer;
}
.linkish .ic { width: 14px; height: 14px; }

/* ============================================================ PROFILE ==== */
.profile__hero { text-align: center; padding-top: 20px; }
.profile__hero .avwrap { margin: 0 auto 12px; position: relative; cursor: pointer; }
.profile__edit {
  position: absolute; right: -4px; bottom: -4px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--bg-navy);
  color: var(--blue-l);
}
.profile__edit .ic { width: 14px; height: 14px; }
.profile__rank { font-size: 25px; font-weight: 900; }
.profile__title {
  font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.profile__bar { margin-bottom: 7px; }

/* ============================================================ AVATARS ==== */
.avpick {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 13px 6px 11px;
  border-radius: var(--r-m);
  background: rgba(5, 11, 26, .5);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: center;
  transition: transform .13s ease, border-color .16s ease;
}
.avpick:active { transform: scale(.95); }
.avpick.is-on { border-color: var(--gold); background: rgba(255, 201, 77, .1); }
.avpick.is-locked { opacity: .5; cursor: default; }
.avpick__n { font-size: 11.5px; font-weight: 800; }
.avpick__s { font-size: 9.5px; line-height: 1.3; }
.avpick__lock { position: absolute; top: 8px; right: 8px; color: var(--txt-3); line-height: 0; }
.avpick__lock .ic { width: 14px; height: 14px; }

/* ============================================================= CAREER ==== */
.careerhead__v { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }

.chcard {
  position: relative;
  display: flex;
  gap: 13px;
  padding: 14px;
  border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: transform .13s ease, border-color .16s ease;
}
.chcard::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--acc, var(--blue));
}
.chcard:active { transform: scale(.985); border-color: var(--line-3); }
.chcard.is-locked { opacity: .55; cursor: default; }
.chcard__num {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--acc, #2F7BFF) 22%, transparent);
  color: var(--acc, var(--blue-l));
  font-size: 19px; font-weight: 900;
}
@supports not (background: color-mix(in srgb, red 20%, blue)) {
  .chcard__num { background: rgba(47, 123, 255, .2); }
}
.chcard__body { flex: 1; min-width: 0; }
.chcard__tag {
  font-size: 9.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--acc, var(--blue-l));
}
.chcard__name { font-size: 16px; font-weight: 800; margin: 1px 0 3px; }
.chcard__blurb { font-size: 12px; color: var(--txt-3); line-height: 1.4; }
.chcard__bar { margin-top: 10px; }
.chcard__foot { font-size: 11px; font-weight: 700; color: var(--txt-3); margin-top: 6px; }
.chcard__foot .ic { width: 12px; height: 12px; vertical-align: -.16em; }
.chcard__lock {
  display: flex; align-items: center; gap: 6px;
  margin-top: 9px; font-size: 11.5px; font-weight: 700; color: #FFB3BC;
}
.chcard__lock .ic { width: 14px; height: 14px; }

.chhero { position: relative; overflow: hidden; }
.chhero::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--acc, var(--blue));
}
.chhero__num {
  position: absolute; right: 12px; top: 4px;
  font-size: 76px; font-weight: 900; line-height: 1;
  color: var(--acc, var(--blue));
  opacity: .12;
  pointer-events: none;
}
.chhero__name { font-size: 22px; margin: 3px 0 6px; }
.chhero__blurb { font-size: 13px; color: var(--txt-3); line-height: 1.45; }

.chipwrap { display: flex; flex-wrap: wrap; gap: 6px; }

/* ========================================================== LEVEL MAP ==== */
.levelmap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 0 10px;
}
/* the winding touchline */
.levelmap::before {
  content: "";
  position: absolute;
  top: 26px; bottom: 26px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: repeating-linear-gradient(180deg,
    rgba(111, 176, 255, .3) 0 7px, transparent 7px 15px);
}
.mapnode {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  cursor: pointer;
  transition: transform .13s ease;
}
.mapnode:active { transform: scale(.93); }
.mapnode.pos0 { transform: translateX(-64px); }
.mapnode.pos1 { transform: translateX(0); }
.mapnode.pos2 { transform: translateX(64px); }
.mapnode.pos0:active { transform: translateX(-64px) scale(.93); }
.mapnode.pos1:active { transform: translateX(0) scale(.93); }
.mapnode.pos2:active { transform: translateX(64px) scale(.93); }

.mapnode__dot {
  position: relative;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 17px; font-weight: 900;
  background: var(--surface);
  border: 2px solid var(--line-2);
  color: var(--txt-3);
  box-shadow: var(--shadow-1);
}
.mapnode__n { line-height: 1; }
.mapnode__boss {
  position: absolute; top: -9px; right: -6px;
  color: var(--gold); line-height: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}
.mapnode__boss .ic { width: 17px; height: 17px; }

.mapnode--done .mapnode__dot {
  background: linear-gradient(180deg, var(--blue-l), var(--blue-d));
  border-color: var(--blue-ll);
  color: #fff;
}
.mapnode--open .mapnode__dot {
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border-color: var(--line-3);
  color: var(--txt);
}
.mapnode--current .mapnode__dot {
  background: linear-gradient(180deg, var(--gold-l), var(--gold-d));
  border-color: #fff;
  color: #3A2600;
  animation: nodePulse 1.7s ease-in-out infinite;
}
@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 77, .55), var(--shadow-1); }
  55%      { box-shadow: 0 0 0 11px rgba(255, 201, 77, 0), var(--shadow-1); }
}
.mapnode--locked { cursor: default; opacity: .55; }
.mapnode--locked .mapnode__dot .ic { width: 18px; height: 18px; }

.mapnode__stars .stars .star .ic { width: 12px; height: 12px; }
.mapnode__here {
  font-size: 9.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold);
}
.mapinfo { margin-top: 2px; }

/* ====================================================== LEVEL PREVIEW ==== */
.prev__tag {
  font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-l);
}
.prev__title { font-size: 26px; margin: 3px 0 5px; }
.prev__title .ic { width: 20px; height: 20px; color: var(--gold); vertical-align: -.1em; }
.prev__obj { font-size: 13px; color: var(--txt-2); font-weight: 700; }
.prevstars { display: flex; justify-content: space-between; gap: 8px; }
.prevstars > div {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12px;
}
.prevstars .stars .star .ic { width: 12px; height: 12px; }
.prev__best {
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: rgba(5, 11, 26, .5);
  border: 1px solid var(--line);
}
.prevboosts { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.prevboost {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(5, 11, 26, .55);
  border: 1px solid var(--line);
}
.prevboost .bst { width: 21px; height: 21px; }
.prevboost i {
  position: absolute; right: -4px; bottom: -4px;
  min-width: 17px; height: 17px; padding: 0 3px;
  display: grid; place-items: center;
  border-radius: 100px;
  background: var(--blue);
  border: 2px solid var(--bg-navy);
  font-size: 9.5px; font-weight: 900; font-style: normal;
}
