:root {
  color-scheme: dark;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #111318;
  color: #f5f6fa;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 520px;
  margin: auto;
  padding: 24px 22px max(25px, env(safe-area-inset-bottom));
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.brand {
  font-size: 9px;
  letter-spacing: 2px;
  line-height: 1.6;
  color: #f5f6fa;
  text-decoration: none;
}
.brand strong {
  font-size: 19px;
  letter-spacing: 3px;
}
.brand span {
  color: #c8f560;
  margin-left: 8px;
}
.balance {
  text-align: right;
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 8px;
  align-items: baseline;
}
.balance > span {
  grid-column: 1/-1;
  font-size: 10px;
  color: #a8afbf;
}
.balance strong {
  font-size: 28px;
}
.balance small {
  color: #a8afbf;
  font-size: 11px;
}
nav {
  display: flex;
  background: #1d2029;
  padding: 4px;
  border: 1px solid #2c303d;
  border-radius: 16px;
  gap: 4px;
}
.tab {
  flex: 1;
  min-width: 0;
  font-weight: 650;
  background: transparent;
  color: #a8afbf;
  padding: 12px 10px;
  border: 0;
  border-radius: 12px;
}
.tab.active {
  background: #343044;
  color: #f5f6fa;
}
.intro {
  text-align: center;
  padding-top: 26px;
}
.tag {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a78bfa;
  font-weight: 700;
}
h1 {
  font-size: clamp(34px, 9vw, 44px);
  letter-spacing: -1.7px;
  line-height: 1.08;
  margin: 12px 0;
}
em {
  color: #c8f560;
  font-style: normal;
}
.intro p,
.hint,
.foot {
  font-size: 12px;
  line-height: 1.6;
  color: #a8afbf;
}
.wheel-wrap {
  position: relative;
  margin: 28px auto 24px;
  width: min(100%, 350px);
  aspect-ratio: 1;
}
canvas {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 30px #07080d);
  border: 7px solid #343044;
  border-radius: 50%;
}
.pointer {
  position: absolute;
  z-index: 2;
  color: #c8f560;
  font-size: 36px;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  text-shadow: 0 2px 6px #111318;
}
.hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 6px solid #111318;
  border-radius: 50%;
  background: #c8f560;
  color: #111318;
  font-size: 40px;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
}
.card {
  background: #1d2029;
  border: 1px solid #303442;
  border-radius: 20px;
  padding: 20px;
  margin: 18px 0;
}
.card h2 {
  font-size: 19px;
  margin: 0 0 8px;
}
.card p {
  color: #a8afbf;
  line-height: 1.6;
  font-size: 13px;
}
.card a {
  display: block;
  color: #c8f560;
  padding: 10px 0;
  overflow-wrap: anywhere;
}
button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.primary,
.secondary {
  width: 100%;
  border-radius: 15px;
  padding: 16px 12px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #373c4c;
}
.primary {
  color: #111318;
  background: #c8f560;
  border-color: #c8f560;
}
.secondary {
  background: #242733;
  color: #f5f6fa;
}
.primary:disabled,
.secondary:disabled {
  opacity: 0.45;
  cursor: default;
}
.actions {
  text-align: center;
}
.actions p {
  min-height: 20px;
  margin: 8px 0 14px;
}
.catalog {
  font-size: 12px;
  color: #a8afbf;
  margin: 22px 0;
}
.catalog summary {
  padding: 10px;
  cursor: pointer;
}
.catalog ul {
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.utility {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid #303442;
  margin-top: 20px;
}
.utility span {
  max-width: 150px;
  font-size: 10px;
  color: #a8afbf;
}
.text-button {
  background: none;
  border: 0;
  color: #a78bfa;
  padding: 9px 0;
  font-size: 12px;
}
.foot {
  text-align: center;
  font-size: 10px;
  margin-top: 24px;
}
#error {
  color: #f5c76b;
  line-height: 1.5;
  font-size: 13px;
}
#prizes-view {
  padding-top: 26px;
}
.prize-card {
  text-align: left;
  margin-top: 12px;
  background: #1d2029;
  border: 1px solid #303442;
  padding: 18px;
  border-radius: 18px;
  width: 100%;
  color: #f5f6fa;
}
.prize-card strong {
  display: block;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.prize-card span {
  display: block;
  color: #a8afbf;
  font-size: 11px;
  margin-top: 8px;
}
dialog {
  background: #1d2029;
  color: #f5f6fa;
  border: 1px solid #454a5d;
  border-radius: 26px;
  padding: 30px 24px 22px;
  width: min(92vw, 430px);
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #06070bcc;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 28px;
  letter-spacing: -0.7px;
  overflow-wrap: anywhere;
}
dialog p {
  font-size: 13px;
  line-height: 1.65;
  color: #c3c7d1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.close {
  position: absolute;
  right: 14px;
  top: 10px;
  font-size: 25px;
  background: none;
  border: 0;
  color: #a8afbf;
  padding: 6px;
}
#result-code code {
  display: block;
  border: 1px dashed #686077;
  padding: 16px;
  border-radius: 12px;
  margin: 14px 0;
  word-break: break-all;
  user-select: all;
  color: #c8f560;
  font-size: 18px;
}
#result-code button {
  margin-bottom: 10px;
}
#result-links a {
  display: block;
  text-align: center;
  background: #343044;
  color: #f5f6fa;
  text-decoration: none;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 12px;
}
#result-hint {
  min-height: 18px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #c8f560;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 360px) {
  main {
    padding: 16px;
  }
  .wheel-wrap {
    width: 290px;
    max-width: 100%;
  }
  .utility span {
    max-width: 130px;
  }
}
#referral-url {
  width: 100%;
  box-sizing: border-box;
  background: #111318;
  color: #f5f6fa;
  border: 1px solid #51436c;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
  font: inherit;
}
#referral-copy {
  width: 100%;
}
#referral-stats .card {
  margin: 16px 0;
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}

.activity-card {
  margin-top: 16px;
}
.activity-card button,
#survey-form button,
#task-detail button {
  margin-top: 12px;
  width: 100%;
}
.survey-choices {
  border: 0;
  padding: 0;
  margin: 18px 0;
}
.survey-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  margin: 8px 0;
  border: 1px solid #51436c;
  border-radius: 12px;
  cursor: pointer;
}
.survey-choice:has(input:checked) {
  background: #312b43;
  border-color: #c8f560;
}
.survey-choice input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: #c8f560;
}
#activity-message {
  color: #c8f560;
  overflow-wrap: anywhere;
}
.channel-link {
  display: block;
  text-align: center;
  padding: 16px;
  border-radius: 14px;
  background: #51436c;
  color: #fff;
  text-decoration: none;
  margin-top: 16px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.activity-card,
#survey-form,
#task-detail {
  overflow-wrap: anywhere;
}
@media (max-width: 360px) {
  .tab {
    padding: 12px 4px;
    font-size: 13px;
    white-space: nowrap;
  }
}
