:root {
  --paper: #0b1530;
  --white: #142347;
  --ink: #f4f7ff;
  --muted: #bccdeb;
  --green: #d8f65b;
  --deep: #08132f;
  --line: #3a5490;
  --gold: #d8f65b;
  --lime: #d8f65b;
  --purple: #b79bff;
  --radius: 9px;
  --cyan: #62e7ff;
  font-family: "Trebuchet MS", system-ui, sans-serif;
}
body {
  background-color: var(--paper);
  background-image: radial-gradient(circle at 9% 24%, #4570b366 1px, transparent 1.8px), radial-gradient(circle at 84% 68%, #776be277 1px, transparent 1.8px), linear-gradient(150deg, #151c48, transparent 55%);
  background-size: 127px 139px, 173px 161px, auto;
}
h1,h2,h3 { font-family: "Arial Black", "Avenir Next", system-ui, sans-serif; letter-spacing: -.028em; }
:focus-visible { outline: 3px solid #62e7ff; outline-offset: 4px; }
.skip { color: #0b1530; }
html { scroll-padding-top: calc(var(--site-header-height, 78px) + .6rem); }
.skip { z-index: 9; }
.site-header { position: sticky; top: 0; z-index: 8; background: #080f25; border-bottom: 2px solid #344e86; box-shadow: 0 4px 0 #0b1026; }
.header-inner { min-height: 70px; }
.brand { color: #fff; letter-spacing: -.018em; font-family: "Arial Black", system-ui, sans-serif; }
.brand img { border: 1px solid #425f9b; border-radius: 10px; }
.nav a { color: #d3dff1; border: 1px solid transparent; border-radius: 5px; }
.nav a:hover,.nav a[aria-current=page] { background: #172955; color: var(--cyan); border-color: #3b5793; }
.lang { border: 1px solid #364b7d; background: #101d3a; border-radius: 6px; }
.lang button { color: #c8d7eb; border-radius: 3px; }
.lang button[aria-pressed=true] { background: #67e0ff; color: #0a1730; }
.point-chip { background: #383717; color: #e9ff8d; border: 1px solid #747a37; border-radius: 5px; }
.point-chip .icon { color: var(--green); fill: var(--green); }
.progress-hud {
  display: grid;
  gap: .26rem;
  min-height: 42px;
  padding: .36rem .54rem .42rem;
  border-color: #6d839f;
  border-radius: 7px;
  background: linear-gradient(155deg, #233749, #101d38 84%);
  box-shadow: inset 0 1px 0 #ffffff16;
}
.progress-hud:hover { border-color: #a6ecf6; background: #213750; }
.hud-readout { display: grid; grid-auto-flow: column; align-items: center; gap: .35rem; line-height: 1.15; }
.hud-readout .icon { width: .9rem; height: .9rem; }
.hud-points { font-variant-numeric: tabular-nums; }
.hud-level { padding-inline-start: .35rem; border-inline-start: 1px solid #6d839f; color: #d6edff; font-size: .76rem; }
.hud-track { display: block; height: .28rem; overflow: hidden; border-radius: 1rem; background: #455c81; }
.hud-track > span { display: block; width: var(--hud-fill, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #69e0ff, #ddf973); transition: width .45s ease; }
#contingut { padding-top: 27px; }
.home-intro { max-width: 880px; margin-inline: auto; }
.home-intro h1 { margin-bottom: 12px; color: #f4f7ff; font-size: clamp(1.45rem, 3.5vw, 2.2rem); }
.home-intro-screen { position: relative; border: 2px solid #536fae; border-radius: 9px; background: #080f25; box-shadow: 0 5px 0 #070b19; }
.home-intro-screen video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 7px; }
.home-intro-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: clamp(54px,9vw,84px);
  height: clamp(54px,9vw,84px);
  transform: translate(-50%, -50%);
  border: 2px solid #e8ffa0;
  border-radius: 50%;
  background: var(--green);
  color: #101a2c;
  box-shadow: 0 4px 0 #4d5f1c, 0 0 0 7px #08132f9c;
  cursor: pointer;
}
.home-intro-play:hover { background: #edff98; }
.home-intro-play[hidden] { display: none; }
.home-intro-play .icon { width: 43%; height: 43%; fill: currentColor; }
.home-intro-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-top: 15px; }
.home-intro-next { display: grid; gap: 1px; min-width: 0; }
.home-intro-next small { color: var(--cyan); }
.home-intro-next strong { font-size: 1rem; }
.hero { display: block; min-height: 405px; border: 2px solid #4b64af; border-radius: 9px; box-shadow: 0 5px 0 #02091d; isolation: isolate; }
.hero::after { z-index: -1; inset: 0; background: linear-gradient(90deg,#08152ff7 0%,#08152fe0 25%,#0b1c3b8a 48%,transparent 72%); }
.hero-art { position: absolute; inset: 0; z-index: -2; min-height: 0; object-position: center 49%; }
.hero-copy { width: min(55%, 565px); padding: clamp(24px,4vw,49px); }
.hero h1 { font-size: clamp(2.25rem,5vw,4rem); line-height: .95; letter-spacing: -.035em; text-transform: uppercase; max-width: 12ch; text-shadow: 0 4px #07132f; }
.hero h1 span { color: var(--green); }
.hero .eyebrow { color: var(--cyan); font-size: .79rem; }
.hero .eyebrow .icon { color: var(--cyan); }
.hero p { color: #eff7ff; font-size: 1rem; }
.hero .mission-beacon { display: grid; gap: 2px; margin-top: 15px; max-width: 380px; border-left: 3px solid var(--cyan); padding: 7px 10px; background: #12234cc2; }
.mission-beacon small { color: var(--cyan); }
.mission-beacon strong { color: #fff; font-size: .99rem; }
.hero .btn-row { margin-top: 17px; }
.btn { border-radius: 6px; color: #101a2c; background: var(--green); box-shadow: 0 3px 0 #6b862b; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b862b; }
.btn-gold { background: #d8f65b; color: #102412; border-color: #e5ff9c; box-shadow: 0 4px 0 #859736; }
.btn-ghost { color: #e4f7ff; border-color: #5c8cc0; background: #0e1f48; box-shadow: 0 3px 0 #0a142e; }
.btn-light,.btn-plain { background: #20355f; border-color: #506aa2; box-shadow: 0 3px 0 #0a142e; color: #e8efff; }
.section-head h2,.page-head h1 { color: #f3f7ff; }
.section-head .eyebrow,.page-head .eyebrow { color: var(--cyan); }
.stat-pill { background: #23264a; color: #f2ffab; border-color: #68726e; border-radius: 5px; }
.stat-pill .icon { color: var(--green); }
.world-grid { gap: 12px; }
.world { position: relative; color: #e8f1ff; background: #101c38; border: 2px solid #394f89; border-radius: 7px; box-shadow: 0 4px 0 #070e22; }
.world:hover { background: #1b2c58; box-shadow: 0 5px 0 #070e22; }
.world[aria-expanded=true] { border-color: #68e7ff; box-shadow: 0 4px 0 #143f70; }
.world-art { object-position: center center; height: clamp(112px,13vw,164px); background: #091632; }
.world-info { padding: 10px 14px 13px; border-top: 1px solid #2f4e88; }
.world-tag { color: #bdf59a; background: #24453b; padding: 2px 6px; border-radius: 3px; }
.world:nth-child(2) .world-tag { background: #1a3d5c; color: #a2eaff; }
.world:nth-child(3) .world-tag { background: #302557; color: #d7beff; }
.world-title .icon { color: var(--cyan); }
.world-meter,.meter { background: #314675; border-radius: 2px; }
.world-meter span,.meter span { background: #a1f466; }
.world:nth-child(2) .world-meter span { background: #62e7ff; }
.world:nth-child(3) .world-meter span { background: #b797ff; }
.mission-panel,.guide-card,.panel { background: #142347; border-color: #405890; }
.mission-panel { border-width: 2px; }
.mission { color: #edf2ff; background: #1a2d55; border-color: #3b568e; border-radius: 5px; padding: 10px; }
.mission:hover { background: #273f70; border-color: var(--cyan); }
.mission-emoji { background: #101b35; border: 1px solid #526eaa; border-radius: 5px; }
.mission > .icon, .progress-list .tag { color: var(--cyan); }
.guide-icon { color: #e6ff93; background: #29423b; border: 1px solid #5a7d48; border-radius: 7px; }
.guide-card:nth-child(2) .guide-icon { background: #3a2c66; color: #e6d2ff; border-color: #7b60a9; }
.guide-card:nth-child(3) .guide-icon { background: #4c3b27; color: #ffe28e; border-color: #967543; }
.video-card { background: #132146; border: 2px solid #415b96; border-radius: 7px; }
.video-card video { background: #0a1530; }
.guide-example blockquote { border-color: var(--cyan); }
.section-controls select { background-color: #101d3b; color: var(--ink); border-color: #5370a8; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2362e7ff' stroke-width='2'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); color-scheme: dark; }
.level-panel { background: #25294c; border-color: #777644; }
.level-panel .meter { background: #3c4971; }
.level-panel .meter span { background: var(--green); }
.level-panel > strong { color: var(--green); }
.level-icon { background: var(--green); color: #1b2a1e; border-radius: 6px; }
.badge-card.unlocked { background: #2a3453; border-color: #b9c867; }
.badge-emblem { background: #111e3d; border-color: #697dab; }
.unlocked .badge-emblem { background: #d8f65b; border-color: #d8f65b; }
.badge-section { margin-block: 1.4rem; }
.badge-section .section-head p { margin-top: .2rem; color: var(--muted); }
.badge-card { --badge-accent: #d8f65b; }
.badge-card:nth-child(2) { --badge-accent: #62e7ff; }
.badge-card:nth-child(3) { --badge-accent: #c7adff; }
.badge-card .badge-emblem {
  position: relative;
  width: clamp(49px, 6vw, 66px);
  height: auto;
  aspect-ratio: 1;
  padding: 3px;
  border: 2px solid #738ab6;
  background: #101a34;
}
.badge-emblem img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.badge-card:not(.unlocked) .badge-emblem img { filter: saturate(.46) brightness(.72); }
.badge-card.unlocked { border-color: var(--badge-accent); }
.badge-card.unlocked .badge-emblem { border-color: var(--badge-accent); background: #172443; box-shadow: 0 0 16px #9cceff32; }
.badge-emblem .icon {
  position: absolute;
  inset: auto -.2rem -.16rem auto;
  width: 1.24rem;
  height: 1.24rem;
  padding: .15rem;
  border-radius: 50%;
  background: var(--badge-accent);
  color: #101a2c;
}
.badge-details { flex: 1; min-width: 0; }
.badge-details .meter { margin-top: .42rem; }
.badge-details .meter > span { background: var(--badge-accent); }
.progress-list .mission small { color: var(--muted); }
.earned { color: #23370d; background: #d8f65b; }
.quiz-stars { color: #f3c953; }
.footer-inner { border-color: #3a5490; }
.footer-inner a { color: var(--cyan); }
.radar-entry { margin-block: 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; background: #1d2e54; border-color: #637dba; }
.radar-entry p { margin-top: 4px; color: var(--muted); }
@media (max-width: 850px) {
  .hero { min-height: 390px; }
  .hero-copy { width: min(64%,500px); }
  .hero-art { object-position: 65% 50%; }
}
@media (max-width: 620px) {
  #contingut { padding-top: 17px; }
  .header-inner { min-height: auto; }
  .hero { display: grid; min-height: 0; }
  .hero-copy { width: 100%; padding: 21px 15px 16px; }
  .hero h1 { font-size: clamp(2rem,9vw,2.8rem); max-width: unset; }
  .hero-art { position: relative; height: 181px; z-index: -2; object-position: 82% 48%; transform: none; }
  .hero::after { inset: auto 0 158px; height: 24px; background: linear-gradient(#081632,transparent); }
  .world-art { height: 100%; min-height: 117px; }
  .world-info { border-top: 0; border-left: 1px solid #2f4e88; }
}
@media (max-width: 470px) {
  .hero .btn-row .btn { min-height: 41px; padding: 8px; font-size: .91rem; }
  .hero .btn-row { gap: 8px; }
  .hero .mission-beacon { margin-top: 10px; }
  .progress-hud { gap: .2rem; padding: .29rem .37rem .32rem; }
  .hud-readout { grid-template-columns: auto 1fr; grid-auto-flow: row; gap: .1rem .25rem; }
  .hud-readout .icon { grid-row: span 2; width: .75rem; height: .75rem; }
  .hud-level { grid-column: 2; padding: 0; border: 0; font-size: .66rem; }
}
.radar-reward { width: max-content; padding: 6px 12px; margin: 12px auto 0; background: var(--green); color: #162514; border-radius: 5px; font-weight: 900; }

.world[href] { text-decoration:none; }
.world-page-head { display:flex; align-items:center; justify-content:space-between; gap:1em; margin:.8rem 0 1.1rem; padding:clamp(.8rem,3vw,1.7rem); border:1px solid #526ba2; border-radius:10px; background:radial-gradient(ellipse at 76% 30%,#2b4275,#142043 70%); overflow:hidden; }
.world-page-head .eyebrow { color:#92eaff; }
.world-page-head h1 { font-size:clamp(1.55rem,4.3vw,3rem); margin:.35rem 0; }
.world-page-head p:not(.eyebrow) { color:#d4e1fa; font-weight:800; }
.world-page-head img { flex:none; width:clamp(82px,16vw,155px); height:auto; aspect-ratio:1; border-radius:50%; object-fit:cover; }
.episode-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr)); gap:13px; }
.episode-card { display:block; min-width:0; color:#f5f7ff; background:#17264b; border:1px solid #405e98; border-radius:8px; overflow:hidden; text-decoration:none; box-shadow:0 4px 0 #090e23; }
.episode-card:hover { border-color:#6fe7ff; background:#243964; }
.episode-preview { display:block; position:relative; background:#101b3a; aspect-ratio:16/9; overflow:hidden; }
.episode-preview img { display:block; width:100%; height:100%; object-fit:cover; }
.episode-card-play { position:absolute; right:8px; bottom:8px; display:grid; place-items:center; width:35px; height:33px; border-radius:5px; border:1px solid #627fb8; color:#9defff; background:#0a1432e8; }
.is-complete .episode-card-play { color:#d8f65b; border-color:#7d9740; }
.episode-card-body { display:block; min-width:0; padding:.55rem .7rem .7rem; }
.episode-card-body small { display:block; color:#adcaef; margin-bottom:.2rem; font-size:.85rem; }
.episode-card-body strong { display:block; line-height:1.2; overflow-wrap:anywhere; }
@media(max-width:570px) {
  .episode-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .episode-card-body { padding:.45rem .5rem .65rem; }
  .episode-card-body small { font-size:.74rem; }
}
