#home {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: #8fd4f8;
  color: #3a2412;
  overflow: hidden;
}

#home[hidden],
#app[hidden] { display: none !important; }

#app {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hub-top,
.hub-dock {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: linear-gradient(#ffbf63, #e8892a);
  border-bottom: 4px solid #a85a18;
  box-shadow: inset 0 2px 0 #ffe0a8;
}

.hub-dock {
  border-bottom: 0;
  border-top: 4px solid #a85a18;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px 7px;
  overflow-x: auto;
}
.hub-dock .dock-btn {
  flex-direction: row;
  min-width: 0;
  width: auto;
  padding: 3px 8px 3px 4px;
  font-size: 13px;
  gap: 6px;
  white-space: nowrap;
}
.hub-dock .dock-art {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
@media (max-width: 520px) {
  .hub-dock {
    gap: 4px;
    padding: 4px 6px 5px;
  }
  .hub-dock .dock-btn {
    padding: 2px 5px 2px 3px;
    font-size: 11px;
    gap: 3px;
  }
  .hub-dock .dock-art {
    width: 22px;
    height: 22px;
  }
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: #fff8e8;
  text-shadow: 2px 2px 0 #8a3e10;
}

.hub-brand .brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.hub-brand small {
  font-size: 9px;
  letter-spacing: 0.4px;
  font-weight: 800;
  color: #fff6df;
}

.brand-mark {
  height: 40px;
  width: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hub-socials {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.hub-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: #111;
  color: #fff;
  border: 2px solid #ffe0a8;
  text-decoration: none;
}
.hub-x svg {
  width: 14px;
  height: 14px;
  display: block;
}
.hub-tg {
  background: #229ED9;
  border-color: #9ad4f0;
}
.hub-x:hover { filter: brightness(1.2); }

.chain-ask {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgba(20, 10, 4, 0.55);
}
.chain-ask[hidden] { display: none !important; }
.chain-card {
  width: min(420px, calc(100% - 32px));
  padding: 18px 16px 14px;
  background: #fff6e4;
  color: #3a2412;
  border: 4px solid #a85a18;
  box-shadow: 6px 6px 0 #6a3010;
}
.chain-card b { display: block; font-size: 20px; }
.chain-card p { margin: 8px 0 14px; line-height: 1.5; }
.chain-actions { display: flex; gap: 8px; }
.chain-actions button {
  flex: 1;
  background: linear-gradient(#ffbf63, #e0862a);
  border: 2px solid #7a3e10;
  color: #2a1406;
  font-weight: 800;
  padding: 8px 10px;
  cursor: pointer;
}
.chain-actions button:last-child { background: #fff; }

.linkbox { position: relative; }
.link-main {
  background: #2a160c;
  color: #fff6df;
  border: 2px solid #ffe0a8;
  font-weight: 800;
  padding: 4px 10px;
  cursor: pointer;
}
.link-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 168px;
  padding: 8px;
  background: #2a160c;
  border: 3px solid #ffe0a8;
  box-shadow: 3px 3px 0 #6a3010;
}
.link-menu[hidden] { display: none !important; }
.link-menu button {
  background: #ffbf63;
  border: 2px solid #7a3e10;
  color: #2a1406;
  font-weight: 800;
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
}
.link-menu small {
  display: block;
  font-weight: 700;
  color: #6a3a14;
}

.hub-balance {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-online {
  background: rgba(90, 40, 8, 0.28);
  color: #fff6df;
  border: 2px solid rgba(255, 236, 190, 0.7);
  padding: 4px 10px;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.hub-online b { color: #ffe08a; }

.hub-withdraw {
  background: #fff6df;
  color: #5a3414;
  border: 2px solid #8a4e16;
  font-weight: 800;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.hub-withdraw:hover { filter: brightness(1.06); }

.hub-stat {
  background: rgba(90, 40, 8, 0.28);
  color: #fff6df;
  border: 2px solid rgba(255, 236, 190, 0.7);
  padding: 4px 10px;
  font-weight: 800;
  font-size: 13px;
}

.hero {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #1c6cb5;
}

#hub {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* 只負責畫背景／行人，不要擋住中間選單按鈕 */
  pointer-events: none;
  z-index: 1;
}

.wordmark {
  position: absolute;
  left: 2%;
  top: 3%;
  bottom: 12%;
  width: calc(48% - 200px);
  z-index: 3;
  margin: 0;
  pointer-events: none;
}

.wordmark img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: left top;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(4px 6px 0 rgba(20, 8, 16, 0.35));
}

.hub-caption {
  position: absolute;
  left: 5%;
  bottom: 5%;
  z-index: 3;
  margin: 0;
  background: rgba(80, 48, 20, 0.78);
  color: #fff1cc;
  border: 2px solid #e7c48a;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 800;
}

.hub-menu {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  z-index: 5;
  width: min(320px, 32vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.hub-btn {
  width: 100%;
  border: 3px solid #6a3a12;
  background: linear-gradient(#f0b15a, #d4842e);
  color: #3a220c;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 9px 12px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 #ffe3b0, 0 3px 0 #6a3a12;
}

.hub-btn:hover { filter: brightness(1.06); }
.hub-btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 #ffe3b0; }
.hub-btn.main {
  background: linear-gradient(#ffe08a, #f0a030);
  font-size: 18px;
}
.hub-btn:disabled {
  cursor: default;
  color: #8a6844;
  background: linear-gradient(#d9c4a4, #c8b090);
  box-shadow: inset 0 2px 0 #efe4d0;
}

.hero-luffy {
  display: none;
}

.lawn {
  display: none;
}

.lawn-group { display: flex; align-items: flex-end; gap: 4px; }

.lawn-mate img,
.lawn-mate canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  height: 64px;
  width: auto;
  display: block;
}

.dock-btn {
  width: auto;
  flex: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  border: 3px solid #8a4e16;
  background: #fff4dc;
  color: #5a3414;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 2px 5px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 #fff, 0 2px 0 #8a4e16;
}
.dock-art {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.dock-btn:hover { background: #fff; }
.dock-btn,
.actions .btn[data-sheet="crew"],
.nft-tabs button[data-tab="rescue"] {
  position: relative;
}
.cage-bang {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e23b3b;
  color: #fff;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff4dc;
  pointer-events: none;
}
.cage-bang[hidden] { display: none !important; }
.nft-tabs .cage-bang { box-shadow: 0 0 0 2px #1a120c; }
.dock-ico {
  display: block;
  width: 28px;
  height: 22px;
  margin: 0 auto 2px;
  background: center / contain no-repeat;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(40, 24, 8, 0.45);
  padding: 16px;
}

.sheet[hidden] { display: none !important; }

.sheet-card {
  width: min(440px, 100%);
  max-height: min(78vh, 760px);
  display: flex;
  flex-direction: column;
  background: #fff6e4;
  border: 4px solid #a86a28;
  box-shadow: 6px 6px 0 rgba(70, 36, 8, 0.35);
  color: #3a2414;
}

.sheet-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #e8892a;
  color: #fff8ea;
  font-size: 16px;
  position: relative;
}

.sheet-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffe56a;
  opacity: 0.45;
  cursor: pointer;
  box-shadow: none;
}
.admin-dot[hidden] { display: none !important; }
.admin-dot:hover { opacity: 0.9; }

.admin-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(20, 12, 4, 0.35);
}
.admin-gate[hidden] { display: none !important; }
.admin-gate form {
  width: min(280px, 92vw);
  background: #fff6e4;
  border: 3px solid #a86a28;
  padding: 14px;
  color: #3a2414;
}
.admin-gate input { width: 100%; box-sizing: border-box; margin: 8px 0; }
.admin-gate .row { display: flex; gap: 8px; justify-content: flex-end; }

.sheet-card header button {
  border: 2px solid #6a3a12;
  background: #fff1d0;
  color: #3a2414;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 8px;
}

.sheet-card header button.admin-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffe56a;
  box-shadow: none;
  opacity: 0.5;
}

.sheet-card.wide { width: min(820px, 100%); }
.sheet-card.wide.nft { width: min(900px, 100%); }

.sheet-card .body {
  padding: 14px 16px 16px;
  line-height: 1.55;
  font-size: 14px;
  overflow: auto;
}

.sheet-card h3 { margin: 14px 0 6px; font-size: 15px; }
.sheet-card button, .sheet-card input {
  font: inherit;
  margin: 2px 4px 2px 0;
}
.sheet-card button {
  border: 2px solid #8a4e16;
  background: #fff1d0;
  color: #3a2414;
  font-weight: 800;
  padding: 4px 8px;
  cursor: pointer;
}
.sheet-card input { padding: 4px 6px; border: 2px solid #e2c49a; width: min(180px, 46%); }
.sheet-card table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet-card table.mini th, .sheet-card table.mini td {
  border-bottom: 1px solid #efd2a4;
  text-align: left;
  padding: 4px 6px;
}
.ship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.shop-ui { color: #f4e4c8; }
.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.sheet-card.nft .shop-tabs button {
  background: linear-gradient(#ffbf63, #e0862a);
  border: 2px solid #7a3e10;
  color: #2a1406;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 7px 12px;
  box-shadow: inset 0 1px 0 #ffe0a8, 0 2px 0 #5a2a08;
}
.sheet-card.nft .shop-tabs button.on {
  background: linear-gradient(#ffe08a, #f0c14a);
  border-color: #f0c14a;
  color: #2a1608;
  box-shadow: inset 0 0 0 1px #fff4d0, 0 0 0 1px #f0c14a;
}
.shop-banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #120d09;
  border: 2px solid #8a5a22;
  display: grid;
  gap: 4px;
}
.shop-banner.on {
  border-color: #f0c14a;
  background: linear-gradient(180deg, #3a2810, #120d09);
}
.shop-banner b {
  font-size: 16px;
  letter-spacing: 2px;
  color: #fff4d6;
}
.shop-banner span { color: #f0d9a8; line-height: 1.45; }
.shop-banner em {
  font-style: normal;
  color: #f0c14a;
  font-weight: 900;
}
.shop-banner strong {
  color: #ffb0c8;
  letter-spacing: 1px;
}
.shop-banner small { color: #cbb89a; font-size: 12px; }
.shop-hero {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 18px;
  align-items: start;
  padding: 12px;
  background: linear-gradient(180deg, #1a120c, #120d09);
  border: 2px solid #6b4524;
}
.shop-art {
  display: grid;
  place-items: center;
  min-height: 180px;
  background: radial-gradient(circle at 50% 40%, #3a2418, #0c0806 70%);
  border: 2px solid #5c3b22;
  padding: 10px;
}
.shop-art img {
  width: min(100%, 220px);
  height: auto;
  image-rendering: auto;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
}
.shop-copy h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 2px;
  color: #fff8e8;
  text-shadow: 2px 2px 0 #5a2208;
}
.shop-copy p { margin: 0 0 10px; color: #e6d2b0; line-height: 1.55; }
.shop-rates {
  padding: 8px 10px;
  background: #0c0806;
  border: 1px solid #6b4524;
  color: #f0d9a8 !important;
  font-size: 13px;
}
.shop-rates b { color: #f0c14a; }
.shop-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0;
}
.price-was {
  color: #a89880;
  text-decoration: line-through;
  font-weight: 700;
}
.price-off {
  background: #f0c14a;
  color: #2a1608;
  font-style: normal;
  font-weight: 800;
  padding: 1px 6px;
}
.price-list { color: #d8c4a4; font-weight: 700; }
.price-now { color: #f0c14a; font-size: 18px; }
.shop-closed { color: #f0a0a0; font-weight: 800; margin: 8px 0; }

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}
.sheet-card.nft .shop-buy,
.sheet-card.nft button.shop-buy {
  background: linear-gradient(#ffbf63, #e0862a);
  border: 2px solid #7a3e10;
  color: #2a1406;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  box-shadow: inset 0 1px 0 #ffe0a8, 0 3px 0 #5a2a08;
}
.sheet-card.nft .shop-buy:hover {
  filter: brightness(1.05);
}
.shop-fee { font-size: 12px; color: #cbb89a !important; }
.shop-ship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.shop-ship {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  background: #1a120c;
  border: 2px solid #6b4524;
  text-align: center;
}
.shop-ship img {
  height: 72px;
  width: auto;
  image-rendering: pixelated;
}
.shop-ship b { color: #fff4d6; }
.shop-ship small { color: #cbb89a; }
.shop-ship strong {
  color: #f0c14a;
  display: flex;
  align-items: center;
  gap: 6px;
}
.shop-ship strong i {
  font-style: normal;
  font-size: 11px;
  color: #2a1608;
  background: #f0c14a;
  padding: 1px 5px;
}
.shop-pending {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.shop-pending-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: #1a120c;
  border: 2px solid #6b4524;
}
.shop-pending-card img { width: 96px; height: auto; }
.shop-empty {
  text-align: center;
  padding: 24px 12px;
  border: 2px dashed #6b4524;
  background: #120d09;
}
.shop-empty img { width: 120px; height: auto; opacity: 0.85; margin-bottom: 8px; }
.shop-table-wrap { overflow: auto; }
.shop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.shop-table th, .shop-table td {
  border-bottom: 1px solid #5c3b22;
  text-align: left;
  padding: 7px 8px;
  white-space: nowrap;
}
.shop-table th { color: #f0c14a; letter-spacing: 1px; }
.shop-table td { color: #f4e4c8; }

@media (max-width: 640px) {
  .shop-hero { grid-template-columns: 1fr; }
  .shop-copy h2 { font-size: 22px; }
  .shop-art { min-height: 140px; }
}

.ref-label {
  display: block;
  margin: 10px 0 4px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #f0c14a;
}
.ref-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}
.sheet-card.nft .ref-link-row input {
  flex: 1 1 180px;
  min-width: 0;
  width: auto;
  background: #0c0806;
  color: #f6e7c4;
  border: 2px solid #6b4524;
  padding: 8px 10px;
}
.ref-rule {
  margin: 12px 0;
  padding: 12px 14px;
  background: #0c0806;
  border: 2px solid #8a5a22;
  color: #f0d9a8;
  line-height: 1.55;
}
.ref-rule b, .ref-rule strong { color: #f0c14a; }
.ref-stats { margin-bottom: 8px; }
.ref-friends {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.ref-friend {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 8px 10px;
  background: #1a120c;
  border: 2px solid #5c3b22;
}
.ref-friend b { color: #fff4d6; }
.ref-friend em { font-style: normal; color: #cbb89a; font-size: 12px; }
.ref-progress {
  display: block;
  height: 8px;
  background: #2a1420;
  border: 1px solid #8a3048;
}
.ref-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a1840, #e23b6a 55%, #f0c14a);
}

.stake-ui .stake-lead {
  margin: 0 0 10px;
  color: #e6d2b0;
  line-height: 1.55;
}
.stake-ui .stake-lead b,
.stake-ui .stake-lead strong { color: #f0c14a; }
.stake-status { margin-bottom: 14px; }
.stake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.stake-tiers-title {
  margin: 16px 0 8px;
  letter-spacing: 2px;
  color: #fff4d6;
}
.stake-table tr.on td {
  color: #f0c14a;
  background: rgba(240, 193, 74, 0.08);
}
.ship-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 8px 8px 10px;
  background: #1a120c;
  border: 2px solid #8a4e16;
  color: #fff6e4;
  text-align: center;
}
.ship-card img {
  height: 72px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.ship-card b { font-size: 14px; }
.ship-card small { color: #e2c49a; font-size: 12px; }
.ship-card strong { color: #f0c14a; font-size: 13px; }
.ship-card button { margin-top: 4px; }
.boss-tabs {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #5a4028;
}
.boss-tabs button {
  min-width: 88px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.boss-board-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.boss-my-rank {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px;
  border: 2px solid #f0c14a;
  background: linear-gradient(180deg, #3a2810 0%, #1c1208 100%);
  box-shadow: inset 0 1px 0 rgba(255, 214, 150, 0.18);
}
.boss-my-rank.empty {
  display: block;
  border-color: #6b4524;
  color: #cbb89a;
  text-align: center;
}
.boss-my-rank > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.boss-my-rank small {
  font-size: 11px;
  letter-spacing: 1px;
  color: #cbb89a;
}
.boss-my-rank b {
  font-size: 22px;
  line-height: 1.1;
  color: #f0c14a;
}
.boss-my-rank em {
  font-style: normal;
  font-size: 11px;
  color: #e6d2b0;
}
.boss-my-rank.prize {
  border-color: #e8b84a;
  box-shadow: inset 0 1px 0 rgba(255, 214, 150, 0.22), 0 0 18px rgba(240, 193, 74, 0.18);
}
.boss-row.gap {
  display: grid;
  place-items: center;
  padding: 4px 0;
  color: #8a7358;
  border: none;
  background: transparent;
  box-shadow: none;
}
.boss-row.outside {
  border-color: #f0c14a;
}
.raid-panel {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: start;
}
.raid-boss {
  width: 96px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.raid-bar {
  height: 10px;
  background: #2a1420;
  border: 2px solid #8a3048;
  margin: 6px 0 10px;
}
.raid-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a1840, #e23b6a);
}

.boss-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin: 10px 0 4px;
}
.boss-stats > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #24160f 0%, #140d09 100%);
  border: 2px solid #6b4524;
  box-shadow: inset 0 1px 0 rgba(255, 214, 150, 0.12);
}
.boss-stats small {
  font-size: 11px;
  letter-spacing: 1px;
  color: #cbb89a;
}
.boss-stats b {
  font-size: 18px;
  line-height: 1.1;
  color: #f0c14a;
}
.boss-stats em {
  font-style: normal;
  font-size: 11px;
  color: #e6d2b0;
}
.boss-stats > span.mine {
  border-color: #f0c14a;
  background: linear-gradient(180deg, #3a2810 0%, #1c1208 100%);
}

.boss-board {
  margin: 14px 0 8px;
  border: 3px solid #8a5a22;
  background:
    linear-gradient(180deg, rgba(80, 24, 40, 0.35), transparent 48%),
    #120d09;
  box-shadow: inset 0 0 0 1px #3a2412, 0 4px 0 #2a1408;
  overflow: hidden;
}
.boss-board.empty {
  padding: 18px 12px;
  text-align: center;
}
.boss-board-empty {
  margin: 0;
  color: #cbb89a;
  letter-spacing: 1px;
}
.boss-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 10px 12px 8px;
  background: linear-gradient(180deg, #5a2a18, #3a180e);
  border-bottom: 2px solid #f0c14a;
}
.boss-board-title {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 3px;
  color: #fff4d6;
  text-shadow: 2px 2px 0 #5a2208;
}
.boss-board-sub {
  font-size: 11px;
  color: #f0d9a8;
  letter-spacing: 0.5px;
}
.boss-board-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
}
.boss-row {
  display: grid;
  grid-template-columns: 42px 44px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  background: #1a120c;
  border: 2px solid #5c3b22;
}
.boss-row.prize { border-color: #8a5a22; }
.boss-row.mine {
  border-color: #f0c14a;
  background: linear-gradient(90deg, #3a2810, #1a120c 55%);
  box-shadow: inset 0 0 0 1px rgba(240, 193, 74, 0.35);
}
.boss-row.medal-1 {
  border-color: #f0c14a;
  background: linear-gradient(90deg, #4a3410, #1a120c 60%);
}
.boss-row.medal-2 {
  border-color: #c0c8d4;
  background: linear-gradient(90deg, #2a3038, #1a120c 60%);
}
.boss-row.medal-3 {
  border-color: #c48448;
  background: linear-gradient(90deg, #3a2418, #1a120c 60%);
}
.boss-rank {
  display: grid;
  place-items: center;
  min-height: 28px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  color: #f6e7c4;
  background: #2a180e;
  border: 1px solid #6b4524;
}
.boss-row.medal-1 .boss-rank {
  color: #2a1608;
  background: linear-gradient(#ffe08a, #f0c14a);
  border-color: #f0c14a;
}
.boss-row.medal-2 .boss-rank {
  color: #1a2030;
  background: linear-gradient(#f0f4f8, #b8c4d4);
  border-color: #c0c8d4;
}
.boss-row.medal-3 .boss-rank {
  color: #2a1408;
  background: linear-gradient(#f0c090, #c48448);
  border-color: #c48448;
}
.boss-art {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: end center;
  background: #0c0806;
  border: 1px solid #5c3b22;
  overflow: hidden;
}
.boss-face {
  height: 40px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.boss-face-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 900;
  color: #f0c14a;
  background: #24160f;
}
.boss-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.boss-meta b {
  font-size: 13px;
  color: #fff4d6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.boss-life {
  font-size: 11px;
  color: #c8b48a;
}
.boss-you {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1px;
  color: #2a1608;
  background: #f0c14a;
  vertical-align: 1px;
}
.boss-bar {
  display: block;
  width: 100%;
  height: 7px;
  background: #2a1420;
  border: 1px solid #8a3048;
}
.boss-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a1840, #e23b6a 55%, #f0c14a);
}
.boss-score {
  text-align: right;
  line-height: 1.05;
}
.boss-score strong {
  display: block;
  font-size: 15px;
  color: #f0c14a;
}
.boss-score small {
  color: #cbb89a;
  font-size: 11px;
  letter-spacing: 1px;
}

@media (max-width: 560px) {
  .raid-panel { grid-template-columns: 1fr; }
  .raid-boss { width: 72px; }
  .boss-row { grid-template-columns: 36px 36px 1fr auto; gap: 6px; }
  .boss-art { width: 36px; height: 36px; }
  .boss-face { height: 32px; }
}

#paper {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 0%, #16343f, #07141b 55%);
  color: #1c140c;
}
#paper[hidden] { display: none !important; }

.paper-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  color: #f6e7c4;
  background: rgba(6, 16, 22, 0.72);
  border-bottom: 1px solid rgba(232, 196, 122, 0.35);
}
.paper-bar strong { letter-spacing: 2px; font-size: 16px; }
.paper-bar button {
  border: 1px solid #e8c47a;
  background: transparent;
  color: #f6e7c4;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 700;
}

.paper-scroll { flex: 1; overflow: auto; }
.paper-layout {
  width: min(1080px, calc(100% - 32px));
  margin: 28px auto 48px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: start;
}
.paper-nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
}
.paper-nav a {
  color: #f0e2c4;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.88;
}
.paper-nav a:hover { opacity: 1; }

.paper-body {
  background: #f6f1e6;
  color: #1c140c;
  padding: 42px 48px 56px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid #e4d3ae;
}
.paper-body .kicker {
  margin: 0 0 8px;
  letter-spacing: 3px;
  font-size: 12px;
  color: #8a5a22;
}
.paper-body h1 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 900;
}
.paper-body .lede {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.6;
}
.paper-sec { margin-top: 28px; padding-top: 8px; border-top: 1px solid #e4d3ae; }
.paper-body h2 { margin: 12px 0 8px; font-size: 22px; }
.paper-body p, .paper-body li { line-height: 1.7; font-size: 15px; }
.paper-body .steps, .paper-body .notes { padding-left: 1.2em; }
.paper-table { overflow-x: auto; margin: 10px 0 4px; }
.paper-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.paper-body th, .paper-body td {
  border-bottom: 1px solid #e4d3ae;
  text-align: left;
  padding: 7px 8px;
  vertical-align: top;
  white-space: nowrap;
}
.paper-body th { color: #8a5a22; font-size: 12px; letter-spacing: 0.04em; }
.paper-body .colophon { margin-top: 28px; color: #6d5b48; font-size: 13px; }

@media (max-width: 800px) {
  .paper-layout { grid-template-columns: 1fr; }
  .paper-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .paper-body { padding: 24px 16px 36px; }
  .paper-body h1 { font-size: 30px; }
}

.codex {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.codex li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border: 2px solid #efd2a4;
  padding: 6px 8px;
}

.tag {
  font-weight: 900;
  font-size: 12px;
}
.tag.legendary { color: #c48408; }
.tag.epic { color: #7a45b0; }
.tag.rare { color: #2a78b8; }
.tag.common { color: #7a6858; }

.sound-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.lang-label {
  margin: 0 0 8px;
  font-weight: 900;
}

.lang-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-pick button {
  background: #fff;
  border: 2px solid #c48a45;
  color: #3a2412;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
}

.lang-pick button.on {
  background: #ffe08a;
  border-color: #8a3e10;
}

.lang-note {
  margin: 8px 0 14px;
  color: #8a5a30;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 800px) {
  .wordmark { left: 50%; top: 2%; bottom: auto; width: min(200px, 40vw); height: 32%; transform: translateX(-50%); }
  .hub-menu { left: 50%; bottom: 16%; width: min(240px, 70vw); transform: translateX(-50%); }
  .hub-caption { bottom: 4%; }
  .lawn-mate img,
  .lawn-mate canvas { height: 46px; }
}

.sheet-card.nft {
  width: min(980px, 100%);
  max-height: min(88vh, 860px);
  background: #24180f;
  color: #f4e4c8;
  border-color: #6b4524;
}
.sheet-card.nft header {
  background: #1a110c;
  color: #f6e7c4;
  border-bottom: 2px solid #6b4524;
}
.sheet-card.nft header button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: #3a2718;
  color: #f6e7c4;
  border-color: #8a6240;
}
.sheet-card.nft .body { color: #f4e4c8; }
.nft-tabs, .nft-paths { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.sheet-card.nft .nft-tabs button,
.sheet-card.nft .nft-paths button,
.sheet-card.nft .body > button {
  margin: 0;
  border: 2px solid #8a6230;
  background: #3a2716;
  color: #f0d7a4;
  padding: 4px 10px;
  cursor: pointer;
}
.sheet-card.nft .nft-tabs button.on,
.sheet-card.nft .nft-paths button.on {
  background: linear-gradient(#f0a24a, #d47820);
  color: #2a1608;
  border-color: #f0c14a;
}
.nft-note, .nft-pick, .nft-empty { margin: 0 0 8px; color: #e6d2b0; }
.hospital-rules {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #5a4028;
  background: rgba(20, 12, 8, 0.55);
}
.hospital-list {
  margin: 0 0 10px;
  padding-left: 1.2em;
  color: #e6d2b0;
  font-size: 13px;
  line-height: 1.55;
}
.hospital-list li { margin: 0 0 4px; }
.hospital-table {
  width: 100%;
  max-width: 360px;
  border-collapse: collapse;
  margin: 0 0 10px;
  font-size: 13px;
}
.hospital-table th,
.hospital-table td {
  border: 1px solid #5a4028;
  padding: 6px 10px;
  text-align: left;
}
.hospital-table th { color: #f0c14a; }
.hospital-table td { color: #f4e4c8; }
.sheet-card.nft .nft-go {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 6px;
  background: #6aa84f;
  border-color: #3d6b28;
  color: #14200c;
  letter-spacing: 2px;
}
.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}
.sheet-card.nft .nft-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 22px 8px 8px;
  background: #120d09;
  border: 2px solid #5c3b22;
  color: #f6e7c4;
  text-align: center;
  cursor: default;
  font: inherit;
}
.sheet-card.nft button.nft-card { cursor: pointer; }
.sheet-card.nft .nft-card.on { border-color: #f0c14a; box-shadow: inset 0 0 0 1px #f0c14a; }
.nft-state {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  letter-spacing: 1px;
  background: #3a3a3a;
  color: #eee;
  padding: 1px 5px;
}
.nft-state.work { background: #2d6a34; }
.nft-art { height: 78px; display: grid; place-items: end center; }
.nft-face {
  height: 72px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.nft-card b { font-size: 13px; }
.nft-card small { color: #cbb89a; font-size: 11px; }
.nft-rarity { font-size: 11px; letter-spacing: 1px; color: #e7d3ae; }
.nft-card.legendary .nft-rarity { color: #f0c14a; }
.nft-card.epic .nft-rarity { color: #d7a6ff; }
.nft-card.rare .nft-rarity { color: #8fd0ff; }
.nft-card.super .nft-rarity { color: #6eb6ff; }
.nft-card.superleg .nft-rarity { color: #ff8a4a; }
.nft-card.mythic .nft-rarity { color: #ff4a5a; }
.sell-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px 10px;
  align-items: end;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #c4893a;
  background: #24180f;
}
.sell-panel > div { grid-column: 1 / -1; }
.sell-panel b { display: block; margin-bottom: 4px; }
.sell-panel label { display: flex; flex-direction: column; gap: 4px; color: #e8c27a; font-size: 12px; }
.sell-panel input { width: 100%; max-width: none; }
@media (max-width: 640px) {
  .sell-panel { grid-template-columns: 1fr; }
}
.sheet-card.nft .market-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.sheet-card.nft .market-tools select {
  background: #1a120c;
  color: #f6e7c4;
  border: 2px solid #6b4524;
  padding: 4px 6px;
}
.sheet-card.nft .market-card { border-color: #3aa0ff; }
.market-price { color: #f0c14a; font-size: 14px; line-height: 1.15; }
.market-price small { display: block; font-size: 11px; letter-spacing: 1px; }
.sheet-card.nft .market-card button { margin-top: 4px; }
.nft-lv { font-size: 12px; }
.nft-chakra { display: block; width: 100%; height: 7px; margin-top: 4px; background: #3a2a18; }
.nft-chakra i { display: block; height: 100%; background: #3ecf6e; }
.nft-card em { font-style: normal; font-size: 11px; color: #d9c4a4; }
.nft-card .nft-stats { color: #f0d9a8; letter-spacing: 0.5px; }
.nft-card .nft-abs {
  min-height: 2.4em;
  color: #c8e4ff;
  line-height: 1.25;
}
.nft-card .nft-card-note {
  margin-top: 2px;
  color: #f0c14a;
}
.sheet-card.nft .nft-card.detail {
  min-height: 236px;
  align-items: stretch;
  text-align: left;
}
.sheet-card.nft .nft-card.detail .nft-art {
  place-items: end center;
  align-self: center;
}
.sheet-card.nft .nft-card.detail b,
.sheet-card.nft .nft-card.detail small,
.sheet-card.nft .nft-card.detail .nft-rarity,
.sheet-card.nft .nft-card.detail .nft-lv {
  text-align: center;
  align-self: center;
}
.boss-picked {
  max-width: none;
  margin: 0 0 10px;
}
.boss-filters { margin: 0 0 12px; }
.boss-filters .market-tools input[type="search"] { min-width: 140px; }
.sheet-card.nft .nft-card.boss-card { min-height: 220px; }
.sheet-card.nft .nft-card.officer-owned {
  border-color: #3aa0ff;
  background: linear-gradient(180deg, #142028 0%, #120d09 100%);
  max-width: 200px;
}
.sheet-card.nft .nft-card.pending-box {
  border-color: #f0c14a;
  box-shadow: 0 0 0 1px rgba(240, 193, 74, 0.35);
  cursor: pointer;
}
.sheet-card.nft .nft-card.pending-box .nft-state {
  color: #f0c14a;
}
.sheet-card.nft .nft-card.officer-owned.empty {
  opacity: 0.78;
  border-style: dashed;
}
.sheet-card.nft .nft-card.officer-owned.on {
  border-color: #f0c14a;
}
.sheet-card.nft .nft-card.prison-cage {
  border-color: #6a7a88;
  background: linear-gradient(180deg, #1c2228 0%, #12161c 100%);
}
.sheet-card.nft .nft-card.prison-cage .nft-face {
  height: 64px;
  image-rendering: auto;
}
.sheet-card.nft .nft-card.prison-cage button {
  margin-top: 6px;
  width: 100%;
}
.sheet-card.nft .nft-card.dim { opacity: 0.55; }
.sheet-card.nft .ship-pick em { min-height: 2.4em; }
.ship-focus {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px;
  background: #120d09;
  border: 2px solid #5c3b22;
  color: #f6e7c4;
}
.ship-focus img {
  width: 96px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.ship-focus b { font-size: 18px; }
.ship-focus p { margin: 4px 0 0; }
.sheet-card.nft .ship-aboard {
  margin: 0 0 14px;
}
.sheet-card.nft .ship-bed-card.empty {
  border-style: dashed;
  opacity: 0.72;
  color: #9a8570;
}
.ship-bed-empty {
  display: grid;
  place-items: center;
  width: 56px;
  height: 72px;
  margin: 0 auto;
  border: 1px dashed #6b4524;
  color: #cbb89a;
  font-size: 22px;
  font-weight: 800;
}
.sheet-card.nft input { background: #1a120c; color: #f6e7c4; border-color: #6b4524; }

/* 升阶失败确认 */
.enhance-fail {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 8, 4, 0.78);
  backdrop-filter: blur(4px);
}
.enhance-fail[hidden] { display: none !important; }
.enhance-fail-panel {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 22px 20px 18px;
  background: linear-gradient(180deg, #2a1810 0%, #1a100c 100%);
  border: 2px solid #8a4028;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: box-reveal-in 0.35s ease-out;
}
.enhance-fail-panel strong {
  color: #ffb0a0;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-align: center;
}
.enhance-fail-msg {
  margin: 0;
  color: #f6e7c4;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}
.enhance-fail-keep {
  margin: 0;
  padding: 10px 12px;
  background: #120c08;
  border: 1px solid #5a4028;
  color: #ffe08a;
  font-size: 13px;
  text-align: center;
}
.enhance-fail-keep[hidden] { display: none !important; }
.enhance-fail-btn {
  margin-top: 4px;
  background: #e0862a;
  color: #2a1406;
  border: 2px solid #7a3e10;
  font-weight: 800;
  font-size: 15px;
  padding: 10px 14px;
  cursor: pointer;
}
.enhance-fail-btn:active {
  transform: translateY(1px);
}

/* 购买箱子后的翻牌开箱 */
.box-reveal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 8, 4, 0.72);
  backdrop-filter: blur(4px);
}
.box-reveal[hidden] { display: none !important; }
.box-reveal-panel {
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: box-reveal-in 0.45s ease-out;
}
@keyframes box-reveal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
.box-reveal-progress {
  margin: 0;
  color: #f6e7c4;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 #2a1408;
}
.box-flip-wrap {
  position: relative;
  width: min(260px, 78vw);
  height: min(340px, 58vh);
}
.box-flip {
  width: 100%;
  height: 100%;
  perspective: 1200px;
  --reveal: #f0c14a;
}
.box-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.box-flip.open .box-flip-inner {
  transform: rotateY(180deg);
}
.box-flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 3px solid #f0c14a;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 220, 140, 0.28), transparent 45%),
    linear-gradient(160deg, #5a3214, #2a160c 55%, #1a1008);
  box-shadow: 0 16px 0 #1a0c06, 0 22px 40px rgba(0, 0, 0, 0.45);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.box-flip-front img {
  width: 78%;
  max-height: 72%;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.35));
  animation: box-chest-bob 2.2s ease-in-out infinite;
}
@keyframes box-chest-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.box-flip-front span {
  color: #ffe7b0;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
}
.box-flip-back {
  transform: rotateY(180deg);
  border-color: var(--reveal);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--reveal) 55%, transparent),
    0 0 28px color-mix(in srgb, var(--reveal) 45%, transparent),
    0 16px 0 #1a0c06,
    0 22px 40px rgba(0, 0, 0, 0.45);
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--reveal) 34%, transparent), transparent 52%),
    linear-gradient(160deg, #5a3214, #2a160c 55%, #1a1008);
}
.box-flip[data-rarity="common"] .box-flip-back {
  border-color: #8a5a22;
  box-shadow: 0 16px 0 #1a0c06, 0 22px 40px rgba(0, 0, 0, 0.45);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 220, 140, 0.18), transparent 45%),
    linear-gradient(160deg, #5a3214, #2a160c 55%, #1a1008);
}
.box-flip-back img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #120c08;
  border: 2px solid color-mix(in srgb, var(--reveal) 70%, #8a5a22);
  border-radius: 10px;
  box-shadow: 0 0 16px color-mix(in srgb, var(--reveal) 35%, transparent);
}
.box-flip[data-rarity="common"] .box-flip-back img {
  border-color: #8a5a22;
  box-shadow: none;
}
.box-flip-back b {
  color: var(--reveal);
  font-size: 18px;
  text-align: center;
  line-height: 1.25;
  text-shadow: 0 1px 0 #1a1008;
}
.box-flip[data-rarity="common"] .box-flip-back b {
  color: #fff4d8;
}
.box-flip-back .box-reveal-rarity {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #1a1008;
  background: var(--reveal);
  box-shadow: 0 0 12px color-mix(in srgb, var(--reveal) 50%, transparent);
}
.box-flip[data-rarity="common"] .box-flip-back .box-reveal-rarity {
  background: #9a8570;
  color: #fff8ee;
  box-shadow: none;
}
.box-flip[data-rarity="mythic"] .box-flip-back .box-reveal-rarity,
.box-flip[data-rarity="superleg"] .box-flip-back .box-reveal-rarity {
  color: #1a1008;
}
.box-flip[data-rarity="mythic"] .box-flip-back b {
  color: #ff6a78;
  text-shadow: 0 0 10px rgba(224, 24, 48, 0.65), 0 0 2px #0a0406;
}
.box-flip-back em {
  color: #d8c4a0;
  font-style: normal;
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
}
.box-sparks {
  position: absolute;
  inset: -20% -30%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.box-sparks[hidden] { display: none !important; }
.box-sparks span {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--c, #f0c14a);
  box-shadow:
    0 0 6px var(--c, #f0c14a),
    0 0 14px color-mix(in srgb, var(--c, #f0c14a) 70%, white);
  opacity: 0;
  transform: translate(0, 0) scale(0.4) rotate(0deg);
}
.box-sparks.burst span {
  animation: box-spark-fly 0.95s cubic-bezier(0.15, 0.75, 0.25, 1) var(--d, 0s) forwards;
}
.box-sparks span:nth-child(odd) {
  width: 4px;
  height: 12px;
  border-radius: 2px;
}
.box-sparks span:nth-child(3n) {
  width: 10px;
  height: 3px;
  border-radius: 2px;
}
@keyframes box-spark-fly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.5) rotate(0deg);
  }
  35% {
    opacity: 1;
    transform: translate(calc(var(--sx) * 40px), calc(var(--sy) * 36px)) scale(1.15) rotate(90deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--sx) * 130px), calc(var(--sy) * 150px)) scale(0.15) rotate(220deg);
  }
}
.box-reveal-btn {
  min-width: 160px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #3a2412;
  background: linear-gradient(#ffe08a, #f0b43a);
  box-shadow: inset 0 1px 0 #fff4c8, 0 4px 0 #8a4e16;
  cursor: pointer;
  animation: box-btn-pulse 1.6s ease-in-out infinite;
}
.box-reveal-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 #fff4c8, 0 2px 0 #8a4e16;
}
@keyframes box-btn-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
.box-reveal-skip {
  border: 0;
  background: transparent;
  color: #cbb89a;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
