:root {
  --navy: #151e32;
  --blue: #3f69ed;
  --blue-soft: #edf2ff;
  --teal: #13a886;
  --ink: #192538;
  --muted: #64748b;
  --line: #e1e7ef;
  --bg: #f5f7fb;
  --card: #fff;
  font-family: Inter, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  font-size: 16px;
}
.work-progress {
  margin-bottom: 20px;
  padding: 20px 24px;
}
.work-progress dl {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0 0 15px;
}
.work-progress dl > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.work-progress dt, .work-progress dd small, .work-game small { color: var(--muted); font-size: 13px; }
.work-progress dd { margin: 3px 0 0; font-size: clamp(26px,3vw,37px); font-weight: 690; line-height: 1.3; }
.work-progress dd small { font-weight: 450; margin-left: 5px; }
#work-remaining { color: var(--blue); }
.work-progress progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 9px; overflow: hidden; appearance: none; background: #eaf0f6; color: var(--teal); }
.work-progress progress::-webkit-progress-bar { background: #eaf0f6; }
.work-progress progress::-webkit-progress-value { background: var(--teal); border-radius: 9px; }
.work-progress progress::-moz-progress-bar { background: var(--teal); }
.work-list { padding: 0 20px; }
.work-tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 0; }
.work-tabs .scope-switch { margin: 0; }
.work-tabs .search input { width: min(210px, 100%); }
.work-list ul { list-style: none; margin: 0; padding: 0; }
.work-list li, .work-game, .work-actions { display: flex; align-items: center; gap: 12px; }
.work-list li { justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.work-game { min-width: 0; }
.work-game strong { overflow-wrap: anywhere; }
.work-game small { display: block; }
.work-game .game-art { width: 42px; height: 42px; flex: none; }
.work-actions { flex: none; }
.work-actions .work-complete { color: #2856cb; border-color: #c7d5f7; background: #f1f5ff; }
.work-actions .work-complete:hover { background: #e6edfc; }
@media (max-width: 520px) {
  .work-tabs .search, .work-tabs .search input { width: 100%; }
  .work-progress, .work-list { padding-inline: 13px; }
  .work-progress dl > div + div { padding-left: 12px; }
  .work-list li { gap: 7px; flex-wrap: wrap; }
  .work-game { flex: 1 1 115px; gap: 8px; }
  .work-game .game-art { width: 34px; height: 34px; }
  .work-actions { gap: 10px; margin-left: auto; }
  .work-actions .btn { padding-inline: 8px; }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8fb1ff;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.62;
}
button {
  background: none;
  border: 0;
  color: inherit;
}
input,
select {
  color: inherit;
}
button,
input,
select {
  font-size: 0.89rem;
}
button svg,
.ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 710;
  letter-spacing: -1.35px;
  line-height: 1.3;
}
h2 {
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.55px;
}
h3 {
  font-size: 16px;
  letter-spacing: -0.2px;
}
.skip {
  position: fixed;
  z-index: 50;
  left: -250px;
  top: 12px;
  background: #fff;
  padding: 8px;
}
.skip:focus {
  left: 16px;
}
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 216px;
  padding: 32px 16px 16px;
  background: var(--navy);
  color: #bec9dc;
  display: flex;
  flex-direction: column;
  z-index: 12;
}
.brand {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 4px 26px;
  border-bottom: 1px solid #2c364a;
  color: #fff;
}
.brand img {
  width: 32px;
  height: 32px;
}
.brand strong {
  display: block;
  line-height: 1.26;
  font-size: 20px;
  font-weight: 740;
  white-space: nowrap;
}
.mobile-name {
  display: none;
}
.nav-head {
  font-size: 12px;
  color: #93a3be;
  padding: 26px 15px 10px;
  letter-spacing: 1px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 7px;
  width: 100%;
  color: #c2ccdd;
  padding: 11px 14px;
  text-align: left;
  margin: 3px 0;
  font-size: 14px;
  font-weight: 550;
}
.nav-link svg {
  width: 19px;
  height: 19px;
}
.nav-link.active {
  background: #3d65e7;
  color: #fff;
  box-shadow: 0 4px 10px #1017332b;
}
.nav-link:hover:not(.active) {
  color: #fff;
  background: #233047;
}
.side-bottom {
  margin-top: auto;
  padding: 16px 7px 0;
  border-top: 1px solid #2c364a;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 5px 1px;
  text-align: left;
}
.avatar {
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #314266;
  color: #d9e5ff;
}
.avatar svg {
  width: 18px;
  height: 18px;
}
.account-copy {
  min-width: 0;
  flex: 1;
}
.account strong,
.account small {
  display: block;
}
.account strong {
  color: #f3f5fc;
  font-size: 14px;
  font-weight: 580;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.account small {
  font-size: 12px;
  color: #96a4bc;
  margin-top: 2px;
}
.frame {
  margin-left: 216px;
  min-height: 100vh;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  height: 63px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.crumb,
.top-side,
.row,
.actions,
.legend,
.title-line,
.date-entry,
.account-block {
  display: flex;
  align-items: center;
}
.crumb {
  gap: 12px;
  color: #77859a;
  font-size: 14px;
}
.crumb .slash {
  color: #b3bdcc;
}
.crumb strong {
  color: #3e4c62;
  font-weight: 540;
}
.crumb .ico {
  width: 16px;
  height: 16px;
  color: #8696ad;
}
.top-side {
  gap: 15px;
}
.work-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #67758a;
  font-size: 13px;
}
.work-state i,
.state i {
  display: inline-block;
  border-radius: 100%;
  width: 6px;
  height: 6px;
  background: #d59a36;
}
.work-state.live i {
  background: var(--teal);
}
.divider {
  width: 1px;
  height: 17px;
  background: var(--line);
}
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--blue);
  font-weight: 600;
  padding: 4px 0;
}
.link-btn svg {
  width: 15px;
  height: 15px;
}
.menu-btn {
  display: none;
}
main {
  max-width: 1760px;
  margin: 0 auto;
  padding: 28px 32px 38px;
}
.heading,
.panel-heading,
.toolbar,
.tile-foot,
.kpi-top,
.list-head,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.heading {
  margin: 0 0 22px;
}
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.subtitle .ico {
  width: 15px;
  height: 15px;
}
.actions {
  gap: 9px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d8e0eb;
  background: #fff;
  border-radius: 7px;
  min-height: 37px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 560;
  white-space: nowrap;
  box-shadow: 0 1px 2px #13253c05;
}
.btn:hover,
.select:hover {
  border-color: #a6b7d2;
  background: #f8faff;
}
.btn.blue {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 2px 4px #3f69ed21;
}
.btn.blue:hover {
  background: #3159d5;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn.icon {
  padding: 7px 9px;
}
.btn.flat {
  border: 0;
  box-shadow: none;
}
.card,
.stat,
.game-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 4px #27364f03;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}
.stat {
  padding: 18px 19px 15px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.kpi-top {
  justify-content: flex-start;
  gap: 9px;
  color: #526279;
  font-size: 14px;
  font-weight: 560;
}
.iconbox {
  background: #edf2ff;
  color: #4c71ee;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
}
.iconbox.teal {
  color: #119f83;
  background: #e6f7f2;
}
.iconbox.violet {
  color: #8562d2;
  background: #f2edfc;
}
.iconbox.orange {
  color: #ce8c30;
  background: #fcf3e6;
}
.num {
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}
.kpi-value {
  font-size: clamp(26px, 2.25vw, 36px);
  font-weight: 695;
  line-height: 1.35;
  margin: 10px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 3px;
  position: relative;
  z-index: 1;
}
.kpi-value .unit {
  font-size: 0.64em;
  font-weight: 560;
}
.kpi-value .kun {
  font-family: inherit;
  font-size: 14px;
  margin-left: 4px;
  letter-spacing: 0;
  font-weight: 500;
  color: #738198;
}
.kpi-foot {
  font-size: 12px;
  color: #728096;
  position: relative;
  z-index: 1;
}
.kpi-foot b {
  color: #4a5b72;
  font-weight: 560;
}
.panels {
  display: grid;
  grid-template-columns: minmax(0, 1.82fr) minmax(270px, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.panel {
  padding: 19px 20px 14px;
  min-width: 0;
}
.panel-heading {
  margin-bottom: 12px;
  min-height: 29px;
}
.panel-heading h2,
.list-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.panel-heading h2 .ico {
  color: var(--blue);
  width: 20px;
  height: 20px;
}
.panel-extra {
  color: #7a879b;
  font-size: 12px;
  white-space: nowrap;
}
.legend {
  gap: 14px;
  font-size: 12px;
  color: #59687f;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.swatch {
  width: 15px;
  height: 3px;
  border-radius: 3px;
  display: inline-block;
  background: #4774ee;
}
.swatch.teal {
  background: #1da98a;
}
.chart-area {
  height: 213px;
  position: relative;
}
.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-label {
  fill: #7b899b;
  font:
    12px 'Segoe UI',
    'Microsoft YaHei',
    sans-serif;
}
.chart-grid {
  stroke: #e6eaf1;
  stroke-dasharray: 3 4;
  stroke-width: 1;
}
.chart-target {
  touch-action: pan-y;
}
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: #fff;
  border: 1px solid #dce3ed;
  box-shadow: 0 4px 16px #162c5226;
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 12px;
  z-index: 2;
}
.chart-tip b {
  display: block;
}
.rank-list {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.rank-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 0;
}
.rank-no {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font:
    bold 12px/1 'Segoe UI',
    sans-serif;
  color: #8290a2;
  border-radius: 5px;
  background: #f2f4f8;
}
.rank-row.pos1 .rank-no {
  color: #9a6516;
  background: #fff0cb;
}
.rank-row.pos2 .rank-no {
  color: #62748e;
  background: #e9eef7;
}
.rank-row.pos3 .rank-no {
  color: #9d6045;
  background: #faeae1;
}
.rank-mid {
  min-width: 0;
}
.rank-mid b {
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 570;
}
.rank-track {
  height: 4px;
  max-width: 100%;
  background: #eff2f8;
  display: block;
  border-radius: 4px;
  margin-top: 5px;
  overflow: hidden;
}
.rank-track i {
  height: 100%;
  display: block;
  background: #7494fa;
  border-radius: 4px;
}
.pos1 .rank-track i {
  background: #436ff0;
}
.rank-amount {
  font-size: 14px;
  font-weight: 645;
  min-width: 66px;
  text-align: right;
}
.list-head {
  margin-bottom: 13px;
}
.count {
  font:
    600 12px/1.6 'Segoe UI',
    sans-serif;
  color: #65748d;
  background: #e8edf4;
  padding: 0 7px;
  border-radius: 6px;
}
.list-tools {
  gap: 8px;
  display: flex;
  align-items: center;
}
.search {
  position: relative;
  display: block;
}
.search .ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #8693a5;
}
.search input {
  padding-left: 33px;
  width: 160px;
}
.field,
.select,
.search input {
  border: 1px solid #d8e0eb;
  background: #fff;
  border-radius: 7px;
  min-height: 36px;
  padding: 7px 10px;
}
.search input {
  padding-left: 33px;
}
.field:focus,
.select:focus,
.search input:focus {
  outline: 2px solid #b2c7ff;
  border-color: var(--blue);
}
.select {
  appearance: none;
  padding-right: 29px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236b7a8e' stroke-width='1.7'%3E%3Cpath d='m3 5 4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 9px center;
}
.games {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}
.game-card {
  overflow: hidden;
  padding: 11px 10px 9px;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.game-card:hover {
  border-color: #b8c8ec;
  box-shadow: 0 4px 12px #1d3f7310;
  transform: translateY(-1px);
}
.game-head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.game-art {
  width: 43px;
  height: 43px;
  display: block;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
}
.game-head .game-art {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.game-head h3 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
  line-height: 1.7;
  padding: 0 6px;
  border: 1px solid #cff0e4;
  border-radius: 5px;
  color: #168462;
  background: #eef9f4;
}
.state i {
  width: 5px;
  height: 5px;
  background: #1ca37b;
}
.state.pending {
  background: #fff8e9;
  color: #9d6a15;
  border-color: #f2e3c5;
}
.state.pending i {
  background: #c9902b;
}
.state.off {
  background: #f1f3f6;
  border-color: #e4e7ed;
  color: #647184;
}
.state.off i {
  background: #8793a1;
}
.state.error {
  color: #b54549;
  background: #fff2f2;
  border-color: #f5d8db;
}
.state.error i {
  background: #c44f52;
}
.tile-metrics {
  display: grid;
  width: 100%;
  gap: 3px;
  margin: 8px 0;
  line-height: 1.25;
}
.tile-metrics > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 4px;
}
.tile-metrics small {
  font-size: 12px;
  color: var(--muted);
}
.tile-metrics .num {
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}
.tile-metrics > div:first-child strong {
  font-size: 16px;
  color: #345edb;
}
.tile-foot {
  width: 100%;
  flex-wrap: wrap;
  gap: 3px;
  border-top: 1px solid #e9edf3;
  margin-top: auto;
  padding-top: 6px;
  font-size: 12px;
  color: #76859a;
}
.tile-foot .detail {
  color: #4c6ec9;
}
.section-date {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.scope-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: #eff3f9;
  margin-bottom: 16px;
}
.scope-button {
  font-size: 14px;
  border-radius: 5px;
  padding: 6px 12px;
  color: #52647d;
}
.scope-button[aria-pressed="true"] {
  background: white;
  color: #345dd0;
  box-shadow: 0 1px 4px #253e6526;
  font-weight: 600;
}
.event-controls, .event-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 18px;
}
.event-controls label { font-size: 14px; }
.event-controls .field { width: auto; margin-left: 5px; }
.event-controls small, .event-pager span { font-size: 13px; color: var(--muted); }
.event-pager { justify-content: flex-end; margin: 12px 0 0; }
.event-empty { padding: 25px 12px; text-align: center; background: #f6f8fc; color: var(--muted); }
.event-notice { color: #8b6218; font-size: 13px; margin-bottom: 12px; }
.event-table { min-width: 0; width: 100%; }
.event-table th:last-child, .event-table td:last-child { text-align: right; }
.hint {
  color: var(--muted);
  font-size: 13px;
}
.empty {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: 150px;
  padding: 22px;
  gap: 8px;
  text-align: center;
  color: #728095;
  font-size: 14px;
}
.empty svg {
  color: #8c9bb1;
  width: 26px;
  height: 26px;
}
.game-empty {
  grid-column: 1/-1;
}
.management {
  overflow: hidden;
}
.toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #f8fafc;
  font-size: 13px;
  font-weight: 550;
  color: #607087;
}
th,
td {
  padding: 13px 17px;
  border-bottom: 1px solid #e8ecf3;
}
tbody tr:last-child td {
  border: 0;
}
td .game-art {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}
.account-block {
  gap: 9px;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.table-actions button {
  color: #3e62cb;
  padding: 2px;
}
.table-actions [data-do='toggle'] {
  color: #65758a;
}
.table-actions .delete-action {
  color: #b42336;
}
.table-actions .delete-action:hover {
  text-decoration: underline;
}
.btn.danger {
  color: white;
  border-color: #b42336;
  background: #b42336;
}
.btn.danger:hover:enabled {
  background: #961c2c;
}
.btn.danger:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.delete-summary {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.delete-summary small,
.delete-hint {
  color: var(--muted);
  font-size: 14px;
}
.delete-impact {
  margin-top: 14px;
}
.delete-hint {
  margin: 8px 0 18px;
}
@media (max-width: 760px) {
  .game-management-table,
  .game-management-table tbody {
    display: block;
  }
  .game-management-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .game-management-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 8px;
    padding: 14px 16px 6px;
    border-top: 1px solid var(--line);
  }
  .game-management-table tbody tr:first-child {
    border-top: 0;
  }
  .game-management-table td {
    border: 0;
    padding: 0;
    grid-column: 1 / -1;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .game-management-table td:first-child {
    grid-column: 1;
  }
  .game-management-table td:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }
  .game-management-table td:nth-child(2)::before,
  .game-management-table td:nth-child(4)::before {
    color: var(--muted);
    margin-right: 8px;
  }
  .game-management-table td:nth-child(2)::before { content: 'AppID'; }
  .game-management-table td:nth-child(4)::before { content: '最近同步'; }
  .game-management-table .table-actions {
    gap: 16px;
    border-top: 1px solid var(--line);
    margin-top: 5px;
  }
  .game-management-table .table-actions button {
    min-height: 44px;
    min-width: 44px;
  }
}
.chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 370px;
}
.chip {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef2fa;
  color: #556884;
  font-size: 12px;
}
.sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.sync-toggle input {
  width: 30px;
  height: 17px;
  appearance: none;
  border-radius: 14px;
  background: #c7d0dd;
  position: relative;
  cursor: pointer;
  margin: 0;
}
.sync-toggle input:before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  background: white;
  border-radius: 100%;
  transition: transform 0.15s;
}
.sync-toggle input:checked {
  background: #426de9;
}
.sync-toggle input:checked:before {
  transform: translateX(13px);
}
dialog {
  padding: 0;
  border: 1px solid #dce3ee;
  border-radius: 13px;
  color: var(--ink);
  width: min(460px, calc(100% - 28px));
  max-height: 88dvh;
  box-shadow: 0 22px 80px #1322383d;
}
dialog::backdrop {
  background: #101a39aa;
}
dialog.wide {
  width: min(760px, calc(100% - 24px));
}
.dialog-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 19px;
}
.dialog-head button {
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #607088;
  width: 29px;
  height: 29px;
}
.dialog-head button:hover {
  background: #eef2f8;
}
.dialog-body {
  padding: 20px 22px;
}
.dialog-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fbfcfe;
}
.form-row {
  display: block;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 550;
}
.form-row:last-child {
  margin-bottom: 0;
}
.form-row .field {
  width: 100%;
  display: block;
  margin-top: 6px;
  min-width: 0;
}
.form-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.pick-list {
  max-height: 195px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 10px;
  margin-top: 7px;
}
.pick-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-weight: 450;
}
.pick-list label[hidden] { display: none; }
.assignment-search { margin-top: 7px; }
.assignment-search input { width: 100%; }
.pick-list input,
.check input {
  accent-color: var(--blue);
}
.check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}
.presets {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.preset.active {
  background: var(--blue-soft);
  border-color: #a8bdf9;
  color: #365bc5;
}
.date-entry {
  gap: 10px;
}
.date-entry .form-row {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.err {
  color: #ae3a41;
  font-size: 14px;
  margin: 10px 0 0;
}
.desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 15px;
}
.detail-summary {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.detail-summary span {
  display: block;
  font-size: 13px;
  color: #67758b;
}
.detail-summary b {
  font-size: 22px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 108px);
  transform: translateX(-50%);
  padding: 9px 16px;
  background: #1c2b43;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 18px #1d2e5140;
  z-index: 25;
  max-width: 88vw;
  pointer-events: none;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.18s;
}
#toast.show {
  opacity: 1;
}
.mobile-shade {
  display: none;
}
.error-box {
  padding: 15px;
  border: 1px solid #f0cfce;
  background: #fff3f3;
  color: #a84043;
  margin-bottom: 18px;
  border-radius: 8px;
  font-size: 14px;
}
.loading {
  min-height: 70vh;
  display: grid;
  place-items: center;
  color: #708095;
}
.login-page {
  display: grid;
  grid-template-rows: auto 1fr;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at 50% 22%, #e9f0ff, transparent 60%), var(--bg);
}
.login-page .login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: var(--navy);
  color: #fff;
  font-size: 19px;
}
.login-page .login-brand img {
  width: 32px;
  height: 32px;
}
.login-page .login-card {
  place-self: center;
  width: min(26rem, calc(100% - 32px));
  margin: 32px auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 12px 44px #2438560c;
}
.login-page .login-card h1 {
  margin-bottom: 28px;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.04em;
}
.login-page .form-row {
  margin-bottom: 18px;
}
.login-page .field {
  min-height: 44px;
  padding-inline: 12px;
  font-size: 16px;
}
.login-page .err:empty {
  display: none;
}
.login-page .err:not(:empty) {
  margin: 0 0 12px;
}
.login-page .btn {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  font-size: 16px;
}
@media (min-width: 1600px) {
  main {
    padding: 35px 42px;
  }
  .stat {
    padding: 22px 23px;
  }
  .chart-area {
    height: 250px;
  }
  .panel {
    padding: 22px 24px;
  }
  .rank-list {
    gap: 16px;
  }
  .side {
    width: 234px;
  }
  .frame {
    margin-left: 234px;
  }
  .top {
    padding: 0 42px;
  }
}
@media (max-width: 1190px) {
  .side {
    width: 187px;
    padding: 25px 12px 14px;
  }
  .frame {
    margin-left: 187px;
  }
  main {
    padding: 24px 20px;
  }
  .top {
    padding: 0 21px;
  }
  .games {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .panels {
    grid-template-columns: minmax(0, 1.6fr) minmax(245px, 1fr);
  }
  .stat {
    padding: 15px;
  }
  .kpis {
    gap: 11px;
  }
  .panel {
    padding: 16px;
  }
  .heading {
    gap: 9px;
  }
  .legend {
    gap: 8px;
  }
  .actions {
    gap: 7px;
  }
  .rank-list {
    gap: 12px;
  }
}
@media (max-width: 960px) {
  .side {
    width: 168px;
  }
  .frame {
    margin-left: 168px;
  }
  .brand {
    gap: 6px;
    padding-inline: 0;
  }
  .brand img {
    width: 26px;
    height: 26px;
  }
  .brand strong {
    font-size: 18px;
  }
  .actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .sync-toggle {
    display: none;
  }
  .panels {
    grid-template-columns: minmax(0, 1.5fr) minmax(208px, 1fr);
  }
  .panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .stat {
    padding: 12px;
  }
  .kpi-top {
    gap: 6px;
    font-size: 13px;
  }
  .iconbox {
    width: 27px;
    height: 27px;
  }
  .chart-area {
    height: 211px;
  }
  .kpi-value {
    font-size: 25px;
  }
  .panel-extra {
    font-size: 12px;
  }
  .rank-row {
    gap: 6px;
  }
  .games {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .desktop-workspace {
    display: none;
  }
  .mobile-name {
    display: inline;
    font-weight: 650;
    color: var(--ink);
  }
  .side {
    transform: translateX(-100%);
    width: 212px;
    transition: transform 0.2s;
  }
  .side.open {
    transform: translateX(0);
  }
  .mobile-shade.on {
    display: block;
    position: fixed;
    z-index: 11;
    inset: 0;
    background: #0b172765;
  }
  .frame {
    margin: 0;
  }
  .menu-btn {
    display: grid;
    place-items: center;
    padding: 5px;
    color: #3e4e65;
  }
  .top {
    height: 53px;
    padding: 0 14px;
  }
  .top-side {
    gap: 8px;
  }
  .crumb {
    gap: 8px;
    font-size: 13px;
  }
  .crumb > .ico {
    display: none;
  }
  main {
    padding: 18px 14px 26px;
  }
  .heading {
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 12px;
    margin-bottom: 15px;
  }
  .actions {
    justify-content: flex-start;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
  }
  .stat {
    padding: 14px;
  }
  .panels {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 18px;
  }
  .rank-list {
    gap: 9px;
  }
  .rank-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }
  .panel-heading {
    align-items: center;
  }
  .chart-area {
    height: 215px;
  }
  .list-head {
    flex-wrap: wrap;
  }
  .games {
    gap: 8px;
  }
  .list-tools {
    flex-wrap: wrap;
  }
  .search input {
    width: 142px;
  }
  .kpi-value {
    font-size: 29px;
  }
  .kpi-top {
    font-size: 14px;
  }
  .sync-toggle {
    display: inline-flex;
  }
  .game-art {
    width: 38px;
    height: 38px;
  }
  .subtitle {
    font-size: 13px;
  }
  #toast {
    left: 50%;
  }
  .toolbar {
    padding: 12px;
  }
  .nav-head {
    padding-top: 22px;
  }
}
@media (max-width: 520px) {
  .games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .crumb .slash,
  .crumb strong {
    display: none;
  }
  .top-side .divider {
    display: none;
  }
  .actions .sync-toggle {
    font-size: 12px;
  }
  .date-short {
    display: none;
  }
  .btn {
    min-height: 35px;
    padding: 6px 10px;
  }
  .panel-extra {
    font-size: 12px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .date-entry {
    flex-wrap: wrap;
  }
  .date-entry .form-row {
    min-width: 126px;
  }
}
@media (max-width: 350px) {
  .games {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
