:root {
  --bg: #0f0816;
  --bg-2: #1a0f27;
  --card: #251634;
  --card-2: #2f1d42;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f8eff9;
  --muted: #b9a7c9;
  --rose: #ff5c8a;
  --rose-2: #ff8fab;
  --gold: #f6c177;
  --violet: #9b7bff;
  --r-amei: #ff5c8a;
  --r-desafiadora: #ffa24a;
  --r-desculpa: #6ec1ff;
  --r-constrangedora: #c58bff;
  --r-odiei: #ff6b6b;
  --radius: 22px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(120% 60% at 15% -10%, rgba(255, 92, 138, 0.22), transparent 60%),
    radial-gradient(90% 50% at 100% 0%, rgba(155, 123, 255, 0.2), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
  background-attachment: fixed;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.screen.fresh {
  animation: fade-in 0.35s ease both;
}
.screen.center {
  justify-content: center;
  text-align: center;
  align-items: stretch;
}

h1,
h2,
p {
  margin: 0;
}
.title {
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1.15;
  text-align: center;
  font-weight: 600;
}
.muted {
  color: var(--muted);
  font-size: 0.95rem;
}
.center-text {
  text-align: center;
}
.fineprint {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  opacity: 0.85;
  margin-top: auto;
  padding-top: 8px;
}
.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 30ch;
  margin: 0 auto 8px;
}
.error {
  color: #ff9aa8;
  font-size: 0.92rem;
  text-align: center;
}

/* logo */
.logo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 6px auto 4px;
}
.orb {
  position: absolute;
  top: -4px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  mix-blend-mode: screen;
  filter: blur(0.3px);
}
.orb.a {
  left: calc(50% - 40px);
  background: radial-gradient(circle at 35% 30%, #ff9ab5, var(--rose) 60%, #c9306a);
  animation: float 5s ease-in-out infinite;
}
.orb.b {
  left: calc(50% - 14px);
  background: radial-gradient(circle at 35% 30%, #ffe3b0, var(--gold) 60%, #c78a3c);
  animation: float 5s ease-in-out -2.5s infinite;
}
.logo-text {
  margin-top: 62px;
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}
.logo.big .orb {
  width: 76px;
  height: 76px;
}
.logo.big .orb.a {
  left: calc(50% - 56px);
}
.logo.big .orb.b {
  left: calc(50% - 20px);
}
.logo.big .logo-text {
  margin-top: 84px;
  font-size: 2.6rem;
}

/* botões */
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 58px;
  padding: 14px 20px;
  border-radius: 18px;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.2s ease, opacity 0.2s ease;
}
.btn:active:not(:disabled) {
  transform: scale(0.98);
}
.btn.primary {
  background: linear-gradient(135deg, var(--rose), #d9406f 55%, #a9378f);
  box-shadow: 0 10px 28px rgba(255, 92, 138, 0.32);
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}
.btn.text {
  background: transparent;
  color: var(--muted);
  min-height: 46px;
  font-size: 0.95rem;
  font-weight: 500;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.link {
  appearance: none;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  padding: 10px 4px;
  min-height: 44px;
  cursor: pointer;
}
.link.small {
  font-size: 0.85rem;
}
.back {
  appearance: none;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--text);
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 1.3rem;
  cursor: pointer;
}
.install-tip {
  color: var(--muted);
  font-size: 0.85rem;
}

/* formulários */
.input {
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  outline: none;
  text-align: center;
}
.input:focus {
  border-color: var(--rose-2);
  box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.25);
}
.code-input {
  letter-spacing: 0.35em;
  font-weight: 700;
  font-size: 1.4rem;
  text-transform: uppercase;
}

/* regras de boas-vindas */
.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.rules li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.rule-icon {
  font-size: 1.5rem;
  line-height: 1.2;
}

/* topo */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 92, 138, 0.16);
  color: var(--rose-2);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* lobby */
.code-box {
  appearance: none;
  border: 1px dashed rgba(246, 193, 119, 0.55);
  background: rgba(246, 193, 119, 0.07);
  color: var(--text);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font: inherit;
}
.code-label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.code-value {
  font-family: var(--serif);
  font-size: 2.6rem;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
}
.players {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.player.ready {
  border-color: rgba(110, 231, 160, 0.5);
}
.player.empty {
  opacity: 0.6;
  border-style: dashed;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6b5a7a;
  flex: none;
}
.dot.on {
  background: #6ee7a0;
  box-shadow: 0 0 10px #6ee7a0;
}
.pname {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pstate {
  font-size: 0.8rem;
  color: var(--muted);
}
.section-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 6px;
}
.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.chip {
  appearance: none;
  min-height: 58px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}
.chip.active {
  background: linear-gradient(135deg, var(--rose), #a9378f);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(255, 92, 138, 0.3);
}

/* jogo */
.game {
  gap: 12px;
}
.progress {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  border-radius: 6px;
  transition: width 0.5s ease;
}
.round {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.banner,
.offline {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(246, 193, 119, 0.14);
  border: 1px solid rgba(246, 193, 119, 0.35);
  color: var(--gold);
  font-size: 0.88rem;
  text-align: center;
}
.offline {
  margin-bottom: 10px;
}
.role {
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  align-self: center;
  max-width: 100%;
}
.role.asker {
  background: rgba(255, 92, 138, 0.18);
  color: var(--rose-2);
}
.role.answerer {
  background: rgba(155, 123, 255, 0.18);
  color: #c9b8ff;
}
.card {
  position: relative;
  border-radius: 28px;
  padding: 22px 22px 18px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
}
.card.front {
  background: linear-gradient(160deg, var(--card-2), var(--card) 60%, #1c1029);
  border: 1px solid rgba(246, 193, 119, 0.35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.card.back {
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 10px, transparent 10px 20px),
    linear-gradient(160deg, #3b1f52, #1d1029);
  border: 1px solid var(--line);
}
.card.enter {
  animation: flip-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}
.theme {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.intensity {
  letter-spacing: 0.1em;
  color: var(--gold);
  font-size: 0.72rem;
  text-transform: uppercase;
}
.intensity.w3 {
  color: var(--rose-2);
}
.question {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 5.6vw, 1.75rem);
  line-height: 1.3;
  font-weight: 500;
  margin: auto 0;
  text-wrap: balance;
}
.card-foot {
  font-size: 0.78rem;
  color: var(--muted);
}
.back-art {
  font-size: 4rem;
  color: var(--rose);
  animation: beat 1.6s ease-in-out infinite;
}
.back-text {
  color: var(--muted);
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.reactions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.react {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 18px;
  min-height: 78px;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.react:active {
  transform: scale(0.96);
}
.react:last-child {
  grid-column: 1 / -1;
  min-height: 66px;
  flex-direction: row;
  gap: 10px;
}
.react .emoji {
  font-size: 1.8rem;
}
.react .rlabel {
  font-weight: 650;
  font-size: 0.98rem;
}
.react.r-amei {
  background: rgba(255, 92, 138, 0.18);
  border-color: rgba(255, 92, 138, 0.45);
}
.react.r-desafiadora {
  background: rgba(255, 162, 74, 0.16);
  border-color: rgba(255, 162, 74, 0.45);
}
.react.r-desculpa {
  background: rgba(110, 193, 255, 0.15);
  border-color: rgba(110, 193, 255, 0.45);
}
.react.r-constrangedora {
  background: rgba(197, 139, 255, 0.16);
  border-color: rgba(197, 139, 255, 0.45);
}
.react.r-odiei {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.45);
}
.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}
.result.pop {
  animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.big-emoji {
  font-size: 3.4rem;
  line-height: 1;
}
.result-text {
  font-weight: 650;
  font-size: 1.1rem;
}
.result.r-amei {
  border-color: var(--r-amei);
}
.result.r-desafiadora {
  border-color: var(--r-desafiadora);
}
.result.r-desculpa {
  border-color: var(--r-desculpa);
}
.result.r-constrangedora {
  border-color: var(--r-constrangedora);
}
.result.r-odiei {
  border-color: var(--r-odiei);
}

/* final / diagnóstico */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(10px);
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  min-height: 46px;
  border-radius: 12px;
  cursor: pointer;
}
.tab.active {
  background: linear-gradient(135deg, var(--rose), #a9378f);
  color: white;
}
.diag {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero {
  text-align: center;
  padding: 26px 20px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 92, 138, 0.25), rgba(155, 123, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.hero.couple {
  background: linear-gradient(160deg, rgba(246, 193, 119, 0.22), rgba(255, 92, 138, 0.2));
}
.hero-emoji {
  font-size: 3rem;
}
.hero-kicker {
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}
.hero-title {
  font-family: var(--serif);
  font-size: 2rem;
  margin: 6px 0 8px;
}
.hero-text {
  color: #e9dcf0;
}
.verdict {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}
.verdict strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 1.15rem;
}
.verdict.continuar {
  border-color: rgba(110, 231, 160, 0.5);
}
.verdict.ajustar {
  border-color: rgba(246, 193, 119, 0.5);
}
.verdict.cuidar {
  border-color: rgba(255, 107, 107, 0.5);
}
.block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.block .section-title {
  margin-top: 0;
}
.bullets,
.steps {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bullets.plain {
  list-style: none;
  padding-left: 0;
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.barrow {
  display: grid;
  grid-template-columns: 118px 1fr 40px;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.track {
  height: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.fill {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: var(--rose);
  transition: width 0.8s ease;
}
.barrow.r-amei .fill {
  background: var(--r-amei);
}
.barrow.r-desafiadora .fill {
  background: var(--r-desafiadora);
}
.barrow.r-desculpa .fill {
  background: var(--r-desculpa);
}
.barrow.r-constrangedora .fill {
  background: var(--r-constrangedora);
}
.barrow.r-odiei .fill {
  background: var(--r-odiei);
}
.bn {
  text-align: right;
  color: var(--muted);
}
.theme-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--rose);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.theme-card.r-desafiadora {
  border-left-color: var(--r-desafiadora);
}
.theme-card.r-desculpa {
  border-left-color: var(--r-desculpa);
}
.theme-card.r-constrangedora {
  border-left-color: var(--r-constrangedora);
}
.theme-card.r-odiei {
  border-left-color: var(--r-odiei);
}
.tc-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 650;
}
.tc-tag {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: center;
  text-align: right;
}
.tc-reaction {
  font-size: 0.85rem;
  color: var(--muted);
}
blockquote {
  margin: 0;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: rgba(246, 193, 119, 0.07);
  border-radius: 0 14px 14px 0;
  font-family: var(--serif);
  font-size: 1.05rem;
}
.starter {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}
.starter-theme {
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse {
  animation: pulse 1.6s ease-in-out infinite;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: #2d1a3f;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100vw - 36px);
  z-index: 10;
  font-size: 0.92rem;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes flip-in {
  from {
    opacity: 0;
    transform: perspective(900px) rotateY(-70deg) scale(0.94);
  }
  to {
    opacity: 1;
    transform: perspective(900px) rotateY(0) scale(1);
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.14);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-height: 700px) {
  .card {
    min-height: 200px;
  }
  .logo.big .logo-text {
    font-size: 2.2rem;
  }
}
