* {
  box-sizing: border-box;
}
html {
  background: #faf9f6;
  color: #161819;
  font:
    16px Inter,
    Arial,
    Helvetica,
    sans-serif;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
  border: 0;
  background: none;
  font-weight: 700;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #345afa;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
svg.icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 204px;
  display: flex;
  flex-direction: column;
  background: #f4f3ef;
  border-right: 1px solid #d9d9d1;
  padding: 30px 16px;
  z-index: 4;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -1.8px;
  font-size: 28px;
  font-weight: 1000;
}
.brand b {
  background: #2943e9;
  color: white;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  line-height: 1;
  letter-spacing: -1px;
  font-size: 30px;
}
.brand strong {
  font-weight: 1000;
}
nav {
  display: grid;
  gap: 6px;
  margin-top: 54px;
}
nav button,
.settings {
  display: flex;
  gap: 14px;
  align-items: center;
  border-radius: 5px;
  padding: 13px 15px;
  text-align: left;
}
.active,
.primary {
  background: #2745ea;
  color: white;
}
nav button:hover:not(.active),
.settings:hover,
.soft:hover {
  background: #e7e7df;
}
.settings {
  margin-top: auto;
  border-top: 1px solid #d7d7ce;
  border-radius: 0;
}
.content {
  max-width: 1540px;
  margin: auto;
}
main {
  margin-left: 204px;
  padding: 31px clamp(22px, 3.2vw, 60px) 42px;
}
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid #c9c9c0;
  margin-bottom: 21px;
}
.topline h1 {
  font-size: clamp(25px, 2.4vw, 35px);
  line-height: 1;
  letter-spacing: -1.6px;
  margin: 0;
}
.profile {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.profile i {
  width: 9px;
  height: 9px;
  background: #76a345;
  border-radius: 100%;
}
.profile svg {
  width: 17px;
}
.hero {
  position: relative;
  overflow: hidden;
  background: #242fc0;
  min-height: 208px;
  display: flex;
  align-items: center;
  color: white;
  border-radius: 8px;
  isolation: isolate;
}
.hero img {
  position: absolute;
  inset: 0 0 0 auto;
  width: 66%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 29%;
  z-index: -2;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #1b279e 2%, #263eca 36%, transparent 70%);
  z-index: -1;
}
.herocopy {
  padding: 28px 36px;
}
.hero h2 {
  font-size: clamp(32px, 4vw, 63px);
  line-height: 1;
  letter-spacing: -0.065em;
  margin: 0 0 22px;
}
.primary,
.soft,
.outline,
.lime {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 10px 15px;
  font-size: 14px;
}
.lime {
  background: #d9fc3d;
  color: #171916;
}
.soft {
  background: #eeeee7;
}
.outline {
  border: 1px solid #acafa8;
}
.primary:hover,
.lime:hover {
  filter: brightness(0.94);
}
.chips,
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chips {
  margin: 23px 0;
}
.chips button,
.tabs button {
  border: 1px solid #c2c3ba;
  border-radius: 30px;
  padding: 7px 15px;
  font-size: 13px;
}
.chips button.active,
.tabs button.active {
  border-color: #2745ea;
}
.sectionhead {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 14px;
}
.sectionhead h2 {
  font-size: clamp(23px, 2.1vw, 34px);
  letter-spacing: -1.4px;
  margin: 0;
}
.sectionhead:after {
  content: "";
  height: 1px;
  background: #d0d1c9;
  flex: 1;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  padding: 0;
  position: relative;
  isolation: isolate;
  border-radius: 7px;
  overflow: hidden;
  aspect-ratio: 1.12;
  text-align: left;
  color: white;
  background: #20364b;
}
.card img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  z-index: -2;
  position: absolute;
  inset: 0;
  transition: transform 0.22s;
}
.card:hover img {
  transform: scale(1.04);
}
.card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    #091413ee 0%,
    #10131060 36%,
    transparent 64%
  );
  z-index: -1;
}
.card .cat {
  position: absolute;
  left: 14px;
  top: 14px;
  background: #181c20c4;
  padding: 5px 9px;
  border-radius: 3px;
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.cardfoot {
  position: absolute;
  bottom: 17px;
  left: 16px;
  right: 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 4px;
}
.card strong {
  font-size: clamp(21px, 2.3vw, 38px);
  letter-spacing: -0.055em;
  line-height: 1.02;
  max-width: 80%;
}
.arrow {
  background: #d9fc3d;
  color: #1e2321;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  flex: none;
}
.arrow svg {
  width: 18px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.playrow {
  display: flex;
  width: 100%;
  align-items: center;
  text-align: left;
  gap: 15px;
  border-bottom: 1px solid #dddcd3;
  padding: 12px 0;
}
.playrow img {
  width: 70px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}
.playrow span,
.playrow small {
  margin-left: auto;
  color: #555;
}
.muted,
p {
  color: #5b605b;
  line-height: 1.5;
}
.search,
input[type="text"],
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #a7aaa3;
  border-radius: 4px;
  background: #fff;
  color: #181b1c;
}
.search {
  max-width: 520px;
}
.editor {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(270px, 0.91fr);
  gap: 20px;
}
.stage {
  position: relative;
  min-height: 450px;
  background-color: #e4e5df;
  background-image:
    linear-gradient(#c3c6bf66 1px, transparent 1px),
    linear-gradient(90deg, #c3c6bf66 1px, transparent 1px);
  background-size: 40px 40px;
  border-radius: 6px;
}
.stage canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.rot {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.rot button {
  background: #fff;
  padding: 6px 15px;
  border-radius: 3px;
}
.controls {
  border: 1px solid #cfcec6;
  border-radius: 6px;
  background: white;
  padding: 16px;
}
.tabs {
  gap: 5px;
  margin-bottom: 16px;
}
.tabs button {
  font-size: 12px;
  padding: 7px 10px;
}
.field {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  font-size: 14px;
  font-weight: 700;
}
.sw {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.sw button {
  height: 32px;
  width: 32px;
  background: var(--c);
  border: 1px solid #6f716d;
  border-radius: 3px;
}
.sw .chosen {
  outline: 2px solid #2842de;
  outline-offset: 2px;
}
input[type="color"] {
  width: 54px;
  height: 32px;
  padding: 1px;
  background: white;
}
.outfits {
  margin-top: 16px;
}
.outfits button {
  margin: 3px;
}
.modalform,
dialog {
  max-width: min(440px, 94vw);
}
dialog {
  border: 1px solid #999b94;
  border-radius: 8px;
  box-shadow: 0 12px 80px #10101040;
  padding: 24px;
  width: 410px;
  background: #faf9f6;
  color: #1a1d1b;
}
dialog::backdrop {
  background: #161a2080;
}
dialog form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}
dialog form button {
  font-size: 24px;
}
dialog h2 {
  margin: 12px 0;
}
.modalart {
  height: 135px;
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 10px;
}
.error {
  color: #a53324;
}
.gamebar,
.gamefoot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  background: #252b32;
  color: white;
}
.gamebar small {
  margin-right: auto;
}
.gamebar button,
.gamefoot button {
  padding: 7px;
  background: #414952;
  color: white;
  border-radius: 4px;
  font-size: 13px;
}
.gamefoot {
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 12px;
}
.gamefoot div {
  display: flex;
  gap: 5px;
}
.viewport {
  position: relative;
  height: min(70vh, 800px);
  min-height: 275px;
  overflow: hidden;
  background: #8296a5;
}
.viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.gamehud,
.feedback {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #151b22db;
  color: white;
  padding: 8px 11px;
  border-radius: 4px;
  font-size: 13px;
  pointer-events: none;
}
.feedback {
  top: auto;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.feedback:empty {
  display: none;
}
.cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 1px 1px #555;
}
.ingame {
  position: absolute;
  bottom: 18px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ingame button,
.pad {
  background: #192532aa;
  color: white;
  border: 1px solid #ffffff99;
  border-radius: 22px;
  padding: 11px;
}
.pad {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.pad i {
  display: block;
  background: #ffffff90;
  border-radius: 50%;
  width: 35px;
  height: 35px;
}
#game:fullscreen .viewport {
  height: calc(100dvh - 100px);
}
.gridmap {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 2px;
}
.gridmap button {
  aspect-ratio: 1;
  background: #d4dac8;
}
.gridmap .placed {
  background: #7268ab;
}
.gridmap .fixed {
  background: #676d62;
}
#toast {
  position: fixed;
  z-index: 9;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #22272c;
  color: white;
  padding: 11px 15px;
  border-radius: 6px;
  pointer-events: none;
}
#toast:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (pointer: coarse) {
  .pad {
    display: flex;
  }
  .hints {
    display: none;
  }
}
@media (max-width: 850px) {
  aside {
    width: 150px;
    padding: 20px 10px;
  }
  .brand {
    font-size: 23px;
  }
  main {
    margin-left: 150px;
    padding: 22px 18px;
  }
  .cards {
    gap: 10px;
  }
  .editor {
    grid-template-columns: 1fr 1fr;
  }
  .cardfoot {
    left: 10px;
    right: 10px;
  }
  .hero {
    min-height: 180px;
  }
  .herocopy {
    padding: 25px;
  }
  .arrow {
    width: 25px;
    height: 25px;
  }
}
@media (max-width: 650px) {
  aside {
    width: 100%;
    height: 57px;
    inset: 0 0 auto;
    background: #faf9f6;
    border: 0;
    border-bottom: 1px solid #cfcfc7;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
  }
  .settings {
    margin: 0;
    border: 0;
    padding: 8px;
  }
  .settings span {
    display: none;
  }
  .brand {
    font-size: 23px;
  }
  .brand b {
    height: 30px;
    width: 30px;
    font-size: 26px;
  }
  nav {
    position: fixed;
    inset: auto 0 0;
    background: #faf9f6;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    padding: 5px 6px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid #cecec8;
    gap: 4px;
  }
  nav button {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    padding: 6px 0;
    font-size: 11px;
  }
  nav .icon {
    height: 19px;
    width: 19px;
  }
  main {
    margin: 57px 0 64px;
    padding: 16px;
  }
  .topline {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  .topline h1 {
    font-size: 25px;
  }
  .hero {
    min-height: 147px;
  }
  .hero h2 {
    font-size: 34px;
    max-width: 135px;
    margin-bottom: 14px;
  }
  .herocopy {
    padding: 16px;
  }
  .hero img {
    width: 64%;
  }
  .hero .lime {
    padding: 8px 10px;
    font-size: 12px;
  }
  .chips {
    margin: 14px 0;
    gap: 5px;
  }
  .chips button {
    padding: 6px 12px;
  }
  .sectionhead {
    margin: 16px 0 10px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .card {
    aspect-ratio: 0.98;
  }
  .card:nth-child(3):last-child {
    grid-column: 1/-1;
    aspect-ratio: 2.9;
  }
  .card strong {
    font-size: 24px;
  }
  .card .cat {
    left: 9px;
    top: 9px;
    font-size: 10px;
  }
  .cardfoot {
    bottom: 10px;
  }
  .editor {
    display: block;
  }
  .stage {
    min-height: 280px;
    margin-bottom: 10px;
  }
  .viewport {
    height: 62dvh;
  }
  .gamebar {
    gap: 5px;
    flex-wrap: wrap;
  }
  .gamebar small {
    font-size: 9px;
  }
  .gamebar strong {
    font-size: 14px;
  }
  .gamefoot .hints {
    display: none;
  }
  #toast {
    bottom: 75px;
  }
  .controls {
    padding: 12px;
  }
  .topline .profile {
    font-size: 12px;
  }
  .ingame {
    right: 9px;
  }
  .gamehud {
    font-size: 11px;
  }
  dialog {
    padding: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.portrait {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 50%;
}
.objective {
  position: absolute;
  top: 50px;
  left: 12px;
  background: #f9f8efd9;
  color: #18251f;
  font-size: 12px;
  border-radius: 3px;
  padding: 5px 8px;
  pointer-events: none;
}
.objective:empty {
  display: none;
}

#looks h3 {
  font-size: 15px;
  margin: 16px 0 9px;
}
.presetlist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.presetlist button {
  padding: 0;
  border: 1px solid #d2d3ca;
  border-radius: 3px;
  overflow: hidden;
  background: #eeeee8;
}
.presetlist img {
  display: block;
  width: 100%;
  height: 62px;
  object-fit: cover;
  object-position: 50% 27%;
}
.presetlist span {
  display: block;
  padding: 4px;
  font-size: 11px;
}
.field input[type="range"] {
  accent-color: #2745ea;
}
