/*
 * AMAD Game Experience v2
 * Shared presentation shell for the hackathon production build.
 * The game engines remain owned by their existing pages.
 */
:root{
  --amad-paper:#f2efe9;
  --amad-paper-deep:#eed6c6;
  --amad-primary:#c66e4e;
  --amad-secondary:#8b84d7;
  --amad-coral:#f58e7c;
  --amad-navy:#0c2341;
  --amad-navy-soft:#183a63;
  --amad-white:#fff;
  --amad-line:rgba(12,35,65,.14);
  --amad-shadow:0 24px 70px rgba(12,35,65,.2);
  --amad-radius:24px;
}

body.amad-shell{
  --amad-safe-bottom:max(env(safe-area-inset-bottom,0px),10px);
}

body.amad-guide-open{overflow:hidden!important}
html.amad-large-text{font-size:112.5%}
html.amad-game-root{
  height:auto!important;
  min-height:100%;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  scrollbar-gutter:stable;
}
body.amad-game{
  height:auto!important;
  min-height:100dvh!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y pinch-zoom;
}
body.amad-game.amad-guide-open{overflow:hidden!important}
body.amad-high-contrast{
  --amad-paper:#fff;
  --amad-paper-deep:#f4ded0;
  --amad-primary:#983b21;
  --amad-secondary:#5147bd;
  --amad-coral:#c84d3c;
  --amad-navy:#001b39;
  --amad-navy-soft:#0c315b;
  --amad-line:rgba(0,27,57,.38);
}
body.amad-high-contrast .amad-guide__panel,
body.amad-high-contrast .amad-profile,
body.amad-high-contrast .amad-guide__step,
body.amad-high-contrast #hp-objective{
  border-width:2px;
}
body.amad-reduce-motion *,
body.amad-reduce-motion *::before,
body.amad-reduce-motion *::after{
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  scroll-behavior:auto!important;
  transition-duration:.001ms!important;
}

/* AMAD-aligned navigation without copying official brand assets. */
body.amad-shell nav.topnav{
  background:rgba(242,239,233,.94)!important;
  border-bottom:1px solid var(--amad-line)!important;
  box-shadow:0 8px 30px rgba(12,35,65,.08);
  color:var(--amad-navy);
  backdrop-filter:blur(18px) saturate(1.25)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.25)!important;
}
body.amad-shell nav.topnav .brand,
body.amad-shell nav.topnav .nav-links a{
  color:var(--amad-navy)!important;
}
body.amad-shell nav.topnav .nav-links a:hover,
body.amad-shell nav.topnav .nav-links a.active{
  color:var(--amad-primary)!important;
  background:rgba(198,110,78,.08)!important;
  border-color:rgba(198,110,78,.2)!important;
}
body.amad-shell nav.topnav .nav-cta{
  color:var(--amad-paper)!important;
  background:var(--amad-navy)!important;
  box-shadow:none!important;
}
body.amad-shell nav.topnav .nav-links a.nav-cta{
  min-height:42px;
  padding:.55rem .9rem!important;
  color:var(--amad-paper)!important;
}
body.amad-shell nav.topnav .nav-cta:hover{
  background:var(--amad-primary)!important;
}
body.amad-shell nav.topnav .brand-mark::before{
  border-color:var(--amad-primary);
  box-shadow:0 0 12px rgba(198,110,78,.28);
}
body.amad-shell nav.topnav .brand-mark::after{
  border-color:var(--amad-secondary);
  box-shadow:0 0 12px rgba(139,132,215,.28);
}
body.amad-shell nav.topnav .brand .q{
  background:linear-gradient(135deg,var(--amad-primary),var(--amad-secondary));
  -webkit-background-clip:text;
  background-clip:text;
}
body.amad-shell nav.topnav .lang-toggle,
body.amad-shell nav.topnav #btnAr,
body.amad-shell nav.topnav #btnEn{
  border-color:var(--amad-line)!important;
  background:rgba(255,255,255,.55)!important;
  color:var(--amad-navy)!important;
}
body.amad-shell nav.topnav #btnAr.active,
body.amad-shell nav.topnav #btnEn.active{
  background:var(--amad-navy)!important;
  border-color:var(--amad-navy)!important;
  color:var(--amad-paper)!important;
  box-shadow:none!important;
}
body.amad-shell nav.topnav .hamburger{
  color:var(--amad-navy);
  border:1px solid var(--amad-line);
  border-radius:11px;
  width:44px;
  height:44px;
}

.amad-participation{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  min-height:30px;
  margin-inline-start:.25rem;
  padding:.25rem .65rem;
  border:1px solid rgba(198,110,78,.24);
  border-radius:999px;
  background:linear-gradient(135deg,rgba(198,110,78,.1),rgba(139,132,215,.12));
  color:var(--amad-navy);
  font-size:.68rem;
  font-weight:800;
  white-space:nowrap;
}
.amad-participation::before{
  content:'';
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--amad-primary);
  box-shadow:0 0 0 4px rgba(198,110,78,.12);
}

.amad-guide-trigger{
  min-height:42px;
  padding:.45rem .8rem;
  border:1px solid var(--amad-line);
  border-radius:999px;
  background:var(--amad-white);
  color:var(--amad-navy);
  font:800 .76rem/1 var(--font,system-ui,sans-serif);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  white-space:nowrap;
}
.amad-guide-trigger:hover{
  border-color:var(--amad-primary);
  color:var(--amad-primary);
  transform:translateY(-1px);
}
.amad-guide-trigger:focus-visible{
  outline:3px solid var(--amad-primary);
  outline-offset:2px;
}

/* Hub */
body.amad-hub{
  --void:var(--amad-paper);
  --abyss:#ece6dd;
  --deep:#e6ddd2;
  --surface:#fff;
  --elev:#fff;
  --border:var(--amad-line);
  --border-glow:rgba(198,110,78,.36);
  --text:var(--amad-navy);
  --text-dim:rgba(12,35,65,.76);
  --text-ghost:rgba(12,35,65,.58);
  --neural:var(--amad-primary);
  --neural-bright:#a34f36;
  --violet:var(--amad-secondary);
  --violet-bright:#6c64c7;
  --emerald:#23856b;
  --amber:#a96f10;
  background:var(--amad-paper);
  color:var(--amad-navy);
}
body.amad-hub #cosmic-bg{
  background:
    radial-gradient(ellipse 52% 42% at 82% 10%,rgba(139,132,215,.22),transparent 65%),
    radial-gradient(ellipse 38% 32% at 10% 68%,rgba(245,142,124,.16),transparent 65%),
    var(--amad-paper);
}
body.amad-hub #particle-canvas{display:none}
body.amad-hub .grid-overlay{
  opacity:.18;
  background-image:
    linear-gradient(rgba(12,35,65,.09) 1px,transparent 1px),
    linear-gradient(90deg,rgba(12,35,65,.09) 1px,transparent 1px);
  background-size:72px 72px;
}
body.amad-hub main{max-width:1200px;padding-top:7rem}
body.amad-hub .glow-grad,
body.amad-hub .txt-grad{
  background:linear-gradient(135deg,var(--amad-primary),var(--amad-secondary));
  -webkit-background-clip:text;
  background-clip:text;
}
body.amad-hub .glass{
  background:rgba(255,255,255,.82);
  border-color:var(--amad-line);
  box-shadow:0 14px 42px rgba(12,35,65,.07);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
body.amad-hub .glass:hover{
  border-color:rgba(198,110,78,.42);
  box-shadow:0 20px 54px rgba(12,35,65,.12);
}
body.amad-hub .card-icon{
  background:var(--amad-navy);
  box-shadow:none;
}
body.amad-hub .pill-live{
  color:#17684f;
  background:rgba(34,197,94,.08);
  border-color:rgba(34,197,94,.24);
}
body.amad-hub .pill-prog{
  color:#8f4a34;
  background:rgba(198,110,78,.09);
  border-color:rgba(198,110,78,.25);
}
body.amad-hub .pill-spec{
  color:#5c55ad;
  background:rgba(139,132,215,.1);
  border-color:rgba(139,132,215,.28);
}

.amad-home-hero{
  min-height:auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.12fr) minmax(340px,.88fr);
  align-items:center!important;
  gap:clamp(2rem,6vw,5rem);
  padding:clamp(5rem,10vw,8rem) 0 5rem!important;
  text-align:start!important;
}
.amad-home-copy{position:relative;z-index:2}
.amad-home-kicker{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  margin-bottom:1.35rem;
  padding:.45rem .85rem;
  border:1px solid rgba(198,110,78,.25);
  border-radius:999px;
  background:rgba(255,255,255,.62);
  color:var(--amad-primary);
  font-size:.78rem;
  font-weight:800;
}
.amad-home-kicker i{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--amad-primary);
  box-shadow:0 0 0 5px rgba(198,110,78,.12);
}
.amad-home-hero h1{
  max-width:760px;
  margin:0 0 1.25rem!important;
  color:var(--amad-navy);
  font-size:clamp(2.6rem,6vw,5rem)!important;
  line-height:1.08!important;
  letter-spacing:-.04em;
}
.amad-home-hero .hero-sub{
  max-width:690px;
  margin:0 0 1.6rem!important;
  color:var(--text-dim);
  font-size:clamp(1rem,1.5vw,1.16rem);
  line-height:1.9;
}
.amad-home-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.7rem;
  margin:1.4rem 0;
}
.amad-home-actions a{
  min-height:50px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  padding:.75rem 1.25rem;
  border-radius:999px;
  border:1px solid var(--amad-line);
  font-weight:800;
  transition:transform .2s,background .2s,border-color .2s;
}
.amad-home-actions .primary{
  color:var(--amad-paper);
  background:var(--amad-navy);
  border-color:var(--amad-navy);
}
.amad-home-actions .primary:hover{
  color:var(--amad-paper);
  background:var(--amad-primary);
  border-color:var(--amad-primary);
  transform:translateY(-2px);
}
.amad-home-actions .secondary{
  color:var(--amad-navy);
  background:rgba(255,255,255,.72);
}
.amad-home-actions .secondary:hover{
  color:var(--amad-primary);
  border-color:var(--amad-primary);
}
.amad-home-trust{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  margin-top:1rem;
}
.amad-home-trust span{
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  padding:.35rem .65rem;
  border-radius:999px;
  background:rgba(255,255,255,.58);
  border:1px solid var(--amad-line);
  color:var(--text-dim);
  font-size:.72rem;
  font-weight:700;
}
.amad-claim-note{
  max-width:720px;
  margin-top:1rem;
  padding-inline-start:.8rem;
  border-inline-start:3px solid var(--amad-primary);
  color:var(--text-ghost);
  font-size:.78rem;
  line-height:1.7;
}
.amad-claim-note a{color:var(--amad-primary);font-weight:800}

.amad-home-visual{
  position:relative;
  min-height:520px;
  display:grid;
  place-items:center;
}
.amad-demo-card{
  width:min(100%,440px);
  padding:1.4rem;
  border-radius:32px;
  background:var(--amad-navy);
  color:var(--amad-paper);
  box-shadow:0 34px 90px rgba(12,35,65,.28);
  transform:rotate(-2deg);
  position:relative;
  overflow:hidden;
}
[dir="ltr"] .amad-demo-card{transform:rotate(2deg)}
.amad-demo-card::before{
  content:'';
  position:absolute;
  width:280px;
  height:280px;
  border-radius:50%;
  inset-inline-end:-120px;
  top:-120px;
  background:rgba(139,132,215,.25);
  filter:blur(8px);
}
.amad-demo-head{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1.5rem;
  font-size:.78rem;
  font-weight:800;
}
.amad-demo-head b{
  padding:.28rem .55rem;
  border-radius:999px;
  color:var(--amad-navy);
  background:var(--amad-paper);
}
.amad-demo-route{
  position:relative;
  display:grid;
  gap:.8rem;
}
.amad-demo-node{
  display:grid;
  grid-template-columns:42px 1fr auto;
  align-items:center;
  gap:.7rem;
  padding:.8rem;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(255,255,255,.06);
}
.amad-demo-node .ic{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:rgba(245,142,124,.16);
  font-size:1.25rem;
}
.amad-demo-node strong{display:block;font-size:.9rem}
.amad-demo-node small{display:block;color:rgba(242,239,233,.66);font-size:.69rem;margin-top:.15rem}
.amad-demo-node .state{color:#b8f4d4;font:800 .68rem/1 var(--mono,monospace)}
.amad-demo-link{
  width:2px;
  height:18px;
  margin:-.4rem 0 -.4rem;
  margin-inline-start:20px;
  background:linear-gradient(var(--amad-coral),var(--amad-secondary));
}
.amad-demo-foot{
  display:flex;
  justify-content:space-between;
  gap:.8rem;
  margin-top:1.1rem;
  padding-top:1rem;
  border-top:1px solid rgba(255,255,255,.12);
}
.amad-demo-foot span{font-size:.7rem;color:rgba(242,239,233,.65)}
.amad-demo-foot b{display:block;color:var(--amad-paper);font-size:1rem;margin-top:.15rem}

.amad-path{
  padding:2rem 0 1rem;
}
.amad-path-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.8rem;
}
.amad-path-step{
  min-height:190px;
  padding:1.25rem;
  border-radius:22px;
  border:1px solid var(--amad-line);
  background:rgba(255,255,255,.7);
  position:relative;
}
.amad-path-step .n{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  margin-bottom:1rem;
  border-radius:12px;
  background:var(--amad-navy);
  color:var(--amad-paper);
  font:900 .78rem/1 var(--mono,monospace);
}
.amad-path-step h3{font-size:1rem;margin-bottom:.45rem}
.amad-path-step p{color:var(--text-dim);font-size:.82rem;line-height:1.7}
.amad-path-step a{
  display:inline-flex;
  margin-top:.8rem;
  color:var(--amad-primary);
  font-size:.78rem;
  font-weight:800;
}
body.amad-hub .proof-strip{
  background:rgba(255,255,255,.62);
  border-color:var(--amad-line);
}
body.amad-hub .proof-strip .pf b{
  background:linear-gradient(135deg,var(--amad-primary),var(--amad-secondary));
  -webkit-background-clip:text;
  background-clip:text;
}
body.amad-hub .site-footer{
  color:var(--amad-navy);
  background:#e9e2d9;
  border-color:var(--amad-line);
}

/* Guided launchpad */
.amad-guide[hidden]{display:none!important}
.amad-guide{
  position:fixed;
  inset:0;
  z-index:20000;
  display:grid;
  place-items:center;
  padding:clamp(.7rem,2vw,1.5rem);
  background:
    radial-gradient(ellipse 54% 44% at 82% 10%,rgba(139,132,215,.3),transparent 65%),
    radial-gradient(ellipse 42% 34% at 10% 90%,rgba(245,142,124,.2),transparent 70%),
    rgba(242,239,233,.98);
  color:var(--amad-navy);
  overflow-y:auto;
  opacity:0;
  visibility:hidden;
  transition:opacity .22s ease,visibility .22s ease;
}
.amad-guide.is-open{opacity:1;visibility:visible}
.amad-guide__panel{
  width:min(1040px,100%);
  max-height:min(92dvh,900px);
  overflow:auto;
  border:1px solid var(--amad-line);
  border-radius:clamp(20px,3vw,34px);
  background:rgba(255,255,255,.9);
  box-shadow:var(--amad-shadow);
  position:relative;
}
.amad-guide__panel:focus{outline:none}
.amad-guide__bar{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  min-height:64px;
  padding:.75rem 1rem;
  border-bottom:1px solid var(--amad-line);
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.amad-guide__brand{
  display:flex;
  align-items:center;
  gap:.65rem;
  font-size:.78rem;
  font-weight:900;
}
.amad-guide__brand i{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--amad-navy);
  color:var(--amad-paper);
  font-style:normal;
}
.amad-guide__close{
  width:44px;
  height:44px;
  border:1px solid var(--amad-line);
  border-radius:50%;
  background:var(--amad-paper);
  color:var(--amad-navy);
  cursor:pointer;
  font-size:1.05rem;
}
.amad-guide__close:hover{color:var(--amad-primary);border-color:var(--amad-primary)}
.amad-guide__body{padding:clamp(1.1rem,3vw,2.25rem)}
.amad-guide__hero{
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(300px,.92fr);
  gap:clamp(1.25rem,4vw,3rem);
  align-items:start;
}
.amad-guide__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  margin-bottom:.75rem;
  color:var(--amad-primary);
  font-size:.75rem;
  font-weight:900;
}
.amad-guide__copy h1{
  margin:0 0 .75rem;
  color:var(--amad-navy);
  font-size:clamp(1.9rem,4vw,3.4rem);
  line-height:1.1;
  letter-spacing:-.035em;
}
.amad-guide__promise{
  max-width:660px;
  color:rgba(12,35,65,.78);
  font-size:.98rem;
  line-height:1.85;
}
.amad-guide__mapping{
  margin-top:1rem;
  padding:.9rem 1rem;
  border-inline-start:4px solid var(--amad-primary);
  border-radius:14px;
  background:rgba(238,214,198,.45);
  color:rgba(12,35,65,.8);
  font-size:.8rem;
  line-height:1.7;
}
.amad-guide__steps{
  list-style:none;
  display:grid;
  gap:.55rem;
}
.amad-guide__step{
  display:grid;
  grid-template-columns:38px 1fr;
  gap:.75rem;
  padding:.75rem;
  border:1px solid var(--amad-line);
  border-radius:16px;
  background:rgba(242,239,233,.62);
}
.amad-guide__step .n{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--amad-navy);
  color:var(--amad-paper);
  font:900 .75rem/1 var(--mono,monospace);
}
.amad-guide__step strong{display:block;font-size:.86rem;margin-bottom:.18rem}
.amad-guide__step span{display:block;color:rgba(12,35,65,.68);font-size:.75rem;line-height:1.55}
.amad-guide__step.is-current{
  border-color:rgba(198,110,78,.45);
  background:rgba(245,142,124,.1);
}
.amad-guide__step.is-current .n{background:var(--amad-primary)}
.amad-guide__step.is-done{opacity:.58}
.amad-guide__step.is-done .n{background:#23856b}
.amad-guide__section{
  margin-top:1.5rem;
  padding-top:1.25rem;
  border-top:1px solid var(--amad-line);
}
.amad-guide__section h2{
  margin:0 0 .75rem;
  color:var(--amad-navy);
  font-size:.9rem;
}
.amad-profiles{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.65rem;
}
.amad-profile{
  min-height:118px;
  padding:.9rem;
  text-align:start;
  border:1px solid var(--amad-line);
  border-radius:17px;
  background:rgba(242,239,233,.55);
  color:var(--amad-navy);
  cursor:pointer;
}
.amad-profile:hover{border-color:var(--amad-secondary)}
.amad-profile[aria-checked="true"]{
  border-color:var(--amad-primary);
  background:rgba(198,110,78,.09);
  box-shadow:inset 0 0 0 1px rgba(198,110,78,.18);
}
.amad-profile b{display:block;font-size:.86rem;margin-bottom:.3rem}
.amad-profile small{display:block;color:rgba(12,35,65,.66);font-size:.72rem;line-height:1.55}
.amad-preferences{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}
.amad-pref{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.55rem .75rem;
  border:1px solid var(--amad-line);
  border-radius:999px;
  background:rgba(242,239,233,.55);
  font-size:.74rem;
  font-weight:800;
  cursor:pointer;
}
.amad-pref input{width:18px;height:18px;accent-color:var(--amad-primary)}
.amad-guide__quick{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}
.amad-guide__quick button,
.amad-guide__quick a{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  padding:.55rem .8rem;
  border:1px solid var(--amad-line);
  border-radius:999px;
  background:var(--amad-white);
  color:var(--amad-navy);
  font:800 .74rem/1 var(--font,system-ui,sans-serif);
  cursor:pointer;
}
.amad-guide__quick button:hover,
.amad-guide__quick a:hover{color:var(--amad-primary);border-color:var(--amad-primary)}
.amad-game-switcher{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
}
.amad-game-switcher a{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.5rem .7rem;
  border:1px solid var(--amad-line);
  border-radius:12px;
  background:rgba(242,239,233,.55);
  color:var(--amad-navy);
  font-size:.73rem;
  font-weight:800;
}
.amad-game-switcher a[aria-current="page"]{
  color:var(--amad-paper);
  background:var(--amad-navy);
  border-color:var(--amad-navy);
}
.amad-guide__footer{
  position:sticky;
  bottom:0;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.8rem;
  padding:.85rem 1rem calc(.85rem + env(safe-area-inset-bottom,0px));
  border-top:1px solid var(--amad-line);
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.amad-guide__actions{display:flex;flex-wrap:wrap;gap:.55rem}
.amad-guide__actions button{
  min-height:48px;
  padding:.7rem 1.1rem;
  border:1px solid var(--amad-line);
  border-radius:999px;
  font:900 .82rem/1 var(--font,system-ui,sans-serif);
  cursor:pointer;
}
.amad-guide__start{
  color:var(--amad-paper);
  background:var(--amad-navy);
  border-color:var(--amad-navy)!important;
}
.amad-guide__start:hover{background:var(--amad-primary);border-color:var(--amad-primary)!important}
.amad-guide__later{color:var(--amad-navy);background:var(--amad-paper)}
.amad-guide__boundary{
  max-width:420px;
  color:rgba(12,35,65,.58);
  font-size:.65rem;
  line-height:1.5;
  text-align:end;
}

/* Compact next-action guidance inside the existing objective HUD. */
body.amad-game #hp-objective{
  top:88px;
  max-width:min(620px,calc(100vw - 24px));
  border-color:rgba(245,142,124,.44);
}
.amad-next-action{
  min-height:31px;
  display:flex;
  align-items:center;
  gap:.45rem;
  padding:.28rem .42rem;
  border-radius:9px;
  background:rgba(245,142,124,.09);
  border:1px solid rgba(245,142,124,.2);
  color:#f5e7df;
  font-size:.7rem;
  line-height:1.25;
}
.amad-next-action__index{
  flex:0 0 auto;
  color:#ffd7ca;
  font:900 .65rem/1 var(--mono,monospace);
}
.amad-next-action__text{
  flex:1;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.amad-next-action button{
  width:28px;
  height:28px;
  min-height:28px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.14);
  border-radius:50%;
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
}
.amad-guided-target{
  outline:3px solid var(--amad-coral)!important;
  outline-offset:4px!important;
  box-shadow:0 0 0 7px rgba(245,142,124,.18),0 0 24px rgba(245,142,124,.32)!important;
}
canvas.amad-guided-target{border-color:var(--amad-coral)!important}

/* Remove duplicate floating control families. Essential actions remain in each game. */
body.amad-shell .game-rose,
body.amad-game .gx-cluster,
body.amad-game .gx-mini,
body.amad-game .gx-fab,
body.amad-game .gx-dpad{
  display:none!important;
}
body.amad-game[data-game-id="q6-cross-shard"] .shell .mascots,
body.amad-game[data-game-id="q6-cross-shard"] #fs-ticker{
  display:none!important;
}
body.amad-hub .mobile-cta{display:none!important}
body.amad-hub{padding-bottom:0!important}
body.amad-game .cta-strip,
body.amad-game .arena-banner,
body.amad-game .mode-banner,
body.amad-game .controls-bar,
body.amad-game #formal-spec{
  display:none!important;
}
body.amad-game[data-game-id="q6-nexus"] #btn-help{display:none!important}

/* Play: expose the route lesson, all six bit choices, powers, and actions in one dock. */
#amad-play-dock{
  position:fixed;
  left:50%;
  bottom:calc(var(--amad-safe-bottom) + 4px);
  transform:translateX(-50%);
  z-index:7350;
  width:min(820px,calc(100vw - 24px));
  display:grid;
  grid-template-columns:auto auto minmax(0,1fr);
  grid-template-areas:
    "route route route"
    "mode powers actions";
  align-items:center;
  gap:.45rem .65rem;
  padding:.5rem;
  overflow:hidden;
  border:1px solid rgba(245,142,124,.3);
  border-radius:20px;
  background:rgba(12,35,65,.95);
  box-shadow:0 -12px 40px rgba(0,0,0,.32);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  pointer-events:auto;
}
#amad-play-route-panel{
  grid-area:route;
  position:static!important;
  width:100%;
  min-width:0;
  margin:0!important;
  padding:.45rem!important;
  overflow:visible!important;
  border:1px solid rgba(125,240,255,.18)!important;
  border-radius:14px!important;
  background:rgba(2,6,19,.34)!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
#amad-play-route-panel > div:first-child{
  display:flex!important;
  min-height:34px;
  padding:0 .2rem .38rem;
}
#amad-play-route-panel > div:first-child > div:last-child{display:none!important}
#amad-play-route-panel #bit-pad{
  position:static!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  transform:none!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:.4rem!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  animation:none!important;
}
#amad-play-route-panel #bit-pad .bit{
  width:auto!important;
  min-width:0!important;
  height:54px!important;
  min-height:54px!important;
  padding:1rem .25rem .35rem!important;
  border-radius:11px!important;
  font-size:.96rem!important;
}
#amad-play-route-panel #bit-pad .bit .ix{font-size:.5rem}
#amad-play-route-panel #bit-pad .bit .kh{font-size:.68rem}
#amad-play-route-panel #bit-pad .bit .mk{font-size:.75rem}
#amad-play-dock .mode-toggle{
  grid-area:mode;
  position:static!important;
  inset:auto!important;
  transform:none!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center;
  min-width:max-content;
  background:rgba(2,6,19,.34)!important;
  border:1px solid rgba(125,240,255,.18)!important;
  border-radius:12px!important;
  box-shadow:none!important;
  animation:none!important;
}
#amad-play-dock .mode-toggle button{
  min-height:44px!important;
  padding:.4rem .65rem!important;
}
#amad-play-dock .powerups,
#amad-play-dock #fs-fab{
  position:static!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  transform:none!important;
  margin:0!important;
  animation:none!important;
  flex-direction:row!important;
  align-items:center;
  gap:.4rem!important;
}
body[data-mode="simple"] #amad-play-dock .powerups{
  grid-area:powers;
  display:flex!important;
  flex:0 1 auto;
  padding-inline-end:.65rem;
  border-inline-end:1px solid rgba(255,255,255,.13);
}
body:not([data-mode="simple"]) #amad-play-dock .powerups{display:none!important}
body:not([data-mode="simple"]) #amad-play-dock{
  grid-template-columns:1fr;
  grid-template-areas:
    "route"
    "mode"
    "actions";
}
#amad-play-dock #fs-fab{
  grid-area:actions;
  display:flex!important;
  flex:0 1 auto;
  justify-content:center;
  min-width:0;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
#amad-play-dock .powerups .pu,
#amad-play-dock #fs-fab button{
  flex:0 0 48px;
  width:48px!important;
  min-width:48px!important;
  height:48px!important;
  min-height:48px!important;
  padding:.3rem!important;
  border-radius:14px!important;
  font-size:1.15rem!important;
}
#amad-play-dock #fs-fab button#fs-fab-finalize{
  flex-basis:56px;
  width:56px!important;
  min-width:56px!important;
  height:56px!important;
  min-height:56px!important;
  font-size:1.45rem!important;
}
body.amad-play-challenge-active #hp-objective{display:none!important}
body.amad-play-challenge-active #hp-toast-stack{display:none!important}
body.amad-play-challenge-active .shell .hud,
body.amad-play-challenge-active .shell .xp-hud,
body.amad-play-challenge-active #fs-status,
body.amad-play-challenge-active #fs-spec-toggle{
  visibility:hidden!important;
  pointer-events:none!important;
}
body.amad-game[data-game-id="q6-cross-shard"] #challenge{
  position:fixed!important;
  top:auto!important;
  right:auto!important;
  bottom:calc(var(--amad-safe-bottom) + var(--amad-play-dock-height,150px) + 12px)!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  z-index:7450;
  width:min(520px,calc(100vw - 24px));
  max-height:calc(100dvh - var(--fs-nav-h,74px) - var(--amad-play-dock-height,150px) - 34px);
  margin:0!important;
  overflow-y:auto;
  background:rgba(7,12,28,.98);
  border-style:solid;
  box-shadow:0 16px 48px rgba(0,0,0,.48),0 0 24px rgba(125,240,255,.14);
}

@media (min-width:821px){
  body.amad-game .gx-help{display:none!important}
}
@media (max-width:820px){
  body.amad-game.game-active .gx-help{
    display:flex!important;
    max-height:48dvh;
    background:rgba(12,35,65,.98)!important;
    border-color:rgba(245,142,124,.34)!important;
  }
  body.amad-game.game-active .gx-help #gx-help-body > h4,
  body.amad-game.game-active .gx-help #gx-help-body > p,
  body.amad-game.game-active .gx-help #gx-help-body > .gx-help__hint{
    display:none!important;
  }
  body.amad-game.game-active .gx-help__title{
    color:#ffd7ca!important;
  }
}

/* Nexus lobby: the shared objective appears only after a mission starts. */
body.amad-game[data-game-id="q6-nexus"]:not(.game-active) .nexus-hero{
  padding-top:2rem;
  margin-bottom:2.5rem;
}
body.amad-game[data-game-id="q6-nexus"]:not(.game-active) .nexus-hero h1{
  max-width:980px;
  margin-inline:auto;
  font-size:clamp(2.2rem,6vw,4.4rem);
}
body.amad-game[data-game-id="q6-nexus"]:not(.game-active) .nexus-hero .sub{
  max-width:760px;
  margin-inline:auto;
}
body.amad-game[data-game-id="q6-arena"].game-active main#arena > section.block{
  padding-top:0!important;
}
body.amad-game[data-game-id="q6-arena"].game-active main#arena > section.block > .sec-head{
  display:none!important;
}

/* Training game: one stats strip, one stage, one bottom action dock. */
#amad-training-stats{
  position:fixed;
  top:204px;
  left:50%;
  transform:translateX(-50%);
  width:min(980px,calc(100vw - 24px));
  z-index:7200;
  display:grid;
  grid-template-columns:minmax(280px,.85fr) minmax(360px,1.15fr);
  gap:.5rem;
  pointer-events:none;
}
#amad-training-stats #tm-status,
#amad-training-stats #tm-metrics{
  position:static!important;
  inset:auto!important;
  min-width:0!important;
  width:auto!important;
  pointer-events:auto;
}
#amad-training-stats #tm-status .head{margin-bottom:.3rem}
#amad-training-stats #tm-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.35rem;
}
#amad-training-stats #tm-metrics .metric{
  min-width:0;
  flex-direction:column;
  justify-content:center;
  gap:.08rem;
  padding:.3rem;
  text-align:center;
  border:0!important;
  border-radius:10px;
  background:rgba(255,255,255,.03);
  line-height:1.15;
}

#amad-training-dock{
  position:fixed;
  left:50%;
  bottom:calc(var(--amad-safe-bottom) + 4px);
  transform:translateX(-50%);
  width:min(1060px,calc(100vw - 20px));
  z-index:7300;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.65rem;
  padding:.55rem;
  border:1px solid rgba(245,142,124,.28);
  border-radius:20px;
  background:rgba(12,35,65,.95);
  box-shadow:0 -12px 40px rgba(0,0,0,.32);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
#amad-training-dock #tm-axes,
#amad-training-dock #tm-actions{
  position:static!important;
  inset:auto!important;
  transform:none!important;
}
#amad-training-dock #tm-axes{
  flex:1;
  min-width:0;
  display:flex!important;
  align-items:center;
  gap:.35rem;
  overflow-x:auto;
  padding:.35rem!important;
  scrollbar-width:thin;
}
#amad-training-dock #tm-axes button{
  flex:0 0 48px;
  width:48px!important;
  height:48px!important;
  border-radius:13px!important;
}
#amad-training-dock #tm-actions{
  display:flex!important;
  flex-direction:row!important;
  gap:.4rem!important;
  padding-inline-start:.65rem;
  border-inline-start:1px solid rgba(255,255,255,.12);
}
#amad-training-dock #tm-actions button{
  width:50px!important;
  height:50px!important;
  border-radius:14px!important;
  font-size:1.15rem!important;
}
#amad-training-dock #tm-actions button.primary{
  width:56px!important;
  height:56px!important;
}
body.amad-game[data-game-id="lcns-training"] #tm-stage{
  min-height:100dvh!important;
  padding:305px 24px 110px!important;
}
body.amad-game[data-game-id="lcns-training"] #hp-objective .hp-meta{display:none!important}
body.amad-game[data-game-id="lcns-training"] main#training-game{
  max-width:none!important;
  min-height:100dvh!important;
  margin:0!important;
  padding:0!important;
}
body.amad-game[data-game-id="lcns-training"] #tm-canvas{
  max-width:none!important;
  max-height:none!important;
}
body.amad-game[data-game-id="lcns-training"] #tm-ticker,
body.amad-game[data-game-id="lcns-training"] #tm-credit,
body.amad-game[data-game-id="lcns-training"] #tm-help{
  display:none!important;
}
body.amad-game[data-game-id="lcns-training"] #hp-toast-stack{
  top:auto!important;
  bottom:100px!important;
}

@media (max-width:980px){
  .amad-path-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .amad-home-hero{grid-template-columns:1fr;padding-top:5.5rem!important}
  .amad-home-visual{min-height:460px}
  .amad-guide__hero{grid-template-columns:1fr}
}

@media (max-width:720px){
  body.amad-shell nav.topnav .nav-inner{gap:.35rem}
  body.amad-shell nav.topnav .brand{font-size:.94rem}
  .amad-participation .long{display:none}
  .amad-participation{padding:.22rem .48rem}
  .amad-guide-trigger{width:42px;padding:0}
  .amad-guide-trigger .label{display:none}
  body.amad-shell nav.topnav .lang-toggle button,
  body.amad-shell nav.topnav #btnAr,
  body.amad-shell nav.topnav #btnEn{
    padding:.32rem .45rem!important;
  }

  .amad-home-hero{padding:4.6rem 0 3rem!important}
  .amad-home-hero h1{font-size:clamp(2.15rem,10.8vw,3.35rem)!important}
  .amad-home-visual{min-height:420px}
  .amad-demo-card{transform:none!important}
  .amad-path-grid{grid-template-columns:1fr}
  .amad-path-step{min-height:auto}

  .amad-guide{padding:0;place-items:stretch}
  .amad-guide__panel{
    width:100%;
    min-height:100dvh;
    max-height:none;
    border:0;
    border-radius:0;
  }
  .amad-guide__bar{min-height:58px}
  .amad-guide__body{padding:1rem}
  .amad-guide__copy h1{font-size:2rem}
  .amad-profiles{grid-template-columns:1fr}
  .amad-profile{min-height:auto}
  .amad-guide__footer{
    align-items:stretch;
    flex-direction:column;
  }
  .amad-guide__actions{display:grid;grid-template-columns:1fr 1fr}
  .amad-guide__actions button{width:100%}
  .amad-guide__boundary{text-align:start;max-width:none}

  body.amad-game #hp-objective{
    top:80px;
    min-width:calc(100vw - 16px);
    max-width:calc(100vw - 16px);
    padding:.42rem .55rem .48rem;
    gap:.28rem;
  }
  body.amad-game #hp-objective .hp-meta{display:none}
  body.amad-game #hp-objective .hp-row{font-size:.72rem}
  body.amad-game #hp-objective .hp-bar{height:4px}
  .amad-next-action{min-height:28px;font-size:.66rem}

  #amad-play-dock{
    width:calc(100vw - 16px);
    grid-template-columns:1fr;
    grid-template-areas:
      "route"
      "mode"
      "powers"
      "actions";
    gap:.35rem;
    padding:.4rem;
    border-radius:17px;
  }
  #amad-play-route-panel{
    padding:.38rem!important;
  }
  #amad-play-route-panel > div:first-child{
    min-height:29px;
    padding:0 .1rem .3rem;
  }
  #amad-play-route-panel > div:first-child > div:first-child > div:first-child{font-size:.78rem!important}
  #amad-play-route-panel > div:first-child > div:first-child > div:last-child{font-size:.64rem!important}
  #amad-play-route-panel #bit-pad{gap:.28rem!important}
  #amad-play-route-panel #bit-pad .bit{
    height:48px!important;
    min-height:48px!important;
    padding:.9rem .15rem .3rem!important;
    font-size:.85rem!important;
  }
  #amad-play-dock .mode-toggle{
    width:100%;
    justify-content:center;
  }
  body[data-mode="simple"] #amad-play-dock .powerups{
    width:100%;
    justify-content:center;
    padding:0 0 .35rem!important;
    border-inline-end:0;
    border-bottom:1px solid rgba(255,255,255,.13);
  }
  #amad-play-dock #fs-fab{
    width:100%;
    justify-content:flex-start;
    overflow-x:auto;
    padding:.1rem;
    scrollbar-width:thin;
    scroll-snap-type:x proximity;
  }
  #amad-play-dock #fs-fab button{scroll-snap-align:center}
  body.amad-game[data-game-id="q6-cross-shard"] #challenge{
    width:calc(100vw - 16px);
    padding:.7rem;
    font-size:.8rem;
  }

  #amad-training-stats{
    top:176px;
    width:calc(100vw - 16px);
    grid-template-columns:1fr;
    gap:.3rem;
  }
  #amad-training-stats #tm-status,
  #amad-training-stats #tm-metrics{
    padding:.3rem .4rem!important;
  }
  #amad-training-stats #tm-status .head{display:none!important}
  #amad-training-stats #tm-status .grid{gap:.25rem!important}
  #amad-training-stats #tm-status .cell{padding:.18rem .25rem!important}
  #amad-training-stats #tm-status .cell b{font-size:.78rem!important}
  #amad-training-stats #tm-status .cell span{font-size:.49rem!important;margin-top:0!important}
  #amad-training-stats #tm-metrics .metric{font-size:.5rem!important;padding:.18rem!important}
  #amad-training-stats #tm-metrics .metric .v{font-size:.66rem!important}

  #amad-training-dock{
    flex-direction:column;
    align-items:stretch;
    gap:.35rem;
    padding:.4rem;
    border-radius:17px;
  }
  #amad-training-dock #tm-axes{width:100%}
  #amad-training-dock #tm-axes button{
    flex-basis:44px;
    width:44px!important;
    height:44px!important;
  }
  #amad-training-dock #tm-actions{
    width:100%;
    justify-content:center!important;
    padding:.35rem 0 0!important;
    border-inline-start:0;
    border-top:1px solid rgba(255,255,255,.12);
  }
  #amad-training-dock #tm-actions button{
    width:46px!important;
    height:46px!important;
  }
  #amad-training-dock #tm-actions button.primary{
    width:52px!important;
    height:52px!important;
  }
  body.amad-game[data-game-id="lcns-training"] #tm-stage{
    padding:280px 10px 170px!important;
  }
  body.amad-game[data-game-id="lcns-training"] #hp-toast-stack{
    bottom:170px!important;
  }
}

@media (max-width:430px){
  .amad-participation{display:none}
  .amad-home-actions{display:grid}
  .amad-home-actions a{width:100%}
  .amad-demo-card{padding:1rem;border-radius:24px}
  .amad-demo-node{grid-template-columns:38px 1fr;padding:.65rem}
  .amad-demo-node .ic{width:38px;height:38px}
  .amad-guide__quick{display:grid;grid-template-columns:1fr}
  .amad-guide__quick button,
  .amad-guide__quick a{width:100%}
  #amad-play-dock{
    width:calc(100vw - 8px);
    padding:.25rem;
    grid-template-columns:auto minmax(0,1fr);
    grid-template-areas:
      "route route"
      "mode powers"
      "actions actions";
  }
  #amad-play-route-panel{padding:.22rem!important}
  #amad-play-route-panel #bit-pad{gap:.15rem!important}
  #amad-play-dock .mode-toggle button{
    width:44px;
    min-width:44px;
    padding:.3rem!important;
    font-size:1rem!important;
  }
  #amad-play-dock .mode-toggle button span{display:none!important}
  body[data-mode="simple"] #amad-play-dock .powerups{
    width:auto;
    padding:0!important;
    padding-inline-start:.25rem!important;
    border:0;
    border-inline-start:1px solid rgba(255,255,255,.13);
  }
  #amad-play-dock .powerups .pu,
  #amad-play-dock #fs-fab button{
    flex-basis:44px;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
  }
  #amad-play-dock #fs-fab button#fs-fab-finalize{
    flex-basis:50px;
    width:50px!important;
    min-width:50px!important;
    height:50px!important;
    min-height:50px!important;
  }
  #amad-play-route-panel #bit-pad .bit{
    height:44px!important;
    min-height:44px!important;
    font-size:.78rem!important;
  }
}

@media (max-height:650px){
  body.amad-game[data-game-id="q6-cross-shard"] #hp-toast-stack .hp-toast[data-kind="info"]{
    display:none!important;
  }
  #amad-play-route-panel > div:first-child{display:none!important}
  #amad-play-route-panel #bit-pad .bit{
    height:44px!important;
    min-height:44px!important;
  }
  #amad-play-dock .powerups .pu,
  #amad-play-dock #fs-fab button{
    height:44px!important;
    min-height:44px!important;
  }
  #amad-play-dock #fs-fab button#fs-fab-finalize{
    height:48px!important;
    min-height:48px!important;
  }
  body.amad-game[data-game-id="q6-cross-shard"] #challenge{
    padding:.6rem;
    font-size:.76rem;
  }
}

@media (max-height:650px) and (min-width:721px){
  #amad-play-dock{
    width:calc(100vw - 8px);
    grid-template-columns:minmax(270px,1fr) auto auto auto;
    grid-template-areas:"route mode powers actions";
    gap:.15rem;
    padding:.2rem;
  }
  #amad-play-route-panel{padding:.15rem!important}
  #amad-play-route-panel #bit-pad{gap:.04rem!important}
  #amad-play-route-panel #bit-pad .bit{
    height:44px!important;
    min-height:44px!important;
  }
  #amad-play-dock .mode-toggle button{
    width:44px;
    min-width:44px;
    padding:.3rem!important;
    font-size:1rem!important;
  }
  #amad-play-dock .mode-toggle button span{display:none!important}
  body[data-mode="simple"] #amad-play-dock .powerups{
    width:auto;
    padding:0 .2rem!important;
    border:0;
    border-inline-start:1px solid rgba(255,255,255,.13);
    border-inline-end:1px solid rgba(255,255,255,.13);
  }
  #amad-play-dock .powerups .pu,
  #amad-play-dock #fs-fab button{
    flex-basis:44px;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
  }
  #amad-play-dock #fs-fab button#fs-fab-finalize{
    flex-basis:48px;
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    min-height:48px!important;
  }
  body.amad-game[data-game-id="q6-cross-shard"] #challenge{
    right:auto!important;
    left:auto!important;
    inset-inline-end:12px!important;
    width:min(520px,calc(100vw - 324px));
    transform:none!important;
  }
}

@media (max-height:650px){
  body.amad-game[data-game-id="lcns-training"]{overflow-y:auto!important}
  body.amad-game[data-game-id="lcns-training"] main#training-game{
    position:relative;
    min-height:720px!important;
    overflow:visible!important;
  }
  body.amad-game[data-game-id="lcns-training"] #hp-objective{
    top:76px;
    padding:.32rem .55rem .38rem;
    gap:.22rem;
  }
  body.amad-game[data-game-id="lcns-training"] #hp-objective .hp-meta,
  body.amad-game[data-game-id="lcns-training"] #hp-objective .amad-next-action{
    display:none!important;
  }
  body.amad-game[data-game-id="lcns-training"] #hp-objective .hp-bar{height:3px}
  #amad-training-stats{
    position:absolute;
    top:132px;
    width:min(760px,calc(100vw - 20px));
    grid-template-columns:1fr;
  }
  #amad-training-stats #tm-status{display:none!important}
  #amad-training-stats #tm-metrics{
    padding:.3rem .45rem!important;
  }
  #amad-training-dock{
    position:absolute;
    bottom:10px;
  }
  body.amad-game[data-game-id="lcns-training"] #tm-stage{
    min-height:720px!important;
    padding:205px 24px 110px!important;
  }
  body.amad-game[data-game-id="lcns-training"] #hp-toast-stack{
    position:absolute;
    bottom:94px!important;
  }
}

@media (max-width:720px) and (max-height:650px){
  #amad-training-stats{top:145px}
  body.amad-game[data-game-id="lcns-training"] #tm-stage{
    padding:210px 10px 185px!important;
  }
  body.amad-game[data-game-id="lcns-training"] #hp-toast-stack{
    bottom:152px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  .amad-guide,
  .amad-guide-trigger,
  .amad-home-actions a{transition:none!important}
}
