@font-face {
  font-family:Nunito;
  src:url('/assets/nunito-sans-400.woff2') format('woff2');
  font-weight:400;
  font-display:swap;
}
@font-face {
  font-family:Nunito;
  src:url('/assets/nunito-sans-800.woff2') format('woff2');
  font-weight:800;
  font-display:swap;
}
:root {
  color-scheme:dark;
  --bg:#121b27;
  --panel:#1b2d36;
  --board:#15242d;
  --text:#f0eee7;
  --muted:#b2c1c7;
  --mint:#a8d9c4;
  --lavender:#b7a6dc;
  --ink:#132c33;
  --line:#38505b;
  --rose:#d09ab3;
  --radius:24px;
  font-family:Nunito,system-ui,sans-serif;
  font-size:18px;
  font-synthesis:none;
}
* {
  box-sizing:border-box;
}
html {
  min-width:280px;
  background:var(--bg);
  scroll-behavior:smooth;
}
body {
  margin:0;
  min-height:100vh;
  min-height:100dvh;
  color:var(--text);
  background:radial-gradient(ellipse at 8% 35%,#26304555,transparent 58%),radial-gradient(ellipse at 94% 80%,#1e3b3a44,transparent 52%);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
[hidden] {
  display:none!important;
}
button,input,select,textarea {
  font:inherit;
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent;
}
button {
  cursor:pointer;
  border:0;
  color:inherit;
  background:none;
  touch-action:manipulation;
}
button:disabled {
  cursor:default;
}
a {
  color:inherit;
  text-decoration:none;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid var(--lavender);
  outline-offset:5px;
}
button:not(.tile) {
  transition:background .15s,transform .15s;
}
button:not(.tile):active {
  transform:translateY(1px);
}
h1,h2,p {
  margin:0;
}
.icon {
  display:block;
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}
.icon-library {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.skip-link {
  position:fixed;
  left:16px;
  top:-80px;
  padding:12px 20px;
  background:var(--mint);
  color:var(--ink);
  border-radius:12px;
  z-index:100;
}
.skip-link:focus {
  top:16px;
}
.site-header {
  width:100%;
  max-width:1200px;
  margin:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:28px 40px;
}
.brand {
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:29px;
  letter-spacing:-1.4px;
  font-weight:800;
  padding:0;
  min-height:44px;
  user-select:none;
}
.brand-dot {
  color:var(--mint);
}
.brand-mark {
  display:grid;
  grid-template-columns:repeat(2,9px);
  gap:3px;
  transform:rotate(-9deg);
}
.brand-mark i {
  width:9px;
  height:9px;
  border-radius:3px;
  background:var(--mint);
}
.brand-mark i:nth-child(2) {
  background:var(--lavender);
}
.brand-mark i:nth-child(3) {
  background:#e3ad91;
}
.brand-mark i:nth-child(4) {
  background:#d5bd87;
}
.header-actions {
  display:flex;
  align-items:center;
  gap:10px;
}
.icon-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  min-height:44px;
  border-radius:14px;
  color:var(--muted);
  padding:10px;
}
.icon-button:hover {
  background:#ffffff0b;
  color:var(--text);
}
.help-button {
  font-weight:800;
  font-size:21px;
}
.header-best {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:8px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  font-size:16px;
}
.header-best .icon {
  width:20px;
  height:20px;
  color:#d5bd87;
}
.header-best strong {
  font-size:20px;
  min-width:16px;
}
.arena {
  max-width:1120px;
  margin:auto;
  padding:30px 28px 46px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(380px,500px);
  align-items:center;
  gap:72px;
}
.intro {
  min-width:0;
}
.eyebrow {
  color:var(--mint);
  font-size:13px;
  font-weight:800;
  letter-spacing:2.5px;
  margin-bottom:22px;
}
h1 {
  font-weight:800;
  font-size:clamp(48px,5.3vw,72px);
  line-height:1.04;
  letter-spacing:-3px;
  max-width:490px;
  text-wrap:balance;
}
h1 span {
  color:var(--lavender);
}
.intro-copy {
  color:var(--muted);
  font-size:20px;
  max-width:330px;
  margin-top:24px;
  line-height:1.6;
}
.mode-picker {
  display:flex;
  gap:5px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:18px;
  max-width:340px;
  margin-top:34px;
  background:#101b2355;
}
.mode-picker button {
  display:flex;
  flex:1;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:52px;
  border-radius:12px;
  color:var(--muted);
  font-weight:800;
}
.mode-picker button[aria-pressed=true] {
  background:var(--mint);
  color:var(--ink);
}
.mode-picker button:not([aria-pressed=true]):hover:not(:disabled) {
  background:#ffffff0b;
}
.mode-picker button:disabled {
  opacity:.7;
}
.mode-details {
  margin-top:12px;
  max-width:340px;
  color:var(--muted);
  font-size:16px;
}
.flash-settings {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:14px;
}
select,input,textarea {
  background:#121f28;
  border:1px solid var(--line);
  border-radius:12px;
  color:var(--text);
  padding:10px 12px;
  min-height:46px;
  max-width:100%;
}
.intro-art {
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:44px;
  user-select:none;
}
.intro-art span {
  display:grid;
  place-items:center;
  width:58px;
  height:58px;
  border-radius:16px;
  background:var(--mint);
  color:var(--ink);
  font-weight:800;
  font-size:28px;
  transform:rotate(-7deg);
  box-shadow:0 6px 0 #00000017;
}
.intro-art span:nth-child(2) {
  background:var(--lavender);
  transform:translateY(-8px) rotate(7deg);
}
.intro-art span:nth-child(3) {
  background:#e3ad91;
  transform:rotate(-3deg);
}
.intro-art i {
  color:var(--muted);
  font-style:normal;
  font-size:28px;
  margin-left:8px;
}
.game-shell {
  position:relative;
  min-width:0;
  padding:20px;
  background:var(--panel);
  border:1px solid #3d535d;
  box-shadow:0 22px 80px #050c1533;
  border-radius:var(--radius);
}
.game-hud {
  display:flex;
  align-items:center;
  gap:28px;
  padding:0 4px 14px;
}
.hud-item {
  display:flex;
  align-items:baseline;
  gap:9px;
}
.hud-item>span,.lives-wrap>span {
  font-size:14px;
  color:var(--muted);
}
.hud-item strong {
  font-size:26px;
  font-weight:800;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.lives-wrap {
  margin-left:auto;
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:flex-end;
}
#lives {
  display:flex;
  gap:4px;
  color:var(--rose);
}
#lives .icon {
  width:20px;
  height:20px;
  fill:currentColor;
  stroke-width:1.5;
}
#lives .lost {
  color:#71868d;
  fill:none;
}
.progress-track {
  height:4px;
  background:#3a5058;
  border-radius:4px;
  overflow:hidden;
}
#progress-fill {
  height:100%;
  width:0;
  background:var(--mint);
  border-radius:4px;
  transition:width .12s linear;
}
.countdown #progress-fill {
  background:var(--lavender);
  transition:width .04s linear;
}
.status-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:42px;
  padding:8px 4px;
  font-size:16px;
  font-weight:800;
}
#status-detail {
  font-size:14px;
  font-weight:400;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  text-align:right;
}
.board-wrap {
  position:relative;
  border-radius:18px;
  background:var(--board);
  overflow:hidden;
  isolation:isolate;
}
.board {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  grid-template-rows:repeat(6,minmax(0,1fr));
  gap:10px;
  padding:12px;
  aspect-ratio:5/6;
  user-select:none;
  -webkit-user-select:none;
}
.slot {
  display:grid;
  place-items:center;
  min-width:0;
  min-height:0;
  container-type:size;
}
.tile {
  width:100%;
  height:auto;
  aspect-ratio:1;
  max-height:100%;
  border-radius:14px;
  color:var(--ink);
  font-size:30px;
  font-weight:800;
  line-height:1;
  display:grid;
  place-items:center;
  padding:0;
  box-shadow:0 3px 0 #00000030;
  transition:opacity .1s,transform .1s;
  touch-action:manipulation;
}
@supports (width:1cqw) {
  .tile {
    width:min(100cqw,100cqh);
    height:min(100cqw,100cqh);
    font-size:clamp(22px,48cqw,36px);
  }
}
.tile.colour-0 {
  background:var(--mint);
}
.tile.colour-1 {
  background:var(--lavender);
}
.tile.colour-2 {
  background:#e3ad91;
}
.tile.colour-3 {
  background:#d5bd87;
}
.tile.colour-4 {
  background:#8abfc4;
}
.tile.colour-5 {
  background:var(--rose);
}
.tile.covered {
  background:#a8c3bd;
}
.tile.demo {
  opacity:.55;
}
.tile:not(:disabled):active {
  transform:scale(.93);
}
.tile.cleared {
  opacity:0;
  pointer-events:none;
}
.tile.wrong {
  background:#df9ca6;
  box-shadow:inset 0 0 0 3px #9c495b;
}
.tile.wrong::after {
  content:'×';
  font-size:30px;
}
.tile.expected {
  background:#d5bd87;
  box-shadow:inset 0 0 0 3px #f0eee7;
}
.start-overlay,.round-feedback {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:14px;
  text-align:center;
  padding:16px;
}
.start-overlay {
  background:linear-gradient(transparent,#15242d55 25%,#15242dd9 50%,#15242d55 75%,transparent);
}
.start-overlay>span {
  color:var(--muted);
  font-size:16px;
  max-width:220px;
}
.primary-button {
  min-height:54px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:14px 30px;
  border-radius:15px;
  background:var(--mint);
  color:var(--ink);
  font-size:18px;
  font-weight:800;
  text-align:center;
}
.primary-button:hover {
  background:#bee5d4;
}
#start-button {
  font-size:22px;
  min-width:180px;
  min-height:60px;
  box-shadow:0 6px 0 #07141d66;
}
.round-feedback {
  background:#15242de6;
  animation:arrive .15s ease-out;
  pointer-events:none;
}
.feedback-icon {
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  border-radius:50%;
  background:#a8d9c419;
  color:var(--mint);
}
.feedback-icon .icon {
  width:28px;
  height:28px;
}
.round-feedback strong {
  font-size:24px;
}
.round-feedback>span:last-child {
  font-size:18px;
  color:var(--muted);
}
.game-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:52px;
  gap:8px;
  padding:8px 0 0;
}
.game-bottom p {
  font-size:16px;
  color:var(--muted);
  padding-left:4px;
}
.play-actions {
  display:flex;
  flex-shrink:0;
}
.result-overlay {
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:22px;
  background:var(--board);
  overflow-y:auto;
  justify-content:safe center;
}
.result-overlay > * {
  flex-shrink:0;
}
.result-kicker {
  font-size:14px;
  color:var(--muted);
}
.result-overlay h2 {
  font-size:26px;
  margin-top:6px;
  line-height:1.2;
}
.result-number {
  font-size:80px;
  line-height:1.1;
  letter-spacing:-4px;
  color:var(--mint);
  font-weight:800;
  margin-top:12px;
}
.result-label {
  font-size:16px;
  color:var(--muted);
}
.result-message {
  font-size:16px;
  margin-top:10px;
}
.result-stats {
  display:flex;
  justify-content:center;
  gap:38px;
  margin:20px 0;
}
.result-stats>div {
  display:flex;
  align-items:baseline;
  gap:8px;
}
.result-stats span {
  font-size:14px;
  color:var(--muted);
}
.result-stats strong {
  font-size:22px;
}
.result-overlay .primary-button {
  width:min(100%,260px);
}
.result-actions {
  display:flex;
  gap:26px;
  margin-top:6px;
}
.text-button {
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:var(--muted);
  padding:8px;
  font-size:16px;
  text-decoration:underline;
  text-underline-offset:4px;
}
.text-button:hover {
  color:var(--text);
}
.text-button .icon {
  width:18px;
  height:18px;
}
footer {
  max-width:1120px;
  margin:auto;
  padding:12px 28px 26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  font-size:16px;
  color:var(--muted);
}
dialog {
  position:fixed;
  background:var(--panel);
  color:var(--text);
  width:calc(100% - 32px);
  max-width:440px;
  max-height:calc(100dvh - 32px);
  padding:32px;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:0 30px 100px #0008;
  overflow-y:auto;
}
dialog::backdrop {
  background:#080e17cc;
  backdrop-filter:blur(6px);
}
dialog form {
  margin:0;
}
dialog h2 {
  font-size:28px;
  line-height:1.2;
  padding-right:25px;
  margin-bottom:20px;
  letter-spacing:-.7px;
}
dialog p {
  font-size:17px;
  margin:14px 0;
  line-height:1.55;
}
dialog .primary-button {
  width:100%;
  margin-top:12px;
}
dialog form>.text-button {
  display:flex;
  width:100%;
  margin-top:4px;
}
dialog .dialog-close {
  position:absolute;
  top:12px;
  right:12px;
  padding:10px;
}
.help-steps {
  padding-left:25px;
  margin:0 0 22px;
}
.help-steps li {
  padding-left:5px;
  margin-top:14px;
  font-size:18px;
}
.help-steps li::marker {
  color:var(--mint);
  font-weight:800;
}
.muted {
  color:var(--muted);
}
.personal-stats {
  display:flex;
  gap:50px;
  margin:22px 0;
}
.personal-stats>div {
  display:flex;
  flex-direction:column;
}
.personal-stats strong {
  font-size:44px;
  font-weight:800;
  line-height:1.2;
  color:var(--mint);
}
.personal-stats span {
  color:var(--muted);
  font-size:16px;
}
#share-text {
  width:100%;
  min-height:140px;
  resize:vertical;
  font-size:16px;
}
#creator-pin {
  display:block;
  width:100%;
  margin-top:8px;
  font-size:22px;
  letter-spacing:4px;
}
#creator-error {
  min-height:26px;
  color:#e6aab7;
  font-size:16px;
}
#creator-disable {
  width:100%;
  margin-top:10px;
}
.toast {
  position:fixed;
  z-index:20;
  left:50%;
  bottom:max(24px,env(safe-area-inset-bottom));
  transform:translateX(-50%);
  background:var(--text);
  color:var(--ink);
  border-radius:14px;
  padding:12px 20px;
  max-width:calc(100% - 32px);
  width:max-content;
  box-shadow:0 10px 40px #0005;
  font-size:16px;
  text-align:center;
}
.noscript {
  position:fixed;
  inset:auto 12px 12px;
  background:var(--text);
  color:var(--ink);
  border-radius:16px;
  padding:20px;
  z-index:50;
}
@keyframes arrive {
  from {
    opacity:0;
    transform:scale(.98);
  }
  to {
    opacity:1;
    transform:scale(1);
  }
}
@media (min-width:1001px) {
  body.is-playing .intro-art {
    opacity:.4;
  }
}
@media (max-width:1000px) {
  .site-header {
    padding:12px 18px;
    padding-top:max(12px,env(safe-area-inset-top));
    gap:8px;
  }
  .brand {
    font-size:26px;
    gap:8px;
    letter-spacing:-1.2px;
  }
  .header-actions {
    gap:2px;
  }
  .header-best {
    padding:8px 10px;
    gap:7px;
  }
  .best-label {
    display:none;
  }
  .arena {
    grid-template-columns:1fr;
    gap:24px;
    padding:16px 16px 12px;
    max-width:540px;
  }
  .intro {
    text-align:center;
  }
  .eyebrow,.intro-art {
    display:none;
  }
  h1 {
    font-size:clamp(36px,8.5vw,46px);
    max-width:430px;
    line-height:1.1;
    letter-spacing:-1.5px;
    margin:auto;
  }
  .intro-copy {
    font-size:18px;
    max-width:none;
    margin-top:12px;
  }
  .mode-picker {
    margin:20px auto 0;
    max-width:360px;
  }
  .mode-picker button {
    min-height:48px;
  }
  .mode-details {
    margin:10px auto 0;
    max-width:360px;
  }
  .flash-settings {
    justify-content:center;
    margin-top:12px;
  }
  .game-shell {
    padding:14px;
    border-radius:22px;
  }
  .game-hud {
    gap:22px;
    padding-bottom:12px;
  }
  .game-bottom p {
    font-size:16px;
  }
  .game-bottom {
    min-height:50px;
  }
  footer {
    max-width:540px;
    font-size:14px;
    padding:12px 20px max(20px,env(safe-area-inset-bottom));
  }
  body.is-playing {
    height:100vh;
    height:100dvh;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    overscroll-behavior-y:none;
    background:var(--board);
  }
  body.is-playing .site-header {
    flex:0 0 auto;
    padding:6px 14px;
    padding-top:max(6px,env(safe-area-inset-top));
  }
  body.is-playing main {
    display:flex;
    flex:1;
    min-height:0;
    width:100%;
    padding-bottom:env(safe-area-inset-bottom);
  }
  body.is-playing .arena {
    display:flex;
    flex:1;
    min-height:0;
    width:100%;
    max-width:560px;
    padding:0 8px 8px;
    gap:0;
  }
  body.is-playing .intro,body.is-playing footer {
    display:none;
  }
  body.is-playing .game-shell {
    display:flex;
    flex-direction:column;
    flex:1;
    min-height:0;
    border-radius:18px;
    padding:12px;
    box-shadow:none;
  }
  body.is-playing .game-hud {
    flex:0 0 auto;
    padding-bottom:10px;
  }
  body.is-playing .lives-wrap>span {
    display:none;
  }
  body.is-playing .progress-track {
    flex:0 0 4px;
  }
  body.is-playing .status-row {
    flex:0 0 auto;
    min-height:38px;
    padding-block:6px;
  }
  body.is-playing .board-wrap {
    flex:1;
    min-height:0;
  }
  body.is-playing .board {
    position:absolute;
    inset:0;
    aspect-ratio:auto;
    height:100%;
    padding:10px;
    gap:8px;
  }
  body.is-playing .game-bottom {
    flex:0 0 auto;
    padding-top:4px;
    min-height:48px;
  }
  body.is-playing .tile {
    border-radius:13px;
  }
  body.is-playing .result-overlay {
    padding:18px;
  }
}
@media (max-width:360px) {
  .site-header {
    padding-inline:10px;
  }
  .brand {
    font-size:24px;
  }
  .brand-mark {
    display:none;
  }
  .header-best {
    padding:8px;
  }
  .header-actions {
    gap:0;
  }
  .game-hud {
    gap:16px;
  }
  .hud-item {
    gap:6px;
  }
  .hud-item strong {
    font-size:24px;
  }
  .board {
    gap:7px;
    padding:9px;
  }
  .game-shell {
    padding:12px;
  }
  .tile {
    border-radius:11px;
  }
  .game-bottom p {
    font-size:15px;
  }
  footer>span {
    max-width:160px;
  }
  .status-row {
    font-size:15px;
  }
  body.is-playing .board {
    gap:7px;
    padding:7px;
  }
  body.is-playing .game-shell {
    padding:10px;
  }
}
@media (max-width:1000px) and (max-height:660px) {
  body.is-playing .site-header {
    padding-bottom:2px;
    padding-top:max(2px,env(safe-area-inset-top));
  }
  body.is-playing .game-hud {
    padding-bottom:7px;
  }
  .result-number {
    font-size:58px;
    margin-top:6px;
  }
  .result-stats {
    margin:12px 0;
  }
  .result-message {
    display:none;
  }
  .result-overlay h2 {
    font-size:23px;
  }
  .result-overlay .primary-button {
    min-height:48px;
    padding-block:10px;
  }
  .result-label {
    font-size:15px;
  }
}
@media (max-width:1000px) and (max-height:520px) {
  body.is-playing {
    height:auto;
    min-height:100dvh;
    overflow:auto;
    overscroll-behavior-y:auto;
  }
  body.is-playing main {
    flex:none;
  }
  body.is-playing .board-wrap {
    flex:none;
    height:330px;
  }
  body.is-playing .board {
    max-width:300px;
    width:100%;
    left:50%;
    transform:translateX(-50%);
  }
  body.is-playing .result-overlay {
    justify-content:flex-start;
  }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
}
