* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
:root {
  color-scheme: dark;
  --ink: #f5eee3;
  --muted: #b5ada6;
  --accent: #ffbd83;
  background: #18191b;
  color: var(--ink);
  font-family: 'DM Sans', 'Avenir Next', system-ui, sans-serif;
}
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 62% -30%, #45312e 0, transparent 58%), #18191b;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 3px solid #fff0a1;
  outline-offset: 3px;
}
.top {
  border-bottom: 1px solid #ffffff16;
}
.topin,
main {
  width: min(1240px, 90%);
  margin: auto;
}
.topin {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand,
.tools,
.cta,
.back,
.hud,
.actions,
.levelrow {
  display: flex;
  align-items: center;
}
.brand {
  gap: 11px;
  direction: inherit;
}
.brand strong {
  font-family: 'Arial Narrow', 'Avenir Next Condensed', sans-serif;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 1px;
}
.brand strong span {
  color: #c4b7a9;
  font-weight: 500;
}
.sunmark {
  position: relative;
  width: 30px;
  height: 25px;
  display: inline-block;
  background: repeating-linear-gradient(0deg, #ffb781 0 3px, transparent 3px 5px);
  border-radius: 20px 20px 4px 4px;
  clip-path: polygon(
    0 88%,
    0 60%,
    3% 41%,
    12% 24%,
    25% 11%,
    38% 4%,
    50% 1%,
    63% 4%,
    75% 11%,
    88% 24%,
    97% 41%,
    100% 60%,
    100% 88%,
    74% 88%,
    69% 100%,
    31% 100%,
    26% 88%
  );
}
.tools {
  gap: 10px;
}
.icon,
select,
.quiet,
.back,
.pad {
  background: #ffffff09;
  border: 1px solid #ffffff27;
  border-radius: 10px;
}
.icon,
select,
.back,
.quiet,
.pad {
  min-height: 42px;
}
.icon {
  width: 44px;
  display: grid;
  place-items: center;
}
.spk {
  width: 20px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  direction: ltr;
  color: #f1e6d8;
}
.spk:before {
  content: '';
  width: 14px;
  height: 15px;
  background: currentColor;
  clip-path: polygon(0 34%, 32% 34%, 83% 0, 83% 100%, 32% 66%, 0 66%);
}
.spk:after {
  content: ')';
  font-size: 14px;
}
.spk.mute:after {
  content: '×';
}
.tools select {
  padding: 0 8px;
  background: #242425;
}
.poster > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.overline {
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  font-size: 11px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: 'Baskervville', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
}
h1,
h2,
h3 {
  font-weight: 620;
}
.cta,
.quiet {
  padding: 0 20px;
  justify-content: center;
  gap: 12px;
  font-weight: 750;
  border-radius: 999px;
  min-height: 45px;
}
.cta {
  background: var(--accent);
  color: #232222;
  border: 0;
  display: inline-flex;
}
.cta:hover {
  filter: brightness(1.08);
}
.triangle {
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.back {
  display: inline-flex;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  font-size: 13px;
  margin: 17px 0;
}
.poster {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-flow: column;
  justify-content: end;
  border-radius: 17px;
  width: 100%;
  min-height: 230px;
  aspect-ratio: 2.95;
  border: 1px solid #ffffff20;
  padding: clamp(20px, 3vw, 42px);
}
.poster img {
  z-index: -2;
}
.poster:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #131c27cc, transparent 78%), linear-gradient(0deg, #17202a99, transparent 70%);
}
.poster .overline,
.info .overline {
  color: var(--accent);
}
.poster h1,
.info h1 {
  font-size: clamp(34px, 4.7vw, 68px);
  letter-spacing: -1.8px;
  line-height: 1.1;
  margin: 8px 0;
}
.poster p {
  max-width: 480px;
  line-height: 1.4;
}
.brief {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 24px 0 35px;
}
.brief h2,
.info h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.brief p,
.info p {
  color: var(--muted);
  max-width: 54ch;
  line-height: 1.6;
}
.levelrow {
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.levelrow button {
  width: 45px;
  height: 44px;
  border: 1px solid #ffffff33;
  border-radius: 10px;
  background: #2b2b2d;
  font-weight: 700;
}
.levelrow button.sel {
  color: #191a1b;
  background: var(--accent);
}
button:disabled {
  cursor: default;
}
.levelrow button:disabled {
  opacity: 0.48;
}
.results {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.playlayout {
  display: flex;
  flex-direction: row;
  gap: clamp(16px, 4vw, 70px);
  width: fit-content;
  max-width: 100%;
  margin: 15px auto;
  align-items: center;
  justify-content: center;
}
.fieldcol {
  width: min(61vw, calc((100dvh - 177px) * 0.741), 465px);
  min-width: 190px;
}
.hud {
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
  min-height: 36px;
  color: var(--muted);
  font-size: 13px;
}
.hud b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hud button {
  min-width: 42px;
  min-height: 40px;
  background: transparent;
  border: 1px solid #ffffff29;
  border-radius: 9px;
}
.board {
  position: relative;
  isolation: isolate;
  aspect-ratio: 400/540;
  border-radius: 14px;
  overflow: hidden;
  background: #25333e center center/cover no-repeat;
  border: 1px solid #ffffff30;
}
.board canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: 0;
}
.overlay {
  position: absolute;
  inset: 0;
  background: #141824b8;
  display: grid;
  place-items: center;
  z-index: 3;
  padding: 12px;
}
.modal {
  background: #23262bf7;
  padding: 22px;
  text-align: center;
  border: 1px solid #ffffff33;
  border-radius: 17px;
  width: min(100%, 290px);
}
.modal h2 {
  font-size: 30px;
}
.modal p {
  color: #c8c5c0;
  margin: 8px 0 15px;
}
.actions {
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.quiet {
  background: #303134;
}
.meter {
  height: 4px;
  background: #ffffff16;
  margin: 8px 0;
  border-radius: 10px;
  overflow: hidden;
}
.meter i {
  height: 100%;
  display: block;
  background: var(--accent);
  transition: width 0.14s;
}
.touchbar {
  display: flex;
  direction: ltr;
  gap: 5px;
  justify-content: center;
}
.pad {
  min-width: 42px;
  flex: 1;
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  touch-action: manipulation;
  max-width: 95px;
}
.info {
  max-width: 340px;
}
.info h1 {
  font-size: 46px;
  line-height: 1.03;
  margin: 8px 0 19px;
}
.info .back {
  margin-top: 20px;
}
.info h2 {
  font-size: 20px;
}
.hud span {
  white-space: nowrap;
}
[dir='rtl'] .poster:before {
  background:
    linear-gradient(270deg, #17202ac9, transparent 85%), linear-gradient(0deg, #17202a88, transparent 70%);
}
@media (max-width: 780px) {
  .topin,
  main {
    width: 93%;
  }
  .info {
    max-width: 255px;
  }
  .info h1 {
    font-size: 33px;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .topin {
    height: 56px;
  }
  .brand strong {
    font-size: 14px;
  }
  .tools {
    gap: 5px;
  }
  .tools select {
    max-width: 93px;
  }
  .poster {
    min-height: 215px;
  }
  .brief {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 19px 0;
  }
  .playlayout {
    display: block;
    width: 100%;
    margin: 4px auto;
  }
  .fieldcol {
    width: min(100%, calc((100dvh - 164px) * 0.741));
    margin: auto;
  }
  .info {
    max-width: none;
  }
  .info .overline,
  .info h1,
  .info h2,
  .info p {
    display: none;
  }
  .info .back {
    margin: 2px 0;
  }
  .hud {
    min-height: 34px;
  }
  .pad {
    min-height: 44px;
  }
  .board {
    border-radius: 10px;
  }
}
@media (max-height: 570px) and (orientation: landscape) {
  .playing .top {
    display: none;
  }
  .playlayout {
    margin: 3px auto;
    gap: 26px;
  }
  .fieldcol {
    width: min(56vw, calc((100dvh - 101px) * 0.741));
    min-width: 0;
  }
  .hud {
    margin: 0;
    min-height: 30px;
    font-size: 11px;
  }
  .hud button {
    min-height: 30px;
  }
  .pad {
    min-height: 34px;
  }
  .info {
    max-width: 290px;
  }
  .info h1 {
    font-size: 29px;
  }
  .info p {
    font-size: 12px;
  }
  .info h2 {
    font-size: 16px;
  }
  .info .back {
    margin: 8px 0;
  }
  .modal {
    padding: 10px;
  }
  .modal h2 {
    font-size: 23px;
  }
  .modal p {
    margin: 3px;
  }
  .topin {
    height: 49px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.hud {
  justify-content: space-between;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(11px, 1.3vw, 14px);
}
#metric {
  color: var(--accent);
}
.board {
  aspect-ratio: 400 / 540;
}
.hud #pause {
  font-family: system-ui;
  font-weight: 800;
}
.actions .back {
  margin: 0;
}
.back:hover {
  color: var(--accent);
}
@media (min-height: 571px) and (min-width: 601px) {
  .fieldcol {
    width: min(55vw, calc((100dvh - 214px) * 0.741));
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .fieldcol {
    width: min(100%, calc((100dvh - 181px) * 0.741));
  }
  .info .back {
    display: none;
  }
}
.tierpick {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.tierpick button {
  padding: 6px 14px;
}
.tierpick [aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--accent);
}
.tierpick button:disabled,
.power:disabled {
  opacity: 0.48;
}
.brief p.mission {
  margin: 6px 0 12px;
}
.mission:empty {
  display: none;
}
.mastery {
  border-top: 1px solid #ffffff24;
  padding: 18px 0 28px;
}
.mastery h2 {
  font-size: 21px;
  margin: 0;
}
.mastery ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
  color: #ffde9b;
  margin: 10px 0;
}
.mastery p {
  margin: 8px 0;
  color: var(--muted);
}
.runscore {
  display: grid;
  text-align: center;
  line-height: 1.15;
}
#goalcount {
  font-size: 10px;
  color: #ffcf87;
}
.touchbar .power {
  flex: 1.8;
  min-width: 0;
  color: var(--accent);
  font-size: 13px;
  padding-inline: 4px;
}
.overlay {
  overflow: auto;
}
.modal {
  max-height: 100%;
  overflow: auto;
}
.modal .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.modal .actions > :first-child {
  grid-column: 1 / -1;
}
.modal .actions > * {
  margin: 0;
  padding-inline: 6px;
  font-size: 14px;
}

/* The collection and both puzzle routes share this masthead. */
:root {
  --gold: #ffd49b;
}
.top {
  background: #1c1b1e;
}
.topin,
main {
  max-width: 1080px;
}
.brand {
  min-height: 44px;
  min-width: 44px;
  gap: 8px;
}
.brand strong {
  font:
    600 clamp(16px, 2.4vw, 24px) / 1.06 Georgia,
    serif;
  letter-spacing: -0.025em;
}
.sunmark {
  flex-shrink: 0;
}
.tools {
  flex-shrink: 0;
}
.tools select,
.icon,
.back,
.hud button,
.pad,
.quiet {
  min-width: 44px;
  min-height: 44px;
}
[dir='rtl'] :is(.triangle, .go, .back > span) {
  transform: scaleX(-1);
}
[dir='rtl'] h1,
[dir='rtl'] h2,
[dir='rtl'] .brand strong {
  letter-spacing: normal;
}
.shelf {
  margin: clamp(24px, 4vw, 44px) 0;
}
.shelf > h1,
.shelf > h2 {
  margin: 0 0 16px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-size: clamp(26px, 4vw, 44px);
}
.shelf > h2 {
  font-size: clamp(24px, 3vw, 32px);
}
.features,
.puzzles {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.features {
  grid-template-columns: 1.55fr 1fr;
}
.shelf-card {
  position: relative;
  display: grid;
  align-content: start;
  background: #242428;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ffffff21;
}
.shelf-card:hover,
.shelf-card:focus-visible {
  border-color: var(--gold);
}
.cover {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.caption {
  padding: 13px 16px 16px;
  min-width: 0;
}
.caption h2 {
  font-size: clamp(21px, 2.2vw, 29px);
  line-height: 1.4;
}
.caption p {
  margin-top: 7px;
  color: #d5cfc4;
  line-height: 1.45;
  font-size: 14px;
}
.go {
  position: absolute;
  inset-inline-end: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #201a19db;
  color: #fff2df;
  border: 1px solid #ffffff69;
  border-radius: 50%;
  font: 14px system-ui;
}
.features > :first-child {
  grid-row: span 2;
  align-content: end;
  isolation: isolate;
  min-height: 275px;
}
.features > :first-child .cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  aspect-ratio: auto;
}
.features > :first-child::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, #101018 0%, #101018ac 24%, transparent 65%);
}
.features > :first-child .caption {
  padding: clamp(16px, 2.7vw, 32px);
}
.features > :first-child h2 {
  font-size: clamp(34px, 5vw, 58px);
}
.features > :first-child p {
  color: #fff5e8;
  max-width: 40ch;
}
.features > :not(:first-child) {
  grid-template-columns: 42% 1fr;
  align-content: stretch;
}
.features > :not(:first-child) .cover {
  aspect-ratio: auto;
}
.features > :not(:first-child) .go {
  grid-area: 1 / 1 / 2 / 2;
}
#new-tab {
  margin-top: 10px;
  color: #b8ada4;
  font-size: 13px;
  line-height: 1.45;
}
@media (max-width: 650px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .features > :first-child {
    grid-column: 1/-1;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 1.55;
  }
  .features > :not(:first-child) {
    grid-template-columns: 1fr;
    align-content: start;
  }
  .features > :not(:first-child) .cover {
    aspect-ratio: 1.8;
  }
  .caption {
    padding: 10px;
  }
  .caption h2 {
    font-size: 20px;
  }
  .caption p {
    font-size: 13px;
  }
  .puzzles {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .puzzles .shelf-card {
    grid-template-columns: 32% 1fr;
    align-content: stretch;
  }
  .puzzles .cover {
    aspect-ratio: auto;
  }
  .puzzles .go {
    inset-inline-end: auto;
    inset-inline-start: 7px;
    top: 7px;
  }
}
@media (max-width: 375px) {
  .sunmark {
    width: 23px;
  }
  .brand {
    gap: 5px;
  }
  .brand strong {
    max-width: 110px;
  }
  .features > :first-child {
    aspect-ratio: 1.4;
  }
}
.tools select {
  appearance: none;
  height: 44px;
  padding-inline: 9px 24px;
  background: #242425 linear-gradient(45deg, transparent 50%, #ddd2bd 50%) right 10px center / 6px 6px
    no-repeat;
}
[dir='rtl'] .tools select {
  background-position: left 10px center;
}
