:root {
  --app-max: 430px;
  --brand: #0f8a5f;
  --brand-deep: #0b6b49;
  --brand-soft: #e9f8f1;
  --ink: #171b25;
  --ink-soft: #464b56;
  --muted: #6b707a;
  --line: #e9eaee;
  --surface: #ffffff;
  --canvas: #f8f7f5;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --shadow-card: 0 2px 10px rgba(31, 25, 28, .035), 0 1px 1px rgba(31, 25, 28, .02);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  touch-action: pan-x pan-y;
}

.responsive-picture { display: contents; }
.responsive-picture source { display: none; }

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 620px at 15% -12%, rgba(255, 255, 255, .9), transparent 62%),
    #eae8e4;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: pan-x pan-y;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid rgba(16, 116, 255, .55);
  outline-offset: 2px;
}

.hero :focus-visible {
  outline-color: rgba(16, 116, 255, .55);
}

.hero-title:focus,
.screen-title:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  position: relative;
  width: 100%;
  max-width: var(--app-max);
  min-height: 100dvh;
  margin-inline: auto;
  background: var(--canvas);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: visible;
  padding-top: max(4px, calc(env(safe-area-inset-top, 0px) + 4px));
  padding-bottom: 26px;
  color: var(--ink);
  border-radius: 0;
  background: transparent;
}

.home-greeting {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px 2px;
}

.home-greeting-logo {
  display: block;
  width: auto;
  height: 60px;
  flex: none;
  object-fit: contain;
}

.home-greeting-users {
  display: flex;
  flex: none;
  align-self: flex-end;
  align-items: baseline;
  gap: 6px;
  margin-left: auto;
  margin-bottom: 12px;
  color: #e9183a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 370px) {
  .home-greeting {
    gap: 5px;
    padding-inline: 12px;
  }

  .home-greeting-logo {
    height: 50px;
  }

  .home-greeting-users {
    font-size: 15px;
  }
}

@media (min-width: 371px) and (max-width: 379px) {
  .home-greeting {
    gap: 5px;
    padding-inline: 12px;
  }

  .home-greeting-logo {
    height: 56px;
  }

  .home-greeting-users {
    font-size: 15px;
  }
}

@media (min-width: 380px) and (max-width: 389px) {
  .home-greeting {
    gap: 5px;
    padding-inline: 14px;
  }

  .home-greeting-logo {
    height: 56px;
  }

  .home-greeting-users {
    font-size: 15px;
  }
}

.hero::before {
  content: none;
  position: absolute;
  z-index: 0;
  top: 18px;
  right: -124px;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 36%, rgba(255, 226, 160, .48), rgba(255, 177, 88, .14) 40%, transparent 69%);
  pointer-events: none;
}

.hero::after {
  content: none;
  position: absolute;
  z-index: 0;
  bottom: -64px;
  left: -56px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 89, .25), transparent 68%);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  border-radius: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  filter: drop-shadow(0 3px 4px rgba(80, 50, 20, .16));
}

.brand-copy {
  display: block;
  min-width: 0;
}

.brand-copy strong {
  display: block;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .055em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .1em;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  position: relative;
  display: flex;
  width: 38px;
  min-height: 43px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  border-radius: 10px;
  color: #555c66;
  background: transparent;
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out);
}

.icon-btn-art {
  position: relative;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
}

.icon-btn svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-label {
  color: #666d77;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .04em;
  white-space: nowrap;
}

.icon-btn:active {
  transform: scale(.92);
  background: rgba(23, 26, 35, .07);
}

.notification-dot {
  position: absolute;
  top: 0;
  right: 1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffcf62;
  box-shadow: 0 0 0 2px #f8f7f5;
}

.hero-body {
  position: relative;
  z-index: 1;
  min-height: clamp(260px, 65vw, 280px);
  margin: 14px 14px 0;
  padding: 23px 18px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 26px;
  background:
    radial-gradient(112% 96% at 92% 3%, rgba(255, 199, 108, .62) 0%, transparent 54%),
    radial-gradient(90% 74% at 22% 6%, rgba(255, 255, 255, .66) 0%, transparent 62%),
    linear-gradient(135deg, #fff9ed 0%, #ffebcf 54%, #ffd3a6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88), 0 18px 34px rgba(105, 0, 20, .22);
}

.hero-body::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 30px;
  right: -56px;
  width: 258px;
  height: 258px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 205, 113, .48), transparent 66%);
  pointer-events: none;
}

.hero-body::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -35px;
  bottom: -50px;
  width: 258px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 187, 97, .3), transparent 68%);
  pointer-events: none;
}

.hero-body.hero-body--banner {
  min-height: 0;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: #0b2a45;
  box-shadow: 0 14px 30px rgba(35, 24, 25, .16);
}

.hero-body--banner::before,
.hero-body--banner::after {
  display: none;
}

.hero-banner-btn {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: inherit;
  transition: opacity .16s var(--ease-out);
}

.hero-banner-btn:active {
  opacity: .95;
}

.hero-banner {
  display: block;
  width: 100%;
  height: auto;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: 62%;
  max-width: 246px;
  padding-bottom: 22px;
}

.hero-title {
  margin: 0;
  color: #ea1237;
  font-size: clamp(31px, 8.8vw, 38px);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -.05em;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .72), 0 9px 16px rgba(178, 23, 32, .12);
}

.hero-title span,
.hero-title em {
  display: block;
}

.hero-title em {
  margin-top: 8px;
  color: #342421;
  font-size: .56em;
  font-style: normal;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.025em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
  margin-top: 12px;
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #53312c;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

.check {
  display: grid;
  width: 14px;
  height: 14px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #1bb37a, #0b6f4d 70%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), 0 1px 2px rgba(10, 90, 60, .18);
}

.check svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0 17px 0 20px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(100deg, #1bb37a 0%, #0f8a5e 55%, #0b6f4d 100%);
  box-shadow: 0 9px 18px rgba(10, 90, 60, .26), inset 0 1px 1px rgba(255, 255, 255, .35);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.hero-cta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-cta:active {
  transform: scale(.97);
  box-shadow: 0 4px 12px rgba(143, 0, 24, .22);
}

.hero-art {
  position: absolute;
  z-index: 2;
  right: -3px;
  bottom: -12px;
  width: min(64%, 260px);
  height: auto;
  filter: drop-shadow(0 13px 16px rgba(101, 17, 18, .19));
  pointer-events: none;
}

.hero-coin {
  position: absolute;
  z-index: 1;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #fff1ae;
  border-radius: 50%;
  color: #aa650b;
  background:
    radial-gradient(circle at 34% 25%, #fffbd2 0%, #ffdf7f 38%, #ffc24c 64%, #eaa12e 100%);
  box-shadow: inset 0 0 0 2px #e2a332, 0 5px 9px rgba(154, 74, 0, .22);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  pointer-events: none;
}

.coin-a {
  top: 17px;
  right: 26%;
  width: 27px;
  font-size: 14px;
  transform: rotate(-18deg);
}

.coin-b {
  top: 92px;
  right: 6%;
  width: 19px;
  font-size: 10px;
  transform: rotate(16deg);
}

.coin-c {
  right: 38%;
  bottom: 44px;
  width: 22px;
  font-size: 11px;
  transform: rotate(-12deg);
}

.main {
  position: relative;
  z-index: 2;
  padding: 0 16px calc(92px + var(--safe-bottom));
}

.trust-strip {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: -18px;
  padding: 12px 5px;
  border: 1px solid rgba(25, 20, 22, .05);
  border-radius: 20px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 28px rgba(35, 24, 25, .08);
}

.trust-strip.trust-strip--banner {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.trust-banner {
  display: block;
  width: 100%;
  height: auto;
}

.promo-strip {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: -18px;
}

.promo-banner {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 2.6 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(35, 24, 25, .08);
}

.promo-banner--fit {
  object-fit: fill;
}

.promo-banner-btn {
  display: block;
  min-width: 0;
  padding: 0;
  border-radius: 14px;
  text-align: left;
}

.promo-banner-btn:active {
  opacity: .94;
}

.trust {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-inline: 2px;
}

.trust + .trust::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 28px;
  background: #eeedf0;
  transform: translateY(-50%);
}

.trust-icon {
  display: grid;
  width: 31px;
  height: 34px;
  flex: none;
  place-items: center;
}

.trust-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(49, 23, 17, .08));
}

.trust-copy {
  display: block;
  min-width: 0;
}

.trust-copy strong,
.trust-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trust-copy strong {
  color: #333842;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}

.trust-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.4;
}

.rules-section {
  margin-top: 14px;
  scroll-margin-top: 16px;
}

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

.section-head {
  padding: 0 2px;
  margin-bottom: 11px;
}

.section-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.section-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: none;
  place-items: center;
}

.section-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(167, 105, 22, .16));
}

.section-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.section-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.section-link {
  display: inline-flex;
  min-height: 34px;
  flex: none;
  align-items: center;
  gap: 1px;
  padding: 0 2px 0 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  transition: color .16s var(--ease-out), transform .16s var(--ease-out);
}

.section-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-link:active {
  color: var(--brand);
  transform: translateX(1px);
}

.section-note {
  flex: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.rules-section--secondary {
  padding-top: 2px;
}

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

.game-card,
.rule-item {
  --accent: #c30f2c;
  --card-a: #ffe0e4;
  --card-b: #fff5f5;
  --art-a: #ff7a84;
  --art-b: #ec153f;
}

.theme-gold {
  --accent: #9a5a04;
  --card-a: #ffefd2;
  --card-b: #fffaef;
  --art-a: #fff2b5;
  --art-b: #ffb53d;
}

.theme-blue {
  --accent: #155eb5;
  --card-a: #e1f2ff;
  --card-b: #f4faff;
  --art-a: #91e3ff;
  --art-b: #1385f2;
}

.theme-violet {
  --accent: #7323a7;
  --card-a: #f2e1ff;
  --card-b: #fcf5ff;
  --art-a: #f0baff;
  --art-b: #c34ef4;
}

.theme-green {
  --accent: #0d7a52;
  --card-a: #dff5e9;
  --card-b: #f4fbf7;
  --art-a: #9aefc2;
  --art-b: #0f9d68;
}

.theme-orange {
  --accent: #a34e05;
  --card-a: #ffead4;
  --card-b: #fff9f1;
  --art-a: #ffd18a;
  --art-b: #ef8714;
}

.game-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 96px;
  align-items: center;
  gap: 8px;
  padding: 7px 22px 7px 7px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 19px;
  background: linear-gradient(115deg, var(--card-a), var(--card-b));
  box-shadow: 0 4px 12px rgba(70, 31, 34, .08);
  text-align: left;
  transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 14px;
  pointer-events: none;
}

.game-card:active {
  transform: scale(.97);
}

.game-card.has-photo {
  aspect-ratio: 600 / 350;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(115deg, var(--card-a), var(--card-b));
  box-shadow: 0 4px 12px rgba(70, 31, 34, .08);
}

.game-card.has-photo::after {
  display: none;
}

.game-cover {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

.game-coming {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(20, 26, 22, .62);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .02em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 14px;
  border: 1px solid rgba(28, 23, 25, .055);
  border-radius: 16px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  text-align: center;
}

.game-visual {
  position: relative;
  display: grid;
  width: 56px;
  height: 80px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--art-a), var(--art-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 8px rgba(81, 28, 31, .13);
}

.game-visual::before {
  content: "";
  position: absolute;
  top: -15px;
  right: -12px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}

.game-icon {
  position: relative;
  z-index: 1;
  width: 96%;
  height: 96%;
  filter: drop-shadow(0 4px 4px rgba(75, 22, 28, .16));
}

.game-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.game-title,
.game-summary,
.game-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-title {
  color: var(--accent);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.game-summary {
  color: #453a3d;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.game-meta {
  color: #6c6367;
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.35;
}

.game-arrow {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 5px rgba(59, 20, 25, .16);
  transform: translateY(-50%);
}

.game-arrow svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.results-card {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(28, 23, 25, .055);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 16px;
}

.results-head {
  padding: 16px 16px 11px;
}

.results-head .section-copy p {
  margin-top: 3px;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 12px 14px;
}

.result-list .empty-state {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  background: #fafafb;
  border-color: transparent;
}

.result-list .result-row {
  min-width: 0;
  padding: 8px 9px 10px;
  border: 1px solid #e4f2ea;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f7fcf9);
}

.result-list .issue {
  gap: 5px;
}

.result-list .issue strong {
  font-size: 11.5px;
}

.result-list .issue small {
  font-size: 9px;
}

.result-list .result-main {
  margin-top: 6px;
}

.result-list .balls {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.result-list .ball {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  font-size: 13px;
}

.result-row {
  padding: 8px 14px 9px;
  border-top: 1px solid #f2f2f5;
}

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.issue {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.issue strong {
  overflow: hidden;
  color: #3a3f49;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue small {
  flex: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.group {
  flex: none;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
}

.group.is-a {
  color: #b34b00;
  background: #fff1e5;
}

.group.is-b {
  color: #1268c9;
  background: #eef6ff;
}

.group.is-c {
  color: #ca1935;
  background: #fff0f2;
}

.group.is-d {
  color: #08764f;
  background: #e9f9f1;
}

.group.is-e {
  color: #856000;
  background: #fff7dc;
}

.group.is-f {
  color: #6c32b2;
  background: #f5efff;
}

.group.is-g {
  color: #0b6b67;
  background: #e8faf8;
}

.group.is-h {
  color: #a03860;
  background: #fff0f5;
}

.group.is-i {
  color: #485364;
  background: #f0f3f7;
}

.group.is-j {
  color: #985b0b;
  background: #fff8e9;
}

.group.is-neutral {
  color: #626873;
  background: #f2f3f5;
}

.result-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.balls {
  display: flex;
  min-width: 0;
  flex: none;
  align-items: center;
  gap: 6px;
}

.ball {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #dcefe6;
  border-radius: 50%;
  color: #0f8a5f;
  background: linear-gradient(180deg, #fff, #f4fbf7);
  box-shadow: 0 1px 2px rgba(15, 100, 70, .055);
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.range {
  margin-left: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  padding: 14px 4px;
  border: 1px solid #d9efe4;
  border-radius: 20px;
  background: linear-gradient(100deg, #eefaf3 0%, #f7fdfa 55%, #edf8f2 100%);
  box-shadow: 0 4px 12px rgba(15, 120, 80, .05);
}

.stat {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 4px;
}

.stat + .stat::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 1px;
  background: #f1dfc5;
}

.stat-icon {
  display: grid;
  width: 31px;
  height: 35px;
  flex: none;
  place-items: center;
}

.stat-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(126, 82, 30, .08));
}

.stat-copy {
  display: block;
  min-width: 0;
  text-align: left;
}

.stat strong,
.stat small {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat strong {
  color: #0f8a5f;
  font-size: 19px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.stat small {
  margin-top: 1px;
  color: #7e6652;
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.3;
}

.screen {
  touch-action: pan-x pan-y;
}

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

.screen.is-active {
  animation: screen-enter .22s var(--ease-out) both;
}

@keyframes screen-enter {
  from {
    opacity: .5;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: max(18px, calc(env(safe-area-inset-top, 0px) + 10px)) 18px 50px;
  color: #fff;
  border-radius: 0 0 30px 30px;
  background:
    radial-gradient(90% 75% at 96% -2%, rgba(175, 255, 219, .38) 0%, transparent 56%),
    radial-gradient(110% 90% at 0% 100%, rgba(0, 92, 60, .44) 0%, transparent 64%),
    linear-gradient(145deg, #17a06b 0%, #0f8a5e 52%, #0b6f4d 100%);
}

.screen-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -104px;
  right: -92px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255, 230, 174, .2);
  border-radius: 50%;
  box-shadow: 0 0 0 20px rgba(255, 225, 165, .045);
  pointer-events: none;
}

.screen-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  bottom: -100px;
  left: -60px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 130, 91, .23), transparent 68%);
  pointer-events: none;
}

.screen-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.screen-hero-copy {
  min-width: 0;
}

.screen-kicker {
  margin: 0;
  color: #ffe7c2;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .13em;
  text-shadow: 0 1px 2px rgba(101, 0, 24, .12);
}

.screen-title {
  margin: 3px 0 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.045em;
  text-shadow: 0 3px 16px rgba(101, 0, 24, .16);
}

.screen-desc {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

.screen-emblem {
  display: grid;
  width: 70px;
  height: 70px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 22px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .22), 0 10px 24px rgba(100, 0, 22, .13);
  transform: rotate(3deg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.screen-emblem svg {
  width: 43px;
  height: 43px;
  overflow: visible;
  filter: drop-shadow(0 5px 7px rgba(78, 0, 17, .2));
}

.screen-icon-btn {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out);
}

.screen-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen-icon-btn:active {
  transform: scale(.92);
  background: rgba(255, 255, 255, .2);
}

.screen-hero--light {
  color: #173b2b;
  background:
    radial-gradient(90% 75% at 96% -2%, rgba(255, 255, 255, .78) 0%, transparent 56%),
    radial-gradient(110% 90% at 0% 100%, rgba(72, 190, 140, .16) 0%, transparent 64%),
    linear-gradient(145deg, #e9f8f0 0%, #ddf3e7 52%, #d3efe1 100%);
}

.screen-hero--light::before {
  border-color: rgba(15, 138, 95, .12);
  box-shadow: 0 0 0 20px rgba(15, 138, 95, .04);
}

.screen-hero--light::after {
  background: radial-gradient(circle, rgba(255, 177, 88, .2), transparent 68%);
}

.screen-hero--light .screen-kicker {
  color: #0f8a5f;
  text-shadow: 0 1px 2px rgba(15, 90, 60, .08);
}

.screen-hero--light .screen-title {
  color: #143b2a;
  text-shadow: 0 2px 8px rgba(15, 90, 60, .08);
}

.screen-hero--light .screen-desc {
  color: rgba(23, 59, 43, .62);
}

.screen-hero--light .screen-icon-btn {
  color: #0d6b49;
  border-color: rgba(15, 138, 95, .16);
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 4px 10px rgba(15, 90, 60, .06);
}

.screen-hero--light .screen-icon-btn:active {
  background: #fff;
}

.screen-hero--light .screen-emblem {
  border-color: rgba(15, 138, 95, .15);
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), 0 10px 24px rgba(15, 90, 60, .06);
}

.screen-hero--light .screen-emblem svg path {
  stroke: #0d7c57;
}

.screen-hero--light .screen-emblem svg path:first-child {
  fill: rgba(15, 138, 95, .08);
}

.subpage-main {
  position: relative;
  z-index: 2;
  margin-top: -26px;
  padding: 0 16px calc(94px + var(--safe-bottom));
}

#screen-rules .subpage-main {
  margin-top: 0;
  padding-top: max(18px, calc(env(safe-area-inset-top, 0px) + 12px));
}

.overview-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 4px;
  border: 1px solid rgba(28, 23, 25, .055);
  border-radius: 20px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 26px rgba(36, 24, 26, .08);
}

.overview-item {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-inline: 3px;
  text-align: center;
}

.overview-item + .overview-item::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: #f0edef;
}

.overview-item strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--brand);
  font-size: 21px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  letter-spacing: -.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-item--prize strong {
  color: #e9183a;
}

.overview-item small {
  overflow: hidden;
  max-width: 100%;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-item {
  overflow: hidden;
  border: 1px solid rgba(28, 23, 25, .06);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow .18s var(--ease-out), border-color .18s var(--ease-out);
}

.rule-item.is-open {
  border-color: rgba(195, 15, 44, .12);
  box-shadow: 0 10px 26px rgba(45, 27, 30, .09);
}

.rule-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  text-align: left;
}

.rule-visual {
  position: relative;
  display: grid;
  width: 58px;
  height: 76px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--art-a), var(--art-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 8px rgba(81, 28, 31, .13);
}

.rule-visual::before {
  content: "";
  position: absolute;
  top: -15px;
  right: -12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .17);
}

.rule-visual .game-icon {
  position: relative;
  z-index: 1;
  width: 94%;
  height: 94%;
  filter: drop-shadow(0 4px 4px rgba(75, 22, 28, .16));
}

.rule-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.rule-name,
.rule-summary,
.rule-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-name {
  color: var(--accent);
  font-size: 15.5px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.rule-summary {
  color: #453a3d;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.4;
}

.rule-meta {
  color: #6c6367;
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.35;
}

.rule-chevron {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--card-a);
  transition: transform .2s var(--ease-out);
}

.rule-chevron svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rule-item.is-open .rule-chevron {
  transform: rotate(180deg);
}

.rule-detail {
  padding: 14px 14px 15px;
  border-top: 1px solid #f3f0f1;
}

.rule-detail[hidden] {
  display: none;
}

.rule-desc {
  margin: 0 0 11px;
  color: #5e5357;
  font-size: 11px;
  line-height: 1.65;
}

.rule-visualization {
  padding: 11px 12px 12px;
  border: 1px solid rgba(0, 0, 0, .035);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--card-a), rgba(255, 255, 255, .82));
}

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

.rule-viz-head strong {
  color: #43383c;
  font-size: 10px;
  font-weight: 600;
}

.rule-viz-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7a7075;
  font-size: 8.5px;
  white-space: nowrap;
}

.rule-viz-legend::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.participant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.participant-dot {
  position: relative;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #e4e0e3;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
}

.participant-dot.is-winner {
  border-color: transparent;
  background: linear-gradient(145deg, var(--art-a), var(--art-b));
  box-shadow: 0 2px 5px rgba(71, 24, 31, .15);
}

.participant-dot.is-winner::after {
  content: "";
  width: 6px;
  height: 3px;
  border-bottom: 1.5px solid #fff;
  border-left: 1.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.rule-viz-empty {
  color: #8c8186;
  font-size: 9.5px;
  line-height: 1.5;
}

.rule-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.rule-fact {
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, .035);
  border-radius: 11px;
  background: rgba(255, 255, 255, .72);
}

.rule-fact small {
  display: block;
  color: #8a8084;
  font-size: 8.5px;
  line-height: 1.35;
}

.rule-fact strong {
  display: block;
  margin-top: 1px;
  color: #3b3236;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.rule-cta {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 11px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(100deg, #1bb37a, #0d7f57);
  box-shadow: 0 6px 14px rgba(13, 127, 87, .18);
  font-size: 12.5px;
  font-weight: 650;
}

.rule-cta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rule-cta:active {
  transform: scale(.985);
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 13px;
  border: 1px solid rgba(38, 29, 25, .055);
  border-radius: 14px;
  color: #7f7377;
  background: rgba(255, 255, 255, .72);
}

.info-note-icon {
  display: grid;
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  place-items: center;
  color: #b08037;
}

.info-note-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.65;
}

.history-toolbar {
  position: sticky;
  z-index: 8;
  top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px -2px 10px;
  padding: 8px 2px;
  background: linear-gradient(to bottom, rgba(248, 247, 245, .98) 68%, rgba(248, 247, 245, 0));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.filter-chips {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  min-width: 0;
  min-height: 30px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #ebe7e8;
  border-radius: 999px;
  color: #625960;
  background: #fff;
  box-shadow: 0 1px 3px rgba(39, 28, 30, .025);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  transition: color .16s var(--ease-out), background-color .16s var(--ease-out), border-color .16s var(--ease-out);
}

.filter-chip.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(100deg, #1bb37a, #0d7f57);
  box-shadow: 0 3px 9px rgba(13, 127, 87, .19);
}

.data-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: #9b7437;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.data-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e3a53b;
}

.data-tag.is-live {
  color: #32836a;
}

.data-tag.is-live::before {
  background: #15a875;
}

.history-list {
  overflow: hidden;
  border: 1px solid rgba(28, 23, 25, .06);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.history-list .result-row {
  padding: 8px 14px 9px;
}

.history-list .result-row:first-child {
  border-top: 0;
}

.history-list .empty-state {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.bet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #f2f2f5;
}

.bet-row:first-child {
  border-top: 0;
}

.bet-main {
  min-width: 0;
  flex: 1;
}

.bet-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bet-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-room {
  flex: none;
  padding: 2px 7px;
  border-radius: 6px;
  color: #0f8a5f;
  background: #e9f8f1;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.4;
}

.bet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.bet-result {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.bet-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.bet-result.is-win .bet-badge {
  color: #fff;
  background: linear-gradient(100deg, #1bb37a, #0d7f57);
}

.bet-result.is-lose .bet-badge {
  color: #8b9490;
  background: #f1f4f2;
}

.bet-result.is-pending .bet-badge {
  color: #9a6b18;
  background: #fff5e2;
}

.bet-result.is-refund .bet-badge {
  color: #7b6a3f;
  background: #f6f1e4;
}

.bet-prize {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bet-result.is-win .bet-prize {
  color: #0f8a5f;
}

.bet-result.is-lose .bet-prize,
.bet-result.is-pending .bet-prize {
  color: #a8a2a6;
  font-weight: 600;
}

.bet-result.is-refund .bet-prize {
  color: #8a7546;
  font-weight: 700;
}

.list-footer {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.profile-card {
  overflow: hidden;
  border: 1px solid rgba(28, 23, 25, .055);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(36, 24, 26, .08);
}

.profile-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 15px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  flex: none;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 11px rgba(151, 21, 37, .18);
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.profile-copy h2 {
  margin: 0;
  color: #252129;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.profile-copy p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-login {
  display: inline-flex;
  min-height: 32px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(100deg, #1bb37a, #0d7f57);
  box-shadow: 0 4px 10px rgba(13, 127, 87, .16);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.profile-login:active {
  transform: scale(.96);
}

.profile-login[hidden] {
  display: none;
}

.profile-balance-card {
  display: flex;
  min-width: 0;
  max-width: 132px;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  padding: 6px 10px 7px;
  border: 1px solid rgba(15, 138, 95, .14);
  border-radius: 13px;
  background: linear-gradient(140deg, #f4fbf7, #e7f7ef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92);
}

.profile-balance-card[hidden] {
  display: none;
}

.profile-balance-card small {
  color: #5d7d6d;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.profile-balance-card strong {
  display: flex;
  max-width: 100%;
  align-items: baseline;
  gap: 1px;
  color: #e9183a;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.profile-balance-symbol {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.profile-balance-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 14px 14px 6px;
  border-top: 1px solid #f2eff0;
}

.profile-action {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 11px 4px 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #f6fbf8;
  transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.profile-action--recharge {
  color: #0b7a53;
  border-color: rgba(16, 146, 101, .14);
  background: linear-gradient(165deg, #f1fcf6 0%, #e7f8ef 100%);
  box-shadow: 0 6px 14px rgba(17, 137, 95, .06);
}

.profile-action--withdraw {
  color: #1d63c0;
  border-color: rgba(38, 126, 228, .14);
  background: linear-gradient(165deg, #f3f9ff 0%, #e8f2ff 100%);
  box-shadow: 0 6px 14px rgba(38, 110, 208, .06);
}

.profile-action--support {
  color: #a96a06;
  border-color: rgba(226, 154, 36, .16);
  background: linear-gradient(165deg, #fffaf0 0%, #fff2da 100%);
  box-shadow: 0 6px 14px rgba(213, 143, 25, .06);
}

.profile-action:active {
  transform: scale(.96);
}

.profile-action-main {
  display: flex;
  max-width: 100%;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.profile-action-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
}

.profile-action--recharge .profile-action-icon {
  background: linear-gradient(145deg, #31c98d, #0a8a5b);
  box-shadow: 0 5px 10px rgba(13, 138, 92, .3), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.profile-action--withdraw .profile-action-icon {
  background: linear-gradient(145deg, #63b0ff, #1f6fe0);
  box-shadow: 0 5px 10px rgba(31, 111, 208, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.profile-action--support .profile-action-icon {
  background: linear-gradient(145deg, #ffc65e, #ee9512);
  box-shadow: 0 5px 10px rgba(228, 148, 18, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.profile-action-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-action small {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.profile-pay {
  display: flex;
  width: 200px;
  max-width: calc(100% - 48px);
  align-items: center;
  justify-content: center;
  margin: 0 auto 2px;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-pay-title {
  display: none;
}

.profile-pay-list {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}

.profile-pay-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.profile-pay-item img {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(23, 53, 38, .14);
}

.profile-pay-item small {
  color: #5d6b64;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.05;
  white-space: nowrap;
}

.menu-section {
  margin-top: 20px;
}

.settings-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(15, 138, 95, .12);
  border-radius: 16px;
  background: linear-gradient(135deg, #f4fbf7, #eef8f2);
}

.settings-account-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: #0f8a5f;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 138, 95, .10);
}

.settings-account-avatar svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-account-copy {
  min-width: 0;
  flex: 1;
}

.settings-account-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-account-copy small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-account-btn {
  min-height: 30px;
  flex: none;
  padding: 0 11px;
  border: 1px solid rgba(15, 138, 95, .22);
  border-radius: 999px;
  color: #0f8a5f;
  background: #fff;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.settings-account-btn:active { transform: scale(.97); }

.settings-section { margin-top: 15px; }

.settings-logout {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  border: 1px solid rgba(196, 0, 39, .16);
  border-radius: 14px;
  color: #c40027;
  background: #fff8f9;
  font-size: 12px;
  font-weight: 700;
}

.settings-logout:active { background: #fff1f3; }

.settings-logout[hidden] { display: none; }

.settings-footnote {
  margin: 14px 0 2px;
  color: #a39b9f;
  font-size: 9.5px;
  text-align: center;
}

.menu-title {
  margin: 0 4px 8px;
  color: #746b70;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .04em;
}

.menu-card {
  overflow: hidden;
  border: 1px solid rgba(28, 23, 25, .055);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.menu-item {
  display: flex;
  width: 100%;
  min-height: 53px;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border-top: 1px solid #f3f0f1;
  text-align: left;
  transition: background-color .16s var(--ease-out);
}

.menu-item:first-child {
  border-top: 0;
}

.menu-item:active {
  background: #faf8f8;
}

.menu-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: none;
  place-items: center;
  border-radius: 9px;
}

.menu-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-icon--red {
  color: #d81b38;
  background: #fff0f2;
}

.menu-icon--amber {
  color: #b1710d;
  background: #fff6e5;
}

.menu-icon--blue {
  color: #1769c2;
  background: #edf6ff;
}

.menu-icon--violet {
  color: #7b42c7;
  background: #f5efff;
}

.menu-icon--green {
  color: #128b63;
  background: #eafaf3;
}

.menu-icon--gray {
  color: #6d6a70;
  background: #f3f2f4;
}

.menu-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #302a31;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-hint {
  flex: none;
  color: #999096;
  font-size: 9px;
  line-height: 1.4;
  white-space: nowrap;
}

.menu-chevron {
  width: 14px;
  height: 14px;
  flex: none;
  color: #c1bbc0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
}

.profile-version {
  margin: 4px 0 0;
  color: #a49da2;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.tabbar {
  position: fixed;
  z-index: 30;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, var(--app-max));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 5px 8px calc(5px + var(--safe-bottom));
  border-top: 1px solid rgba(23, 26, 35, .075);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 24px rgba(40, 33, 34, .035);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  transform: translateX(-50%);
}

.tab {
  display: flex;
  min-width: 0;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 12px;
  color: #5f9380;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  transition: color .16s var(--ease-out), transform .16s var(--ease-out);
}

.tab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab:active {
  transform: scale(.93);
}

.tab.is-active {
  color: #128a5e;
  font-weight: 600;
}

.tab.is-active svg {
  stroke-width: 2;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: calc(76px + var(--safe-bottom));
  left: 50%;
  max-width: min(calc(100% - 48px), 360px);
  padding: 10px 15px;
  border-radius: 12px;
  color: #fff;
  background: rgba(27, 30, 38, .94);
  box-shadow: 0 8px 24px rgba(20, 18, 22, .16);
  font-size: 12px;
  font-weight: 450;
  line-height: 1.45;
  text-align: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .18s var(--ease-out), transform .18s var(--ease-out), visibility .18s;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript-tip {
  position: fixed;
  z-index: 100;
  top: 16px;
  right: 16px;
  left: 16px;
  max-width: calc(var(--app-max) - 32px);
  margin-inline: auto;
  padding: 11px 14px;
  border-radius: 12px;
  color: #c21532;
  background: #fff1f3;
  box-shadow: 0 4px 18px rgba(60, 20, 27, .1);
  font-size: 12px;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    background: rgba(255, 255, 255, .09);
  }

  .hero-cta:hover {
    box-shadow: 0 12px 22px rgba(143, 0, 24, .32);
  }

  .game-card:hover {
    box-shadow: 0 8px 18px rgba(70, 31, 34, .12);
  }

  .tab:hover {
    color: #477a67;
  }

  .tab.is-active:hover {
    color: #128a5e;
  }

  .section-link:hover {
    color: var(--brand);
  }

  .rule-toggle:hover {
    background: #fdfafb;
  }

  .filter-chip:hover {
    border-color: #e4d5d8;
  }

  .menu-item:hover {
    background: #fbf9fa;
  }
}

@media (max-width: 379px) {
  .topbar {
    padding-inline: 14px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 16.5px;
  }

  .brand-copy small {
    font-size: 8.5px;
    letter-spacing: .06em;
  }

  .icon-btn {
    width: 34px;
    min-height: 41px;
  }

  .icon-btn-art {
    width: 25px;
    height: 25px;
  }

  .icon-btn svg {
    width: 21px;
    height: 21px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .hero {
    padding-bottom: 22px;
  }

  .hero-body {
    min-height: 238px;
    margin: 12px 12px 0;
    padding: 19px 14px 0;
    border-radius: 22px;
  }

  .hero-copy {
    width: 64%;
    padding-bottom: 18px;
  }

  .hero-title {
    font-size: 29px;
  }

  .hero-title em {
    margin-top: 6px;
    font-size: .56em;
  }

  .hero-points {
    gap: 5px 7px;
    margin-top: 10px;
  }

  .hero-points span {
    font-size: 9px;
  }

  .check {
    width: 13px;
    height: 13px;
  }

  .hero-cta {
    min-height: 40px;
    margin-top: 13px;
    padding: 0 15px 0 17px;
    font-size: 12.5px;
  }

  .hero-art {
    right: -1px;
    bottom: -12px;
    width: 62%;
  }

  .coin-a {
    top: 14px;
    right: 24%;
    width: 23px;
    font-size: 12px;
  }

  .coin-b {
    top: 76px;
    right: 5%;
    width: 17px;
    font-size: 9px;
  }

  .coin-c {
    right: 36%;
    bottom: 38px;
    width: 19px;
    font-size: 10px;
  }

  .main {
    padding: 0 14px calc(88px + var(--safe-bottom));
  }

  .trust-strip {
    padding: 10px 2px;
    border-radius: 18px;
  }

  .trust {
    gap: 4px;
  }

  .trust-icon {
    width: 26px;
    height: 30px;
  }

  .trust-copy strong {
    font-size: 10.5px;
  }

  .trust-copy small {
    font-size: 8.5px;
  }

  .rules-section {
    margin-top: 14px;
  }

  .section-head {
    margin-bottom: 9px;
  }

  .section-icon {
    width: 21px;
    height: 21px;
  }

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

  .section-link {
    padding-left: 6px;
    font-size: 11px;
  }

  .games {
    gap: 8px;
  }

  .game-card {
    min-height: 88px;
    gap: 6px;
    padding: 6px 18px 6px 6px;
    border-radius: 16px;
  }

  .game-card::after {
    border-radius: 11px;
  }

  .game-visual {
    width: 48px;
    height: 70px;
    border-radius: 11px;
  }

  .game-title {
    font-size: 13.5px;
  }

  .game-summary {
    font-size: 9.5px;
  }

  .game-meta {
    font-size: 9px;
  }

  .game-arrow {
    right: 5px;
    width: 17px;
    height: 17px;
  }

  .results-card {
    border-radius: 20px;
  }

  .results-head,
  .result-row {
    padding-inline: 14px;
  }

  .results-head {
    padding-bottom: 9px;
  }

  .ball {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .balls {
    gap: 5px;
  }

  .range {
    font-size: 9px;
  }

  .stats {
    padding: 12px 2px;
    border-radius: 18px;
  }

  .stat {
    gap: 4px;
  }

  .stat-icon {
    width: 26px;
    height: 30px;
  }

  .stat strong {
    font-size: 16px;
  }

  .stat small {
    font-size: 8.8px;
  }

  .screen-hero {
    padding: max(16px, calc(env(safe-area-inset-top, 0px) + 8px)) 14px 45px;
    border-radius: 0 0 26px 26px;
  }

  .screen-hero-inner {
    min-height: 98px;
  }

  .screen-title {
    font-size: 27px;
  }

  .screen-desc {
    font-size: 10.5px;
  }

  .screen-emblem {
    width: 62px;
    height: 62px;
    border-radius: 19px;
  }

  .screen-emblem svg {
    width: 38px;
    height: 38px;
  }

  .subpage-main {
    margin-top: -24px;
    padding: 0 14px calc(88px + var(--safe-bottom));
  }

  .overview-card {
    padding: 12px 2px;
    border-radius: 18px;
  }

  .overview-item strong {
    font-size: 19px;
  }

  .overview-item small {
    font-size: 9px;
  }

  .page-section-head {
    margin: 20px 2px 9px;
  }

  .rule-toggle {
    gap: 8px;
    padding: 8px;
  }

  .rule-visual {
    width: 52px;
    height: 70px;
    border-radius: 12px;
  }

  .rule-name {
    font-size: 14.5px;
  }

  .rule-summary {
    font-size: 10px;
  }

  .rule-meta {
    font-size: 9px;
  }

  .rule-chevron {
    width: 25px;
    height: 25px;
  }

  .rule-detail {
    padding: 12px 12px 14px;
  }

  .rule-desc {
    font-size: 10.5px;
  }

  .participant-dot {
    width: 19px;
    height: 19px;
  }

  .rule-facts {
    gap: 7px;
  }

  .rule-fact {
    padding: 7px 9px;
  }

  .rule-fact strong {
    font-size: 13.5px;
  }

  .rule-cta {
    min-height: 38px;
    font-size: 12px;
  }

  .info-note {
    margin-top: 14px;
    padding: 11px 12px;
  }

  .info-note p {
    font-size: 9.5px;
  }

  .history-toolbar {
    margin-top: 12px;
  }

  .filter-chip {
    min-height: 29px;
    padding-inline: 10px;
    font-size: 10.5px;
  }

  .data-tag {
    font-size: 8.5px;
  }

  .history-list {
    border-radius: 20px;
  }

  .history-list .result-row {
    padding: 7px 12px 8px;
  }

  .profile-card {
    border-radius: 20px;
  }

  .profile-identity {
    padding: 14px;
  }

  .profile-avatar {
    width: 52px;
    height: 52px;
  }

  .profile-copy h2 {
    font-size: 16px;
  }

  .profile-login {
    min-height: 31px;
    padding-inline: 10px;
    font-size: 9.5px;
  }

  .profile-actions {
    gap: 8px;
    padding: 13px 11px 5px;
  }

  .profile-action {
    gap: 6px;
    padding: 10px 3px 9px;
    border-radius: 14px;
  }

  .profile-balance-card {
    max-width: 122px;
    padding: 5px 9px 6px;
  }

  .profile-balance-card strong {
    font-size: 16.5px;
  }

  .profile-balance-card small {
    font-size: 9px;
  }

  .profile-action-main {
    height: 35px;
  }

  .profile-action-icon {
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }

  .profile-action-icon svg {
    width: 19px;
    height: 19px;
  }

  .profile-action small {
    font-size: 11.5px;
  }

  .profile-pay {
    width: 190px;
    margin: 0 auto 2px;
  }

  .profile-pay-item img {
    width: 23px;
    height: 23px;
  }

  .menu-section {
    margin-top: 18px;
  }

  .menu-item {
    padding-inline: 12px;
  }
}

@media (max-width: 339px) {
  .home-greeting-logo {
    height: 42px;
  }

  .screen-hero {
    padding-inline: 13px;
    padding-bottom: 42px;
  }

  .screen-title {
    font-size: 25px;
  }

  .screen-kicker {
    font-size: 9px;
  }

  .screen-emblem {
    width: 55px;
    height: 55px;
    border-radius: 17px;
  }

  .screen-emblem svg {
    width: 34px;
    height: 34px;
  }

  .screen-icon-btn {
    width: 37px;
    height: 37px;
  }

  .overview-item strong {
    font-size: 17px;
  }

  .page-section-head {
    margin-top: 18px;
  }

  .rule-toggle {
    gap: 7px;
    padding: 7px;
  }

  .rule-visual {
    width: 47px;
    height: 64px;
    border-radius: 11px;
  }

  .rule-name {
    font-size: 13.5px;
  }

  .rule-summary {
    font-size: 9.5px;
  }

  .rule-meta {
    font-size: 8.5px;
  }

  .rule-chevron {
    width: 23px;
    height: 23px;
  }

  .rule-detail {
    padding: 11px 11px 13px;
  }

  .rule-viz-head strong {
    font-size: 9.5px;
  }

  .participant-row {
    gap: 3px;
  }

  .participant-dot {
    width: 18px;
    height: 18px;
  }

  .rule-fact strong {
    font-size: 13px;
  }

  .filter-chips {
    gap: 5px;
  }

  .filter-chip {
    padding-inline: 9px;
    font-size: 10px;
  }

  .data-tag {
    font-size: 8px;
  }

  .profile-identity {
    gap: 8px;
    padding: 13px;
  }

  .profile-avatar {
    width: 47px;
    height: 47px;
  }

  .profile-copy h2 {
    font-size: 15px;
  }

  .profile-copy p {
    font-size: 8.8px;
  }

  .profile-login {
    min-height: 30px;
    padding-inline: 9px;
    font-size: 9px;
  }

  .profile-actions {
    gap: 6px;
    padding: 12px 9px 4px;
  }

  .profile-action {
    gap: 5px;
    padding: 9px 2px 8px;
    border-radius: 13px;
  }

  .profile-balance-card {
    max-width: 112px;
    padding: 5px 8px 6px;
  }

  .profile-balance-card strong {
    font-size: 15px;
  }

  .profile-balance-card small {
    font-size: 8.5px;
  }

  .profile-action-main {
    height: 33px;
  }

  .profile-action-icon {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }

  .profile-action-icon svg {
    width: 18px;
    height: 18px;
  }

  .profile-action small {
    font-size: 11px;
  }

  .profile-pay {
    width: 180px;
    margin: 0 auto 2px;
  }

  .profile-pay-item img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .profile-pay-item small {
    font-size: 7.5px;
  }

  .menu-title {
    font-size: 10px;
  }

  .menu-item {
    padding-inline: 11px;
    gap: 8px;
  }

  .menu-hint {
    font-size: 8.5px;
  }

  .hero-copy {
    width: 65%;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-points span {
    font-size: 8.5px;
  }

  .hero-art {
    width: 59%;
    bottom: -10px;
  }

  .trust {
    flex-direction: column;
    gap: 3px;
  }

  .trust-icon {
    width: 24px;
    height: 28px;
  }

  .trust-copy {
    text-align: center;
  }

  .trust-copy strong {
    font-size: 9.8px;
  }

  .trust-copy small {
    display: none;
  }

  .game-card {
    gap: 5px;
    padding: 5px 16px 5px 5px;
  }

  .game-visual {
    width: 43px;
    height: 64px;
  }

  .game-title {
    font-size: 13px;
  }

  .game-summary {
    font-size: 9px;
  }

  .game-meta {
    font-size: 8.5px;
  }

  .game-arrow {
    right: 4px;
    width: 16px;
    height: 16px;
  }

  .stat {
    gap: 3px;
  }

  .stat-icon {
    width: 24px;
    height: 28px;
  }

  .stat strong {
    font-size: 15px;
  }

  .stat small {
    font-size: 8.5px;
  }
}

@media (min-width: 431px) {
  .app {
    box-shadow: 0 0 0 1px rgba(38, 30, 27, .045), 0 26px 80px rgba(39, 28, 25, .12);
  }

  .tabbar {
    border-right: 1px solid rgba(23, 26, 35, .045);
    border-left: 1px solid rgba(23, 26, 35, .045);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 选择号码（规则二级页） ---------- */
html[data-screen="select"] .tabbar {
  display: none;
}

html[data-screen="select"] .toast {
  bottom: calc(96px + var(--safe-bottom));
}

#screen-home {
  background:
    radial-gradient(120% 60% at 100% 0, rgba(178, 236, 210, .55), transparent 60%),
    radial-gradient(90% 45% at 0 8%, rgba(232, 248, 240, .9), transparent 65%),
    linear-gradient(180deg, #eef9f2 0%, #f1faf5 45%, #edf7f1 100%);
}

html[data-screen="home"] body,
html[data-screen="home"] .app {
  background-color: #eef8f2;
}

#screen-history {
  background:
    radial-gradient(120% 60% at 100% 0, rgba(178, 236, 210, .55), transparent 60%),
    radial-gradient(90% 45% at 0 8%, rgba(232, 248, 240, .9), transparent 65%),
    linear-gradient(180deg, #eef9f2 0%, #f1faf5 45%, #edf7f1 100%);
}


html[data-screen="history"] body,
html[data-screen="history"] .app {
  background-color: #eef8f2;
}

.screen--select {
  min-height: 100dvh;
  padding-bottom: calc(126px + var(--safe-bottom));
  background:
    radial-gradient(115% 54% at 100% 0, rgba(190, 242, 220, .58), transparent 58%),
    radial-gradient(90% 38% at 0 7%, rgba(238, 249, 243, .9), transparent 62%),
    linear-gradient(180deg, #f6fbf8 0%, #f7f8f5 44%, #f6f6f2 100%);
}

/* 使用纯透明度动画：避免 transform 让固定底栏相对屏幕定位 */
.screen--select.is-active {
  animation: select-screen-enter .22s var(--ease-out) both;
}

@keyframes select-screen-enter {
  from {
    opacity: .5;
  }
  to {
    opacity: 1;
  }
}

.select-topbar {
  position: sticky;
  z-index: 24;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: max(10px, calc(env(safe-area-inset-top, 0px) + 6px)) 16px 8px;
  background: linear-gradient(to bottom, rgba(246, 251, 248, .97) 72%, rgba(246, 251, 248, 0));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.select-back {
  display: grid;
  width: 38px;
  height: 38px;
  justify-self: start;
  place-items: center;
  border: 1px solid rgba(22, 75, 55, .08);
  border-radius: 50%;
  color: #22332b;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 2px 8px rgba(26, 70, 52, .05);
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out);
}

.select-back svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-back:active {
  background: #fff;
  transform: scale(.92);
}

.select-topbar-center {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.15;
  text-align: center;
}

.select-draw-time {
  color: #5d7d6d;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.select-draw-time b {
  color: #0b6b49;
  font-weight: 800;
}

.select-draw-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}

.select-draw-timer b {
  display: inline-flex;
  min-width: 26px;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border: 1px solid rgba(210, 26, 43, .24);
  border-radius: 6px;
  color: #d21a2b;
  background: #fff5f6;
  box-shadow: 0 1px 3px rgba(210, 26, 43, .06);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: .01em;
}

.select-draw-timer i {
  color: #c94a56;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.select-guide {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-self: end;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid rgba(22, 75, 55, .09);
  border-radius: 999px;
  color: #24735a;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 2px 8px rgba(26, 70, 52, .04);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out);
}

.select-guide svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-guide:active {
  background: #fff;
  transform: scale(.97);
}

.select-main {
  padding: 4px 16px 0;
}

.select-card {
  margin-bottom: 10px;
  padding: 15px 15px 14px;
  border: 1px solid rgba(22, 73, 54, .06);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 67, 50, .045), 0 1px 1px rgba(26, 67, 50, .02);
}

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

.select-head-copy {
  min-width: 0;
}

.select-head-copy h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #19251f;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.select-head-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border-radius: 7px;
  color: #16a274;
  background: #eaf8f1;
}

.select-head-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-head-copy p {
  margin: 4px 0 0;
  color: #8a9790;
  font-size: 10px;
  line-height: 1.45;
}

.select-site-total {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 9px 5px;
  border: 1px solid rgba(255, 216, 122, .9);
  border-radius: 11px;
  background: linear-gradient(180deg, #fffdf6, #fff3d6);
  text-align: right;
}

.select-site-total span {
  color: #9a7a3f;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.select-site-total strong {
  color: #8a5a00;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.select-head-note {
  flex: none;
  padding-top: 2px;
  color: #a2874c;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.select-badge {
  flex: none;
  margin-top: 1px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #b9781b;
  background: #fff4e4;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

/* 玩法选择 */
.select-rules-card {
  padding-bottom: 12px;
}

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

.select-rule-grid[data-group="lucky"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.select-rule-grid[data-group="guess"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.select-rule-grid[data-group="lucky"] .select-rule-option {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px 7px;
  text-align: center;
}

.select-rule-grid[data-group="lucky"] .select-rule-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.select-rule-grid[data-group="lucky"] .select-rule-copy strong {
  font-size: 11px;
}

.select-rule-grid[data-group="lucky"] .select-rule-copy small {
  margin-top: 2px;
  font-size: 8px;
}

.select-rule-grid[data-group="lucky"] .select-rule-copy small b {
  font-size: 9.5px;
}

.select-rule-grid[data-group="lucky"] .select-rule-check {
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
}

.select-rule-option {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 8px 7px;
  border: 1.5px solid #e8eeea;
  border-radius: 14px;
  color: #27332d;
  background: #fbfdfb;
  text-align: left;
  transition: transform .16s var(--ease-out), border-color .16s var(--ease-out),
    background-color .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.select-rule-option:active {
  transform: scale(.97);
}

.select-rule-option.is-selected {
  border-color: #18a875;
  background: linear-gradient(135deg, #f2fbf7, #e8f8f0);
  box-shadow: 0 4px 12px rgba(15, 142, 104, .08);
}

.select-rule-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--art-a), var(--art-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 5px rgba(70, 40, 20, .10);
}

.select-rule-icon .game-icon {
  width: 92%;
  height: 92%;
}

.select-rule-copy {
  display: block;
  min-width: 0;
}

.select-rule-copy strong {
  display: block;
  overflow: hidden;
  color: #27332d;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-rule-copy small {
  display: block;
  margin-top: 3px;
  color: #8b9891;
  font-size: 8.5px;
  line-height: 1.15;
  white-space: nowrap;
}

.select-rule-copy small b {
  color: #18a875;
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.select-rule-check {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: none;
  width: 18px;
  height: 18px;
  color: #18a875;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(16, 120, 88, .16);
}

.select-rule-check svg {
  display: block;
  width: 100%;
  height: 100%;
}

.select-rule-check .icon-check circle {
  fill: currentColor;
  stroke: none;
}

.select-rule-check .icon-check path {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-rule-option.is-selected .select-rule-check {
  display: block;
}

.prize-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 10px;
  padding: 12px 12px 10px;
  border: 1px solid #ffd9b8;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8ef, #fff0df);
  text-align: center;
}

.prize-preview[hidden] {
  display: none;
}

.prize-preview-value {
  color: #e0182f;
  font-size: clamp(18px, 5.2vw, 22px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.prize-preview-sub {
  color: #1677ff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

/* 选中玩法说明 */
.rule-summary {
  position: relative;
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid #ffe9cf;
  border-radius: 22px;
  background: linear-gradient(135deg, #fffaf2 0%, #fff6e9 55%, #fff1df 100%);
  box-shadow: 0 8px 24px rgba(166, 101, 20, .055), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.rule-summary-top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.rule-summary-art {
  display: grid;
  width: 58px;
  height: 58px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--art-a, #ffe7bd), var(--art-b, #ffb347));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 5px 12px rgba(120, 70, 20, .12);
}

.rule-summary-art .game-icon {
  width: 90%;
  height: 90%;
}

.rule-summary-main {
  min-width: 0;
  flex: 1;
  padding-right: 50px;
}

.rule-summary-title-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.rule-summary-title-row h2 {
  margin: 0;
  color: #2b241d;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.04em;
}

.rule-hot {
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #ff7a4d, #f14b2e);
  box-shadow: 0 2px 5px rgba(220, 70, 30, .18);
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}

.rule-hot[hidden] {
  display: none;
}

.rule-summary-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 8px;
  color: #7b6d5e;
  font-size: 9.5px;
  line-height: 1.4;
}

.rule-summary-stats span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.rule-summary-stats svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #c28a3e;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rule-summary-stats b {
  color: #5a4b3c;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.rule-demo {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 8px;
  border: 1px solid #e9ddcd;
  border-radius: 999px;
  color: #8a7a68;
  background: rgba(255, 255, 255, .72);
  font-size: 8.5px;
  font-weight: 550;
  line-height: 1.4;
  white-space: nowrap;
}

.rule-summary-desc {
  margin: 10px 0 0;
  color: #7e6e5d;
  font-size: 10px;
  line-height: 1.55;
}

.rule-summary-link {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  padding: 2px 0;
  color: #178f68;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.rule-summary-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 体验积分 */
.amount-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.amount-option {
  position: relative;
  display: flex;
  min-width: 0;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1.5px solid #e3eae5;
  border-radius: 12px;
  color: #3c4741;
  background: #fbfdfb;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out),
    border-color .16s var(--ease-out), color .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.amount-currency {
  color: #9aa69f;
  font-size: 9px;
  font-weight: 600;
}

.amount-option.is-selected {
  border-color: #18a875;
  color: #0d7c57;
  background: #edfaf3;
  box-shadow: 0 2px 8px rgba(16, 150, 108, .08);
}

.amount-option.is-selected .amount-currency {
  color: #18a875;
}

.amount-option:active {
  transform: scale(.96);
}

/* 选择几人间 */
.room-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.room-options[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.room-option {
  position: relative;
  display: flex;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
  border: 1.5px solid #e3eae5;
  border-radius: 13px;
  color: #3c4741;
  background: #fbfdfb;
  line-height: 1;
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out),
    border-color .16s var(--ease-out), color .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.room-option-name {
  font-size: 13px;
  font-weight: 700;
}

.room-option-sub {
  color: #95a29a;
  font-size: 8.5px;
  font-weight: 450;
  line-height: 1.2;
}

.room-option.is-selected {
  border-color: #18a875;
  color: #0d7c57;
  background: #edfaf3;
  box-shadow: 0 2px 8px rgba(16, 150, 108, .08);
}

.room-option.is-selected .room-option-sub {
  color: #5aa98a;
}

.room-option:active {
  transform: scale(.97);
}

.option-check {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #18a875;
  box-shadow: 0 0 0 2px #fff;
}

.option-check svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 智能匹配房间 */
.select-room-card {
  padding-bottom: 13px;
}

.room-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.room-switcher[hidden] {
  display: none;
}

.room-switcher::-webkit-scrollbar {
  display: none;
}

.room-switch-btn {
  flex: none;
  min-width: 72px;
  padding: 7px 10px 6px;
  border: 1px solid #dcefe6;
  border-radius: 12px;
  color: #4b5a52;
  background: #f7fcf9;
  text-align: left;
  line-height: 1.3;
}

.room-switch-btn strong {
  display: block;
  color: #1c3a2c;
  font-size: 12.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.room-switch-btn small {
  display: block;
  margin-top: 2px;
  color: #8d9992;
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.room-switch-btn.is-selected {
  border-color: #12a875;
  background: #e9f9f1;
  box-shadow: inset 0 0 0 1px #12a875;
}

.room-switch-btn.is-selected strong {
  color: #0d7c57;
}

.room-switch-btn.is-full {
  opacity: .58;
}

.room-switch-btn.is-full small {
  color: #c0802a;
}

.room-switch-btn:disabled {
  cursor: default;
}

.matching-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #1e9b72;
  background: #eaf9f1;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.matching-pill i {
  width: 7px;
  height: 7px;
  flex: none;
  border: 2px solid #1aac7e;
  border-right-color: transparent;
  border-radius: 50%;
  animation: match-spin .9s linear infinite;
}

.matching-pill.is-error {
  color: #c64b45;
  background: #fdf0ef;
}

.matching-pill.is-error i {
  border-color: #c64b45;
  border-right-color: transparent;
  animation: none;
}

.matching-pill.is-full {
  color: #b9781b;
  background: #fff5e6;
}

.matching-pill.is-full i {
  display: none;
}

.matching-pill.is-closed {
  color: #8d9992;
  background: #f1f3f1;
}

.matching-pill.is-closed i {
  display: none;
}

@keyframes match-spin {
  to {
    transform: rotate(360deg);
  }
}

.room-live {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #f5fbf8;
}

.room-avatars {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.room-avatar {
  display: grid;
  width: 19px;
  height: 19px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: #c6d1ca;
  background: #e9efeb;
}

.room-avatar svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.room-avatar.is-filled {
  color: #fff;
  background: linear-gradient(145deg, #2bc495, #11986b);
  box-shadow: 0 1px 3px rgba(12, 120, 85, .16);
}

.room-count {
  flex: none;
  color: #85928a;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.room-count strong {
  margin-left: 2px;
  color: #17231d;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.room-count strong span:first-child {
  color: #0e9b6d;
}

.issue-progress {
  overflow: hidden;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: #edf1ee;
}

.issue-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1fc58f, #0d9b6e);
  transition: width .3s var(--ease-out);
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 9px;
  color: #8d9992;
  font-size: 9px;
  line-height: 1.4;
}

.room-meta strong {
  color: #5d6a63;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.room-note {
  margin: 8px 0 0;
  color: #8d9992;
  font-size: 9px;
  line-height: 1.5;
}

.room-code-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  color: #0d7c57;
  background: #eaf8f1;
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
}

#select-eta {
  margin-left: auto;
  color: #7f8d85;
  white-space: nowrap;
}

.auto-room-retry {
  display: block;
  width: 100%;
  min-height: 32px;
  margin-top: 10px;
  border: 1px solid #f0cfcb;
  border-radius: 10px;
  color: #b94a43;
  background: #fdf5f4;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.4;
}

.auto-room-retry[hidden] {
  display: none;
}

/* 号码段 */
.group-card {
  margin-bottom: 0;
  padding-bottom: 16px;
}

.group-total {
  margin: 10px 2px 0;
  color: #0d8a64;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.5;
}

.group-total[hidden] {
  display: none;
}

.random-group {
  display: inline-flex;
  min-height: 28px;
  flex: none;
  align-items: center;
  gap: 3px;
  margin-top: 0;
  padding: 0 9px;
  border: 1px solid #d9f0e4;
  border-radius: 999px;
  color: #0d8a64;
  background: #eef9f3;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out);
}

.random-group svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.random-group:active {
  background: #e2f5eb;
  transform: scale(.97);
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.group-cell {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 84px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 2px 7px;
  border: 1.5px solid #dce8f6;
  border-radius: 13px;
  color: #30465e;
  background: linear-gradient(180deg, #f5faff, #edf5ff);
  transition: background-color .16s var(--ease-out), border-color .16s var(--ease-out),
    color .16s var(--ease-out), transform .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.group-cell:active:not(:disabled) {
  transform: scale(.96);
}

.group-cell.is-available {
  border-color: #dce8f6;
  color: #30465e;
  background: linear-gradient(180deg, #f5faff, #edf5ff);
}

.group-cell.is-selected {
  border-color: #18a875;
  color: #0d7c57;
  background: linear-gradient(180deg, #f0fbf5, #e4f8ee);
  box-shadow: 0 4px 12px rgba(13, 141, 104, .10);
}

.group-cell.is-occupied {
  border-color: #e8ede9;
  color: #b2bdb6;
  background: #f4f6f3;
  cursor: default;
}

.group-cell.is-closed {
  border-color: #e8ede9;
  color: #b2bdb6;
  background: #f4f6f3;
  cursor: not-allowed;
  opacity: .72;
}

.group-letter {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
}

.group-range {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  font-size: 8px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  letter-spacing: -.01em;
  white-space: nowrap;
  opacity: .78;
}

.group-cell.is-occupied .group-range {
  opacity: .72;
}

.group-cell.is-selected .group-range {
  opacity: .95;
}

.group-state {
  display: grid;
  width: 14px;
  height: 14px;
  flex: none;
  align-self: flex-end;
  margin-right: 3px;
  place-items: center;
  border-radius: 50%;
}

.group-state svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.group-state.is-check {
  color: #18a875;
  background: #fff;
  box-shadow: 0 0 0 2px #e4f8ee;
}

.group-state.is-check .icon-check circle {
  fill: currentColor;
  stroke: none;
}

.group-state.is-check .icon-check path {
  stroke: #fff;
  stroke-width: 1.8;
}

.group-state.is-lock {
  color: #aab5ae;
}

.group-state.is-lock svg {
  width: 12px;
  height: 12px;
}

/* 底部确认 */
.select-actionbar {
  position: fixed;
  z-index: 30;
  bottom: 0;
  left: 50%;
  width: min(100%, var(--app-max));
  padding: 10px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, rgba(247, 250, 247, .99) 58%, rgba(247, 250, 247, 0));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.select-balance {
  display: flex;
  width: 100%;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #5f7d6d;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
}

.select-balance[hidden] {
  display: none;
}

.select-balance strong {
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.select-balance-link {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(15, 138, 95, .1);
  font-size: 9.5px;
  font-weight: 700;
}

.select-balance.is-low strong,
.select-balance.is-low .select-balance-link {
  color: #cf3348;
}

.select-balance.is-low .select-balance-link {
  background: rgba(207, 51, 72, .09);
}

.select-confirm {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #25c98f 0%, #11aa79 50%, #0a926a 100%);
  box-shadow: 0 12px 26px rgba(10, 145, 104, .25), inset 0 1px 0 rgba(255, 255, 255, .22);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .02em;
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out),
    color .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.select-confirm-arrow {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}

.select-confirm-arrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-confirm:active:not(:disabled) {
  transform: scale(.985);
}

.select-confirm:disabled {
  color: #a7b2ab;
  background: #e9eeea;
  box-shadow: none;
  cursor: default;
}

.select-confirm:disabled .select-confirm-arrow {
  background: rgba(255, 255, 255, .35);
}

@media (min-width: 431px) {
  .select-actionbar {
    border-right: 1px solid rgba(23, 26, 35, .045);
    border-left: 1px solid rgba(23, 26, 35, .045);
  }
}

@media (max-width: 379px) {
  .select-topbar {
    padding-inline: 12px;
  }

  .select-draw-time {
    font-size: 8.8px;
  }

  .select-draw-timer {
    gap: 1px;
  }

  .select-draw-timer b {
    min-width: 24px;
    padding: 2px 3px;
    font-size: 13px;
  }

  .select-draw-timer i {
    font-size: 11px;
  }

  .select-main {
    padding-inline: 12px;
  }

  .select-card {
    padding: 13px 12px 12px;
    border-radius: 19px;
  }

  .select-head-copy h2 {
    font-size: 14px;
  }

  .select-head-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }

  .select-head-icon svg {
    width: 14px;
    height: 14px;
  }

  .select-head-note {
    font-size: 8.5px;
  }

  .select-site-total {
    padding: 5px 7px 4px;
  }

  .select-site-total span {
    font-size: 8px;
  }

  .select-site-total strong {
    font-size: 11.5px;
  }

  .select-rule-grid {
    gap: 6px;
  }

  .select-rule-option {
    gap: 5px;
    padding: 7px 6px;
    border-radius: 12px;
  }

  .select-rule-icon {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }

  .select-rule-copy strong {
    font-size: 10.5px;
  }

  .select-rule-copy small {
    font-size: 8px;
  }

  .select-rule-copy small b {
    font-size: 9px;
  }

  .rule-summary {
    padding: 13px;
    border-radius: 19px;
  }

  .rule-summary-art {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .rule-summary-main {
    padding-right: 46px;
  }

  .rule-summary-title-row h2 {
    font-size: 19px;
  }

  .rule-summary-stats {
    gap: 3px 7px;
    font-size: 9px;
  }

  .rule-summary-stats svg {
    width: 11px;
    height: 11px;
  }

  .rule-demo {
    top: 12px;
    right: 12px;
  }

  .amount-options {
    gap: 4px;
  }

  .amount-option {
    height: 44px;
    border-radius: 11px;
    font-size: 11.5px;
  }

  .amount-currency {
    font-size: 8.5px;
  }

  .room-options {
    gap: 6px;
  }

  .room-option {
    min-height: 54px;
    border-radius: 12px;
  }

  .room-option-name {
    font-size: 12px;
  }

  .room-option-sub {
    font-size: 8px;
  }

  .room-live {
    padding: 10px;
  }

  .room-avatar {
    width: 18px;
    height: 18px;
  }

  .room-avatar svg {
    width: 12px;
    height: 12px;
  }

  .group-grid {
    gap: 5px;
  }

  .group-cell {
    min-height: 78px;
    padding: 8px 1px 6px;
    border-radius: 12px;
  }

  .group-letter {
    font-size: 20px;
  }

  .group-range {
    font-size: 7.5px;
  }

  .group-state {
    width: 13px;
    height: 13px;
    margin-right: 2px;
  }

  .group-state svg {
    width: 13px;
    height: 13px;
  }

  .select-actionbar {
    padding-inline: 12px;
  }

  .select-confirm {
    min-height: 54px;
    border-radius: 17px;
  }
}

@media (max-width: 349px) {
  .rule-hot {
    display: none;
  }

  .rule-summary-main {
    padding-right: 42px;
  }

  .rule-summary-title-row h2 {
    font-size: 18px;
  }

  .amount-option {
    height: 42px;
    font-size: 10px;
  }

  .amount-option .option-check,
  .room-option .option-check {
    display: none;
  }

  .amount-currency {
    font-size: 8px;
  }

  .room-option {
    min-height: 52px;
  }

  .room-option-name {
    font-size: 11.5px;
  }

  .room-option-sub {
    font-size: 7.5px;
  }

  .group-grid {
    gap: 4px;
  }

  .group-cell {
    min-height: 74px;
  }

  .group-letter {
    font-size: 18px;
  }

  .group-range {
    font-size: 7px;
  }

  .room-meta {
    gap: 5px 7px;
    font-size: 8.5px;
  }

  .select-head-note {
    display: none;
  }
}

/* ---------- 规则页：大卡片 + 逐条规则 ---------- */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-card {
  position: relative;
  padding: 16px;
  scroll-margin-top: 12px;
  border: 1px solid rgba(22, 73, 54, .07);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 67, 50, .045), 0 1px 1px rgba(26, 67, 50, .02);
  transition: box-shadow .2s var(--ease-out), border-color .2s var(--ease-out);
}

.rule-card.is-highlight {
  border-color: rgba(22, 162, 116, .55);
  box-shadow: 0 0 0 4px rgba(22, 162, 116, .10), 0 8px 24px rgba(26, 67, 50, .08);
}

.rule-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.rule-card-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--art-a), var(--art-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 4px 10px rgba(70, 40, 20, .10);
}

.rule-card-icon .game-icon {
  width: 90%;
  height: 90%;
}

.rule-icon-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.rule-card-copy {
  min-width: 0;
  flex: 1;
}

.rule-card-name {
  margin: 0;
  color: #1d2922;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.rule-card-subtitle {
  margin: 4px 0 0;
  color: #7c8981;
  font-size: 10.5px;
  line-height: 1.5;
}

.rule-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.rule-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  color: #7c8981;
  background: #f3f7f4;
  font-size: 8.5px;
  font-weight: 550;
  line-height: 1.35;
  white-space: nowrap;
}

.rule-chip.is-accent {
  color: #0d8a64;
  background: #eaf8f1;
  font-weight: 650;
}

.rule-chip.is-room {
  color: #a1742e;
  background: #fff6e8;
}

.rule-chip.is-category {
  color: #b42318;
  background: #fff1f2;
  font-weight: 650;
}

.rule-page-notice {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  color: #8a7546;
  background: #fff9ec;
  font-size: 10px;
  line-height: 1.6;
}

.rule-block {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #f0f4f1;
}

.rule-block-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.rule-block-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: #e04a4f;
  background: #fdecee;
}

.rule-block-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rule-block-head h4 {
  margin: 0;
  color: #2c3831;
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.rule-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rule-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rule-step-num {
  display: grid;
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
  place-items: center;
  border-radius: 50%;
  color: #0f8a5f;
  background: #e9f8f1;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1;
}

.rule-step-num.is-blue {
  color: #2f74c0;
  background: #eaf3ff;
}

.rule-step p {
  margin: 0;
  color: #4f5b54;
  font-size: 11px;
  font-weight: 450;
  line-height: 1.62;
  letter-spacing: .005em;
}

.rule-probability {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #d9efe4;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3fcf7, #eaf8f1);
}

.rule-probability-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: none;
  place-items: center;
  color: #0f8a5f;
}

.rule-probability-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rule-probability strong {
  display: block;
  color: #0b6b49;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.35;
}

.rule-probability p {
  margin: 4px 0 0;
  color: #8c7658;
  font-size: 9.5px;
  line-height: 1.55;
}

.rule-card-cta {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 0 13px;
  border: 1px solid #d9f0e4;
  border-radius: 999px;
  color: #0d8a64;
  background: #eef9f3;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out);
}

.rule-card-cta svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rule-card-cta:active {
  background: #e2f5eb;
  transform: scale(.97);
}

/* 揭晓规则 */
.verify-card {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(48, 104, 170, .10);
  border-radius: 22px;
  background: linear-gradient(135deg, #fbfdff, #f7fbff);
  box-shadow: 0 8px 24px rgba(35, 78, 130, .045);
}

.verify-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.verify-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 13px;
  color: #2f74c0;
  background: #eaf3ff;
}

.verify-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.verify-head h2 {
  margin: 0;
  color: #203349;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.verify-head p {
  margin: 3px 0 0;
  color: #8295a8;
  font-size: 9.5px;
  line-height: 1.4;
}

.verify-steps {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #eef4fa;
}

.verify-steps .rule-step p {
  color: #526274;
}

.verify-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #6b7f91;
  background: #f1f7fd;
  font-size: 9.5px;
  line-height: 1.5;
}

.verify-note span {
  display: grid;
  width: 15px;
  height: 15px;
  flex: none;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.verify-note p {
  margin: 0;
}

@media (max-width: 379px) {
  .rule-card,
  .verify-card {
    padding: 14px 13px;
    border-radius: 19px;
  }

  .rule-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }

  .rule-card-name {
    font-size: 18px;
  }

  .rule-step p {
    font-size: 10.5px;
  }

  .rule-chip {
    font-size: 8px;
  }

  .verify-head h2 {
    font-size: 15px;
  }
}

/* ---------- 登录 / 注册 / 参与记录底部弹层 ---------- */

body.is-sheet-open {
  overflow: hidden;
}

.sheet-layer {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-layer[hidden] {
  display: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(20, 17, 19, .45);
  opacity: 0;
  transition: opacity .2s var(--ease-out);
  cursor: pointer;
}

.sheet {
  position: relative;
  width: min(100%, var(--app-max));
  max-height: min(86dvh, 640px);
  padding: 8px 18px calc(22px + var(--safe-bottom));
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: 0 -18px 44px rgba(24, 17, 20, .22);
  transform: translateY(102%);
  transition: transform .24s var(--ease-out);
  -webkit-overflow-scrolling: touch;
}

.sheet-grip {
  display: block;
  width: 36px;
  height: 4px;
  margin: 2px auto 12px;
  border-radius: 999px;
  background: #e8e3e5;
}

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

.sheet-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.sheet-close {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8a858b;
  background: #f4f1f2;
}

.sheet-close:active {
  transform: scale(.94);
}

.sheet-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.sheet-layer.is-open .sheet-backdrop {
  opacity: 1;
}

.sheet-layer.is-open .sheet {
  transform: translateY(0);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border-radius: 14px;
  background: #f4f1f2;
}

.auth-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: color .16s var(--ease-out), background-color .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.auth-tabs button.is-active {
  color: var(--brand);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(35, 24, 27, .08);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field[hidden] {
  display: none;
}

.auth-field-label {
  color: #746b70;
  font-size: 11px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e8e3e5;
  border-radius: 13px;
  color: var(--ink);
  background: #fbfafb;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .16s var(--ease-out), background-color .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.auth-field input::placeholder {
  color: #b0a9ad;
}

.auth-field input:focus {
  border-color: rgba(233, 24, 58, .45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(233, 24, 58, .09);
}

.auth-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  color: #c40027;
  background: #fff0f2;
  font-size: 11.5px;
  line-height: 1.45;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(100deg, #1bb37a, #0d7f57);
  box-shadow: 0 8px 18px rgba(13, 127, 87, .2);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .16s var(--ease-out), opacity .16s var(--ease-out);
}

.auth-submit:active {
  transform: scale(.985);
}

.auth-submit:disabled {
  opacity: .65;
}

.auth-note {
  margin: 0;
  color: #a39da1;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.sheet--cs {
  display: flex;
  height: min(82dvh, 620px);
  flex-direction: column;
  padding-bottom: calc(12px + var(--safe-bottom));
  overflow: hidden;
}

.cs-head {
  flex: none;
}

.cs-head-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.cs-head-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.cs-context {
  flex: none;
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 11px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 11px;
  line-height: 1.45;
}

.cs-context[hidden] {
  display: none;
}

.cs-messages {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px 2px 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cs-empty {
  margin: auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.cs-message {
  display: flex;
  max-width: 86%;
  align-items: flex-end;
  gap: 7px;
}

.cs-message.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.cs-avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 2px 6px rgba(20, 60, 44, .1);
}

.cs-bubble {
  min-width: 0;
  padding: 9px 12px;
  border-radius: 14px;
  color: #2a3230;
  background: #f3f6f4;
  font-size: 12.5px;
  line-height: 1.45;
  word-break: break-word;
}

.cs-message.is-user .cs-bubble {
  border-bottom-right-radius: 5px;
  color: #fff;
  background: linear-gradient(135deg, #25c98f, #0d7f57);
}

.cs-message.is-admin .cs-bubble {
  border-bottom-left-radius: 5px;
}

.cs-bubble img {
  display: block;
  max-width: 200px;
  max-height: 240px;
  border-radius: 10px;
}

.cs-time {
  margin-top: 4px;
  color: #a39da1;
  font-size: 8.5px;
  line-height: 1.2;
  text-align: right;
}

.cs-message.is-user .cs-time {
  color: rgba(255, 255, 255, .72);
}

.cs-composer {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid #f0edef;
}

.cs-image-btn {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 11px;
  color: #5d7d6d;
  background: #f3f6f4;
  cursor: pointer;
}

.cs-image-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-image-btn:active {
  transform: scale(.96);
}

.cs-input {
  min-width: 0;
  flex: 1;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e4ece7;
  border-radius: 12px;
  color: var(--ink);
  background: #fbfdfc;
  font: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color .16s var(--ease-out), background-color .16s var(--ease-out);
}

.cs-input::placeholder {
  color: #b0a9ad;
}

.cs-input:focus {
  border-color: rgba(15, 138, 95, .45);
  background: #fff;
}

.cs-send {
  min-height: 38px;
  flex: none;
  padding: 0 14px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(100deg, #1bb37a, #0d7f57);
  font-size: 12px;
  font-weight: 700;
}

.cs-send:active {
  transform: scale(.97);
}

.cs-send:disabled {
  opacity: .55;
}

.cs-footnote {
  flex: none;
  margin: 8px 0 0;
  color: #a39da1;
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
}

.sheet--list {
  padding-bottom: calc(16px + var(--safe-bottom));
}

.participation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.participation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #f0ecee;
  border-radius: 14px;
  background: #fbfafb;
}

.participation-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.participation-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participation-main span {
  color: var(--muted);
  font-size: 10px;
}

.participation-meta {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.participation-meta strong {
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.participation-meta span {
  color: #a39da1;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.participation-list .empty-state {
  padding: 34px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.sheet-footnote {
  margin: 14px 0 0;
  color: #a8a2a6;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- 邀请好友 ---------- */

.settings-account-avatar {
  object-fit: cover;
  border: 2px solid #fff;
}

.sheet--invite {
  padding-bottom: calc(18px + var(--safe-bottom));
}

.invite-hero {
  position: relative;
  margin-top: 14px;
  padding: 18px 16px 16px;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(80% 120% at 50% -10%, rgba(255, 224, 138, .38), transparent 66%),
    linear-gradient(135deg, #12a06c, #075537);
  box-shadow: 0 12px 26px rgba(7, 85, 55, .22);
  text-align: center;
}

.invite-hero::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, .18), transparent 62%);
  pointer-events: none;
}

.invite-hero > span {
  display: block;
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}

.invite-hero > strong {
  display: block;
  margin-top: 4px;
  color: #ffe08a;
  font-size: 38px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  letter-spacing: -.03em;
  text-shadow: 0 3px 8px rgba(3, 45, 27, .45);
}

.invite-hero > strong b {
  font: inherit;
}

.invite-hero > small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
  line-height: 1.45;
}

.invite-link-row {
  margin-top: 14px;
  padding: 10px 14px 11px;
  border: 1px dashed rgba(15, 138, 95, .3);
  border-radius: 15px;
  background: linear-gradient(135deg, #f5fcf8, #eefaf4);
}

.invite-link-row span {
  display: block;
  color: #6b8578;
  font-size: 9.5px;
  font-weight: 600;
}

.invite-link-row input {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #0d6b49;
  background: transparent;
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
}

.invite-link-btn {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(100deg, #1bb37a, #0d7f57);
  box-shadow: 0 8px 18px rgba(13, 127, 87, .2);
  font-size: 13px;
  font-weight: 700;
}

.invite-link-btn:active {
  transform: scale(.985);
}

.invite-link-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.invite-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 13px;
  padding: 12px 0;
  border: 1px solid #eef1ef;
  border-radius: 16px;
  background: #fbfafb;
}

.invite-stats > div {
  position: relative;
  min-width: 0;
  padding: 0 6px;
  text-align: center;
}

.invite-stats > div + div::before {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 0;
  width: 1px;
  background: #ececec;
}

.invite-stats strong {
  display: block;
  overflow: hidden;
  color: #0d6b49;
  font-size: clamp(15px, 4.6vw, 19px);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-stats small {
  display: block;
  margin-top: 3px;
  color: #8b9a91;
  font-size: 9px;
  white-space: nowrap;
}

.invite-list-head {
  margin: 16px 2px 8px;
  color: #746b70;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .03em;
}

.invite-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.invite-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #f0ecee;
  border-radius: 13px;
  background: #fbfafb;
}

.invite-row-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(20, 60, 44, .1);
}

.invite-row-person {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.invite-row-person strong {
  overflow: hidden;
  color: #2a3230;
  font-size: 12.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-row-person small {
  color: #999096;
  font-size: 9px;
}

.invite-row-turnover {
  flex: none;
  color: #0d7f57;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.invite-empty {
  margin: 0;
  padding: 18px 10px;
  border: 1px dashed #e6e1e3;
  border-radius: 13px;
  color: #a39da1;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 349px) {
  .invite-hero > strong { font-size: 34px; }
  .invite-stats small { font-size: 8.5px; }
}
