:root {
  color-scheme: dark;

  --bg: #050914;
  --bg2: #0b1a3a;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.14);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);

  --primary: #22c55e;
  --danger: #ef4444;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);

  --radius: 16px;
}

* { box-sizing: border-box; }

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

html {
  background:
    radial-gradient(900px 460px at 70% 15%, rgba(255, 255, 255, 0.10), transparent 55%),
    radial-gradient(700px 420px at 12% 0%, rgba(96, 165, 250, 0.18), transparent 52%),
    radial-gradient(800px 500px at 100% 10%, rgba(59, 130, 246, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.45;
  background: transparent;
  color: var(--text);
}

a { color: inherit; }

.container {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.stack { display: grid; gap: 14px; }

.home-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 980px) {
  .home-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10, 16, 30, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-small .brand-mark { width: 36px; height: 36px; font-size: 13px; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.85), rgba(59, 130, 246, 0.75));
  box-shadow: var(--shadow);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-title { font-weight: 700; }
.brand-subtitle { color: var(--muted); font-size: 13px; }

.hero {
  padding: 8px 2px;
}

.hero-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.hero-text {
  margin: 8px 0 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0;
  font-size: 16px;
}

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

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

.field { display: grid; gap: 8px; }
.field-label { font-size: 13px; color: var(--muted); }

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  outline: none;
}

input::placeholder { color: rgba(255, 255, 255, 0.5); }

input:focus {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.button:disabled { opacity: 0.6; cursor: not-allowed; }

.button-primary {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(34, 197, 94, 0.65));
  border-color: rgba(34, 197, 94, 0.5);
}

.button-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(239, 68, 68, 0.65));
  border-color: rgba(239, 68, 68, 0.55);
}

.button-ghost {
  width: auto;
  padding: 10px 12px;
  background: transparent;
}

.button-small {
  width: auto;
  padding: 10px 12px;
}

.link {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.link:hover { text-decoration: underline; }

.notice {
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  white-space: pre-wrap;
}

.notice-info { border-color: rgba(255, 255, 255, 0.18); }
.notice-success { border-color: rgba(34, 197, 94, 0.55); }
.notice-error { border-color: rgba(239, 68, 68, 0.6); }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.tag-ok { border-color: rgba(34, 197, 94, 0.55); color: rgba(255, 255, 255, 0.88); }
.tag-warn { border-color: rgba(239, 68, 68, 0.55); color: rgba(255, 255, 255, 0.88); }

.item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.16);
}

.item-title { font-weight: 700; }
.item-sub { font-size: 13px; }

.item-actions {
  display: flex;
  justify-content: flex-start;
}

.cannot-select {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.cannot-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}

.cannot-summary::-webkit-details-marker { display: none; }

.cannot-list {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.cannot-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.90);
}

.cannot-item input[type="checkbox"] {
  margin-top: 2px;
}

.cannot-text {
  line-height: 1.25;
}

.profile {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.profile-name { font-weight: 800; }

.result-title { font-size: 13px; color: var(--muted); margin-top: 10px; }
.result-name { font-size: 18px; font-weight: 800; margin-top: 4px; }

.result-photo {
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 10px;
}

.result-list { margin: 8px 0 0; padding-left: 18px; color: rgba(255, 255, 255, 0.88); }

@media (min-width: 720px) {
  .container { padding: 24px; }
  .hero-title { font-size: 34px; }
  .button { width: auto; }
  .item { grid-template-columns: 1fr auto; align-items: center; }
  .item-actions { justify-content: flex-end; }
}

@media (min-width: 980px) {
  .container { width: min(1100px, 100%); }
  .stack { gap: 18px; }
  .card { padding: 18px; }
  .hero { padding: 14px 2px; }
}

/* Holiday snow (garantia no app shell) */
:root {
  --holiday-snow-opacity: 0.7;
  --holiday-snow-secondary-opacity: 0.45;
}

.holiday-snow-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: var(--holiday-snow-opacity);
  mix-blend-mode: normal;
}

/* Mantém a neve atrás da UI */
body > *:not(.holiday-snow-layer) {
  position: relative;
  z-index: 1;
}

.holiday-snow-layer::before,
.holiday-snow-layer::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-repeat: repeat;
  opacity: 0.9;
  mix-blend-mode: normal;
}

.holiday-snow-layer::before {
  background-image:
    radial-gradient(4px 4px at 20px 20px, rgba(255, 255, 255, 0.9) 50%, transparent 55%),
    radial-gradient(6px 6px at 130px 80px, rgba(255, 255, 255, 0.85) 50%, transparent 55%),
    radial-gradient(3px 3px at 50px 150px, rgba(255, 255, 255, 0.7) 50%, transparent 55%),
    radial-gradient(5px 5px at 180px 40px, rgba(255, 255, 255, 0.65) 50%, transparent 55%);
  background-size: 220px 220px;
  animation: holidaySnowFall 22s linear infinite;
}

.holiday-snow-layer::after {
  background-image:
    radial-gradient(3px 3px at 80px 60px, rgba(255, 255, 255, 0.85) 50%, transparent 55%),
    radial-gradient(4px 4px at 150px 20px, rgba(255, 255, 255, 0.8) 50%, transparent 55%),
    radial-gradient(5px 5px at 40px 120px, rgba(255, 255, 255, 0.6) 50%, transparent 55%),
    radial-gradient(4px 4px at 200px 200px, rgba(255, 255, 255, 0.75) 50%, transparent 55%);
  background-size: 260px 260px;
  opacity: var(--holiday-snow-secondary-opacity);
  animation: holidaySnowDrift 30s linear infinite;
}

@keyframes holidaySnowFall {
  0% { transform: translate3d(0, -10%, 0); }
  100% { transform: translate3d(-10%, 100%, 0); }
}

@keyframes holidaySnowDrift {
  0% { transform: translate3d(0, -20%, 0); }
  100% { transform: translate3d(10%, 100%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .holiday-snow-layer::before,
  .holiday-snow-layer::after {
    animation: none;
  }
}

/* Hero banner: embed /hero/index.html (edge-to-edge) */
.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(900px 460px at 70% 15%, rgba(255, 255, 255, 0.10), transparent 55%),
    radial-gradient(700px 420px at 12% 0%, rgba(96, 165, 250, 0.18), transparent 52%),
    radial-gradient(800px 500px at 100% 10%, rgba(59, 130, 246, 0.14), transparent 60%),
    linear-gradient(180deg, #050914 0%, #070f24 42%, #0b1a3a 100%);
}

.hero-stage {
  display: grid;
  place-items: center;
  min-height: 46vh;
  padding: 0;
}

@media (max-width: 719px) {
  .hero-stage { min-height: 100svh; }
}

.hero-anim {
  width: 100vw;
  height: 46vh;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 719px) {
  .hero-anim {
    width: 100vw;
    height: 100svh;
  }
}

/* evita bloquear scroll no mobile (o iframe capturaria swipe/drag) */
@media (max-width: 719px) {
  .hero-anim { pointer-events: none; }
}

.scroll-hint {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.90);
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: hintIn 0.9s ease forwards;
  animation-delay: 5s;
}

.scroll-hint::before {
  content: attr(data-desktop);
  display: block;
  line-height: 1.1;
}

.scroll-hint::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 8px auto 0;
  border-right: 2px solid rgba(255, 255, 255, 0.70);
  border-bottom: 2px solid rgba(255, 255, 255, 0.70);
  transform: rotate(45deg);
  opacity: 0.85;
  animation: hintBob 1.2s ease-in-out infinite;
}

@keyframes hintIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes hintBob {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(2px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint::after { animation: none !important; }
  .scroll-hint { opacity: 1; transform: translateX(-50%); }
}

@media (max-width: 719px) {
  .scroll-hint::before { content: attr(data-mobile); }
  .scroll-hint {
    border-color: rgba(255, 255, 255, 0.20);
    background: rgba(0, 0, 0, 0.26);
    font-weight: 800;
  }
}
