:root {
  color-scheme: dark;
  --page: #061521;
  --surface: #02080c;
  --surface-soft: #082637;
  --surface-blue: #063f5d;
  --line: #1a6386;
  --line-bright: #0ba6e7;
  --text: #f8fbff;
  --muted: #8295ab;
  --blue: #149bd8;
  --blue-soft: #6bcdf7;
  --green: #62f06d;
  --pink: #ff2b72;
  --nav-h: 76px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  letter-spacing: 0;
  overflow-x: hidden;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p {
  margin: 0;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 8px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  background: #064663;
  position: relative;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 54px -80px auto;
  height: 395px;
  border: 3px solid rgba(106, 205, 247, 0.17);
  transform: rotate(45deg);
  border-radius: 62px;
  pointer-events: none;
}

.screen {
  display: none;
  position: relative;
  z-index: 1;
}

.screen.active {
  display: block;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 178px;
}

.brand {
  padding-top: 20px;
  display: flex;
  align-items: baseline;
}

.brand-main {
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-sub {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.wallet-card {
  width: 118px;
  min-height: 100px;
  margin-top: 14px;
  padding: 15px 12px 14px;
  border-radius: 22px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 1fr 30px;
  gap: 10px 7px;
  align-items: center;
  text-align: left;
}

.wallet-amount {
  font-size: 24px;
  font-weight: 900;
}

.wallet-icon,
.metric-button .gear,
.menu-icon,
.nav-icon {
  display: inline-block;
  position: relative;
}

.wallet-icon {
  width: 30px;
  height: 24px;
  border-radius: 10px;
  background: var(--blue-soft);
}

.wallet-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 8px;
  width: 17px;
  height: 11px;
  border-radius: 8px;
  background: var(--surface-blue);
  border: 2px solid var(--blue);
}

.wallet-label {
  grid-column: 1 / -1;
  display: block;
  padding: 10px 9px;
  border-radius: 16px;
  background: var(--blue);
  text-align: center;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.subscription-card,
.large-panel,
.bonus-panel,
.links-panel,
.profile-card {
  background: var(--surface);
  border-radius: 28px;
  border: 1px solid rgba(106, 205, 247, 0.2);
}

.subscription-card {
  padding: 0 18px 20px;
  margin-top: -46px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 8px;
  border-radius: 22px;
  background: #010608;
}

.compact-tabs {
  width: min(100%, 294px);
  margin: -24px auto 22px;
  border: 1px solid var(--line);
}

.tab {
  min-height: 38px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 850;
  font-size: 14px;
}

.tab.active {
  color: var(--text);
  background: var(--surface-blue);
  outline: 2px solid var(--line-bright);
}

.days-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 14px 0 8px;
}

.days-row strong {
  font-size: 64px;
  line-height: 0.9;
  font-weight: 900;
}

.days-row span:last-child {
  font-size: 24px;
  font-weight: 850;
}

.burst {
  width: 48px;
  height: 48px;
  background: var(--surface-blue);
  border: 2px solid var(--line);
  transform: rotate(14deg);
  clip-path: polygon(50% 0, 61% 22%, 85% 10%, 78% 36%, 100% 50%, 78% 64%, 85% 90%, 61% 78%, 50% 100%, 39% 78%, 15% 90%, 22% 64%, 0 50%, 22% 36%, 15% 10%, 39% 22%);
}

.price-line {
  margin: 0 0 18px;
  color: #25c7ff;
  font-size: 17px;
  font-weight: 750;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.metric-button {
  min-width: 0;
  min-height: 66px;
  border-radius: 17px;
  background: var(--surface-soft);
  padding: 12px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  text-align: left;
  font-weight: 850;
}

.metric-button span {
  min-width: 0;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.metric-button b {
  min-width: 42px;
  padding: 7px 8px;
  border-radius: 15px;
  background: var(--surface-blue);
  font-size: 16px;
  text-align: center;
}

.gear {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  flex: 0 0 auto;
}

.gear::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--surface);
}

.primary,
.outline {
  min-height: 50px;
  border-radius: 18px;
  padding: 0 18px;
  font-weight: 850;
  font-size: 17px;
  line-height: 1.15;
}

.primary {
  background: var(--blue);
}

.outline {
  background: var(--surface-blue);
  border: 2px solid var(--line-bright);
}

.wide {
  width: 100%;
}

.invite-banner {
  width: 100%;
  margin-top: 14px;
  margin-bottom: 12px;
  min-height: 96px;
  padding: 16px;
  border-radius: 26px;
  background: #031117;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.invite-banner b {
  display: block;
  font-size: 21px;
  line-height: 1.18;
  margin-bottom: 10px;
}

.invite-banner small {
  color: var(--blue-soft);
  font-size: 15px;
}

.invite-banner strong {
  color: var(--text);
  font-size: 18px;
}

.mascot {
  width: 76px;
  height: 72px;
  border-radius: 50%;
  background: #9cdff8;
  border: 10px solid #f0f6ff;
  box-shadow: -20px 13px 0 #2aa9cf, 18px -11px 0 #a472ff;
  flex: 0 0 auto;
}

.large-panel {
  min-height: 520px;
  margin-top: 74px;
  padding: 30px 18px 18px;
}

.sub-item {
  margin-top: 22px;
  padding: 18px 16px;
  border-radius: 21px;
  background: var(--surface-soft);
}

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

.star-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #d333bd;
  clip-path: polygon(50% 0, 62% 34%, 98% 35%, 69% 56%, 80% 92%, 50% 70%, 20% 92%, 31% 56%, 2% 35%, 38% 34%);
}

.sub-head h2 {
  font-size: 19px;
  margin-top: 7px;
}

.link-button {
  margin-top: 6px;
  padding: 0;
  background: transparent;
  color: var(--blue-soft);
  font-size: 13px;
}

.state {
  margin-top: 8px;
  text-align: right;
  color: var(--green);
  font-size: 14px;
}

.sub-stats,
.profile-list {
  margin: 22px 0 18px;
}

.sub-stats div,
.profile-list div {
  display: grid;
  grid-template-columns: 44% 56%;
  align-items: baseline;
  min-height: 32px;
}

dt {
  color: var(--muted);
  font-size: 16px;
  font-weight: 750;
}

dd {
  margin: 0;
  text-align: right;
  font-size: 16px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.bonus-panel {
  margin-top: 74px;
  padding: 24px 18px 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-head.inline {
  justify-content: flex-start;
  gap: 14px;
}

.panel-head h1 {
  font-size: 28px;
}

.circle-help {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-blue);
  border: 2px solid var(--line);
  color: var(--blue);
  font-size: 23px;
  font-weight: 900;
}

.circle-help.small {
  width: 32px;
  height: 32px;
  font-size: 21px;
}

.bonus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bonus-grid div {
  min-height: 78px;
  padding: 13px 12px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.bonus-grid span {
  display: block;
  font-size: 16px;
  font-weight: 780;
}

.bonus-grid b {
  display: block;
  margin-top: 14px;
  font-size: 23px;
}

.green {
  color: var(--green);
}

.links-panel {
  margin-top: 14px;
  padding: 22px 18px 20px;
}

.plus {
  font-size: 30px;
  line-height: 0;
  vertical-align: -3px;
  margin-right: 14px;
}

.ref-link {
  margin-top: 18px;
  min-height: 112px;
  padding: 17px;
  border-radius: 20px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  position: relative;
}

.ref-link h2 {
  font-size: 21px;
}

.ref-link p {
  margin-top: 30px;
  color: #30c8ff;
  font-size: 16px;
}

.copy {
  align-self: start;
  background: var(--surface-blue);
  border-radius: 14px;
  padding: 8px 10px;
  color: var(--text);
}

.tag {
  position: absolute;
  top: 17px;
  right: 17px;
  transform: translateY(43px);
  background: #1b351f;
  color: #ffc600;
  padding: 6px 11px;
  border-radius: 14px;
  font-size: 13px;
}

.ref-link strong {
  position: absolute;
  right: 20px;
  bottom: 17px;
  color: var(--green);
  background: #134a29;
  border-radius: 14px;
  padding: 6px 11px;
  font-size: 18px;
}

.profile-card {
  margin-top: 58px;
  padding: 22px 18px 18px;
}

.person-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--surface-soft);
  object-fit: cover;
}

.person-row h1 {
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.person-row p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.pink {
  color: var(--pink);
}

.profile-menu {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.profile-menu button {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  font-size: 17px;
  font-weight: 760;
}

.menu-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 2px solid var(--line);
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 36px), 378px);
  height: 68px;
  padding: 7px 9px;
  border-radius: 28px;
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.bottom-nav button {
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 740;
}

.bottom-nav button.active {
  color: var(--blue-soft);
}

.nav-icon {
  width: 23px;
  height: 23px;
  color: currentColor;
}

.nav-icon.home::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 16px;
  height: 12px;
  background: currentColor;
  border-radius: 4px 4px 2px 2px;
}

.nav-icon.home::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 4px;
  clip-path: polygon(0 0, 100% 0, 100% 48%, 0 48%);
}

.nav-icon.subs,
.nav-icon.card,
.nav-icon.profile {
  border-radius: 8px;
  background: currentColor;
}

.nav-icon.subs::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 3px;
  width: 8px;
  height: 19px;
  border-radius: 5px;
  background: currentColor;
  opacity: 0.75;
}

.nav-icon.card {
  height: 19px;
  margin-top: 3px;
}

.nav-icon.card::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 7px;
  height: 3px;
  background: var(--surface);
}

.nav-icon.profile {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.nav-icon.profile::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 16px;
  width: 26px;
  height: 10px;
  border-radius: 13px 13px 4px 4px;
  background: currentColor;
}

.sheet {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  display: grid;
  place-items: end center;
  padding: 20px;
}

.sheet-panel {
  width: min(100%, 386px);
  padding: 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.sheet-panel h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.sheet-panel p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 18px;
}

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

  .brand-main {
    font-size: 28px;
  }

  .wallet-card {
    width: 112px;
  }

  .days-row strong {
    font-size: 58px;
  }

  .primary,
  .outline {
    font-size: 16px;
  }
}
