/* TokLive homepage and game library */
.discovery {
  --discover-ink: #f7f5ff;
  --discover-muted: #b8b4c9;
  --discover-panel: #1b1929;
  --discover-border: #363247;
  --discover-accent: #d7fba4;
  color: var(--discover-ink);
  background: radial-gradient(ellipse 70% 420px at 75% 0, #29203b, transparent 95%);
}
.discovery h1, .discovery h2, .discovery h3 {
  color: var(--discover-ink);
}
.home-discovery, .library-page {
  padding-top: clamp(23px, 3.8vw, 52px);
}
.studio-hero {
  display: grid;
  grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr);
  gap: clamp(24px,4vw,64px);
  align-items: center;
  min-height: 525px;
  padding-block: clamp(20px,3vw,42px);
}
.studio-intro h1 {
  color: #faf7ff;
  font-size: clamp(42px,5.02vw,72px);
  line-height: 1.05;
  letter-spacing: -.065em;
}
.discovery h1 em {
  color: var(--discover-accent);
  font-style: normal;
}
.studio-intro h1 em {
  color: #e1fda7;
  background: linear-gradient(95deg,#f4fbc0 0%,#a7e8c7 95%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.studio-kicker {
  color: #cfbef5;
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .13em;
  margin-bottom: 18px;
}
.studio-lead {
  max-width: 41ch;
  margin-block: 19px 23px;
  font-size: clamp(15px,1.34vw,18px);
  line-height: 1.7;
  color: #cbc4dc;
}
.studio-platform { font-size: .78rem; color: #aaa1bc; margin-top: 17px; }
.discovery .studio-primary {
  background: #d9f9a9;
  border-color: #d9f9a9;
  color: #17200f;
  box-shadow: 0 7px 24px #a0d45e24;
}
.discovery .studio-primary:hover { background: #eaffc8; }
.discovery .studio-secondary { background: #242039; border-color: #544869; color: #fff; }
.effect-preview {
  --effect-color: #b8f6a0;
  min-width: 0;
  position: relative;
  padding: 15px;
  border: 1px solid #6a5881;
  border-radius: 23px;
  background: linear-gradient(135deg,#2b223f 0%,#181624 55%,#191b2d 100%);
  box-shadow: 0 25px 70px #0b071981, 0 5px 34px #6e4cbb36;
  animation: preview-appear .6s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes preview-appear {
  from { opacity: .66; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.effect-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 2px 11px;
}
.effect-header h2 { font-size: 1.05rem; letter-spacing: -.017em; }
.effect-header p { color: #bdb0d2; font-size: .77rem; margin-top: 3px; }
.effect-replay {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 6px 9px;
  color: #f1e8ff;
  border: 1px solid #6f598a;
  border-radius: 8px;
  font-size: .78rem;
  background: #302843;
}
.effect-replay span { display: inline-block; font-size: .98rem; transition: transform .24s; }
.effect-replay:hover span { transform: rotate(-35deg); }
.effect-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.8;
  min-height: 185px;
  border: 1px solid color-mix(in srgb,var(--effect-color) 55%,#242033);
  border-radius: 13px;
  background: radial-gradient(ellipse at 50% 55%,#322949,#151421 75%);
  transition: border-color .28s, box-shadow .28s;
  box-shadow: inset 0 0 28px #0c0a17;
}
.effect-screen[data-effect=ufo] { --effect-color: #a5f1ff; }
.effect-screen[data-effect=vortex] { --effect-color: #ffae75; }
.effect-screen[data-effect=win] { --effect-color: #e4bcff; }
.effect-vault, .effect-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.effect-vault { object-fit: cover; object-position: 50% 52%; z-index: -2; }
.effect-canvas { z-index: -1; pointer-events: none; }
.effect-screen::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 41%;
  z-index: -1;
  background: linear-gradient(0deg,#0c0a17ef,transparent);
  pointer-events: none;
}
.effect-caption {
  position: absolute;
  inset: auto 12px 10px;
  padding-left: 11px;
  border-left: 2px solid var(--effect-color);
  pointer-events: none;
}
.effect-caption strong { display: block; color: var(--effect-color); font-size: .96rem; line-height: 1.32; }
.effect-caption span { display: block; color: #f0e9fa; font-size: .77rem; margin-top: 2px; }
.effect-picker {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
  margin-top: 9px;
}
.effect-picker button {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
  padding: 5px;
  border: 1px solid #453b57;
  border-radius: 8px;
  background: #262134;
  color: #e9e0f4;
  text-align: left;
  font-size: .73rem;
  font-weight: 650;
  line-height: 1.25;
  transition: border-color .18s, background-color .18s;
}
.effect-picker button[aria-pressed=true] { background: #323f31; border-color: #9dec9d; color: #eaffdd; }
.effect-picker button:hover { border-color: #b69edb; }
.effect-picker img { flex: 0 0 auto; width: 31px; height: 31px; border-radius: 5px; object-fit: cover; }
.library-card {
  transition: transform .2s,border-color .2s,box-shadow .2s;
}
.library-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 11px 34px #09060e66;
}
.library-card.library-latest .library-copy {
  background: linear-gradient(155deg,#293225 0%,#211d2f 60%);
}
@media (max-width: 980px) {
  .studio-hero { gap: 21px; min-height: 450px; }
  .studio-intro h1 { font-size: clamp(40px,5.6vw,57px); }
  .effect-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 740px) {
  .studio-hero { grid-template-columns: minmax(0,1fr); align-items: start; padding-top: 6px; gap: 22px; }
  .studio-intro h1 { font-size: clamp(44px,10vw,65px); }
  .effect-preview { padding: 11px; border-radius: 17px; }
  .effect-header { padding-bottom: 8px; }
}
.discovery-section { padding: clamp(42px, 5vw, 70px) 0 0; }
.discovery-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.discovery-link { color: var(--discover-accent); font-weight: 650; }
.discovery-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.library-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: end;
  gap: 20px;
  padding: clamp(22px, 4vw, 54px) 0 28px;
}
.library-heading h1 { font-size: clamp(42px, 7vw, 78px); line-height: 1.05; }
.library-heading p { color: var(--discover-muted); max-width: 48ch; margin-top: 12px; font-size: 1rem; }
.library-search label { margin: 0 0 6px; font-weight: 650; color: var(--discover-ink); }
.library-search input { background: #211c34; color: var(--discover-ink); border-color: #57496c; }
.library-search input::placeholder { color: #b9b1ce; }
.library-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--discover-border);
  padding: 18px 0;
}
.library-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.library-filters button { padding: 8px 13px; }
.library-bar p { font-size: .85rem; color: var(--discover-muted); }
.library-page { padding-bottom: 68px; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 18px; }
.library-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--discover-border);
  border-radius: 18px;
  background: var(--discover-panel);
}
.library-card:hover, .library-card:focus-within { border-color: #7d69a3; }
.library-card.library-latest { border-color: #8ab16a; }
.library-cover { position: relative; aspect-ratio: 1.85; overflow: hidden; background: #2d2344; }
.library-cover img { width: 100%; height: 100%; }
.library-cover .cover-ambient, .game-custom-cover .game-art .cover-ambient {
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: blur(15px) brightness(.58);
  transform: scale(1.14);
}
.library-cover .cover-artwork, .game-custom-cover .game-art .cover-artwork {
  position: absolute;
  inset: 0;
  object-fit: contain;
  object-position: center;
}
.library-unrevealed { display: grid; place-items: center; background: radial-gradient(ellipse at 50% 50%, #4c3d68, #252036 75%); }
.library-unrevealed span { color: #b8a3e2; font-size: 3rem; font-weight: 700; }
.latest-label {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  color: #17210e;
  background: var(--discover-accent);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: .73rem;
  font-weight: 800;
  box-shadow: 0 2px 12px #111a0b80;
}
.library-copy { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 18px; }
.library-status { font-size: .77rem; font-weight: 700; color: #d6c6f4; }
.library-status.library-open { color: #c2eba1; }
.library-status span { font-weight: 400; color: #c6bfd6; padding-left: 4px; }
.library-copy h3 { font-size: clamp(18px, 1.55vw, 23px); margin-top: 6px; overflow-wrap: anywhere; }
.library-summary, .library-schedule { color: var(--discover-muted); font-size: .87rem; margin: 10px 0 13px; }
.library-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 4px; }
.library-actions button, .library-actions a {
  color: #e6dcf8;
  background: #302747;
  border: 1px solid #544467;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 650;
  min-height: 36px;
  padding: 6px 10px;
}
.library-actions button:hover, .library-actions a:hover { border-color: #ac93d8; }
.library-empty {
  grid-column: 1 / -1;
  padding: 34px 20px;
  border: 1px dashed var(--discover-border);
  border-radius: 12px;
  color: var(--discover-muted);
}
.studio-workflow {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(22px, 5vw, 60px);
}
.workflow-copy ul { list-style: none; padding: 0; margin: 18px 0 20px; display: grid; gap: 14px; }
.workflow-copy li { padding-left: 13px; border-left: 2px solid #7c66a7; }
.workflow-copy li strong, .workflow-copy li span { display: block; }
.workflow-copy li span { color: var(--discover-muted); font-size: .89rem; margin-top: 3px; }
.workflow-image { border-radius: 15px; border: 1px solid #53476d; width: 100%; }
.workflow-links { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 16px; }
@media (max-width: 980px) {
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .studio-workflow, .library-heading, .library-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-actions { gap: 9px; }
  .studio-actions a { flex: 1 0 auto; padding-inline: 12px; }
  .library-heading { gap: 16px; }
  .library-grid { gap: 14px; }
  .discovery-heading { gap: 4px; }
}
