:root {
  --ink: #0b0b0d;
  --paper: #fffefb;
  --yellow: #ffd765;
  --blue: #69bdf5;
  --lilac: #e9d5fa;
  --mint: #d8f5df;
  --soft-blue: #dff2ff;
  --line: #d8d8d8;
  --shadow: 4px 5px 0 #111;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
.shell { width: min(1230px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 82px; padding: 14px max(20px, calc((100vw - 1230px)/2)); border-bottom: 1px solid var(--line); display:flex; align-items:center; gap:28px; background:rgba(255,254,251,.97); position:sticky; top:0; z-index:20; }
.mini-brand { display:flex; align-items:center; gap:10px; text-decoration:none; font-weight:950; letter-spacing:-.02em; }
.mini-cat { width:38px; height:38px; border-radius:50%; background:#111; display:grid; place-items:center; }
.mini-cat-logo { width:42px; height:42px; object-fit:contain; object-position:center; flex:0 0 auto; display:block; }
.mini-studio { letter-spacing:.35em; font-size:.78em; margin-left:4px; }
.main-nav { margin-left:auto; display:flex; align-items:center; gap:12px; font-weight:850; }
.main-nav a { text-decoration:none; padding:11px 14px; border-radius:14px; }
.main-nav a:hover, .main-nav a.active { background:var(--yellow); }
.main-nav .studio-link { background:#fff; border:2px solid #111; box-shadow:3px 3px 0 #111; }
.menu-button { display:none; margin-left:auto; font-size:22px; border:2px solid #111; background:#fff; border-radius:12px; padding:7px 10px; }
.hero { display:grid; grid-template-columns: 1.45fr .75fr; gap:45px; align-items:end; padding-top:42px; }
.eyebrow { display:inline-block; background:#f4f4f4; border:1px solid #ddd; border-radius:999px; padding:8px 13px; font-weight:800; font-size:.95rem; }
.hero h1, .page-title { font-size:clamp(3.7rem,8vw,7.2rem); line-height:.82; letter-spacing:-.075em; margin:22px 0 14px; font-weight:1000; }
.studio-pill { display:inline-block; padding:8px 26px 10px; border-radius:999px; background:var(--yellow); font-size:clamp(2rem,4vw,3.7rem); font-weight:950; letter-spacing:.17em; line-height:1; }
.hero h2 { font-size:clamp(1.45rem,2.5vw,2rem); margin:20px 0 4px; letter-spacing:-.035em; font-weight:850; }
.credit { font-size:1.08rem; margin:0 0 23px; font-weight:600; }
.hero-actions { display:flex; gap:16px; flex-wrap:wrap; }
.button { text-decoration:none; display:inline-flex; align-items:center; justify-content:center; min-height:56px; padding:0 24px; border:2px solid #111; border-radius:14px; font-weight:950; box-shadow:var(--shadow); transition:.12s ease; }
.button:hover { transform:translate(-1px,-1px); box-shadow:6px 7px 0 #111; }
.button.blue { background:var(--blue); }
.button.yellow { background:var(--yellow); }
.button.small { min-height:44px; box-shadow:3px 3px 0 #111; margin-top:14px; }
.hero-mascot { min-height:350px; display:flex; align-items:flex-end; justify-content:center; position:relative; overflow:visible; transform:translateX(-50px); }
.hero-mascot img { width:min(450px,100%); max-height:350px; object-fit:contain; object-position:bottom center; image-rendering:auto; }
.speech { position:absolute; right:-3%; top:3%; z-index:2; background:#fff; border:3px solid #111; border-radius:28px; padding:17px 22px; font-size:1.25rem; font-weight:800; transform:rotate(-2deg); }
.feature-grid { display:grid; grid-template-columns: 2fr 1fr; gap:16px; margin-top:18px; }
.panel { border:1px solid #cfd5da; border-radius:24px; padding:18px; }
.games-panel { background:var(--soft-blue); }
.world-panel { background:var(--lilac); }
.panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.panel h3, .section-title-row h3 { margin:0; font-size:2rem; letter-spacing:-.04em; }
.panel p { margin:3px 0 13px; font-size:1.05rem; }
.outline-link { text-decoration:none; border:2px solid #1474d4; background:#fff; padding:11px 16px; border-radius:14px; font-weight:900; white-space:nowrap; }
.game-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.home-game-hero-grid { grid-template-columns:1fr; }
.home-game-hero-card {
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(230px,.9fr);
  min-height:270px;
  border:2px solid #111;
  box-shadow:4px 5px 0 #111;
}
.home-game-hero-art { min-height:270px; }
.home-game-hero-card .home-game-hero-cover {
  width:100%;
  height:100%;
  min-height:270px;
  object-fit:cover;
}
.home-game-hero-copy {
  justify-content:center;
  padding:24px;
}
.home-game-hero-copy .game-title-link strong {
  display:block;
  font-size:clamp(1.7rem,3vw,2.5rem);
  line-height:1;
  letter-spacing:-.045em;
  margin:7px 0 8px;
}
.home-game-hero-copy > span {
  font-size:1rem;
  line-height:1.45;
}
.home-game-hero-kicker {
  width:max-content;
  border:1px solid #111;
  border-radius:999px;
  background:var(--yellow);
  padding:5px 9px;
  font-size:.7rem;
  font-weight:950;
  letter-spacing:.07em;
}
.game-card { overflow:hidden; border:1px solid #d4d7da; border-radius:16px; background:#fff; }
.placeholder-art { height:130px; display:grid; place-items:center; font-weight:950; letter-spacing:.12em; color:#fff; }
.placeholder-art.sky { background:linear-gradient(145deg,#62c9ff,#7ce091); }
.placeholder-art.purple { background:linear-gradient(145deg,#5d48c7,#a071e7); }
.placeholder-art.green { background:linear-gradient(145deg,#73d66b,#f1c052); }
.card-copy { padding:11px 12px 13px; display:flex; flex-direction:column; gap:2px; }
.card-copy strong { font-size:1.05rem; }
.card-copy span { color:#666; }
.world-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.world-grid a { min-height:58px; text-decoration:none; background:#fff; border:1px solid #d4d4d4; border-radius:14px; display:flex; align-items:center; gap:9px; padding:10px 12px; font-weight:800; font-size:1.05rem; }
.world-grid a:hover { transform:translateY(-1px); }
.latest-grid { display:grid; grid-template-columns:2fr 1fr; gap:16px; margin-top:16px; }
#other-releases[hidden] + .from-world-releases { grid-column:1 / -1; }
.section-title-row { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:8px; }
.section-title-row h3 { font-size:1.6rem; }
.section-title-row a { font-weight:800; color:#176dd4; text-decoration:none; }
.latest-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.latest-grid > div:last-child .latest-cards { grid-template-columns:1fr; }
.latest-card { background:#fff; border:1px solid #ddd; border-radius:14px; padding:14px; display:flex; flex-direction:column; min-height:78px; }
.latest-card span { color:#666; font-size:.92rem; margin-top:4px; }
.ad-slot { min-height:62px; border:1.5px dashed #b8c0cc; border-radius:12px; color:#7c8695; display:grid; place-items:center; margin-top:14px; font-weight:700; background:#fafcff; }
.ad-slot[hidden] { display:none; }
.site-footer { border-top:1px solid #ddd; margin-top:44px; padding:28px 0 36px; display:flex; justify-content:space-between; color:#555; }
.page-shell { padding-top:50px; min-height:70vh; }
.page-shell.narrow { max-width:900px; }
.page-title { font-size:clamp(4rem,8vw,7rem); }
.page-intro { max-width:720px; font-size:1.25rem; line-height:1.55; }
.catalog { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:30px; }
.empty-state { border:2px dashed #bbb; border-radius:20px; padding:38px; background:#fff; color:#555; min-height:180px; display:flex; flex-direction:column; justify-content:center; }
.world-section { margin:48px 0; scroll-margin-top:110px; }
.world-section h2 { font-size:2rem; }
.about-box { margin-top:30px; border:2px solid #111; border-radius:22px; padding:30px; box-shadow:6px 6px 0 #111; background:#fff; font-size:1.12rem; line-height:1.6; }
.about-box h2 { margin:0 0 10px; font-size:1.55rem; letter-spacing:-.035em; }
.about-box p { margin:0 0 16px; }
.about-contact { margin-top:28px; padding:20px; border:2px solid #111; border-radius:18px; background:var(--soft-blue); }
.about-contact p:last-child { margin-bottom:0; }
.about-contact a { color:#176dd4; }
.privacy-note { margin-top:18px; background:#fff3c9; padding:18px 20px; border-radius:16px; }
.privacy-note p:last-child { margin-bottom:0; }
@media (max-width: 900px) {
  .site-header { min-height:68px; }
  .mini-studio { display:none; }
  .mini-cat-logo { width:38px; height:38px; }
  .menu-button { display:block; }
  .main-nav { display:none; position:absolute; right:20px; top:66px; background:#fff; border:2px solid #111; border-radius:16px; padding:10px; flex-direction:column; align-items:stretch; box-shadow:5px 5px 0 #111; }
  .main-nav.open { display:flex; }
  .hero { grid-template-columns:1fr; gap:14px; padding-top:22px; }
  .hero-mascot { order:-1; min-height:220px; justify-content:flex-end; transform:none; }
  .hero-mascot img { max-height:240px; width:320px; }
  .speech { left:0; right:auto; top:20px; font-size:1rem; }
  .feature-grid, .latest-grid { grid-template-columns:1fr; }
  .game-grid, .latest-cards, .catalog { grid-template-columns:1fr; }
  .panel-heading { align-items:center; }
}
@media (max-width: 520px) {
  .shell { width:min(100% - 24px,1230px); }
  .hero h1, .page-title { font-size:3.6rem; }
  .studio-pill { font-size:2rem; }
  .hero-actions { display:grid; }
  .button { width:100%; }
  .world-grid { grid-template-columns:1fr; }
  .site-footer { flex-direction:column; gap:8px; }
}


/* Creator Studio */
.studio-body { background:#f8f6ef; }
.studio-header { position:static; }
.studio-public-link { text-decoration:none; font-weight:900; border:2px solid #111; border-radius:12px; padding:10px 14px; background:#fff; box-shadow:3px 3px 0 #111; }
.studio-shell { padding-top:34px; padding-bottom:70px; }
.studio-intro { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:26px; }
.studio-title { font-size:clamp(3rem,7vw,6rem); line-height:.9; margin:16px 0 8px; letter-spacing:-.06em; }
.studio-intro p { margin:0; font-size:1.12rem; font-weight:650; }
.mode-badge { max-width:330px; background:#fff3c9; border:2px solid #111; border-radius:18px; padding:14px 16px; box-shadow:4px 4px 0 #111; }
.mode-badge strong, .mode-badge span { display:block; }
.mode-badge span { margin-top:4px; color:#555; font-size:.92rem; line-height:1.35; }
.studio-dashboard { display:grid; grid-template-columns:320px 1fr; gap:20px; align-items:start; }
.studio-sidebar, .studio-editor { background:#fff; border:2px solid #111; border-radius:22px; box-shadow:6px 6px 0 #111; }
.studio-sidebar { padding:16px; }
.studio-choice { width:100%; border:2px solid #111; border-radius:16px; background:#fff; padding:14px; display:flex; gap:12px; align-items:flex-start; text-align:left; cursor:pointer; margin-bottom:10px; }
.studio-choice.active { background:var(--yellow); }
.studio-choice > span:first-child { font-size:1.5rem; }
.studio-choice b, .studio-choice small { display:block; }
.studio-choice b { font-size:1rem; }
.studio-choice small { margin-top:2px; color:#555; line-height:1.3; }
.studio-list-wrap { margin-top:20px; border-top:1px solid #ddd; padding-top:14px; }
.studio-list-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.studio-list-head h2 { margin:0; font-size:1.15rem; }
.text-button { border:0; background:transparent; font:inherit; font-weight:900; cursor:pointer; }
.studio-items { display:grid; gap:8px; margin-top:10px; }
.studio-item { width:100%; border:1px solid #ddd; border-radius:13px; background:#fff; display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; text-align:left; padding:10px; cursor:pointer; }
.studio-item.active { border-color:#111; background:#f9f9f9; }
.studio-item-icon { font-size:1.15rem; }
.studio-item-copy b, .studio-item-copy small { display:block; }
.studio-item-copy small { color:#666; margin-top:2px; }
.status-dot { width:9px; height:9px; border-radius:50%; background:#aaa; }
.status-dot.published { background:#2cb66c; }
.studio-empty { border:1px dashed #bbb; border-radius:12px; padding:16px; color:#777; }
.studio-editor { padding:22px; }
.studio-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.field { display:flex; flex-direction:column; gap:7px; font-weight:800; }
.field.full, .check-field.full { grid-column:1 / -1; }
.field > span { font-size:.95rem; }
.field em { font-weight:500; color:#777; }
.field input, .field select, .field textarea { width:100%; font:inherit; border:2px solid #cfcfcf; border-radius:12px; padding:12px 13px; background:#fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline:0; border-color:#111; box-shadow:0 0 0 3px rgba(255,215,101,.35); }
.field small { color:#777; font-weight:500; line-height:1.35; }
.check-field { display:flex; align-items:flex-start; gap:10px; font-weight:750; background:#fafafa; border:1px solid #ddd; border-radius:12px; padding:12px 13px; }
.check-field input { margin-top:3px; }
.cover-preview { min-height:180px; border:2px dashed #c8c8c8; border-radius:16px; display:grid; place-items:center; overflow:hidden; background:#fafafa; color:#888; }
.cover-preview img { width:100%; height:240px; object-fit:cover; display:block; }
.studio-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:22px; align-items:center; }
.button.white { background:#fff; }
.danger-button { margin-left:auto; border:2px solid #b00020; background:#fff; color:#b00020; border-radius:12px; font-weight:950; cursor:pointer; padding:11px 14px; }
.danger-button:hover { background:#fff0f2; transform:translateY(-1px); }
.studio-toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px); background:#111; color:#fff; padding:11px 16px; border-radius:999px; opacity:0; pointer-events:none; transition:.2s; z-index:90; font-weight:800; }
.studio-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.preview-modal { position:fixed; inset:0; background:rgba(0,0,0,.52); z-index:80; display:grid; place-items:center; padding:24px; }
.preview-modal[hidden] { display:none; }
.preview-dialog { position:relative; width:min(720px,100%); max-height:88vh; overflow:auto; background:#fff; border:3px solid #111; border-radius:22px; box-shadow:8px 8px 0 #111; padding:24px; }
.preview-dialog h2 { font-size:2.2rem; margin:12px 0; }
.preview-close { position:absolute; top:10px; right:12px; border:0; background:transparent; font-size:2rem; cursor:pointer; }
.preview-cover { width:100%; max-height:360px; object-fit:cover; border-radius:16px; border:1px solid #ddd; }
.preview-placeholder { min-height:220px; display:grid; place-items:center; background:linear-gradient(135deg,#dff2ff,#e9d5fa); font-weight:950; letter-spacing:.08em; }
.preview-note { background:#fff3c9; padding:12px 14px; border-radius:12px; margin:14px 0; }
.published-card .game-cover, .game-cover { width:100%; height:170px; object-fit:cover; display:block; background:#eee; }
.content-cover { width:130px; height:100px; object-fit:cover; border-radius:12px; background:#eee; }
.content-cover-empty { display:grid; place-items:center; background:linear-gradient(135deg,#f2e8ff,#dff6e5); font-weight:900; font-size:.75rem; letter-spacing:.06em; text-align:center; padding:8px; }
.card-play { margin-top:10px; align-self:flex-start; border:2px solid #111; border-radius:10px; background:var(--yellow); font-weight:900; padding:8px 11px; cursor:pointer; }
.world-card { display:grid; grid-template-columns:130px 1fr; gap:14px; align-items:center; background:#fff; border:1px solid #ddd; border-radius:16px; padding:12px; }
.world-card h3 { margin:0 0 4px; }
.world-card p { margin:0 0 5px; color:#444; }
.world-card small { color:#777; }

@media (max-width: 900px) {
  .studio-intro { align-items:flex-start; flex-direction:column; }
  .mode-badge { max-width:none; width:100%; }
  .studio-dashboard { grid-template-columns:1fr; }
  .studio-sidebar { order:2; }
  .studio-editor { order:1; }
}
@media (max-width: 600px) {
  .studio-form-grid { grid-template-columns:1fr; }
  .field.full, .check-field.full { grid-column:auto; }
  .studio-actions { display:grid; grid-template-columns:1fr 1fr; }
  .studio-actions .button, .danger-button { width:100%; margin-left:0; }
  .world-card { grid-template-columns:1fr; }
  .content-cover { width:100%; height:180px; }
}


/* Supabase Studio auth */
.studio-header-actions { margin-left:auto; display:flex; align-items:center; gap:12px; }
.studio-user-label { font-weight:850; color:#555; }
.studio-auth-card { width:min(560px,100%); margin:54px auto 0; background:#fff; border:2px solid #111; border-radius:24px; padding:26px; box-shadow:7px 7px 0 #111; }
.studio-auth-card h1 { margin:16px 0 8px; font-size:clamp(2.5rem,6vw,4.6rem); line-height:.9; letter-spacing:-.05em; }
.studio-auth-card > p { color:#555; font-size:1.05rem; line-height:1.5; }
.studio-sign-in-form { display:grid; gap:14px; margin-top:22px; }
.form-message { min-height:1.4em; margin:0; color:#9a1025; font-weight:750; }
.studio-forgot-password { justify-self:start; border:0; background:transparent; padding:0; color:#555; font:inherit; font-weight:850; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.studio-forgot-password:hover { color:#111; }
.mode-badge.live-mode { background:#dff6e5; }
.editor-status-row { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.editor-status { display:inline-flex; align-items:center; min-height:30px; padding:5px 10px; border-radius:999px; background:#f0f0f0; font-size:.78rem; font-weight:950; letter-spacing:.06em; }
.approval-meta { color:#68716a; font-size:.88rem; }
.studio-filter-row { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.filter-chip { border:1px solid #cfcfcf; background:#fff; border-radius:999px; padding:6px 9px; font:inherit; font-size:.78rem; font-weight:850; cursor:pointer; }
.filter-chip.active { background:#111; color:#fff; border-color:#111; }
.status-dot.review { background:#f2a900; }
.parent-check-panel { border:2px solid #111; border-radius:18px; padding:16px; background:#fff8dc; display:grid; gap:10px; }
.parent-check-panel[hidden] { display:none; }
.parent-check-panel > div > strong { font-size:1.15rem; }
.parent-check-panel > div > p { margin:4px 0 2px; color:#555; }
.parent-check-panel .check-field { background:#fff; }
.world-open-link { display:inline-block; margin-top:8px; font-weight:900; text-decoration:none; color:#176dd4; }
.card-play { text-decoration:none; color:#111; }

@media (max-width: 700px) {
  .studio-header-actions { gap:8px; }
  .studio-user-label { display:none; }
  .studio-public-link { padding:8px 10px; font-size:.85rem; }
  .studio-auth-card { margin-top:28px; padding:20px; }
  .editor-status-row { align-items:flex-start; flex-direction:column; }
}


/* Studio scheduling, analytics and Paws Up feedback */
.status-dot.scheduled { background:#6f5bd3; }

.game-card-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:9px; }
.game-card-actions .card-play { margin-top:0; }

.paws-up-control {
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}
.paws-up-count {
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 9px;
  border-radius:999px;
  background:#fff8dc;
  color:#5d4a00 !important;
  font-size:.8rem;
  font-weight:900;
  white-space:nowrap;
}
.game-star {
  border:1px solid #bbb;
  border-radius:10px;
  background:#fff;
  padding:8px 10px;
  font:inherit;
  font-size:.78rem;
  font-weight:950;
  cursor:pointer;
}
.game-star:hover:not(:disabled) { background:#fff8dc; border-color:#111; }
.game-star.starred { background:#fff3c9; border-color:#e0b844; color:#5d4a00; cursor:default; }
.game-star:disabled:not(.starred) { background:#f3f3f3; border-color:#ccc; color:#777; cursor:default; }

.home-game-hero-copy .game-card-actions {
  margin-top:16px;
  align-items:flex-start;
}
.home-game-play {
  width:100%;
  min-height:56px;
  cursor:pointer;
  font-size:.98rem;
}
.home-game-hero-copy .game-page-link {
  align-self:center;
}

#release-field input:disabled { background:#f2f2f2; color:#555; cursor:not-allowed; }

.studio-analytics {
  margin-bottom:22px;
  background:#fff;
  border:2px solid #111;
  border-radius:22px;
  box-shadow:6px 6px 0 #111;
  padding:20px;
}
.analytics-head { display:flex; justify-content:space-between; align-items:flex-end; gap:18px; }
.analytics-head h2 { margin:10px 0 0; font-size:clamp(1.7rem,3vw,2.7rem); letter-spacing:-.045em; }
.analytics-range { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.analytics-range button {
  border:1px solid #ccc;
  background:#fff;
  border-radius:999px;
  padding:7px 10px;
  font:inherit;
  font-size:.82rem;
  font-weight:900;
  cursor:pointer;
}
.analytics-range button.active { background:#111; color:#fff; border-color:#111; }

.analytics-summary {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin-top:18px;
}
.analytics-summary article {
  border:1px solid #ddd;
  border-radius:16px;
  padding:14px;
  background:#fafafa;
}
.analytics-summary span, .analytics-summary strong { display:block; }
.analytics-summary span { color:#666; font-size:.9rem; font-weight:750; }
.analytics-summary strong { margin-top:4px; font-size:2rem; letter-spacing:-.04em; }

.analytics-grid { display:grid; grid-template-columns:1.3fr 1fr; gap:12px; margin-top:12px; }
.analytics-card { border:1px solid #ddd; border-radius:16px; padding:14px; min-width:0; }
.analytics-card-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.analytics-card-head > span { color:#777; font-size:.82rem; font-weight:750; }

.analytics-chart {
  height:210px;
  display:flex;
  align-items:flex-end;
  gap:4px;
  padding-top:22px;
  overflow:hidden;
}
.analytics-bar-wrap {
  min-width:5px;
  flex:1;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:center;
  position:relative;
}
.analytics-bar {
  width:min(22px,80%);
  min-height:4px;
  background:var(--blue);
  border:1px solid #111;
  border-radius:6px 6px 2px 2px;
}
.analytics-bar-value {
  font-size:.65rem;
  font-weight:850;
  margin-bottom:3px;
  min-height:1em;
}
.analytics-bar-wrap > span {
  height:30px;
  margin-top:4px;
  font-size:.62rem;
  color:#777;
  text-align:center;
  white-space:nowrap;
}
.analytics-empty {
  width:100%;
  min-height:120px;
  display:grid;
  place-items:center;
  color:#777;
  text-align:center;
}

.analytics-games { display:grid; gap:7px; margin-top:12px; }
.analytics-game-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto auto;
  gap:10px;
  align-items:center;
  border-top:1px solid #eee;
  padding-top:9px;
}
.analytics-game-row:first-child { border-top:0; padding-top:0; }
.analytics-game-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.analytics-game-row span { color:#555; font-size:.84rem; font-weight:800; }

@media (max-width: 900px) {
  .analytics-head { align-items:flex-start; flex-direction:column; }
  .analytics-range { justify-content:flex-start; }
  .analytics-grid { grid-template-columns:1fr; }
}

@media (max-width: 600px) {
  .analytics-summary { grid-template-columns:1fr 1fr; }
  .analytics-game-row { grid-template-columns:1fr auto auto auto; gap:7px; }
  .analytics-game-row span { font-size:.75rem; }
  .analytics-chart { height:180px; }
  .analytics-bar-value { display:none; }
}


/* First-party traffic analytics */
.analytics-summary { grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); }

.analytics-card-wide { grid-column:1 / -1; }
.traffic-legend { display:flex; gap:14px; flex-wrap:wrap; margin-top:10px; color:#666; font-size:.8rem; font-weight:800; }
.traffic-legend span { display:inline-flex; align-items:center; gap:6px; }
.traffic-key { width:14px; height:4px; border-radius:999px; display:inline-block; }
.traffic-key.views { background:#69bdf5; }
.traffic-key.visits { background:#6f5bd3; }
.traffic-key.visitors { background:#55b878; }

.traffic-chart { min-height:230px; margin-top:4px; }
.traffic-svg { width:100%; height:230px; display:block; overflow:visible; }
.traffic-grid-line { stroke:#d9d9d9; stroke-width:1; }
.traffic-line { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.traffic-line.views { stroke:#4ea9e9; }
.traffic-line.visits { stroke:#6f5bd3; }
.traffic-line.visitors { stroke:#55b878; }
.traffic-dot { fill:#4ea9e9; stroke:#fff; stroke-width:2; }
.traffic-axis-labels text { fill:#777; font-size:10px; font-weight:700; }

.analytics-list { display:grid; gap:7px; margin-top:12px; }
.analytics-list-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:10px;
  align-items:center;
  border-top:1px solid #eee;
  padding-top:9px;
}
.analytics-list-row:first-child { border-top:0; padding-top:0; }
.analytics-list-row.compact { grid-template-columns:minmax(0,1fr) auto; }
.analytics-list-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.analytics-list-row span { color:#555; font-size:.84rem; font-weight:800; }

@media (max-width: 600px) {
  .analytics-card-wide { grid-column:auto; }
  .traffic-svg { height:190px; }
  .traffic-chart { min-height:190px; }
  .analytics-list-row { grid-template-columns:1fr auto; }
  .analytics-list-row span:last-child { display:none; }
  .analytics-list-row.compact span:last-child { display:block; }
}


/* Studio section navigation */
.studio-page-nav {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 22px;
  padding:8px;
  background:#fff;
  border:2px solid #111;
  border-radius:18px;
  box-shadow:5px 5px 0 #111;
}
.studio-page-link {
  border:0;
  background:transparent;
  border-radius:12px;
  padding:11px 14px;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:7px;
}
.studio-page-link:hover { background:#f4f4f4; }
.studio-page-link.active { background:var(--yellow); }
.nav-count {
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background:#111;
  color:#fff;
  display:inline-grid;
  place-items:center;
  font-size:.72rem;
  line-height:1;
}
.nav-count[hidden] { display:none; }
.studio-page[hidden] { display:none; }

.studio-page-panel {
  background:#fff;
  border:2px solid #111;
  border-radius:22px;
  box-shadow:6px 6px 0 #111;
  padding:22px;
}
.studio-page-heading h2 {
  margin:12px 0 6px;
  font-size:clamp(2rem,4vw,3.5rem);
  letter-spacing:-.05em;
}
.studio-page-heading p {
  margin:0;
  color:#555;
  font-size:1.02rem;
  line-height:1.5;
  max-width:760px;
}
.studio-queue-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:22px;
}
.studio-queue-card {
  border:1px solid #ddd;
  border-radius:18px;
  padding:16px;
  background:#fafafa;
}
.studio-queue-card-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.studio-queue-icon { font-size:1.5rem; }
.studio-queue-card h3 {
  margin:12px 0 6px;
  font-size:1.25rem;
}
.studio-queue-card p {
  margin:0;
  color:#555;
  line-height:1.45;
  min-height:3em;
}
.studio-queue-meta {
  display:grid;
  gap:5px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #e4e4e4;
  color:#666;
  font-size:.86rem;
}
.studio-queue-meta strong { color:#111; }
.queue-open { margin-top:14px; width:100%; }
.studio-queue-empty {
  grid-column:1 / -1;
  min-height:160px;
  display:grid;
  place-items:center;
  text-align:center;
  border:2px dashed #ccc;
  border-radius:18px;
  color:#777;
  background:#fafafa;
}

@media (max-width: 900px) {
  .studio-queue-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 600px) {
  .studio-page-nav {
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .studio-page-link { justify-content:center; }
  .studio-queue-grid { grid-template-columns:1fr; }
}


/* Smart analytics dashboard */
.analytics-intro {
  max-width:760px;
  margin:8px 0 0;
  color:#5f625f;
  line-height:1.5;
  font-weight:650;
}
.analytics-section { margin-top:26px; }
.analytics-section + .analytics-section {
  border-top:1px solid #ddd;
  padding-top:26px;
}
.analytics-section-title {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:12px;
}
.analytics-section-title h3 {
  margin:5px 0 0;
  font-size:clamp(1.45rem,2.5vw,2.2rem);
  letter-spacing:-.04em;
}
.analytics-kicker {
  font-size:.86rem;
  font-weight:950;
  letter-spacing:.03em;
}
.analytics-note {
  color:#777;
  font-size:.82rem;
  font-weight:750;
  text-align:right;
}
.analytics-insight-panel {
  margin-top:18px;
  border:1px solid #d9d2b8;
  border-radius:18px;
  padding:16px;
  background:#fffaf0;
}
.analytics-insights {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
}
.insight-card {
  min-height:190px;
  border:1px solid #ddd;
  border-radius:16px;
  padding:14px;
  background:#fff;
  position:relative;
}
.insight-card.up { border-color:#9fd4ae; background:#f3fbf5; }
.insight-card.down { border-color:#e5b3b3; background:#fff7f7; }
.insight-card.steady { border-color:#d8d8d8; background:#fafafa; }
.insight-card.learning { border-color:#d9d2b8; background:#fffdf6; }
.insight-card.world { border-color:#b8d6ea; background:#f4fbff; }
.insight-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.insight-state {
  font-size:.75rem;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.insight-change {
  font-size:.75rem;
  font-weight:850;
  color:#666;
}
.insight-card h4 {
  margin:12px 0 5px;
  font-size:1rem;
}
.insight-value {
  display:block;
  font-size:1.7rem;
  letter-spacing:-.04em;
}
.insight-card p {
  color:#5d625e;
  line-height:1.4;
  margin:10px 0 0;
  font-size:.88rem;
}

.country-flag {
  font-size:1.15rem;
  vertical-align:-.05em;
}

.analytics-game-health {
  display:grid;
  gap:9px;
  margin-top:12px;
}
.game-health-row {
  display:grid;
  grid-template-columns:minmax(140px,1.5fr) repeat(3,minmax(72px,.55fr));
  gap:10px;
  align-items:center;
  border-top:1px solid #eee;
  padding-top:10px;
}
.game-health-row:first-child { border-top:0; padding-top:0; }
.game-health-row > div:first-child strong,
.game-health-row > div:first-child small {
  display:block;
}
.game-health-row > div:first-child small {
  color:#777;
  margin-top:3px;
}
.game-health-stat {
  text-align:center;
  display:grid;
  gap:2px;
}
.game-health-stat b { font-size:1.05rem; }
.game-health-stat small {
  color:#777;
  font-size:.72rem;
  line-height:1.15;
}

@media (max-width: 760px) {
  .analytics-section-title { align-items:flex-start; flex-direction:column; }
  .analytics-note { text-align:left; }
  .game-health-row {
    grid-template-columns:1fr 1fr 1fr;
  }
  .game-health-row > div:first-child {
    grid-column:1 / -1;
  }
}


/* Studio milestones */
.milestone-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
}
.milestone-score {
  min-width:120px;
  border:2px solid #111;
  border-radius:18px;
  padding:12px 14px;
  text-align:center;
  background:var(--yellow);
  box-shadow:4px 4px 0 #111;
}
.milestone-score strong,
.milestone-score span { display:block; }
.milestone-score strong { font-size:1.6rem; letter-spacing:-.04em; }
.milestone-score span { margin-top:2px; font-size:.78rem; font-weight:900; text-transform:uppercase; }

.milestone-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
  margin-top:24px;
}
.milestone-card {
  border:2px solid #d6d6d6;
  border-radius:20px;
  padding:18px;
  min-height:250px;
  background:#fafafa;
  display:flex;
  flex-direction:column;
}
.milestone-card.unlocked {
  border-color:#111;
  background:#fff8dc;
  box-shadow:4px 4px 0 #111;
}
.milestone-icon { font-size:2.3rem; line-height:1; }
.milestone-status {
  margin-top:12px;
  font-size:.7rem;
  font-weight:950;
  letter-spacing:.06em;
  color:#777;
}
.milestone-card.unlocked .milestone-status { color:#6b5600; }
.milestone-card h3 { margin:7px 0 6px; font-size:1.25rem; }
.milestone-card p { margin:0; color:#5f625f; line-height:1.42; }
.milestone-progress {
  height:9px;
  border-radius:999px;
  background:#e7e7e7;
  overflow:hidden;
  margin-top:auto;
}
.milestone-progress span {
  display:block;
  height:100%;
  background:#111;
  border-radius:inherit;
}
.milestone-card small {
  margin-top:7px;
  color:#777;
  font-weight:850;
}
.milestone-card.unlocked small { color:#6b5600; }

@media (max-width: 600px) {
  .milestone-heading { flex-direction:column; }
  .milestone-score { min-width:0; width:100%; }
}


/* Individual game pages */
.game-cover-link { display:block; text-decoration:none; }
.game-cover-link:hover .game-cover { filter:brightness(.97); }
.game-title-link { text-decoration:none; }
.game-title-link:hover { text-decoration:underline; }
.game-page-link {
  text-decoration:none;
  font-size:.78rem;
  font-weight:950;
  color:#176dd4;
  padding:8px 2px;
}
.latest-link { text-decoration:none; }
.latest-link:hover { border-color:#111; transform:translateY(-1px); }

.game-detail-shell { padding-top:36px; min-height:70vh; }
.game-back-link {
  display:inline-block;
  margin-bottom:18px;
  text-decoration:none;
  font-weight:900;
  color:#176dd4;
}
.game-detail-layout {
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:34px;
  align-items:start;
}
.game-detail-art {
  border:2px solid #111;
  border-radius:24px;
  overflow:hidden;
  box-shadow:6px 6px 0 #111;
  background:#fff;
}
.game-detail-cover {
  width:100%;
  aspect-ratio:4 / 3;
  object-fit:cover;
  display:block;
  background:linear-gradient(135deg,#dff2ff,#e9d5fa);
}
.game-detail-copy {
  padding:10px 0;
}
.game-detail-copy h1 {
  margin:14px 0 12px;
  font-size:clamp(3rem,7vw,6.2rem);
  line-height:.88;
  letter-spacing:-.06em;
}
.game-detail-description {
  max-width:700px;
  font-size:1.2rem;
  line-height:1.55;
  color:#434744;
}
.game-detail-actions {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  margin-top:24px;
}
.game-detail-actions .paws-up-control {
  align-items:center;
}
.game-detail-actions .paws-up-count {
  min-height:42px;
  padding-inline:12px;
}
.game-detail-actions .game-star {
  min-height:56px;
  padding:0 18px;
  border:2px solid #111;
  box-shadow:var(--shadow);
}
.game-detail-actions .game-copy-link {
  min-height:56px;
}
.game-detail-meta {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:28px;
}
.game-detail-meta > span {
  min-width:130px;
  border:1px solid #ddd;
  border-radius:14px;
  background:#fff;
  padding:11px 13px;
  color:#555;
}
.game-detail-meta b {
  display:block;
  margin-bottom:3px;
  color:#111;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.game-update-note {
  display:grid;
  gap:4px;
  margin-top:16px;
  padding:14px 16px;
  background:#fff3c9;
  border-radius:14px;
}
.game-update-note b { font-size:.78rem; text-transform:uppercase; letter-spacing:.05em; }
.game-detail-loading {
  padding:60px 0;
}
.game-detail-loading h1 {
  margin:18px 0 10px;
  font-size:clamp(3rem,7vw,6rem);
  letter-spacing:-.06em;
  line-height:.9;
}
.game-detail-loading p { font-size:1.1rem; color:#555; }

@media (max-width: 800px) {
  .game-detail-layout { grid-template-columns:1fr; gap:22px; }
  .game-detail-copy h1 { font-size:clamp(2.8rem,13vw,5rem); }
}
@media (max-width: 520px) {
  .game-detail-actions { display:grid; }
  .game-detail-actions > * { width:100%; }
}


/* Immersive game player — same full-viewport behaviour as Ninjadoodle */
.card-play,
.game-detail-actions button.button { font:inherit; cursor:pointer; }

body.game-playing { overflow:hidden; }

.game-player-overlay {
  position:fixed;
  inset:0;
  z-index:1000;
  display:block;
  width:100vw;
  height:100vh;
  height:100dvh;
  background:#000;
  color:#fff;
}
.game-player-overlay[hidden] { display:none; }

.game-player-stage {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background:#000;
}
#game-player-frame {
  position:absolute;
  inset:0;
  display:block;
  width:100vw;
  height:100vh;
  height:100dvh;
  border:0;
  border-radius:0;
  background:#fff;
}

.game-player-bar {
  position:absolute;
  inset:12px 12px auto 12px;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  pointer-events:none;
}
.game-player-name,
.game-player-controls {
  pointer-events:auto;
}
.game-player-name {
  min-width:0;
  max-width:min(48vw,520px);
  display:flex;
  align-items:center;
  gap:9px;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:12px;
  background:rgba(17,17,17,.82);
  backdrop-filter:blur(8px);
}
.game-player-name .mini-cat {
  flex:0 0 auto;
  width:32px;
  height:32px;
}
.game-player-name strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.86rem;
}
.game-player-controls {
  display:flex;
  gap:8px;
  flex:0 0 auto;
}
.game-player-control {
  min-height:40px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:11px;
  background:rgba(17,17,17,.85);
  color:#fff;
  backdrop-filter:blur(8px);
  font:inherit;
  font-size:.76rem;
  font-weight:900;
  cursor:pointer;
  box-shadow:none;
}
.game-player-control:hover { background:rgba(40,40,40,.95); border-color:#fff; }
.game-player-control.exit {
  background:var(--yellow);
  color:#111;
  border-color:#111;
}

.game-player-overlay:fullscreen,
.game-player-overlay:-webkit-full-screen {
  width:100vw;
  height:100vh;
}

@media (max-width: 900px) {
  .home-game-hero-card { grid-template-columns:1fr; }
  .home-game-hero-art,
  .home-game-hero-card .home-game-hero-cover { min-height:220px; height:220px; }
}

@media (max-width: 600px) {
  .game-player-bar {
    inset:8px 8px auto 8px;
    justify-content:flex-end;
  }
  .game-player-name { display:none; }
  .game-player-control {
    min-height:38px;
    padding:0 9px;
    font-size:.69rem;
  }
}
