/* AIGame48 — Studio Ledger (fonts: system stack, no external requests) */

:root {
  --sl-bg: #ebe4d8;
  --sl-bg2: #f5f0e8;
  --sl-paper: #fffcf7;
  --sl-ink: #1c1917;
  --sl-muted: #78716c;
  --sl-accent: #c2410c;
  --sl-accent2: #4d7c6f;
  --sl-line: rgba(28, 25, 23, 0.1);
  --sl-line-strong: rgba(28, 25, 23, 0.18);
  --sl-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 14px 44px rgba(28, 25, 23, 0.09);
  --sl-radius: 16px;
  --sl-radius-sm: 10px;
  --sl-radius-lg: 22px;
  --sl-font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --sl-font-display: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--sl-ink);
  font: 400 16px/1.55 var(--sl-font-sans);
  background: var(--sl-bg);
  min-height: 100dvh;
}

body.sl-root {
  position: relative;
}

.sl-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 10% -20%, rgba(194, 65, 12, 0.07), transparent 55%),
    radial-gradient(ellipse 90% 60% at 95% 10%, rgba(77, 124, 111, 0.07), transparent 50%),
    linear-gradient(180deg, var(--sl-bg) 0%, var(--sl-bg2) 45%, #e8e1d4 100%);
}

.sl-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(circle, rgba(28, 25, 23, 0.06) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 15%, transparent 75%);
}

.sl-shell {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 28px) 48px;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Masthead */
.sl-mast {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0 10px;
  border-bottom: 1px solid var(--sl-line);
}

.sl-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sl-font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.sl-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--sl-line);
  background: var(--sl-paper);
}

.sl-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sl-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sl-muted);
  border: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.sl-nav a:hover {
  color: var(--sl-ink);
  border-color: var(--sl-line);
  background: rgba(255, 252, 247, 0.75);
}

.sl-nav a.is-active {
  background: var(--sl-ink);
  color: var(--sl-paper);
  border-color: var(--sl-ink);
}

/* Eyebrows & type */
.sl-kicker {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sl-accent);
}

.sl-h1 {
  margin: 0 0 12px;
  font-family: var(--sl-font-display);
  font-size: clamp(1.85rem, 4.2vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.sl-h2 {
  margin: 0 0 10px;
  font-family: var(--sl-font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.sl-lede {
  margin: 0 0 18px;
  max-width: 46ch;
  color: var(--sl-muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.sl-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sl-row span {
  font-size: 0.82rem;
  color: var(--sl-muted);
}

/* Cards */
.sl-card {
  background: var(--sl-paper);
  border-radius: var(--sl-radius-lg);
  border: 1px solid var(--sl-line);
  box-shadow: var(--sl-shadow);
}

.sl-card--pad {
  padding: clamp(20px, 3vw, 26px);
}

.sl-block {
  margin-top: clamp(22px, 4vw, 30px);
}

/* Buttons */
.sl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.sl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  border: 1px solid var(--sl-line-strong);
  background: var(--sl-paper);
  color: var(--sl-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.sl-btn:hover {
  border-color: var(--sl-ink);
  box-shadow: 0 6px 20px rgba(28, 25, 23, 0.08);
}

.sl-btn:active {
  transform: translateY(1px);
}

.sl-btn--fill {
  background: var(--sl-accent);
  border-color: var(--sl-accent);
  color: #fff;
}

.sl-btn--fill:hover {
  background: #9a3412;
  border-color: #9a3412;
  box-shadow: 0 8px 24px rgba(194, 65, 12, 0.25);
}

.sl-btn--ghost {
  background: transparent;
}

.sl-btn--sm {
  padding: 6px 12px;
  font-size: 0.76rem;
}

.sl-hint {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--sl-muted);
}

.sl-hint kbd {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--sl-line);
  background: rgba(255, 252, 247, 0.9);
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

/* Band */
.sl-band {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 10px 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-muted);
}

.sl-band__dot {
  color: var(--sl-accent2);
  animation: sl-pulse 1.6s ease-in-out infinite;
}

@keyframes sl-pulse {
  50% { opacity: 0.45; }
}

.sl-band__ping {
  color: var(--sl-accent);
}

.sl-band__rule {
  flex: 1;
  min-width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--sl-line-strong), transparent);
}

/* Home layout */
.sl-home {
  margin-top: 10px;
}

.sl-home__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(16px, 2.8vw, 24px);
  margin-top: clamp(16px, 2.8vw, 22px);
  align-items: start;
}

@media (max-width: 900px) {
  .sl-home__split {
    grid-template-columns: 1fr;
  }
}

.sl-home__rail {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.5vw, 18px);
  min-width: 0;
}

/* Featured (fixed aspect — no stretch with grid row span) */
.sl-spot {
  position: relative;
  overflow: hidden;
  border-radius: var(--sl-radius-lg);
  border: 1px solid var(--sl-line);
  box-shadow: var(--sl-shadow);
  background: var(--sl-paper);
  align-self: start;
  width: 100%;
  min-width: 0;
  transition: box-shadow 0.25s ease;
}

.sl-spot:hover {
  box-shadow: 0 18px 50px rgba(28, 25, 23, 0.12);
}

.sl-spot__link {
  display: block;
  color: inherit;
  position: relative;
}

.sl-spot__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  background: #e7e5e4;
}

.sl-spot__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sl-spot__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 22px;
  background: linear-gradient(transparent 0%, rgba(28, 25, 23, 0.88) 100%);
  color: #fafaf9;
}

.sl-spot__tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--sl-paper);
  color: var(--sl-accent);
}

.sl-spot__title {
  margin: 0;
  font-family: var(--sl-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
}

.sl-spot__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.sl-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 252, 247, 0.35);
  color: #e7e5e4;
}

.sl-pill--accent {
  border-color: rgba(194, 65, 12, 0.6);
  color: #fed7aa;
}

/* Search */
.sl-search {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--sl-line);
  background: #fff;
  max-width: 100%;
}

.sl-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 14px 20px;
  font: inherit;
  outline: none;
  color: var(--sl-ink);
}

.sl-search input::placeholder {
  color: #a8a29e;
}

.sl-search button {
  border: 0;
  padding: 0 22px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  background: var(--sl-ink);
  color: var(--sl-paper);
  transition: background 0.15s ease;
}

.sl-search button:hover {
  background: #292524;
}

/* Filters */
.sl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sl-chip {
  border: 1px solid var(--sl-line);
  background: var(--sl-paper);
  color: var(--sl-muted);
  border-radius: 999px;
  padding: 8px 15px;
  font: inherit;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.sl-chip:hover {
  border-color: var(--sl-line-strong);
  color: var(--sl-ink);
}

.sl-chip.is-active {
  background: var(--sl-ink);
  color: var(--sl-paper);
  border-color: var(--sl-ink);
}

/* Game grid */
.sl-grid {
  display: grid;
  gap: clamp(12px, 2vw, 16px);
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.sl-tile {
  position: relative;
  border-radius: var(--sl-radius);
  overflow: hidden;
  border: 1px solid var(--sl-line);
  background: var(--sl-paper);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sl-tile:hover,
.sl-tile:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--sl-shadow);
}

.sl-tile__link { display: block; }

.sl-tile__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e7e5e4;
}

.sl-tile__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.sl-tile:hover .sl-tile__media img,
.sl-tile:focus-within .sl-tile__media img {
  transform: scale(1.04);
}

.sl-tile__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(28, 25, 23, 0.35);
  color: #fff;
}

.sl-tile:hover .sl-tile__play,
.sl-tile:focus-within .sl-tile__play {
  opacity: 1;
}

.sl-tile__body {
  padding: 12px 14px 15px;
}

.sl-tile__title {
  margin: 0 0 4px;
  font-family: var(--sl-font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.sl-tile__meta {
  margin: 0;
  font-size: 0.74rem;
  color: var(--sl-muted);
}

.sl-tile__fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--sl-line);
  background: rgba(255, 252, 247, 0.92);
  color: var(--sl-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.sl-tile__fav:hover {
  color: var(--sl-accent);
}

.sl-tile__fav.is-on {
  color: var(--sl-accent);
  border-color: rgba(194, 65, 12, 0.45);
}

#sl-mini-canvas {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  border-radius: var(--sl-radius);
  border: 1px solid var(--sl-line);
  background: #1c1917;
  cursor: grab;
}

/* Player */
.sl-player {
  border-radius: var(--sl-radius-lg);
  border: 1px solid var(--sl-line);
  overflow: hidden;
  background: var(--sl-paper);
  box-shadow: var(--sl-shadow);
}

.sl-player__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sl-line);
  font-weight: 700;
  font-size: 0.85rem;
}

.sl-player__bar strong {
  font-family: var(--sl-font-display);
}

.sl-player__grow { flex: 1; }

.sl-player__frame {
  position: relative;
  aspect-ratio: 16/10;
  background: #0c0a09;
}

.sl-player__poster,
.sl-player__embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sl-player__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sl-player__embed { border: 0; }

.sl-player__load {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--sl-paper);
  background: rgba(28, 25, 23, 0.88);
}

.sl-player__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--sl-line);
}

.sl-player__tip {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.78rem;
  color: var(--sl-muted);
}

body.sl-no-scroll { overflow: hidden; }

.sl-player.is-mobile-theater {
  position: fixed;
  inset: 0;
  z-index: 100;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.sl-player.is-mobile-theater .sl-player__frame {
  flex: 1;
  aspect-ratio: auto;
}

/* Detail layout */
.sl-split {
  display: grid;
  gap: 22px;
}

@media (min-width: 960px) {
  .sl-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

/* Footer */
.sl-foot {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--sl-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--sl-muted);
}

.sl-foot nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sl-foot a:hover {
  color: var(--sl-accent);
}

/* Toast */
.sl-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 20px;
  border-radius: var(--sl-radius);
  border: 1px solid var(--sl-line);
  background: var(--sl-paper);
  color: var(--sl-ink);
  font-size: 0.86rem;
  box-shadow: var(--sl-shadow);
  max-width: min(400px, 92vw);
}

/* Legal / article */
.sl-doc .sl-card--pad {
  padding: clamp(24px, 4vw, 32px);
}

.sl-align-center,
.sl-align-center * {
  text-align: center;
}

.sl-prose {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--sl-ink);
}

.sl-prose * {
  font-family: inherit;
}

.sl-prose h1,
.sl-prose h2,
.sl-prose h3 {
  font-family: var(--sl-font-display);
  margin: 1em 0 0.5em;
}

.sl-prose h1:first-child,
.sl-prose h2:first-child,
.sl-prose h3:first-child {
  margin-top: 0;
}

.sl-prose p {
  margin: 0 0 1em;
}

.sl-prose p:last-child {
  margin-bottom: 0;
}

.sl-prose img {
  max-width: 100%;
  height: auto;
}

/* Form */
.sl-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  margin-top: 8px;
}

.sl-form input,
.sl-form textarea {
  border-radius: var(--sl-radius-sm);
  border: 1px solid var(--sl-line);
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.sl-form textarea {
  min-height: 130px;
  resize: vertical;
}

.sl-form input:focus,
.sl-form textarea:focus {
  border-color: var(--sl-line-strong);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}

/* Focus */
.sl-btn:focus-visible,
.sl-chip:focus-visible,
.sl-nav a:focus-visible,
.sl-tile__fav:focus-visible,
.sl-search input:focus-visible,
.sl-search button:focus-visible {
  outline: 2px solid var(--sl-accent);
  outline-offset: 2px;
}

/* AIGame48 v3 — full template reskin (neo-brutal light) */
:root {
  --sl-bg: #fff7ed;
  --sl-bg2: #fef3c7;
  --sl-paper: #ffffff;
  --sl-ink: #0b1020;
  --sl-muted: #334155;
  --sl-accent: #ff2e93;  /* hot pink */
  --sl-accent2: #16a34a; /* neon green */
  --sl-line: rgba(11, 16, 32, 0.18);
  --sl-line-strong: rgba(11, 16, 32, 0.55);
  --sl-shadow: 0 1px 0 rgba(11, 16, 32, 0.2), 0 10px 0 rgba(11, 16, 32, 0.08), 0 26px 64px rgba(11, 16, 32, 0.18);
  --sl-radius: 12px;
  --sl-radius-sm: 10px;
  --sl-radius-lg: 16px;
}

body {
  background: radial-gradient(circle at 0 0, rgba(255, 46, 147, 0.12) 0, transparent 35%), radial-gradient(circle at 100% 12%, rgba(22, 163, 74, 0.12) 0, transparent 36%), linear-gradient(180deg, var(--sl-bg), var(--sl-bg2));
}

.sl-bg {
  background: radial-gradient(ellipse 120% 80% at 10% -20%, rgba(255, 46, 147, 0.08), transparent 55%), radial-gradient(ellipse 90% 60% at 95% 10%, rgba(22, 163, 74, 0.08), transparent 50%), linear-gradient(180deg, rgba(255, 247, 237, 0.4) 0%, rgba(254, 243, 199, 0.25) 100%);
}

.sl-bg::after {
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(11, 16, 32, 0.22) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 20%, transparent 78%);
}

.sl-card,
.sl-tile,
.sl-player,
.sl-spot {
  border: 2px solid rgba(11, 16, 32, 0.85);
  box-shadow: 0 10px 0 rgba(11, 16, 32, 0.12), 0 28px 70px rgba(11, 16, 32, 0.16);
}

.sl-nav a,
.sl-chip,
.sl-btn,
.sl-search,
.sl-form input,
.sl-form textarea,
.sl-toast {
  border-width: 2px;
  border-color: rgba(11, 16, 32, 0.85);
}

.sl-nav a.is-active,
.sl-chip.is-active {
  background: var(--sl-ink);
  color: #fff;
  border-color: var(--sl-ink);
}

.sl-btn--fill,
.sl-search button {
  background: var(--sl-accent);
  border-color: rgba(11, 16, 32, 0.85);
  color: #fff;
}

.sl-btn--fill:hover,
.sl-search button:hover {
  background: #db1f7c;
}

.sl-kicker {
  color: var(--sl-ink);
}

.sl-band__dot {
  color: var(--sl-accent2);
}

.sl-band__ping {
  color: var(--sl-accent);
}

.sl-pill {
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(11, 16, 32, 0.72);
  color: #fff;
}

.sl-pill--accent {
  border-color: rgba(255, 46, 147, 0.75);
  color: #ffd1e8;
}

.sl-tile__play {
  background: rgba(11, 16, 32, 0.45);
}

.sl-ad {
  display: flex;
  justify-content: center;
}

.sl-ad__inner {
  width: min(100%, 980px);
  text-align: center;
  margin-inline: auto;
}
