/* Mini-Games look, from the Mini-Games boards in the "Games and Ads UI Concepts" canvas. */
:root {
  --ink: #0F1419;
  --ink-2: #3F4A54;
  --ink-3: #5F6B75;
  --line: #EAEEF0;
  --line-2: #E3E7EA;
  --edge: #D5DBDF;
  --ground: #FFFFFF;
  --panel: #F4F6F7;
  --panel-2: #EAEEF0;
  --accent: #00DDB3;
  --accent-hover: #00C49F;
  --accent-ink: #04201B;
  --link: #00806A;
  --soft: #E6FBF6;
  --soft-edge: #CCF6EC;
  --blue: #2F6FD6;
  --blue-soft: #EAF2FF;
  --blue-edge: #BCD5FF;
  --warn: #8A4B00;
  --warn-soft: #FFF4E5;
  --warn-edge: #FFD8A8;
  --danger: #B42318;
  --sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
body > main, body > .page { flex: 1 0 auto; }
a { color: var(--link); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, textarea, select { font-family: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
svg { flex: none; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; width: 100%; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--link); }
.h1 { font-weight: 700; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -0.035em; }
.h2 { font-weight: 700; font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -0.035em; }
.h3 { font-weight: 700; font-size: 18px; line-height: 1.2; letter-spacing: -0.01em; }
.lede { font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 540px; }
.section { padding-top: 88px; padding-bottom: 88px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.sec-head .stack { gap: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand .word { font-weight: 800; font-size: 23px; letter-spacing: -0.04em; }
.brand .by { font-size: 13px; color: var(--ink-3); }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--panel); color: var(--ink); }
.search { position: relative; flex: 1 1 260px; max-width: 400px; min-width: 0; margin-left: auto; }
.search svg { position: absolute; left: 14px; top: 13px; pointer-events: none; }
.search input { width: 100%; height: 44px; background: var(--panel); border: 1px solid var(--edge); border-radius: 999px; padding: 0 16px 0 42px; color: var(--ink); font-size: 15px; }
.search input:focus { background: var(--ground); border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(0, 221, 179, .18); }
.top .right { display: flex; align-items: center; gap: 10px; flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: #3A86FF; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; border: none; cursor: pointer; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; cursor: default; }
.avatar.md { width: 36px; height: 36px; font-size: 13px; cursor: default; }

/* Buttons and fields */
.btn, .sec { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease; }
.btn { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.sec { background: var(--panel); color: var(--ink); border: 1px solid var(--edge); font-weight: 500; padding: 0 18px; }
.sec:hover { background: var(--panel-2); color: var(--ink); }
.sec:disabled { opacity: .55; cursor: default; }
.icon { width: 44px; padding: 0; }
.small { min-height: 40px; font-size: 14px; padding: 0 14px; }
.small.icon { width: 40px; padding: 0; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; display: block; }
.input { width: 100%; min-height: 44px; background: var(--ground); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 14px; color: var(--ink); font-size: 15px; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(0, 221, 179, .18); }
textarea.input { resize: vertical; line-height: 1.45; }
select.input { width: auto; }
.card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line-2); border-radius: 24px; }
.inset { background: var(--ground); border: 1px solid var(--line-2); border-radius: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--edge); border-radius: 999px; padding: 4px 10px; white-space: nowrap; background: var(--ground); }
button.chip { cursor: pointer; min-height: 32px; background: var(--panel); }
button.chip:hover { border-color: var(--accent); }
.chip.ok { background: var(--soft); border-color: var(--soft-edge); color: var(--link); }
.chip.go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.warn { background: var(--warn-soft); border-color: var(--warn-edge); color: var(--warn); }
.chip.now { background: var(--ground); border-color: var(--accent); color: var(--ink); }
.pill { min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 500; cursor: pointer; background: var(--panel); color: var(--ink-2); border: 1px solid var(--edge); white-space: nowrap; }
.pill:hover { border-color: var(--accent); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; gap: 4px; background: var(--ground); border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; }
.seg button { min-height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 500; cursor: pointer; background: transparent; color: var(--ink-3); border: 1px solid transparent; }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); border-color: var(--edge); }
.seg.lg button { min-height: 38px; padding: 0 16px; font-size: 14px; }
.seg.on-panel { background: var(--panel); }
.tag { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--edge); border-radius: 999px; padding: 2px 8px; white-space: nowrap; background: var(--ground); }
.tag.ok { color: var(--link); background: var(--soft); border-color: var(--soft-edge); }
.tag.blue { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-edge); }
.tag.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-edge); }
.error { color: var(--danger); font-size: 14px; }
.note-warn { font-size: 14px; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-edge); border-radius: 12px; padding: 10px 14px; }
.code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; color: var(--link); white-space: pre-wrap; word-break: break-all; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; border: none; cursor: pointer; padding: 0; flex: none; background: var(--edge); transition: background-color .15s ease; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; transition: left .15s ease; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { left: 23px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.bar { padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); max-width: none; }

/* Radio cards (Make "ways", Publish visibility and targets) */
.radio-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; cursor: pointer; background: var(--ground); border: 1px solid var(--edge); text-align: left; font-size: 15px; color: var(--ink); }
.radio-card:hover { border-color: var(--accent); }
.radio-card[aria-checked="true"] { background: var(--panel); border-color: var(--accent); }
.radio-card .dot { width: 18px; height: 18px; flex: none; border-radius: 999px; border: 2px solid #8D979F; }
.radio-card[aria-checked="true"] .dot { border: 6px solid var(--accent); background: var(--accent-ink); }
.radio-card .txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.radio-card .txt strong { font-weight: 600; }
.radio-card .txt span { font-size: 14px; color: var(--ink-3); }

/* Game tiles (feed, game page, My games) */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }
.tile { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.tile:hover { color: var(--ink); }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); background: var(--soft); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb img.fill { object-fit: cover; filter: blur(18px) brightness(.8); transform: scale(1.2); }
.thumb .tag { position: absolute; left: 10px; bottom: 10px; background: rgba(255, 255, 255, .92); color: var(--ink); border: none; padding: 3px 8px; }
.thumb .status { position: absolute; left: 10px; bottom: 10px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--edge); color: var(--ink); }
.thumb .status.public { background: var(--accent); color: var(--accent-ink); }
.thumb .status.unlisted { background: #FFD24A; color: #1B1530; }
.thumb .status.review { background: var(--warn-soft); color: var(--warn); }
.thumb .making-dots { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; background: var(--soft, #E9F8F4); }
.thumb .making-dots ~ .status { z-index: 2; }
.thumb .status.creating { background: var(--accent); color: var(--accent-ink); animation: creating 1s ease-in-out infinite alternate; }
@keyframes creating { to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .thumb .status.creating { animation: none; } }
.thumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); opacity: 0; transition: opacity .18s ease, transform .18s ease; display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; border-radius: 999px; padding: 10px 18px; box-shadow: 0 6px 18px rgba(4, 32, 27, .18); }
a.tile:hover .thumb, a.tile:focus-visible .thumb { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 24px rgba(15, 20, 25, .08); }
a.tile:hover .play, a.tile:focus-visible .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tile .name { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-3); }
.tile .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .prompt-line { font-size: 14px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .prompt-line b { color: var(--link); font-weight: 500; }
.letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 56px; letter-spacing: -0.04em; color: var(--link); }
.mini { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; min-width: 0; }
.mini:hover { color: var(--ink); }
.mini .thumb { width: 88px; flex: none; border-radius: 10px; }
.mini .t { display: flex; flex-direction: column; min-width: 0; }
.mini .t strong { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .t span { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini:hover .thumb { border-color: var(--accent); }

/* The game frame */
.stage-shell { background: var(--panel); border: 1px solid var(--line-2); border-radius: 32px; padding: 10px; }
.stage { position: relative; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #F0FBF8 0%, #E3F6F1 100%); border-radius: 24px; overflow: hidden; min-height: 320px; }
.stage .frame { display: block; width: 100%; max-width: 420px; aspect-ratio: 2 / 3; }
.stage lottie-game { display: block; width: 100%; height: 100%; }
.stage .note { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--ink-3); font-size: 15px; }
.stage:fullscreen { border-radius: 0; background: #0F1419; }
.stage:fullscreen lottie-game { width: 100vw; height: 100vh; }

/* Leaderboard rows */
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.board li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; font-size: 15px; }
.board li.me { background: rgba(0, 221, 179, .1); }
.board .rank { width: 22px; font-family: var(--mono); font-size: 13px; color: var(--ink-3); flex: none; }
.board .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .pts { font-family: var(--mono); font-weight: 500; }
.board .unv { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--edge); border-radius: 999px; padding: 1px 6px; margin-left: 6px; }
.empty { font-size: 14px; color: var(--ink-3); padding: 18px; text-align: center; border: 1px dashed var(--edge); border-radius: 14px; }

/* Accent band and footer */
.band { background: var(--accent); color: var(--accent-ink); }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-top: 88px; padding-bottom: 88px; }
.band h2 { max-width: 760px; font-weight: 700; font-size: clamp(36px, 5vw, 68px); line-height: 1.02; letter-spacing: -0.04em; }
.band .dark { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 12px; background: var(--accent-ink); color: #fff; font-weight: 600; font-size: 17px; text-decoration: none; }
.band .dark:hover { background: #0B332C; color: #fff; }
.band .outline { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 12px; border: 2px solid var(--accent-ink); color: var(--accent-ink); font-weight: 600; font-size: 17px; text-decoration: none; }
.band .outline:hover { background: rgba(4, 32, 27, .08); color: var(--accent-ink); }
.foot { border-top: 1px solid var(--line); }
.foot .wrap { padding-top: 28px; padding-bottom: 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.foot b { font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.foot a { color: var(--ink-3); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(15, 20, 25, .25); animation: toast-in .2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .brand .by { display: none; } }
@media (max-width: 900px) { .nav { display: none; } }
@media (max-width: 820px) { .wrap { padding: 0 16px; } .hide-m { display: none !important; } .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .section { padding-top: 64px; padding-bottom: 64px; } .band .wrap { padding-top: 64px; padding-bottom: 64px; } }
@media (max-width: 600px) { .search { display: none; } .top .right { margin-left: auto; } }
@media (max-width: 480px) { .brand .word { font-size: 20px; } .grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
