:root {
  color-scheme: light;
  --ink: #29232e;
  --muted: #69636d;
  --paper: #fbf9f5;
  --line: #dfdcd6;
  --button: #452d42;
  --portrait-size: 2.15rem;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
}
button,
input[type='checkbox'],
input[type='color'] {
  cursor: pointer;
}
button {
  color: inherit;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #b45021;
  outline-offset: 4px;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 4;
}
.skip:focus {
  top: 1rem;
  background: white;
  padding: 0.5rem;
}
.top {
  background: #241f2a;
  color: white;
}
.top nav {
  max-width: 1150px;
  margin: auto;
  padding: 0 36px;
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.top nav > div {
  display: flex;
  gap: 22px;
  align-items: center;
}
.top a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
}
.top a:hover {
  text-decoration: underline;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.top .wordmark {
  font-size: 1.12rem;
}
.wordmark span {
  color: #ffad78;
  font-size: 1.65rem;
  line-height: 1;
  transform: rotate(-26deg);
}
.wordmark b {
  font-weight: 540;
  color: #f7bd94;
}
.top .current {
  color: #ffcfa7;
}
main {
  max-width: 1150px;
  margin: 0 auto;
  padding: 32px 36px 90px;
}
.state {
  padding: clamp(1.25rem, 4vw, 3rem);
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.state h1,
.hero h1 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: -0.055em;
}
.state p {
  color: var(--muted);
}
.hero {
  --hero-field: #342c45;
  --hero-accent: #f4c39c;
  background: linear-gradient(130deg, #201d28 0%, var(--hero-field) 82%);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(26px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  border-radius: 22px;
  color: #fffdf8;
  min-height: 210px;
}
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  right: -10%;
  top: -155%;
  width: 66%;
  aspect-ratio: 1;
  border: 16px double var(--hero-accent);
  border-radius: 38%;
  transform: rotate(32deg);
  opacity: 0.15;
  box-shadow:
    0 0 0 35px var(--hero-field),
    0 0 0 37px var(--hero-accent),
    0 0 0 64px var(--hero-field),
    0 0 0 66px var(--hero-accent);
}
.hero .player-portrait {
  --portrait-size: clamp(75px, 10vw, 110px);
  box-shadow:
    0 8px 32px #0f0c163a,
    0 0 0 1px #ffffff45;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  overflow-wrap: anywhere;
}
.hero .sub {
  margin: 9px 0 0;
  color: #e3dce0;
  font-size: 0.96rem;
}
.hero > div {
  min-width: 0;
}
.hero .tools {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  position: relative;
  flex-wrap: wrap;
}
.hero .tools a {
  color: #fff7f2;
  background: #ffffff16;
  border: 1px solid #ffffff55;
  padding: 8px 13px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}
.switcher {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 26px;
  margin: 18px 0 26px;
}
.switcher button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-weight: 650;
  padding: 12px 2px;
  color: var(--muted);
}
.switcher button[aria-pressed='true'] {
  border-bottom-color: #9a4a2d;
  color: var(--ink);
}
h2 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: -0.05em;
  margin: 0 0 6px;
}
.lead {
  margin: 5px 0 20px;
  color: var(--muted);
  line-height: 1.45;
}
.games {
  display: grid;
  gap: 17px;
}
.game {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(150px, 24%) 1fr;
}
.game-art {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  background: #392c36;
}
.game-content {
  padding: 19px 23px;
  min-width: 0;
}
.game.no-art {
  grid-template-columns: 1fr;
}
.game-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: baseline;
}
.game h3 {
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0;
}
.game-head a,
.small-link {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration-color: #bdb5ad;
  text-underline-offset: 3px;
}
.scores,
.medals {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 12px 15px;
  flex-wrap: wrap;
}
.scores li {
  display: flex;
  flex-direction: column;
  background: #f5f2ed;
  border-radius: 9px;
  padding: 7px 12px;
}
.scores strong {
  font-size: 1.03rem;
}
.scores small,
.medal small {
  color: var(--muted);
  font-size: 0.78rem;
}
.medals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(192px, 100%), 1fr));
}
.achievement-shelf input[type='search'] {
  width: min(100%, 22rem);
  margin: 8px 0;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
}
.award-pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}
.award-pages small { color: var(--muted); margin-right: auto; }
.award-pages button:disabled { opacity: .45; }
.medal {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.medal .achievement-icon {
  width: 45px;
  height: 45px;
  flex: none;
}
.medal b {
  font-size: 0.9rem;
}
.medal small {
  display: block;
}
.medal.locked {
  color: #625e66;
}
.medal small + small {
  margin-top: 3px;
}
.empty {
  background: #f2eee7;
  border-radius: 13px;
  padding: 16px;
  color: #615c63;
}
.pane {
  margin-top: 26px;
}
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(230px, 0.9fr);
  align-items: start;
  gap: 20px;
}
.panel {
  padding: clamp(19px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}
.panel h3,
fieldset legend {
  font-weight: 700;
  font-size: 1.03rem;
  margin: 14px 0 6px;
}
.panel h3:first-child {
  margin-top: 0;
}
fieldset {
  border: none;
  margin: 16px 0 0;
  padding: 0;
}
.field {
  display: block;
  font-weight: 660;
}
.field input {
  margin-top: 7px;
  font-size: 1.02rem;
  width: 100%;
  border: 1px solid #bdb6bd;
  border-radius: 9px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}
.help,
.status,
.permission span small {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}
.help {
  margin: 6px 0 0;
}
.choices {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.choice {
  min-width: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 4px 2px 5px;
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
}
.choice .player-portrait {
  --portrait-size: clamp(34px, 4.4vw, 52px);
}
.choice[aria-pressed='true'],
.swatch[aria-pressed='true'] {
  border-color: #864b38;
  background: #fcf1e8;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.swatch {
  border: 2px solid transparent;
  background: transparent;
  padding: 3px;
  border-radius: 8px;
}
.swatch i {
  display: block;
  width: 27px;
  height: 22px;
  border-radius: 4px;
}
.colors {
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.colors label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
}
.colors input {
  width: 32px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 2px;
}
.primary,
.secondary {
  border: 0;
  display: inline-block;
  text-decoration: none;
  padding: 10px 17px;
  border-radius: 20px;
  font-size: 0.92rem;
  font-weight: 680;
}
.primary {
  background: var(--button);
  color: white;
}
.secondary {
  background: #eee8e4;
}
.primary:disabled {
  opacity: 0.55;
}
.status {
  min-height: 1.2em;
  margin: 7px 0;
}
.status:empty {
  min-height: 0;
}
.permission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.permission span small {
  display: block;
}
.permission input {
  width: 19px;
  height: 19px;
  flex: none;
  accent-color: #75436a;
}
.preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 15px;
}
.preview .player-portrait {
  --portrait-size: 64px;
}
.preview strong {
  overflow-wrap: anywhere;
}
.public-collection {
  margin-top: 25px;
}
@media (max-width: 680px) {
  .top nav {
    padding: 0 15px;
    height: 56px;
  }
  .top nav > div {
    gap: 13px;
  }
  .top a {
    font-size: 0.78rem;
  }
  .top .wordmark {
    font-size: 0.95rem;
  }
  .wordmark span {
    font-size: 1.3rem;
  }
  main {
    padding: 16px 12px 50px;
  }
  .hero {
    padding: 23px 18px;
    gap: 14px;
    min-height: 150px;
    flex-wrap: wrap;
  }
  .hero .tools {
    margin-left: 0;
  }
  .hero .player-portrait {
    --portrait-size: 64px;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero > div:not(.tools) {
    flex: 1 1 150px;
  }
  .hero .tools a {
    padding: 5px 10px;
  }
  .editor {
    grid-template-columns: 1fr;
  }
  .game {
    grid-template-columns: 1fr;
  }
  .game-art {
    height: 75px;
    min-height: 0;
    object-position: center 48%;
  }
  .game-content {
    padding: 15px;
  }
  .game-head {
    flex-wrap: wrap;
    gap: 5px;
  }
  .choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .choice .player-portrait {
    --portrait-size: 42px;
  }
  .switcher {
    margin: 10px 0 16px;
  }
  .hero::before {
    width: 100%;
    top: -105%;
  }
}
@media (max-width: 450px) {
  .top nav > div {
    gap: 10px;
  }
  .top .current {
    white-space: nowrap;
  }
  .top a {
    font-size: 0.76rem;
  }
}
#scope {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
#scope label {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 650;
}
#scope select {
  font: inherit;
  font-size: 0.9rem;
  padding: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}
#scores {
  padding-left: 32px;
}
#scores li {
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
#scores li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
