:root {
  --ink: #18362e;
  --muted: #698078;
  --paper: #f5f6ef;
  --line: #dee6db;
  --green: #28634b;
  --lime: #d5ee8c;
  --white: #fff;
  --orange: #ec9a57;
  --shadow: 0 12px 36px #19392d09;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(27px, 3vw, 40px);
  letter-spacing: -1.4px;
  line-height: 1.15;
  margin-bottom: 12px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 238px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #fefefa;
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}
.brand-mark {
  background: var(--green);
  color: var(--lime);
  border-radius: 13px;
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  font-size: 31px;
}
.brand span:last-child {
  color: var(--green);
}
.navlabel {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: #91a096;
  margin: 0 14px 14px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  border-radius: 10px;
  padding: 13px 15px;
  font-weight: 650;
  display: flex;
  gap: 12px;
}
.nav button.active {
  background: #eaf1df;
  color: var(--green);
}
.nav button:hover {
  background: #f0f4e8;
}
.side-card {
  margin-top: auto;
  background: #edf2df;
  border-radius: 15px;
  padding: 19px 16px;
  font-size: 13px;
}
.side-card strong {
  display: block;
  margin: 8px 0;
}
.side-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.profile {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  border-radius: 50%;
  height: 37px;
  width: 37px;
  background: #f5d5b8;
  display: grid;
  place-items: center;
  font-weight: 750;
}
.profile small {
  display: block;
  font-size: 11px;
  text-transform: capitalize;
}
.main {
  min-width: 0;
}
.topbar {
  height: 88px;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar small {
  font-size: 12px;
}
.topbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
}
.pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 30px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.content {
  max-width: 1460px;
  margin: auto;
  padding: 34px 40px 60px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 12px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
}
.heading p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 11px 17px;
  font-weight: 650;
  font-size: 13px;
  text-decoration: none;
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn.lime {
  background: var(--lime);
  border-color: var(--lime);
}
.btn.danger {
  color: #a53b37;
}
.btn.small {
  padding: 7px 11px;
  font-size: 12px;
}
.btn:hover {
  filter: brightness(0.96);
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero {
  background: #173e30;
  color: #fff;
  border-radius: 19px;
  padding: 30px 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 221px;
}
.hero .eyebrow {
  color: #bbd689;
}
.hero h2 {
  font-size: 30px;
  max-width: 430px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.hero p {
  color: #c4d4c6;
  font-size: 13px;
  max-width: 400px;
}
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}
.orbit {
  width: 170px;
  height: 170px;
  border: 1px dashed #bedc8e66;
  border-radius: 50%;
  transform: rotate(-20deg);
  position: relative;
}
.orbit:before,
.orbit:after {
  content: "+";
  position: absolute;
  background: #d4ed8d;
  border-radius: 16px;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  color: #254739;
  font-size: 40px;
  font-weight: 600;
  box-shadow: 0 10px 20px #0002;
  left: -6px;
  top: 17px;
}
.orbit:after {
  content: "÷";
  background: #f1b17a;
  left: 115px;
  top: 91px;
  transform: rotate(30deg);
}
.orbit .math {
  position: absolute;
  left: 58px;
  top: 60px;
  font-size: 43px;
  color: #c8df9a;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 27px;
}
.stat,
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.stat {
  padding: 20px;
}
.stat .symbol {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eff4e5;
  margin-bottom: 16px;
  color: var(--green);
}
.stat strong {
  display: block;
  font-size: 27px;
  letter-spacing: -0.7px;
  margin: 5px 0;
}
.stat small {
  font-size: 11px;
}
.stat label {
  font-size: 12px;
  color: var(--muted);
}
.grid2 {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 22px;
  align-items: start;
}
.card {
  padding: 23px;
  margin-bottom: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.card-head h2 {
  margin: 0;
  font-size: 17px;
}
.room-tile {
  padding: 16px 0;
  border-top: 1px solid #edf0e9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.room-icon {
  background: #eef2e3;
  border-radius: 12px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  font-size: 23px;
  flex-shrink: 0;
}
.room-tile h3 {
  margin-bottom: 5px;
  font-size: 14px;
}
.room-tile p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.status {
  font-size: 10px;
  border-radius: 20px;
  background: #eef4e5;
  padding: 5px 9px;
  text-transform: capitalize;
  display: inline-block;
}
.status.question,
.status.selection {
  background: #f9ecd5;
  color: #966c25;
}
.status.abandoned {
  background: #f7eae5;
  color: #99533f;
}
.bars {
  display: grid;
  gap: 20px;
}
.bar-title {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}
.bar-track {
  height: 8px;
  background: #f0f3eb;
  border-radius: 8px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 8px;
  min-width: 0;
}
.empty {
  padding: 25px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  background: #f8faf5;
  border-radius: 10px;
}
.notice {
  padding: 12px 15px;
  border: 1px solid #dfdfb9;
  background: #fbfae9;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.7;
  margin: 15px 0;
}
.error {
  color: #a13932;
  background: #fff0ed;
  padding: 12px;
  border-radius: 9px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
}
.field input,
.field select,
.field textarea,
input.control,
select.control {
  border: 1px solid #d9e1d5;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.field.full {
  grid-column: 1/-1;
}
.field small {
  font-weight: 400;
}
.checks {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 13px;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  background: #f7f9f2;
}
td,
th {
  padding: 13px 10px;
  border-bottom: 1px solid #edf0e7;
  vertical-align: top;
}
td small {
  display: block;
}
.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-intro {
  background: #173e30;
  padding: 10vw 7vw;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-intro .brand {
  margin-bottom: 70px;
}
.login-intro .brand span:last-child {
  color: #d4ed8d;
}
.login-intro h1 {
  font-size: clamp(42px, 5vw, 72px);
  max-width: 570px;
  letter-spacing: -3px;
}
.login-intro p {
  color: #bdcdbf;
  max-width: 400px;
}
.login-form {
  padding: 50px;
  max-width: 480px;
  width: 100%;
  margin: auto;
}
.login-form h2 {
  font-size: 29px;
  margin-top: 25px;
}
.login-form .field {
  margin: 20px 0;
}
.login-form .btn {
  width: 100%;
}
.login-form .brand {
  margin-bottom: 30px;
}
.login-foot {
  font-size: 11px;
  color: var(--muted);
  margin-top: 30px;
}
.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
}
.board-card {
  padding: 10px;
  overflow: hidden;
}
.board-viewport {
  overflow: auto;
  max-height: 76vh;
  border-radius: 12px;
  background: #f7f9f2;
}
.board-viewport svg {
  display: block;
  width: 100%;
  min-width: 550px;
  min-height: 550px;
}
.token {
  cursor: pointer;
  transition:
    cx 0.45s ease,
    cy 0.45s ease;
}
.token.legal {
  filter: drop-shadow(0 0 4px #9dab3f);
  stroke: #172f27;
  stroke-width: 3;
}
.token:focus {
  outline: none;
  stroke: #000;
  stroke-width: 4;
}
.track {
  fill: #fff;
  stroke: #d8e1d4;
  stroke-width: 1;
}
.safe {
  fill: #ecf2cf;
}
.question {
  font-size: 34px;
  text-align: center;
  letter-spacing: -1px;
  margin: 25px 0;
  font-weight: 750;
}
.answer-input {
  font-size: 26px !important;
  text-align: center;
}
.timer {
  font-size: 12px;
  background: #f5ead7;
  border-radius: 20px;
  padding: 8px 14px;
}
.player-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  padding: 10px 8px;
  border-radius: 8px;
}
.player-line.current {
  background: #eff4df;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.online {
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
}
.win {
  background: #eaf1cf;
  border: 1px solid #c9d9a3;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}
.trend {
  width: 100%;
  height: 160px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
#toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 1000;
  background: #173e30;
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 12px 32px #0002;
  max-width: 400px;
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 28px;
  max-width: 720px;
  width: calc(100% - 30px);
  max-height: 90vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #10271f88;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
.badge {
  display: inline-block;
  padding: 12px 16px;
  background: #f4f6e7;
  border-radius: 12px;
  margin: 5px;
  font-size: 12px;
}
.help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.operation-icon {
  font-size: 20px;
  color: var(--green);
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.reduced * {
  transition: none !important;
  animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
    padding: 25px 15px;
  }
  .shell {
    grid-template-columns: 200px 1fr;
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .game-grid {
    grid-template-columns: 1fr;
  }
  .game-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .filters {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0;
    font-size: 21px;
  }
  .brand-mark {
    width: 33px;
    height: 33px;
    font-size: 25px;
  }
  .sidebar .navlabel,
  .side-card,
  .sidebar .profile {
    display: none;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    margin-top: 17px;
    gap: 3px;
  }
  .nav button {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 12px;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .content {
    padding: 24px 17px;
  }
  .heading {
    align-items: start;
  }
  .heading .row {
    justify-content: flex-end;
  }
  .heading .btn {
    padding: 9px 12px;
    font-size: 11px;
  }
  .hero {
    padding: 24px;
    grid-template-columns: 1fr 0.45fr;
    min-height: 200px;
  }
  .hero h2 {
    font-size: 25px;
  }
  .hero-art {
    transform: scale(0.7);
    transform-origin: left center;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-intro {
    padding: 35px;
    min-height: 310px;
  }
  .login-intro .brand {
    margin-bottom: 30px;
  }
  .login-intro h1 {
    font-size: 40px;
    letter-spacing: -1.5px;
  }
  .login-form {
    padding: 30px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .game-panel {
    display: block;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
  .board-viewport {
    max-height: 65vh;
  }
  .board-viewport svg {
    min-width: 620px;
  }
  .topbar-right .pill {
    display: none;
  }
}
@media print {
  .sidebar,
  .topbar,
  .heading .row,
  .filters,
  .btn {
    display: none !important;
  }
  .shell,
  .grid2 {
    display: block;
  }
  .content {
    padding: 0;
  }
  .card,
  .stat {
    box-shadow: none;
    break-inside: avoid;
  }
  .table-wrap {
    overflow: visible;
  }
  body {
    background: white;
  }
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
