   :root {
      --bg: #1D2736;/* BB purple #1f1a23;*/
      --bg-dark: #1E222C;/* BB darker purple*/
      --bg-blue-light: #303E5A; /* BB slightly lighter#161617;*/
      --bg-blue-medium: #242F44; /* BB slightly lighter#161617;*/
      --bg-blue-dark: #1C2535; /* BB slightly lighter#161617;*/
      --card: #1c1c1f;
      --text: #e9e9ee;
      --muted: #a4a4ad;
      --line: #303E5A;
      --accent: #FFFF7D; /* brighter than accent2 */
      --accent-2: #FFFF37; /*#B4A3FF; */ 
      --green: #22c55e;
	  --purple: #9b6bff;
	  --red: #ef4444;
      --danger: #ef4444;
      --radius: 6px;
      --shadow: 0 6px 24px rgba(0,0,0,.4);
      --maxw: 1340px;
      --sidew: 220px;
      --sidew-collapsed: 72px;
      --header-h: 56px;
	  --theme: #FFFF37; /* yellow #B4A3FF; */
	  --ui-text-size: 13px; 
	  --card-min: 160px;
	  --card-max: 220px;
	  --grid-gap: 16px;
	  --grid-gap-y: 28px;
	  
	  --cta-bg: rgba(155,107,255,.22);
	  --cta-border: rgba(180,163,255,.55);
	  --cta-text: #fff;
	  --cta-bg-hover: rgba(155,107,255,.32);

	  --cta2-bg: rgba(0,0,0,.35);
	  --cta2-border: rgba(255,255,255,.25);
	  --cta2-text: #e9e9ee;
	  --cta2-bg-hover: rgba(0,0,0,.68);
	  
	  --cta-focus: var(--accent, #f6ccff);
    }
	
	
	
	@media (max-width: 520px) {
	  :root {
		--grid-gap: 10px;
	  }
	}
	
	/* Inter variable (roman only), latin subset */
	@font-face {
	  font-family: "Inter";
	  src: url("/revive/fonts/inter-var-latin.woff2") format("woff2-variations");
	  font-weight: 100 900;
	  font-style: normal;
	  font-display: swap;
	  unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+FEFF, U+FFFD;
	}

	/* Metrics-matched fallback to avoid layout shift during swap */
	@font-face {
	  font-family: "Inter Fallback";
	  src: local("Arial");
	  ascent-override: 90%;
	  descent-override: 22%;
	  line-gap-override: 0%;
	  size-adjust: 107%;
	}
	
	/* SN Pro Heavy – display / headings */
	@font-face {
	  font-family: "SN Pro";
	  src: url("/revive/fonts/SNPro-Heavy.woff2") format("woff2");
	  font-weight: 900;          /* or 900 if it’s really black */
	  font-style: normal;
	  font-display: swap;
	}

	:root{
		--font-sans:Inter,"Inter Fallback",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
	    --font-hdr: "SN Pro", Inter,"Inter Fallback",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
	}




    * { box-sizing: border-box; }
	
    html, body { height: 100%; }
	
    body {
      margin: 0; 
	  background: var(--bg); 
	  color: var(--text);
      font-family: var(--font-sans);
      line-height: 1.45;
	  /* allow browsers to synthesize italic */
	  font-synthesis-style: auto; 
	  font-synthesis-weight: none;
    }
	

    /* Header */
    .header {
      position: sticky; top: 0; z-index: 60;
      background: var(--bg-blue-medium); 
      backdrop-filter: saturate(140%) blur(10px);
      border-bottom: 1px solid var(--line);
    }
    .bar {
      max-width: calc(var(--maxw) + var(--sidew));
      margin: 0 auto; padding: 0px 0px; display: grid; align-items: center; gap: 12px;
      grid-template-columns: auto 1fr auto; /* logo | search | nav/hamburger */
      min-height: var(--header-h);
    }



	.meta :is(h1,h2,h3,h4,h5,h6).title {
	  margin: 0;
	  font-size: 16px;
	  font-weight: 700;
	  line-height: 1.3;
	  display: block;
	  overflow: hidden;
	  text-overflow: ellipsis;
	  white-space: nowrap;
	}
	
	h1, h2 {
	font-family: var(--font-hdr);
	}
	
	.subtitle {
	font-family: var(--font-hdr);
	}
	
	a{color:inherit;text-decoration:underline;text-underline-offset:2px}
	a:hover{color:var(--text)}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--theme);
  transition: color 0.25s ease, transform 0.25s ease;
  transform: scale(0.8);        /* 👈 80 % size */
  transform-origin: center;/* keep aligned with header left edge */
}


/* Inline SVG or text inside */
.logo svg,
.logo .logo-mark {
  fill: currentColor;
  color: inherit;
  transition: color 0.25s ease;
}

/* Hover — just brighten / shift color */
.logo:hover {
  color: var(--accent);  /* brighter variant */
  transform: scale(0.84);
}


/* Optional: subtle active press feedback */
.logo:active {
  transform: scale(0.98);
}




/* The hero keeps the game’s aspect ratio; width is clamped by a CSS var */
.card.card--start .hero-media .wide {
  --hero-max-w: 988px;              /* you can overwrite from PHP via inline style */
  --hero-ar: 4/3;                   /* fallback; JS sets this from data-ideal-* */
  width: min(100%, var(--hero-max-w));
  aspect-ratio: var(--hero-ar);
  position: relative;
}

.game-frame,
.game-frame > object,
.game-frame > embed,
#gameObjE {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Let the main layout adapt to the hero width */
.layout {
  display: block;
  max-width: none;
  margin: 18px 0 64px;
  padding: 0 16px;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .col-right { order: 2; }
}




#page-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--accent-2) 0%,
    rgba(180,163,255,0.6) 40%,
    rgba(180,163,255,0.2) 75%,
    rgba(0,0,0,0) 100%
  );
  transition: width 0.3s ease;
  z-index: 9999;
}


#page-progress{
  position:fixed;
  left:0;
  right:0;
  /* sit below the notch / UI */
  top:calc(env(safe-area-inset-top, 0) + 0px);

  height:3px;
  width:0%;
  pointer-events:none;
  z-index:2147483647;          /* make sure we're on top of everything */
  will-change: width;
  backface-visibility:hidden;
  transform:translateZ(0);     /* force compositing layer on iOS */

  /* your no-glow violet gradient */
  background: linear-gradient(
    90deg,
    var(--accent-2) 0%,
    rgba(180,163,255,0.6) 40%,
    rgba(180,163,255,0.2) 75%,
    rgba(0,0,0,0) 100%
  );
  transition: width .3s ease;
}




    .search { position: relative; top:8px;}
    .search-input {
      width: 100%; padding: 12px 44px 12px 44px; border-radius: 999px; border: 1px solid var(--line);
      background: var(--bg-blue-light); color: var(--text); outline: none; font-size: 15px;
    }
    .search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: .7; }
    .search .kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); opacity: .5; font-size: 12px; border:1px solid var(--line); padding:2px 6px; border-radius:6px; }

    .nav { display: flex; align-items: center; gap: 14px; }
    .nav a { color: var(--text); text-decoration: none; opacity: .85; font-weight: 600; padding: 8px 12px; border-radius: 10px; }
    .nav a:hover { background: var(--card); opacity: 1; }

    .hamburger { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; color: var(--muted);}


	@media (max-width: 768px) and (orientation: portrait) { /* make search bar wider in portrait mode */
	  .search-input {
		padding-right: 8px; /* instead of 4px if you want a tiny bit of space */
	  }
	  .bar {
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: 10px;
	  }

	  .search {
		width: 100%;
	  }
	  .header:has(.search:focus-within) .logo,
	  .header:has(.search:focus-within) .nav {
		display: none !important;
	  }
	  .header:has(.search:focus-within) .bar {
		grid-template-columns: 1fr auto;
	  }
	  
	  
	  /* Keep header compact whenever suggestions are open, even if input lost focus */
	  .header.suggest-open .logo,
	  .header.suggest-open .nav {
		display: none !important;
	  }
	  .header.suggest-open .bar {
		grid-template-columns: 1fr auto;
	  }

	  /* JS fallback mirror, like your .header.searching */
	  .header.searching.suggest-open .logo,
	  .header.searching.suggest-open .nav {
		display: none !important;
	  }
	  .header.searching.suggest-open .bar {
		grid-template-columns: 1fr auto;
	  }
	  
	  
	}

/* --- JS fallback (mirrors :has) for browsers without :has support --- */
@media (max-width: 768px) and (orientation: portrait) {
  .header.searching .logo,
  .header.searching .nav{
    display: none !important;
  }
  .header.searching .bar{
    grid-template-columns: 1fr auto;
  }
}





	/* Sidebar */
	.side {
    position: fixed;
    top: calc(var(--header-h) + 12px);
    left: 0;
	  align-self: start;
	  background: var(--bg-blue-dark);
	  border-radius: 4px;
	  box-shadow: var(--shadow);
	  padding: 14px;

	  /* collapsed width, full height */
	  width: var(--sidew-collapsed);
	  height: max(320px, calc(100dvh - var(--header-h) - 36px));

	  /* allow it to grow over the cards */
	  overflow-y: hidden;
	  overflow-x: visible;

	  z-index: 40; /* sit above cards */
	  transition:
		width 0.20s ease,
		box-shadow 0.20s ease,
		transform 0.20s ease;
	}
	

	

	/* nice scrollbars, as before */
	.side::-webkit-scrollbar { width: 12px; }
	.side::-webkit-scrollbar-thumb { background: #303E5A; border-radius: 10px; }

	/* EXPANDED STATE ON HOVER */
	.side:hover {
	  width: var(--sidew); /* full width */
	  box-shadow: 0 10px 32px rgba(0,0,0,.6);
	  overflow-y: auto;
	}

    .side .section { padding: 6px 8px 10px; }
    .side .item {
	  display: grid;
	  grid-template-columns: 28px 1fr auto; /* icon | label | spacer */
	  gap: 4px;
	  align-items: center;
	  padding: 6px 4px;
	  min-height: 34px;  /* keeps vertical spacing stable */
	  margin-bottom: 14px;
	}




.side .item {
  color: var(--text);
  text-decoration: none;
}

.side .item:hover {

  color: var(--text);
  color: var(--accent-2);
}

/* Only the label turns yellow on hover */
.side .item:hover .label {
  color: var(--accent-2);
}

.side .item *,
.side .item a {
  text-decoration: none !important;
  color: inherit !important;
}
	

/* smooth fade for labels / extra text */
.side .label,
.side .txt,
.side .see-all,
.side .item > div:last-child {
  transition: opacity 0.18s ease;
}

/* collapsed state: text invisible, but layout stays exactly the same */
.side:not(:hover) .label,
.side:not(:hover) .txt,
.side:not(:hover) .see-all,
.side:not(:hover) .item > div:last-child {
  opacity: 0;
  pointer-events: none; /* can’t click the invisible parts */
}

.side .item .label {
    font-weight: 800;
    letter-spacing: .2px;
}

/* divider lines keep vertical rhythm but go invisible */
.side .rule {
  transition: opacity 0.18s ease;
  
  height: 1px;
  background: var(--line);
  margin: 8px 0;
  border: 0;
}
.side:not(:hover) .rule {
  opacity: 0;
}

/* Sidebar item label: always one line */
.side .label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}


	
	/* Phone portrait: hide sidebar, make content full-width */
	@media (max-width: 768px) and (orientation: portrait) {
	  .layout { grid-template-columns: 1fr !important; }
	  .side { display: none !important; }
	}

    .popular { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; font-weight: 900; font-size: 17px; letter-spacing: .5px; }
    .popular .ring { width: 34px; height: 34px; border: 2px solid var(--accent-2); border-radius: 999px; display: grid; place-items: center; }




/* New tag list row */
.taglist-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border-radius: 10px;
  font-size: 14px;
  color: inherit;
  text-decoration: none;
}

.taglist-row:hover {
  background: #222;
}

.taglist-row:hover > div:not(.count) {
  text-decoration: underline;
}

/* Triangle marker in first column */
.taglist-row::before {
  --tri-h: 4px;
  --tri-w: 6px;
  --tri-color: #999;
  content: "";
  display: block;
  width: 0; height: 0;
  border-top: var(--tri-h) solid transparent;
  border-bottom: var(--tri-h) solid transparent;
  border-left: var(--tri-w) solid var(--tri-color);
  justify-self: center;
  align-self: center;
}

.taglist-row:hover::before {
  border-left-color: var(--accent-2);
}

.taglist-row .count {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}




.nlink,
.nlink:link,
.nlink:visited {
  color: inherit;
  text-decoration: none; /* remove default link underline */
}

/* Hover background */
.nlink:hover {
  /*background: #222222;*/
}

/* Only underline the label (the middle div) on hover */
.nlink:hover {
  text-decoration: underline;
}



/* Optional: accessible focus style */
.nlink:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}



    .chev { opacity: .8; }

	
	.wrap {
	  max-width: none;              /* no central cap */
	  width: 100%;
	  margin: 0;
	  padding-top: 18px;
	  padding-right: 16px;
	  padding-bottom: 64px;
	  padding-left: calc(var(--sidew-collapsed) + 24px); /* sidebar + a small gap */
	}
	
	@media (max-width: 768px) and (orientation: portrait) {
	  .wrap {
		padding-left: 2px;   /* or 0 */
		padding-right: 2px;  /* optional */
	  }
	}
	
    .section-title { margin: 8px 0 18px; font-weight: 900; font-size: 24px; letter-spacing: .1px; }
    .subtitle { color: var(--muted); font-weight: 600; margin-top: -6px; margin-bottom: 18px; }

    /* Grid */
	.grid {
	  display: grid;
	  gap: var(--grid-gap);
	  column-gap: var(--grid-gap);
	  row-gap: var(--grid-gap-y);
	  grid-template-columns: repeat(
		auto-fill,
		minmax(
		  clamp(var(--card-min), calc((100% - var(--grid-gap)) / 2), var(--card-max)),
		  1fr
		)
	  );
	}
	

    /* Card */
    .card {position: relative; background-color: var(--bg-blue-medium); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
    .thumb { position: relative; aspect-ratio: 4 / 3; background: #0b0b0c; overflow: hidden; }
    .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
    .thumb:hover img, .thumb.touch-active img { transform: scale(1.04); }
    .live { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 800; background: var(--danger); color: #fff; padding: 6px 8px; border-radius: 8px; box-shadow: 0 6px 16px rgba(239,68,68,.4); }
    .badge { position: absolute; bottom: 10px; right: 10px; font-size: 12px; background: rgba(0,0,0,.55); color: #fff; padding: 6px 8px; border-radius: 8px; }
    .meta { padding: 12px 12px 14px; display: grid; gap: 8px; }
    .title { font-weight: 700; font-size: 15px; }
    .row {
	  display: flex;
	  align-items: center;
	  gap: 8px;
	  color: var(--muted);
	  font-size: var(--ui-text-size);
	}
	
	
	

/* Neon frame appears on hover */
.card::after {
  --c: var(--accent-2); /* border color */
  --w: 4px;             /* border thickness */
  --gapX: 82%;          /* horizontal gap as % of width (top/bottom) */
  --gapY: 82%;          /* vertical gap as % of height (left/right) */

  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s ease;

  /* four borders with middle cutouts that scale per side */
  background:
    /* top edge (relative to width) */
    linear-gradient(
      to right,
      var(--c) calc(50% - var(--gapX)/2),
      transparent 0,
      transparent calc(50% + var(--gapX)/2),
      var(--c) 0
    ) top / 100% var(--w) no-repeat,

    /* bottom edge (relative to width) */
    linear-gradient(
      to right,
      var(--c) calc(50% - var(--gapX)/2),
      transparent 0,
      transparent calc(50% + var(--gapX)/2),
      var(--c) 0
    ) bottom / 100% var(--w) no-repeat,

    /* left edge (relative to height) */
    linear-gradient(
      to bottom,
      var(--c) calc(50% - var(--gapY)/2),
      transparent 0,
      transparent calc(50% + var(--gapY)/2),
      var(--c) 0
    ) left / var(--w) 100% no-repeat,

    /* right edge (relative to height) */
    linear-gradient(
      to bottom,
      var(--c) calc(50% - var(--gapY)/2),
      transparent 0,
      transparent calc(50% + var(--gapY)/2),
      var(--c) 0
    ) right / var(--w) 100% no-repeat;

}

.card:hover::after { opacity: 1; }
.card.no-target::after { display: none !important; }







	
	
	.dot {
	  width: 8px;
	  height: 8px;
	  border-radius: 50%;
	  display: inline-block;
	  margin-right: 6px;
	}
	
	.meta p,
	.prose {
	  display: block;             /* ensure normal block flow */
	  margin: 0;                  /* tighten default p margins */
	  color: var(--muted);
	  font-size: var(--ui-text-size);
	  line-height: 1.5;
	}

	.meta p a,
	.prose a {
	  color: inherit;             /* same muted color */
	  text-decoration: underline;
	  text-underline-offset: 2px;
	}
	.meta p a:hover,
	.prose a:hover {
	  color: var(--text);         /* brighten on hover */
	}
	.meta--hero .prose { margin-block: 12px 16px; }
	
		
	.dot.green {
	  background: var(--green);
	  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
	}
	.dot.purple {
	  background: var(--purple);
	  box-shadow: 0 0 0 3px rgba(155, 107, 255, 0.2);
	}
	.dot.red {
	  background: var(--red);
	  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
	}
	.row.instructions {}
    .tags { display: flex; flex-wrap: wrap; gap: 8px; }
    .tag { font-size: 12px; color: #cfcfe8; background: rgba(155,107,255,.12); border: 1px solid rgba(155,107,255,.35); padding: 4px 4px; border-radius: 10px; }

    .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.35), transparent 60%); opacity: 0; transition: opacity .2s ease; }
    .thumb:hover::after, .thumb.touch-active::after { opacity: 1; }



.row--text {
  display: block;            /* kill flex */
  align-items: normal;       /* harmless but explicit */
  gap: 0;
  white-space: normal;
  line-height: 1.5;
  color: var(--muted);
  font-size: var(--ui-text-size);
}


	/* Footer */
.foot {
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.foot-copy {
  font-weight: 500;
}

.foot-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
}

.foot-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--text);
  text-decoration: underline;
  outline: none;
}

.foot-links .sep {
  opacity: 0.6;
  user-select: none;
}

.foot-copy {
  font-size: 15px;
}

	
	

	@media (max-width: 900px) {
	  .nav { display: none; }
	  .hamburger { display: inline-flex; }
	}

    @media (max-width: 480px) {
      .search .kbd { display: none; }
    }

    /* Small helpers */
    .icon { opacity: .9; }
    .muted { color: var(--muted); }
    .spin{animation:spin 1s linear infinite}
    @keyframes spin{to{transform:rotate(360deg)}}

    .drawer { display: none !important; border-top: 1px solid var(--line); background: rgba(22,22,23,.96); position: absolute; left: 0; right: 0; top: 100%; z-index: 70; backdrop-filter: blur(6px) saturate(140%);}
    .drawer.open { display: block !important; }
	

	/* Drawer content */
	.drawer .drawer-wrap {
	  display: grid;
	  gap: 10px;
	  padding: 14px;
	}

	/* Drawer links */
	.drawer a {
	  display: flex;
	  align-items: center;
	  gap: 10px;
	  padding: 12px 12px;
	  border-radius: 12px;
	  text-decoration: none;
	  color: var(--text);
	  font-weight: 700;
	  background: rgba(0,0,0,.35);
	  border: 1px solid var(--line);
	}
	.drawer a:hover { background: rgba(0,0,0,.5); }

	/* Optional group label in drawer */
	.drawer .group-label {
	  margin-top: 6px;
	  color: var(--muted);
	  font-size: 12px;
	  font-weight: 700;
	  letter-spacing: .08em;
	  opacity: .8;
	}

	@media (min-width: 901px) {
	  .drawer { display: none !important; }
	}

	
	
	
	/* game page styles */
	
	/* 60/40 split inside the main wrap */
.content {
  display: grid;
  grid-template-columns: 3fr 2fr;  /* ~60/40 */
  gap: 18px;
}

.col-left { display: grid; gap: 18px; }

.col-right { min-width: 0; } /* prevent overflow */

/* Reuse your existing .grid for both columns */
.grid-left { /* inherits .grid */ }
.grid-right { /* inherits .grid */ }

/* only the right grid gets a smaller min width + auto-fit */
.grid-right { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }




/* HERO card */
.card--hero {
  display: grid;
  grid-template-rows: auto auto;
}

/* Make the hero media taller than 16:9 if you want more impact */
.card--hero .thumb { aspect-ratio: 21 / 9; }
.meta--hero .title { font-size: 22px; font-weight: 800; }

/* Collapse to single column (hide right 40%) on narrower screens */
@media (max-width: 1200px) {
  .content { grid-template-columns: 1fr; }
  .col-right { display: none; }        /* hides the 40% column */
}



	/* make grid items not stretch to fill the row track */
.content { align-items: start; }

/* inside the left column, don’t stretch tracks or items */
.col-left { align-content: start; align-items: start; }

/* ensure the hero itself never stretches */
.card--hero { align-self: start; }

/* END HERO card */


/* START card */
.card--start { display: grid; grid-template-rows: auto auto; align-self: start; }
.card--start .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }

/* kill global zoom for this hero */
.card--start .thumb img { transform: none !important; }

/* start blurred; unblur instantly on hover */
/*.card--start .thumb img { filter: blur(0.5px); transition: none; }*/

/* DARK OVERLAY (element, not pseudo) */
.card--start .thumb .overlay{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.18);     /* dark by default */
  opacity: 1;
  transition: opacity .25s ease;   /* smooth lighten */
  pointer-events: none;
  z-index: 2;                      /* above image */
}

/* optional: kill any global gradient pseudo for this card */
.card--start .thumb::after { content: none !important; }

/* lighten + unblur on hover/touch */
.card--start .thumb:hover .overlay,
.card--start .thumb.touch-active .overlay { opacity: .15; }
.card--start .thumb:hover img,
.card--start .thumb.touch-active img { filter: none; }

/* PLAY overlay above overlay */
.card--start .play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  z-index: 3;
}

.card--start .play .inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
}

.card--start .play .label {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
  opacity: .95;
}


.card--start .play .btn {
  width: 84px; height: 84px; border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 28px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08);
  display: grid; place-items: center;
  backdrop-filter: blur(2px);
  transition: transform .18s ease, background .18s ease;
}

.card--start .thumb:hover .play .btn { transform: scale(1.06); }
.card--start .play svg { width: 28px; height: 28px; color: #fff; opacity: .95; }
.card--start .thumb:hover .play .label { transform: translateY(-1px); opacity: 1; }

/* badges sit on top of everything */
.card--start .thumb .live,
.card--start .thumb .badge { position: absolute; z-index: 4; }

@media (max-width: 520px) {
  .card--start .play .btn { width: 72px; height: 72px; }
  .card--start .play .label { padding: 6px 10px; font-size: 12px; }
}




/* ============================
   SIMPLE GAME CONTAINER (Ruffle)
   .card.card--player
   ============================ */

/* Base card: minimal, no neon frame, no hover tricks */
.card.card--player {
  position: relative;
  border-radius: var(--radius);
  background: var(--bg-blue-medium);
  box-shadow: none;                    /* no big drop shadow */
  overflow: hidden;
}

/* Kill the neon frame from the generic .card */
.card.card--player::after {
  content: none !important;
}

/* Container for the game area */
.card.card--player .hero-media {
  position: relative;
  padding: 0;
  margin: 0;
  background: #000;                     /* clean black behind Ruffle */
}

/* The inner sizing wrapper; you can tweak --hero-max-w if needed */
.card.card--player .hero-media .wide {
  --hero-max-w: 988px;
  --hero-ar: 4 / 3;                     /* default SWF aspect */
  width: min(100%, var(--hero-max-w));
  margin-inline: auto;
  aspect-ratio: var(--hero-ar);
  position: relative;
}

/* No hover zoom / gradient / overlays */
.card.card--player .thumb,
.card.card--player .hero-media .thumb {
  position: relative;
  aspect-ratio: auto;
  overflow: visible;
  background: #000;
}

/* In case you ever drop an <img> in there, keep it neutral */
.card.card--player .thumb img,
.card.card--player .hero-media .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* Remove the generic gradient overlay from .thumb */
.card.card--player .thumb::after {
  content: none !important;
}

/* Hide all CTA / play overlays if they accidentally exist inside */
.card.card--player .overlay,
.card.card--player .play,
.card.card--player .hero-cta-stack,
.card.card--player .thumb-cover,
.card.card--player .mobile-btn,
.card.card--player .hero-cta,
.card.card--player .thumb-btn,
.card.card--player .thumb-btn.alt {
  display: none !important;
}

/* The actual Ruffle frame fills the area */
.card.card--player .game-frame,
.card.card--player .game-frame > object,
.card.card--player .game-frame > embed,
.card.card--player #gameObjE {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* No pointer cursor on the shell (only inside the game) */
.card.card--player,
.card.card--player .hero-media,
.card.card--player .hero-media .wide {
  cursor: default;
}




.thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: inherit;
  cursor: pointer;
}
.thumb-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The wrapper becomes the positioning context for the overlay button */
.hero-media { position: relative; }
.hero-media .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b0b0c; }
.hero-media .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Centered CTA stack inside the image */
.hero-cta-stack{
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 14px;
  z-index: 5;
}


/* Clickable dark overlay above the hero image */
.thumb-cover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);  /* darkens base state */
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 4;                       /* below CTA stack (5) and badge (6) */
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s ease;
}

.hero-media:hover .thumb-cover {
  background: rgba(0, 0, 0, 0.05);
}

.hero-media:hover .cta-btn { 
  position: relative; 
  z-index: 6; 
}

/* Badge stays absolute, always */
.hero-media .badge{
  position: absolute;
  right: 10px; 
  bottom: 10px;
  z-index: 6;      /* high enough to sit over the cover */
}

/* Optional: pressed feedback */
.thumb-cover:active {
  background: rgba(0, 0, 0, 0.15);
}

@media (hover: none) and (pointer: coarse) {
  .thumb-cover {
    background: transparent !important;  /* keep it visible for taps */
  }
}




/* Base */
.cta-btn{
  /* default sizing via vars (can be overridden per-variant) */
  --cta-font-size: 14px;
  --cta-icon-size: 18px;

  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--cta-text);
  font: 800 var(--cta-font-size)/1.1 Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,.38);
  backdrop-filter: blur(3px);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  transform-origin: center;
  will-change: transform;
}

.cta-btn:focus-visible{
  outline: 2px solid var(--cta-focus);
  outline-offset: 2px;
}

.cta-btn .cta-ico{
  width: var(--cta-icon-size);
  height: var(--cta-icon-size);
  fill: currentColor;
  opacity: .95;
  flex-shrink: 0;
}


.cta-primary{
  /* visual theme */
  background: var(--cta-bg);
  border-color: var(--cta-border);
  color: var(--cta-text);

  /* per-button sizing */
  --cta-font-size: 18px;
  --cta-icon-size: 26px;
  padding: 14px 28px;
}
.cta-primary:hover,
.cta-primary:focus-visible{
  background: var(--cta-bg-hover);
  transform: scale(1.04);
}

.cta-secondary{
  /* visual theme */
  background: var(--cta2-bg);
  border-color: var(--cta2-border);
  color: var(--cta2-text);

  /* per-button sizing */
  --cta-font-size: 14px;
  --cta-icon-size: 20px;
  padding: 6px 12px;
}
.cta-secondary:hover,
.cta-secondary:focus-visible{
  background: var(--cta2-bg-hover);
  transform: scale(1.04);       
}


.cta-btn span {
  text-shadow:
    0 0 2px #16295A,
    0 0 4px #16295A,
    0 0 6px #284AA4;
}

/* Icon glow (for SVG icon) */
.cta-btn .cta-ico {
  width: var(--cta-icon-size);
  height: var(--cta-icon-size);
  fill: currentColor;
  filter:
    drop-shadow(0 0 2px #16295A)
    drop-shadow(0 0 4px #16295A)
    drop-shadow(0 0 6px #284AA4);
}

/* Responsive tweaks (optional) */
@media (max-width: 520px){
  .cta-primary{
    --cta-font-size: 16px;
    --cta-icon-size: 22px;
    padding: 12px 24px;
  }
  .cta-secondary{
    --cta-font-size: 14px;
    --cta-icon-size: 18px;
    padding: 9px 18px;
  }
}



/* Keep the version badge above image */
.hero-media .badge{
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 6;
  font-size: 12px;
  background: rgba(0,0,0,.55);
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
}

/* Responsive: tighten spacing on small screens */
@media (max-width: 520px){
  .hero-cta-stack{ gap: 8px; }
  
  .hero-cta-stack .cta-secondary {
    transform: scale(0.80);
    transform-origin: center;
  }
}





/* Style + position the mobile button over the image */
.mobile-btn {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 6;              /* above the image/overlay */
  padding: 6px 10px;
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-btn:hover,
.mobile-btn:focus-visible {
  background: rgba(0,0,0,.7);
  outline: 2px solid var(--accent, #f6ccff);
  outline-offset: 2px;
}

/* Optional: slightly smaller on very small screens */
@media (max-width: 520px) {
  #mobileBtn.hero-cta { padding: 7px 10px; font-size: 12px; left: 10px; bottom: 10px; }
}



button.thumb-btn.alt {
  margin-top: 12px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
}
button.thumb-btn.alt:hover {
  background: rgba(255,255,255,0.2);
}



@keyframes logoColorShift {
  0%   { color: #9b6bff; text-shadow: 0 0 10px #9b6bff; }
  25%  { color: #ff6ad5; text-shadow: 0 0 10px #ff6ad5; }
  50%  { color: #6affd9; text-shadow: 0 0 10px #6affd9; }
  75%  { color: #ffd86a; text-shadow: 0 0 10px #ffd86a; }
  100% { color: #9b6bff; text-shadow: 0 0 10px #9b6bff; }
}



	
/* Phone portrait: hide sidebar, make content full-width */
@media (max-width: 768px) and (orientation: portrait) {
  .author {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2; /* clamp to 2 lines */
	overflow: hidden;
  }
  
  .logo {
    max-width: 79px;
    margin-right: 10px;
    overflow: hidden;
  }
}

/* A–Z bar */
.azbar {
  inline-size: min(100%, 900px);
  margin-inline: auto;
  padding-inline: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-block: 18px 22px;
}

.azbar a,
.azbar span {
  --size: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size);
  height: var(--size);
  border: 1px solid var(--line, #2a2a2d);
  background: var(--bg-blue-light, #161617);
  color: var(--text, #e9e9ee);
  text-decoration: none;
  font: 600 14px/1 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  border-radius: 6px;
  user-select: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.azbar a:hover {
  transform: translateY(-1px);
  border-color: var(--theme, #CC9DD6);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--theme, #CC9DD6) 25%, transparent);
}

.azbar a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--theme, #CC9DD6) 40%, transparent);
  border-color: var(--theme, #CC9DD6);
}

.azbar .active,
.azbar [aria-current="page"] {
  --size: 46px;
  font-size: 15px;
  border-color: var(--theme, #CC9DD6);
  background: linear-gradient(180deg,
              color-mix(in oklab, var(--theme, #CC9DD6) 18%, transparent),
              transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--theme, #CC9DD6) 35%, transparent),
    0 4px 18px rgba(0,0,0,.25);
  transform: translateY(-1px);
  pointer-events: none;
}

.azbar .disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}



/* Minimal "More games" link */
#more-container {
  text-align: center;
  margin-top: 12px; /* or keep your inline style */
}

#more-link {
  color: inherit;                 /* keep normal text color */
  text-decoration: none;          /* no default underline */
  border-bottom: 2px solid transparent; /* reserve space to avoid shift */
}

#more-link:hover,
#more-link:focus-visible {
  border-bottom-color: var(--theme, #CC9DD6); /* simple bottom line */
  outline: none;                    /* rely on the bottom line as focus cue */
}

/* defaults */
.icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  vertical-align: -2px;

  /* nudge + zoom controls */
  --icon-zoom: 1;
  --icon-dx: 0px;   /* +right / -left  */
  --icon-dy: 0px;   /* +down  / -up    */

  transform-origin: center;
  transform: translate(var(--icon-dx), var(--icon-dy)) scale(var(--icon-zoom));
  overflow: visible; /* show ink outside the 16×16 box */
}

/* per-icon tuning */
.icon--new   { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--flame { --icon-zoom: 1.3; --icon-dy: -0px; color: var(--theme); }
.icon--best  { --icon-zoom: 1.8; --icon-dy: 1.5px; --icon-dx: 3px; color: var(--theme); }
.icon--az  { --icon-zoom: 1.7; --icon-dy: 0px; color: var(--theme); }
.icon--updated  { --icon-zoom: 1.8; --icon-dy: 0px; color: var(--theme); }
.icon--tags  { --icon-zoom: 1.3; --icon-dy: -1px; --icon-dx: 1px; color: var(--theme); }
.icon--recent  { --icon-zoom: 2.1; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--action  { --icon-zoom: 2.1; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--puzzle  { --icon-zoom: 1.7; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--defense  { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--adventure      { --icon-zoom: 2.0; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--skill          { --icon-zoom: 2.4; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--shooting       { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--defense        { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--shoot-em-up    { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--racing         { --icon-zoom: 2.1; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--strategy       { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--platform       { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--point-and-click{ --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--sport          { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--rpg            { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }

.icon--multiplayer    { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--thinking       { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--arcade         { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--turn-based     { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--retro          { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--match-3        { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--idle           { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }
.icon--physics        { --icon-zoom: 1.8; --icon-dy: -2px; --icon-dx: 0px; color: var(--theme); }




.btn-link {
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.8;               /* slightly less bright */
  padding: 0;
  margin-top: 6px;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.btn-link:hover,
.btn-link:focus-visible {
  opacity: 1;                 /* restore brightness */
  text-decoration: underline; /* keep underline on hover */
  outline: none;
}

.see-all {
  display: block;
  text-align: center;
  margin: 10px auto;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--bg-blue-light);
  color: var(--accent);
  font-weight: 500;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.2s;
}

.see-all:hover {
  background: var(--card);
}

.dsf {
  position: absolute;
  left: -9999px;
}
.email::after {
  content: "contact@bubblebox.com";
}

  .tags-index__head { display:grid; gap:10px; margin-bottom:16px; }
  #tag-filter { background:#121216; border:1px solid #26262b; border-radius:10px; padding:8px 10px; color:var(--text); }
  .tags-index__alpha a { margin-right:8px; font-size:13px; color:var(--muted); text-decoration:none; }
  .tags-index__alpha a:hover { text-decoration:underline; }
  .alpha { margin:18px 0 8px; font-size:16px; color:#ddd; }
  .tag-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:6px 14px; list-style:none; padding:0; margin:0; }
  .tag-link { display:flex; justify-content:flex-start; gap:6px; padding:6px 8px; border-radius:10px; text-decoration:none; color:inherit; }
  .tag-link:hover { background:#222; }
  .tag-link .count { color:var(--muted); font-weight:700; }



/* form.search should be position:relative so the dropdown anchors under it */
form.search { position: relative; }

/* popover */
.suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  max-width:400px;
  margin-top: 6px;
  background: var(--bg, #0b0b0f);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  padding: 6px;
  z-index: 2000;
  max-height: 70vh;
  overflow: auto;
}
.suggest.hidden { display: none; }

.suggest .sug {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;

  text-decoration: none;
  color: inherit;
}
.suggest .sug:hover,
.suggest .sug.active {
  background: color-mix(in srgb, var(--accent, #6ff) 6%, transparent);
}
.suggest .sug img {
  display: block;
  width: 80px; height: 45px; object-fit: cover; border-radius: 8px;
}
.suggest .sug .meta { display: flex; flex-direction: column; gap: 2px; }
.suggest .sug .title { font-weight: 600; line-height: 1.1; }
.suggest .sug .sub { font-size: .85rem; opacity: .7; }


/* overlay styles */

 :root { --overlay-z: 2000; }
        .game-overlay[hidden] { display: none; }
        .game-overlay {
          position: fixed;
          inset: 0;
          width: 100%;
          height: 100dvh;
          background: rgba(0,0,0,.85);
          z-index: var(--overlay-z);
          isolation: isolate;
        }
        .overlay-game-wrapper { width: 100%; height: 100%; }
        .no-scroll { position: fixed; width: 100%; overflow: hidden; }

        /* strip native button look */
        button.thumb, button.thumb-btn { border: 0; padding: 0; background: none; appearance: none; border-radius: 0; color: inherit; font: inherit; }
        button.thumb::-moz-focus-inner, button.thumb-btn::-moz-focus-inner { border: 0; padding: 0; }
        button.thumb:focus, button.thumb-btn:focus { outline: none; }
        button.thumb:focus-visible, button.thumb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        button.thumb, button.thumb-btn, a.thumb { cursor: pointer; }
        button.thumb, button.thumb-btn { -webkit-tap-highlight-color: transparent; }

        #closeBtn{
          position: absolute; top: 12px; right: 12px;
          width: 42px; height: 42px; border: 0; border-radius: 50%;
          background: rgba(255,255,255,.15); color: #fff; font-size: 28px;
          display: grid; place-items: center; cursor: pointer;
          z-index: calc(var(--overlay-z) + 11);
          touch-action: manipulation; -webkit-transform: translateZ(0);
        }
        #closeBtn:hover, #closeBtn:focus-visible { background: rgba(255, 255, 255, 0.25); transform: scale(1.1); outline: none; }
        #closeBtn:focus-visible { box-shadow: 0 0 0 3px rgba(155, 107, 255, 0.6); }

        .game-overlay { transform: none !important; filter: none !important; perspective: none !important; }

        .hero-media { position: relative; }
       
        .hero-cta {
          position: absolute;
          left: 12px;
          bottom: 12px;
          z-index: 6; /* above image/overlay decorations inside the button */
          padding: 6px 10px;
          border-radius: 8px;
          background: rgba(0,0,0,.55);
          color: #fff;
          font-weight: 600;
        }
        .hero-cta:hover,
        .hero-cta:focus-visible {
          background: rgba(0,0,0,.7);
          outline: 2px solid var(--accent, #f6ccff);
          outline-offset: 2px;
        }
/* end overlay styles */