:root {
  --paper: #f2e7d2;
  --surface: #fff8e8;
  --surface-deep: #173d35;
  --ink: #24170f;
  --muted: #7c6c55;
  --line: #d5bd86;
  --green: #173d35;
  --blue: #213d5a;
  --red: #9c2f2a;
  --amber: #c99a45;
  --gold: #e0bd6a;
  --brown: #5f3a22;
  --shadow: 0 18px 44px rgba(37, 22, 10, 0.2);
  --shadow-deep: 0 24px 60px rgba(12, 30, 27, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(23, 61, 53, 0.92), rgba(23, 61, 53, 0.44) 26%, transparent 48%),
    linear-gradient(90deg, rgba(201, 154, 69, 0.18), transparent 18%, rgba(156, 47, 42, 0.1) 82%, transparent),
    linear-gradient(135deg, rgba(33, 61, 90, 0.14), transparent 38%),
    var(--paper);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.boot {
  padding: 40px 20px;
  color: var(--muted);
}

.shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(224, 189, 106, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(201, 154, 69, 0.22), transparent 38%),
    linear-gradient(135deg, #12342d, #1d4b40);
  padding: 18px;
  box-shadow: var(--shadow-deep);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.08;
  font-family: "STSong", "SimSun", "Songti SC", serif;
  color: #fff9e8;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.24);
}

h2 {
  font-size: 19px;
}

.round-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(224, 189, 106, 0.78);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.12);
  padding: 9px 12px;
  color: #ffe8a7;
  font-weight: 800;
  transform: rotate(1deg);
}

.message {
  margin: 10px 0;
  border: 1px solid #f0d9a6;
  border-radius: 8px;
  background: #fff8e7;
  padding: 12px;
  color: #7a4d00;
  font-weight: 700;
}

.message.error {
  border-color: #efb5b5;
  background: #fff0f0;
  color: var(--red);
}

.login-shell {
  max-width: 560px;
}

.admin-login-card {
  margin-top: 18px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.76);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-toolbar button {
  width: auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 6px 10px;
  color: var(--brown);
  font-weight: 800;
}

.hero-strip,
.panel,
.metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(224, 189, 106, 0.72);
  border-top: 5px solid var(--gold);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 220, 0.86)),
    var(--surface);
}

.hero-strip p,
.hero-total span,
.section-title p,
.list-row p,
.rank-card p,
.asset-card p,
.asset-card small,
.rules p {
  color: var(--muted);
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 9px 10px;
  color: var(--ink);
}

.hero-strip select {
  margin-top: 7px;
}

.hero-total {
  min-width: 118px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  text-align: right;
}

.hero-total strong {
  display: block;
  margin-top: 4px;
  color: var(--red);
  font-size: 28px;
  font-family: Georgia, "Times New Roman", serif;
}

.tabbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
  background: rgba(23, 61, 53, 0.88);
  padding: 8px 0;
  backdrop-filter: blur(10px);
}

.tabbar button,
form button,
.quick-grid button,
.settle-list button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.tabbar button.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, #b9822b, #e3be67);
  color: #21150b;
  box-shadow: 0 8px 18px rgba(72, 45, 12, 0.18);
}

.panel {
  margin-top: 12px;
  padding: 16px;
  background-image:
    linear-gradient(rgba(36, 26, 18, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 26, 18, 0.025) 1px, transparent 1px);
  background-size: 18px 18px;
}

.market-panel {
  border-color: rgba(224, 189, 106, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(246, 230, 190, 0.92)),
    var(--surface);
}

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

.section-title p {
  margin-top: 4px;
  font-size: 13px;
}

.section-kicker {
  margin-bottom: 5px;
  color: var(--red) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px !important;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.leaderboard {
  display: grid;
  gap: 8px;
}

.rank-card,
.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 253, 246, 0.95);
  padding: 11px;
}

.rank-card.mine {
  border-color: var(--red);
  background: #fff2df;
}

.rank-card:nth-child(1) {
  border-color: #d9ae50;
  background: linear-gradient(135deg, #fff7dc, #f3d98f);
}

.rank-card:nth-child(2) {
  border-color: #bfc5cb;
  background: linear-gradient(135deg, #fbfbfb, #dee4ea);
}

.rank-card:nth-child(3) {
  border-color: #c98b55;
  background: linear-gradient(135deg, #fff0dc, #e4b17e);
}

.rank-divider {
  margin: 4px 0;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.rank-num {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5ead4;
  color: var(--brown);
  font-weight: 900;
}

.rank-card b,
.list-row b {
  font-size: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.metrics article {
  padding: 13px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 24px;
}

.list-row {
  grid-template-columns: 1fr auto;
  margin-top: 8px;
}

.tx .up {
  color: var(--green);
}

.tx .down {
  color: var(--red);
}

.empty {
  padding: 12px 0;
  color: var(--muted);
}

.ticket-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-list span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

.newspaper-board {
  position: relative;
  margin-top: 12px;
  border: 1px solid rgba(224, 189, 106, 0.76);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(18, 52, 45, 0.92), rgba(18, 52, 45, 0.68)),
    #fff7e4;
  box-shadow: var(--shadow-deep);
  padding: 18px;
  overflow: hidden;
}

.newspaper-board::before,
.newspaper-board::after {
  position: absolute;
  width: 92px;
  height: 92px;
  border: 3px solid rgba(178, 59, 47, 0.34);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.newspaper-board::before {
  right: 18px;
  top: 18px;
  transform: rotate(-12deg);
}

.newspaper-board::after {
  right: 34px;
  top: 34px;
  width: 58px;
  height: 58px;
}

.newspaper-kicker {
  display: inline-block;
  margin-bottom: 12px;
  border: 1px solid rgba(224, 189, 106, 0.8);
  background: rgba(255, 248, 232, 0.12);
  padding: 5px 9px;
  color: #ffe8a7;
  font-size: 12px;
  font-weight: 900;
}

.newspaper-image-slot {
  display: grid;
  min-height: 164px;
  place-items: center;
  border: 1px dashed rgba(224, 189, 106, 0.62);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(224, 189, 106, 0.14), transparent),
    rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  text-align: center;
}

.newspaper-image-slot span {
  display: block;
  color: #fff9e8;
  font-family: "STSong", "SimSun", "Songti SC", serif;
  font-size: 30px;
  font-weight: 900;
}

.newspaper-image-slot small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 248, 232, 0.72);
}

.newspaper-pages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.newspaper-page {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(224, 189, 106, 0.72);
  border-radius: 6px;
  background: #fff3d7;
  box-shadow: 0 12px 26px rgba(28, 14, 4, 0.22);
}

.newspaper-page img {
  display: block;
  width: 100%;
  aspect-ratio: 1.45 / 1;
  object-fit: cover;
}

.newspaper-page span {
  position: absolute;
  left: 10px;
  top: 10px;
  border: 1px solid rgba(224, 189, 106, 0.78);
  border-radius: 999px;
  background: rgba(26, 38, 31, 0.84);
  color: #ffe8a7;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 8px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.asset-card {
  position: relative;
  min-height: 236px;
  border: 1px solid rgba(224, 189, 106, 0.82);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 244, 213, 0.92)),
    #fffdf6;
  box-shadow: 0 14px 28px rgba(55, 35, 13, 0.13);
  overflow: hidden;
}

.asset-card::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(95, 58, 34, 0.16);
  border-radius: 5px;
  content: "";
  pointer-events: none;
}

.asset-media {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid rgba(95, 58, 34, 0.42);
  border-radius: 6px;
  overflow: hidden;
}

.asset-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.asset-media.has-image::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(28, 20, 12, 0.32)),
    linear-gradient(135deg, rgba(255, 248, 232, 0.16), transparent 34%);
  content: "";
}

.asset-visual {
  background:
    linear-gradient(135deg, rgba(156, 47, 42, 0.15), transparent 52%),
    linear-gradient(180deg, #fff8df, #ecd59e);
  color: var(--brown);
  font-family: "STSong", "SimSun", "Songti SC", serif;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.asset-copy {
  position: relative;
  z-index: 1;
}

.asset-copy span {
  display: inline-block;
  margin-bottom: 4px;
  border: 1px solid rgba(156, 47, 42, 0.28);
  border-radius: 999px;
  background: rgba(156, 47, 42, 0.08);
  padding: 3px 7px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.asset-copy strong,
.asset-card > strong {
  display: block;
  color: #21150b;
  font-size: 17px;
  line-height: 1.25;
}

.asset-card p {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-weight: 700;
}

.asset-card small {
  display: block;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.asset-card.settlement {
  position: relative;
  min-height: 332px;
}

.asset-result {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.88);
  padding: 9px 7px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  transform: rotate(9deg);
}

.asset-result.暴涨,
.asset-result.上涨 {
  border-color: var(--green);
  color: var(--green);
}

.asset-result.大跌,
.asset-result.下跌 {
  border-color: var(--red);
  color: var(--red);
}

.asset-result.横盘 {
  border-color: var(--amber);
  color: var(--amber);
}

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

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

.admin-grid.two {
  align-items: start;
}

.admin-card label,
form label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.account-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff5cf;
  padding: 12px;
}

.account-balance span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-balance strong {
  color: var(--red);
  font-size: 26px;
}

.account-form {
  display: grid;
  gap: 8px;
}

.admin-card label select,
form label input,
form label select {
  margin-top: 6px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.quick-grid button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px;
  text-align: left;
}

.quick-grid button b {
  color: var(--green);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 120px 90px;
  gap: 8px;
  margin-top: 12px;
}

form button {
  width: 100%;
  margin-top: 12px;
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.inline-form button {
  margin-top: 0;
}

.settle-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.settle-list button {
  display: grid;
  gap: 3px;
  min-height: 58px;
}

.settle-list button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.danger-line {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid #efb5b5;
  border-radius: 8px;
  background: #fff0f0;
  color: var(--red);
  font-weight: 900;
}

.operator-note {
  margin-top: 12px;
  border: 1px solid #dfc384;
  border-radius: 6px;
  background: #fff5cf;
  padding: 10px;
}

.operator-note strong {
  color: var(--brown);
}

.operator-note p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.compact {
  max-height: 620px;
  overflow: auto;
}

.settlement-preview .asset-card small {
  line-height: 1.55;
}

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

@media (max-width: 760px) {
  .shell {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .hero-strip,
  .admin-grid,
  .admin-grid.two,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .hero-total {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    padding-left: 0;
    text-align: left;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .section-title {
    display: block;
  }

  .settle-list {
    grid-template-columns: 1fr;
  }

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

  .newspaper-pages {
    grid-template-columns: 1fr;
  }

  .asset-card {
    min-height: 220px;
  }
}

@media (max-width: 460px) {
  .asset-grid,
  .settlement-preview .asset-grid {
    grid-template-columns: 1fr;
  }
}
