:root {
  color-scheme: light;
  --ink: #273229;
  --muted: #687168;
  --ivory: #fffaf4;
  --day-green: #365840;
  --day-sage: #879875;
  --day-gold: #c89050;
  --deck-ink: #33283c;
  --deck-violet: #876bad;
  --deck-plum: #564361;
  --line: rgba(55, 65, 56, 0.15);
  --shadow: 0 24px 70px rgba(60, 46, 57, 0.16);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nowrap {
  white-space: nowrap;
}

html {
  min-height: 100%;
  background: #e9e2db;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 4%, rgba(255, 239, 213, 0.9), transparent 30%),
    radial-gradient(circle at 88% 22%, rgba(212, 191, 210, 0.52), transparent 28%),
    linear-gradient(145deg, #e9e2db 0%, #f3eee8 58%, #ded9e5 100%);
  transition: background 320ms ease;
}

body[data-view="baralho"] {
  background:
    radial-gradient(circle at 10% 4%, rgba(238, 221, 229, 0.8), transparent 30%),
    radial-gradient(circle at 90% 16%, rgba(131, 107, 163, 0.28), transparent 28%),
    linear-gradient(145deg, #e5dfe4 0%, #f4edf0 50%, #dad5e3 100%);
}

body[data-view="capa"] {
  color: #fffaf0;
  background:
    radial-gradient(circle at 50% 12%, rgba(188, 143, 77, 0.24), transparent 30%),
    linear-gradient(155deg, #0d132a 0%, #182348 55%, #291e45 100%);
}

button {
  font: inherit;
}

button:focus-visible,
[role="tab"]:focus-visible {
  outline: 3px solid rgba(197, 137, 74, 0.48);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(20px);
  pointer-events: none;
  opacity: 0.46;
}

.ambient-one {
  width: 270px;
  height: 270px;
  top: 4vh;
  left: 7vw;
  background: rgba(244, 199, 144, 0.42);
}

.ambient-two {
  width: 330px;
  height: 330px;
  right: 4vw;
  bottom: 2vh;
  background: rgba(136, 108, 161, 0.25);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  min-height: 100svh;
  margin: 0 auto;
  overflow-x: hidden;
  padding: max(20px, env(safe-area-inset-top)) 20px calc(118px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}

body[data-view="capa"] .app-shell {
  color: #fffaf0;
  background:
    linear-gradient(to bottom, rgba(8, 14, 35, 0.4) 0%, rgba(10, 15, 39, 0.68) 43%, rgba(16, 17, 43, 0.94) 100%),
    linear-gradient(135deg, rgba(72, 48, 101, 0.22), rgba(14, 47, 72, 0.1)),
    url("./assets/capa-ceu.jpg") center 44% / cover no-repeat;
  box-shadow: 0 28px 90px rgba(6, 10, 28, 0.48);
  backdrop-filter: none;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

body[data-view="capa"] .cover-view {
  min-height: calc(100svh - 112px);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body:not([data-view="capa"]) .app-header {
  display: none;
}

.brand {
  display: block;
  width: 148px;
  height: auto;
}

.brand-lockup {
  display: flex;
  width: 148px;
  min-height: 34px;
  align-items: center;
}

.brand-lockup .brand {
  position: static;
}

.brand-light {
  display: none;
}

body[data-view="capa"] .brand-dark {
  display: none;
}

body[data-view="capa"] .brand-light {
  display: block;
}

.install-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(54, 88, 64, 0.23);
  border-radius: 999px;
  color: var(--day-green);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.install-button[hidden] {
  display: none;
}

body[data-view="capa"] .install-button {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff9ed;
  background: rgba(12, 21, 50, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.install-button svg,
.cover-action svg,
.bottom-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cover-view {
  display: grid;
  min-height: calc(100svh - 180px);
  grid-template-rows: auto minmax(210px, 1fr) auto;
  gap: 10px;
  padding: 28px 0 4px;
  animation: cover-in 520ms cubic-bezier(0.2, 0.78, 0.2, 1);
}

.cover-view[hidden] {
  display: none;
}

@keyframes cover-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.cover-copy {
  position: relative;
  z-index: 7;
  text-align: center;
  text-shadow: 0 3px 24px rgba(2, 7, 27, 0.72);
}

.cover-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  color: #f3cf8b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.cover-kicker::before,
.cover-kicker::after {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 205, 136, 0.85));
  content: "";
}

.cover-kicker::after {
  transform: rotate(180deg);
}

.cover-copy h1 {
  margin: 0;
  color: #fffaf0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.12rem, 9.35vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.cover-instruction {
  max-width: 100%;
  margin: 14px auto 0;
  color: rgba(255, 250, 240, 0.92);
  font-size: clamp(1.0625rem, 4.35vw, 1.18rem);
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.48;
}

.cover-instruction span {
  display: block;
  white-space: nowrap;
}

.deck-stack-area {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 220px;
}

.deck-stack-trigger {
  position: absolute;
  z-index: 100;
  bottom: 4px;
  left: 50%;
  width: 112px;
  height: 202px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  clip-path: inset(0 round 15px);
  cursor: pointer;
  touch-action: manipulation;
  transform: translateX(-50%);
}

.deck-stack-trigger:focus-visible {
  outline: 4px solid #f3cf8b;
  outline-offset: 5px;
}

.deck-stack-trigger[aria-busy="true"] {
  cursor: wait;
}

.card-fan {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 220px;
  align-self: stretch;
  isolation: isolate;
  transition: min-height 420ms ease, background 320ms ease, box-shadow 320ms ease;
}

.card-fan:not(.is-open)::after {
  position: absolute;
  z-index: -1;
  right: 8%;
  bottom: 1px;
  left: 8%;
  height: 34px;
  border-radius: 50%;
  background: rgba(1, 5, 20, 0.56);
  filter: blur(17px);
  content: "";
}

.card-fan.is-open {
  width: calc(100% + 12px);
  height: auto;
  min-height: 326px;
  margin-left: -6px;
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(243, 207, 139, 0.2);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 24, 57, 0.76), rgba(41, 29, 65, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 34px rgba(1, 5, 20, 0.28);
  touch-action: manipulation;
}

.deck-spread,
.deck-row {
  display: contents;
}

.card-fan.is-open .deck-spread {
  display: flex;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  padding: 12px 10px 14px;
}

.card-fan.is-open .deck-row {
  display: flex;
  width: max-content;
  max-width: 100%;
  height: 123px;
  align-items: flex-start;
  padding: 0;
  isolation: isolate;
  transform: translateX(var(--row-shift, 0));
}

.card-fan.is-open .deck-row + .deck-row {
  margin-top: -30px;
}

.card-fan.is-open .fan-card + .fan-card {
  margin-left: -52px;
}

.fan-card {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 112px;
  height: 202px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 248, 229, 0.78);
  border-radius: 15px;
  background: #202747;
  box-shadow: 0 17px 30px rgba(2, 7, 26, 0.46);
  opacity: 0;
  appearance: none;
  cursor: default;
  filter: none;
  transform-origin: 50% 108%;
  visibility: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease, opacity 220ms ease, filter 220ms ease;
}

.card-fan.is-open .fan-card:enabled {
  cursor: pointer;
}

.card-fan:not(.is-open) .fan-card.is-stack-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(calc(-50% + var(--stack-x, 0px))) translateY(var(--stack-y, 0px)) rotate(var(--stack-rotate, 0deg));
}

.card-fan.is-open .fan-card {
  position: relative;
  inset: auto;
  flex: 0 0 68px;
  width: 68px;
  height: 123px;
  border-radius: 11px;
  opacity: 1;
  transform: translateY(var(--open-y, 0)) rotate(var(--open-rotate, 0deg));
  transform-origin: center;
  visibility: visible;
  animation: spread-card 520ms cubic-bezier(0.2, 0.74, 0.19, 1) both;
  animation-delay: calc(var(--card-index, 0) * 8ms);
}

@keyframes spread-card {
  from {
    opacity: 0;
    transform: translateY(14px) rotate(0) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(var(--open-y, 0)) rotate(var(--open-rotate, 0deg)) scale(1);
  }
}

.fan-card:focus-visible {
  z-index: 60 !important;
  outline: 4px solid #f3cf8b;
  outline-offset: 3px;
}

.fan-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7, 11, 30, 0.02), rgba(7, 11, 30, 0.24));
  content: "";
}

.fan-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fan-card-back {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px double rgba(246, 213, 149, 0.55);
  border-radius: 12px;
  color: #fff9eb;
  background:
    radial-gradient(circle at 50% 39%, rgba(239, 200, 124, 0.22), transparent 25%),
    radial-gradient(circle at 50% 50%, transparent 31%, rgba(236, 194, 116, 0.42) 31.5% 32%, transparent 32.5%),
    linear-gradient(145deg, #1a2752, #29204a 74%, #141a38);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.24);
  opacity: 1;
  transition: opacity 220ms ease;
}

.fan-card-back::before,
.fan-card-back::after {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(239, 201, 128, 0.35);
  border-radius: 50%;
  content: "";
}

.fan-card-back::before {
  top: -37px;
  left: -34px;
}

.fan-card-back::after {
  right: -34px;
  bottom: -37px;
}

.fan-card-back img {
  width: 82px;
  height: auto;
  margin-bottom: 13px;
  object-fit: contain;
}

.fan-card-back strong {
  width: 88%;
  max-width: 88%;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.6rem;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.fan-card-back i {
  margin-top: 12px;
  color: #efc77c;
  font-size: 0.9rem;
  font-style: normal;
}

.card-fan.is-open .fan-card-back {
  pointer-events: none;
  border-width: 3px;
  border-radius: 9px;
  opacity: 1;
}

.card-fan.is-open .fan-card-back img {
  width: 46px;
  margin-bottom: 7px;
}

.card-fan.is-open .fan-card-back strong {
  font-size: 0.39rem;
}

.card-fan.is-open .fan-card-back i {
  margin-top: 7px;
  font-size: 0.68rem;
}

.card-fan.is-choosing .fan-card:not(.is-chosen) {
  opacity: 0.5;
  filter: saturate(0.72) brightness(0.85);
}

.card-fan.is-choosing .fan-card.is-chosen {
  z-index: 80 !important;
  box-shadow: 0 0 0 3px rgba(244, 207, 137, 0.7), 0 20px 38px rgba(2, 7, 26, 0.56);
  transform: translateY(-10px) rotate(var(--open-rotate, 0deg)) scale(1.065);
}

.card-fan.is-choosing .fan-card.is-chosen .fan-card-back {
  opacity: 0;
}

.cover-actions {
  position: relative;
  z-index: 8;
  display: grid;
  gap: 9px;
}

.cover-action {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: 18px;
  font-size: 1.03rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.cover-action:active {
  transform: scale(0.985);
}

.cover-action-primary {
  border: 1px solid rgba(255, 236, 192, 0.9);
  color: #202342;
  background: linear-gradient(120deg, #f7dfac, #e8bd72);
  box-shadow: 0 12px 30px rgba(3, 8, 29, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.choose-guidance {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 11px 18px 12px;
  border: 1px solid rgba(243, 207, 139, 0.46);
  border-radius: 18px;
  color: #f7d99d;
  background: rgba(17, 26, 59, 0.52);
  font-size: 0.93rem;
  font-weight: 650;
  line-height: 1.38;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
  backdrop-filter: blur(14px);
}

.choose-guidance strong {
  display: block;
  margin-bottom: 2px;
  color: #fff2ce;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.choose-guidance > span {
  display: block;
  color: #f7d99d;
  font-weight: 750;
}

.choose-guidance[hidden],
#openDeckButton[hidden] {
  display: none;
}

.cover-action-secondary {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fffaf0;
  background: rgba(17, 26, 59, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.intro {
  padding: 36px 3px 24px;
}

body[data-view="capa"] .intro,
body[data-view="capa"] .view-switcher,
body[data-view="capa"] .approval-note {
  display: none;
}

.prototype-label,
.dialog-label {
  margin: 0 0 9px;
  color: #7d6d59;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.intro h1 {
  margin: 0;
  color: #263429;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.intro > p:last-child {
  max-width: 44ch;
  margin: 15px 0 0;
  color: #657067;
  font-size: 1rem;
  line-height: 1.58;
}

.view-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0 0 22px;
  padding: 6px;
  border: 1px solid rgba(59, 67, 60, 0.1);
  border-radius: 20px;
  background: rgba(239, 235, 228, 0.8);
}

.view-tab {
  min-height: 64px;
  padding: 9px 10px;
  border: 0;
  border-radius: 15px;
  color: #6b716c;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.16;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.view-tab.is-active {
  color: var(--day-green);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 7px 22px rgba(62, 61, 57, 0.11);
}

body[data-view="baralho"] .view-tab.is-active {
  color: var(--deck-plum);
}

.view-tab:active {
  transform: scale(0.98);
}

.tab-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  opacity: 0.67;
}

.card-view {
  margin-top: 22px;
  animation: view-in 360ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

body:not([data-view="capa"]) .card-view {
  margin-top: 0;
}

.card-view[hidden] {
  display: none;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(12px) scale(0.986); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.day-card,
.deck-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 25px;
  box-shadow: 0 14px 38px rgba(64, 59, 48, 0.16);
}

.day-card {
  display: grid;
  grid-template-rows: minmax(155px, 44%) minmax(0, 56%);
  border: 1px solid rgba(106, 104, 78, 0.2);
  background: #fffaf2;
}

.day-art {
  position: relative;
  min-height: 0;
  isolation: isolate;
}

.day-art > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

.day-art-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(22, 34, 25, 0.35) 0%, rgba(22, 34, 25, 0.02) 36%, rgba(28, 39, 28, 0.69) 100%),
    linear-gradient(130deg, rgba(51, 76, 54, 0.16), transparent 52%);
}

.day-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 16px 18px 0;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.34);
}

.day-draw-label {
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(34, 53, 37, 0.18);
  font-size: 0.66rem;
  backdrop-filter: blur(10px);
}

.brand-icon-crop {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  pointer-events: none;
}

.brand-icon-crop img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
  opacity: 0.92;
  filter: drop-shadow(0 1px 4px rgba(18, 24, 33, 0.38));
}

.day-heading {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  color: #fffdf7;
  text-shadow: 0 3px 20px rgba(17, 28, 18, 0.42);
}

.day-theme {
  display: inline-block;
  margin-bottom: 6px;
  color: #fae4b8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.day-heading h2 {
  max-width: 11.7em;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.72rem, 7.4vw, 2.18rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.day-content {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 16px 18px 14px;
}

.day-message,
.deck-message {
  margin: 0;
  font-size: clamp(1.125rem, 4.7vw, 1.2rem);
  line-height: 1.4;
}

.day-message {
  color: #354438;
}

.gesture-block {
  position: relative;
  margin-top: 12px;
  padding: 12px 14px 12px 19px;
  border: 1px solid rgba(75, 99, 72, 0.12);
  border-radius: 17px;
  background: linear-gradient(135deg, #edf0e3, #f6eee1);
}

.gesture-block::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 9px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(to bottom, #c18a48, #7a946f);
  content: "";
}

.gesture-block h3 {
  margin: 0 0 4px;
  color: #47604a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
}

.gesture-block p {
  margin: 0;
  color: #465147;
  font-size: 1rem;
  line-height: 1.38;
}

.day-anchor {
  margin: 10px 0 0;
  padding-right: 76px;
  color: #755836;
  font-size: 0.93rem;
  line-height: 1.32;
  text-align: left;
}

.day-anchor span {
  margin-right: 6px;
  color: #c18a48;
}

.card-signature {
  position: absolute;
  z-index: 0;
  right: 14px;
  bottom: 10px;
  display: flex;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}

.card-signature img {
  width: 72px;
  height: auto;
  opacity: 0.24;
}

.deck-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(124px, 0.86fr) auto auto auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(86, 67, 97, 0.21);
  color: var(--deck-ink);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.65), transparent 38%),
    #f6edf1;
}

.deck-card::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(134, 107, 172, 0.22);
  border-radius: 20px;
  pointer-events: none;
  content: "";
}

.deck-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(100deg, #745997, #9478b6);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.deck-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.deck-hero {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  grid-template-columns: 36% 1fr;
  gap: 12px;
  align-items: stretch;
  margin: 0 1px;
}

.deck-art {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  box-shadow: 4px 5px 0 rgba(81, 65, 91, 0.1);
}

.deck-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-number {
  position: absolute;
  top: 9px;
  left: 9px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #8b6bac;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(43, 32, 55, 0.22);
}

.art-caption {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  padding: 6px 4px;
  border-radius: 999px;
  color: white;
  background: rgba(42, 32, 52, 0.62);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-align: center;
  backdrop-filter: blur(7px);
}

.deck-title-wrap {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.mantra {
  margin: 0 0 9px;
  padding: 9px 6px;
  border-radius: 14px;
  color: white;
  background: #8b6bac;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 4.7vw, 1.3rem);
  font-weight: 700;
  text-align: center;
}

.deck-title-wrap h2 {
  margin: 0;
  color: #382c42;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.48rem, 6.25vw, 1.88rem);
  line-height: 1.07;
  letter-spacing: -0.035em;
}

.deck-message {
  position: relative;
  z-index: 1;
  margin: 0 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(135, 107, 173, 0.66);
  color: #413647;
}

.practice-block {
  position: relative;
  z-index: 1;
  margin: 0 1px;
  padding: 12px 14px;
  border-radius: 17px;
  background: rgba(224, 212, 220, 0.72);
}

.practice-label {
  display: block;
  margin-bottom: 5px;
  color: #7e61a0;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.practice-block p {
  margin: 0;
  color: #413647;
  font-size: clamp(1rem, 4.15vw, 1.08rem);
  line-height: 1.38;
}

.meditation-continuation {
  display: inline;
}

.meditation-continuation[hidden],
.youtube-link[hidden] {
  display: none;
}

#dayMeditationPrompt,
#deckMeditationPrompt {
  color: inherit;
  font: inherit;
}

.youtube-link {
  display: inline-flex;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0;
  border: 1px solid rgba(198, 31, 43, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  vertical-align: middle;
  box-shadow: 0 5px 12px rgba(89, 39, 50, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.youtube-link:active {
  transform: scale(0.97);
}

.youtube-link:focus-visible {
  outline: 3px solid rgba(196, 37, 48, 0.28);
  outline-offset: 2px;
}

.youtube-link svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
}

.youtube-link svg rect {
  fill: #e62117;
}

.youtube-link svg path {
  fill: #fff;
}

.deck-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
  margin: 0 3px;
  color: #715d7c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.79rem;
  text-align: center;
}

.deck-signature {
  position: relative;
  width: 20px;
  height: 20px;
  margin: -1px 0;
}

.dialog-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 17px;
  border-radius: 18px;
  font-size: 0.95rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dialog-action:active {
  transform: scale(0.98);
}

.secondary-action {
  border: 1px solid rgba(50, 67, 54, 0.18);
  color: #4b5a4d;
  background: rgba(255, 255, 255, 0.82);
}

.primary-action {
  border: 0;
  color: white;
  background: linear-gradient(110deg, #45614a, #68785c);
  box-shadow: 0 10px 24px rgba(55, 79, 59, 0.22);
}

body[data-view="baralho"] .primary-action {
  background: linear-gradient(110deg, #684f7b, #8c6cac);
  box-shadow: 0 10px 24px rgba(84, 58, 101, 0.23);
}

.approval-note {
  max-width: 36ch;
  margin: 28px auto 0;
  color: #777b75;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

body:not([data-view="capa"]) {
  height: 100dvh;
  overflow: hidden;
}

body:not([data-view="capa"]) .app-shell {
  display: flex;
  width: min(100%, 520px);
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: max(8px, env(safe-area-inset-top)) 12px calc(74px + env(safe-area-inset-bottom));
}

body:not([data-view="capa"]) .card-view.is-active {
  display: flex;
  min-height: 0;
  flex: 1;
  align-items: stretch;
}

.day-card.is-compact {
  grid-template-rows: minmax(138px, 33%) minmax(0, 67%);
}

.day-card.is-compact .day-content {
  padding: 13px 16px 11px;
}

.day-card.is-compact .day-message {
  font-size: 1rem;
  line-height: 1.35;
}

.day-card.is-compact .gesture-block {
  margin-top: 9px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.day-card.is-compact .gesture-block p {
  font-size: 1rem;
  line-height: 1.32;
}

.day-card.is-compact .day-anchor {
  font-size: 0.93rem;
  line-height: 1.32;
}

.day-card.is-tight {
  grid-template-rows: minmax(128px, 29%) minmax(0, 71%);
}

.day-card.is-tight .day-heading h2 {
  font-size: 1.5rem;
}

.day-card.is-tight .day-content {
  padding: 10px 14px 9px;
}

.day-card.is-tight .day-message,
.day-card.is-tight .gesture-block p {
  font-size: 1rem;
  line-height: 1.28;
}

.day-card.is-tight .gesture-block {
  margin-top: 7px;
  padding: 8px 12px 8px 17px;
}

.day-card.is-tight .gesture-block h3 {
  margin-bottom: 2px;
  font-size: 1rem;
}

.day-card.is-tight .day-anchor {
  margin-top: 7px;
  font-size: 0.91rem;
}

.deck-card.is-compact {
  grid-template-rows: auto minmax(112px, 0.72fr) auto auto auto;
  gap: 7px;
  padding: 10px;
}

.deck-card.is-compact .deck-title-wrap h2 {
  font-size: 1.42rem;
}

.deck-card.is-compact .deck-message,
.deck-card.is-compact .practice-block p {
  font-size: 1rem;
  line-height: 1.32;
}

.deck-card.is-compact .practice-block {
  padding: 9px 12px;
}

.deck-card.is-tight {
  grid-template-rows: auto minmax(102px, 0.62fr) auto auto auto;
  gap: 6px;
  padding: 9px;
}

.deck-card.is-tight .deck-header {
  min-height: 31px;
}

.deck-card.is-tight .deck-title-wrap h2 {
  font-size: 1.3rem;
}

.deck-card.is-tight .mantra {
  margin-bottom: 7px;
  padding: 8px 5px;
  font-size: 1rem;
}

.deck-card.is-tight .deck-message,
.deck-card.is-tight .practice-block p {
  font-size: 1rem;
  line-height: 1.25;
}

.deck-card.is-tight .practice-label {
  margin-bottom: 3px;
  font-size: 0.67rem;
}

.deck-card.is-tight .practice-block {
  padding: 8px 11px;
}

.deck-card.has-meditation.is-tight .deck-footer {
  display: none;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  right: 50%;
  bottom: 0;
  display: grid;
  width: min(100%, 520px);
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(70, 70, 65, 0.1);
  background: rgba(255, 252, 248, 0.91);
  box-shadow: 0 -8px 32px rgba(56, 51, 48, 0.11);
  backdrop-filter: blur(22px);
  transform: translateX(50%);
}

.bottom-nav-item {
  display: flex;
  min-height: 52px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 18px;
  color: #7d817c;
  background: transparent;
  padding: 0 10px;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
}

.bottom-nav-item span {
  white-space: nowrap;
}

body[data-view="capa"] .bottom-nav {
  display: none;
}

.bottom-nav-item.return-home {
  color: #38563e;
  background: rgba(218, 226, 207, 0.64);
}

body[data-view="baralho"] .bottom-nav-item.return-home {
  color: #674f77;
  background: rgba(228, 215, 232, 0.75);
}

.install-dialog {
  width: min(calc(100% - 36px), 410px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 27px 20px 21px;
  border: 0;
  border-radius: 30px;
  color: #2d392f;
  background: #fffaf4;
  box-shadow: 0 28px 85px rgba(36, 31, 38, 0.28);
  text-align: center;
}

.install-dialog::backdrop {
  background: rgba(30, 28, 35, 0.5);
  backdrop-filter: blur(5px);
}

.install-dialog img {
  width: 68px;
  height: 68px;
  margin-bottom: 15px;
  border-radius: 21px;
  box-shadow: 0 12px 27px rgba(43, 63, 46, 0.17);
}

.install-dialog h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
}

.ios-install-guide {
  margin-top: 11px;
  text-align: left;
}

.ios-install-guide[hidden],
.install-browser-note[hidden],
.install-panel[hidden],
.dialog-action[hidden] {
  display: none;
}

.install-platform-switch {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 6px;
  margin-top: 16px;
  padding: 5px;
  border: 1px solid rgba(64, 87, 68, 0.14);
  border-radius: 17px;
  background: #eeeae3;
}

.install-platform-option {
  min-height: 45px;
  padding: 7px 9px;
  border: 0;
  border-radius: 13px;
  color: #5d665f;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
}

.install-platform-option.is-active {
  color: #31553a;
  background: #fff;
  box-shadow: 0 5px 16px rgba(41, 55, 44, 0.12);
}

.install-panel {
  margin-top: 15px;
}

.install-panel h3 {
  margin: 0;
  color: #385a40;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.install-panel-intro {
  margin: 6px 0 0;
  color: #5e685f;
  font-size: 0.91rem;
  line-height: 1.4;
}

.install-browser-note {
  margin: 11px 0 0;
  padding: 12px 13px;
  border: 1px solid rgba(155, 105, 45, 0.2);
  border-radius: 15px;
  color: #6a5132;
  background: #fff1d8;
  font-size: 0.9rem;
  line-height: 1.42;
}

.install-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: grid;
  grid-template-columns: 27px 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(64, 87, 68, 0.12);
  border-radius: 17px;
  color: #475348;
  background: rgba(238, 242, 232, 0.72);
  font-size: 0.91rem;
  line-height: 1.35;
}

.install-step-number {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #46634b;
  font-size: 0.78rem;
  font-weight: 800;
}

.install-step-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #2f6eb6;
  background: #fff;
  box-shadow: 0 5px 14px rgba(41, 71, 48, 0.12);
}

.install-step-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.install-step-final {
  grid-template-columns: 27px 72px minmax(0, 1fr) !important;
}

.install-step-word {
  display: grid;
  min-height: 36px;
  place-items: center;
  padding: 0 7px;
  border-radius: 11px;
  color: #0b6fd3;
  background: #fff;
  box-shadow: 0 5px 14px rgba(41, 71, 48, 0.12);
  font-size: 0.68rem;
  font-weight: 800;
}

.install-help {
  margin: 11px 2px 0;
  color: #777f78;
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.android-install-fallback {
  margin: 12px 0 0;
  padding: 13px;
  border-radius: 15px;
  color: #5c625d;
  background: #f0eee8;
  font-size: 0.88rem;
  line-height: 1.45;
}

.android-install-fallback.is-highlighted {
  outline: 3px solid rgba(205, 145, 63, 0.38);
  background: #fff0d5;
}

.install-dialog > p:not(.dialog-label) {
  margin: 0;
  color: #626b63;
  font-size: 1rem;
  line-height: 1.55;
}

.dialog-close {
  position: absolute;
  top: 15px;
  right: 16px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #5f665f;
  background: #ede8e1;
  font-size: 1.5rem;
  cursor: pointer;
}

.dialog-action {
  width: 100%;
  margin-top: 14px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  max-width: calc(100% - 44px);
  padding: 11px 17px;
  border-radius: 999px;
  color: white;
  background: rgba(38, 45, 39, 0.92);
  box-shadow: 0 12px 30px rgba(28, 29, 31, 0.22);
  font-size: 0.85rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(50%, 0);
}

@media (max-width: 390px) {
  .app-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .deck-card {
    padding: 10px;
  }

  .deck-hero {
    grid-template-columns: 35% 1fr;
    gap: 10px;
  }

  .deck-header {
    gap: 6px;
    font-size: 0.64rem;
  }
}

@media (max-width: 370px) {
  .day-topline {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 10px 10px 0;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .day-topline > span:first-child {
    white-space: nowrap;
  }

  .day-draw-label {
    flex: 0 0 auto;
    padding: 4px 6px;
    font-size: 0.56rem;
    letter-spacing: 0.05em;
  }

  .day-heading {
    right: 12px;
    bottom: 11px;
    left: 12px;
  }

  .day-theme {
    margin-bottom: 4px;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }

  .bottom-nav-item {
    min-height: 51px;
    flex-direction: row;
    gap: 6px;
    padding: 3px 5px;
    font-size: 0.77rem;
    line-height: 1.1;
  }

  .bottom-nav-item svg {
    width: 18px;
    height: 18px;
  }

  .card-fan.is-open .deck-row {
    height: 116px;
  }

  .card-fan.is-open .deck-row + .deck-row {
    margin-top: -28px;
  }

  .card-fan.is-open .fan-card {
    flex-basis: 64px;
    width: 64px;
    height: 116px;
  }

  .install-step-final {
    grid-template-columns: 27px 64px minmax(0, 1fr) !important;
  }

  .install-step-word {
    padding: 0 5px;
    font-size: 0.63rem;
  }
}

@media (max-width: 600px) {
  body[data-view="capa"] .cover-view {
    min-height: 0;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 8px;
    padding-top: 18px;
  }
}

@media (max-height: 700px) {
  body[data-view="capa"] .cover-view {
    gap: 6px;
    padding-top: 12px;
  }

  .cover-instruction {
    margin-top: 9px;
    line-height: 1.3;
  }

  .deck-stack-area,
  .card-fan {
    min-height: 205px;
  }
}

@media (max-height: 620px) {
  .deck-stack-area,
  .card-fan {
    min-height: 194px;
  }

  .deck-stack-trigger,
  .fan-card {
    width: 104px;
    height: 188px;
  }
}

@media (max-height: 720px) {
  .day-card {
    grid-template-rows: minmax(132px, 31%) minmax(0, 69%);
  }

  .day-heading h2 {
    font-size: 1.55rem;
  }

  .day-topline {
    padding: 12px 14px 0;
    font-size: 0.64rem;
  }

  .day-draw-label {
    display: none;
  }

  .day-content {
    padding: 11px 15px 10px;
  }

  .deck-card {
    grid-template-rows: auto minmax(108px, 0.7fr) auto auto auto;
    gap: 7px;
    padding: 10px;
  }

  .deck-hero {
    grid-template-columns: 23% minmax(0, 1fr);
    gap: 8px;
  }

  .deck-title-wrap h2,
  .deck-card.is-compact .deck-title-wrap h2,
  .deck-card.is-tight .deck-title-wrap h2 {
    font-size: 1.15rem;
  }
}

@media (max-height: 600px) {
  .deck-hero {
    grid-template-columns: 20% minmax(0, 1fr);
    gap: 7px;
  }

  .deck-title-wrap h2,
  .deck-card.is-compact .deck-title-wrap h2,
  .deck-card.is-tight .deck-title-wrap h2 {
    font-size: 1.05rem;
  }
}

@media (max-width: 340px) and (max-height: 620px) {
  .deck-card.is-tight {
    grid-template-rows: auto auto auto auto auto;
    gap: 3px;
    padding: 6px;
  }

  .deck-card.is-tight .deck-header {
    min-height: 28px;
    padding: 3px 6px;
    font-size: 0.58rem;
  }

  .deck-card.is-tight .deck-hero {
    grid-template-columns: 24% minmax(0, 1fr);
    gap: 6px;
  }

  .deck-card.is-tight .deck-title-wrap h2 {
    font-size: 1rem;
    line-height: 1.05;
  }

  .deck-card.is-tight .mantra {
    margin-bottom: 4px;
    padding: 5px 3px;
    font-size: 1rem;
  }

  .deck-card.is-tight .deck-message,
  .deck-card.is-tight .practice-block p {
    font-size: 1rem;
    line-height: 1.16;
  }

  .deck-card.is-tight .practice-block {
    padding: 5px 7px;
  }

  .deck-card.is-tight .deck-footer {
    font-size: 0.7rem;
  }
}

@media (max-width: 340px) {
  .deck-signature {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 340px) and (max-height: 600px) {
  .day-card,
  .day-card.is-compact,
  .day-card.is-tight {
    grid-template-rows: minmax(118px, 25%) minmax(0, 75%);
  }

  .day-heading {
    right: 14px;
    bottom: 10px;
    left: 14px;
  }

  .day-heading h2,
  .day-card.is-tight .day-heading h2 {
    font-size: 1.25rem;
    line-height: 1.02;
  }

  .day-theme {
    margin-bottom: 3px;
    font-size: 0.62rem;
  }

  .day-topline {
    padding: 10px 14px 0;
  }

  .day-content,
  .day-card.is-compact .day-content,
  .day-card.is-tight .day-content {
    padding: 7px 11px 6px;
  }

  .day-message,
  .day-card.is-compact .day-message,
  .day-card.is-tight .day-message,
  .day-card.is-compact .gesture-block p,
  .day-card.is-tight .gesture-block p {
    font-size: 1rem;
    line-height: 1.2;
  }

  .gesture-block,
  .day-card.is-compact .gesture-block,
  .day-card.is-tight .gesture-block {
    margin-top: 4px;
    padding: 6px 9px 6px 15px;
  }

  .gesture-block::before {
    top: 7px;
    bottom: 7px;
    left: 7px;
  }

  .gesture-block h3,
  .day-card.is-tight .gesture-block h3 {
    margin-bottom: 1px;
    font-size: 1rem;
  }

  .day-anchor,
  .day-card.is-compact .day-anchor,
  .day-card.is-tight .day-anchor {
    margin-top: 4px;
    padding-right: 58px;
    font-size: 0.91rem;
    line-height: 1.2;
  }

  .day-card .card-signature img {
    width: 56px;
  }
}

@media (min-width: 420px) {
  .card-fan.is-open .deck-row {
    height: 126px;
  }

  .card-fan.is-open .deck-row + .deck-row {
    margin-top: -32px;
  }

  .card-fan.is-open .fan-card {
    flex-basis: 70px;
    width: 70px;
    height: 126px;
  }
}

@media (min-width: 700px) {
  body {
    padding: 28px 0;
  }

  .app-shell {
    min-height: calc(100svh - 56px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 42px;
  }

  .bottom-nav {
    bottom: 28px;
    border: 1px solid rgba(70, 70, 65, 0.1);
    border-radius: 0 0 42px 42px;
  }
}

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