/* Tarot v2.1 production layer, aligned with the approved handoff. */
body.tarot-v2-1 {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  overflow-x: hidden;
}

.tarot-v2-1 .app-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border-inline: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(44, 42, 30, .12);
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

.tarot-v2-1 .tarot-header {
  height: calc(78px + env(safe-area-inset-top, 0px));
  padding: calc(17px + env(safe-area-inset-top, 0px)) 22px 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tarot-v2-1 .nura-text-logo { justify-self: start; }
.tarot-v2-1 .header-title { position: static; left: auto; transform: none; grid-column: 2; justify-self: center; color: var(--text-m); font-family: var(--font-serif); font-size: 14px; }
.tarot-v2-1 .header-actions { grid-column: 3; grid-row: 1; justify-self: end; }
.tarot-v2-1 .header-actions .icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; box-shadow: none; }

.tarot-v2-1 .tarot-main {
  display: grid;
  gap: 24px;
  padding: 5px 18px 30px;
}

.tarot-v2-1 h1,
.tarot-v2-1 h2,
.tarot-v2-1 h3,
.tarot-v2-1 p { margin-top: 0; }

.tarot-v2-1 .tarot-kicker {
  display: block;
  margin: 0;
  color: var(--gold);
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tarot-v2-1 .tarot-section-head {
  margin-inline: 2px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.tarot-v2-1 .tarot-section-head h1,
.tarot-v2-1 .tarot-section-head h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.08;
  font-weight: 400;
}

.tarot-v2-1 .tarot-access#access-caption {
  max-width: 120px;
  color: var(--text-s);
  font-size: 9.8px;
  line-height: 1.35;
  font-weight: 600;
  text-align: right;
}

.tarot-v2-1 .tarot-daily {
  position: relative;
  min-height: 220px;
  display: grid;
  grid-template-columns: 40% 60%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-card-soft) url("assets/home-v8/home-daily-background-v8.png") center / cover no-repeat;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.tarot-v2-1 .tarot-daily::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, transparent 33%, var(--bg-card-soft) 62%, var(--bg-card-soft) 100%);
  opacity: .92;
}

.tarot-v2-1 .tarot-daily-visual {
  min-width: 0;
  min-height: 220px;
  padding: 16px 6px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tarot-v2-1 .tarot-daily-visual img {
  display: block;
  width: auto;
  height: 188px;
  max-width: 116px;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(44, 42, 30, .16);
}

.tarot-v2-1 .tarot-daily-visual span {
  position: absolute;
  left: 20%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--bg-card);
  font-family: var(--font-serif);
  font-size: 27px;
  text-shadow: 0 1px 5px rgba(44, 42, 30, .35);
}

.tarot-v2-1 .tarot-daily-visual #hero-num { display: none; }

.tarot-v2-1 .tarot-daily-copy {
  min-width: 0;
  min-height: 220px;
  padding: 18px 18px 16px 11px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tarot-v2-1 .tarot-daily h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(22px, 5.8vw, 27px);
  line-height: 1.04;
  font-weight: 400;
}

.tarot-v2-1 .tarot-daily-name {
  margin: 10px 0 5px;
  color: var(--terra);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.2;
}

.tarot-v2-1 .tarot-daily-phrase {
  margin: 0;
  color: var(--text-m);
  font-size: 12px;
  line-height: 1.46;
}

.tarot-v2-1 .tarot-link-action {
  margin-top: auto;
  align-self: flex-start;
  padding: 10px 0 0;
  border: 0;
  background: transparent;
  color: var(--terra);
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
}

.tarot-v2-1 .tarot-link-action:disabled { cursor: wait; opacity: .58; }

.tarot-v2-1 .tarot-daily-section { display: grid; gap: 11px; }
.tarot-v2-1 .tarot-practices { display: grid; gap: 11px; }

.tarot-v2-1 .tarot-featured,
.tarot-v2-1 .tarot-format {
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tarot-v2-1 .tarot-featured {
  position: relative;
  min-height: 205px;
  display: grid;
  grid-template-columns: 43% 57%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-card-soft);
  box-shadow: var(--shadow-card);
}

.tarot-v2-1 .tarot-featured-cards {
  position: relative;
  min-height: 205px;
  display: block;
}

.tarot-v2-1 .tarot-featured-cards::before,
.tarot-v2-1 .tarot-featured-cards::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.tarot-v2-1 .tarot-featured-cards::before { width: 102px; height: 102px; left: 10px; top: 20px; }
.tarot-v2-1 .tarot-featured-cards::after { width: 66px; height: 66px; right: 5px; bottom: 12px; }

.tarot-v2-1 .tarot-featured-cards img {
  position: absolute;
  bottom: 25px;
  width: 75px;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 7px;
  box-shadow: 0 10px 22px rgba(44, 42, 30, .14);
}

.tarot-v2-1 .tarot-featured-cards img:nth-child(1) { left: 15px; transform: rotate(-10deg); opacity: .72; }
.tarot-v2-1 .tarot-featured-cards img:nth-child(2) { left: 48px; bottom: 31px; z-index: 2; }
.tarot-v2-1 .tarot-featured-cards img:nth-child(3) { left: 81px; bottom: 22px; transform: rotate(10deg); opacity: .76; }

.tarot-v2-1 .tarot-featured .tarot-format-copy {
  min-width: 0;
  padding: 17px 20px 20px 8px;
  display: flex;
  flex-direction: column;
}

.tarot-v2-1 .tarot-format-kicker {
  margin-top: 0;
  color: var(--gold);
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tarot-v2-1 .tarot-format-label {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
}

.tarot-v2-1 .tarot-format-description {
  margin-top: 12px;
  color: var(--text-m);
  font-size: 11.5px;
  line-height: 1.48;
}

.tarot-v2-1 .tarot-format-action {
  margin-top: auto;
  padding-top: 10px;
  color: var(--terra);
  font-size: 14px;
  line-height: 1.25;
}

.tarot-v2-1 .tarot-badge {
  min-width: 84px;
  min-height: 29px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--terra);
  font-size: 10.2px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(44, 42, 30, .05);
}

.tarot-v2-1 .tarot-badge::before {
  content: "◆";
  font-size: 7px;
}

.tarot-v2-1 .tarot-featured .tarot-badge {
  align-self: flex-end;
  margin: 0 17px 7px 0;
}
.tarot-v2-1 .tarot-format-list { overflow: hidden; border: 1px solid var(--line); border-radius: 23px; background: var(--bg-card); box-shadow: var(--shadow-card); }

.tarot-v2-1 .tarot-format-list .tarot-format {
  width: 100%;
  min-height: 76px;
  padding: 12px;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto 15px;
  gap: 10px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.tarot-v2-1 .tarot-format-list .tarot-format:last-child { border-bottom: 0; }
.tarot-v2-1 .tarot-format-list .tarot-format-copy { min-width: 0; display: grid; gap: 3px; }
.tarot-v2-1 .tarot-format-list .tarot-format-label { display: block; font-family: var(--font-sans); font-size: 13.1px; line-height: 1.2; font-weight: 700; }
.tarot-v2-1 .tarot-format-list .tarot-format-description { display: -webkit-box; margin: 0; font-size: 9.7px; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tarot-v2-1 .tarot-format-icon { width: 39px; height: 39px; display: grid; place-items: center; color: var(--sage); font-size: 27px; }
.tarot-v2-1 #p-mini .tarot-format-icon,
.tarot-v2-1 #p-life .tarot-format-icon { color: var(--gold); }
.tarot-v2-1 .tarot-format-list > .tarot-format > .ti { color: var(--text-s); font-size: 20px; }

body.tarot-v2-1[data-access="guest"] .tarot-badge,
body.tarot-v2-1[data-access="free"] .tarot-format.is-premium .tarot-badge {
  color: var(--terra);
  background: var(--bg-card-soft);
}

body.tarot-v2-1[data-access="free"] .tarot-format:not(.is-premium) .tarot-badge,
body.tarot-v2-1[data-access="subscriber"] .tarot-badge {
  color: var(--sage);
  background: var(--bg-card-soft);
}

body.tarot-v2-1[data-access="free"] .tarot-format:not(.is-premium) .tarot-badge::before,
body.tarot-v2-1[data-access="subscriber"] .tarot-badge::before { content: "✓"; font-size: 10px; }

body.tarot-v2-1[data-access="loading"] .tarot-access,
body.tarot-v2-1[data-access="loading"] .tarot-badge { visibility: hidden; }
body.tarot-v2-1[data-access="loading"] .tarot-format:disabled { cursor: wait; }
.tarot-v2-1 .tarot-format.is-premium { opacity: .76; }

.tarot-v2-1 .tarot-philosophy {
  min-height: 104px;
  padding: 20px 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-lg);
  text-align: center;
  background: url("assets/home-v8/home-philosophy-bg-v5.png") center / cover no-repeat;
}

.tarot-v2-1 .tarot-philosophy .tarot-kicker { display: none; }
.tarot-v2-1 .tarot-philosophy p:last-child { margin: 0; max-width: 30ch; color: var(--text-m); font-family: var(--font-serif); font-size: 13.5px; line-height: 1.5; }

/* These sheets are production dialogs, never page content. */
.tarot-v2-1 .sheet-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(44, 42, 30, .32);
  transition: opacity .2s var(--ease);
}

.tarot-v2-1 .sheet {
  position: fixed;
  z-index: 61;
  left: 50%;
  bottom: 0;
  width: min(100%, 520px);
  max-height: 88dvh;
  overflow-y: auto;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 105%);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  box-shadow: 0 -12px 40px rgba(44, 42, 30, .15);
  pointer-events: none;
  transition: transform .25s var(--ease);
}

.tarot-v2-1 .sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.tarot-v2-1 .sheet.open { transform: translate(-50%, 0); pointer-events: auto; }
.tarot-v2-1 .sheet-inner { width: min(100%, 488px); margin: 0 auto; }
.tarot-v2-1 .handle { width: 38px; height: 4px; margin: 0 auto 16px; border-radius: 999px; background: var(--line-strong); }

.tarot-v2-1 .tarot-sheet-title { margin: 9px 0 15px; color: var(--text); font-family: var(--font-serif); font-size: 27px; font-weight: 400; line-height: 1.12; }
.tarot-v2-1 .tarot-sheet-copy { color: var(--text-m); font-size: 14px; line-height: 1.65; white-space: pre-line; }
.tarot-v2-1 .tarot-sheet-advice { padding: 13px; border-left: 3px solid var(--terra); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--bg-card-soft); color: var(--text); font-size: 13px; line-height: 1.55; white-space: pre-line; }
.tarot-v2-1 .tarot-close { margin-top: 8px; }
.tarot-v2-1 .tarot-topic-label { display: block; margin-bottom: 7px; color: var(--text-m); font-size: 12px; }
.tarot-v2-1 #topic-input { width: 100%; min-height: 104px; box-sizing: border-box; margin-bottom: 12px; padding: 12px; resize: vertical; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg-card-soft); color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; }
.tarot-v2-1 .tarot-result-card { margin: 16px 0; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.tarot-v2-1 .tarot-result-heading { display: flex; align-items: center; gap: 12px; }
.tarot-v2-1 .tarot-result-heading h3 { margin: 2px 0 0; color: var(--text); font-family: var(--font-serif); font-size: 19px; font-weight: 400; }
.tarot-v2-1 .tarot-result-number { color: var(--terra); font-family: var(--font-serif); font-size: 38px; line-height: 1; }
.tarot-v2-1 .tarot-result-position { margin: 0; color: var(--text-s); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tarot-v2-1 .tarot-result-copy { margin: 10px 0 0; color: var(--text-m); font-size: 13px; line-height: 1.6; white-space: pre-line; }
.tarot-v2-1 .tarot-result-advice { margin: 8px 0 0; color: var(--terra); font-size: 12px; line-height: 1.5; }
.tarot-v2-1 .tarot-result-summary { margin: 14px 0; padding: 13px; border-left: 3px solid var(--terra); background: var(--bg-card-soft); color: var(--text); font-size: 13px; line-height: 1.6; white-space: pre-line; }
.tarot-v2-1 .tarot-loading { padding: 42px 0; color: var(--text-m); text-align: center; }

.tarot-v2-1 .tabbar {
  z-index: 100;
  left: 50%;
  right: auto;
  width: min(100%, 430px);
  transform: translateX(-50%);
}

@media (min-width: 470px) {
  body.tarot-v2-1 { padding-block: 18px; }
  .tarot-v2-1 .app-shell { min-height: calc(100dvh - 36px); border: 1px solid var(--line); border-radius: 30px; }
}

@media (max-width: 380px) {
  .tarot-v2-1 .tarot-main { padding-inline: 14px; gap: 21px; }
  .tarot-v2-1 .tarot-header { padding-inline: 18px; }
  .tarot-v2-1 .tarot-daily,
  .tarot-v2-1 .tarot-daily-visual,
  .tarot-v2-1 .tarot-daily-copy { min-height: 214px; }
  .tarot-v2-1 .tarot-daily { grid-template-columns: 39% 61%; }
  .tarot-v2-1 .tarot-daily-visual { padding: 15px 4px 15px 10px; }
  .tarot-v2-1 .tarot-daily-visual img { height: 176px; max-width: 108px; }
  .tarot-v2-1 .tarot-daily-copy { padding: 17px 13px 15px 9px; }
  .tarot-v2-1 .tarot-daily h2 { font-size: 21px; }
  .tarot-v2-1 .tarot-daily-phrase { font-size: 11.5px; }
  .tarot-v2-1 .tarot-featured { grid-template-columns: 41% 59%; }
  .tarot-v2-1 .tarot-featured-cards img { width: 67px; }
  .tarot-v2-1 .tarot-featured-cards img:nth-child(2) { left: 42px; }
  .tarot-v2-1 .tarot-featured-cards img:nth-child(3) { left: 70px; }
  .tarot-v2-1 .tarot-featured .tarot-format-copy { padding: 15px 14px 18px 7px; }
  .tarot-v2-1 .tarot-featured .tarot-format-label { font-size: 25px; }
  .tarot-v2-1 .tarot-badge { min-width: 76px; min-height: 28px; padding-inline: 8px; font-size: 9.6px; }
  .tarot-v2-1 .tarot-format-list .tarot-format { grid-template-columns: 34px minmax(0, 1fr) auto 13px; gap: 8px; padding-inline: 10px; }
  .tarot-v2-1 .tarot-format-icon { width: 31px; height: 31px; font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .tarot-v2-1 .sheet,
  .tarot-v2-1 .sheet-backdrop { transition: none; }
}
