:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --ink: #191f28;
  --muted: #8b95a1;
  --subtle: #f2f4f6;
  --line: #e5e8eb;
  --blue: #3182f6;
  --blue-press: #1b64da;
  --green: #1f9e63;
  --red: #e5484d;
  --shadow: 0 8px 24px rgba(2, 32, 71, 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html {
  color: var(--ink);
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", Arial, sans-serif;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app {
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
}

body[data-auth="signed-out"] .app {
  display: none;
}

body[data-auth="signed-in"] .login-screen {
  display: none;
}

.login-screen {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 10%, rgba(49, 130, 246, 0.26), transparent 34%),
    linear-gradient(180deg, #061c31 0%, #0a1728 48%, #021421 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 36%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 430px);
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top, 0px)) 22px calc(18px + var(--safe-bottom));
  overflow: hidden;
}

.login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-signal,
.login-locale {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.login-signal i {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #39e6a1;
  box-shadow: 0 0 14px rgba(57, 230, 161, 0.9);
}

.login-brand-scene {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: clamp(70px, 12dvh, 110px);
  text-align: center;
}

.login-app-mark {
  width: 92px;
  height: 92px;
  margin-bottom: 10px;
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.login-brand-scene h1 {
  color: #fff;
  font-size: 36px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.login-brand-scene p {
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  font-weight: 700;
}

.login-prize-scene {
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: min(430px, 100vw);
  height: 170px;
  opacity: 0.62;
  pointer-events: none;
  transform: translateX(-50%);
}

.login-stage {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -16px;
  height: 108px;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(49, 130, 246, 0.38), transparent 62%),
    linear-gradient(180deg, rgba(4, 31, 53, 0), rgba(0, 9, 19, 0.88));
  filter: blur(0.2px);
}

.login-ticket,
.login-coin {
  position: absolute;
  display: block;
  opacity: 0.82;
}

.login-ticket {
  width: 138px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(90deg, transparent 18px, rgba(255, 255, 255, 0.12) 19px, transparent 20px),
    linear-gradient(135deg, rgba(49, 130, 246, 0.48), rgba(255, 255, 255, 0.1));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

.login-ticket::before,
.login-ticket::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #071827;
}

.login-ticket::before {
  left: -8px;
}

.login-ticket::after {
  right: -8px;
}

.ticket-a {
  left: 16px;
  bottom: 28px;
  transform: rotate(-7deg);
}

.ticket-b {
  right: 8px;
  bottom: 70px;
  width: 112px;
  height: 60px;
  opacity: 0.58;
  transform: rotate(13deg);
}

.login-coin {
  border-radius: 50%;
  border: 1px solid rgba(255, 231, 88, 0.4);
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 255, 255, 0.66), transparent 20%),
    linear-gradient(135deg, #fee500, #f59f00);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.coin-a {
  right: 74px;
  bottom: 28px;
  width: 48px;
  height: 48px;
}

.coin-b {
  left: 90px;
  bottom: 98px;
  width: 32px;
  height: 32px;
  opacity: 0.55;
}

.login-action-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 11px;
  width: 100%;
  margin-top: clamp(34px, 5dvh, 48px);
  padding: 0 0 8px;
}

.login-action-title {
  display: grid;
  gap: 5px;
  margin-bottom: 2px;
  text-align: left;
}

.login-action-title strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
}

.login-action-title span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 700;
}

.login-action-panel p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.login-member-field {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.login-member-field span {
  color: rgba(255, 255, 255, 0.54);
}

.login-member-field select {
  min-height: 34px;
  color: #fff;
}

.login-member-field select option {
  color: #191f28;
}

.login-action-panel .kakao-button,
.login-action-panel .plain-button {
  min-height: 54px;
  border-radius: 14px;
  font-size: 16px;
}

.login-action-panel .kakao-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.login-action-panel .kakao-button span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fee500;
  background: #191600;
  font-size: 13px;
  font-weight: 900;
}

.login-action-panel .plain-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-app {
  position: relative;
  width: min(100%, 460px);
  height: 100dvh;
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(18px, env(safe-area-inset-top, 0px)) 18px calc(104px + var(--safe-bottom));
  background: var(--bg);
  scrollbar-width: none;
}

.mobile-app::-webkit-scrollbar {
  display: none;
}

.app-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  margin: calc(-1 * max(18px, env(safe-area-inset-top, 0px))) -18px 12px;
  padding: max(18px, env(safe-area-inset-top, 0px)) 18px 10px;
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(20px);
}

.app-header h1 {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-lockup img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(49, 130, 246, 0.16);
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.install-button,
.small-button,
.sheet-close {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}

.notice-button .icon-svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.1;
}

.notice-button::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
}

.profile-button {
  color: #fff;
  background: linear-gradient(145deg, #1d78ff, #0b4fd0);
}

.profile-button span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.install-button,
.small-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--blue);
  background: #e8f3ff;
}

.balance-card,
.selection-panel,
.claim-card,
.referral-card,
.form-field,
.ticket-card,
.purchase-card,
.charge-card,
.insight-card,
.draw-lab,
.empty-card {
  border: 1px solid rgba(229, 232, 235, 0.8);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.balance-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.balance-card span,
.top-balance span,
.round-summary span,
.selection-panel span,
.referral-card span,
.form-field span,
.public-board span,
.insight-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.balance-card strong {
  display: block;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.05;
}

.balance-card strong b {
  font-size: 44px;
  letter-spacing: 0;
}

.home-hero-card {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  gap: 14px;
  padding: 18px;
  border: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(49, 130, 246, 0.18), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 14px 34px rgba(2, 32, 71, 0.08);
}

.home-wallet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.hero-symbol {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(49, 130, 246, 0.16);
}

.hero-symbol img {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  object-fit: cover;
}

.hero-balance {
  display: grid;
  gap: 5px;
  justify-items: start;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

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

.hero-balance strong b {
  display: block;
  margin-top: 0;
  color: var(--ink);
  font-size: 42px;
  line-height: 0.96;
  letter-spacing: 0;
}

.home-wallet-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.home-wallet-meta b {
  color: var(--blue);
  font-size: 13px;
}

.home-buy-button {
  min-height: 52px;
  border-radius: 14px;
  font-size: 16px;
}

.hero-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.round-action {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: #f0f7ff;
}

.round-action .action-icon {
  width: 25px;
  height: 25px;
  color: var(--blue);
  stroke-width: 2.15;
}

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

.primary-button,
.plain-button,
.google-button,
.kakao-button,
.text-button,
.segment {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button,
.google-button {
  border: 0;
  color: #fff;
  background: var(--blue);
}

.kakao-button {
  border: 0;
  color: #191600;
  background: #fee500;
}

.primary-button:active,
.google-button:active {
  background: var(--blue-press);
}

.kakao-button:active {
  background: #f4d900;
}

.primary-button:disabled {
  cursor: default;
  color: #8b95a1;
  background: #e5e8eb;
}

.plain-button {
  border: 0;
  color: var(--ink);
  background: var(--subtle);
}

.text-button {
  border: 0;
  color: var(--blue);
  background: transparent;
}

.full {
  width: 100%;
}

.top-balance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 16px;
}

body:not([data-screen="home"]) .balance-card,
body:not([data-screen="home"]) .top-balance {
  display: none;
}

.top-balance > div {
  min-width: 0;
  padding: 13px 11px;
  border: 1px solid rgba(229, 232, 235, 0.78);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(2, 32, 71, 0.045);
}

.top-balance strong,
.round-summary b,
.public-board b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.draw-overview {
  padding: 16px;
  border: 1px solid rgba(229, 232, 235, 0.82);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(2, 32, 71, 0.055);
}

.draw-title {
  align-items: center;
}

.draw-actions {
  display: grid;
  gap: 8px;
}

.draw-actions .primary-button {
  min-height: 50px;
  border-radius: 14px;
  font-size: 15px;
}

.draw-actions .text-button {
  min-height: 44px;
  border-radius: 12px;
  background: #f2f6fb;
}

.screen {
  display: none;
  gap: 14px;
}

.screen.active {
  display: grid;
}

#screen-buy {
  padding-bottom: 152px;
}

.section-block {
  display: grid;
  gap: 12px;
  padding: 0;
}

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

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

.section-title h2 {
  margin-top: 2px;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: 0;
}

.section-title h3 {
  font-size: 20px;
  line-height: 1.15;
}

.status-chip,
.price-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--blue);
  background: #e8f3ff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip.active,
.status-chip.safe {
  color: var(--green);
  background: #e9f8f0;
}

.status-chip.blocked {
  color: var(--red);
  background: #fff0f0;
}

.round-summary,
.public-board,
.purchase-breakdown,
.charge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.round-summary > div,
.public-board article,
.purchase-breakdown article {
  padding: 12px;
  border-radius: 8px;
  background: var(--subtle);
}

.draw-overview .round-summary {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.draw-overview .round-summary > div {
  min-height: 66px;
  border-radius: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.draw-overview .round-summary > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.draw-overview .round-summary > div:nth-child(2),
.draw-overview .round-summary > div:nth-child(3) {
  border-bottom: 0;
}

.draw-overview .round-summary > div:nth-child(3) {
  border-right: 0;
}

.round-summary > div:first-child {
  grid-column: 1 / -1;
}

.simple-list,
.ledger-list,
.history-list,
.deposit-list {
  display: grid;
  gap: 2px;
}

.ledger-list > div {
  display: grid;
  gap: 2px;
}

.simple-list article,
.ledger-list article,
.history-list article,
.deposit-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.simple-list article[data-navigate] {
  cursor: pointer;
}

.simple-list article:last-child,
.ledger-list article:last-child,
.history-list article:last-child,
.deposit-list article:last-child {
  border-bottom: 0;
}

.simple-list b,
.ledger-list span,
.history-list b,
.deposit-list b {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.ledger-list b {
  color: var(--ink);
  white-space: nowrap;
}

.ledger-list b.credit {
  color: var(--blue);
}

.ledger-list b.debit {
  color: var(--ink);
}

.ledger-list b.neutral {
  color: var(--muted);
}

.simple-list span,
.history-list span,
.deposit-list span,
.claim-card p,
.progress-row span,
.screen-sticky p {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.simple-list em,
.history-list em,
.deposit-list em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.deposit-list em.pending {
  color: var(--blue);
}

.deposit-list em.done {
  color: var(--green);
}

.deposit-list em.rejected {
  color: var(--red);
}

.selection-panel {
  display: grid;
  gap: 12px;
  min-height: 96px;
  padding: 16px;
}

.purchase-card,
.charge-card,
.insight-card,
.draw-lab {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.purchase-row span,
.purchase-breakdown span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.purchase-row b,
.purchase-breakdown b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
}

.quantity-toggle {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--subtle);
}

.quantity-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.quantity-button.active {
  color: #fff;
  background: var(--blue);
}

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

.insight-title b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
}

.insight-title em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--blue);
  background: #e8f3ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.insight-card p,
.draw-lab p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-row span {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--subtle);
  font-size: 12px;
  font-weight: 850;
}

.picked-numbers,
.ticket-numbers,
.draw-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
}

.ball,
.ticket-numbers i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.empty-pick {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.number-button {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 17px;
  font-weight: 850;
}

.number-button.selected {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.number-button:disabled {
  color: #b0b8c1;
  background: #f2f4f6;
}

.screen-sticky {
  position: fixed;
  left: 50%;
  bottom: calc(66px + var(--safe-bottom));
  z-index: 16;
  display: grid;
  gap: 8px;
  width: min(428px, calc(100vw - 28px));
  margin: 0;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(247, 248, 250, 0), var(--bg) 34%);
  transform: translateX(-50%);
}

.screen-sticky p {
  display: none;
}

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

.ticket-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ticket-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-card header b {
  font-size: 16px;
}

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

.claim-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.claim-topline > span:last-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.claim-label {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.claim-card strong {
  display: block;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: 0;
}

.claim-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.claim-breakdown article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.claim-breakdown span,
.claim-breakdown b {
  display: block;
}

.claim-breakdown span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.claim-breakdown b {
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--subtle);
}

.segment {
  min-height: 42px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
}

.segment.active {
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}

.claim-result {
  padding: 13px 14px;
  border-radius: 8px;
  color: var(--blue);
  background: #e8f3ff;
  font-size: 14px;
  font-weight: 800;
}

.referral-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.referral-card b {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: 0;
}

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

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--subtle);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.form-field {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.compact-field {
  padding: 12px;
  box-shadow: none;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 700;
}

.charge-guide {
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--subtle);
  font-size: 13px;
  font-weight: 750;
}

.empty-card {
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.profile-hero {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(229, 232, 235, 0.8);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.profile-hero img {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  object-fit: cover;
}

.profile-hero h2 {
  font-size: 24px;
  line-height: 1.1;
}

.profile-hero span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-metrics article,
.install-card {
  border: 1px solid rgba(229, 232, 235, 0.8);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.profile-metrics article {
  min-width: 0;
  padding: 13px 10px;
}

.profile-metrics span,
.install-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.profile-metrics b,
.install-card b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
}

.install-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px;
}

.install-icon {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 16px;
  background: #eef6ff;
}

.install-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.install-card p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.install-card .small-button:disabled {
  color: var(--muted);
  background: var(--subtle);
}

.profile-list {
  padding: 2px 0;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  width: min(460px, 100vw);
  padding: 6px 10px calc(6px + var(--safe-bottom));
  border-top: 1px solid rgba(229, 232, 235, 0.88);
  background: #fff;
  box-shadow: 0 -10px 30px rgba(2, 32, 71, 0.08);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 850;
}

.nav-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.05;
}

.nav-item span {
  display: block;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.nav-item.active {
  color: var(--blue);
  background: #e8f3ff;
}

.auth-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: end center;
  padding: 20px;
  background: rgba(25, 31, 40, 0.35);
}

.auth-sheet.open {
  display: grid;
}

.sheet-panel {
  position: relative;
  display: grid;
  gap: 10px;
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sheet-panel h2 {
  margin-bottom: 8px;
  font-size: 25px;
}

.sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: var(--subtle);
  font-size: 22px;
}

.account-list {
  display: grid;
  gap: 2px;
  margin: 4px 0;
}

.account-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

.account-list article:last-child {
  border-bottom: 0;
}

.account-list b {
  color: var(--ink);
  font-size: 14px;
  text-align: right;
}

.notice-panel {
  gap: 12px;
}

.notice-list article {
  align-items: flex-start;
}

.notice-list i {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.danger-button {
  background: var(--red);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  z-index: 40;
  width: min(420px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(25, 31, 40, 0.94);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.success {
  background: rgba(25, 31, 40, 0.94);
}

.toast.error {
  background: rgba(210, 48, 51, 0.96);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body[data-auth="signed-in"][data-screen="home"] .app,
body[data-auth="signed-in"][data-screen="home"] .mobile-app {
  color: var(--ink);
  background: var(--bg);
}

body[data-auth="signed-in"][data-screen="home"] .app-header {
  background: rgba(247, 248, 250, 0.94);
  border-bottom: 1px solid rgba(229, 232, 235, 0.72);
}

body[data-auth="signed-in"][data-screen="home"] .app-header h1,
body[data-auth="signed-in"][data-screen="home"] .section-title h2,
body[data-auth="signed-in"][data-screen="home"] .section-title h3 {
  color: var(--ink);
}

body[data-auth="signed-in"][data-screen="home"] .eyebrow {
  color: var(--blue);
}

body[data-auth="signed-in"][data-screen="home"] .icon-button {
  color: var(--ink);
  border: 1px solid rgba(229, 232, 235, 0.9);
  background: #fff;
  box-shadow: 0 8px 22px rgba(2, 32, 71, 0.055);
}

body[data-auth="signed-in"][data-screen="home"] .notice-button::after {
  border-color: #fff;
}

body[data-auth="signed-in"][data-screen="home"] .profile-button {
  border: 0;
  color: #fff;
  background: linear-gradient(145deg, #3182f6, #0b4fd0);
}

body[data-auth="signed-in"][data-screen="home"] .home-hero-card,
body[data-auth="signed-in"][data-screen="home"] .draw-overview,
body[data-auth="signed-in"][data-screen="home"] #screen-home > .section-block:not(.draw-overview) {
  border: 1px solid rgba(229, 232, 235, 0.84);
  background: #fff;
  box-shadow: 0 12px 32px rgba(2, 32, 71, 0.055);
}

body[data-auth="signed-in"][data-screen="home"] #screen-home > .section-block:not(.draw-overview) {
  padding: 16px;
  border-radius: 8px;
}

body[data-auth="signed-in"][data-screen="home"] .hero-symbol {
  background: #f2f7ff;
  box-shadow: 0 12px 28px rgba(49, 130, 246, 0.12);
}

body[data-auth="signed-in"][data-screen="home"] .hero-balance span,
body[data-auth="signed-in"][data-screen="home"] .home-wallet-meta,
body[data-auth="signed-in"][data-screen="home"] .top-balance span,
body[data-auth="signed-in"][data-screen="home"] .round-summary span,
body[data-auth="signed-in"][data-screen="home"] .simple-list span {
  color: var(--muted);
}

body[data-auth="signed-in"][data-screen="home"] .hero-balance strong b,
body[data-auth="signed-in"][data-screen="home"] .top-balance strong,
body[data-auth="signed-in"][data-screen="home"] .round-summary b,
body[data-auth="signed-in"][data-screen="home"] .simple-list b {
  color: var(--ink);
}

body[data-auth="signed-in"][data-screen="home"] .home-wallet-meta b {
  color: var(--blue);
}

body[data-auth="signed-in"][data-screen="home"] .home-buy-button,
body[data-auth="signed-in"][data-screen="home"] .draw-actions .primary-button {
  background: linear-gradient(135deg, #3182f6, #0064ff);
  box-shadow: 0 14px 30px rgba(49, 130, 246, 0.22);
}

body[data-auth="signed-in"][data-screen="home"] .round-action,
body[data-auth="signed-in"][data-screen="home"] .top-balance > div {
  border: 1px solid rgba(229, 232, 235, 0.9);
  background: #fff;
  box-shadow: 0 8px 22px rgba(2, 32, 71, 0.045);
}

body[data-auth="signed-in"][data-screen="home"] .round-action .action-icon {
  color: var(--blue);
}

body[data-auth="signed-in"][data-screen="home"] .draw-overview {
  gap: 14px;
  padding: 18px;
}

body[data-auth="signed-in"][data-screen="home"] .draw-overview .round-summary {
  gap: 8px;
  overflow: visible;
  border: 0;
  background: transparent;
}

body[data-auth="signed-in"][data-screen="home"] .draw-overview .round-summary > div {
  min-height: 76px;
  padding: 15px 16px;
  border: 1px solid rgba(229, 232, 235, 0.86);
  border-radius: 8px;
  background: #f9fafb;
}

body[data-auth="signed-in"][data-screen="home"] .draw-overview .round-summary > div:first-child {
  padding: 16px;
}

body[data-auth="signed-in"][data-screen="home"] .draw-overview .round-summary > div:nth-child(2),
body[data-auth="signed-in"][data-screen="home"] .draw-overview .round-summary > div:nth-child(3) {
  border-bottom: 1px solid rgba(229, 232, 235, 0.86);
}

body[data-auth="signed-in"][data-screen="home"] .draw-overview .round-summary > div:nth-child(3) {
  border-right: 1px solid rgba(229, 232, 235, 0.86);
}

body[data-auth="signed-in"][data-screen="home"] .status-chip.active {
  color: var(--green);
  background: #e9f8f0;
}

body[data-auth="signed-in"][data-screen="home"] .draw-actions .text-button {
  color: var(--blue);
  background: #f2f6fb;
}

body[data-auth="signed-in"][data-screen="home"] .simple-list article {
  border-bottom-color: rgba(229, 232, 235, 0.82);
}

body[data-auth="signed-in"][data-screen="home"] .simple-list em {
  color: var(--blue);
}

body[data-auth="signed-in"][data-screen="home"] .bottom-nav {
  border-top-color: rgba(229, 232, 235, 0.86);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -12px 32px rgba(2, 32, 71, 0.08);
}

body[data-auth="signed-in"][data-screen="home"] .nav-item {
  color: var(--muted);
}

body[data-auth="signed-in"][data-screen="home"] .nav-item.active {
  color: var(--blue);
  background: #eef6ff;
}

@media (min-width: 780px) {
  html {
    background: #eef1f4;
  }

  .app {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 24px;
    background: #eef1f4;
  }

  .mobile-app {
    height: min(900px, calc(100dvh - 48px));
    border: 1px solid rgba(229, 232, 235, 0.65);
    border-radius: 8px;
    box-shadow: 0 18px 54px rgba(2, 32, 71, 0.08);
  }

  .screen-sticky {
    position: static;
    left: auto;
    width: 100%;
    transform: none;
    padding-top: 0;
    background: transparent;
  }

  .number-grid {
    margin-top: 50px;
  }
}

@media (max-width: 390px) {
  .mobile-app {
    padding-left: 14px;
    padding-right: 14px;
  }

  .balance-card strong b {
    font-size: 39px;
  }

  .home-hero-card {
    gap: 13px;
    padding: 16px;
  }

  .hero-symbol {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .hero-symbol img {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .hero-balance strong b {
    font-size: 38px;
  }

  .section-title h2 {
    font-size: 25px;
  }

  .top-balance > div,
  .round-summary > div,
  .public-board article {
    padding: 12px 10px;
  }

  body[data-auth="signed-in"][data-screen="home"] .draw-overview {
    padding: 16px;
  }

  body[data-auth="signed-in"][data-screen="home"] .draw-overview .round-summary > div,
  body[data-auth="signed-in"][data-screen="home"] .draw-overview .round-summary > div:first-child {
    padding: 15px 14px;
  }

  .top-balance strong,
  .round-summary b,
  .public-board b {
    font-size: 16px;
  }
}
