:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --card: rgba(255, 255, 255, 0.95);
  --text: #1b1f26;
  --muted: #77808c;
  --border: #cfd5dd;
  --fieldBg: #ffffff;
  --shadow: 0 14px 32px rgba(16, 24, 40, 0.12);
  --gold: #ffed00;
  --gold2: #e6d600;
  --radius: 16px;
  --radius2: 12px;
  --safeTop: env(safe-area-inset-top);
  --safeBottom: env(safe-area-inset-bottom);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans",
    "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, var(--bg), #ffffff);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -10%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520' viewBox='0 0 520 520'%3E%3Cg fill='none' stroke='%23FFED00' stroke-linecap='round' opacity='0.24'%3E%3Cpath stroke-width='18' d='M-30 120C70 20 160 20 260 120S450 220 550 120'/%3E%3Cpath stroke-width='14' d='M-40 310C80 210 170 210 260 310S440 410 560 310'/%3E%3Cpath stroke-width='10' d='M40 470C140 370 220 380 300 460S430 540 520 450'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 520px 520px;
  background-repeat: repeat;
  pointer-events: none;
}

.app {
  min-height: 100%;
}

.screen {
  min-height: 100%;
  padding: calc(18px + var(--safeTop)) 18px calc(18px + var(--safeBottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 420px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding-top: 6px;
}

.avatar {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7a8, var(--gold));
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(255, 237, 0, 0.22);
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.95);
}

.avatarImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.85);
}

.heading {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.subheading {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.card {
  width: 100%;
  background: var(--card);
  border: 1px solid rgba(207, 213, 221, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(10px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 12px;
  color: var(--muted);
}

.input,
.select {
  width: 100%;
  height: 44px;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: var(--fieldBg);
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}

.input::placeholder {
  color: rgba(119, 128, 140, 0.85);
}

.input:focus,
.select:focus {
  border-color: rgba(255, 237, 0, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 237, 0, 0.25);
}

.row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 2px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(27, 31, 38, 0.8);
  user-select: none;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.error {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius2);
  border: 1px solid rgba(255, 91, 106, 0.35);
  background: rgba(255, 91, 106, 0.1);
  color: rgba(27, 31, 38, 0.92);
  font-size: 13px;
  line-height: 1.3;
}

.primary {
  height: 46px;
  border-radius: var(--radius2);
  border: none;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  color: rgba(27, 31, 38, 0.95);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.2px;
  box-shadow: 0 12px 18px rgba(230, 214, 0, 0.32);
}

.primary:active {
  transform: translateY(1px);
}

.primary:disabled {
  opacity: 0.75;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(27, 31, 38, 0.72);
  font-size: 12px;
  padding-bottom: 4px;
}

.link {
  color: rgba(27, 31, 38, 0.88);
  text-decoration: none;
  font-weight: 750;
}

.link:active {
  opacity: 0.85;
}

.unsupported {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.unsupportedCard {
  width: min(520px, 100%);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow);
  padding: 18px;
}

.unsupportedTitle {
  margin: 0;
  font-size: 18px;
}

.unsupportedText {
  margin: 10px 0 0;
  color: rgba(27, 31, 38, 0.76);
}

.unsupportedHint {
  margin: 8px 0 0;
  color: rgba(27, 31, 38, 0.62);
}

html[data-support="unsupported"] .app {
  display: none;
}

html[data-support="unsupported"] .unsupported {
  display: flex;
}

@media (min-width: 768px) {
  html:not([data-support="mobile"]) .app {
    display: none;
  }
  html:not([data-support="mobile"]) .unsupported {
    display: flex;
  }
}
