/* =========================================================
   Sessão Macabra: componentes (ingressos, carimbos, formulários)
   ========================================================= */

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px;
  border-radius: 4px;
  border: 1px solid rgba(234, 223, 200, .22);
  background: rgba(234, 223, 200, .06);
  color: var(--osso);
  font: 600 .95rem/1.2 var(--f-body);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .1s, box-shadow .2s;
}
.btn:hover { border-color: rgba(234, 223, 200, .45); background: rgba(234, 223, 200, .1); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }
.btn--primary {
  background: linear-gradient(180deg, #e0213f, #a90d27);
  border-color: #ff3b57;
  box-shadow: 0 4px 18px rgba(200, 16, 46, .35);
}
.btn--primary:hover { background: linear-gradient(180deg, #ff3b57, #c8102e); box-shadow: 0 6px 24px rgba(255, 59, 87, .45); }
.btn--danger { border-color: rgba(255, 59, 87, .5); color: var(--sangue-vivo); background: rgba(200, 16, 46, .08); }
.btn--danger:hover { background: rgba(200, 16, 46, .2); border-color: var(--sangue-vivo); }
.btn--ghost { border-color: transparent; background: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-icon {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(234, 223, 200, .15);
  background: rgba(10, 5, 7, .55);
  color: var(--osso-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color .2s, border-color .2s, transform .2s;
}
.btn-icon:hover { color: var(--osso); border-color: rgba(234, 223, 200, .45); transform: rotate(15deg); }
.btn-icon .ic { width: 20px; height: 20px; }

.btn-mini {
  width: 34px; height: 34px; border-radius: 4px;
  border: 1px solid rgba(234, 223, 200, .12);
  background: rgba(234, 223, 200, .04);
  color: var(--osso-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.btn-mini .ic { width: 18px; height: 18px; }
.btn-mini:hover { color: var(--osso); border-color: rgba(234, 223, 200, .4); }
.btn-mini:disabled { opacity: .3; cursor: default; }
.btn-mini--ok:hover { color: var(--osso); border-color: var(--sangue-vivo); background: rgba(200, 16, 46, .25); }

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

/* ---------- Busca e ferramentas ---------- */
.search {
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 12px; margin-bottom: 14px;
  border: 1px solid rgba(234, 223, 200, .14); border-radius: 4px;
  background: rgba(0, 0, 0, .35);
  color: var(--osso-3);
  transition: border-color .2s;
}
.search .ic { width: 18px; height: 18px; }
.search input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--osso);
  font: 400 1rem var(--f-body);
}
.search input::placeholder { color: var(--osso-3); font-style: italic; }
.search:focus-within { border-color: rgba(255, 59, 87, .55); color: var(--osso-2); }
.search input::-webkit-search-cancel-button { filter: invert(.8); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 200px; margin: 0; }
.select { display: flex; align-items: center; gap: 8px; color: var(--osso-2); font-size: .9rem; font-style: italic; }
.select select {
  background: #140a10; color: var(--osso);
  border: 1px solid rgba(234, 223, 200, .18); border-radius: 4px;
  padding: 8px 10px;
  font: 600 .9rem var(--f-body);
}

/* ---------- Próxima sessão ---------- */
.session-strip { margin-bottom: 14px; }
.session {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border: 1px dashed rgba(217, 164, 65, .5); border-radius: 4px;
  background: rgba(217, 164, 65, .06);
  color: var(--osso);
  font: inherit; text-align: left;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.session:hover { background: rgba(217, 164, 65, .12); }
.session .ic { width: 20px; height: 20px; color: var(--latao-vivo); }
.session__text { flex: 1; min-width: 0; }
.session b { font-weight: 600; }
.session i { color: var(--osso-2); }
.session--today { border-style: solid; animation: todayPulse 2.2s ease-in-out infinite; }
.session--none { border-color: rgba(234, 223, 200, .18); background: none; color: var(--osso-2); font-style: italic; }
.session--none .ic { color: var(--osso-3); }
@keyframes todayPulse { 50% { box-shadow: 0 0 22px rgba(255, 210, 122, .35); border-color: var(--latao-vivo); } }

/* ---------- Pôster ---------- */
.poster {
  position: relative; flex-shrink: 0;
  width: 58px; aspect-ratio: 2 / 3;
  border-radius: 3px; overflow: hidden;
  background: #000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .55);
}
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.poster--auto {
  display: grid; place-items: center;
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(255, 255, 255, .08), transparent),
    linear-gradient(165deg, hsl(var(--h) 55% 24%), hsl(var(--h) 70% 7%));
}
.poster--auto .ic { width: 42%; height: 42%; color: rgba(234, 223, 200, .2); stroke: none; }
.poster--auto span {
  position: absolute; left: 4px; right: 4px; bottom: 5px;
  font-family: var(--f-display); text-transform: uppercase;
  font-size: .56rem; letter-spacing: .04em; line-height: 1.05;
  color: rgba(234, 223, 200, .8); text-align: center;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Ingressos (fila) ---------- */
.tickets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticket {
  position: relative;
  display: grid; grid-template-columns: 54px 1fr;
  background: linear-gradient(180deg, #1b0d15, #120810);
  border: 1px solid rgba(234, 223, 200, .11);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ticket.is-new { animation: ticketIn .45s ease-out both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes ticketIn { from { opacity: 0; transform: translateY(14px); } }
.ticket::before, .ticket::after {
  content: ""; position: absolute; left: 54px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--noir);
  border: 1px solid rgba(234, 223, 200, .11);
  transform: translateX(-50%);
}
.ticket::before { top: -8px; }
.ticket::after { bottom: -8px; }
.ticket__stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 0;
  border-right: 2px dashed rgba(234, 223, 200, .2);
  color: var(--osso-2);
  cursor: grab;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.ticket__stub:active { cursor: grabbing; }
.ticket__num { font-family: var(--f-display); font-size: 1.5rem; line-height: 1; color: var(--osso); }
.ticket__stub .ic { width: 18px; height: 18px; opacity: .55; }
.ticket__body { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 12px 12px 10px; min-width: 0; }
.ticket__main { min-width: 0; }
.ticket__title {
  margin: 0;
  font-weight: 600; font-size: 1.1rem; line-height: 1.2;
  cursor: pointer;
}
.ticket__title:hover { color: var(--sangue-vivo); }
.ticket__meta { margin: 2px 0 0; color: var(--osso-2); font-size: .9rem; font-style: italic; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag {
  padding: 2px 7px; border-radius: 3px;
  border: 1px solid rgba(234, 223, 200, .14);
  background: rgba(234, 223, 200, .04);
  color: var(--osso-2);
  font-size: .74rem; font-style: normal; line-height: 1.3;
}
.ticket__row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.ticket__where { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: var(--osso-2); font-size: .85rem; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket__where .ic { width: 14px; height: 14px; }
.ticket__actions { display: flex; gap: 4px; margin-left: auto; }
.suggested { font-size: .8rem; color: var(--osso-3); font-style: italic; }

.ticket--next {
  border-color: rgba(255, 59, 87, .45);
  box-shadow: 0 0 0 1px rgba(255, 59, 87, .2), 0 12px 40px rgba(200, 16, 46, .28);
  animation: nextPulse 3.2s ease-in-out 1s infinite;
}
.ticket--next.is-new { animation: ticketIn .45s ease-out both, nextPulse 3.2s ease-in-out 1s infinite; }
.ticket__cta { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 4px; }
.ticket__cta .btn { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.muted { color: var(--osso-3); font-weight: 400; }
@keyframes nextPulse { 50% { box-shadow: 0 0 0 1px rgba(255, 59, 87, .5), 0 12px 48px rgba(255, 59, 87, .42); } }
.ticket--next .ticket__body { grid-template-columns: 92px 1fr; padding: 18px 14px 14px; }
.ticket--next .poster { width: 92px; }
.ticket--next .ticket__title { font-size: 1.45rem; }
.ticket__stamp {
  position: absolute; top: -11px; right: 12px;
  padding: 3px 9px; border-radius: 3px;
  border: 2px solid var(--latao);
  background: #0a0507;
  color: var(--latao-vivo);
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; line-height: 1.2;
  transform: rotate(4deg);
  animation: stampIn .5s cubic-bezier(.3, 1.6, .5, 1) .45s both;
}
@keyframes stampIn { from { transform: rotate(-10deg) scale(2.4); opacity: 0; } }

.tickets.is-filtered .ticket__stub { cursor: default; }
.tickets.is-filtered .ticket__stub .ic { display: none; }

/* arrastar */
.ticket--placeholder { opacity: .22; outline: 2px dashed rgba(255, 59, 87, .55); outline-offset: -2px; }
.ticket--ghost {
  animation: none !important;
  opacity: .96;
  transform: rotate(-1.5deg) scale(1.02);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 59, 87, .6);
}
body.is-sorting { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* sair da fila */
.ticket--leaving { animation: burn .45s ease-in forwards !important; pointer-events: none; }
@keyframes burn { to { opacity: 0; transform: scale(.9) translateY(10px); filter: blur(4px) brightness(2.2) sepia(1) hue-rotate(-40deg); } }
.ticket--tear { animation: tear .5s ease-in forwards !important; pointer-events: none; }
.ticket--tear .ticket__stub { animation: tearStub .5s ease-in forwards; }
@keyframes tear { to { transform: translateX(60px) rotate(2deg); opacity: 0; } }
@keyframes tearStub { to { transform: translateX(-40px) rotate(-6deg); opacity: 0; } }
.wcard--leaving { animation: burn .45s ease-in forwards !important; pointer-events: none; }

/* ---------- Caveiras (hype) ---------- */
.skulls { display: inline-flex; gap: 2px; color: rgba(234, 223, 200, .2); vertical-align: middle; }
.skulls .ic { width: 16px; height: 16px; stroke: none; fill: currentColor; }
.skulls .is-on { color: var(--sangue-vivo); filter: drop-shadow(0 0 4px rgba(255, 59, 87, .5)); }
.skulls--input { gap: 0; }
.skulls--input button { background: none; border: 0; padding: 4px; cursor: pointer; color: inherit; border-radius: 4px; }
.skulls--input button .ic { width: 30px; height: 30px; transition: transform .15s; }
.skulls--input button:hover .ic { transform: scale(1.2); }
.skulls--input button.is-on { color: var(--sangue-vivo); filter: drop-shadow(0 0 5px rgba(255, 59, 87, .5)); }
.skulls--input button.pop .ic { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.4) rotate(-10deg); } }

/* ---------- Assistidos ---------- */
.watched { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wcard {
  position: relative;
  display: grid; grid-template-columns: 70px 1fr; gap: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #170e16, #0f0810);
  border: 1px solid rgba(234, 223, 200, .1);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  transition: border-color .2s, transform .2s;
}
.wcard.is-new { animation: ticketIn .45s ease-out both; animation-delay: calc(var(--i, 0) * 40ms); }
.wcard .poster { width: 70px; }
.wcard__main { min-width: 0; }
.wcard__title { margin: 0; font-weight: 600; font-size: 1.1rem; line-height: 1.2; cursor: pointer; }
.wcard__title:hover { color: var(--sangue-vivo); }
.wcard__date { margin: 2px 0 0; color: var(--osso-2); font-size: .9rem; font-style: italic; }
.wcard__review { margin: 8px 0 0; color: var(--osso-2); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wcard__scared { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--osso-3); font-size: .8rem; font-style: italic; }
.wcard__scared .ic { width: 14px; height: 14px; stroke: none; fill: currentColor; }

.stamps { display: flex; align-items: flex-end; gap: 12px; margin-top: 10px; }
.stamp-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.stamp-wrap b { font-weight: 400; font-size: .72rem; color: var(--osso-2); max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stamp {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid currentColor;
  box-shadow: inset 0 0 0 2px var(--noir-2), inset 0 0 0 3px currentColor;
  background: radial-gradient(circle, rgba(255, 255, 255, .05), transparent 70%);
  font-family: var(--f-display); font-size: 1.15rem; line-height: 1;
  transform: rotate(-7deg);
  animation: stampIn .45s cubic-bezier(.3, 1.6, .5, 1) both;
}
.stamp--me { color: var(--sangue-vivo); }
.stamp--friend { color: var(--espectro-vivo); transform: rotate(6deg); animation-delay: .08s; }
.stamp--sm { width: 32px; height: 32px; font-size: .85rem; box-shadow: inset 0 0 0 1px var(--noir-2), inset 0 0 0 2px currentColor; }
.avg { margin-left: auto; text-align: right; }
.avg b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1; color: var(--osso); }
.avg span { font-size: .75rem; color: var(--osso-2); font-style: italic; }

/* ---------- Painel de números ---------- */
.stats {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(138px, 1fr);
  gap: 10px;
  margin: 0 -16px 14px; padding: 2px 16px 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.stats::-webkit-scrollbar { display: none; }
.stat {
  scroll-snap-align: start;
  min-width: 0; padding: 12px 14px;
  border: 1px solid rgba(234, 223, 200, .1); border-radius: 6px;
  background: rgba(234, 223, 200, .03);
}
.stat b {
  display: block;
  font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1;
  color: var(--osso);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat span { display: block; margin-top: 5px; font-size: .8rem; color: var(--osso-2); font-style: italic; line-height: 1.25; }
.stat--me b { color: var(--sangue-vivo); }
.stat--friend b { color: var(--espectro-vivo); }
.stat--text b { font-family: var(--f-body); font-weight: 600; font-size: 1rem; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- Ranking ---------- */
.segmented {
  display: inline-flex; margin-bottom: 20px;
  border: 1px solid rgba(234, 223, 200, .18); border-radius: 4px; overflow: hidden;
}
.segmented button {
  padding: 8px 14px;
  background: none; border: 0; border-right: 1px solid rgba(234, 223, 200, .12);
  color: var(--osso-2);
  font: 600 .9rem var(--f-body);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.segmented button:last-child { border-right: 0; }
.segmented button.is-active { background: rgba(234, 223, 200, .1); color: var(--osso); }
.segmented button.is-active[data-mode="me"] { color: var(--sangue-vivo); background: rgba(200, 16, 46, .15); }
.segmented button.is-active[data-mode="friend"] { color: var(--espectro-vivo); background: rgba(143, 112, 255, .15); }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin: 14px 0 24px; }
.pod {
  position: relative; text-align: center;
  padding: 18px 8px 14px;
  border: 1px solid rgba(234, 223, 200, .12); border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(234, 223, 200, .05), rgba(234, 223, 200, .015));
  cursor: pointer;
  animation: podUp .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes podUp { from { opacity: 0; transform: translateY(40px); } }
.pod--1 { min-height: 250px; padding-top: 22px; border-color: rgba(217, 164, 65, .55); background: linear-gradient(180deg, rgba(217, 164, 65, .13), rgba(217, 164, 65, .02)); animation-delay: .25s; }
.pod--2 { min-height: 210px; animation-delay: .1s; }
.pod--3 { min-height: 190px; animation-delay: .4s; }
.pod .poster { width: 64px; margin: 0 auto 8px; }
.pod--1 .poster { width: 84px; }
.pod__rank {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--osso-2); color: #0a0507;
  font-family: var(--f-display); font-size: 1rem;
}
.pod--1 .pod__rank { background: var(--latao-vivo); box-shadow: 0 0 16px rgba(255, 210, 122, .6); }
.pod--3 .pod__rank { background: #c08a5a; }
.pod__title { margin: 0 0 6px; font-weight: 600; font-size: .95rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pod__score { font-family: var(--f-display); font-size: 2rem; line-height: 1; color: var(--osso); }
.pod--1 .pod__score { font-size: 2.7rem; color: var(--latao-vivo); text-shadow: 0 0 18px rgba(255, 210, 122, .35); }
.pod__sub { margin-top: 4px; font-size: .75rem; color: var(--osso-2); font-style: italic; }
.pod .stamps { justify-content: center; margin-top: 8px; }

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank {
  display: grid; grid-template-columns: 30px 44px 1fr auto; align-items: center; gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(234, 223, 200, .08); border-radius: 6px;
  background: rgba(234, 223, 200, .025);
  cursor: pointer;
  transition: border-color .2s;
}
.rank.is-new { animation: ticketIn .4s ease-out both; animation-delay: calc(var(--i, 0) * 35ms); }
.rank:hover { border-color: rgba(234, 223, 200, .25); }
.rank__pos { font-family: var(--f-display); font-size: 1.3rem; color: var(--osso-2); text-align: center; }
.rank .poster { width: 44px; box-shadow: none; }
.rank__main { min-width: 0; }
.rank__title { margin: 0; font-weight: 600; font-size: 1rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank__sub { font-size: .78rem; color: var(--osso-3); font-style: italic; }
.bar { height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(234, 223, 200, .08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--sangue-vivo), var(--espectro)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.rank[data-mode="me"] .bar i { background: var(--sangue-vivo); }
.rank[data-mode="friend"] .bar i { background: var(--espectro-vivo); }
.rank__score { font-family: var(--f-display); font-size: 1.5rem; line-height: 1; color: var(--osso); text-align: right; }
.rank__score small { display: block; margin-top: 2px; font: italic .7rem var(--f-body); color: var(--osso-2); }
.rank--shame .rank__pos { color: var(--osso-3); }

.shame { margin-top: 30px; }
.shame:empty { display: none; }
.shame > h3 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 1.3rem; color: var(--osso-2); }
.shame > p { margin: 0 0 12px; color: var(--osso-3); font-style: italic; font-size: .95rem; }

/* ---------- Sala vazia ---------- */
.empty { text-align: center; padding: 30px 12px 20px; color: var(--osso-2); }
.empty__seats { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; color: rgba(234, 223, 200, .13); }
.empty__seats .ic { width: 44px; height: 37px; stroke: none; fill: currentColor; }
.empty__seat { position: relative; display: inline-block; animation: seatIn .5s ease-out both; animation-delay: calc(var(--i) * 60ms); }
@keyframes seatIn { from { opacity: 0; transform: translateY(8px); } }
.empty__seat--taken { color: rgba(234, 223, 200, .28); }
.empty__seat--taken::before, .empty__seat--taken::after {
  content: ""; position: absolute; top: 11px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--sangue-vivo); box-shadow: 0 0 7px var(--sangue-vivo);
  animation: eyes 5s infinite;
}
.empty__seat--taken::before { left: 15px; }
.empty__seat--taken::after { right: 15px; }
@keyframes eyes { 0%, 88%, 100% { transform: scaleY(1); } 92% { transform: scaleY(.1); } }
.empty p { margin: 0 0 16px; font-size: 1.05rem; font-style: italic; }
.empty .btn { margin: 0 auto; }

/* ---------- Diálogos (fichas) ---------- */
.sheet {
  border: 0; padding: 0; margin: auto 0 0;
  width: 100%; max-width: 100%; max-height: 92dvh;
  background: transparent; color: var(--osso);
  overflow: visible;
}
.sheet::backdrop { background: rgba(5, 2, 4, .72); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheetUp .38s cubic-bezier(.2, .9, .2, 1); }
.sheet.is-closing { animation: sheetDown .22s ease-in forwards; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheetDown { to { transform: translateY(30px); opacity: 0; } }
@keyframes sheetPop { from { transform: scale(.92) translateY(10px); opacity: 0; } }
.sheet__form {
  display: flex; flex-direction: column;
  max-height: 92dvh;
  background: linear-gradient(180deg, #1d1018, #110810);
  border: 1px solid rgba(234, 223, 200, .14); border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 59, 87, .08);
}
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 10px; }
.sheet__head h2 { margin: 0; font-family: var(--f-display); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 1.5rem; line-height: 1; }
.sheet__sub { margin: 6px 0 0; color: var(--osso-2); font-style: italic; }
.sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 8px 18px 12px; }
.sheet__body p { margin: 0; }
.sheet__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(234, 223, 200, .08); }
.sheet--confirm { margin: auto; max-width: 420px; }
.sheet--confirm .sheet__form { border-radius: 10px; border-bottom: 1px solid rgba(234, 223, 200, .14); }
.sheet--confirm .sheet__foot { padding-bottom: 16px; }

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .85rem; color: var(--osso-2); font-style: italic; }
.field input:not([type="checkbox"]):not([type="range"]), .field textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(234, 223, 200, .16); border-radius: 4px;
  color: var(--osso);
  font: 400 1rem var(--f-body);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--osso-3); font-style: italic; }
.field input:focus, .field textarea:focus { border-color: var(--sangue-vivo); box-shadow: 0 0 0 3px rgba(255, 59, 87, .18); }
.field--friend input:focus { border-color: var(--espectro-vivo); box-shadow: 0 0 0 3px rgba(143, 112, 255, .22); }
.field.is-invalid input { border-color: var(--sangue-vivo); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="date"], input[type="time"] { color-scheme: dark; }
textarea { resize: vertical; min-height: 70px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--sangue); flex-shrink: 0; }
.hint { margin: 6px 0 0; font-size: .85rem; color: var(--osso-3); font-style: italic; }
.field--danger { padding-top: 12px; border-top: 1px solid rgba(255, 59, 87, .2); }
.field--danger .btn { align-self: flex-start; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid rgba(234, 223, 200, .18);
  background: rgba(234, 223, 200, .04);
  color: var(--osso-2);
  font: 600 .85rem/1.2 var(--f-body);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.chip:hover { border-color: rgba(234, 223, 200, .4); color: var(--osso); }
.chip:active { transform: scale(.96); }
.chip.is-on { background: rgba(200, 16, 46, .22); border-color: var(--sangue-vivo); color: var(--osso); }
.chip--friend.is-on { background: rgba(143, 112, 255, .2); border-color: var(--espectro-vivo); }
.chip--neutral.is-on { background: rgba(234, 223, 200, .12); border-color: var(--osso-2); }

.rating { --c: var(--sangue-vivo); }
.rating--friend { --c: var(--espectro-vivo); }
.rating__head { display: flex; align-items: baseline; justify-content: space-between; }
.rating__head span { font-size: .9rem; color: var(--osso-2); font-style: italic; }
.rating__value { font-family: var(--f-display); font-size: 2rem; line-height: 1; color: var(--c); transition: transform .15s; }
.rating__value.bump { animation: pop .25s; }
.rating input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; margin: 8px 0 4px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--c) var(--p, 70%), rgba(234, 223, 200, .12) var(--p, 70%));
  outline: none;
}
.rating input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #0a0507; border: 3px solid var(--c);
  box-shadow: 0 0 12px var(--c);
  cursor: pointer;
}
.rating input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #0a0507; border: 3px solid var(--c);
  box-shadow: 0 0 12px var(--c);
  cursor: pointer;
}
.rating input[type="range"]:focus-visible { outline: 2px solid var(--osso); outline-offset: 4px; }

/* ---------- Detalhes ---------- */
.details { display: flex; flex-direction: column; max-height: 92dvh; }
.details__scroll { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.details__hero { position: relative; display: flex; gap: 14px; padding: 18px 18px 14px; overflow: hidden; border-radius: 16px 16px 0 0; }
.details__bg { position: absolute; inset: -24px; background-size: cover; background-position: center; filter: blur(18px) brightness(.35) saturate(1.2); }
.details__hero > * { position: relative; }
.details .poster { width: 96px; }
.details__title { margin: 0; font-weight: 600; font-size: 1.35rem; line-height: 1.15; }
.details__meta { margin: 4px 0 0; color: var(--osso-2); font-style: italic; font-size: .95rem; }
.details__hero .btn-icon { position: absolute; top: 12px; right: 12px; }
.details__section { padding: 6px 18px; }
.details__section + .details__section { padding-top: 10px; }
.details__label { margin: 0 0 2px; font-size: .85rem; color: var(--osso-3); font-style: italic; }
.details__section p { margin: 0; }
.details__section .stamps { margin-top: 4px; }
.details__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(234, 223, 200, .08); }
.details__actions .btn--wide { grid-column: 1 / -1; }
.details__link { display: inline-flex; align-items: center; gap: 6px; color: var(--sangue-vivo); font-weight: 600; text-decoration: none; }
.details__link:hover { text-decoration: underline; }

/* ---------- Avisos ---------- */
.toasts {
  position: fixed; left: 0; right: 0; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  max-width: min(92vw, 440px); padding: 10px 16px;
  border-radius: 4px;
  background: #1a0b12; border: 1px solid rgba(234, 223, 200, .2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  color: var(--osso); font-size: .95rem;
  animation: toastIn .35s cubic-bezier(.2, 1.3, .4, 1) both;
}
.toast .ic { width: 18px; height: 18px; color: var(--sangue-vivo); }
.toast.is-leaving { animation: toastOut .25s ease-in forwards; }
@keyframes toastIn { from { transform: translateY(12px) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(8px); opacity: 0; } }

/* ---------- Carimbo da sessão ---------- */
.stamp-fx { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; pointer-events: none; }
.stamp-fx.is-on { display: grid; }
.stamp-fx__seal {
  width: 200px; height: 200px; border-radius: 50%;
  border: 6px double var(--sangue-vivo);
  display: grid; place-content: center; text-align: center;
  color: var(--sangue-vivo);
  background: rgba(10, 5, 7, .8);
  box-shadow: 0 0 60px rgba(255, 59, 87, .35);
  animation: slam 1s cubic-bezier(.2, 1.2, .3, 1) both;
}
.stamp-fx__num { font-family: var(--f-display); font-size: 4.4rem; line-height: .9; }
.stamp-fx__txt { font: italic .95rem var(--f-body); }
@keyframes slam {
  0% { transform: rotate(-30deg) scale(3); opacity: 0; }
  40% { transform: rotate(-12deg) scale(1); opacity: 1; }
  75% { transform: rotate(-12deg) scale(1); opacity: 1; }
  100% { transform: rotate(-12deg) scale(1.06); opacity: 0; }
}

/* ---------- Telas maiores ---------- */
@media (hover: hover) {
  .ticket:not(.ticket--placeholder):hover { border-color: rgba(234, 223, 200, .28); transform: translateY(-2px); }
  .wcard:hover { border-color: rgba(234, 223, 200, .28); transform: translateY(-2px); }
}
@media (min-width: 720px) {
  .sheet { margin: auto; max-width: 580px; }
  .sheet[open] { animation: sheetPop .32s cubic-bezier(.2, 1.4, .4, 1); }
  .sheet__form { max-height: 88vh; border-radius: 10px; border-bottom: 1px solid rgba(234, 223, 200, .14); }
  .sheet__foot, .details__actions { padding-bottom: 16px; }
  .details__hero { border-radius: 10px 10px 0 0; }
  .watched { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); margin: 0 0 16px; padding: 0; overflow: visible; }
}
@media (min-width: 900px) {
  #view-queue, #view-ranking { max-width: 840px; margin: 0 auto; }
  .stats { grid-template-columns: repeat(6, 1fr); }
  .toasts { bottom: 28px; }
  .pod--1 { min-height: 290px; }
  .pod--2 { min-height: 240px; }
  .pod--3 { min-height: 220px; }
  .pod .poster { width: 80px; }
  .pod--1 .poster { width: 104px; }
}
@media (min-width: 1100px) {
  .watched { grid-template-columns: repeat(3, 1fr); }
}
