* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #1f2933;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

.shell {
  width: min(1440px, calc(100vw - 24px));
  margin: 12px auto 24px;
}

.topbar,
.tabs,
.filters,
.toolbar,
.panel,
.insight,
.metric {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .05);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

p,
small {
  color: #64748b;
}

.guild-switch,
.tabs,
.toolbar,
.link-row,
.view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button,
.link-row a {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  min-height: 36px;
  padding: 8px 12px;
}

button {
  background: #2563eb;
  color: #fff;
}

button:hover {
  background: #1d4ed8;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.guild-btn {
  background: #eef2ff;
  color: #1d4ed8;
  font-weight: 700;
}

.guild-btn.active,
.tab.active {
  background: #2563eb;
  color: #fff;
}

.tabs,
.toolbar,
.filters {
  margin-bottom: 12px;
  padding: 8px;
}

.tab {
  background: transparent;
  color: #334155;
}

.subtab {
  background: #eef2ff;
  color: #1d4ed8;
}

.subtab.active {
  background: #2563eb;
  color: #fff;
}

.filters {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  padding: 12px;
}

label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

label span {
  color: #64748b;
  font-size: 12px;
}

select,
input {
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  font-size: 14px;
  min-height: 36px;
  min-width: 0;
  padding: 8px 10px;
}

.filter-stat {
  align-self: end;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 6px;
  min-height: 36px;
  padding: 6px 10px;
}

.filter-stat span {
  color: #0f766e;
  display: block;
  font-size: 12px;
}

.filter-stat strong {
  color: #115e59;
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.dashboard {
  display: grid;
  gap: 12px;
}

.home-view {
  display: grid;
  gap: 14px;
}

.home-hero,
.home-section,
.home-footer {
  background: #0f172a;
  border: 1px solid rgba(212, 175, 55, .32);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .18);
  color: #e5e7eb;
}

.home-hero {
  align-items: end;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .9)),
    url("https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  min-height: 330px;
  padding: 28px;
}

.home-kicker {
  color: #facc15;
  font-weight: 700;
  margin-bottom: 10px;
}

.home-hero h2 {
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  max-width: 880px;
}

.home-hero p:not(.home-kicker) {
  color: #cbd5e1;
  font-size: 16px;
  margin-top: 14px;
}

.home-nav,
.rule-links,
.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-nav {
  align-content: end;
  justify-content: flex-end;
}

.home-nav a,
.rule-links a,
.home-actions a {
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.home-nav a {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(250, 204, 21, .35);
  color: #f8fafc;
  padding: 8px 11px;
}

.home-nav a:hover,
.rule-links a:hover,
.home-actions a:hover {
  background: #facc15;
  color: #111827;
}

.home-section {
  padding: 20px;
  scroll-margin-top: 16px;
}

.home-section h2 {
  border-bottom: 1px solid rgba(250, 204, 21, .25);
  color: #facc15;
  font-size: 22px;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.home-text {
  background: rgba(2, 6, 23, .38);
  border-left: 4px solid #facc15;
  border-radius: 6px;
  color: #dbe4ee;
  line-height: 1.85;
  padding: 16px;
  white-space: pre-wrap;
}

.home-rule {
  background: rgba(2, 6, 23, .38);
  border: 1px solid rgba(250, 204, 21, .2);
  border-radius: 6px;
  color: #dbe4ee;
  line-height: 1.85;
  max-height: 680px;
  overflow: auto;
  padding: 16px;
}

.home-rule h3 {
  color: #facc15;
  font-size: 17px;
  margin: 16px 0 8px;
  scroll-margin-top: 20px;
}

.home-rule p {
  color: #dbe4ee;
  margin: 0 0 8px;
}

.home-rule a,
.home-link-card a {
  color: #fde68a;
}

.rule-links {
  margin-bottom: 14px;
}

.rule-links a {
  background: rgba(250, 204, 21, .08);
  border: 1px solid rgba(250, 204, 21, .42);
  color: #facc15;
  font-size: 13px;
  padding: 7px 10px;
}

.home-section .table-wrap {
  border-radius: 6px;
}

.home-section table {
  background: rgba(2, 6, 23, .36);
}

.home-section th {
  background: rgba(250, 204, 21, .14);
  color: #fde68a;
}

.home-section td,
.home-section th {
  border-color: rgba(250, 204, 21, .24);
}

.home-link-card {
  background: rgba(250, 204, 21, .08);
  border-left: 4px solid #facc15;
  border-radius: 6px;
  color: #fde68a;
  line-height: 1.7;
  padding: 14px;
  word-break: break-all;
}

.home-actions {
  margin-top: 14px;
}

.home-actions a {
  background: #facc15;
  color: #111827;
  flex: 1;
  min-width: 180px;
  padding: 12px;
  text-align: center;
}

.home-footer {
  color: #cbd5e1;
  padding: 22px;
  text-align: center;
}

.home-footer p {
  color: #cbd5e1;
  margin: 4px 0;
}

.home-contact {
  color: #facc15 !important;
  font-weight: 700;
}

.link-row {
  margin-top: 12px;
}

.link-row a {
  background: #fef3c7;
  color: #92400e;
  text-decoration: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 12px;
}

.metric {
  padding: 14px;
}

.metric span {
  color: #64748b;
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.metric strong {
  align-items: baseline;
  display: flex;
  gap: 5px;
  font-size: 24px;
}

.metric small {
  font-size: 13px;
  font-weight: 500;
}

.insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.insight,
.panel {
  padding: 14px;
}

.insight.wide {
  grid-column: 1 / -1;
}

.section-title,
.panel-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head .section-title {
  margin-bottom: 0;
}

.section-head select {
  flex: 0 0 150px;
}

.panel-title {
  text-align: center;
}

.panel-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-head .panel-title {
  margin-bottom: 0;
  text-align: left;
}

.bar-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bar-row {
  border: 1px solid #eef2f7;
  border-radius: 7px;
  padding: 10px;
}

.bar-head,
.rank-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bar-head strong,
.rank-row b {
  color: #0f766e;
  white-space: nowrap;
}

.bar-track {
  background: #e5e7eb;
  border-radius: 999px;
  height: 8px;
  margin: 9px 0 7px;
  overflow: hidden;
}

.bar-fill {
  background: #2563eb;
  border-radius: inherit;
  height: 100%;
}

.bar-meta {
  color: #64748b;
  font-size: 12px;
}

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-row {
  border-bottom: 1px solid #eef2f7;
  padding: 7px 0 9px;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
  width: 100%;
}

.rank-index {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 13px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
}

.table-wrap {
  overflow: auto;
}

table,
.mini-table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid #e7e5e4;
  font-size: 14px;
  padding: 9px;
  text-align: center;
  white-space: nowrap;
}

th {
  background: #fafafa;
  cursor: pointer;
  user-select: none;
}

.mini-table th {
  cursor: default;
}

th:hover {
  background: #eef6ff;
}

tr.equip-row {
  background: #eef6ff;
}

tr.punish-row {
  background: #fff1f2;
}

.empty {
  color: #94a3b8;
  font-size: 14px;
  padding: 14px 0;
  text-align: center;
}

body {
  background:
    radial-gradient(circle at 16% 0%, rgba(210, 160, 70, .34), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(43, 82, 126, .30), transparent 26%),
    linear-gradient(145deg, #352312 0%, #6d4a24 42%, #2e2117 100%);
  color: #2b2116;
  min-height: 100vh;
}

.shell {
  margin: 16px auto 28px;
}

.topbar,
.tabs,
.filters,
.toolbar,
.panel,
.insight,
.metric {
  background:
    linear-gradient(180deg, rgba(255, 246, 212, .96), rgba(222, 190, 128, .94));
  border: 1px solid #8a5f2d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 246, 196, .55),
    0 12px 28px rgba(35, 20, 8, .28);
}

.topbar {
  background:
    linear-gradient(180deg, rgba(58, 38, 21, .96), rgba(104, 69, 31, .94));
  border-bottom-color: #c79b45;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
  padding: 18px 20px;
}

.topbar h1 {
  color: #ffd978;
  font-size: 24px;
  letter-spacing: 0;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .55);
}

.topbar p,
.topbar small {
  color: #f3ddb0;
}

p,
small {
  color: #5f4930;
}

.tabs {
  background: linear-gradient(180deg, rgba(75, 50, 25, .96), rgba(42, 30, 20, .94));
  border-radius: 0 0 8px 8px;
  border-top: 0;
  margin-bottom: 12px;
  padding: 10px;
}

.toolbar,
.filters {
  background:
    linear-gradient(180deg, rgba(244, 225, 174, .96), rgba(214, 178, 112, .94));
}

button,
.link-row a {
  background: linear-gradient(180deg, #f4cf73, #a56d23);
  border: 1px solid #6f4518;
  box-shadow: inset 0 1px 0 rgba(255, 248, 210, .55);
  color: #241408;
  font-weight: 700;
}

button:hover,
.tab:hover,
.guild-btn:hover,
.subtab:hover {
  background: linear-gradient(180deg, #ffe08a, #bd7c2b);
  color: #120a04;
}

.guild-btn,
.tab,
.subtab {
  background: linear-gradient(180deg, #46311f, #21170f);
  color: #ffd978;
  font-weight: 700;
}

.guild-btn.active,
.tab.active,
.subtab.active {
  background: linear-gradient(180deg, #ffd978, #b87826);
  border-color: #ffe7a3;
  color: #1d1208;
}

label span,
.metric span,
.bar-meta {
  color: #6a5032;
}

select,
input {
  background: #fff4cf;
  border: 1px solid #9b6b34;
  color: #2b2116;
}

select:focus,
input:focus {
  border-color: #2f5d8c;
  outline: 2px solid rgba(47, 93, 140, .20);
}

input::placeholder {
  color: #9b7d55;
}

.filter-stat {
  background: #f7e2a9;
  border-color: #b88738;
}

.filter-stat span {
  color: #6a461d;
}

.filter-stat strong,
.metric strong,
.section-title,
.panel-title {
  color: #38220f;
}

.metric strong small {
  color: #7b4c1d;
}

.home-hero,
.home-section,
.home-footer {
  background:
    linear-gradient(180deg, rgba(255, 244, 207, .96), rgba(221, 188, 123, .94));
  border-color: #8a5f2d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 214, .55),
    0 12px 28px rgba(35, 20, 8, .28);
  color: #2b2116;
}

.home-hero {
  background:
    linear-gradient(120deg, rgba(46, 29, 14, .86), rgba(129, 86, 38, .50)),
    url("https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.home-kicker,
.home-section h2,
.home-rule h3,
.home-contact {
  color: #6b3f15 !important;
}

.home-hero h2 {
  color: #fff1b8;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .55);
}

.home-hero p:not(.home-kicker) {
  color: #ffe9aa;
}

.home-nav a,
.rule-links a {
  background: rgba(50, 32, 16, .82);
  border-color: #c89b42;
  color: #ffd978;
}

.home-text,
.home-rule {
  background: rgba(255, 246, 216, .66);
  border-color: #b88738;
  color: #2b2116;
}

.home-rule p,
.home-footer p {
  color: #3f2d1b;
}

.home-rule a,
.home-link-card a {
  color: #1f5d91;
}

.home-actions a {
  flex: 0 1 220px;
}

.dashboard {
  gap: 12px;
}

.metric {
  min-height: 104px;
}

.metric strong {
  font-size: 26px;
}

.insight,
.panel {
  color: #2b2116;
}

.bar-row {
  background: rgba(255, 246, 216, .62);
  border-color: rgba(138, 95, 45, .42);
}

.bar-head strong,
.rank-row b {
  color: #1f5d91;
}

.bar-track {
  background: rgba(95, 67, 32, .20);
}

.bar-fill {
  background: linear-gradient(90deg, #b87826, #2f5d8c);
}

.rank-row {
  border-bottom-color: rgba(138, 95, 45, .28);
}

.rank-index {
  background: linear-gradient(180deg, #f2d17e, #a66a23);
  color: #221409;
}

.rank-row strong,
.bar-head span {
  color: #2b2116;
}

.rank-row small {
  color: #6a5032;
}

.table-wrap {
  border: 1px solid rgba(138, 95, 45, .50);
  border-radius: 7px;
}

table,
.mini-table {
  background: rgba(255, 246, 216, .72);
}

th,
td {
  border-color: rgba(138, 95, 45, .34);
  color: #2b2116;
}

th {
  background: linear-gradient(180deg, #76512b, #3b2819);
  color: #ffd978;
}

th:hover {
  background: linear-gradient(180deg, #8a602f, #4a321d);
}

tr.equip-row {
  background: rgba(64, 122, 170, .16);
}

tr.punish-row {
  background: rgba(150, 54, 32, .14);
}

tfoot td {
  background: rgba(184, 120, 38, .18);
  color: #5c3512;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .insights,
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-nav {
    justify-content: flex-start;
  }

  .filters,
  .metrics,
  .bar-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filters,
  .metrics,
  .bar-list {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head select {
    flex-basis: auto;
    width: 100%;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .home-hero,
  .home-section {
    padding: 16px;
  }

  .home-actions {
    flex-direction: column;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.shell {
  max-width: 1440px;
  padding: 0 12px;
  width: 100%;
}

.topbar > div,
.panel,
.insight,
.metric,
.home-section,
.home-hero,
.home-footer {
  min-width: 0;
}

.topbar h1,
.topbar p,
.home-hero h2,
.home-hero p,
.home-text,
.home-rule,
.home-link-card,
.rank-row strong,
.rank-row small,
.bar-meta {
  overflow-wrap: anywhere;
}

.home-hero h2 {
  font-size: 44px;
}

.table-wrap {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

table,
.mini-table {
  min-width: 720px;
}

.home-section table {
  min-width: 640px;
}

.tabs,
.guild-switch,
.toolbar,
.home-nav,
.home-actions,
.view-switch {
  min-width: 0;
}

.tab,
.guild-btn,
.toolbar button,
.home-nav a,
.home-actions a,
.subtab {
  min-width: 0;
  text-align: center;
}

@media (max-width: 900px) {
  .shell {
    padding: 0 10px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .guild-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero h2 {
    font-size: 34px;
  }
}

@media (max-width: 560px) {
  .shell {
    margin: 8px auto 16px;
    padding: 0 8px;
  }

  .topbar {
    padding: 14px;
  }

  .topbar h1 {
    font-size: 20px;
    line-height: 1.25;
  }

  .topbar p {
    font-size: 13px;
    line-height: 1.45;
    margin-top: 6px;
  }

  .tabs {
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  .tab:last-child {
    grid-column: 1 / -1;
  }

  button,
  .link-row a {
    font-size: 13px;
    min-height: 38px;
    padding: 8px 9px;
  }

  .guild-switch {
    gap: 6px;
  }

  .filters {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero {
    gap: 14px;
    min-height: 240px;
    padding: 18px 14px;
  }

  .home-kicker {
    font-size: 13px;
  }

  .home-hero h2 {
    font-size: 28px;
    line-height: 1.18;
  }

  .home-hero p:not(.home-kicker) {
    font-size: 14px;
    line-height: 1.55;
  }

  .home-nav,
  .rule-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-nav a,
  .rule-links a,
  .home-actions a {
    padding: 9px 8px;
  }

  .home-section,
  .home-footer {
    padding: 14px;
  }

  .home-section h2 {
    font-size: 19px;
  }

  .home-text,
  .home-rule {
    font-size: 14px;
    line-height: 1.7;
    padding: 12px;
  }

  .home-rule {
    max-height: 560px;
  }

  .metrics,
  .bar-list,
  .insights {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: auto;
    padding: 12px;
  }

  .metric strong {
    font-size: 22px;
  }

  .insight,
  .panel {
    padding: 12px;
  }

  .panel-head,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-row {
    align-items: flex-start;
    padding: 9px 0;
  }

  .rank-row b {
    font-size: 14px;
  }

  th,
  td {
    font-size: 13px;
    padding: 8px;
  }

  table,
  .mini-table,
  .home-section table {
    min-width: 620px;
  }
}

@media (max-width: 380px) {
  .tabs,
  .guild-switch,
  .toolbar,
  .home-nav,
  .rule-links,
  .view-switch {
    grid-template-columns: 1fr;
  }

  .tab:last-child {
    grid-column: auto;
  }

  .home-hero h2 {
    font-size: 24px;
  }
}

@media (max-width: 720px) {
  .shell,
  .home-view,
  .dashboard,
  .panel,
  .home-section,
  .home-footer {
    max-width: 100%;
    overflow: hidden;
  }

  .tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding: 7px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab,
  .tab:last-child {
    flex: 0 0 auto;
    font-size: 12px;
    grid-column: auto;
    min-height: 34px;
    min-width: 66px;
    padding: 7px 8px;
    white-space: nowrap;
  }

  .tab[data-view="loot"] {
    min-width: 92px;
  }

  .guild-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guild-btn {
    font-size: 12px;
    min-height: 34px;
    padding: 7px 8px;
  }

  .home-section,
  .home-footer {
    width: 100%;
  }

  .home-text,
  .home-rule,
  .home-link-card {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .home-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-nav a {
    font-size: 12px;
    min-width: 0;
    padding: 8px 6px;
  }

  .rule-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rule-links a {
    font-size: 12px;
    min-width: 0;
    padding: 7px 5px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric {
    padding: 10px;
  }

  .metric span {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .metric strong {
    font-size: 20px;
  }

  .insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .insight.wide {
    grid-column: 1 / -1;
  }

  .bar-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .bar-row {
    padding: 8px;
  }

  .bar-head {
    gap: 6px;
  }

  .bar-head span,
  .bar-head strong,
  .bar-meta,
  .rank-row small {
    font-size: 11px;
  }

  .section-title,
  .panel-title {
    font-size: 15px;
  }

  .section-head {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .section-head select {
    flex: 0 1 112px;
    font-size: 12px;
    min-height: 32px;
    padding: 6px 8px;
  }

  .rank-list {
    gap: 5px;
  }

  .rank-row {
    gap: 6px;
    padding: 6px 0;
  }

  .rank-index {
    flex-basis: 22px;
    font-size: 11px;
    height: 22px;
  }

  .rank-row strong,
  .rank-row b {
    font-size: 12px;
  }

  .panel,
  .insight {
    padding: 10px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-wrap {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    width: 100%;
  }

  table,
  .mini-table,
  .home-section table {
    min-width: 520px;
    width: max-content;
  }

  th,
  td {
    font-size: 11px;
    padding: 6px;
  }
}

@media (max-width: 430px) {
  .shell {
    padding: 0 6px;
  }

  .topbar {
    padding: 12px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .home-hero {
    padding: 16px 12px;
  }

  .home-hero h2 {
    font-size: 24px;
  }

  .home-nav,
  .rule-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-section {
    padding: 12px;
  }

  .home-section h2 {
    font-size: 17px;
  }

  .home-text,
  .home-rule {
    font-size: 13px;
    padding: 10px;
  }

  .metrics,
  .insights,
  .bar-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insight.wide {
    grid-column: 1 / -1;
  }

  .metric strong {
    font-size: 18px;
  }

  .rank-row {
    align-items: center;
  }

  .rank-row div {
    gap: 1px;
  }

  .rank-row strong,
  .rank-row b {
    font-size: 11px;
  }

  .rank-row small {
    font-size: 10px;
  }

  table,
  .mini-table,
  .home-section table {
    min-width: 480px;
  }

  th,
  td {
    font-size: 10px;
    padding: 5px;
  }
}

#tablePanel .table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
}

#dataTable {
  table-layout: fixed;
  width: max-content;
}

#dataTable th,
#dataTable td {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dataTable .col-player-name,
#dataTable .col-name,
#dataTable .col-player {
  width: 96px;
}

#dataTable .col-player-class,
#dataTable .col-type {
  width: 70px;
}

#dataTable .col-current-dkp,
#dataTable .col-lifetime-dkp,
#dataTable .col-boss-dkp,
#dataTable .col-sub-dkp,
#dataTable .col-bad-luck,
#dataTable .col-boss-score {
  width: 82px;
}

#dataTable .col-sub-rate,
#dataTable .col-player-count,
#dataTable .col-dkp {
  width: 76px;
}

#dataTable .col-sync-time,
#dataTable .col-kill-time,
#dataTable .col-time {
  width: 138px;
}

#dataTable .col-boss-name {
  width: 132px;
}

#dataTable .col-item {
  width: 220px;
}

@media (max-width: 720px) {
  #tablePanel {
    overflow: hidden;
  }

  #tablePanel .table-wrap {
    border-radius: 6px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #dataTable {
    min-width: 0;
    width: max-content;
  }

  #dataTable th,
  #dataTable td {
    font-size: 10px;
    line-height: 1.25;
    max-width: 150px;
    padding: 5px 6px;
  }

  #dataTable .col-player-name,
  #dataTable .col-name,
  #dataTable .col-player {
    width: 74px;
  }

  #dataTable .col-player-class,
  #dataTable .col-type {
    width: 52px;
  }

  #dataTable .col-current-dkp,
  #dataTable .col-lifetime-dkp,
  #dataTable .col-boss-dkp,
  #dataTable .col-sub-dkp,
  #dataTable .col-bad-luck,
  #dataTable .col-boss-score {
    width: 62px;
  }

  #dataTable .col-sub-rate,
  #dataTable .col-player-count,
  #dataTable .col-dkp {
    width: 58px;
  }

  #dataTable .col-sync-time,
  #dataTable .col-kill-time,
  #dataTable .col-time {
    width: 108px;
  }

  #dataTable .col-boss-name {
    width: 104px;
  }

  #dataTable .col-item {
    width: 150px;
  }
}

@media (max-width: 430px) {
  #dataTable th,
  #dataTable td {
    font-size: 9px;
    padding: 4px 5px;
  }

  #dataTable .col-player-name,
  #dataTable .col-name,
  #dataTable .col-player {
    width: 66px;
  }

  #dataTable .col-player-class,
  #dataTable .col-type {
    width: 46px;
  }

  #dataTable .col-current-dkp,
  #dataTable .col-lifetime-dkp,
  #dataTable .col-boss-dkp,
  #dataTable .col-sub-dkp,
  #dataTable .col-bad-luck,
  #dataTable .col-boss-score {
    width: 56px;
  }

  #dataTable .col-sub-rate,
  #dataTable .col-player-count,
  #dataTable .col-dkp {
    width: 52px;
  }

  #dataTable .col-sync-time,
  #dataTable .col-kill-time,
  #dataTable .col-time {
    width: 96px;
  }

  #dataTable .col-boss-name {
    width: 94px;
  }

  #dataTable .col-item {
    width: 132px;
  }
}

#tablePanel .table-wrap {
  overflow-x: hidden;
}

#dataTable.data-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

#dataTable.data-table th,
#dataTable.data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dataTable.table-dkp .col-player-name { width: 23%; }
#dataTable.table-dkp .col-player-class { width: 13%; }
#dataTable.table-dkp .col-current-dkp { width: 18%; }
#dataTable.table-dkp .col-lifetime-dkp { width: 18%; }
#dataTable.table-dkp .col-sync-time { width: 28%; }

#dataTable.table-dkp-detail .col-date-str { width: 24%; }
#dataTable.table-dkp-detail .col-player-name { width: 18%; }
#dataTable.table-dkp-detail .col-reason { width: 44%; }
#dataTable.table-dkp-detail .col-points { width: 14%; }

#dataTable.table-tb-summary .col-name { width: 23%; }
#dataTable.table-tb-summary .col-boss-dkp { width: 18%; }
#dataTable.table-tb-summary .col-sub-dkp { width: 18%; }
#dataTable.table-tb-summary .col-sub-rate { width: 17%; }
#dataTable.table-tb-summary .col-bad-luck { width: 24%; }

#dataTable.table-tb-boss .col-boss-name { width: 34%; }
#dataTable.table-tb-boss .col-player-count { width: 18%; }
#dataTable.table-tb-boss .col-kill-time { width: 30%; }
#dataTable.table-tb-boss .col-boss-score { width: 18%; }

#dataTable.table-loot .col-player { width: 18%; }
#dataTable.table-loot .col-type { width: 12%; }
#dataTable.table-loot .col-item { width: 34%; }
#dataTable.table-loot .col-dkp { width: 14%; }
#dataTable.table-loot .col-time { width: 22%; }

@media (max-width: 720px) {
  #tablePanel .table-wrap {
    overflow-x: hidden;
  }

  #dataTable.data-table {
    min-width: 0;
    width: 100%;
  }

  #dataTable.data-table th,
  #dataTable.data-table td {
    font-size: 10px;
    line-height: 1.18;
    padding: 4px 3px;
  }

  #dataTable.table-dkp .col-player-name { width: 22%; }
  #dataTable.table-dkp .col-player-class { width: 12%; }
  #dataTable.table-dkp .col-current-dkp { width: 17%; }
  #dataTable.table-dkp .col-lifetime-dkp { width: 17%; }
  #dataTable.table-dkp .col-sync-time { width: 32%; }

  #dataTable.table-dkp-detail .col-date-str { width: 27%; }
  #dataTable.table-dkp-detail .col-player-name { width: 18%; }
  #dataTable.table-dkp-detail .col-reason { width: 41%; }
  #dataTable.table-dkp-detail .col-points { width: 14%; }

  #dataTable.table-tb-summary .col-name { width: 22%; }
  #dataTable.table-tb-summary .col-boss-dkp { width: 18%; }
  #dataTable.table-tb-summary .col-sub-dkp { width: 18%; }
  #dataTable.table-tb-summary .col-sub-rate { width: 16%; }
  #dataTable.table-tb-summary .col-bad-luck { width: 26%; }

  #dataTable.table-tb-boss .col-boss-name { width: 32%; }
  #dataTable.table-tb-boss .col-player-count { width: 18%; }
  #dataTable.table-tb-boss .col-kill-time { width: 31%; }
  #dataTable.table-tb-boss .col-boss-score { width: 19%; }

  #dataTable.table-loot .col-player { width: 17%; }
  #dataTable.table-loot .col-type { width: 11%; }
  #dataTable.table-loot .col-item { width: 34%; }
  #dataTable.table-loot .col-dkp { width: 14%; }
  #dataTable.table-loot .col-time { width: 24%; }
}

@media (max-width: 430px) {
  #dataTable.data-table th,
  #dataTable.data-table td {
    font-size: 9px;
    padding: 3px 2px;
  }
}

.table-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: #174f87;
  cursor: pointer;
  display: inline;
  font: inherit;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-link:hover {
  color: #7b3f0f;
}

/* 首页视觉重调：让内容区更像 1.12 时代的羊皮纸面板，表格避免灰黄发闷。 */
.home-view {
  gap: 16px;
}

.home-section,
.home-footer {
  background:
    linear-gradient(180deg, rgba(255, 242, 199, .98), rgba(211, 171, 98, .96));
  border: 1px solid #6c411b;
  box-shadow:
    inset 0 0 0 1px rgba(255, 251, 224, .78),
    inset 0 0 24px rgba(107, 65, 27, .16),
    0 2px 0 rgba(38, 20, 7, .92),
    0 14px 28px rgba(28, 14, 4, .30);
  color: #241409;
}

.home-section {
  padding: 20px;
}

.home-section h2 {
  border-bottom: 1px solid rgba(119, 72, 25, .32);
  color: #4a260d !important;
  font-size: 23px;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 239, 185, .8);
}

.home-text,
.home-rule,
.home-link-card {
  background:
    linear-gradient(180deg, rgba(255, 246, 218, .96), rgba(238, 212, 150, .92));
  border: 1px solid rgba(116, 72, 28, .42);
  border-left: 4px solid #9d5f1f;
  box-shadow: inset 0 0 18px rgba(116, 72, 28, .10);
  color: #241409;
}

.home-rule {
  max-height: 640px;
}

.home-rule h3 {
  color: #63320f !important;
}

.home-rule p,
.home-text,
.home-footer p {
  color: #2c190b;
}

.home-rule a,
.home-link-card a {
  color: #174f87;
  font-weight: 700;
}

.home-section .table-wrap {
  background: #2b170b;
  border: 1px solid #6c411b;
  border-radius: 7px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 129, .18),
    0 8px 18px rgba(45, 22, 6, .20);
  padding: 1px;
}

.home-section table {
  background: #f3dfaa;
  border-collapse: collapse;
  min-width: 0;
  width: 100%;
}

.home-section th {
  background: linear-gradient(180deg, #68401d, #2c180c);
  color: #ffe08a;
  font-weight: 800;
  text-shadow: 0 1px 0 #170b04;
}

.home-section td {
  background: rgba(255, 244, 211, .90);
  color: #211207;
}

.home-section tbody tr:nth-child(even) td {
  background: rgba(238, 213, 154, .90);
}

.home-section td,
.home-section th {
  border-color: rgba(108, 65, 27, .35);
  padding: 11px 10px;
}

.home-actions a {
  background: linear-gradient(180deg, #ffd94f, #d99a17);
  border: 1px solid #8a5617;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 181, .85),
    0 2px 0 rgba(73, 38, 8, .72);
  color: #211207;
}

.home-actions a:hover,
.home-nav a:hover,
.rule-links a:hover {
  background: linear-gradient(180deg, #fff0a3, #e2aa25);
  color: #211207;
}

@media (max-width: 720px) {
  .home-section {
    padding: 14px;
  }

  .home-section h2 {
    font-size: 19px;
  }

  .home-rule {
    max-height: none;
  }

  .home-section td,
  .home-section th {
    font-size: 11px;
    line-height: 1.35;
    padding: 7px 5px;
  }
}
