/* Rift — profile page (and old v1 pages), « Fracture » palette: void, ether, crystal, one faille accent.
   Smooth vector rendering only (no pixel textures). Main site styles: v3/fracture.css */
:root {
  --lacquer: #110d1d;
  --lacquer-2: #1c1730;
  --lacquer-3: #2a2340;
  --card: rgba(28, 23, 48, .88);
  --crimson: #ff3d8b;
  --crimson-2: #e0306f;
  --crimson-deep: #7a1449;
  --gold: #c9b0ff;
  --gold-light: #e6dcff;
  --bronze: #6b52c4;
  --cream: #efeaff;
  --cream-muted: #a79fc4;
  --sakura: #ff6aa8;
  --sakura-2: #ff3d8b;
  --jade: #5ef2b0;
  --line: rgba(155, 107, 255, .22);
  --radius: 14px;
  --serif: "Unbounded", "Arial Black", system-ui, sans-serif;
  --sans: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cream);
  font: 16px/1.65 var(--sans);
  background-color: var(--lacquer);
  background-image: radial-gradient(ellipse 80% 50% at 70% -10%, rgba(155, 107, 255, .14), transparent 70%);
}
a { color: inherit; }
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: var(--lacquer-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--gold-light);
}
.muted { color: var(--cream-muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* Buttons: red lacquer with a gold rim */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; text-decoration: none; border-radius: 10px;
  font: 700 15px var(--sans); letter-spacing: .02em; padding: 11px 20px; color: var(--cream);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.btn-red {
  background: linear-gradient(180deg, var(--sakura), var(--crimson) 60%, var(--crimson-2));
  border: 1px solid rgba(255, 106, 168, .6); color: #16020c;
  box-shadow: inset 0 0 0 2px rgba(17, 13, 29, .55), 0 6px 22px -8px rgba(255, 61, 139, .8);
}
.btn-red:hover { box-shadow: inset 0 0 0 2px rgba(17, 13, 29, .55), 0 10px 30px -8px rgba(255, 61, 139, 1); }
.btn-gold {
  color: var(--lacquer);
  background: linear-gradient(180deg, var(--sakura), var(--crimson));
  border: 1px solid var(--crimson);
  box-shadow: 0 6px 22px -8px rgba(155, 107, 255, .7);
}
.btn-ghost { background: rgba(239, 234, 255, .04); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-discord { background: #5865f2; border: 1px solid #7983f5; box-shadow: 0 6px 22px -10px rgba(88, 101, 242, .9); }
.btn-discord:hover { background: #6b77f4; }
.user-chip {
  position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 5px 12px 5px 5px; border-radius: 999px; color: var(--cream);
  background: rgba(239, 234, 255, .05); border: 1px solid var(--line); font: 700 14px var(--sans);
}
.user-chip img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; padding: 6px;
  background: var(--lacquer-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px #000;
}
.user-menu p { margin: 6px 10px 8px; font-size: 13px; color: var(--cream-muted); }
.user-menu a { display: block; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--sakura); font-weight: 700; }
.user-menu a:hover { background: rgba(255, 61, 139, .15); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  padding: 12px 20px; border-radius: 12px; font-weight: 700;
  background: var(--lacquer-2); border: 1px solid var(--gold); box-shadow: 0 18px 40px -12px #000;
}
.btn-lg { padding: 15px 26px; font-size: 17px; }
.btn-block { width: 100%; margin-top: 16px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 32px;
  background: rgba(17, 13, 29, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav::after { /* the faille: thin glowing line under the nav */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--crimson) 20%, var(--crimson) 80%, transparent);
  opacity: .7;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand span { font: 900 21px var(--serif); letter-spacing: .02em; color: var(--cream); }
.links { display: flex; gap: 28px; }
.links a { position: relative; color: var(--cream-muted); text-decoration: none; font-weight: 500; padding: 6px 0; }
.links a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 2px; background: var(--gold); transition: left .2s, right .2s; }
.links a:hover { color: var(--cream); }
.links a:hover::after { left: 0; right: 0; }
.nav-actions { display: flex; gap: 10px; }

/* Hero */
.hero { position: relative; min-height: 660px; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -3; background-size: cover; background-position: center 40%; filter: saturate(.85); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(17, 13, 29, .97) 0%, rgba(17, 13, 29, .82) 42%, rgba(122, 20, 73, .45) 100%),
    linear-gradient(0deg, var(--lacquer) 2%, transparent 40%);
}
.sun { /* rising sun behind the logo */
  position: absolute; z-index: -1; right: 9%; top: 50%; width: 460px; height: 460px; transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 61, 139, .55) 0%, rgba(255, 61, 139, .28) 45%, transparent 70%);
}
.sun::after {
  content: ""; position: absolute; inset: 18%; border-radius: 50%;
  border: 1px solid rgba(155, 107, 255, .35); box-shadow: 0 0 0 18px rgba(155, 107, 255, .05);
}
.petals { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.petals i {
  position: absolute; top: -20px; width: 12px; height: 9px;
  background: radial-gradient(ellipse at 30% 30%, #ffe0ea, var(--sakura) 55%, var(--sakura-2));
  border-radius: 80% 0 80% 0; opacity: .85;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translate(0, -20px) rotate(0); }
  100% { transform: translate(-120px, 720px) rotate(540deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .petals, .emblem-fx, .spark { display: none; } .hero-emblem { animation: none !important; } }

.hero-inner { width: 100%; max-width: 1240px; margin: 0 auto; padding: 90px 32px 120px; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 32px; }
/* Animated emblem: the PNG logo + effects masked to its gold / red parts (same effects as the Discord GIF) */
.hero-emblem { position: relative; width: min(330px, 80%); justify-self: center; isolation: isolate; animation: float 6s ease-in-out infinite; }
.hero-logo { display: block; width: 100%; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6)) drop-shadow(0 0 30px rgba(155, 107, 255, .25)); }
.emblem-fx { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.emblem-rift {
  -webkit-mask-image: url(/assets/logo-mask-red.png); mask-image: url(/assets/logo-mask-red.png);
  background: rgb(255, 90, 70); opacity: 0; animation: rift-pulse 3s ease-in-out infinite;
}
@keyframes rift-pulse { 0%, 100% { opacity: 0; } 50% { opacity: .38; } }
.emblem-shine {
  -webkit-mask-image: url(/assets/logo-mask-gold.png); mask-image: url(/assets/logo-mask-gold.png);
  background: linear-gradient(115deg, transparent 42%, rgba(255, 250, 220, .9) 50%, transparent 58%) no-repeat;
  background-size: 300% 100%; background-position: 150% 0;
  animation: gold-shine 4.5s ease-in-out infinite;
}
@keyframes gold-shine { 0% { background-position: 150% 0; } 45%, 100% { background-position: -50% 0; } }
.spark {
  position: absolute; left: var(--x); top: var(--y); width: 22px; height: 22px; pointer-events: none;
  background: #fff6cf; filter: drop-shadow(0 0 6px rgba(230, 220, 255, .9));
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  transform: translate(-50%, -50%) scale(0); animation: spark 4.5s ease-in-out infinite; animation-delay: var(--d);
}
@keyframes spark {
  0%, 72%, 100% { transform: translate(-50%, -50%) scale(0) rotate(0deg); }
  82% { transform: translate(-50%, -50%) scale(1) rotate(45deg); }
  92% { transform: translate(-50%, -50%) scale(.3) rotate(90deg); }
}
@keyframes float { 50% { transform: translateY(-10px); } }

.pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(28, 23, 48, .85); border: 1px solid var(--line);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cream-muted); flex: none; }
.online .dot { background: var(--jade); box-shadow: 0 0 10px var(--jade); }
.offline .dot { background: var(--crimson); box-shadow: 0 0 10px var(--crimson); }

.kicker { margin: 22px 0 0; font: 600 12px ui-monospace, Consolas, monospace; letter-spacing: .2em; text-transform: uppercase; color: var(--sakura); }
h1 { margin: 6px 0 12px; font: 800 clamp(44px, 6.6vw, 82px)/1.05 var(--serif); }
h1 span {
  background: linear-gradient(180deg, var(--gold-light) 10%, var(--gold) 55%, #9b6bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { color: var(--cream-muted); font-size: clamp(16px, 2vw, 19px); margin: 0 0 32px; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ip-pill {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 0 18px; min-height: 52px; border-radius: 10px;
  background: rgba(28, 23, 48, .9); border: 1px solid var(--line); color: var(--cream);
  font: 600 15px ui-monospace, Consolas, monospace; transition: border-color .2s;
}
.ip-pill:hover { border-color: var(--gold); }
.copy-icon { color: var(--gold); }

/* Framed card: thin gold double rim on black lacquer */
.card {
  position: relative; background: var(--card); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: inset 0 0 0 4px var(--lacquer), inset 0 0 0 5px rgba(155, 107, 255, .1), 0 18px 40px -24px #000;
}
.card-label {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font: 700 13px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}
.card-label::before { content: ""; width: 6px; height: 18px; border-radius: 2px; background: var(--crimson); box-shadow: 0 0 0 1px var(--gold); }

/* Dashboard */
.dashboard {
  max-width: 1240px; margin: -70px auto 0; padding: 0 32px;
  display: grid; grid-template-columns: 290px 1fr 290px; gap: 22px; align-items: start;
  position: relative; z-index: 2;
}
.col { display: flex; flex-direction: column; gap: 22px; }
.server-row { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.srv { display: flex; align-items: center; gap: 8px; }
.count { color: var(--cream-muted); }
.count b { color: var(--cream); font-size: 18px; }
.bar { height: 6px; border-radius: 99px; background: var(--lacquer); margin: 10px 0 14px; overflow: hidden; border: 1px solid rgba(155, 107, 255, .15); }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--crimson), var(--gold)); transition: width .6s; }
.total { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.total b { background: var(--lacquer); border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; color: var(--gold); }
.players { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 300px; overflow: auto; }
.players li { display: flex; align-items: center; gap: 10px; }
.players .avatar { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--lacquer); background: linear-gradient(180deg, var(--gold-light), var(--gold)); }

.post { padding: 28px; }
.post .title { margin: 0 0 10px; font: 800 26px/1.25 var(--serif); }
.post p { color: var(--cream-muted); margin: 0; }
.post img { width: 100%; border-radius: 10px; margin-top: 20px; border: 1px solid var(--line); display: block; }
.steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 0 14px; align-items: center; background: var(--lacquer); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.steps li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 800 18px var(--serif); color: var(--cream); background: var(--crimson); box-shadow: 0 0 0 2px var(--gold); }
.steps span { color: var(--cream-muted); font-size: 15px; }

.grade-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.grade-mini li { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--lacquer); border: 1px solid var(--line); }
.grade-mini b { font-family: var(--serif); color: var(--grade); }
.social { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; margin-bottom: 10px; }
.social.discord { background: #5865f2; }

/* Shop */
.shop { max-width: 1240px; margin: 0 auto; padding: 100px 32px 60px; }
.section-title { text-align: center; margin: 0; font: 800 clamp(32px, 4vw, 46px) var(--serif); }
.section-title::after { content: ""; display: block; width: 120px; height: 3px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.shop > .muted { max-width: 620px; margin: 16px auto 0; }
.notice {
  margin: 20px auto 40px; width: fit-content; padding: 8px 18px; border-radius: 999px; font-weight: 700;
  background: rgba(255, 61, 139, .14); border: 1px solid rgba(255, 61, 139, .5); color: var(--sakura);
}
.grades { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.grade {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--lacquer-3), var(--lacquer-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px 24px;
  box-shadow: inset 0 0 0 4px var(--lacquer), inset 0 0 0 5px rgba(155, 107, 255, .12);
  transition: transform .2s, box-shadow .2s;
}
.grade:hover { transform: translateY(-4px); }
.grade::before { /* crimson banner strip */
  content: ""; position: absolute; top: 0; left: 24px; width: 34px; height: 54px;
  background: linear-gradient(180deg, var(--crimson), var(--crimson-2));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  box-shadow: 0 0 0 1px var(--gold);
}
.grade.featured { border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--lacquer), inset 0 0 0 5px rgba(155, 107, 255, .35), 0 24px 60px -24px rgba(255, 61, 139, .9); }
.badge { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; color: var(--lacquer); background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
.grade h3 { margin: 44px 0 0; font: 800 28px var(--serif); color: var(--grade); }
.price { font: 800 34px var(--serif); margin: 6px 0 0; color: var(--cream); }
.joyaux { color: var(--cream-muted); font-size: 14px; margin: 0 0 18px; }
.grade ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.grade li { position: relative; padding: 8px 0 8px 26px; border-bottom: 1px solid rgba(155, 107, 255, .1); font-size: 15px; }
.grade li:last-child { border-bottom: 0; }
.grade li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 7px; height: 10px; background: var(--sakura); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* Rank tag (colour = rank) */
.rank-tag {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; color: var(--rank);
  background: color-mix(in srgb, var(--rank) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rank) 45%, transparent);
}
.rank-tag.big { font-size: 13px; padding: 4px 12px; }
.dot.live { background: var(--jade); box-shadow: 0 0 8px var(--jade); width: 8px; height: 8px; }
.player-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.player-link:hover { color: var(--gold); }

/* Ranking */
.ranking { max-width: 1240px; margin: 0 auto; padding: 100px 32px 0; }
.ranking > .muted { margin: 16px 0 34px; }
.ranking-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab {
  cursor: pointer; font: 700 14px var(--sans); color: var(--cream-muted);
  padding: 8px 14px; border-radius: 999px; background: var(--lacquer); border: 1px solid var(--line);
}
.tab:hover { color: var(--cream); }
.tab.active { color: var(--cream); background: var(--crimson); border-color: var(--gold); }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--lacquer); border: 1px solid rgba(155, 107, 255, .1); }
.board-row .pos { font: 800 18px var(--serif); color: var(--cream-muted); text-align: center; }
.board-row.top-1 .pos { color: var(--gold); }
.board-row.top-2 .pos { color: #c9b0ff; }
.board-row.top-3 .pos { color: #7fd1ff; }
.board-row.top-1 { border-color: rgba(155, 107, 255, .45); }
.board-name { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; min-width: 0; }
.board-name:hover > span:first-child { color: var(--gold); }
.board-row .value { font: 700 16px var(--serif); color: var(--gold); }
.search input {
  width: 100%; padding: 12px 14px; border-radius: 10px; font: 500 15px var(--sans); color: var(--cream);
  background: var(--lacquer); border: 1px solid var(--line); outline: none;
}
.search input:focus { border-color: var(--gold); }
.search-results { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 6px; }
.search-results a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 9px; text-decoration: none; background: var(--lacquer); border: 1px solid rgba(155, 107, 255, .1); }
.search-results a:hover { border-color: var(--gold); }

/* Account menu extras + link dialog */
.user-menu a.menu-gold { color: var(--gold); }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(6, 4, 12, .75); backdrop-filter: blur(4px); }
.modal { width: min(440px, 100%); }
.link-code { margin: 14px 0; text-align: center; }
.link-code code { display: inline-block; font-size: 26px; letter-spacing: .12em; padding: 10px 18px; color: var(--gold); border-color: var(--gold); }

/* Profile page */
.page .nav { position: sticky; }
.profile { max-width: 1140px; margin: 0 auto; padding: 40px 32px 0; display: grid; gap: 22px; }
.profile-head { display: flex; align-items: center; gap: 24px; padding: 28px; }
.profile-avatar {
  flex: none; width: 96px; height: 96px; border-radius: 22px; display: grid; place-items: center;
  font: 800 44px var(--serif); color: var(--lacquer);
  background: linear-gradient(160deg, var(--gold-light), var(--rank) 60%);
  box-shadow: 0 0 0 3px var(--lacquer), 0 0 0 4px var(--rank), 0 14px 40px -12px var(--rank);
}
.profile-avatar.has-skin { background: var(--lacquer); overflow: hidden; }
.skin-head { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.skin-stage {
  position: relative; display: grid; place-items: center; padding: 26px 0 18px; border-radius: 12px;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--rank) 28%, transparent), transparent 62%),
    radial-gradient(ellipse 45% 8% at 50% 94%, rgba(0, 0, 0, .55), transparent 70%),
    var(--lacquer);
  border: 1px solid rgba(155, 107, 255, .12);
}
.skin-body { height: 280px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .55)); }
.profile-name { margin: 0 0 8px; font: 800 clamp(30px, 4vw, 44px)/1.1 var(--serif); }
.profile-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.presence { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cream-muted); }
.profile-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--lacquer); border: 1px solid rgba(155, 107, 255, .12); }
.stat-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-muted); }
.stat-value { font: 800 26px var(--serif); color: var(--cream); }
.stat-sub { font-size: 13px; color: var(--cream-muted); }
.level-row { display: flex; align-items: center; gap: 18px; }
.level-num { flex: none; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; font: 800 28px var(--serif); background: var(--crimson); box-shadow: 0 0 0 3px var(--gold); }
.level-bar { flex: 1; }
.level-bar .bar { margin: 0 0 6px; height: 10px; }
.jobs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.job { padding: 14px 16px; border-radius: 12px; background: var(--lacquer); border: 1px solid rgba(155, 107, 255, .12); }
.job-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.job-lvl { font: 700 14px var(--serif); color: var(--gold); }
.job .bar { margin: 0 0 6px; }
.facts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.facts li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--lacquer); border: 1px solid rgba(155, 107, 255, .1); }

/* Profile v2 (panel layout) */
.profile { max-width: 1040px; grid-template-columns: minmax(0, 1fr); } /* never wider than the screen */
.player-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: center; gap: 20px; padding: 28px 30px; overflow: hidden;
  background:
    radial-gradient(ellipse 40% 70% at 88% 50%, color-mix(in srgb, var(--rank) 22%, transparent), transparent 70%),
    linear-gradient(135deg, rgba(122, 20, 73, .35), transparent 55%),
    var(--card);
}
.hero-title { display: flex; align-items: center; gap: 18px; }
.hero-text { color: var(--cream-muted); margin: 18px 0 20px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-skin { display: grid; place-items: center; min-height: 300px; }
.skin3d { width: 260px; height: 340px; cursor: grab; touch-action: pan-y; }
.skin3d:active { cursor: grabbing; }
.rank-pill {
  display: inline-block; padding: 4px 12px; border-radius: 8px; font: 800 13px var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--lacquer); background: var(--rank); box-shadow: 0 0 18px -4px var(--rank);
}
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 8px; font-size: 13px; font-weight: 700;
  color: var(--cream-muted); background: var(--lacquer); border: 1px solid var(--line);
}
.chip.online { color: var(--jade); }
.chip.online .dot { background: var(--jade); box-shadow: 0 0 8px var(--jade); }
.chip .dot { width: 7px; height: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.push { margin-left: auto; }

/* 3D head (CSS cube from the skin faces) */
.head3d { width: 64px; height: 64px; perspective: 400px; flex: none; }
.cube { --s: 52px; position: relative; width: var(--s); height: var(--s); margin: 6px; transform-style: preserve-3d; transform: rotateX(-18deg) rotateY(-32deg); transition: transform .4s; }
@media (hover: hover) { .player-hero:hover .cube { transform: rotateX(-14deg) rotateY(-8deg); } } /* no sticky hover jump on touch */
/* entrance: the cube itself turns (rotating its wrapper flattened it into a spinning card). No opacity here: it
   would flatten the 3D too, the wrapper fades instead. Fill backwards only, so the hover transform works after. */
.cube.spin-in { animation: head-in 1.4s cubic-bezier(.16, 1, .3, 1) backwards; }
@keyframes head-in { from { transform: rotateX(-18deg) rotateY(-392deg) scale(.3); } to { transform: rotateX(-18deg) rotateY(-32deg) scale(1); } }
.face { position: absolute; inset: 0; background-size: cover; image-rendering: pixelated; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.face.front { transform: translateZ(calc(var(--s) / 2)); }
.face.back { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.face.right { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.8); }
.face.left { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.8); }
.face.top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.1); }
.face.bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.6); }
.profile-avatar { width: 64px; height: 64px; font-size: 30px; border-radius: 14px; }

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
}
.tile-icon { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: color-mix(in srgb, var(--accent, var(--gold)) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent, var(--gold)) 40%, transparent); }
.tile-label { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-muted); }
.tile-value { font: 800 22px var(--serif); color: var(--cream); }
.tile-sub { grid-column: 2; font-size: 12px; color: var(--cream-muted); }

/* Section cards */
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-icon { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: rgba(255, 61, 139, .14); border: 1px solid rgba(255, 61, 139, .45); }
.section-title-sm { margin: 0; font: 800 20px var(--serif); }
.faction-card .section-head { margin-bottom: 0; }
.faction-card p { margin: 2px 0 0; }
.job { display: flex; gap: 12px; align-items: flex-start; }
.job-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: color-mix(in srgb, var(--job) 14%, transparent); border: 1px solid color-mix(in srgb, var(--job) 40%, transparent); }
.job-main { flex: 1; min-width: 0; }
.job .bar { height: 7px; }

@media (max-width: 860px) {
  .player-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-skin { order: -1; min-height: 260px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .profile-name { font-size: 24px; overflow-wrap: anywhere; } /* break inside a word only for a name too long anyway */
  .hero-title > div { min-width: 0; }
  .tile { grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; padding: 12px; }
  .tile-icon { width: 32px; height: 32px; font-size: 16px; }
  .tile-value { font-size: 18px; }
  .tile-label { letter-spacing: .06em; }
}

footer { margin-top: 50px; border-top: 1px solid var(--line); padding: 28px 16px; text-align: center; color: var(--cream-muted); font-size: 14px; }

/* Responsive */
@media (max-width: 1080px) {
  .dashboard { grid-template-columns: 1fr 1fr; }
  .col-main { grid-column: 1 / -1; order: -1; }
  .ranking-grid, .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ranking, .profile { padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .jobs { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; text-align: center; }
  .profile-tags { justify-content: center; }
}
@media (max-width: 760px) {
  .links { display: none; }
  .nav { padding: 10px 16px; }
  .nav-actions .btn-ghost { display: none; }
  #login-btn span, .user-chip .user-name { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding: 50px 16px 110px; text-align: center; }
  .hero-emblem { order: -1; width: 170px; }
  .spark { width: 14px; height: 14px; }
  .sun { right: 50%; top: 22%; width: 320px; height: 320px; transform: translate(50%, -50%); }
  .hero-actions { justify-content: center; }
  .tagline { margin-inline: auto; }
  .dashboard { grid-template-columns: 1fr; padding: 0 16px; }
  .shop { padding: 80px 16px 40px; }
  .ip-pill { width: 100%; justify-content: center; }
}

/* Player resource packs (/packs) */
.packs-page { max-width: 900px; grid-template-columns: minmax(0, 1fr); }
.packs-page .eyebrow { margin: 0 0 6px; font: 800 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sakura); }
.packs-gate { padding: 40px 24px; display: grid; gap: 14px; justify-items: center; }
.packs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.packs-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.packs-head p { margin: 0; }
.packs-quota { display: grid; justify-items: center; padding: 14px 22px; border-radius: 14px; background: var(--lacquer); border: 1px solid var(--line); }
.packs-quota b { font: 800 28px var(--serif); color: var(--cream); }
.packs-drop { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 28px 18px; cursor: pointer; border: 2px dashed var(--line); transition: border-color .2s, background .2s; }
.packs-drop:hover, .packs-drop.over { border-color: var(--sakura); background: rgba(255, 106, 168, .06); }
.packs-drop.disabled { cursor: not-allowed; opacity: .6; pointer-events: none; }
.packs-drop b { font: 800 18px var(--serif); }
.packs-progress { width: min(420px, 100%); height: 8px; margin-top: 8px; }
.packs-list { display: grid; gap: 10px; }
.packs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--lacquer); border: 1px solid rgba(155, 107, 255, .12); }
.packs-row.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.packs-row-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.packs-row-main b { overflow-wrap: anywhere; }
.packs-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.packs-row-actions .btn { padding: 8px 14px; font-size: 13px; }
.packs-del:hover { border-color: #ff6b6b; color: #ff9b9b; }
.packs-help ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--cream-muted); }
/* Tebex store (/boutique) */
.shop-page { max-width: 1040px; grid-template-columns: minmax(0, 1fr); }
.shop-page .eyebrow { margin: 0 0 6px; font: 800 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sakura); }
.shop-head p { margin: 0; }
.shop-cat { display: grid; gap: 12px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.shop-card { display: grid; gap: 8px; align-content: start; }
.shop-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--lacquer); }
.shop-name { margin: 0; font: 800 18px var(--serif); overflow-wrap: anywhere; }
.shop-text { margin: 0; white-space: pre-line; }
.shop-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.shop-price { font: 800 20px var(--serif); color: var(--cream); }
/* Stripe store (/boutique): buy dialog, offer badge, test banner, thank-you box; /cgv */
.shop-card { position: relative; }
.shop-badge { position: absolute; top: 12px; right: 12px; padding: 2px 8px; border-radius: 999px; background: var(--sakura); color: #1a0b33; font: 800 12px var(--sans); }
.shop-test { border-color: rgba(255, 201, 60, .5); }
.shop-test p { margin: 0; color: #ffc93c; }
.shop-thanks { border-color: rgba(47, 245, 214, .45); }
.shop-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100dvh - 32px); overflow: auto; width: min(440px, calc(100vw - 32px)); color: var(--cream); padding: 22px; } /* .card sets position: relative */
.shop-dialog::backdrop { background: rgba(5, 3, 12, .7); backdrop-filter: blur(3px); }
.shop-form { display: grid; gap: 10px; }
.shop-form h2 { margin: 0 0 4px; }
.shop-form input[type="text"], .shop-form input:not([type]) { padding: 11px 12px; border-radius: 10px; background: var(--lacquer); border: 1px solid var(--line); color: var(--cream); font: 600 15px var(--sans); outline: none; }
.shop-form input:focus { border-color: var(--sakura); }
.shop-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.shop-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--sakura); }
.shop-err { margin: 0; min-height: 1em; color: #ff4d6d; font-size: 14px; }
.shop-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.shop-buy .btn[disabled] { opacity: .45; cursor: not-allowed; }
.cgv { max-width: 820px; margin: 96px auto 0; display: grid; gap: 14px; }
.cgv h1 { margin: 0; }
.cgv h2 { margin: 10px 0 0; font: 800 18px var(--sans); }
.cgv p, .cgv li { color: var(--cream-muted); line-height: 1.6; }
.cgv .todo { color: #ffc93c; }
