:root {
  color-scheme: dark;
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #ebf2ef;
  background: #0b171f;
  --accent: #8df0cf;
  --muted: #93a8b1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 8% 28%, #193a3f66, transparent 45%), #0b171f;
}
a {
  color: inherit;
  text-decoration: none;
}
header {
  max-width: 1320px;
  margin: auto;
  padding: 29px 36px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff16;
  font-weight: 850;
  letter-spacing: 2px;
}
header span {
  font-size: 11px;
  color: var(--muted);
  margin-left: 16px;
}
.back {
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 500;
}
main {
  max-width: 1250px;
  margin: auto;
  padding: 40px 36px 70px;
}
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 0 70px;
  margin-bottom: 36px;
}
.eyebrow {
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
}
.intro .eyebrow {
  grid-column: 1/-1;
}
h1 {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 10px 0;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}
.intro > p:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 480px;
}
.layout {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 30px;
  align-items: start;
}
.card {
  position: sticky;
  top: 20px;
  padding: 28px;
  background: linear-gradient(150deg, #20434a, #122832 70%);
  border: 1px solid #73e8ca35;
  border-radius: 20px;
  box-shadow: 0 16px 50px #0003;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 2px;
  font-size: 10px;
  color: #b5d3d4;
}
.pill {
  background: #8df0cf1c;
  color: var(--accent);
  padding: 7px 9px;
  border-radius: 20px;
  letter-spacing: 1px;
}
.name-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 28px;
}
#player-name {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #ffffff28;
  color: #fff;
  font: 700 27px inherit;
  font-size: 26px;
  font-weight: 700;
  width: 100%;
  padding: 9px 0;
  outline-offset: 4px;
}
.identity {
  margin: 15px 0 25px;
  display: grid;
  gap: 7px;
}
.identity strong {
  font-size: 14px;
}
.identity span {
  font-size: 11px;
  color: var(--muted);
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #ffffff14;
  border: 1px solid #ffffff14;
  border-radius: 12px;
  overflow: hidden;
}
.metric {
  padding: 17px 12px;
  background: #14303a;
  min-height: 94px;
}
.metric span {
  display: block;
  color: #b2c7ca;
  font-size: 11px;
}
.metric strong {
  font-size: 27px;
  letter-spacing: -1px;
  display: inline-block;
  margin-top: 8px;
}
.metric small {
  font-size: 11px;
  color: var(--accent);
  margin-left: 5px;
}
.footnote {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  margin: 20px 0;
}
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid #ffffff26;
  background: #ffffff06;
  color: #e5efed;
  padding: 11px 14px;
  border-radius: 8px;
}
button:hover {
  border-color: var(--accent);
}
.primary {
  background: var(--accent);
  color: #09271f;
  font-weight: 750;
  border: none;
  width: 100%;
  padding: 14px;
}
#save-status {
  font-size: 12px;
  min-height: 30px;
  color: var(--accent);
}
.play {
  display: block;
  font-size: 13px;
  text-align: center;
}
.editor {
  padding: 26px;
  border: 1px solid #ffffff14;
  border-radius: 18px;
  background: #10212bd9;
}
.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
h2 {
  font-size: 22px;
  margin: 6px 0 14px;
}
.editor-head button {
  font-size: 11px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 25px 0 30px;
}
legend {
  width: 100%;
  padding: 0 0 13px;
  border-bottom: 1px solid #ffffff16;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 750;
}
.field {
  margin: 19px 0 22px;
}
.field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.field label {
  font-size: 14px;
  font-weight: 600;
}
.value {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}
.value input {
  width: 65px;
  background: #07161f;
  border: 1px solid #ffffff24;
  border-radius: 6px;
  padding: 7px;
  color: #fff;
  font: 600 14px inherit;
  text-align: center;
}
input[type='range'] {
  width: 100%;
  height: 22px;
  margin: 9px 0 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.field p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.notice {
  padding: 17px;
  background: #8df0cf09;
  border-left: 2px solid #8df0cf65;
  font-size: 12px;
  color: #b4cacd;
  line-height: 1.7;
}
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #8df0cf;
  outline-offset: 4px;
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .card {
    position: static;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 0;
  }
  main {
    padding: 22px 18px;
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  header {
    padding: 20px 18px;
  }
  header span {
    display: none;
  }
  .editor {
    padding: 20px;
  }
}
@media (max-width: 430px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .editor-head {
    align-items: start;
  }
  .editor-head button {
    max-width: 115px;
  }
  .card {
    padding: 22px;
  }
}

/* Keep the personal card usable on short desktop windows. */
@media (min-width: 851px) {
  .card {
    max-height: calc(100dvh - 40px);
    overflow: auto;
    scrollbar-width: thin;
  }
  .intro {
    margin-bottom: 24px;
  }
  main {
    padding-top: 28px;
  }
  .metric {
    min-height: 78px;
    padding: 12px;
  }
  .metric strong {
    font-size: 25px;
  }
  .name-label {
    margin-top: 18px;
  }
  .identity {
    margin: 12px 0 18px;
  }
  .footnote {
    margin: 14px 0;
    font-size: 10px;
  }
}
