:root {
  --bg: #0e0a14;
  --surface: rgba(28, 20, 36, 0.78);
  --surface-strong: rgba(43, 32, 56, 0.94);
  --surface-soft: rgba(238, 230, 218, 0.06);
  --text: #eee6da;
  --muted: rgba(238, 230, 218, 0.66);
  --faint: rgba(238, 230, 218, 0.42);
  --gold: #caa260;
  --emerald: #0f8b7c;
  --button: #7b5b36;
  --danger: #d58d7d;
  --border: rgba(238, 230, 218, 0.14);
  --shadow: rgba(0, 0, 0, 0.32);
  --app-gutter: clamp(24px, 6vw, 32px);
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 139, 124, 0.2), transparent 28rem),
    radial-gradient(circle at 86% 16%, rgba(202, 162, 96, 0.14), transparent 25rem),
    linear-gradient(160deg, #0e0a14 0%, #17101f 54%, #0b1216 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "✦  ☾  ✧  ♃  ✶";
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  color: rgba(238, 230, 218, 0.05);
  font-family: Georgia, serif;
  font-size: 5rem;
  letter-spacing: 0.4rem;
  line-height: 1.6;
  transform: rotate(-12deg) translate(-3rem, 5rem);
  pointer-events: none;
}

button,
textarea {
  font: inherit;
  font-size: 1rem;
}

button {
  border: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding:
    calc(10px + env(safe-area-inset-top))
    max(var(--app-gutter), env(safe-area-inset-right))
    calc(22px + env(safe-area-inset-bottom));
  padding-left: max(var(--app-gutter), env(safe-area-inset-left));
}

.screen {
  min-width: 0;
  min-height: calc(100vh - 50px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen > * {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.fate-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(202, 162, 96, 0.52);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(202, 162, 96, 0.18), transparent),
    rgba(238, 230, 218, 0.04);
  color: var(--gold);
  box-shadow: 0 0 26px rgba(202, 162, 96, 0.12);
}

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

.kicker,
.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.18rem;
  font-weight: 500;
  line-height: 1.06;
}

h2 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.36rem;
  font-weight: 500;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.copy,
.muted {
  color: var(--muted);
  line-height: 1.6;
}

.stack {
  display: grid;
  gap: 14px;
}

.panel,
.reading-card,
.result-box,
.paywall-card,
.empty-state,
.install-prompt,
.notice {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px var(--shadow);
  backdrop-filter: blur(18px);
}

.panel,
.empty-state,
.install-prompt,
.notice {
  padding: 14px;
}

.empty-state {
  display: grid;
  gap: 10px;
}

.install-prompt {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.install-prompt__help {
  border-left: 2px solid rgba(202, 162, 96, 0.62);
  padding-left: 10px;
  color: rgba(238, 230, 218, 0.82) !important;
}

.install-prompt__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: stretch;
}

.install-prompt__button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding-block: 8px;
  line-height: 1.2;
  text-wrap: balance;
}

.ghost-button.install-prompt__dismiss {
  width: 42px;
  min-height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1.24rem;
  line-height: 1;
}

.ghost-button.install-prompt__dismiss:hover {
  background: rgba(238, 230, 218, 0.06);
}

.notice {
  color: var(--muted);
  font-size: 0.92rem;
}

.notice[data-tone="error"] {
  border-color: rgba(213, 141, 125, 0.5);
  color: #f0c6be;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-text-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-button {
  width: 100%;
  background: linear-gradient(135deg, var(--button), #9b7445);
  box-shadow: 0 14px 34px rgba(123, 91, 54, 0.26);
}

.secondary-button,
.ghost-button,
.icon-text-button {
  background: rgba(238, 230, 218, 0.06);
  border: 1px solid var(--border);
}

.ghost-button {
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
}

.icon-text-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-text-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.history-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.history-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.history-section .kicker {
  margin-bottom: 0;
}

.reading-card {
  width: 100%;
  min-width: 0;
  padding: 14px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
}

.reading-card__meta,
.card-row,
.result-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.reading-card__meta {
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 0.82rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(202, 162, 96, 0.28);
  border-radius: 999px;
  padding: 0 10px;
  color: #e6cc9c;
  background: rgba(202, 162, 96, 0.08);
  font-size: 0.8rem;
}

.reading-card__title {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.reading-card__preview {
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.reading-card__status {
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.mini-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.mini-cards::-webkit-scrollbar {
  display: none;
}

.mini-card {
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(15, 139, 124, 0.32);
  border-radius: 8px;
  padding: 7px 9px;
  color: rgba(238, 230, 218, 0.86);
  background: rgba(15, 139, 124, 0.08);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.textarea {
  width: 100%;
  min-height: 148px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: rgba(238, 230, 218, 0.06);
  color: var(--text);
  line-height: 1.5;
  outline: none;
}

.textarea:focus {
  border-color: rgba(202, 162, 96, 0.7);
  box-shadow: 0 0 0 3px rgba(202, 162, 96, 0.12);
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.period-option {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 8px;
  background: rgba(238, 230, 218, 0.05);
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.period-option[aria-pressed="true"] {
  border-color: rgba(15, 139, 124, 0.82);
  background: rgba(15, 139, 124, 0.16);
}

.app-shell:has(.dashboard-screen) {
  width: min(100%, 980px);
}

.dashboard-screen {
  gap: 16px;
}

.dashboard-toolbar,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-toolbar > div,
.section-heading > div {
  min-width: 0;
}

.dashboard-toolbar .kicker,
.section-heading .kicker {
  margin-bottom: 8px;
}

.dashboard-source {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.chip[data-tone="backend"] {
  border-color: rgba(15, 139, 124, 0.5);
  color: #9fe1d7;
}

.chip[data-tone="local"] {
  border-color: rgba(213, 141, 125, 0.52);
  color: #f0c6be;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: rgba(238, 230, 218, 0.06);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.metric-card__label,
.metric-card__hint,
.dashboard-row__meta,
.sla-grid dt {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.metric-card__value {
  min-width: 0;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.dashboard-list,
.sla-list {
  display: grid;
  gap: 10px;
}

.dashboard-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dashboard-row__header,
.dashboard-row__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-row__header span,
.dashboard-row__meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(238, 230, 218, 0.09);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}

.sla-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 12px;
  border: 1px solid rgba(238, 230, 218, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(238, 230, 218, 0.045);
}

.sla-card h3,
.sla-card p {
  margin-bottom: 0;
}

.sla-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.sla-grid div {
  min-width: 0;
}

.sla-grid dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.table-scroll {
  overflow-x: auto;
}

.events-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.events-table th,
.events-table td {
  border-bottom: 1px solid rgba(238, 230, 218, 0.1);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.events-table th {
  color: var(--gold);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.events-table td {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.content-table {
  min-width: 980px;
}

.users-table {
  min-width: 900px;
}

.content-table td:nth-child(3),
.content-table td:nth-child(4) {
  max-width: 320px;
}

.period-title {
  display: block;
  font-weight: 700;
  line-height: 1.12;
}

details.templates {
  border-top: 1px solid var(--border);
  padding-top: 2px;
}

details.templates summary {
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
}

details.templates summary::-webkit-details-marker {
  display: none;
}

details.templates summary::before {
  content: "›";
  color: var(--gold);
  font-size: 1rem;
  line-height: 1;
  transition: transform 160ms ease;
}

details.templates[open] summary::before {
  transform: rotate(90deg);
}

.prompt-guidance {
  margin-top: 8px;
  border: 1px solid rgba(202, 162, 96, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(202, 162, 96, 0.07);
}

.prompt-guidance p {
  margin-bottom: 8px;
  color: var(--gold);
  font-weight: 700;
}

.prompt-guidance ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.cards-grid--additional {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 270px;
}

.tarot-card {
  display: grid;
  gap: 8px;
  text-align: center;
  min-width: 0;
}

.tarot-card__frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(202, 162, 96, 0.34);
  border-radius: 8px;
  background: rgba(238, 230, 218, 0.05);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  perspective: 1600px;
  perspective-origin: 50% 50%;
  transform: translateZ(0);
  contain: layout paint;
  isolation: isolate;
}

.tarot-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  transform: rotateY(0deg);
  transform-style: preserve-3d;
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  animation: flipTarotCard 1120ms cubic-bezier(0.24, 0.72, 0.22, 1) both;
  animation-delay: var(--flip-delay);
}

.tarot-card__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: block;
  will-change: opacity, transform;
}

.tarot-card__back {
  transform: rotateY(0deg) translateZ(0.01px);
  animation: cardBackPulse 1.4s ease-in-out infinite;
  animation-delay: 0ms;
}

.tarot-card__front {
  transform: rotateY(180deg) translateZ(0.01px);
}

.tarot-card.is-reversed .tarot-card__front {
  transform: rotateY(180deg) rotate(180deg) translateZ(0.01px);
}

.tarot-card__caption {
  display: grid;
  gap: 5px;
  opacity: 0;
  transform: translateY(6px);
  animation: revealCardCaption 320ms ease forwards;
  animation-delay: calc(var(--flip-delay) + 1040ms);
}

.cards-grid--settled .tarot-card__inner {
  transform: rotateY(180deg);
  animation: none;
}

.cards-grid--settled .tarot-card__back {
  animation: none;
}

.cards-grid--settled .tarot-card__caption {
  opacity: 1;
  transform: none;
  animation: none;
}

.tarot-card__name {
  min-height: 38px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.tarot-card__position {
  justify-self: center;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(202, 162, 96, 0.28);
  border-radius: 999px;
  padding: 0 6px;
  color: #e6cc9c;
  background: rgba(202, 162, 96, 0.08);
  font-size: 0.66rem;
  line-height: 1;
  white-space: nowrap;
}

.tarot-card.is-reversed .tarot-card__position {
  border-color: rgba(15, 139, 124, 0.4);
  color: #a7ded6;
  background: rgba(15, 139, 124, 0.12);
}

.tarot-card__meaning {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.result-box,
.paywall-card {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.reading-dynamic-area {
  display: grid;
  gap: 14px;
}

.listening-box {
  min-height: 132px;
  place-items: center;
  text-align: center;
}

.followup-listening {
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px solid rgba(202, 162, 96, 0.24);
  border-radius: 8px;
  padding: 18px;
  background: rgba(238, 230, 218, 0.04);
  text-align: center;
}

.listening-text {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.35;
  max-width: 18rem;
  animation: shimmerText 1.65s ease-in-out infinite;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.listening-text.is-changing {
  opacity: 0;
  transform: translateY(4px);
}

.result-item {
  display: grid;
  gap: 5px;
}

.result-item span {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
}

.result-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.interpretation-text {
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.typewriter-text {
  white-space: pre-wrap;
}

.typewriter-text.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.48em;
  height: 1em;
  margin-left: 0.08em;
  border-right: 1px solid rgba(202, 162, 96, 0.72);
  transform: translateY(0.14em);
  animation: typewriterCaret 780ms ease-in-out infinite;
}

.inline-followup {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.additional-cards {
  display: grid;
  gap: 10px;
  scroll-margin-top: 18px;
  border: 1px solid rgba(202, 162, 96, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(238, 230, 218, 0.05);
}

.additional-cards h3 {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.25;
}

.feedback-strip {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.feedback-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feedback-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.feedback-grid::-webkit-scrollbar {
  display: none;
}

.feedback-button {
  flex: 1 0 auto;
  min-width: max-content;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(238, 230, 218, 0.05);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1;
  white-space: nowrap;
}

.feedback-button[aria-pressed="true"] {
  border-color: rgba(202, 162, 96, 0.7);
  color: var(--text);
  background: rgba(202, 162, 96, 0.13);
}

.feedback-response {
  margin: 0;
  color: rgba(238, 230, 218, 0.78);
  font-size: 0.86rem;
  line-height: 1.45;
}

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

.chat-bubble {
  width: min(92%, 360px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.chat-bubble[data-role="user"] {
  justify-self: end;
  background: rgba(15, 139, 124, 0.16);
}

.chat-bubble[data-role="assistant"] {
  justify-self: start;
  background: rgba(238, 230, 218, 0.07);
}

.chat-bubble__role {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

.composer textarea {
  min-height: 104px;
}

.paywall-card {
  border-color: rgba(202, 162, 96, 0.42);
  background:
    linear-gradient(145deg, rgba(202, 162, 96, 0.12), rgba(15, 139, 124, 0.1)),
    var(--surface);
}

.inline-paywall {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(202, 162, 96, 0.32);
  border-radius: 8px;
  padding: 14px;
  background: rgba(202, 162, 96, 0.08);
}

.inline-paywall p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.paywall-card p {
  color: var(--muted);
  line-height: 1.55;
}

.offline-bar {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 3;
  border: 1px solid rgba(202, 162, 96, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(14, 10, 20, 0.92);
  color: #e6cc9c;
  font-size: 0.84rem;
  line-height: 1.35;
}

.footer-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.legal-footer {
  margin-top: auto;
  padding: 12px 0 max(2px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.35;
}

.legal-footer a {
  color: rgba(238, 230, 218, 0.36);
  text-decoration: none;
  text-underline-offset: 3px;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
  color: rgba(238, 230, 218, 0.62);
  text-decoration: underline;
}

.offer-screen {
  gap: 16px;
}

.offer-document {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

.offer-document h1,
.offer-document h2,
.offer-document p {
  margin-bottom: 0;
}

.offer-document h1 {
  color: var(--text);
}

.offer-document h2 {
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.offer-document section {
  display: grid;
  gap: 10px;
}

.offer-document a {
  color: var(--gold);
}

.offer-updated {
  color: var(--faint);
  font-size: 0.78rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes flipTarotCard {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}

@keyframes cardBackPulse {
  0%,
  100% {
    filter: brightness(0.88);
    box-shadow: 0 0 0 rgba(202, 162, 96, 0);
  }
  50% {
    filter: brightness(1.12);
    box-shadow: 0 0 24px rgba(202, 162, 96, 0.2);
  }
}

@keyframes revealCardCaption {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmerText {
  0%,
  100% {
    opacity: 0.46;
    text-shadow: 0 0 0 rgba(202, 162, 96, 0);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 24px rgba(202, 162, 96, 0.42);
  }
}

@keyframes typewriterCaret {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

@media (min-width: 700px) {
  .app-shell {
    padding-top: calc(36px + env(safe-area-inset-top));
  }

  body::before {
    font-size: 8rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .panel,
  .empty-state,
  .install-prompt,
  .result-box,
  .paywall-card {
    padding: 20px;
  }

  .install-prompt {
    padding: 0;
  }

  .feedback-button {
    min-height: 38px;
  }
}

@media (max-width: 820px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sla-card,
  .sla-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding-top: calc(18px + env(safe-area-inset-top));
  }

  .hero {
    padding-top: 0;
  }

  h1 {
    font-size: clamp(2rem, 10.4vw, 2.46rem);
  }

  .copy {
    font-size: 0.95rem;
  }

  .reading-card,
  .panel,
  .empty-state,
  .install-prompt,
  .result-box,
  .paywall-card,
  .notice {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  }

  .metrics-grid,
  .sla-card,
  .sla-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-toolbar,
  .section-heading,
  .dashboard-row__meta {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-card__value {
    font-size: 1.28rem;
  }
}

@media (max-width: 370px) {
  :root {
    --app-gutter: 22px;
  }

  .app-shell {
    padding-right: max(var(--app-gutter), env(safe-area-inset-right));
    padding-left: max(var(--app-gutter), env(safe-area-inset-left));
  }

  .copy,
  .muted,
  .result-item p,
  .interpretation-text,
  .chat-bubble {
    line-height: 1.55;
  }

  .tarot-card__meaning {
    display: none;
  }

  .tarot-card__name {
    min-height: 34px;
    font-size: 0.72rem;
  }

  .tarot-card__position {
    font-size: 0.62rem;
    padding: 0 5px;
  }
}
