:root {
  color-scheme: dark;
  --bg: #070806;
  --panel: #11140f;
  --panel-2: #191e16;
  --line: #2c3328;
  --accent: #3ee27f;
  --accent-2: #c8f25c;
  --text: #f6f8ef;
  --muted: #9ba592;
  --danger: #ff6b6b;
  --warn: #ffd166;
  --bottom-browser-bar-gap: 0px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: #111;
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  overflow-x: hidden;
  overscroll-behavior: none;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(62, 226, 127, 0.12), transparent 240px),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", Arial, sans-serif;
  overflow-x: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
}

body.dialog-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

button,
a,
select {
  touch-action: manipulation;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071006;
  font-weight: 700;
  cursor: pointer;
}

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

input,
select {
  width: 100%;
  min-height: 44px;
  margin: 6px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
  color: var(--text);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

small,
label,
.eyebrow,
.section-title p,
.card p,
.wallet-status {
  color: var(--muted);
}

.app-shell {
  width: min(100%, 430px);
  max-width: 430px;
  min-width: 0;
  min-height: 100vh;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top) + 14px)
    14px
    calc(env(safe-area-inset-bottom) + var(--bottom-browser-bar-gap) + 86px);
  overflow-x: hidden;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -14px -14px 12px;
  padding: calc(env(safe-area-inset-top) + 14px) 14px 12px;
  background: rgba(7, 8, 6, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-header > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0;
}

.language-chip {
  display: grid;
  gap: 3px;
  flex: 0 0 112px;
  font-size: 12px;
  position: relative;
  z-index: 8;
}

.language-chip select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.language-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(6, 10, 8, 0.92);
  box-shadow: inset 0 0 0 1px rgba(62, 226, 127, 0.08);
}

.language-toggle button {
  min-height: 34px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.language-toggle button + button {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.language-toggle button.active {
  background: linear-gradient(135deg, rgba(62, 226, 127, 0.22), rgba(200, 242, 92, 0.16));
  color: var(--text);
}

.screen {
  display: none;
  animation: screen-in 160ms ease-out;
}

.screen.active {
  display: block;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-panel,
.wallet-card,
.announcement,
.action-notice,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(25, 30, 22, 0.98), rgba(13, 16, 12, 0.98));
}

.home-stack {
  display: grid;
  gap: 12px;
}

.home-banner {
  display: grid;
  gap: 8px;
}

.home-banner-slide {
  position: relative;
  display: grid;
  min-height: 156px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(62, 226, 127, 0.3), rgba(10, 14, 12, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 18px),
    #11170f;
}

.home-banner-slide.cyan {
  background:
    linear-gradient(135deg, rgba(78, 197, 255, 0.26), rgba(10, 14, 12, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 18px),
    #0d1416;
}

.home-banner-slide.gold {
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.28), rgba(10, 14, 12, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 18px),
    #17140d;
}

.home-banner-slide::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 86px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 14px, rgba(255, 255, 255, 0.14) 14px 15px, transparent 15px 28px),
    linear-gradient(180deg, transparent 0 14px, rgba(255, 255, 255, 0.14) 14px 15px, transparent 15px 28px);
  opacity: 0.75;
}

.banner-copy {
  position: relative;
  z-index: 1;
  max-width: 265px;
}

.banner-copy span {
  display: block;
  margin-bottom: 8px;
  color: rgba(246, 248, 239, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.banner-copy h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.banner-copy p {
  margin: 0;
  color: #dbe5d5;
  line-height: 1.5;
}

.home-banner-slide > strong {
  position: relative;
  z-index: 1;
  align-self: end;
  width: fit-content;
  margin-top: 16px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 13px;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.banner-dots button {
  width: 22px;
  min-height: 8px;
  padding: 0;
  border-radius: 999px;
  background: var(--line);
}

.banner-dots button.active {
  width: 34px;
  background: var(--accent);
}

.home-section {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(25, 30, 22, 0.98), rgba(13, 16, 12, 0.98));
  overflow: hidden;
}

.home-section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.home-section-title > div {
  min-width: 0;
}

.home-section-title h2,
.home-section-title p {
  margin: 0;
}

.home-section-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.home-section-title button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  background: #0b0e0a;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 12px;
}

.home-package-list,
.leaderboard-list {
  display: grid;
  gap: 10px;
}

.home-package-pair {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.home-package-card-v6 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
  overflow: hidden;
}

.home-package-half {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 132px;
  padding: 9px;
}

.home-package-half + .home-package-half {
  border-left: 1px solid var(--line);
}

.home-package-half h3 {
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.2;
}

.home-package-half strong {
  display: block;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.1;
}

.home-package-half span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.home-package-half button {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  margin-top: auto;
  padding: 5px 2px;
  font-size: 12px;
}

.home-static-packages {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.home-static-package {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 126px !important;
  padding: 8px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: #0b0e0a !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.home-static-package h3 {
  margin: 0 0 4px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.home-static-package strong {
  display: block !important;
  color: var(--accent) !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.home-static-package span {
  display: block !important;
  margin-top: 4px !important;
  color: var(--muted) !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.home-static-package button {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  margin-top: auto !important;
  padding: 5px 2px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  color: #071006 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

#homePackageList,
#homePackageCards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.home-package-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
  gap: 8px !important;
  max-width: 100% !important;
}

.home-package-list .card {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  width: 100% !important;
  min-height: 126px !important;
  margin-top: 0 !important;
  padding: 9px !important;
  overflow: hidden !important;
}

.home-package-list .card .card-head {
  display: block !important;
}

.home-package-list .card .card-head h3 {
  margin: 0 0 5px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.home-package-list .card .card-head span {
  display: block !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
}

.home-package-list .card p {
  margin: 4px 0 0 !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
}

.home-package-list .card button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 32px !important;
  margin-top: auto !important;
  padding: 6px 4px !important;
  font-size: 12px !important;
}

.home-package-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  min-height: 136px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
  overflow: hidden;
}

.home-package-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-package-card strong {
  display: block;
  color: var(--accent);
  font-size: 16px;
  line-height: 1.1;
}

.home-package-card span,
.home-package-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.home-package-card small {
  color: var(--danger);
}

.home-package-card button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  margin-top: auto;
  padding: 7px 4px;
  font-size: 12px;
}

.package-mini-card {
  align-content: start;
  min-width: 0;
  padding: 10px;
}

.package-mini-card .card-head {
  grid-template-columns: 1fr;
  gap: 4px;
}

.package-mini-card h3 {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.25;
}

.package-mini-card .card-head span {
  font-size: 15px;
}

.package-mini-card p {
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.package-mini-card button {
  width: 100%;
  min-height: 36px;
  margin-top: 4px;
  padding: 8px;
  font-size: 13px;
}

.auth-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.home-trend .roadmap-toolbar {
  margin-bottom: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
}

.rank-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(62, 226, 127, 0.14);
  color: var(--accent);
  font-weight: 800;
}

.leaderboard-row div {
  min-width: 0;
}

.leaderboard-row strong,
.leaderboard-row small {
  display: block;
}

.leaderboard-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.leaderboard-row em {
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.hero-panel {
  padding: 18px;
}

.hero-panel p {
  margin-bottom: 16px;
  color: #c6d0bf;
  line-height: 1.55;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-stats div {
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d110c;
}

.quick-stats span {
  display: block;
  color: var(--accent);
  font-weight: 800;
}

.quick-stats small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.announcement,
.action-notice,
.wallet-card,
.card {
  margin-top: 12px;
  padding: 14px;
}

.announcement strong,
strong {
  color: var(--accent);
}

.announcement p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.announcement {
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 210, 80, 0.2);
  background: linear-gradient(90deg, rgba(255, 244, 195, 0.12), rgba(79, 226, 127, 0.08));
}

.announcement-toggle {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #eaf7dc;
  text-align: left;
}

.announcement-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 224, 92, 0.2);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 246, 158, 0.95), rgba(255, 190, 56, 0.9) 48%, rgba(72, 207, 108, 0.82));
  color: #123215;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 18px rgba(0, 0, 0, 0.22);
  line-height: 1;
}

.announcement-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.announcement-icon path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.announcement-preview {
  min-width: 0;
  overflow: hidden;
  color: #d9e8d0;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-caret {
  color: #78f0a1;
  font-size: 20px;
  font-weight: 900;
  text-align: right;
}

.announcement-content {
  padding: 0 12px 12px 54px;
}

.announcement-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

.announcement-dialog[hidden] {
  display: none;
}

.announcement-dialog-panel {
  width: min(420px, 100%);
  max-height: min(76vh, 620px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 224, 92, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #102016, #09100c);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.announcement-dialog-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.announcement-dialog-head strong {
  min-width: 0;
  color: #f3ffd9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-dialog-head button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.announcement-dialog-panel p {
  margin: 14px 0 0;
  color: #dbe8d1;
  line-height: 1.7;
  white-space: pre-wrap;
}

.action-notice {
  position: sticky;
  top: 74px;
  z-index: 4;
  border-color: rgba(78, 197, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(20, 34, 35, 0.98), rgba(9, 13, 12, 0.98)),
    #0b0e0a;
  color: #dff7ff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.action-notice.error {
  border-color: rgba(255, 107, 107, 0.45);
  background:
    linear-gradient(180deg, rgba(54, 22, 22, 0.98), rgba(13, 9, 9, 0.98)),
    #0b0e0a;
  color: var(--danger);
}

.app-dialog {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.62);
  box-sizing: border-box;
}

.app-dialog[hidden] {
  display: none;
}

.app-dialog-panel {
  width: min(calc(100vw - 44px), 330px);
  max-width: calc(100vw - 44px);
  box-sizing: border-box;
  border: 1px solid rgba(62, 226, 127, 0.3);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(24, 34, 22, 0.98), rgba(7, 11, 8, 0.98)),
    var(--panel);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

.app-dialog-panel strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 18px;
}

.app-dialog-panel p {
  margin: 0 0 16px;
  color: #dfe8d8;
  line-height: 1.55;
}

.app-dialog-input {
  width: 100%;
  min-height: 44px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(62, 226, 127, 0.32);
  border-radius: 8px;
  box-sizing: border-box;
  background: rgba(6, 12, 8, 0.92);
  color: var(--text);
  outline: none;
}

.app-dialog-input:focus {
  border-color: rgba(62, 226, 127, 0.68);
  box-shadow: 0 0 0 3px rgba(62, 226, 127, 0.12);
}

.app-dialog-panel button {
  width: 100%;
}

.app-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.app-dialog-panel .app-dialog-actions button {
  width: 100%;
}

.section-title {
  display: grid;
  gap: 4px;
  margin: 6px 0 12px;
}

.block-heading {
  margin: 18px 0 10px;
  font-size: 16px;
}

.section-title.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
}

.section-title.compact span {
  max-width: 46%;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  word-break: break-all;
}

.wallet-status {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
  line-height: 1.45;
}

.button-row,
.home-actions,
.withdraw-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.grid,
.stack,
.rules-grid {
  display: grid;
  gap: 12px;
}

.card-head,
.row-card {
  display: grid;
  gap: 12px;
}

.card-head {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.card-head span {
  color: var(--accent);
  font-weight: 800;
}

.plans {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.rule-guide-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(88, 255, 160, 0.24);
  border-radius: 8px;
  background: rgba(7, 19, 13, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.rule-guide-panel.compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px;
}

.rule-guide-head {
  display: grid;
  gap: 6px;
}

.rule-guide-head h3,
.rule-guide-grid h4 {
  margin: 0;
  color: var(--accent);
}

.rule-guide-head p,
.rule-guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.rule-guide-grid > div,
.rule-package-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.rule-package-list {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rule-package-list.top {
  padding-top: 0;
  padding-bottom: 12px;
  border-top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rule-package-row {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.rule-package-row strong {
  color: var(--text);
}

.rule-package-row span {
  overflow-wrap: anywhere;
}

.rule-guide-open,
.rule-inline-button {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(88, 255, 160, 0.28);
  background: rgba(62, 226, 127, 0.08);
  color: var(--accent);
  box-shadow: none;
}

.rule-inline-button {
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
}

.rule-dialog-panel {
  width: min(92vw, 430px);
  max-height: min(84vh, 720px);
}

.rule-dialog-body {
  display: grid;
  gap: 14px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 10px 2px;
}

.rule-dialog .app-dialog-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.rule-dialog .app-dialog-actions {
  grid-template-columns: 1fr;
  justify-items: center;
}

.rule-dialog .app-dialog-actions button {
  width: auto;
  min-width: min(100%, 260px);
  max-width: 100%;
  padding-inline: 18px;
  white-space: nowrap;
}

.order-detail-panel {
  max-height: min(86vh, 760px);
}

.order-detail-body {
  display: grid;
  gap: 14px;
  max-height: min(62vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 10px 2px;
}

.order-detail-summary,
.order-detail-section,
.order-detail-round,
.order-bet-row {
  display: grid;
  gap: 8px;
}

.order-detail-summary h3,
.order-detail-section h4 {
  margin: 0;
  color: var(--accent);
}

.order-detail-summary p,
.order-detail-round span,
.order-bet-row span,
.order-detail-section .muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.order-detail-round,
.order-bet-row {
  padding: 10px;
  border: 1px solid rgba(88, 255, 160, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.order-bet-list {
  display: grid;
  gap: 10px;
}

.order-bet-row strong,
.order-detail-round strong {
  color: var(--text);
}

.order-detail-body code {
  overflow-wrap: anywhere;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.actions button:only-child {
  grid-column: 1 / -1;
}

.order-group {
  display: grid;
  gap: 10px;
}

.order-group + .order-group {
  margin-top: 18px;
}

.order-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.order-toolbar button {
  min-height: 34px;
  padding: 8px 12px;
  white-space: nowrap;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.group-title h3 {
  margin: 0;
  font-size: 16px;
}

.group-title span {
  color: var(--muted);
  font-size: 13px;
}

.history-toggle {
  min-height: 34px;
  padding: 8px 12px;
  white-space: nowrap;
}

.history-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(62, 226, 127, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(62, 226, 127, 0.055), rgba(255, 255, 255, 0.018));
}

.history-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.history-summary span {
  color: var(--muted);
  font-size: 13px;
}

.history-summary button {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}

.history-line {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid rgba(62, 226, 127, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(62, 226, 127, 0.055), rgba(255, 255, 255, 0.018));
  color: var(--text);
  text-align: left;
}

.history-line span,
.history-line small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-line small {
  color: var(--muted);
}

.copy-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
}

.copy-line span {
  min-width: 0;
  color: var(--muted);
}

.copy-line code {
  color: var(--text);
  word-break: break-all;
}

.copy-line button {
  min-height: 36px;
  padding: 8px 12px;
}

.team-invite-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(62, 226, 127, 0.24);
  border-radius: 8px;
  background: #0b0e0a;
}

.team-invite-box span,
.team-invite-main {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.team-invite-box strong,
.team-invite-main strong {
  display: block;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-invite-box button {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}

.team-copy-line code {
  overflow-wrap: anywhere;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-right: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(62, 226, 127, 0.36);
  border-radius: 8px;
  background: rgba(62, 226, 127, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.filter-bar {
  margin-bottom: 12px;
}

.filter-bar > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.order-status-dropdown {
  position: relative;
  z-index: 6;
}

.order-status-toggle {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-color: var(--line);
  background: #0b0e0a;
  color: var(--text);
  text-align: left;
}

.order-status-toggle strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-status-toggle em {
  color: var(--muted);
  font-style: normal;
  font-size: 18px;
}

.order-status-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  max-height: min(56vh, 430px);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(62, 226, 127, 0.28);
  border-radius: 8px;
  background: #07100b;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
}

.order-status-menu[hidden] {
  display: none;
}

.order-status-menu button {
  min-height: 42px;
  justify-content: flex-start;
  padding: 9px 12px;
  border-color: rgba(62, 226, 127, 0.16);
  background: #0b0e0a;
  color: var(--text);
  text-align: left;
}

.order-status-menu button.active {
  border-color: rgba(62, 226, 127, 0.62);
  background: rgba(62, 226, 127, 0.15);
  color: var(--accent);
}

.trend {
  display: grid;
  gap: 10px;
}

.hash-lottery-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(62, 226, 127, 0.24);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(18, 27, 18, 0.98), rgba(7, 10, 7, 0.98)),
    #090c08;
}

.hash-lottery-panel.compact {
  padding: 9px;
}

.hash-lottery-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.lottery-side {
  min-width: 0;
}

.lottery-side.right {
  text-align: right;
}

.lottery-side span,
.lottery-side small,
.hash-preview small,
.trend-headline span,
.trend-headline code,
.hash-progress-row {
  color: var(--muted);
  font-size: 11px;
}

.lottery-side span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.lottery-side.right span {
  justify-content: flex-end;
}

.lottery-side strong {
  display: block;
  margin-top: 5px;
  color: #4ec5ff;
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.lottery-side small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lottery-side b,
.trend-headline i {
  color: var(--accent);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.hash-preview {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 0;
}

.hash-ring {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #10140e;
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.05);
  color: var(--warn);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hash-ring.even {
  color: var(--accent);
}

.hash-preview small {
  width: 76px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-token {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #071006;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.trend-token.odd {
  background: var(--warn);
}

.trend-token.even {
  background: var(--accent);
}

.hash-progress-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.hash-progress {
  height: 7px;
  border-radius: 999px;
  background: #080b07;
  overflow: hidden;
}

.hash-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4ec5ff, var(--accent));
  transition: width 0.25s ease;
}

.trend-headline {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080b07;
}

.trend-headline strong {
  color: var(--text);
  font-size: 14px;
}

.trend-headline em,
.trend-headline b {
  margin: 0 2px;
  font-style: normal;
  font-weight: 800;
}

.trend-headline em {
  color: var(--warn);
}

.trend-headline b {
  color: var(--accent);
}

.trend-headline code {
  justify-self: end;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roadmap-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #0d110c;
}

.roadmap-toolbar strong,
.roadmap-toolbar span {
  display: block;
}

.roadmap-toolbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.roadmap-legend {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.road-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 800;
}

.roadmap-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080b07;
  scrollbar-color: var(--accent) #080b07;
  scrollbar-width: thin;
}

.roadmap-scroll::-webkit-scrollbar {
  height: 8px;
}

.roadmap-scroll::-webkit-scrollbar-track {
  background: #080b07;
}

.roadmap-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--accent);
}

.roadmap-grid {
  display: grid;
  grid-template-rows: repeat(6, 44px);
  grid-auto-flow: column;
  gap: 0;
  min-width: max-content;
  padding: 8px;
}

.roadmap-bg {
  width: 44px;
  height: 44px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.road-cell {
  z-index: 1;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #10140e;
  color: var(--text);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.road-cell.latest {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(62, 226, 127, 0.12);
}

.road-cell strong {
  line-height: 1;
  font-size: 15px;
}

.road-cell small {
  margin-top: -2px;
  font-size: 9px;
  color: currentColor;
}

.road-dot.odd,
.road-cell.odd {
  color: var(--warn);
}

.road-dot.even,
.road-cell.even {
  color: var(--accent);
}

.lottery-road-panel {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px 0 0;
  overflow: hidden;
}

.home-trend {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.lottery-road-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.lottery-road-side {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.lottery-road-side.right {
  justify-items: end;
  text-align: right;
}

.lottery-road-side span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.lottery-road-side strong {
  color: #4382ff;
  font-size: 20px;
  line-height: 1;
}

.lottery-road-side small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.lottery-road-side small em {
  color: #dbe6ff;
  font-style: normal;
  font-weight: 700;
}

.lottery-road-side button,
.lottery-road-title button {
  min-height: 28px;
  padding: 5px 7px;
  border: 1px solid rgba(67, 130, 255, 0.45);
  background: #316cff;
  color: #fff;
  font-size: 12px;
}

.road-badge {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.road-badge.odd,
.lottery-road-cell.odd {
  background: #12c7b4;
}

.road-badge.even,
.lottery-road-cell.even {
  background: #ff4052;
}

.lottery-countdown {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(78, 197, 255, 0.22);
  border-radius: 8px;
  background: rgba(78, 197, 255, 0.08);
  text-align: center;
}

.countdown-ring {
  --progress: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #10140f 59%, transparent 61%),
    conic-gradient(#4f7fff var(--progress), rgba(255, 255, 255, 0.16) 0);
}

.countdown-ring strong {
  min-width: 2ch;
  color: var(--text);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

.lottery-countdown small {
  max-width: 118px;
  color: #dbe6ff;
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lottery-countdown .draw-result-line {
  display: block;
  max-width: 132px;
  color: var(--warn);
}

.lottery-countdown .draw-result-line.even {
  color: var(--accent);
}

.lottery-road-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.lottery-road-title strong {
  color: #2f72ff;
  font-size: 16px;
}

.lottery-road-title span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.lottery-road-title em {
  color: #12c7b4;
  font-style: normal;
}

.lottery-road-title b {
  color: #ff4052;
}

.lottery-road-title div {
  display: flex;
  gap: 6px;
  grid-column: 1 / -1;
  justify-content: end;
  min-width: 0;
}

.lottery-road-scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.lottery-road-grid {
  display: grid;
  grid-template-rows: repeat(6, 32px);
  grid-auto-flow: column;
  gap: 0;
  min-width: max-content;
  min-height: 64px;
}

.lottery-road-grid.empty {
  display: flex;
  align-items: center;
  min-width: 100%;
}

.road-empty {
  color: var(--muted);
  font-size: 12px;
}

.road-loading {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lottery-road-cell {
  display: grid;
  width: 26px;
  height: 26px;
  min-height: 26px;
  place-self: center;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(62, 226, 127, 0.08);
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.status-rejected,
.status-rejected_claim,
.status-expired,
.status-cancelled {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.08);
  color: var(--danger);
}

.status-pending_review,
.status-payment_confirming,
.status-payout_pending_funds,
.status-cooling_down {
  color: var(--warn);
}

.cooldown-countdown {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid rgba(78, 197, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 34, 35, 0.96), rgba(9, 13, 12, 0.96)),
    #0b0e0a;
  color: #dff7ff;
  font-weight: 700;
}

.cooldown-countdown strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cooldown-countdown small {
  color: #b8d7e2;
  font-weight: 500;
}

.bet-progress {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid rgba(78, 197, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 34, 35, 0.96), rgba(9, 13, 12, 0.96)),
    #0b0e0a;
  color: #dff7ff;
  font-weight: 700;
}

.claim-evidence-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 18px 14px calc(env(safe-area-inset-bottom) + 18px);
  background: rgba(0, 0, 0, 0.62);
}

.claim-evidence-dialog[hidden] {
  display: none;
}

.claim-evidence-panel {
  display: grid;
  gap: 12px;
  width: min(100%, 430px);
  max-height: min(78vh, 620px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(78, 197, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 27, 28, 0.99), rgba(7, 9, 8, 0.99)),
    var(--panel);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
}

.claim-evidence-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.claim-evidence-head p {
  margin: 4px 0 0;
  color: #b8d7e2;
  line-height: 1.45;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #0b0e0a;
  color: var(--text);
}

.claim-upload-button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 116px;
  padding: 14px;
  border: 1px dashed rgba(78, 197, 255, 0.55);
  border-radius: 8px;
  background: rgba(78, 197, 255, 0.08);
  color: #dff7ff;
}

.claim-evidence-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.claim-upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.claim-upload-actions label {
  position: relative;
  display: grid;
  min-height: 48px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #34f176, #b8ff4a);
  color: #07100e;
  font-weight: 800;
  cursor: pointer;
}

.claim-upload-button span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(78, 197, 255, 0.5);
  border-radius: 50%;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.claim-upload-button small {
  color: #b8d7e2;
}

.claim-evidence-files {
  display: grid;
  gap: 8px;
}

.claim-evidence-files > p,
.claim-evidence-file {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
}

.claim-evidence-file {
  display: grid;
  gap: 4px;
}

.claim-evidence-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid rgba(78, 197, 255, 0.22);
  border-radius: 8px;
  background: #050806;
}

.claim-evidence-file strong,
.claim-evidence-file span,
.claim-evidence-file small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.claim-evidence-file span,
.claim-evidence-file small {
  color: var(--muted);
  font-size: 12px;
}

.claim-evidence-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-text {
  color: var(--danger);
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.review-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.review-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.review-list .pass {
  color: var(--accent);
}

.review-list .fail {
  color: var(--danger);
}

.detail-box {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
  color: var(--muted);
  font-size: 12px;
}

.detail-box code,
.record-item code {
  color: var(--muted);
  word-break: break-word;
}

.inline-copy {
  display: inline;
  min-height: 0;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  word-break: keep-all;
}

.inline-copy:hover {
  color: var(--text);
  background: transparent;
}

.record-line {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(62, 226, 127, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(62, 226, 127, 0.055), rgba(255, 255, 255, 0.018));
}

.record-line + .record-line {
  margin-top: 8px;
}

.record-line span {
  color: var(--text);
}

.record-line small {
  color: var(--muted);
}

.record-item {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.record-item .record-line {
  border-color: rgba(62, 226, 127, 0.1);
}

.account-card {
  display: grid;
  gap: 12px;
}

.account-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.account-head h3,
.account-head p {
  margin: 0;
}

.account-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.account-meta,
.balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-meta div,
.balance-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
}

.account-meta span,
.balance-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.account-meta strong,
.balance-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 16px;
  word-break: break-word;
}

.record-group {
  display: grid;
  gap: 8px;
}

.record-group + .record-group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.record-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.team-stats div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
}

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

.team-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 18px;
}

.team-list-card {
  padding: 12px;
}

.team-section-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e0a;
  color: var(--text);
  text-align: left;
}

.team-section-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-section-toggle strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(62, 226, 127, 0.12);
  color: var(--accent);
  font-size: 14px;
}

.team-section-toggle em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  white-space: nowrap;
}

.team-member-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.team-member-list .record-line small {
  overflow-wrap: anywhere;
}

.team-list-empty {
  margin: 12px 4px 2px;
}

.rules-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 430px);
  max-width: 430px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 9, 0.94);
  backdrop-filter: blur(18px);
}

@supports (-webkit-touch-callout: none) {
  html,
  body {
    height: 100%;
  }

  body {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell {
    min-height: 100%;
  }
}

.bottom-nav button {
  min-height: 50px;
  padding: 8px 4px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  pointer-events: auto;
}

.bottom-nav button span {
  pointer-events: none;
}

.bottom-nav button.active {
  background: rgba(62, 226, 127, 0.13);
  color: var(--accent);
}

@media (max-width: 390px) {
  .app-shell {
    padding:
      calc(env(safe-area-inset-top) + 10px)
      10px
      calc(env(safe-area-inset-bottom) + var(--bottom-browser-bar-gap) + 76px);
  }

  .app-header {
    margin: -10px -10px 10px;
    padding: calc(env(safe-area-inset-top) + 10px) 10px 10px;
  }

  h1 {
    font-size: 21px;
  }

  h2 {
    font-size: 18px;
  }

  button {
    padding: 10px 12px;
  }

  .home-banner-slide {
    min-height: 136px;
    padding: 14px;
  }

  .home-banner-slide::after {
    right: 10px;
    bottom: 10px;
    width: 68px;
    height: 44px;
  }

  .banner-copy {
    max-width: 230px;
  }

  .banner-copy h2 {
    font-size: 21px;
  }

  .banner-copy p {
    font-size: 13px;
  }

  .home-section {
    padding: 12px;
  }

  .home-section-title {
    align-items: center;
  }

  .home-package-list {
    gap: 8px;
  }

  .package-mini-card {
    padding: 9px;
  }

  .package-mini-card h3 {
    font-size: 13px;
  }

  .package-mini-card .card-head span,
  .package-mini-card strong {
    font-size: 14px;
  }

  .package-mini-card p {
    font-size: 11px;
  }

  .package-mini-card button {
    min-height: 34px;
    font-size: 12px;
  }

  .rule-guide-panel {
    padding: 12px;
  }

  .rule-guide-panel.compact {
    grid-template-columns: 1fr;
  }

  .rule-guide-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .leaderboard-row em {
    grid-column: 2;
    justify-self: start;
    font-size: 13px;
  }

  .copy-line {
    grid-template-columns: 1fr;
  }

  .copy-line button {
    width: 100%;
  }

  .team-invite-box {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    padding: 10px;
  }

  .team-invite-box button {
    width: auto;
    min-height: 34px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .actions,
  .button-row,
  .withdraw-form {
    grid-template-columns: 1fr;
  }

  .roadmap-grid {
    grid-template-rows: repeat(6, 38px);
  }

  .roadmap-bg {
    width: 38px;
    height: 38px;
  }

  .road-cell {
    width: 30px;
    height: 30px;
    min-height: 30px;
  }

  .bottom-nav {
    padding: 7px 8px calc(env(safe-area-inset-bottom) + 7px);
  }

  .bottom-nav button {
    min-height: 46px;
    font-size: 11px;
  }
}

@media (max-width: 340px) {
  .team-stats,
  .account-meta,
  .balance-grid {
    grid-template-columns: 1fr;
  }

  .language-chip {
    flex-basis: 70px;
  }
}

@media (min-width: 760px) {
  body {
    background:
      radial-gradient(circle at top, rgba(62, 226, 127, 0.14), transparent 360px),
      #10110f;
  }

  .app-shell {
    margin-top: 18px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: var(--bg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    overflow: hidden;
  }

  .bottom-nav {
    border-radius: 0 0 28px 28px;
  }
}

/* Home package layout: package 1 and package 2 share the full row equally. */
#screen-home #homeStaticPackageRow {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: #0b0e0a !important;
  overflow: hidden !important;
}

#screen-home #homeStaticPackageRow > .home-package-combo-half {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: 112px !important;
  padding: 8px !important;
  overflow: hidden !important;
}

#screen-home #homeStaticPackageRow > .home-package-combo-half + .home-package-combo-half {
  z-index: 2 !important;
  border-left: 1px solid var(--line) !important;
  background: #0b0e0a !important;
}

#screen-home #homeStaticPackageRow h3 {
  margin: 0 0 4px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

#screen-home #homeStaticPackageRow strong {
  display: block !important;
  color: var(--accent) !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

#screen-home #homeStaticPackageRow span {
  display: block !important;
  margin-top: 4px !important;
  color: var(--muted) !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#screen-home #homeStaticPackageRow button {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 28px !important;
  margin-top: auto !important;
  padding: 5px 2px !important;
  font-size: 11px !important;
  overflow: hidden !important;
}
