@font-face { font-family: "Kaushan Script"; src: url("../assets/fonts/KaushanScript.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/Fraunces.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0b080b; --bg2: #1e0f18; --wine: #5a1735;
  --pink: #ff6fae; --pink-hi: #ffa3cc; --rose: #e0185c; --rose-dk: #9c0a3c;
  --blue: #4fa3ff; --blue-hi: #9ccdff; --blue-dk: #2a74d6;
  --gold: #e6b24a; --gold-hi: #fff0b8; --gold-dk: #a87418;
  --text: #f6e9ef; --muted: #c7b2bd; --card: rgba(24, 14, 20, .82); --line: rgba(230, 178, 74, .35);
  --radius: 18px;
  --gold-grad: linear-gradient(135deg, #fff0b8, #e6b24a 35%, #a87418 70%, #f4cf6e);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font-family: "Fraunces", Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.55;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(90, 23, 53, .75), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(42, 116, 214, .14), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-hi); }
.script { font-family: "Kaushan Script", "Brush Script MT", cursive; font-weight: 400; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.4em; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1.1 "Fraunces", Georgia, serif; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-primary { color: #fff; background: linear-gradient(90deg, var(--rose), #b2246a 55%, var(--blue-dk)); box-shadow: 0 6px 20px rgba(224, 24, 92, .35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(224, 24, 92, .5); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); }
.btn-outline { color: var(--gold-hi); background: transparent; border-color: var(--line); }
.btn-small { min-height: 40px; padding: .45em 1em; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-disabled { color: var(--muted); background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); cursor: default; }
.btn-patreon { color: #fff; background: #ff424d; box-shadow: 0 6px 22px rgba(255, 66, 77, .35); font-size: 1.05rem; padding: .8em 1.6em; }
.btn-patreon:hover { transform: translateY(-1px); background: #ff5761; }
.soon-pill { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: .2em .55em; border-radius: 999px; background: var(--gold-grad); color: #2a1a05; }

/* Age gate */
.gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(ellipse at 50% 30%, rgba(90, 23, 53, .9), rgba(11, 8, 11, .98) 70%);
  backdrop-filter: blur(6px);
}
.age-ok .gate { display: none; }
html:not(.age-ok) .page { filter: blur(10px); pointer-events: none; user-select: none; }
html:not(.age-ok) body { overflow: hidden; }
.gate-card {
  width: min(420px, 100%); text-align: center; padding: 28px 22px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.gate-logo { border-radius: 20px; }
.gate-card h2 { margin: 0; font-size: 2rem; color: var(--pink); }
.gate-card p { margin: 0 0 6px; color: var(--muted); }
.gate-card .btn { width: 100%; }
.badge-18 {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  font-weight: 800; font-size: 1.15rem; color: #fff; background: var(--bg);
  border: 3px solid transparent; background-image: linear-gradient(var(--bg), var(--bg)), linear-gradient(135deg, var(--pink), var(--blue));
  background-origin: border-box; background-clip: padding-box, border-box;
}
.badge-18.small { width: 34px; height: 34px; font-size: .75rem; border-width: 2px; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-left)); padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(11, 8, 11, .82); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(230, 178, 74, .18);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { border-radius: 9px; }
.brand-name { font-size: 1.35rem; color: var(--pink); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav > a { display: none; color: var(--text); text-decoration: none; font-weight: 500; }
.nav > a:hover { color: var(--pink-hi); }
.toast {
  position: fixed; z-index: 20; top: 70px; right: 12px; left: 12px; margin: 0 auto; max-width: 420px;
  padding: 12px 16px; border-radius: 12px; background: #23131c; border: 1px solid var(--line); color: var(--text); font-size: .95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

/* Hero */
main { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }
.hero { text-align: center; padding: 18px 0 36px; }
.hero-logo { width: min(440px, 92%); margin: 0 auto; }
.tagline { font-family: "Kaushan Script", cursive; font-size: clamp(1.45rem, 5.6vw, 2.2rem); line-height: 1.3; margin: 4px 0 8px; color: var(--pink-hi); }
.sub { margin: 0 auto 22px; max-width: 34em; color: var(--muted); }
.hero-cta { display: flex; flex-direction: column; gap: 12px; align-items: stretch; max-width: 340px; margin: 0 auto; }

/* Sections */
section { scroll-margin-top: 70px; }
.section-title {
  margin: 0; text-align: center; font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 700; letter-spacing: .02em;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { text-align: center; color: var(--muted); margin: 6px 0 22px; }
.library, .how, .support { padding: 30px 0; }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; }
.card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
  background: var(--card); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 12px 34px rgba(0, 0, 0, .45);
}
.card-live { border-color: var(--line); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg2); }
.card-media > img:first-child { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: transform .4s ease; }
.card-live:hover .card-media > img:first-child { transform: scale(1.04); }
.card-logo { position: absolute; left: 50%; top: 50%; width: 72%; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .8)); }
.soon-media { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(224, 24, 92, .25), transparent 65%), #140b11; }
.soon-media.blue { background: radial-gradient(circle at 50% 45%, rgba(79, 163, 255, .22), transparent 65%), #0c0d16; }
.soon-media svg { width: 110px; opacity: .55; filter: grayscale(.25); transform: rotate(-8deg); }
.soon-media .q { position: absolute; font: 400 3.4rem/1 "Kaushan Script", cursive; color: var(--gold-hi); text-shadow: 0 3px 10px rgba(0, 0, 0, .9); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.card-body p { margin: 0 0 8px; color: var(--muted); flex: 1; }
.card-title { margin: 0; font-size: 1.8rem; color: var(--pink); }
.card-soon .card-title { color: var(--blue-hi); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; padding: .25em .7em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); color: var(--muted); }
.tag-new { background: var(--gold-grad); color: #2a1a05; border: 0; font-weight: 700; }
.tag-soon { border-color: rgba(79, 163, 255, .5); color: var(--blue-hi); }

/* How it works */
.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .08);
}
.step-n { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--rose), var(--blue-dk)); }
.steps strong { font-size: 1.05rem; }
.steps li span:last-child { color: var(--muted); font-size: .95rem; }

/* Support */
.support { text-align: center; }
.support p { max-width: 32em; margin: 12px auto 20px; color: var(--muted); }

/* Footer */
.site-footer { margin-top: 30px; padding: 24px 16px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(230, 178, 74, .18); text-align: center; color: var(--muted); font-size: .9rem; }
.footer-18 { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 560px; margin: 0 auto 10px; text-align: left; }
.copy { margin: 0; }

@media (min-width: 640px) {
  .nav > a { display: inline; }
  .brand-name { font-size: 1.6rem; }
  .hero-cta { flex-direction: row; justify-content: center; max-width: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { grid-template-columns: 1fr; text-align: center; justify-items: center; row-gap: 6px; }
  .step-n { grid-row: auto; }
}
@media (min-width: 960px) {
  .site-header { padding-left: 28px; padding-right: 28px; }
  .hero { padding-top: 28px; }
  .hero-logo { width: 460px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card-live { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Accounts (v2) ---------- */
.acct { position: relative; }
.acct-btn { gap: .45em; padding-left: .45em; max-width: 46vw; }
.acct-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; font-weight: 800; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--rose), var(--blue-dk)); }
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; border-radius: 14px; z-index: 30;
  background: #1c1017; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, .6); display: flex; flex-direction: column;
}
.acct-menu[hidden] { display: none; }
.acct-menu-email { margin: 4px 10px 8px; font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left; padding: 10px; border-radius: 10px; border: 0; background: none;
  color: var(--text); font: 500 1rem/1.2 "Fraunces", Georgia, serif; text-decoration: none; cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: rgba(255, 111, 174, .12); outline: none; }

/* Favorite heart on game cards */
.card { position: relative; }
.fav {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(11, 8, 11, .62); backdrop-filter: blur(4px); cursor: pointer; padding: 0;
  transition: transform .15s ease, background .15s ease;
}
.fav svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; }
.fav:hover { transform: scale(1.08); }
.fav:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.fav[aria-pressed="true"] { background: rgba(224, 24, 92, .25); border-color: var(--pink); }
.fav[aria-pressed="true"] svg { fill: var(--rose); stroke: var(--pink-hi); }

/* Modal */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: rgba(11, 8, 11, .78); backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative; width: min(420px, 100%); padding: 24px 20px 18px; border-radius: var(--radius); text-align: center;
  background: linear-gradient(180deg, rgba(90, 23, 53, .55), rgba(24, 14, 20, .96) 45%), #180e14; border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}
.modal-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.modal-x:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.modal-logo { margin: 0 auto 4px; border-radius: 12px; }
.modal-card h2 { margin: 0; font-size: 2rem; color: var(--pink); }
.modal-why { margin: 4px 0 14px; color: var(--muted); font-size: .92rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.tabs button { min-height: 40px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 .95rem/1 "Fraunces", Georgia, serif; cursor: pointer; }
.tabs button[aria-selected="true"] { color: #fff; background: linear-gradient(90deg, var(--rose), #b2246a 55%, var(--blue-dk)); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.form[hidden] { display: none; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: .92rem; font-weight: 600; color: var(--text); }
.form .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.form input[type=email], .form input[type=password], .form input[type=text] {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .35); color: var(--text); font: 400 1rem/1.2 "Fraunces", Georgia, serif;
}
.form input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 111, 174, .25); }
.form .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.form .check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--rose); }
.form-err { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(224, 24, 92, .14); border: 1px solid rgba(224, 24, 92, .5); color: #ffd0e0; font-size: .92rem; }
.form-err[hidden] { display: none; }
.form-ok { margin: 0; color: #a8f0c6; font-size: .92rem; }
.form-foot { margin: 0; text-align: center; color: var(--muted); font-size: .82rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Account page */
.account { width: min(720px, 100%); margin: 0 auto; padding: 24px 0 10px; }
.account-head { text-align: center; margin-bottom: 18px; }
.account-head h1 { margin: 0; font-size: clamp(2rem, 8vw, 2.8rem); color: var(--pink); font-weight: 400; }
.account-head p { margin: 4px 0 0; color: var(--muted); }
.panel { padding: 18px; margin-bottom: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid rgba(255, 255, 255, .1); }
.panel h2 { margin: 0 0 12px; font-size: 1.25rem; color: var(--gold-hi); }
.panel p { color: var(--muted); }
.panel-danger { border-color: rgba(224, 24, 92, .45); }
.panel-danger h2 { color: var(--pink-hi); }
.btn-danger { color: #fff; background: #a3123f; border-color: #e0185c; }
.btn-danger:hover { background: #c0164b; }
.fav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fav-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.fav-list .fav-name { flex: 1; font-family: "Kaushan Script", cursive; font-size: 1.35rem; color: var(--pink); }
.fav-list .btn { min-height: 40px; }
.fav-list .unfav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pink); background: rgba(224, 24, 92, .2); color: var(--pink-hi); cursor: pointer; font-size: 1.1rem; }
.empty { margin: 0; }
.signed-out { text-align: center; }
@media (min-width: 640px) { .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; } .modal-card { padding: 28px 28px 22px; } }

/* Legal pages (/privacy/, /terms/, /disclaimer/) */
.legal { width: min(780px, 100%); margin: 0 auto; padding: 24px 0 10px; }
.legal-head { text-align: center; margin-bottom: 18px; }
.legal-head h1 { margin: 0; font-size: clamp(2rem, 8vw, 2.8rem); color: var(--pink); font-weight: 400; }
.legal-head p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.legal .panel h2 { font-size: 1.2rem; margin-top: 0; }
.legal .panel h3 { margin: 16px 0 6px; font-size: 1.02rem; color: var(--text); }
.legal .panel p, .legal .panel li { color: var(--muted); }
.legal .panel ul { padding-left: 1.2em; margin: 8px 0; }
.legal .panel li { margin: 4px 0; }
.legal strong { color: var(--text); }
.legal .summary { border-color: var(--line); }
.legal .toc { columns: 2 220px; margin: 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 8px 0; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid rgba(255, 255, 255, .1); color: var(--muted); }
.legal th { color: var(--gold-hi); font-weight: 600; }
.legal .caps { text-transform: none; font-size: .92rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 0 0 10px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--pink-hi); }
.gate-legal { margin: 2px 0 0 !important; font-size: .82rem; }
.gate-legal a { color: var(--pink-hi); }
.form .check a { color: var(--pink-hi); }
.linkish { background: none; border: 0; padding: 0; color: var(--pink-hi); font: inherit; text-decoration: underline; cursor: pointer; }
.tabs[hidden] { display: none; }

/* Patreon + early access */
.ea-lock { max-width: 640px; margin: 8vh auto; padding: 0 16px; }
.ea-panel { text-align: center; }
.ea-panel .tag { display: inline-block; margin: 0 0 8px; }
.ea-panel h1 { margin: .1em 0; }
.ea-panel .hero-cta { justify-content: center; margin: 16px 0; }
.pt-status { font-weight: 600; }
.pt-actions { margin: 12px 0; }
.btn[hidden], .panel[hidden] { display: none !important; }

/* ===== Homepage layout v5: compact hero, game tiles fill the first screen ===== */
.hero { padding: 6px 0 4px; }
.hero-logo { width: min(110px, 32%); }
.tagline { font-size: clamp(1rem, 4.2vw, 1.35rem); line-height: 1.2; margin: 0 0 2px; }
.sub { margin: 0 auto 4px; font-size: .85rem; }
.library { padding-top: 6px; }
/* Game Library heading in the brand script + pink, like the header name and tagline */
.library .section-title {
  font-family: "Kaushan Script", cursive; font-weight: 400; letter-spacing: 0; line-height: 1.2;
  font-size: clamp(1.6rem, 5vw, 2.1rem); background: none; -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--pink); text-shadow: 0 2px 14px rgba(224, 24, 92, .35);
}
.library .section-sub { margin: 0 0 10px; font-size: .9rem; color: var(--pink-hi); opacity: .8; }
/* Center game names and their tags in each tile */
.library .card-title { text-align: center; }
.library .card-tags { justify-content: center; }

/* Phones: swipeable row of game cards so the next game peeks in from the side */
@media (max-width: 639px) {
  .library .cards {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    margin: 0 -16px; padding: 2px 16px 22px; scroll-padding: 0 16px; scrollbar-width: none;
  }
  .library .cards::-webkit-scrollbar { display: none; }
  .library .card { scroll-snap-align: start; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
  .library .card-media { aspect-ratio: 16 / 10; }
  .library .card-body { padding: 12px 14px 14px; gap: 6px; }
}

/* Desktop: small logo beside a one-line tagline */
@media (min-width: 960px) {
  .hero {
    display: grid; grid-template-columns: auto minmax(0, 620px); grid-template-rows: 1fr auto auto 1fr;
    justify-content: center; align-items: center; column-gap: 22px; text-align: left; padding: 8px 0 2px;
  }
  .hero-logo { grid-column: 1; grid-row: 1 / 5; width: 104px; margin: 0; }
  .tagline, .sub { grid-column: 2; }
  .tagline { grid-row: 2; font-size: 1.3rem; }
  .sub { grid-row: 3; margin: 0; max-width: none; }
  .library { padding-top: 4px; }
  .library .card-media { aspect-ratio: 16 / 10; }
}
