:root {
  --beige: #DACBA8;
  --beige-deep: #CDBB91;
  --taupe: #B3A27F;
  --taupe-dark: #9C8A66;
  --cream: #FBF3E4;
  --ink: #1E1A16;
  --muted: #5E5141;
  --terra: #B8735A;
  --terra-dark: #9A5B44;
  --white: #FFFFFF;
  --line: rgba(30, 26, 22, 0.35);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 22px;
  --shadow: 0 18px 40px -24px rgba(30, 26, 22, 0.45);
  --panel-height: 286px;
  --oracle-purple: #56256B;
  --oracle-gold: #C9A35B;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--beige);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
em { font-family: var(--serif); font-style: italic; font-weight: 700; color: var(--terra); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.08; }
.muted { color: var(--muted); }

/* header */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 22px clamp(16px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 48px; width: auto; }
.tagline { margin: 0; letter-spacing: 0.06em; font-size: 0.95rem; text-align: center; }
.nav { display: flex; justify-content: flex-end; align-items: center; gap: 26px; font-size: 0.85rem; letter-spacing: 0.06em; }
.nav a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { color: var(--terra-dark); }
.count:not(:empty) {
  background: var(--terra); color: var(--white); border-radius: 999px;
  font-size: 0.7rem; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px;
}

main { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: clamp(24px, 4vw, 56px) clamp(16px, 5vw, 64px); }
.screen { animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.kicker { display: flex; align-items: center; gap: 14px; color: var(--terra); font-size: 0.85rem; letter-spacing: 0.08em; margin: 0 0 14px; }
.kicker span { width: 48px; height: 1px; background: var(--terra); }

/* landing */
.landing { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy h1 { font-size: clamp(3.2rem, 8.2vw, 7.4rem); line-height: 0.98; margin-bottom: 28px; }
.hero-copy h1 em { font-weight: 700; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 34em; margin: 0 0 26px; color: #2B241D; }
.hero-copy hr { border: 0; border-top: 1px solid var(--line); margin: 0 0 22px; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 0.95rem; letter-spacing: 0.03em; }
.steps b { color: var(--terra); font-weight: 600; margin-right: 4px; }

.bottle { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; max-width: 520px; justify-self: center; }
.bottle-cap {
  width: 70%; background: var(--taupe); border-radius: 18px 18px 14px 14px; padding: 22px 18px;
  text-align: center; font-size: 0.85rem; color: #3A3127; clip-path: polygon(0 6%, 50% 0, 100% 6%, 100% 100%, 0 100%);
}
.bottle-cap p { margin: 0 0 4px; }
.bottle-cap .small { font-size: 0.78rem; opacity: 0.8; }
.bottle-neck { width: 46%; height: 34px; background: var(--taupe); }
.bottle-body {
  width: 100%; background: var(--taupe); border-radius: 56px 56px 44px 44px; padding: 26px;
  display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s ease;
}
.bottle-body.drag { transform: translateY(-3px); }
.bottle-tabs { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 4px; }
.bottle-tabs button { border: 0; background: transparent; border-radius: 999px; padding: 8px; font-size: 0.95rem; }
.bottle-tabs button[aria-selected="true"] { background: var(--white); font-weight: 500; }
.drop-label { display: block; cursor: pointer; }
.drop-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: var(--white); border-radius: 30px; padding: 20px; min-height: var(--panel-height); justify-content: center;
  outline: 1px dashed rgba(30, 26, 22, 0.18); outline-offset: -12px; transition: background 0.15s ease;
}
.drop-label:hover .drop-inner { background: #FFFDF8; }
.bottle-body.drag .drop-inner { outline-color: var(--terra); background: #FFFDF8; }
.drop-icon { width: 54px; height: 54px; border-radius: 50%; background: #EBDFDC; display: grid; place-items: center; margin-bottom: 8px; }
.drop-inner strong { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.drop-inner small { color: #8E8577; margin-top: 10px; font-size: 0.8rem; }
.song-panel { background: var(--white); border-radius: 30px; padding: 16px; height: var(--panel-height); display: flex; flex-direction: column; gap: 10px; }
.song-search { display: flex; align-items: center; gap: 8px; background: #F6EEDF; border-radius: 999px; padding: 9px 14px; color: var(--muted); }
.song-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; color: var(--ink); }
.song-results { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.song-note { margin: auto; text-align: center; color: var(--muted); font-size: 0.9rem; padding: 0 12px; }
.song-row { display: flex; align-items: center; gap: 6px; border-radius: 12px; transition: background 0.15s ease; }
.song-row:hover { background: #F6EEDF; }
.song-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 5px 6px; text-align: left; }
.song-pick img { width: 42px; height: 42px; border-radius: 6px; flex: none; background: var(--beige); }
.song-text { min-width: 0; display: flex; flex-direction: column; }
.song-text b, .song-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-text b { font-weight: 500; }
.song-text span { color: var(--muted); font-size: 0.82rem; }
.song-play { flex: none; width: 30px; height: 30px; margin-right: 6px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; display: grid; place-items: center; font-size: 0.68rem; }
.song-play.on { background: var(--ink); color: var(--cream); }
.added { display: flex; flex-direction: column; gap: 8px; }
.added:empty { display: none; }
.added-chip { display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: 999px; padding: 5px 8px 5px 5px; }
.added-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.added-chip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.added-chip button { flex: none; border: 0; background: transparent; width: 26px; height: 26px; font-size: 1.1rem; line-height: 1; color: var(--muted); }
.read-mood:disabled { opacity: 0.45; cursor: not-allowed; }
.bottle-base { width: 62%; height: 26px; background: var(--taupe); border-radius: 0 0 10px 10px; }
.upload-error { color: var(--terra-dark); min-height: 1.5em; margin: 10px 0 0; text-align: center; font-weight: 500; }

.samples { grid-column: 1 / -1; }
.samples-title { font-family: var(--serif); font-style: italic; font-size: 1.15rem; margin: 0 0 12px; }
.sample-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sample {
  position: relative; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: var(--taupe);
  aspect-ratio: 16 / 9; box-shadow: var(--shadow); transition: transform 0.2s ease;
}
.sample:hover { transform: translateY(-3px); }
.sample img { width: 100%; height: 100%; object-fit: cover; }
.sample span {
  position: absolute; left: 12px; bottom: 10px; color: var(--cream); font-family: var(--serif); font-size: 1.1rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* chat */
.chat-screen { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(16px, 3vw, 40px); align-items: start; }
.photo-panel { background: var(--cream); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 16px; }
.photo-panel img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.song-line { margin: 0; padding: 10px 20px; background: var(--ink); color: var(--cream); font-family: var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reading { padding: 18px 20px 22px; }
.eyebrow { margin: 0 0 10px; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--terra); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid rgba(184, 115, 90, 0.5); color: var(--terra-dark); background: #FFF8EE; border-radius: 999px;
  padding: 4px 12px; font-size: 0.85rem; animation: pop 0.4s ease both;
}
.chip:nth-child(2) { animation-delay: 0.08s; } .chip:nth-child(3) { animation-delay: 0.16s; }
.chip:nth-child(4) { animation-delay: 0.24s; } .chip:nth-child(5) { animation-delay: 0.32s; } .chip:nth-child(6) { animation-delay: 0.4s; }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
.shimmer {
  color: transparent; border-color: transparent; width: 180px;
  background: linear-gradient(90deg, #EFE3CC 25%, #F8EFDF 50%, #EFE3CC 75%); background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear; position: relative;
}
.shimmer::after { content: 'Reading the mood…'; position: absolute; inset: 4px 12px; color: var(--muted); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.scene { margin: 12px 0 0; font-family: var(--serif); font-style: italic; color: var(--muted); }

.chat-panel { background: rgba(251, 243, 228, 0.55); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; min-height: 560px; }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 62vh; padding-right: 4px; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 18px; animation: fade 0.3s ease; white-space: pre-wrap; }
.msg.bot { background: var(--cream); border-bottom-left-radius: 6px; align-self: flex-start; box-shadow: 0 6px 18px -14px rgba(30, 26, 22, 0.5); }
.msg.user { background: var(--terra); color: var(--white); border-bottom-right-radius: 6px; align-self: flex-end; }
.msg.bot .who { display: block; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--terra); margin-bottom: 2px; }
.typing { display: inline-flex; gap: 4px; padding: 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--taupe-dark); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; } .typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
.quick button {
  border: 1px solid var(--terra); background: transparent; color: var(--terra-dark); border-radius: 999px; padding: 8px 14px;
  font-size: 0.9rem; transition: background 0.15s ease, color 0.15s ease;
}
.quick button:hover { background: var(--terra); color: var(--white); }
.composer { display: flex; gap: 8px; background: var(--white); border-radius: 999px; padding: 6px 6px 6px 18px; }
.composer input { flex: 1; border: 0; outline: none; font: inherit; background: transparent; min-width: 0; }
.composer button { border: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; }
.composer button:disabled, .composer input:disabled { opacity: 0.45; }

/* finding */
.finding, .done { display: grid; place-items: center; min-height: 55vh; text-align: center; }
.finding-inner, .done-inner { max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 1; } }

/* results */
.results-head { margin-bottom: 28px; }
.results-song { margin: 12px 0 0; font-family: var(--serif); color: var(--terra); }
.results-sub { color: var(--muted); max-width: 48em; margin: 12px 0 0; }
.offline-note { display: inline-block; margin-top: 10px; background: #F2E6CF; border-radius: 8px; padding: 6px 10px; font-size: 0.85rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { background: var(--cream); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: fade 0.5s ease both; }
.card:nth-child(2) { animation-delay: 0.12s; } .card:nth-child(3) { animation-delay: 0.24s; }
.card-img { background: linear-gradient(180deg, #F3E9D6, #E8DBC0); display: grid; place-items: center; height: 230px; position: relative; }
.card-img img { height: 210px; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.card-img .rank { position: absolute; top: 14px; left: 16px; font-family: var(--serif); font-size: 1.6rem; color: var(--terra); }
.save-btn { position: absolute; top: 12px; right: 12px; border: 0; background: rgba(255, 255, 255, 0.75); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; }
.save-btn.on { color: var(--terra); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body .brand-name { font-size: 0.75rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.card-body h3 { font-size: 1.45rem; line-height: 1.15; }
.desc { margin: 0; }
.desc b { font-family: var(--serif); font-weight: 600; }
.why { background: var(--white); border-radius: 14px; padding: 12px 14px; }
.why p { margin: 0 0 6px; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--terra); font-weight: 600; }
.why ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 0.93rem; }
.notes { display: flex; flex-wrap: wrap; gap: 6px; }
.note { font-size: 0.78rem; background: #EFE3CC; border-radius: 999px; padding: 3px 10px; }
.meta { font-size: 0.82rem; color: var(--muted); }
.wear { font-family: var(--serif); font-style: italic; font-size: 0.95rem; margin: 0; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 6px; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; text-align: center;
  border-radius: 999px; padding: 12px 20px; border: 1px solid var(--ink); background: transparent; font-weight: 500; font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn.primary { background: var(--ink); color: var(--cream); }
.btn.primary:hover { background: #3A3127; }
.btn.ghost:hover, .btn.small:hover { background: var(--ink); color: var(--cream); }
.btn.small { padding: 9px 12px; font-size: 0.85rem; }
.btn.added { background: var(--terra); border-color: var(--terra); color: var(--white); }
.results-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* oracle */
.oracle-open { overflow: hidden; }
.oracle-btn {
  position: fixed; right: clamp(4px, 1vw, 20px); bottom: clamp(8px, 2vw, 24px); z-index: 20; width: clamp(108px, 10.5vw, 148px);
  border: 0; padding: 0; background: transparent; filter: drop-shadow(0 10px 16px rgba(30, 26, 22, 0.3));
  animation: oracle-bob 3.4s ease-in-out infinite; transition: scale 0.2s ease;
}
.oracle-btn:hover { scale: 1.07; }
.oracle-btn svg { display: block; width: 100%; height: auto; overflow: visible; }
.oracle-ring { font-family: var(--sans); font-size: 15px; fill: var(--ink); }
@keyframes oracle-bob { 50% { translate: 0 -6px; } }

.oracle {
  --w: min(340px, 84vw); --h: min(530px, 76dvh); --fan: 0.62; --fan-x: 68%;
  position: fixed; inset: 0; z-index: 50; overflow: hidden; background: rgba(222, 203, 163, 0.93); animation: fade 0.3s ease;
}
.oracle-close { position: absolute; top: 14px; right: 18px; z-index: 10; width: 44px; height: 44px; border: 0; background: transparent; font-size: 2rem; line-height: 1; }
.oracle-prompt { position: absolute; top: clamp(16px, 5vh, 52px); left: 16px; right: 60px; margin: 0 0 0 44px; text-align: center; font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.6rem); transition: opacity 0.3s ease; }
.oracle-prompt b { font-style: italic; color: var(--oracle-purple); }
.oracle:not([data-phase="fan"]) .oracle-prompt { opacity: 0; }
.oracle-hand { position: absolute; left: 50%; bottom: -3%; width: clamp(170px, 24vw, 290px); margin-left: calc(clamp(170px, 24vw, 290px) / -2); }
.oracle-stage { position: absolute; inset: 0; pointer-events: none; }
.oracle-spark { position: absolute; width: clamp(26px, 4vw, 56px); fill: #F2C53D; animation: oracle-twinkle 2.2s ease-in-out infinite; }
.oracle-spark.s1 { left: 14%; top: 22%; } .oracle-spark.s2 { right: 14%; top: 16%; animation-delay: 0.5s; }
.oracle-spark.s3 { left: 20%; bottom: 20%; animation-delay: 1s; } .oracle-spark.s4 { right: 19%; bottom: 26%; animation-delay: 1.5s; }
@keyframes oracle-twinkle { 0%, 100% { transform: scale(0.65) rotate(0); opacity: 0.55; } 50% { transform: scale(1.1) rotate(25deg); opacity: 1; } }

.o-card {
  position: absolute; left: 50%; top: 50%; width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2);
  perspective: 1500px; pointer-events: auto; transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s ease, translate 0.25s ease;
}
.o-card[data-slot="0"] { --x: calc(var(--fan-x) * -1); --r: -15deg; --y: 6%; }
.o-card[data-slot="1"] { --x: 0%; --r: 0deg; --y: -5%; }
.o-card[data-slot="2"] { --x: var(--fan-x); --r: 15deg; --y: 6%; }
.oracle[data-phase="enter"] .o-card { transform: translate(0, 120vh) scale(0.3); }
.oracle[data-phase="swirl"] .o-card { transform: translate(calc(var(--x) * -1.1), -12%) rotate(calc(var(--r) * -2)) scale(calc(var(--fan) * 0.85)); }
.oracle[data-phase="gather"] .o-card { transform: translate(0, -3%) rotate(calc(var(--r) * 0.4)) scale(var(--fan)); }
.oracle[data-phase="fan"] .o-card { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--fan)); animation: oracle-float 3.4s ease-in-out infinite; }
.oracle[data-phase="fan"] .o-card[data-slot="1"] { animation-delay: 0.4s; }
.oracle[data-phase="fan"] .o-card[data-slot="2"] { animation-delay: 0.8s; }
.oracle[data-phase="fan"] .o-card:hover, .oracle[data-phase="fan"] .o-card:focus-within { animation: none; translate: 0 -5%; z-index: 4; }
@keyframes oracle-float { 50% { translate: 0 -2.200%; } }
.oracle[data-phase="rise"] .o-card, .oracle[data-phase="reveal"] .o-card { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--fan)); }
.oracle[data-phase="rise"] .o-card.is-other { opacity: 0.55; }
.oracle[data-phase="rise"] .o-card.is-chosen { transform: translate(var(--x), -34%) rotate(0deg) scale(calc(var(--fan) * 1.14)); z-index: 5; }
.oracle[data-phase="reveal"] .o-card.is-other { transform: translate(calc(var(--x) * 2.2), 130%) rotate(calc(var(--r) * 2)) scale(0.4); opacity: 0; pointer-events: none; }
.oracle[data-phase="reveal"] .o-card.is-chosen { transform: translate(0, 2%) rotate(0deg) scale(1); z-index: 5; transition-duration: 0.9s; }
.o-word { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 12px; text-align: center; font-family: var(--sans); font-weight: 700; font-size: 3.2rem; line-height: 1; letter-spacing: 0.04em; color: var(--ink); }
.o-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.4, 0.1, 0.2, 1); }
.oracle[data-phase="reveal"] .is-chosen .o-flip { transform: rotateY(180deg); }
.o-face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; border-radius: 16px; overflow: hidden;
  background: #FFFDF8; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 22px 44px -22px rgba(30, 26, 22, 0.7); color: var(--ink);
}
.o-face::before { content: ''; position: absolute; inset: 22px 22px 14px; border: 1.5px solid var(--oracle-gold); pointer-events: none; z-index: 1; }
.o-back { transform: rotateY(180deg); background: var(--white); }
.o-back .o-numeral { background: var(--white); }
.o-numeral { position: relative; z-index: 2; margin-top: 11px; padding: 0 14px; background: #FFFDF8; font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.5; }
.o-art { flex: 1; min-height: 0; width: calc(100% - 44px); object-fit: cover; }
.o-band { position: relative; z-index: 2; flex: none; width: 100%; padding: 18px 12px 24px; background: var(--oracle-purple); color: #FFFDF8; font-family: var(--sans); font-weight: 600; font-size: 1.3rem; letter-spacing: 0.1em; text-align: center; text-transform: uppercase; }
.o-emblem { position: absolute; top: 44px; right: 38px; z-index: 2; width: 44px; height: 44px; }
.o-emblem svg { display: block; width: 100%; height: 100%; }
.o-back-body { flex: 1; min-height: 0; width: 100%; padding: 4px 42px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; overflow-y: auto; }
.o-bottle { height: clamp(120px, 26%, 180px); flex: none; width: auto; max-width: 70%; object-fit: contain; }
.o-back-body img { min-height: 110px; }
.o-back-body .brand-name { font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.o-back-body h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.25; }
.o-why { margin: 0; font-size: 0.92rem; line-height: 1.4; }
.o-order { margin-top: auto; flex: none; }

/* bag, checkout, product, saved, how */
.bag h2, .checkout h2, .saved h2 { margin-bottom: 20px; }
.bag-list { background: var(--cream); border-radius: var(--radius); padding: 8px 20px; max-width: 760px; }
.bag-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(30, 26, 22, 0.12); }
.bag-row img { width: 46px; height: 60px; object-fit: contain; mix-blend-mode: multiply; }
.bag-row .grow { flex: 1; }
.bag-row button { border: 0; background: none; color: var(--muted); text-decoration: underline; }
.bag-total { display: flex; justify-content: space-between; padding: 16px 0; font-weight: 600; }
.bag-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.checkout-form { display: grid; gap: 14px; max-width: 520px; background: var(--cream); border-radius: var(--radius); padding: 24px; }
.checkout-form label { display: grid; gap: 6px; font-size: 0.85rem; letter-spacing: 0.03em; }
.checkout-form input { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(30, 26, 22, 0.2); background: var(--white); }
.row2 { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.total { font-weight: 600; margin: 4px 0; }
.product-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; background: var(--cream); border-radius: var(--radius); padding: clamp(18px, 4vw, 40px); }
.product-wrap img { max-height: 420px; margin: 0 auto; mix-blend-mode: multiply; }
.price { font-family: var(--serif); font-size: 2rem; margin: 8px 0; }
.cards.compact .card-img { height: 170px; }
.cards.compact .card-img img { height: 150px; }
.empty { background: var(--cream); border-radius: var(--radius); padding: 28px; max-width: 620px; }
.how h2 { margin-bottom: 30px; }
.how-steps { list-style: none; padding: 0; margin: 0 0 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.how-steps li { background: var(--cream); border-radius: var(--radius); padding: 22px; }
.how-steps b { color: var(--terra); font-family: var(--serif); font-size: 1.6rem; }
.how-steps h3 { font-size: 1.25rem; margin: 8px 0; }
.how-steps p { margin: 0; color: #3A3127; font-size: 0.95rem; }
.how-arch { margin-bottom: 30px; }
.how-arch h3 { font-size: 1.5rem; margin-bottom: 14px; }
.arch { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.arch div { background: var(--ink); color: var(--cream); border-radius: 16px; padding: 14px 18px; flex: 1 1 160px; display: grid; gap: 4px; }
.arch div span { font-size: 0.85rem; opacity: 0.8; }
.arch i { align-self: center; font-style: normal; font-size: 1.4rem; color: var(--terra); }

.site-footer {
  display: flex; justify-content: space-between; gap: 24px; padding: 18px clamp(16px, 5vw, 64px); border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--muted);
}

/* responsive */
@media (max-width: 1080px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .how-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .site-header { grid-template-columns: 1fr auto; }
  .tagline { display: none; }
  .nav { gap: 16px; }
  .landing, .chat-screen { grid-template-columns: minmax(0, 1fr); }
  .bottle { max-width: 420px; }
  .photo-panel { position: static; }
  .photo-panel img { aspect-ratio: 16 / 9; }
  .chat-panel { min-height: 0; }
  .chat-log { max-height: none; }
  .product-wrap { grid-template-columns: 1fr; }
  .oracle { --fan: 0.52; --fan-x: 52%; }
}
@media (max-width: 640px) {
  .cards, .how-steps { grid-template-columns: 1fr; }
  .sample-row { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .sample span { font-size: 0.85rem; left: 8px; bottom: 6px; }
  .nav a:first-child { display: none; }
  .brand-logo { height: 38px; }
  .results { padding-bottom: 120px; }
  .oracle { --fan: 0.4; --fan-x: 30%; }
  .o-word { font-size: 3.6rem; }
  .site-footer { flex-direction: column; gap: 6px; }
  .msg { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) {
  .oracle-btn, .oracle-spark, .oracle[data-phase="fan"] .o-card { animation: none; }
  .o-card, .o-flip { transition-duration: 0.01s; }
  .oracle[data-phase="reveal"] .o-card.is-chosen { transition-duration: 0.01s; }
}
