@font-face {
font-family: "Source Sans 3";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("fonts/source-sans-3-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Source Sans 3";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("fonts/source-sans-3-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Source Code Pro";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("fonts/source-code-pro-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Source Code Pro";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("fonts/source-code-pro-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
--bg: #0077b6;
--fg: rgba(255, 255, 255, 0.85);
--fg-header: #f4d9a0;
--tile: #eee4da;
--accent: #f59563;
--accent-hover: #f67c5f;
--accent-press: #d97a45;
--brand: #00d4ff;
--brand-hover: #5ae5ff;
--light: #f9f6f2;
--gap: 8px;
--radius: 4px;
--font-sans: "Source Sans 3", sans-serif;
--font-mono: "Source Code Pro", ui-monospace, monospace;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-md: 1.125rem;
--text-lg: 1.5rem;
--text-xl: 2rem;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html, body {
min-height: 100dvh;
overscroll-behavior: none;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
img, picture, video, canvas, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: underline; transition: color 0.2s; }
@media (hover: hover) {
a:hover { color: var(--accent); }
}
header, nav, code, kbd, samp, output { font-family: var(--font-mono); }
@view-transition { navigation: auto; }
html {
background: radial-gradient(ellipse at center, var(--bg) 0%, var(--bg) 100%);
}
body {
display: flex;
flex-direction: column;
max-width: 900px;
margin-inline: auto;
padding: 12px 1rem;
gap: 12px;
background: var(--bg);
color: var(--fg);
font: var(--text-md)/1.6 var(--font-sans);
}
h1 { font-size: clamp(24px, 6vmin, 40px); }
.hint { font-size: var(--text-sm); }
button {
background: var(--accent);
color: var(--light);
border: 0;
padding: 4px 14px;
border-radius: var(--radius);
font-weight: bold;
cursor: pointer;
box-shadow: 0 2px 0 var(--accent-press);
transition: background 120ms, transform 80ms, box-shadow 80ms;
}
@media (hover: hover) {
button:hover { background: var(--accent-hover); }
}
button:active {
background: var(--accent-press);
transform: translateY(2px);
box-shadow: none;
}
#game { position: relative; width: 100%; }
#board-wrap {
position: relative;
width: 100%;
aspect-ratio: 1 / 1;
border: 3px solid transparent;
transition: border-color 150ms ease-out;
}
#board-wrap[data-pending] { transition: border-color 150ms ease-in 80ms; }
#board-wrap[data-pending="h"] { border-left-color: #fff; }
#board-wrap[data-pending="l"] { border-right-color: #fff; }
#board-wrap[data-pending="k"] { border-top-color: #fff; }
#board-wrap[data-pending="j"] { border-bottom-color: #fff; }
body[data-conn="down"] #board-wrap {
filter: grayscale(1);
pointer-events: none;
}
body[data-conn="down"] button {
opacity: 0.4;
pointer-events: none;
}
body[data-conn="down"] #rtt { visibility: hidden; }
#board-wrap { transition: filter 320ms ease; }
button { transition: opacity 320ms ease; }
body.move-pending #board-wrap {
filter: grayscale(0.7) brightness(0.85);
transition: filter 200ms ease-in 1s;
}
body.flash-red { animation: flash-red 300ms ease; }
@keyframes flash-red {
0%, 100% { background: var(--bg); }
50% { background: #e05252; }
}
@media (max-height: 600px) {
p.hint { display: none; }
h1 { font-size: 20px; }
}
.games-list:not(:empty) + .empty-state { display: none; }
.games-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 2rem;
}
.game-card {
display: block;
position: relative;
aspect-ratio: 1 / 1;
text-decoration: none;
font-family: var(--font-mono);
}
.game-card .board-wrap { width: 100%; height: 100%; }
.leaderboard-list {
list-style: none;
padding: 0;
margin: 0;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.25rem;
}
.leaderboard-list > .leaderboard-row:first-child { grid-column: 1 / -1; }
.leaderboard-row {
display: grid;
grid-template-columns: 3rem 140px 1fr;
gap: 1rem;
align-items: center;
}
.leaderboard-list > .leaderboard-row:first-child {
grid-template-columns: 4rem 220px 1fr;
gap: 1.5rem;
}
.leaderboard-list > .leaderboard-row:first-child .row-card { width: 220px; }
.leaderboard-list > .leaderboard-row:first-child .rank { font-size: 2.5rem; }
.leaderboard-list > .leaderboard-row:first-child .row-meta .score { font-size: 1.75rem; }
.leaderboard-row .rank {
font-family: var(--font-mono);
font-size: 1.75rem;
font-weight: 700;
opacity: 0.7;
text-align: right;
}
.leaderboard-row .row-card { width: 140px; aspect-ratio: 1; }
.leaderboard-row .row-card .game-card { display: block; width: 100%; height: 100%; }
.leaderboard-row .row-meta { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.leaderboard-row .row-meta .score {
font-family: var(--font-mono);
font-size: 1.25rem;
font-weight: 700;
margin: 0;
}
.leaderboard-row .row-meta .row-line,
.leaderboard-row .row-meta .by { margin: 0; font-size: var(--text-sm); opacity: 0.85; }
.leaderboard-title { margin-bottom: 0; }
.leaderboard-lede { margin: 0 0 0.5rem; opacity: 0.7; font-size: var(--text-sm); }
@media (max-width: 700px) {
.leaderboard-list { grid-template-columns: 1fr; }
.leaderboard-list > .leaderboard-row:first-child {
grid-template-columns: 3rem 1fr;
gap: 1rem;
}
.leaderboard-list > .leaderboard-row:first-child .row-card {
grid-column: 1 / -1;
width: 100%;
max-width: 280px;
justify-self: center;
}
.leaderboard-list > .leaderboard-row:first-child .row-meta { grid-column: 2; }
.leaderboard-list > .leaderboard-row:first-child .rank { grid-row: 1; align-self: start; }
}
.page {
display: flex;
flex-direction: column;
gap: 1rem;
}
.play-layout {
display: grid;
gap: 0.5rem 1.5rem;
grid-template-columns: 1fr;
}
@media (min-width: 700px) {
.play-layout {
grid-template-columns: 2fr 1fr;
grid-template-areas:
"controls ."
"board help";
}
.board-controls { grid-area: controls; }
.column { grid-area: board; }
.help { grid-area: help; align-self: start; }
}
.breadcrumb {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
font-size: var(--text-base);
}
.breadcrumb .left,
.breadcrumb .right {
display: flex;
align-items: baseline;
gap: 0.6rem;
}
.board-controls {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 1rem;
}
.score-block {
display: flex;
align-items: baseline;
gap: 0.75rem;
}
#score {
font-weight: 700;
font-size: 2.5rem;
line-height: 1;
color: var(--fg-header);
font-variant-numeric: tabular-nums;
}
.undo-tally {
font-size: 0.95rem;
font-weight: 600;
color: var(--fg);
opacity: 0.55;
font-variant-numeric: tabular-nums;
}
.help {
display: flex;
flex-direction: column;
gap: 0.7rem;
align-content: start;
color: var(--fg-header);
}
.dpad {
display: grid;
grid-template-columns: repeat(3, 5rem);
grid-template-areas:
". up ."
"left . right"
". down .";
gap: 0.5rem;
justify-content: center;
}
.dpad-up { grid-area: up; }
.dpad-left { grid-area: left; }
.dpad-right { grid-area: right; }
.dpad-down { grid-area: down; }
.dpad-key {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.1rem;
aspect-ratio: 1;
border: 0;
border-radius: 0.8rem;
background: rgba(0, 0, 0, 0.28);
color: #fff;
cursor: pointer;
box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
transition: transform 80ms, box-shadow 80ms, background 0.15s;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
.dpad-key .arrow {
font-size: clamp(1.6rem, 9vw, 2.6rem);
font-weight: 700;
line-height: 1;
}
.dpad-key .hint {
font-family: var(--font-mono);
font-size: var(--text-sm);
opacity: 0.5;
line-height: 1;
}
@media (hover: hover) {
.dpad-key:hover { background: var(--accent); }
}
.dpad-key.is-pressed { background: var(--accent); }
.dpad-key:active {
transform: translateY(4px);
box-shadow: 0 0 0 rgba(0, 0, 0, 0.35);
}
.kbd-btn {
font-weight: 700;
font-size: var(--text-base);
color: #fff;
background: rgba(0, 0, 0, 0.3);
padding: 0.2rem 0.55rem;
border: 0;
border-radius: 5px;
cursor: pointer;
text-decoration: none;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
transition: transform 80ms, box-shadow 80ms, background 0.15s;
display: inline-flex;
align-items: baseline;
gap: 0.25em;
line-height: 1;
}
@media (hover: hover) {
.kbd-btn:hover { background: var(--accent); color: #fff; }
}
.kbd-btn[aria-pressed="true"],
.kbd-btn.is-pressed { background: var(--accent); color: #fff; }
.kbd-btn:active {
transform: translateY(2px);
box-shadow: none;
}
.kbd-btn .bracket { opacity: 0.55; }
.kbd-btn .bracket:first-child { margin-right: 0.2em; }
.kbd-btn .bracket:last-child { margin-left: 0.2em; }
.kbd-btn .key { color: #fff; }
.kbd-btn .phrase { white-space: pre; }
.kbd-btn.primary {
background: var(--accent);
font-size: 2.25rem;
padding: 0.85rem 1.5rem;
text-transform: uppercase;
letter-spacing: 0.06em;
border-radius: 8px;
box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
transform: rotate(-2deg);
transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.kbd-btn.primary:hover,
.kbd-btn.primary[aria-pressed="true"] {
background: var(--accent-hover);
transform: rotate(-2deg) translate(-1px, -1px);
box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35);
}
.kbd-btn.primary:active {
transform: rotate(-2deg) translate(2px, 2px);
box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}
.hero {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin: 1rem 0 2.5rem;
}
.hero > h2 { font-family: var(--font-mono); color: var(--fg-header); font-size: 3rem; line-height: 1.1; }
.hero > audio { display: none; }
.splits { display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; }
.splits > * { flex: 1 1 360px; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.kbd-btn.primary { align-self: flex-start; }
.desc { font-size: var(--text-lg); }
.credit { font-size: var(--text-sm); }
.splash-audio-credit { font-size: var(--text-sm); color: rgba(255, 255, 255, 0.7); }
#splash-board { max-width: 380px; width: 100%; }
.splash-progress { display: flex; align-items: center; gap: 0.6rem; }
.splash-slider { flex: 1; min-width: 0; accent-color: var(--accent); cursor: pointer; }
.splash-counter { font-family: var(--font-mono); font-size: var(--text-sm); opacity: 0.7; font-variant-numeric: tabular-nums; }
.callouts {
list-style: none;
padding: 0;
margin: 2rem 0 0;
display: flex;
flex-direction: column;
gap: 0.9rem;
}
.callouts li { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.callouts a { font-size: var(--text-lg); }
.callout-desc { font-size: var(--text-md); opacity: 0.85; }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
blockquote {
padding: 0.25em 0 0.25em 1.25em;
border-left: 3px solid var(--brand);
color: var(--fg-header);
font-style: italic;
opacity: 0.9;
}
code {
font-size: 0.92em;
padding: 0.1em 0.35em;
background: rgba(0, 0, 0, 0.3);
border-radius: 3px;
}
pre {
padding: 0.9em 1.1em;
background: rgba(0, 0, 0, 0.35);
border-radius: 6px;
overflow-x: auto;
font-size: var(--text-sm);
line-height: 1.5;
}
pre code { padding: 0; background: none; border-radius: 0; font-size: inherit; }
main > * + * { margin-top: 1em; }
main > h2 { margin-top: 2rem; }
main > h3 { margin-top: 1.5rem; }
.site-header {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
margin: 2rem 0 0.75rem;
font-size: var(--text-sm);
}
.site-header .site-title {
font-weight: 700;
font-size: clamp(2rem, 5vw, 2.75rem);
color: var(--fg-header);
}
.site-header-right {
display: flex;
align-items: baseline;
gap: 1.25rem;
margin-left: auto;
}
.you-are { font-size: var(--text-sm); }
.site-nav-link { font-size: var(--text-sm); }
.site-presence { font-size: var(--text-sm); opacity: 0.8; font-variant-numeric: tabular-nums; }
.game-presence { font-family: var(--font-mono); font-size: var(--text-sm); opacity: 0.75; }
.site-header .status {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 1rem;
}
.site-header .stat { font-variant-numeric: tabular-nums; }
.site-header #rtt { display: inline-block; min-width: 6ch; text-align: left; }
.site-footer {
margin: 4rem 0 1.5rem;
text-align: right;
font-size: var(--text-sm);
}
.site-header .credit .mascot {
width: 64px;
height: 36px;
vertical-align: bottom;
}
.site-header #conn {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
background: #888;
align-self: center;
}
body[data-conn="ok"] .site-header #conn { background: #2a9d4a; }
body[data-conn="down"] .site-header #conn { background: #c0392b; }
body.splash .site-title { visibility: hidden; }
@media (max-width: 700px) {
.site-header,
.site-header-right,
.breadcrumb,
.breadcrumb .left,
.breadcrumb .right { flex-wrap: wrap; }
.site-header .credit { display: none; }
body:not(.splash) .site-nav-link,
body:not(.splash) .you-are,
.spectate-link { display: none; }
.site-header { margin-top: 1rem; }
.page { gap: 0.6rem; }
body.play .game-presence,
body.play .breadcrumb .left .sep { display: none; }
}
.linklike {
background: none;
border: 0;
padding: 0;
text-decoration: underline;
cursor: pointer;
box-shadow: none;
transition: opacity 0.2s;
}
.linklike:hover { opacity: 0.8; background: none; }
.linklike:active { transform: none; box-shadow: none; }