:root {
  color-scheme: dark;
  --bg: #11131b;
  --panel: #1a1d29;
  --line: #303443;
  --muted: #a6acbe;
  --lime: #c1f879;
  --purple: #b6a1ff;
  --text: #f4f5fa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px "DM Sans",
    system-ui,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 5px;
}
button {
  cursor: pointer;
}
a {
  color: var(--lime);
}
button {
  border: 1px solid var(--line);
  background: #252937;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 17px;
  font-weight: 600;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #34394b;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary {
  background: var(--lime);
  color: #162210;
  border-color: var(--lime);
}
button.primary:hover {
  background: #d7ffa1;
}
.quiet {
  background: transparent;
}
button.danger {
  color: #ffaeae;
}
input,
select,
textarea {
  background: #11141e;
  border: 1px solid #444a60;
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  width: 100%;
}
input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--lime);
}
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
label input,
label select {
  margin-top: 7px;
}
h1,
h2,
h3,
.brand,
.number {
  font-family: "Space Grotesk", system-ui, sans-serif;
}
h1 {
  font-size: 36px;
  line-height: 1.12;
  margin: 12px 0 18px;
  letter-spacing: -1.2px;
}
h2 {
  font-size: 23px;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
  margin: 0 0 9px;
}
p {
  line-height: 1.6;
  margin: 10px 0;
  color: var(--muted);
}
small {
  color: var(--muted);
  line-height: 1.5;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--lime);
}
.layout {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.7px;
}
.brand img {
  width: 39px;
}
.brand small {
  display: block;
  font:
    10px "DM Sans",
    sans-serif;
  letter-spacing: 3px;
  margin-top: 3px;
}
.sidebar nav {
  display: grid;
  gap: 9px;
  margin-top: 46px;
}
.sidebar nav button {
  display: flex;
  gap: 14px;
  align-items: center;
  text-align: left;
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.sidebar nav button[aria-current="page"] {
  background: #c1f87913;
  color: var(--lime);
  border-color: #c1f87932;
}
.navicon {
  font-size: 20px;
  width: 24px;
}
.playerbox {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #b6a1ff24;
  color: var(--purple);
  width: 44px;
  height: 44px;
  font-size: 21px;
  font-weight: 700;
}
.playerline {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.main {
  max-width: 1430px;
  width: 100%;
  padding: 30px 44px 50px;
}
.topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.badge {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.8px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 7px 11px;
  color: var(--muted);
}
.badge.green {
  color: var(--lime);
  border-color: #c1f87938;
  background: #c1f8790a;
}
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 28px;
}
.pagehead h1 {
  margin-bottom: 8px;
}
.pagehead p {
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 22px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
  padding: 25px;
  min-width: 0;
}
.stat {
  padding: 20px;
}
.number {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 12px 0 5px;
}
.stat small {
  font-size: 11px;
}
.hero {
  position: relative;
  overflow: hidden;
  min-height: 285px;
  background:
    radial-gradient(ellipse at 98% 0, #694b9870, transparent 55%),
    linear-gradient(135deg, #28283e, #1c2030);
}
.hero:after {
  content: "✧";
  position: absolute;
  right: 18px;
  top: 0;
  font-size: 230px;
  line-height: 1;
  color: #b6a1ff12;
  pointer-events: none;
}
.hero h2 {
  font-size: 33px;
  max-width: 450px;
  line-height: 1.1;
  margin: 22px 0 14px;
  position: relative;
  z-index: 1;
}
.hero p {
  max-width: 410px;
}
.hero .primary {
  margin-top: 16px;
}
.hero-meta {
  display: flex;
  gap: 20px;
  color: #d3c9f6;
  font-size: 12px;
}
.sectiontitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0 15px;
}
.sectiontitle h2 {
  margin: 0;
  font-size: 19px;
}
.progress {
  height: 6px;
  background: #333847;
  border-radius: 6px;
  overflow: hidden;
  margin: 13px 0;
}
.progress span {
  display: block;
  background: var(--lime);
  height: 100%;
  border-radius: 6px;
}
.quest {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.quest:last-child {
  border: 0;
  padding-bottom: 0;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.stack {
  display: grid;
  gap: 20px;
}
.muted {
  color: var(--muted);
}
.purple {
  color: var(--purple);
}
.lime {
  color: var(--lime);
}
.schedule {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.day {
  text-align: center;
  padding: 12px 4px;
  border-radius: 10px;
  background: #252937;
  font-size: 11px;
  color: var(--muted);
}
.day strong {
  display: block;
  font-size: 17px;
  color: var(--text);
  margin: 10px 0;
}
.day.done {
  background: #c1f87916;
  color: var(--lime);
}
.day.today {
  border: 1px solid var(--purple);
}
.empty {
  text-align: center;
  padding: 40px 20px;
}
.empty .glyph {
  font-size: 45px;
  color: var(--purple);
  margin-bottom: 15px;
}
.listrow {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.listrow:last-child {
  border: 0;
}
.listrow h3 {
  margin-bottom: 4px;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.welcome {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  max-width: 1300px;
  margin: auto;
  padding: 65px 45px;
  gap: 70px;
  align-items: center;
}
.welcome h1 {
  font-size: 64px;
  letter-spacing: -3px;
  margin: 38px 0 25px;
}
.welcome h1 em {
  font-style: normal;
  color: var(--lime);
}
.welcome .pitch {
  font-size: 18px;
  max-width: 440px;
}
.welcome .card {
  padding: 35px;
}
.benefits {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 34px;
  font-size: 12px;
  color: var(--muted);
}
.settable {
  display: grid;
  grid-template-columns: 35px repeat(3, minmax(58px, 1fr)) 70px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.settable.heading {
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
}
.settable input {
  padding: 10px 6px;
  text-align: center;
}
.settable button {
  padding: 10px 4px;
}
.settable .checked {
  background: #c1f87922;
  color: var(--lime);
  border-color: var(--lime);
}
details {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
summary {
  cursor: pointer;
  color: var(--purple);
}
details p {
  margin-top: 8px;
}
.timer {
  position: sticky;
  top: 12px;
  z-index: 3;
  background: #29283b;
  border: 1px solid var(--purple);
  border-radius: 12px;
  padding: 13px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.historysets {
  font-size: 13px;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 42px;
}
.footer a {
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 600px);
  border: 1px solid var(--lime);
  border-radius: 12px;
  background: #272e22;
  color: var(--text);
  padding: 17px 24px;
  z-index: 20;
  box-shadow: 0 12px 50px #0008;
}
#notice:empty {
  display: none;
}
.error {
  color: #ffb7b7;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.readonlycode {
  font: 12px monospace;
  word-break: break-all;
}
.guidegrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.volumechart {
  display: flex;
  gap: 10px;
  align-items: end;
  height: 140px;
  padding-top: 20px;
}
.bar {
  flex: 1;
  background: #b6a1ff60;
  border-top: 2px solid var(--purple);
  border-radius: 5px 5px 0 0;
  min-height: 4px;
  position: relative;
}
.bar small {
  position: absolute;
  bottom: -23px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
}
.mobilebrand {
  display: none;
}
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: 500px;
  padding: 30px;
}
dialog::backdrop {
  background: #000a;
}
@media (min-width: 1600px) {
  .main {
    padding-left: 60px;
    padding-right: 60px;
  }
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 200px 1fr;
  }
  .main {
    padding: 25px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
  .sidebar {
    padding: 28px 14px;
  }
  .welcome {
    gap: 35px;
  }
  .welcome h1 {
    font-size: 52px;
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    z-index: 10;
    background: #11131bf5;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 16px;
  }
  .brand small {
    font-size: 8px;
  }
  .brand img {
    width: 30px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    margin: 12px 0 0;
    gap: 4px;
  }
  .sidebar nav button {
    padding: 9px 11px;
    font-size: 12px;
    white-space: nowrap;
    gap: 5px;
  }
  .navicon {
    font-size: 16px;
    width: 18px;
  }
  .playerbox {
    display: none;
  }
  .main {
    padding: 18px 16px 35px;
  }
  .topline {
    padding-bottom: 15px;
    font-size: 10px;
  }
  .pagehead {
    margin: 24px 0;
  }
  .pagehead h1 {
    font-size: 29px;
  }
  .pagehead .badge {
    display: none;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
  }
  .card {
    padding: 20px;
  }
  .stat {
    padding: 17px;
  }
  .number {
    font-size: 26px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .welcome {
    grid-template-columns: 1fr;
    padding: 30px 20px;
    gap: 35px;
  }
  .welcome h1 {
    font-size: 48px;
    margin-top: 30px;
  }
  .welcome .card {
    padding: 23px;
  }
  .welcome .pitch {
    font-size: 16px;
  }
  .welcome .benefits {
    margin-top: 20px;
    gap: 16px;
  }
  .formgrid {
    gap: 0 12px;
  }
  .settable {
    grid-template-columns: 25px repeat(3, minmax(45px, 1fr)) 55px;
    gap: 6px;
  }
  .hero-meta {
    gap: 12px;
    font-size: 11px;
  }
  .timer {
    top: 125px;
  }
  .footer {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.login {
  display: block;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  padding: 15px 18px;
  margin: 22px 0;
  min-height: 48px;
  background: #252937;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 700;
}
.login:hover {
  background: #34394b;
}
.login.primary {
  background: var(--lime);
  color: #162210;
  border-color: var(--lime);
}
.login.primary:hover {
  background: #d7ffa1;
}
[hidden] {
  display: none !important;
}

/* Swift build 7 brand colors */
.sidebar { background: linear-gradient(170deg, #302845, #192b39 65%, #171b23); }
h1, .brand strong { background: linear-gradient(100deg, #b696ff, #83c9ff); color: transparent; background-clip: text; }
#plateResult { display: block; margin-block: 1rem; }
