:root {
  --bg: #f4f7f5;
  --text: #17211d;
  --muted: #66736d;
  --line: #e1e8e4;
  --green-dark: #0d4938;
  --soft: #edf5f1;
  --shadow: 0 12px 34px rgba(25, 58, 45, .07);
}

body {
  background:
    radial-gradient(circle at 8% 0, #e6f1eb 0, transparent 30%),
    radial-gradient(circle at 92% 12%, #eef4f1 0, transparent 25%),
    var(--bg);
  background-attachment: fixed;
  font-variant-numeric: tabular-nums;
}

.shell { max-width: 1480px; padding: 20px; }

.page-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 24px 26px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #102e26 0%, #174b3c 70%, #1b5b48 100%);
  color: #fff;
  box-shadow: 0 18px 45px rgba(14, 61, 47, .18);
}

.page-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -70px;
  top: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 66%);
}

.page-header h1 { margin: 5px 0 4px; font-size: 28px; letter-spacing: -.5px; }
.page-header > div > p:last-child { color: #c7d8d1; }
.page-header .eyebrow { color: #b7d4c9 !important; font-size: 0 !important; }
.page-header .eyebrow::after { content: "COCO · DEAD HAND"; font-size: 11px; letter-spacing: 2.2px; }

.workspace { grid-template-columns: minmax(700px, 1fr) 400px; gap: 16px; }
.side-column { gap: 16px; top: 16px; }
.panel, .run-panel { border-color: rgba(211, 222, 216, .9); border-radius: 14px; box-shadow: var(--shadow); }
.panel-head { padding: 14px 16px; border-bottom-color: #edf1ef; }
.panel-head h2 { font-size: 18px; letter-spacing: -.2px; }

.segment, .choice, .button, input {
  border-color: #dce5e0;
  border-radius: 9px;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.segment:hover, .choice:hover, .button:hover { transform: translateY(-1px); }
.button.primary { border-radius: 10px; box-shadow: 0 8px 18px rgba(18, 97, 73, .18); }

.item-catalog { gap: 10px; padding: 12px; }
.rarity-group {
  --rarity: #8b98a5;
  border: 1px solid #e6ece9;
  border-left: 4px solid var(--rarity);
  border-radius: 11px;
  background: #fff;
}
.rarity-group.extraordinary { --rarity: #c27b25; }
.rarity-group.covert { --rarity: #c74949; }
.rarity-group.classified { --rarity: #b33d76; }
.rarity-group.restricted { --rarity: #7758c6; }
.rarity-group.mil_spec { --rarity: #477bc8; }
.rarity-group .rarity-title {
  padding: 9px 12px;
  border-bottom: 1px solid #edf1ef;
  background: #fff;
  color: var(--text);
}
.rarity-title strong { font-size: 12px; }
.rarity-title span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f4f2;
  color: var(--muted);
  font-size: 10px;
}
.rarity-grid { gap: 8px; padding: 9px; }
.item-card {
  border-color: #e9eeeb;
  border-radius: 10px;
  background: #fbfcfb;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.item-card:hover { border-color: #9cc5b5; box-shadow: 0 8px 20px rgba(20, 71, 54, .09); }
.item-card.active { border-color: #488f75; background: #edf6f2; box-shadow: 0 0 0 2px rgba(18, 97, 73, .1); }

.selected-item { border-color: #e3eae6; border-radius: 11px; background: #f8faf9; }
.calculator-panel { padding-bottom: 16px; }
.calculator-panel > .panel-head { margin-bottom: 5px; }
.empty-result { padding: 48px 18px; }

.rate-card {
  border-color: #c9ddd4;
  border-radius: 11px;
  background: linear-gradient(135deg, #f5faf7, #eaf4ef);
  box-shadow: 0 8px 20px rgba(18, 97, 73, .07);
}
.rate-icon { box-shadow: 0 7px 15px rgba(18, 97, 73, .2); }
.platform-results { gap: 12px; padding: 12px; }
.platform-card { border-color: #e1e8e4; border-radius: 12px; box-shadow: 0 8px 24px rgba(20, 59, 46, .06); }
.platform-card.best { border-color: #6aaa92; box-shadow: 0 0 0 1px #6aaa92, 0 12px 28px rgba(18, 97, 73, .1); }
.platform-card-head { padding: 11px 13px; border-bottom-color: #edf1ef; background: #f8faf9; }
.platform-profit { border-radius: 10px; background: linear-gradient(135deg, #eff6f2, #e8f2ed); }

.ledger-section { margin: 2px 12px 12px; border-color: #e2e9e5; border-radius: 12px; background: #f8faf9; }
.ledger-head { padding: 15px 16px; border-bottom-color: #edf1ef; }
.ledger-platform-filters button { border-color: #dce5e0; background: #f9fbfa; }
.ledger-summary { gap: 7px; padding: 11px; background: #f8faf9; }
.ledger-stat { min-height: 82px; border-color: #e6ece8; border-radius: 10px; box-shadow: 0 4px 14px rgba(20, 59, 46, .035); }
.ledger-table th { background: #f5f8f6; }
.ledger-table th, .ledger-table td { border-bottom-color: #edf1ef; }
.ledger-delete { min-width: 40px; padding: 5px 6px; border-radius: 7px; }
.ledger-delete:hover { background: #fff1f0; text-decoration: none; }

.shop-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 22px;
  margin: 0 12px 12px;
  padding: 22px 24px;
  border: 1px solid #dce8e2;
  border-radius: 13px;
  background: linear-gradient(135deg, #f7fbf9 0%, #edf6f1 100%);
  box-shadow: 0 9px 25px rgba(18, 73, 55, .06);
}
.shop-promo-copy { max-width: 540px; }
.shop-kicker { display: block; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.shop-promo h2 { margin: 7px 0 6px; font-size: 20px; letter-spacing: -.3px; }
.shop-promo p { max-width: 480px; margin: 0; color: var(--muted); font-size: 12px; }
.shop-note {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(18, 73, 55, .07);
}
.shop-note::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #1d8b67;
  box-shadow: 0 0 0 4px rgba(29, 139, 103, .1);
}
.shop-qr-wrap {
  justify-self: end;
  padding: 7px;
  border: 1px solid #e1e8e4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(21, 61, 48, .08);
}
.shop-qr-wrap img { display: block; width: 168px; height: auto; border-radius: 7px; }

footer { display: grid; gap: 7px; padding: 26px 18px 30px; color: var(--muted); font-size: 11px; }
footer strong { color: var(--green-dark); font-size: 11px; letter-spacing: 1.4px; }

.side-promo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 12px;
  background: linear-gradient(145deg, #fff 0%, #f7faf8 100%);
}
.promo-channel {
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 8px 10px 10px;
  text-align: center;
}
.promo-channel + .promo-channel { border-left: 1px solid #e7ece9; }
.promo-title { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 28px; }
.promo-title strong { font-size: 13px; }
.promo-logo {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(25, 58, 45, .1);
}
.taobao-logo { background: linear-gradient(145deg, #ff6a00, #ff3d00); font-size: 15px; }
.qq-logo { background: linear-gradient(145deg, #33cbe8, #7287ef); font-size: 9px; letter-spacing: -.5px; }
.promo-channel p { min-height: 18px; margin: 5px 0 10px; color: var(--muted); font-size: 11px; }
.qr-crop {
  position: relative;
  width: 132px;
  height: 132px;
  overflow: hidden;
  border: 1px solid #e3e9e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(20, 59, 46, .06);
}
.qr-crop img { position: absolute; max-width: none; }
.taobao-qr img { width: 180px; height: auto; left: -28px; top: -34px; }
.qq-qr img { width: 160px; height: auto; left: -14px; top: -78px; }

@media (max-width: 420px) {
  .side-promo { padding: 8px; }
  .promo-channel { padding: 7px 4px 9px; }
  .qr-crop { width: 122px; height: 122px; }
  .taobao-qr img { left: -30px; top: -36px; }
  .qq-qr img { left: -18px; top: -80px; }
}

@media (max-width: 1250px) {
  .workspace { grid-template-columns: 1fr; }
  .side-column { position: static; grid-template-columns: 1fr 1fr; }
  .side-promo { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .shell { padding: 8px; }
  .page-header { padding: 20px; border-radius: 13px; }
  .page-header h1 { font-size: 24px; }
  .side-column { grid-template-columns: 1fr; }
  .shop-promo { grid-template-columns: 1fr 150px; padding: 18px; }
  .shop-qr-wrap img { width: 136px; }
}
@media (max-width: 520px) {
  .shop-promo { grid-template-columns: 1fr; text-align: center; }
  .shop-promo-copy { display: grid; justify-items: center; }
  .shop-qr-wrap { justify-self: center; }
  .shop-promo h2 { font-size: 18px; }
}
