:root {
  color-scheme: light;
  --yellow: #ffd43b;
  --cream: #fff4c2;
  --orange: #ff8a1f;
  --green: #39c96b;
  --blue: #35a8ff;
  --red: #ff4d5e;
  --ink: #172033;
  --muted: #687086;
  --surface: #fffdf4;
  --line: rgba(23, 32, 51, 0.1);
  --shadow: 0 18px 50px rgba(75, 48, 6, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 212, 59, 0.65), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(53, 168, 255, 0.35), transparent 24%),
    linear-gradient(160deg, #fff6b7 0%, #ffbf5f 42%, #ff6876 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

button {
  font: inherit;
}

.phone {
  position: relative;
  width: min(100vw, 390px);
  height: min(100vh, 844px);
  min-height: 720px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 247, 217, 0.94)),
    repeating-linear-gradient(135deg, rgba(255, 212, 59, 0.1) 0 12px, transparent 12px 26px);
  border: 10px solid rgba(23, 32, 51, 0.88);
  border-radius: 34px;
  box-shadow: 0 30px 80px rgba(23, 32, 51, 0.35);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding: 18px 16px 96px;
}

.screen.active {
  display: flex;
}

.topbar,
.subbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.topbar h1,
.subbar h1,
.hero-copy h2,
.case-stage h2,
.game-card h2,
.invite-panel h2,
.wallet-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 20px;
  line-height: 1.05;
}

.subbar h1 {
  flex: 1;
  text-align: center;
  font-size: 22px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: rgba(23, 32, 51, 0.68);
}

.icon-button,
.wallet-pill,
.primary-button,
.secondary-button,
.ghost-button,
.text-button,
.task-row,
.tab,
.price-list button,
.settings-list button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.11);
}

.avatar {
  font-size: 24px;
}

.wallet-pill {
  margin-left: auto;
  padding: 11px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.hero-panel {
  position: relative;
  min-height: 270px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  padding: 18px;
  overflow: hidden;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 244, 194, 0.96), rgba(255, 212, 59, 0.92) 52%, rgba(255, 138, 31, 0.9));
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy h2 {
  max-width: 180px;
  font-size: 31px;
  line-height: 0.98;
}

.hero-copy p:not(.eyebrow) {
  max-width: 190px;
  margin: 10px 0 16px;
  color: rgba(23, 32, 51, 0.72);
  font-size: 13px;
  line-height: 1.35;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 900;
}

.primary-button,
.secondary-button {
  color: #ffffff;
  box-shadow: 0 10px 0 rgba(125, 64, 0, 0.18);
}

.primary-button.wide,
.ghost-button.wide {
  width: 100%;
}

.primary-button {
  background: linear-gradient(180deg, #ff7b32, #f24935);
}

.secondary-button {
  background: var(--ink);
}

.secondary-button.muted {
  background: rgba(23, 32, 51, 0.24);
  box-shadow: none;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.1);
}

.splash-screen {
  justify-content: center;
  align-items: center;
  padding: 28px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 31%, rgba(255, 255, 255, 0.8), transparent 33%),
    radial-gradient(circle at 80% 72%, rgba(255, 138, 31, 0.65), transparent 26%),
    linear-gradient(160deg, #fff4c2 0%, #ffd43b 46%, #ff8a1f 100%);
}

.splash-screen h1 {
  margin: 12px 0 6px;
  font-size: 42px;
  line-height: 0.98;
}

.splash-screen p:not(.eyebrow) {
  max-width: 280px;
  margin: 0 0 18px;
  color: rgba(23, 32, 51, 0.72);
  font-size: 15px;
  line-height: 1.42;
}

.splash-mark {
  position: relative;
  z-index: 2;
  width: 164px;
  height: 164px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 10px solid rgba(255, 255, 255, 0.66);
  border-radius: 48px;
  background: #fff7c7;
  font-size: 98px;
  box-shadow: var(--shadow);
}

.splash-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--orange);
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(125, 64, 0, 0.18);
}

.orb-a {
  top: 152px;
  right: 64px;
}

.orb-b {
  top: 302px;
  left: 46px;
}

.orb-c {
  right: 44px;
  bottom: 160px;
}

.mascot {
  position: relative;
  min-height: 180px;
}

.chicken-face {
  position: absolute;
  right: -8px;
  bottom: 16px;
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  border: 8px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #fff7c7;
  font-size: 88px;
  box-shadow: 0 18px 30px rgba(159, 73, 0, 0.22);
}

.coin {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--orange);
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(125, 64, 0, 0.2);
}

.coin-a {
  top: 4px;
  right: 78px;
}

.coin-b {
  top: 48px;
  right: 0;
}

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

.balance-grid article,
.inventory-grid article,
.reward-strip article,
.stat-list article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.06);
}

.balance-grid span,
.stat-list span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.balance-grid strong,
.stat-list strong {
  font-size: 17px;
}

.progress-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.06);
}

.progress-panel span,
.progress-panel em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.progress-panel strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.progress-track {
  grid-column: 1 / -1;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.08);
}

.progress-track span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--orange));
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
}

.text-button {
  background: transparent;
  color: #1683d8;
  font-size: 13px;
  font-weight: 850;
}

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

.task-list.compact {
  margin-top: -6px;
}

.task-row {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.08);
}

.task-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--cream);
  font-size: 23px;
}

.task-row span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

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

.task-row strong {
  font-size: 14px;
}

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

.task-row em {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(57, 201, 107, 0.16);
  color: #16854b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.task-row[data-claimed="true"] {
  opacity: 0.72;
}

.task-row[data-claimed="true"] em {
  background: rgba(23, 32, 51, 0.08);
  color: var(--muted);
}

.case-stage {
  min-height: 435px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle, rgba(255, 212, 59, 0.9), transparent 42%),
    linear-gradient(180deg, #8bdfff, #f7fbff 58%, #fff4c2);
  box-shadow: var(--shadow);
  text-align: center;
}

.case-timer {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.spotlight {
  width: 190px;
  height: 74px;
  margin-bottom: -22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);
  filter: blur(2px);
}

.case-box {
  position: relative;
  width: 174px;
  height: 146px;
  margin-bottom: 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.case-lid,
.case-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 158px;
  border-radius: 20px;
  box-shadow: 0 12px 0 rgba(94, 43, 0, 0.18);
}

.case-lid {
  top: 0;
  height: 48px;
  background: linear-gradient(180deg, #ffef7d, #ff8a1f);
}

.case-body {
  bottom: 0;
  height: 102px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffb334, #ff4d5e);
  color: #ffffff;
  font-size: 34px;
  font-weight: 950;
}

.case-box.opened .case-lid {
  transform: translate(-50%, -42px) rotate(-9deg);
}

.case-box.opened .case-body {
  background: linear-gradient(180deg, #39c96b, #16854b);
}

.case-stage h2 {
  font-size: 26px;
}

.case-stage p {
  max-width: 260px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.reward-strip,
.inventory-grid,
.stat-list {
  display: grid;
  gap: 10px;
}

.reward-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reward-strip article {
  padding: 10px 6px;
  text-align: center;
}

.reward-strip span,
.inventory-grid span {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
}

.reward-strip strong {
  display: block;
  font-size: 11px;
}

.game-list {
  display: grid;
  gap: 14px;
}

.game-card {
  min-height: 158px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.game-card h2 {
  font-size: 26px;
}

.game-card p:not(.eyebrow) {
  max-width: 210px;
  margin: 8px 0 0;
  color: rgba(23, 32, 51, 0.7);
  font-size: 13px;
}

.accent-yellow {
  background: linear-gradient(135deg, #fff4c2, #ffd43b);
}

.accent-green {
  background: linear-gradient(135deg, #d9ffcc, #39c96b);
}

.accent-blue {
  background: linear-gradient(135deg, #cdefff, #35a8ff);
}

.play-stage {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 212, 59, 0.78), transparent 30%),
    linear-gradient(180deg, #cdefff, #fff4c2 70%);
  box-shadow: var(--shadow);
}

.play-hud {
  position: absolute;
  top: 16px;
  right: 16px;
  left: 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.play-hud span {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.play-hud strong {
  color: var(--ink);
}

.falling-prize {
  position: absolute;
  top: 138px;
  left: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin-left: -43px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  font-size: 48px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.basket {
  position: absolute;
  right: 0;
  bottom: 42px;
  left: 0;
  text-align: center;
  font-size: 86px;
}

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

.inventory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-grid article {
  min-height: 136px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.inventory-grid strong {
  font-size: 24px;
}

.inventory-grid small {
  color: var(--muted);
  font-size: 12px;
}

.invite-panel,
.wallet-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 26px 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  text-align: center;
}

.invite-visual {
  width: 170px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff4c2, #ffd43b);
  font-size: 48px;
}

.invite-panel p,
.wallet-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.stat-list {
  grid-template-columns: 1fr;
}

.rank-hero {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff4c2, #ffd43b 55%, #ff8a1f);
  box-shadow: var(--shadow);
  text-align: center;
}

.rank-hero h2 {
  margin: 4px 0;
  font-size: 72px;
  line-height: 0.95;
}

.rank-hero p:not(.eyebrow) {
  margin: 0 auto;
  max-width: 240px;
  color: rgba(23, 32, 51, 0.68);
  font-size: 14px;
  line-height: 1.35;
}

.rank-list,
.settings-list {
  display: grid;
  gap: 10px;
}

.rank-list article,
.settings-list button {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.08);
}

.rank-list span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--cream);
  font-weight: 950;
}

.rank-list strong,
.settings-list span {
  flex: 1;
  font-weight: 900;
}

.rank-list em,
.settings-list strong {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.rank-list .current {
  background: var(--ink);
  color: #ffffff;
}

.rank-list .current em {
  color: rgba(255, 255, 255, 0.72);
}

.wallet-logo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #35a8ff, #1676ff);
  color: #ffffff;
  font-size: 40px;
}

.profile-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 20px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff4c2, #ffd43b);
  box-shadow: var(--shadow);
  text-align: center;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 6px solid rgba(255, 255, 255, 0.68);
  border-radius: 30px;
  background: #fffdf4;
  font-size: 54px;
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.profile-card p {
  color: rgba(23, 32, 51, 0.68);
  font-size: 13px;
  font-weight: 750;
}

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

.price-list button {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.08);
}

.price-list strong {
  color: #1683d8;
}

.tabbar {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(23, 32, 51, 0.17);
  backdrop-filter: blur(14px);
}

.phone[data-current-screen="splash"] .tabbar {
  display: none;
}

.tab {
  min-width: 0;
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.tab span {
  font-size: 19px;
}

.tab.active {
  background: var(--ink);
  color: #ffffff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 32, 51, 0.42);
}

.modal {
  position: relative;
  width: min(330px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px 20px 20px;
  border-radius: 28px;
  background: var(--surface);
  text-align: center;
  box-shadow: 0 30px 80px rgba(23, 32, 51, 0.32);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(23, 32, 51, 0.08);
  color: var(--ink);
  font-size: 25px;
  cursor: pointer;
}

.modal-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--cream);
  font-size: 42px;
}

.modal h2,
.modal p {
  margin: 0;
}

.modal p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 430px) {
  body {
    display: block;
    background: var(--surface);
  }

  .phone {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }
}
