@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=Barlow:wght@400;500;600;700&display=swap");
:root {
  --ink: #202725;
  --deep: #141c1c;
  --cream: #f5e4bf;
  --muted: #a6a79b;
  --gold: #ffd15d;
  --edge: #675c42;
  --blue: #65b7e4;
  --red: #ed8860;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  font-family: Barlow, sans-serif;
  background: #131b1c;
  color: var(--cream);
  background-image: radial-gradient(ellipse at top, #3d3e32, transparent 60%);
}
button,
a {
  touch-action: manipulation;
}
button {
  font:
    700 17px "Barlow Condensed",
    sans-serif;
  color: var(--cream);
  cursor: pointer;
  border: 1px solid var(--edge);
  background: #29302c;
  border-radius: 5px;
}
button:hover {
  border-color: var(--gold);
  color: var(--gold);
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
header {
  height: 79px;
  border-bottom: 1px solid var(--edge);
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 24px;
  background: linear-gradient(#30332e, #212927);
  position: relative;
}
.brand {
  text-decoration: none;
  color: var(--cream);
  font:
    900 25px/0.85 "Barlow Condensed",
    sans-serif;
  letter-spacing: 1px;
  display: block;
  text-align: center;
  transform: rotate(-3deg);
}
.brand small {
  display: block;
  font-size: 18px;
  letter-spacing: 5px;
  margin-top: 6px;
}
.divider {
  height: 39px;
  border-left: 1px solid var(--edge);
}
.title {
  font: 900 33px/0.95 "Barlow Condensed";
  letter-spacing: 1px;
}
.title small {
  display: block;
  font: 500 10px Barlow;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 7px;
}
.clock {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  min-width: 140px;
  border-left: 1px solid var(--edge);
  border-right: 1px solid var(--edge);
  padding: 0 24px;
}
.clock small {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--muted);
}
.clock b {
  font: 800 38px/0.95 "Barlow Condensed";
  font-variant-numeric: tabular-nums;
}
.tools {
  display: flex;
  gap: 7px;
  margin-left: auto;
}
.tools button {
  width: 38px;
  height: 36px;
  font-size: 23px;
}
main {
  max-width: 1800px;
  margin: auto;
  height: calc(100dvh - 79px);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 210px;
  padding: 18px 22px 12px;
  gap: 20px;
}
.profile,
.guide {
  padding: 22px 16px;
  border: 1px solid var(--edge);
  background: linear-gradient(150deg, #2d332d, #1c2524);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
}
.eyebrow {
  font: 700 12px "Barlow Condensed";
  letter-spacing: 1.8px;
  color: #c2ab7a;
}
.portrait {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  border: 2px solid #bba16b;
  margin: 18px auto 10px;
  background-image: url("assets/concept.png");
  background-size: 930px auto;
  background-position: -7px -33px;
  box-shadow: 0 6px 30px #0005;
}
.profile h2 {
  font: 900 33px "Barlow Condensed";
  margin: 0;
  text-align: center;
}
.profile h2 span {
  font: 600 12px "Barlow Condensed";
  color: var(--muted);
  letter-spacing: 2px;
  margin-left: 6px;
}
.level {
  text-align: center;
  font: 700 17px "Barlow Condensed";
  color: var(--gold);
  margin: 12px 0 8px;
}
.xp {
  height: 22px;
  position: relative;
  background: #131b1a;
  border: 1px solid #786a49;
  border-radius: 3px;
  overflow: hidden;
}
.xp i {
  height: 100%;
  width: 0;
  display: block;
  background: #927332;
}
.xp b {
  position: absolute;
  inset: 0;
  text-align: center;
  line-height: 20px;
  font-size: 11px;
}
.muted {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
}
.rule {
  border-top: 1px solid var(--edge);
  margin: 16px 0 22px;
}
.profile h3 {
  font: 800 25px/1.1 "Barlow Condensed";
  margin: 12px 0;
}
.profile p:not(.muted) {
  font-size: 12px;
  color: #c0c0b3;
  line-height: 1.7;
}
.record {
  display: flex;
  gap: 20px;
  font: 600 11px "Barlow Condensed";
  color: var(--muted);
  margin-top: 18px;
}
.record b {
  display: block;
  font-size: 26px;
  color: var(--cream);
}
.sidebottom {
  margin-top: auto;
  padding-top: 18px;
  font: 700 13px "Barlow Condensed";
  letter-spacing: 1px;
}
.sidebottom small {
  display: block;
  font: 400 11px Barlow;
  color: var(--muted);
  margin-top: 8px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #92b97a;
  margin-right: 5px;
}
.version {
  display: block;
  font-size: 9px;
  margin-top: 22px;
  color: #7e887f;
}
em {
  font-style: normal;
  color: var(--gold);
}
.arena {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.opponent {
  height: 29px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 800 14px "Barlow Condensed";
  letter-spacing: 1px;
}
.opponent small {
  font-size: 10px;
  color: #929e94;
}
.teamdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.red {
  background: var(--red);
}
.blue {
  background: var(--blue);
}
.score {
  font: 800 17px "Barlow Condensed";
  padding: 0 22px;
  color: #d2ba86;
}
.canvaswrap {
  position: relative;
  flex: 1;
  min-height: 100px;
  background: #b8aa7f;
  border: 2px solid #8e7b50;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 10px 28px #0005;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.hint {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  padding: 8px 15px;
  background: #192422e8;
  border: 1px solid #bda06188;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s;
}
#toast {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  background: #202725ec;
  border: 1px solid var(--gold);
  padding: 10px 20px;
  border-radius: 4px;
  font: 700 20px "Barlow Condensed";
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  text-align: center;
}
.deck {
  height: 130px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  padding-top: 12px;
}
.card {
  min-width: 0;
  position: relative;
  overflow: visible;
  border: 1px solid #8b7750;
  border-bottom: 3px solid #8b7750;
  background: #30362d;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  transition:
    transform 0.15s,
    border-color 0.15s,
    filter 0.15s;
  user-select: none;
  touch-action: none;
}
.card:hover {
  transform: translateY(-3px);
}
.card.selected {
  border-color: var(--gold);
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 20px #ffcc4433;
  transform: translateY(-5px);
}
.card.unaffordable {
  filter: saturate(0.35) brightness(0.63);
}
.cardart {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: #9a8a66;
}
.cardart img {
  position: absolute;
  width: 755%;
  max-width: none;
  height: auto;
  top: -342%;
  pointer-events: none;
}
.card:nth-child(1) img {
  left: -101%;
}
.card:nth-child(2) img {
  left: -214%;
}
.card:nth-child(3) img {
  left: -326%;
}
.card:nth-child(4) img {
  left: -439%;
}
.card:nth-child(5) img {
  left: -551%;
}
.card .label {
  font: 800 17px "Barlow Condensed";
  letter-spacing: 0.3px;
  padding: 4px 0 6px;
  white-space: nowrap;
}
.cost {
  position: absolute;
  left: -5px;
  top: -6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--gold);
  border: 2px solid #514528;
  border-radius: 50%;
  font: 900 23px "Barlow Condensed";
  color: #202725;
  z-index: 1;
}
.hotkey {
  position: absolute;
  right: 5px;
  top: 5px;
  font: 600 11px Barlow;
  color: white;
  background: #17201caa;
  padding: 2px 5px;
  border-radius: 3px;
}
.energyrow {
  height: 37px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font: 700 13px "Barlow Condensed";
  letter-spacing: 1px;
}
.energyrow b {
  color: var(--gold);
  margin-left: 5px;
}
.energytrack {
  height: 12px;
  flex: 1;
  background: #101817;
  border: 1px solid #756442;
  border-radius: 3px;
  overflow: hidden;
}
.energytrack i {
  height: 100%;
  display: block;
  width: 60%;
  background: repeating-linear-gradient(
    to right,
    #e9ad2d 0,
    #ffda69 8%,
    #b07f24 9%,
    #e9ad2d 10%
  );
  transition: width 0.1s linear;
}
.regen {
  font: 500 10px Barlow;
  color: var(--muted);
}
.bottomhelp {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #849287;
  gap: 10px;
}
.bottomhelp span:last-child {
  color: #d0b470;
  font: 600 11px "Barlow Condensed";
}
.guide h2 {
  font: 800 37px/1 "Barlow Condensed";
  margin: 16px 0 24px;
}
.tip {
  display: flex;
  gap: 13px;
  margin-bottom: 15px;
}
.tip > b {
  font: 700 23px "Barlow Condensed";
  color: #8d825f;
}
.tip p {
  font-size: 11px;
  line-height: 1.7;
  margin: 0;
  color: var(--muted);
}
.tip strong {
  font-size: 12px;
  color: var(--cream);
}
.dispatch {
  border-top: 1px solid var(--edge);
  margin-top: auto;
  padding-top: 22px;
}
.dispatch h4 {
  font: 700 20px "Barlow Condensed";
  margin: 8px 0;
}
.dispatch p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.stamp {
  font: 600 10px "Barlow Condensed";
  letter-spacing: 1px;
  color: #a18d60;
}
.quiet {
  margin-top: 20px;
  font-size: 12px;
  padding: 10px;
  background: transparent;
}
.overlay {
  position: absolute;
  inset: 0;
  background: #1723209c;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 4;
}
.overlay.hidden {
  display: none;
}
.modal {
  background: linear-gradient(145deg, #30372f, #1b2523);
  border: 1px solid #b59a5d;
  box-shadow: 0 20px 80px #0006;
  border-radius: 8px;
  width: 470px;
  max-width: 100%;
  padding: 30px;
  text-align: center;
}
.modal h1 {
  font: 900 45px/0.98 "Barlow Condensed";
  margin: 17px 0;
}
.modal p {
  font-size: 13px;
  color: #c0c5b6;
  line-height: 1.6;
  max-width: 340px;
  margin: 16px auto;
}
.brief {
  display: flex;
  justify-content: center;
  gap: 13px;
  font-size: 10px;
  margin: 20px 0;
}
.brief b {
  display: block;
  font: 800 23px "Barlow Condensed";
  color: var(--gold);
  margin-bottom: 4px;
}
.primary {
  background: linear-gradient(#ffdb72, #edb62f);
  color: #24281e;
  border-color: #ffe18e;
  border-bottom: 4px solid #a87625;
  padding: 13px 30px;
  font: 900 23px "Barlow Condensed";
  min-width: 200px;
}
.primary:hover {
  background: #ffe18e;
  color: #24281e;
}
.modal .micro {
  font-size: 10px;
  color: #859486;
  margin-bottom: 0;
}
.lowtime {
  color: #f49269 !important;
}
@media (min-width: 1600px) {
  main {
    grid-template-columns: 235px minmax(0, 1fr) 235px;
    gap: 30px;
    padding: 22px 35px 16px;
  }
  .deck {
    height: 155px;
  }
  .card .label {
    font-size: 21px;
  }
  .profile,
  .guide {
    padding: 28px 22px;
  }
}
@media (max-height: 780px) {
  header {
    height: 64px;
  }
  main {
    height: calc(100dvh - 64px);
    padding-top: 10px;
    gap: 15px;
  }
  .portrait {
    width: 95px;
    height: 95px;
    margin-top: 10px;
    background-size: 670px;
    background-position: -5px -24px;
  }
  .profile,
  .guide {
    padding: 15px;
  }
  .profile h3 {
    font-size: 22px;
  }
  .profile .rule {
    margin: 10px 0;
  }
  .profile .record {
    margin-top: 6px;
  }
  .guide h2 {
    font-size: 30px;
    margin: 12px 0 18px;
  }
  .tip {
    margin-bottom: 10px;
  }
  .dispatch {
    padding-top: 12px;
  }
  .deck {
    height: 112px;
  }
  .card .label {
    font-size: 14px;
  }
  .version {
    margin-top: 10px;
  }
}
@media (max-width: 1100px) {
  main {
    grid-template-columns: 160px minmax(0, 1fr);
    padding: 12px;
    gap: 14px;
  }
  .guide {
    display: none;
  }
  .profile {
    padding: 14px 12px;
  }
  .profile h3 {
    font-size: 21px;
  }
  .portrait {
    width: 110px;
    height: 110px;
    background-size: 770px;
    background-position: -5px -28px;
  }
}
@media (max-width: 700px) {
  header {
    height: 58px;
    padding: 0 12px;
    gap: 10px;
  }
  .brand {
    font-size: 17px;
  }
  .brand small {
    font-size: 12px;
    letter-spacing: 3px;
  }
  .divider {
    height: 30px;
  }
  .title {
    font-size: 24px;
  }
  .title small {
    display: none;
  }
  .clock {
    position: static;
    transform: none;
    padding: 0 9px;
    min-width: 70px;
    margin-left: auto;
    border: 0;
  }
  .clock small {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .clock b {
    font-size: 29px;
  }
  .tools {
    margin-left: 0;
    gap: 4px;
  }
  .tools button {
    width: 29px;
    height: 30px;
    font-size: 18px;
  }
  #fullscreen {
    display: none;
  }
  main {
    height: calc(100dvh - 58px);
    display: flex;
    padding: 5px 6px 8px;
  }
  .profile,
  .guide {
    display: none;
  }
  .arena {
    width: 100%;
  }
  .opponent {
    height: 25px;
  }
  .deck {
    height: 106px;
    gap: 5px;
    padding-top: 10px;
  }
  .card .label {
    font-size: 11px;
    letter-spacing: 0;
  }
  .cost {
    width: 25px;
    height: 25px;
    font-size: 20px;
    top: -6px;
    left: -1px;
  }
  .hotkey {
    display: none;
  }
  .energyrow {
    height: 29px;
    gap: 8px;
    font-size: 11px;
  }
  .bottomhelp {
    font-size: 8px;
  }
  .bottomhelp span:first-child {
    max-width: 65%;
  }
  .bottomhelp span:last-child {
    font-size: 9px;
  }
  .modal {
    padding: 23px;
  }
  .modal h1 {
    font-size: 40px;
  }
  .hint {
    font-size: 9px;
    max-width: 95%;
    white-space: normal;
    text-align: center;
  }
  .canvaswrap {
    min-height: 0;
  }
  .cardart img {
    top: -318%;
  }
}
@media (max-height: 530px) and (min-width: 701px) {
  header {
    height: 48px;
  }
  .title small {
    display: none;
  }
  .title {
    font-size: 25px;
  }
  .clock b {
    font-size: 28px;
  }
  .clock small {
    display: none;
  }
  main {
    height: calc(100dvh - 48px);
    grid-template-columns: 130px minmax(0, 1fr);
    padding: 4px 10px;
  }
  .profile {
    padding: 8px;
  }
  .portrait,
  .profile .rule,
  .profile p,
  .profile h3,
  .profile .eyebrow,
  .profile .record {
    display: none;
  }
  .sidebottom {
    font-size: 10px;
  }
  .deck {
    height: 83px;
    padding-top: 8px;
  }
  .card .label {
    font-size: 12px;
  }
  .cost {
    width: 24px;
    height: 24px;
    font-size: 18px;
  }
  .opponent {
    height: 21px;
  }
  .energyrow {
    height: 25px;
  }
  .bottomhelp {
    display: none;
  }
  .modal {
    padding: 12px;
    max-width: 420px;
  }
  .modal h1 {
    font-size: 30px;
    margin: 8px;
  }
  .modal p {
    margin: 8px auto;
    font-size: 11px;
  }
  .brief {
    display: none;
  }
  .primary {
    padding: 9px 20px;
    font-size: 19px;
  }
}
.cardart {
  background-image: url("assets/concept.png");
  background-size: 715% auto;
  background-position: 15.5% 88%;
}
.cardart img {
  display: none;
}
.card:nth-child(2) .cardart {
  background-position: 33.5% 88%;
}
.card:nth-child(3) .cardart {
  background-position: 50.8% 88%;
}
.card:nth-child(4) .cardart {
  background-position: 68.6% 88%;
}
.card:nth-child(5) .cardart {
  background-position: 86% 88%;
}
.cardart.generated-art {
  background: none;
}
.cardart.generated-art canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: inherit;
  pointer-events: none;
}
.map-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  flex-shrink: 0;
  margin-bottom: 5px;
  height: 55px;
}
.map-option {
  display: flex;
  gap: 9px;
  align-items: center;
  text-align: left;
  padding: 5px 9px;
  background: #242d29;
  border: 1px solid #5d5944;
  min-width: 0;
  color: #ccceb9;
  transition: background 0.15s;
}
.map-option.active {
  border-color: #e6c06b;
  background: #393b2d;
  color: #ffe0a0;
  box-shadow: inset 0 -2px #e9c25c;
}
.map-option:disabled {
  cursor: default;
  opacity: 0.7;
}
.map-option.active:disabled {
  opacity: 1;
}
.map-option strong {
  display: block;
  font: 800 17px "Barlow Condensed";
  white-space: nowrap;
}
.map-option small {
  display: block;
  font: 600 9px "Barlow Condensed";
  letter-spacing: 1px;
  color: #a7aa97;
  margin-top: 2px;
}
.map-thumb {
  width: 37px;
  height: 37px;
  flex-shrink: 0;
  border: 1px solid #827859;
  border-radius: 3px;
  pointer-events: none;
}
.map-option[data-map="noodle"] .map-thumb {
  width: 22px;
  margin: 0 7px;
}
.change-map {
  display: block;
  background: none;
  border: 0;
  margin: 12px auto 0;
  font-size: 12px;
  color: #b9bba6;
  padding: 5px;
}
.change-map[hidden] {
  display: none;
}
a.change-map {
  text-align: center;
  text-decoration: none;
}
body.in-match .brand {
  visibility: hidden;
}
@media (max-width: 700px) {
  .map-picker {
    height: 48px;
    gap: 4px;
  }
  .map-option {
    padding: 4px;
    gap: 5px;
  }
  .map-option strong {
    font-size: 13px;
  }
  .map-option small {
    font-size: 7px;
    letter-spacing: 0.3px;
  }
  .map-thumb {
    width: 27px;
    height: 32px;
  }
  .map-option[data-map="noodle"] .map-thumb {
    width: 16px;
    margin: 0 5px;
  }
  .brief {
    margin: 10px 0;
  }
  .modal p {
    margin: 10px auto;
  }
  .modal h1 {
    font-size: 34px;
  }
}
@media (max-height: 650px) {
  .map-picker {
    height: 42px;
  }
  .map-thumb {
    height: 28px;
    width: 28px;
  }
  .map-option strong {
    font-size: 14px;
  }
  .map-option {
    padding: 3px 6px;
  }
  .map-option small {
    font-size: 8px;
  }
  .modal h1 {
    font-size: 31px;
    margin: 10px 0;
  }
  .modal p {
    font-size: 11px;
    margin: 8px auto;
  }
  .modal {
    padding: 16px;
  }
  .brief {
    display: none !important;
  }
  .primary {
    font-size: 20px;
    padding: 9px 22px;
  }
}
.tools .audio-on {
  color: #ffda77;
  border-color: #a98b47;
  background: #36392b;
}
.tools svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  vertical-align: middle;
}
.audio-settings {
  position: relative;
}
.audio-settings summary {
  display: grid;
  place-items: center;
  width: 31px;
  height: 36px;
  font-size: 24px;
  cursor: pointer;
  border: 1px solid var(--edge);
  border-radius: 5px;
  list-style: none;
}
.audio-settings summary::-webkit-details-marker {
  display: none;
}
.audio-settings[open] summary {
  border-color: var(--gold);
}
.audio-panel {
  position: absolute;
  right: 0;
  top: 43px;
  width: 250px;
  padding: 18px;
  background: #202b27;
  border: 1px solid #a58b53;
  border-radius: 6px;
  z-index: 10;
  box-shadow: 0 12px 30px #0008;
}
.audio-panel strong {
  font: 800 19px "Barlow Condensed";
  color: var(--gold);
}
.audio-panel small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 20px;
}
.audio-panel label {
  display: flex;
  justify-content: space-between;
  font: 700 12px "Barlow Condensed";
  letter-spacing: 1px;
}
.audio-panel output {
  color: var(--gold);
}
.audio-panel input {
  width: 100%;
  margin: 12px 0;
  accent-color: var(--gold);
  touch-action: pan-x;
}
.audio-panel p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .audio-settings summary {
    height: 30px;
    width: 23px;
    font-size: 20px;
  }
  .audio-panel {
    width: 230px;
    right: -70px;
    top: 37px;
  }
  .title {
    font-size: 21px;
  }
  header {
    gap: 7px;
  }
  .tools {
    gap: 3px;
  }
  .tools button {
    width: 27px;
  }
}
