/* Clica Aí — visual clean, minimalista e divertido */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --surface-3: #e9e6df;
  --ink: #111113;
  --ink-2: #4f4f57;
  --muted: #8b8a91;
  --line: #e9e6e0;
  --pink: #ff3d6e;
  --pink-ink: #ffffff;
  --cyan: #18c6de;
  --ok: #10a861;
  --ok-bg: #e2f7ec;
  --warn: #e08a00;
  --danger: #e5484d;
  --shadow: 0 1px 2px rgba(17, 17, 19, 0.04), 0 10px 30px -18px rgba(17, 17, 19, 0.18);
  --radius: 22px;
  --av-mix: 100%;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0f;
    --surface: #161619;
    --surface-2: #202024;
    --surface-3: #2a2a2f;
    --ink: #f3f3f5;
    --ink-2: #b9b9c2;
    --muted: #7e7e88;
    --line: #26262b;
    --ok: #2fd388;
    --ok-bg: rgba(47, 211, 136, 0.14);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 30px -20px rgba(0, 0, 0, 0.8);
    --av-mix: 34%;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.4 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

body.lock {
  overflow: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

a {
  color: inherit;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: 28px;
  font-weight: 800;
}

h2 {
  font-size: 24px;
  font-weight: 800;
}

h3 {
  font-size: 17px;
  font-weight: 700;
}

h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 22px 0 10px;
}

p {
  margin: 0;
}

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

.small {
  font-size: 13px;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px calc(100px + env(safe-area-inset-bottom));
}

/* ------------------------------------------------------------ marca */

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
}

.logo-mark span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: -3px -1px 0 0 var(--cyan), 3px 1px 0 0 var(--pink);
  animation: tap 2.8s ease-in-out infinite;
}

.logo-mark.big {
  width: 72px;
  height: 72px;
  border-radius: 24px;
}

.logo-mark.big span {
  width: 24px;
  height: 24px;
  box-shadow: -5px -2px 0 0 var(--cyan), 5px 2px 0 0 var(--pink);
}

@keyframes tap {
  0%,
  70%,
  100% {
    transform: scale(1);
  }
  78% {
    transform: scale(0.72);
  }
  86% {
    transform: scale(1.08);
  }
}

.splash {
  min-height: 90dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.splash.pin form {
  display: grid;
  gap: 10px;
  width: min(280px, 100%);
}

.splash.pin input {
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.3em;
}

/* ------------------------------------------------------------ topo */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 0 14px;
}

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

.brand-name {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-sub {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.me-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  max-width: 55%;
  white-space: nowrap;
}

.me-chip > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.conn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.conn-on {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-bg);
}

.conn-wait {
  background: var(--warn);
  animation: blink 1s infinite;
}

.conn-off {
  background: var(--danger);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.offline {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--warn) 16%, var(--surface));
  margin-bottom: 12px;
}

/* ------------------------------------------------------------ cards */

.view {
  display: grid;
  gap: 14px;
  animation: fade 0.25s ease;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}

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

.card-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

/* ------------------------------------------------------------ avatar */

.av {
  --c: #eee;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) var(--av-mix), var(--surface-2));
  line-height: 1;
}

.av-xs {
  width: 22px;
  height: 22px;
  font-size: 13px;
}

.av-sm {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

.av-md {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.av-lg {
  width: 54px;
  height: 54px;
  font-size: 28px;
}

.av-xl {
  width: 66px;
  height: 66px;
  font-size: 36px;
}

.av .dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 28%;
  height: 28%;
  min-width: 9px;
  min-height: 9px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid var(--surface);
}

/* ------------------------------------------------------------ botões */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 15px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.2s;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  background: var(--pink);
  color: var(--pink-ink);
  box-shadow: 0 8px 20px -10px var(--pink);
}

.btn.dark {
  background: var(--ink);
  color: var(--bg);
}

.btn.ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink-2);
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.btn.danger {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.btn.danger-ghost {
  color: var(--danger);
  background: transparent;
  margin-top: 16px;
}

.btn.xl {
  height: 58px;
  font-size: 17px;
  border-radius: 18px;
  width: 100%;
}

.btn.xl svg {
  width: 20px;
  height: 20px;
}

.btn.block {
  width: 100%;
}

.btn.small {
  height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 14px;
  background: var(--ink);
  color: var(--bg);
}

.link-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 6px 2px;
}

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

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--surface-2);
  display: inline-grid;
  place-items: center;
  flex: none;
  color: var(--ink-2);
  transition: transform 0.12s;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.icon-btn.sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-weight: 700;
  color: var(--ok);
}

/* ------------------------------------------------------------ campos */

input {
  width: 100%;
  height: 50px;
  border-radius: 15px;
  border: 1.5px solid transparent;
  background: var(--surface-2);
  padding: 0 16px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
}

input:focus {
  border-color: var(--ink);
  background: var(--surface);
}

input::placeholder {
  color: var(--muted);
}

.linkform {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.field input {
  padding-right: 50px;
}

.field .icon-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 42px;
  height: 42px;
  background: transparent;
}

.addform {
  display: flex;
  gap: 8px;
}

.addform .btn {
  flex: none;
}

/* ------------------------------------------------------------ progresso */

.progress {
  padding: 2px 4px 0;
}

.progress-txt {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-txt b {
  color: var(--ink);
}

.segs {
  display: flex;
  gap: 4px;
}

.seg {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: var(--surface-3);
  transition: background 0.4s;
}

.seg.s-done {
  background: var(--ok);
}

.seg.s-now {
  background: var(--pink);
  animation: pulse-seg 1.4s ease-in-out infinite;
}

.seg.s-off {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--surface-3);
}

@keyframes pulse-seg {
  50% {
    opacity: 0.45;
  }
}

/* ------------------------------------------------------------ hero */

.hero {
  --c: #eee;
  position: relative;
  overflow: hidden;
  padding: 20px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--c) calc(var(--av-mix) * 0.7), var(--surface)) 0%,
    var(--surface) 62%
  );
}

.hero.mine {
  box-shadow: var(--shadow), inset 0 0 0 2px var(--pink);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.hero.mine .eyebrow {
  color: var(--pink);
}

.pos {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
}

.hero-who {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-who .av-xl {
  background: var(--surface);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.25);
}

.hero-id {
  flex: 1;
  min-width: 0;
}

.hero-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-sub {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 4px;
}

.hero-line {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-2);
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}

.dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: dot 1.2s infinite;
}

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

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

@keyframes dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.linkbox {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  align-items: center;
}

.linkpill {
  flex: 1;
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 13px;
  background: var(--surface-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.linkpill .u {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.note {
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
}

.note.ok {
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 600;
}

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

.row-btns .btn {
  flex: 1;
}

.hero.celebrate,
.hero.empty {
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 30px 20px;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--ok) 16%, var(--surface)) 0%, var(--surface) 70%);
}

.big-emoji {
  font-size: 56px;
  line-height: 1;
}

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

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

.streak-pill {
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, #ff8a3d 16%, var(--surface));
  color: #e2660f;
}

/* ------------------------------------------------------------ anel */

.ring {
  position: relative;
  flex: none;
}

.ring svg {
  width: 100%;
  height: 100%;
}

.ring-bg {
  stroke: color-mix(in srgb, var(--ink) 10%, transparent);
  stroke-width: 6;
}

.ring-fg {
  stroke: var(--ink);
  stroke-width: 6;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.3, 1.4, 0.5, 1), stroke 0.3s;
}

.ring.full .ring-fg {
  stroke: var(--ok);
}

.ring-txt {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  justify-content: center;
  align-items: baseline;
  align-content: center;
  font-size: 13px;
  color: var(--muted);
}

.ring-txt b {
  font-size: 19px;
  color: var(--ink);
  font-weight: 800;
}

/* ------------------------------------------------------------ chips */

.who {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.who-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.who-label b {
  color: var(--ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink-2);
}

.chip:not(.on) .av {
  filter: grayscale(0.9);
  opacity: 0.7;
}

.chip.on {
  background: var(--ok-bg);
  box-shadow: none;
  color: var(--ok);
  font-weight: 600;
}

.chip.on b {
  font-size: 12px;
}

.chip.me {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.chip.pop {
  animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ------------------------------------------------------------ pills */

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}

.pill.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.pill.now {
  background: var(--pink);
  color: #fff;
}

.pill.soft {
  background: color-mix(in srgb, var(--cyan) 14%, var(--surface));
  color: color-mix(in srgb, var(--cyan) 70%, var(--ink));
}

/* ------------------------------------------------------------ listas */

.list,
.queue,
.feed,
.tlist,
.rank,
.hist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list {
  margin-top: 10px;
}

.list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.list li:first-child {
  border-top: 0;
}

.li-main {
  flex: 1;
  min-width: 0;
  display: grid;
  line-height: 1.25;
}

.li-main b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.li-main span {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-avs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
  max-width: 45%;
}

.qrow,
.trow {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: 14px;
  text-align: left;
  transition: background 0.2s;
}

.qrow:active,
.trow:active {
  background: var(--surface-2);
}

.qrow.s-now {
  background: color-mix(in srgb, var(--pink) 8%, var(--surface));
}

.qrow.s-done .qname,
.qrow.s-off .qname {
  color: var(--muted);
}

.qrow.s-off .av {
  filter: grayscale(1);
  opacity: 0.5;
}

.qnum {
  width: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  flex: none;
}

.qrow.s-done .qnum {
  color: var(--ok);
}

.qrow.s-now .qnum {
  color: var(--pink);
}

.qname {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
}

.qname small {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}

.qname em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pink);
}

.chev {
  color: var(--muted);
  display: grid;
}

.chev svg {
  width: 18px;
  height: 18px;
}

.feed li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  animation: fade 0.3s ease;
}

.feed li:first-child {
  border-top: 0;
}

.feed b {
  color: var(--ink);
  font-weight: 600;
}

.feed time {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 var(--pink);
  animation: live 1.8s infinite;
}

@keyframes live {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--pink) 60%, transparent);
  }
  100% {
    box-shadow: 0 0 0 10px transparent;
  }
}

/* ------------------------------------------------------------ onboarding */

.onboard {
  text-align: center;
  display: grid;
  gap: 14px;
  padding: 28px 20px 22px;
  margin-top: 8px;
}

.onboard-art {
  width: 96px;
  height: 96px;
  margin: 0 auto 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 46px;
  position: relative;
  background: var(--surface-2);
}

.onboard-art::before,
.onboard-art::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--pink);
  animation: ripple 2.2s ease-out infinite;
}

.onboard-art::after {
  border-color: var(--cyan);
  animation-delay: 1.1s;
}

@keyframes ripple {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

.onboard-art span {
  animation: tap 2.2s ease-in-out infinite;
}

.bulk {
  display: grid;
  gap: 10px;
  text-align: left;
}

.bulk-wrap {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.bulk-row {
  display: flex;
  gap: 8px;
}

.bulk-prefix {
  flex: 1;
}

.stepper {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: 15px;
  height: 50px;
  flex: none;
}

.stepper button {
  width: 44px;
  height: 50px;
  font-size: 22px;
  font-weight: 500;
}

.stepper output {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
}

.or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ------------------------------------------------------------ quadro */

.board-wrap {
  overflow-x: auto;
  margin: 12px -18px 0;
  padding: 0 8px 6px;
  -webkit-overflow-scrolling: touch;
}

.board {
  border-collapse: separate;
  border-spacing: 3px;
  margin: 0 auto;
}

.board th {
  font-weight: 500;
  padding: 0;
}

.board thead th {
  vertical-align: bottom;
  text-align: center;
  padding-bottom: 2px;
}

.board thead th .av {
  margin: 0 auto;
}

.board .tg {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.1;
}

.board thead th small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.board thead th.done small {
  color: var(--ok);
}

.board thead th.now small,
.board thead th.now .tg {
  color: var(--pink);
}

.board thead th.now .av {
  box-shadow: 0 0 0 2px var(--pink);
}

.board .corner {
  font-size: 10px;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

.board tbody th {
  position: sticky;
  left: -8px;
  background: var(--surface);
  text-align: left;
  white-space: nowrap;
  padding-right: 4px;
  z-index: 1;
}

.board tbody th span {
  font-size: 12.5px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

.board tbody tr.me th span {
  color: var(--pink);
}

.board td {
  padding: 0;
  vertical-align: middle;
}

.cell {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  transition: background 0.2s, transform 0.12s;
}

.cell:active {
  transform: scale(0.85);
}

.cell.on {
  background: var(--ok);
  box-shadow: none;
}

.board tr.me button.cell:not(.on) {
  box-shadow: inset 0 0 0 1.5px var(--pink);
}

.cell.self {
  background: var(--ink);
  box-shadow: none;
  opacity: 0.85;
}

.cell.nolink {
  background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, transparent 4px 8px);
  box-shadow: none;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lg {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.lg.on {
  background: var(--ok);
  box-shadow: none;
}

.lg.nolink {
  background: repeating-linear-gradient(135deg, var(--surface-3) 0 3px, transparent 3px 6px);
}

/* ------------------------------------------------------------ turma */

.toggles {
  margin-top: 8px;
  display: grid;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 8px;
  text-align: left;
  border-top: 1px solid var(--line);
}

.toggle-row span {
  display: grid;
}

.toggle-row small {
  color: var(--muted);
  font-size: 13px;
}

.switch {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-3);
  position: relative;
  flex: none;
  transition: background 0.2s;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.switch.on {
  background: var(--ok);
}

.switch.on::after {
  transform: translateX(18px);
}

#app .card > .btn.block {
  margin-top: 12px;
}

/* ------------------------------------------------------------ placar */

.streak-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, #ff8a3d 20%, var(--surface)) 0%, var(--surface) 60%);
}

.streak-num {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.streak-num .fire {
  font-size: 38px;
  animation: flicker 2.4s ease-in-out infinite;
  display: inline-block;
}

.streak-num b {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

@keyframes flicker {
  0%,
  100% {
    transform: scale(1) rotate(-3deg);
  }
  50% {
    transform: scale(1.08) rotate(3deg);
  }
}

.streak-card h3 {
  margin-bottom: 4px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tile {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
}

.tile b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tile span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.2;
}

.badges {
  display: grid;
  gap: 10px;
}

.bdg {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bdg-e {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: none;
}

.bdg > div {
  display: grid;
  line-height: 1.25;
}

.bdg small {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.rank li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.rank li:first-child {
  border-top: 0;
}

.rank li.me .qname > :first-child,
.rank li.me {
  color: var(--pink);
}

.rk-pos {
  width: 26px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  flex: none;
  font-size: 15px;
}

.rk-n {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.hist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.h-day {
  display: grid;
  width: 74px;
  flex: none;
  line-height: 1.2;
}

.h-day small {
  color: var(--muted);
  font-size: 12px;
}

.h-bar {
  flex: 1;
  height: 8px;
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.h-bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: var(--ink-2);
}

.h-bar i.full {
  background: var(--ok);
}

.h-val {
  width: 42px;
  text-align: right;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}

/* ------------------------------------------------------------ abas */

.tabs {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(488px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.25), inset 0 0 0 1px var(--line);
  z-index: 20;
}

.tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  border-radius: 18px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}

.tab.on {
  color: var(--ink);
  background: var(--surface-2);
}

.tab.on svg {
  stroke-width: 2.2;
}

.badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ------------------------------------------------------------ sheet */

.sheet-root {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.42);
  animation: bd-in 0.2s ease;
}

.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(520px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  animation: sheet-in 0.32s cubic-bezier(0.2, 1, 0.3, 1);
}

.sheet-root.closing .sheet {
  animation: sheet-out 0.2s ease forwards;
}

.sheet-root.closing .sheet-backdrop {
  animation: bd-out 0.2s ease forwards;
}

@keyframes sheet-in {
  from {
    transform: translate(-50%, 100%);
  }
}

@keyframes sheet-out {
  to {
    transform: translate(-50%, 100%);
  }
}

@keyframes bd-in {
  from {
    opacity: 0;
  }
}

@keyframes bd-out {
  to {
    opacity: 0;
  }
}

.grab {
  width: 40px;
  height: 5px;
  border-radius: 5px;
  background: var(--surface-3);
  margin: 0 auto 14px;
}

.sheet-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
}

.sheet > h3 {
  font-size: 21px;
  padding-right: 40px;
  margin-bottom: 6px;
}

.sheet > p {
  margin-bottom: 16px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.pick {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px 6px 12px;
  border-radius: 18px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.12s;
}

.pick:active {
  transform: scale(0.95);
}

.pick.on {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--pink);
}

.ps-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 40px;
}

.rename {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rename input {
  font-size: 22px;
  font-weight: 700;
  height: 48px;
  padding: 0 12px;
}

.rename small {
  padding-left: 12px;
  font-size: 13px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  margin-top: 18px;
}

.emo {
  aspect-ratio: 1;
  border-radius: 10px;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: transform 0.12s, background 0.15s;
}

.emo:active {
  transform: scale(0.85);
}

.emo.on {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sw {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) var(--av-mix), var(--surface-2));
}

.sw.on {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
}

.ps-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.act-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 12px;
  border-radius: 15px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 54px;
}

.act-btn.on {
  box-shadow: inset 0 0 0 2px var(--pink);
  background: var(--surface);
}

.act-btn:active:not(:disabled) {
  transform: scale(0.97);
}

/* ------------------------------------------------------------ toasts */

#toasts {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 24px));
  display: grid;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14.5px;
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.toast b {
  font-weight: 700;
}

.toast.ok {
  background: var(--ink);
}

.toast.warn {
  background: #fff4e0;
  color: #8a4b00;
}

.toast.big {
  background: var(--pink);
  color: #fff;
  font-size: 16px;
  padding: 16px 18px;
}

.toast.out {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from {
    transform: translateY(-16px) scale(0.96);
    opacity: 0;
  }
}

@keyframes toast-out {
  to {
    transform: translateY(-10px);
    opacity: 0;
  }
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 70;
}

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

@media (max-width: 360px) {
  .hero-name {
    font-size: 25px;
  }
  .emoji-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .ps-actions {
    grid-template-columns: 1fr;
  }
}
