:root {
  --forest: #143f36;
  --deep-teal: #0f5e55;
  --teal: #167f75;
  --sage: #9fbea1;
  --mint: #eaf5ed;
  --cream: #fffdf8;
  --gold: #c99b2f;
  --gold-light: #f0d77a;
  --ink: #182c28;
  --shadow: rgba(14, 55, 47, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(240, 215, 122, 0.25), transparent 25rem),
    radial-gradient(circle at 88% 15%, rgba(136, 190, 163, 0.34), transparent 29rem),
    linear-gradient(180deg, #f9fdf9 0%, #e7f3e9 52%, #f8fcf8 100%);
  font-family: Georgia, "Times New Roman", serif;
  min-height: 100vh;
}

body.has-reading-tray { padding-bottom: 154px; }
body.reflection-open { overflow: hidden; }

button { font: inherit; }

button:focus-visible,
.deck-stage:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.oracle {
  min-height: 100vh;
  overflow: hidden;
}

.masthead {
  text-align: center;
  padding: 2rem 1.5rem 1.35rem;
  position: relative;
}

.brand-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 5px 24px rgba(20, 63, 54, 0.18);
  background: white;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(2.3);
}

.eyebrow,
.section-label,
.message-label,
.reveal-intro {
  margin: 0;
  color: var(--deep-teal);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.masthead h1 {
  margin: 0.1rem 0 0.2rem;
  color: var(--forest);
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

.tagline {
  margin: 0;
  color: var(--teal);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.deck-experience {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

.invitation {
  width: min(690px, 100%);
  margin: 0 auto;
  text-align: center;
}

.invitation h2 {
  margin: 0.45rem 0 0.6rem;
  color: var(--forest);
  font-size: clamp(1.7rem, 3.1vw, 2.65rem);
  font-weight: 500;
  line-height: 1.1;
}

.invitation > p:last-child {
  margin: 0 auto;
  max-width: 630px;
  font-size: 1.04rem;
  line-height: 1.65;
}

.deck-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
}

.soft-button,
.primary-button,
.text-button {
  min-height: 46px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.soft-button {
  padding: 0.65rem 1.25rem;
  border: 1px solid rgba(15, 94, 85, 0.35);
  color: var(--deep-teal);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 7px 24px rgba(15, 94, 85, 0.07);
}

.soft-button:hover,
.primary-button:hover,
.text-button:hover { transform: translateY(-2px); }

.soft-button:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.primary-button:disabled,
.text-button:disabled,
.tray-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.shuffle-symbol { color: var(--gold); margin-right: 0.4rem; }

.deck-stage {
  position: relative;
  width: 100%;
  min-height: 430px;
  margin-top: 0.2rem;
  overflow: hidden;
  border-radius: 38px;
  background:
    radial-gradient(ellipse at 50% 69%, rgba(255, 255, 255, 0.96) 0%, rgba(235, 247, 237, 0.62) 42%, transparent 70%);
}

.arc {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(1180px, calc(100vw - 2rem));
  height: 330px;
  transform: translate(-50%, -50%);
  transition: opacity 600ms ease, filter 600ms ease;
}

.oracle-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  aspect-ratio: 11 / 19;
  padding: 0;
  border: 2px solid var(--gold);
  border-radius: 9px;
  background: var(--cream);
  box-shadow: 0 11px 21px rgba(17, 59, 51, 0.17), inset 0 0 0 3px var(--deep-teal);
  cursor: pointer;
  overflow: hidden;
  transform-origin: 50% 120%;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease, filter 220ms ease, opacity 500ms ease;
  touch-action: manipulation;
}

.oracle-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.oracle-card.is-active {
  z-index: 100 !important;
  filter: brightness(1.06);
  box-shadow: 0 0 0 3px rgba(240, 215, 122, 0.75), 0 0 34px rgba(215, 169, 52, 0.7), 0 20px 30px rgba(17, 59, 51, 0.24);
}

.deck-stage.is-shuffling .oracle-card {
  pointer-events: none;
}

.deck-stage.has-selection {
  min-height: 1050px;
}

.deck-stage.has-selection .arc {
  opacity: 0.12;
  filter: blur(2px) saturate(0.7);
  pointer-events: none;
}

.reveal {
  position: relative;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding-top: 1.25rem;
  animation: revealIn 600ms ease both;
}

.reveal[hidden] { display: none; }

.reveal-intro { margin-bottom: 0.8rem; color: var(--forest); }

.chosen-card {
  width: min(310px, 73vw);
  aspect-ratio: 11 / 19;
  perspective: 1600px;
  filter: drop-shadow(0 26px 25px rgba(13, 55, 47, 0.2));
}

.chosen-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1050ms cubic-bezier(.2,.75,.2,1);
}

.chosen-card.is-flipped .chosen-card-inner { transform: rotateY(180deg); }

.chosen-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 16px;
  background: white;
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 4px var(--deep-teal);
}

.chosen-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chosen-front { transform: rotateY(180deg); }

.message-panel {
  width: min(690px, 100%);
  margin-top: 1.25rem;
  padding: 1.55rem clamp(1.1rem, 4vw, 2.7rem) 1.35rem;
  text-align: center;
  border: 1px solid rgba(20, 63, 54, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 18px 60px rgba(13, 55, 47, 0.13);
  backdrop-filter: blur(12px);
}

.message-panel h2 {
  margin: 0.3rem 0 0.65rem;
  color: var(--forest);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 500;
}

.message-panel > p:not(.message-label):not(.save-status) {
  margin: 0;
  font-size: clamp(1.02rem, 2.1vw, 1.2rem);
  line-height: 1.65;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.primary-button {
  padding: 0.68rem 1.35rem;
  border: 1px solid var(--deep-teal);
  color: white;
  background: var(--deep-teal);
  box-shadow: 0 10px 25px rgba(15, 94, 85, 0.19);
}

.text-button {
  padding: 0.68rem 1.2rem;
  border: 1px solid rgba(15, 94, 85, 0.3);
  color: var(--deep-teal);
  background: transparent;
}

.save-status {
  min-height: 1.2em;
  margin: 0.55rem 0 0;
  color: var(--deep-teal);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.86rem;
}

.touch-note {
  width: min(650px, 100%);
  margin: 0.7rem auto 1.6rem;
  text-align: center;
  color: rgba(24, 44, 40, 0.72);
  font-size: 0.94rem;
  line-height: 1.5;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1.2rem, 5vw, 4rem);
  color: rgba(255, 255, 255, 0.88);
  background: var(--forest);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
}

.reading-tray {
  position: fixed;
  z-index: 900;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(201, 155, 47, 0.55);
  background: rgba(249, 253, 249, 0.96);
  box-shadow: 0 -15px 45px rgba(14, 55, 47, 0.18);
  backdrop-filter: blur(16px);
  animation: trayIn 350ms ease both;
}

.reading-tray[hidden],
.reading-reflection[hidden] { display: none; }

.reading-tray-inner {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 1rem;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.tray-heading p {
  margin: 0 0 0.2rem;
  color: var(--forest);
  font-size: 1.15rem;
}

.tray-heading span {
  color: var(--teal);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
}

.tray-cards {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  min-height: 112px;
}

.tray-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(80px, 125px);
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  border: 1px solid rgba(20, 63, 54, 0.14);
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 24px rgba(14, 55, 47, 0.1);
}

.tray-card img {
  width: 58px;
  aspect-ratio: 11 / 19;
  object-fit: cover;
  border: 1px solid var(--gold);
  border-radius: 5px;
}

.tray-card strong {
  color: var(--forest);
  font-size: 0.91rem;
  font-weight: 500;
  line-height: 1.2;
}

.remove-card {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--deep-teal);
  background: var(--mint);
  cursor: pointer;
  font: 700 17px/1 Arial, Helvetica, sans-serif;
}

.tray-button {
  min-height: 46px;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--deep-teal);
  border-radius: 999px;
  color: white;
  background: var(--deep-teal);
  cursor: pointer;
  white-space: nowrap;
}

.reading-reflection {
  position: fixed;
  z-index: 1200;
  inset: 0;
  padding: 1rem;
  overflow: auto;
  background: rgba(10, 48, 41, 0.82);
  backdrop-filter: blur(12px);
  animation: revealIn 350ms ease both;
}

.reflection-sheet {
  position: relative;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.4rem);
  border: 2px solid rgba(201, 155, 47, 0.65);
  border-radius: 34px;
  background:
    radial-gradient(circle at 90% 5%, rgba(159, 190, 161, 0.3), transparent 24rem),
    var(--cream);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.reflection-sheet > h2 {
  margin: 0.45rem 2.5rem 0.7rem 0;
  color: var(--forest);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.08;
}

.close-reflection {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(20, 63, 54, 0.18);
  border-radius: 50%;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font: 400 26px/1 Arial, Helvetica, sans-serif;
}

.reflection-cards {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(0.75rem, 3vw, 2rem);
  margin: 2rem 0;
}

.reflection-card {
  width: min(220px, 28%);
  text-align: center;
}

.reflection-card img {
  width: 100%;
  aspect-ratio: 11 / 19;
  object-fit: cover;
  border: 2px solid var(--gold);
  border-radius: 13px;
  box-shadow: 0 16px 35px rgba(14, 55, 47, 0.18);
}

.reflection-card strong {
  display: block;
  margin-top: 0.55rem;
  color: var(--forest);
  font-size: 1.05rem;
  font-weight: 500;
}

.reflection-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.reflection-prompts label { display: flex; flex-direction: column; gap: 0.5rem; }

.reflection-prompts label > span {
  color: var(--forest);
  font-size: 1rem;
  line-height: 1.4;
}

.reflection-prompts textarea {
  width: 100%;
  min-height: 125px;
  resize: vertical;
  padding: 0.85rem;
  border: 1px solid rgba(20, 63, 54, 0.25);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  font: 1rem/1.5 Georgia, "Times New Roman", serif;
}

.privacy-note {
  margin: 1rem 0 0;
  color: rgba(24, 44, 40, 0.7);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
  line-height: 1.5;
}

.reflection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

@keyframes trayIn {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 720px) {
  .masthead { padding-top: 1.4rem; }
  .brand-mark { width: 54px; height: 54px; }
  .deck-experience { padding-inline: 0; }
  .invitation, .deck-actions, .touch-note { padding-inline: 1.15rem; }
  .deck-stage {
    min-height: 400px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .deck-stage::-webkit-scrollbar { display: none; }
  .arc {
    left: 0;
    width: 1160px;
    transform: translate(0, -50%);
  }
  .deck-stage.has-selection {
    min-height: 1020px;
    overflow-x: hidden;
  }
  .reveal { width: calc(100% - 1.5rem); }
  .chosen-card { width: min(292px, 76vw); }
  .message-panel { padding: 1.35rem 1rem 1.2rem; }
  body.has-reading-tray { padding-bottom: 145px; }
  .reading-tray { padding: 0.55rem 0.7rem; }
  .reading-tray-inner {
    grid-template-columns: 74px 1fr;
    gap: 0.55rem;
  }
  .tray-heading p { font-size: 0.98rem; }
  .tray-heading span { font-size: 0.7rem; }
  .tray-cards { justify-content: flex-start; min-height: 82px; gap: 0.4rem; }
  .tray-card {
    display: block;
    width: 51px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .tray-card img { width: 48px; }
  .tray-card strong { display: none; }
  .remove-card { top: -5px; right: -5px; width: 22px; height: 22px; font-size: 14px; }
  .tray-button { grid-column: 1 / -1; width: 100%; min-height: 40px; padding: 0.45rem 1rem; }
  .reading-reflection { padding: 0; }
  .reflection-sheet { min-height: 100%; border: 0; border-radius: 0; padding: 1.35rem 1rem 2rem; }
  .reflection-cards { gap: 0.55rem; margin: 1.4rem 0; }
  .reflection-card { width: 31%; }
  .reflection-card strong { font-size: 0.85rem; }
  .reflection-prompts { grid-template-columns: 1fr; }
  .reflection-actions { flex-direction: column; }
  .reflection-actions button { width: 100%; }
  footer { flex-direction: column; align-items: center; text-align: center; }
}

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

/* Members foundation: approved interface typography and palette. */
body{color:#232D2A;background:#fcfaf5;font-family:Inter,system-ui,sans-serif}h1,h2,h3{font-family:Georgia,"Times New Roman",serif;color:#244B2A}h1{font-size:clamp(2.15rem,3.3vw,3.2rem)}h2{font-size:clamp(1.55rem,2.2vw,2.05rem)}@media(max-width:700px){h1{font-size:32px}h2{font-size:26.4px}}
