:root {
  --ink: #0f1b2d;
  --paper: #fff;
  --celeste: #74acdf;
  --celeste-soft: #d6e9f8;
  --white-band: #fbfdff;
  --sol: #f6b40e;
  --sol-brown: #85340a;
  --dulce: #e3ad72;
  --green: #7fdc8f;
  --red: #ff8a7a;
  --gray: #dde4ec;
  --accent: var(--sol);
  --border: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --radius: 16px;
  --flag: linear-gradient(var(--celeste-soft) 0 33.33%, var(--white-band) 33.33% 66.66%, var(--celeste-soft) 66.66%);
  --dots: radial-gradient(rgb(15 27 45 / 0.16) 1px, transparent 1.5px);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--white-band);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  margin: 0;
  font-family: Rubik, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

body::before,
body::after {
  content: "";
  z-index: -1;
  pointer-events: none;
  position: fixed;
  inset: 0;
}

body::before,
.header,
.dock {
  background-color: var(--white-band);
  background-image: var(--dots), var(--flag);
  background-size: 22px 22px, 100% 100vh;
  background-attachment: fixed;
}

body::after {
  background: url(/sol.svg) center / min(62vmin, 420px) no-repeat;
  opacity: 0.13;
}

.boot {
  place-items: center;
  height: 100dvh;
  font-size: 40px;
  font-weight: 900;
  display: grid;
  grid-auto-flow: column;
  place-content: center;
}

.logo span,
.boot span {
  background: linear-gradient(var(--celeste) 0 30%, var(--paper) 30% 70%, var(--celeste) 70%);
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  border-radius: 10px;
  margin-left: 4px;
  padding: 0 6px;
  display: inline-block;
  transform: rotate(-3deg);
}

.app {
  --gutter: max(14px, calc((100% - 652px) / 2));
  flex-direction: column;
  min-height: 100dvh;
  display: flex;
}

.header {
  z-index: 1;
  padding: 14px var(--gutter) 10px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  display: flex;
  position: sticky;
  top: 0;
}

.logo {
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin: 0;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.logo a {
  color: inherit;
  text-decoration: none;
}

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

.counter {
  background: var(--celeste);
  border: var(--border);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: 900;
}

.counter small {
  font-size: 12px;
}

.counter-low {
  background: var(--red);
}

.btn {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 900;
  transition: transform 50ms, box-shadow 50ms;
}

.btn:active:not(:disabled) {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(3px, 3px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:focus-visible,
.mode-swap:focus-visible,
input:focus-visible {
  outline: 3px solid var(--celeste);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--sol);
}

a.btn {
  text-decoration: none;
  display: inline-block;
}

.btn-small {
  box-shadow: 3px 3px 0 var(--ink);
  padding: 4px 10px;
  font-size: 14px;
}

.chat {
  flex-direction: column;
  flex: 1;
  gap: 14px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 6px 18px 16px;
  display: flex;
}

.chat > * {
  flex-shrink: 0;
}

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

.intro {
  border-top-width: 10px;
  border-top-color: var(--celeste);
}

.mode-swap {
  font: inherit;
  color: var(--ink);
  text-decoration: none;
  background: var(--sol);
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  border-radius: 999px;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 8px 4px 6px;
  font-weight: 900;
  display: inline-flex;
  transition:
    transform 80ms,
    box-shadow 80ms,
    filter 180ms;
}

.mode-swap:hover {
  filter: brightness(1.04);
}

.mode-swap:active {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(2px, 2px);
}

.mode-mark {
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  filter: drop-shadow(1.5px 1.5px 0 var(--ink));
}

.mode-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.mode-mark path,
.mode-mark circle {
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.swap-arrow {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 18px;
  height: 18px;
  margin-left: 1px;
  transition: transform 180ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.mode-swap:hover .swap-arrow {
  transform: translateX(2px);
}

.mode-popular {
  background: var(--sol);
  animation: mode-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.mode-popular .icon-star {
  fill: #fff4bd;
  transform-box: fill-box;
  transform-origin: center;
  animation: star-burst 0.72s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.mode-popular .icon-sparks {
  fill: none;
  animation: spark-burst 0.62s 0.12s ease-out both;
}

.mode-popular:hover .icon-star {
  animation: star-wiggle 0.5s ease-in-out;
}

.mode-cultura {
  background: var(--celeste);
  animation: mode-rise 0.45s ease-out both;
}

.mode-cultura .icon-page {
  fill: var(--paper);
  transform-box: fill-box;
  animation-duration: 0.62s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-fill-mode: both;
}

.mode-cultura .icon-page-left {
  transform-origin: right center;
  animation-name: book-open-left;
}

.mode-cultura .icon-page-right {
  fill: var(--celeste-soft);
  transform-origin: left center;
  animation-name: book-open-right;
}

.mode-cultura .icon-book-detail {
  fill: none;
  animation: ink-in 0.38s 0.28s ease-out both;
}

.mode-cultura:hover .icon-page-left {
  animation: page-flip-left 0.55s ease-in-out;
}

.mode-cultura:hover .icon-page-right {
  animation: page-flip-right 0.55s ease-in-out;
}

.mode-futbol {
  background: #b6ef86;
  animation: mode-kick 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

.mode-futbol .mode-mark {
  animation: ball-kick 0.78s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}

.mode-futbol .icon-ball {
  fill: var(--paper);
}

.mode-futbol .icon-ball-detail {
  fill: none;
}

.mode-futbol:hover .mode-mark {
  animation: ball-dribble 0.55s ease-in-out;
}

.mode-hint {
  color: var(--ink);
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
}

.intro .tagline {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 900;
}

.intro ul {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
}

.intro li::marker {
  content: "\2600\FE0E  ";
  color: var(--sol-brown);
}

.error {
  background: var(--red);
}

.turn {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.bubble {
  border: var(--border);
  border-radius: var(--radius);
  max-width: 85%;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
  padding: 9px 14px;
  animation: 0.18s ease-out pop;
}

.bubble-user {
  background: var(--celeste);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.bubble-jev {
  background: var(--paper);
  border-bottom-left-radius: 4px;
  flex-wrap: wrap;
  align-self: flex-start;
  align-items: center;
  gap: 4px 10px;
  display: flex;
}

.who {
  white-space: nowrap;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  flex-shrink: 0;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 900;
}

.verdict-text {
  font-size: 20px;
  font-weight: 900;
}

.verdict-yes {
  background: var(--green);
}

.verdict-no {
  background: var(--red);
}

.verdict-unknown {
  background: var(--gray);
}

.verdict-invalid {
  background: var(--paper);
  box-shadow: none;
  border-style: dashed;
}

.verdict-invalid .verdict-text {
  font-size: 15px;
}

.verdict-correct {
  background: var(--sol);
}

.verdict-correct .verdict-text {
  font-size: 26px;
}

.prob {
  flex-basis: 100%;
  align-items: center;
  gap: 8px;
  display: flex;
}

.prob-bar {
  border: 2px solid var(--ink);
  background: var(--paper);
  border-radius: 999px;
  width: 110px;
  height: 12px;
  display: flex;
  overflow: hidden;
}

.prob-bar i {
  height: 100%;
  display: block;
}

.prob-yes {
  background: #1faa4a;
}

.prob-unknown {
  background: #fff;
}

.prob-no {
  background: #d9412e;
}

.prob-label {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.dots {
  gap: 5px;
  padding: 8px 2px;
  display: inline-flex;
}

.dots i {
  background: var(--ink);
  border-radius: 50%;
  width: 9px;
  height: 9px;
  animation: 0.9s infinite bounce;
}

.dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.dots i:nth-child(3) {
  animation-delay: 0.3s;
}

.result {
  --sun: url(/sol.svg) center 12px / 60px no-repeat;
  text-align: center;
  background: var(--sun), var(--sol);
  padding-top: 78px;
}

.result-lost,
.result-gaveup {
  background: var(--sun), var(--flag);
}

.result h2 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 900;
}

.result p {
  margin: 6px 0;
}

.answer small {
  font-size: 13px;
  display: block;
}

.answer strong {
  background: var(--paper);
  border: var(--border);
  border-radius: 12px;
  padding: 2px 14px;
  font-size: 28px;
  font-weight: 900;
  display: inline-block;
  transform: rotate(-1.5deg);
}

.share-row {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  display: flex;
}

.btn-x {
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  display: inline-block;
  box-shadow: 4px 4px #4a5a70;
}

.btn-x:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px #4a5a70;
}

.btn-ig {
  background: linear-gradient(45deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5);
  color: #fff;
  text-shadow: 1px 1px 0 var(--ink);
}

.next {
  border-top: 3px dashed var(--ink);
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  display: flex;
}

.next p {
  margin: 0;
}

.next-daily {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.footer {
  text-align: center;
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
}

.footer p {
  background: var(--paper);
  border-radius: 6px;
  margin: 2px auto;
  padding: 0 6px;
  display: table;
}

.footer a {
  color: inherit;
}

.footer .domain {
  background: var(--celeste);
  border: 2px solid var(--ink);
  margin-top: 8px;
  padding: 0 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.dock {
  z-index: 1;
  padding: 0 var(--gutter) env(safe-area-inset-bottom);
  flex-direction: column;
  display: flex;
  position: sticky;
  bottom: 0;
}

.composer {
  gap: 8px;
  padding: 10px 0 14px;
  display: flex;
}

.composer input {
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: 12px;
  flex: 1;
  padding: 10px 14px;
  font-weight: 700;
}

.composer input::placeholder {
  color: #8a97a8;
}

.giveup {
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: 0;
  align-self: center;
  margin-top: -4px;
  padding: 0 8px 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
}

.giveup:disabled {
  opacity: 0.4;
}

.opening {
  background: var(--accent);
  flex-wrap: nowrap;
  align-items: flex-start;
  animation: none;
}

.opening .who {
  margin-top: 3px;
}

.app-cultura {
  --accent: var(--celeste);
}

.app-futbol {
  --accent: #7dce6a;
}

.app-futbol .intro {
  border-top-color: #2f8a3e;
}

.app-popular .opening {
  animation: mode-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.app-cultura .opening {
  animation: mode-rise 0.4s ease-out both;
}

.app-futbol .opening {
  animation: mode-kick 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

.app-extra {
  --accent: var(--dulce);
}

.badge {
  background: var(--dulce);
  border: var(--border);
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 14px;
  font-weight: 900;
}

.btn-extra {
  background: var(--dulce);
  text-decoration: none;
  display: inline-block;
}

.gate {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 18px;
  display: flex;
}

.gate .btn {
  text-decoration: none;
  display: inline-block;
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes star-burst {
  0% {
    opacity: 0;
    transform: rotate(-100deg) scale(0.15);
  }

  68% {
    opacity: 1;
    transform: rotate(8deg) scale(1.18);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spark-burst {
  from {
    opacity: 0;
    transform: rotate(-25deg) scale(0.45);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes star-wiggle {
  30% {
    transform: rotate(-12deg) scale(1.08);
  }

  65% {
    transform: rotate(9deg) scale(1.12);
  }
}

@keyframes book-open-left {
  from {
    opacity: 0.35;
    transform: perspective(80px) rotateY(72deg);
  }
}

@keyframes book-open-right {
  from {
    opacity: 0.35;
    transform: perspective(80px) rotateY(-72deg);
  }
}

@keyframes page-flip-left {
  50% {
    transform: perspective(80px) rotateY(28deg);
  }
}

@keyframes page-flip-right {
  50% {
    transform: perspective(80px) rotateY(-28deg);
  }
}

@keyframes ink-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes ball-kick {
  0% {
    opacity: 0;
    transform: translate(-20px, -10px) rotate(-150deg) scale(0.65);
  }

  52% {
    opacity: 1;
    transform: translate(3px, 2px) rotate(24deg) scale(1.04, 0.94);
  }

  72% {
    transform: translate(-1px, -6px) rotate(-10deg);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ball-dribble {
  35% {
    transform: translateY(-5px) rotate(-18deg);
  }

  68% {
    transform: translateY(1px) rotate(8deg) scale(1.04, 0.96);
  }
}

@keyframes mode-pop {
  from {
    transform: scale(0.82) rotate(-6deg);
  }

  to {
    transform: none;
  }
}

@keyframes mode-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mode-kick {
  0% {
    transform: translateX(-12px) rotate(-8deg);
  }

  60% {
    transform: translateX(5px) rotate(3deg);
  }

  100% {
    transform: none;
  }
}

@keyframes bounce {
  0%,
  60%,
  to {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-6px);
  }
}

.day-miss {
  background: var(--red);
}

.groups-line {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  display: flex;
}

.groups-line a,
.groups-cta a {
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 900;
  text-decoration: none;
}

.groups-cta {
  margin: 12px 0 0;
}

.social h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 900;
}

.stack {
  flex-direction: column;
  gap: 10px;
  display: flex;
}

.field {
  text-align: left;
  font-size: 14px;
  display: grid;
  gap: 6px;
}

.field input,
.stack input {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: 12px;
  width: 100%;
  padding: 10px 14px;
  font-weight: 700;
}

.hint,
.stat-days {
  color: var(--ink);
  margin: 0 0 10px;
  font-size: 14px;
}

.stat-grid {
  gap: 10px;
  display: grid;
}

.stat {
  background: var(--white-band);
  border: var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
}

.stat h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.stat p {
  margin: 0;
  font-size: 14px;
}

.stat-popular { border-top: 8px solid var(--sol); }
.stat-cultura { border-top: 8px solid var(--celeste); }
.stat-futbol { border-top: 8px solid #7dce6a; }

.days {
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  display: flex;
}

.day {
  font-style: normal;
  border: 2px solid var(--ink);
  border-radius: 8px;
  min-width: 28px;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.day-won { background: var(--green); }
.day-miss { background: var(--red); }
.day-empty { background: var(--gray); }

.group-list {
  gap: 10px;
  display: grid;
}

.group-link {
  color: inherit;
  background: var(--paper);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-decoration: none;
  display: grid;
  gap: 4px;
}

.group-places {
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  display: flex;
}

.tabs {
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  display: flex;
}

.tab,
a.tab-on {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  cursor: pointer;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 900;
}

.tab-on {
  background: var(--sol);
}

.board {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.board-row {
  background: var(--white-band);
  border: var(--border);
  border-radius: 12px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
}

.board-you {
  background: var(--sol);
}

.rank {
  font-variant-numeric: tabular-nums;
  min-width: 1.2em;
  font-weight: 900;
}

.who-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who-name small,
.week small {
  font-size: 12px;
}

.row-score {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.marks {
  grid-column: 1 / -1;
  gap: 4px;
  display: flex;
  flex-wrap: wrap;
}

.mark {
  border: 2px solid var(--ink);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: inline-block;
}

.mark-yes { background: var(--green); }
.mark-no { background: var(--red); }
.mark-unknown { background: var(--gray); }
.mark-correct { background: var(--sol); }

.row-kick,
.giveup {
  font: inherit;
}

.row-kick {
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: 0;
  grid-column: 1 / -1;
  justify-self: end;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
}

.week-wrap {
  overflow-x: auto;
  margin: 8px 0 12px;
}

.week {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.week th,
.week td {
  border: 2px solid var(--ink);
  padding: 4px 6px;
  text-align: center;
}

.week th:first-child {
  text-align: left;
}

.cell-won { background: var(--green); }
.cell-miss { background: var(--red); }
.cell-empty { background: var(--gray); }

.link-line {
  overflow-wrap: anywhere;
}

.link-line code {
  font-family: inherit;
  font-weight: 900;
}

.board-card .giveup {
  margin-top: 8px;
}

.app-social .chat {
  padding-bottom: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .bubble,
  .dots i,
  .mode-swap,
  .mode-mark,
  .opening {
    animation: none;
  }
}

@media (width <= 420px) {
  body {
    font-size: 16px;
  }

  .logo {
    font-size: 25px;
  }

  .app-extra .logo {
    font-size: 20px;
  }

  .badge {
    padding: 3px 8px;
    font-size: 12px;
  }

  .header {
    gap: 8px;
    flex-wrap: wrap;
  }

  .header-right {
    gap: 6px;
  }

  .counter {
    padding: 3px 8px;
  }

  .counter small,
  .app-extra .counter small {
    display: none;
  }

  .header-right .btn-small {
    padding: 4px 8px;
  }
}
