:root {
    --discover-green: #087547;
    --discover-green-dark: #064c35;
    --discover-cream: #f8f4f0;
    --discover-brown: #806b60;
    --discover-ink: #433630;
    --discover-line: #e6dcd5;
}

.discovery-page { color: var(--discover-ink); background: #fffdfb; }
.discovery-hero { position: relative; overflow: hidden; padding: clamp(5rem, 11vw, 9rem) 0 clamp(4rem, 8vw, 7rem); background: radial-gradient(circle at 50% 30%, #fff 0, #f8f4f0 52%, #f0e8e2 100%); }
.discovery-hero::before { content: "M"; position: absolute; inset-inline-start: -1.5rem; bottom: -7rem; color: rgba(128,107,96,.045); font: 700 clamp(18rem, 45vw, 38rem)/1 Georgia, serif; }
.discovery-hero__inner { position: relative; z-index: 2; max-width: 940px; text-align: center; }
.discovery-eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.35rem; color: var(--discover-green); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.discovery-hero h1 { max-width: 820px; margin: 0 auto; color: var(--discover-brown); font-size: clamp(2.6rem, 7vw, 5.8rem); font-weight: 500; line-height: 1.08; }
.discovery-hero p { max-width: 720px; margin: 1.35rem auto 0; color: #806f66; font-size: clamp(1rem, 2vw, 1.22rem); line-height: 1.9; }
.discovery-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem 1.2rem; margin-top: 1.8rem; }
.discovery-trust span { display: inline-flex; align-items: center; gap: .42rem; color: #6d5d54; font-size: .76rem; }
.discovery-trust i { color: var(--discover-green); }
.discovery-orbit { position: absolute; border: 1px solid rgba(8,117,71,.14); border-radius: 50%; pointer-events: none; }
.discovery-orbit--one { width: 330px; height: 330px; inset-inline-end: -150px; top: -90px; }
.discovery-orbit--two { width: 190px; height: 190px; inset-inline-start: 6%; bottom: -110px; }

.discovery-loyalty { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; max-width: 850px; margin: 2rem auto 0; padding: 1.15rem 1.3rem; text-align: start; border: 1px solid rgba(8,117,71,.2); border-radius: 1.5rem; background: rgba(255,255,255,.82); box-shadow: 0 18px 48px rgba(79,55,43,.08); backdrop-filter: blur(10px); }
.discovery-flower { position: relative; width: 116px; height: 116px; margin-inline: auto; }
.discovery-flower__petal { position: absolute; left: 49px; top: 7px; width: 18px; height: 42px; border-radius: 80% 20% 75% 25%; border: 1px solid rgba(8,117,71,.22); background: #edf5f1; transform-origin: 9px 51px; transform: rotate(calc((var(--petal-index) - 1) * 36deg)); transition: background .28s ease, border-color .28s ease, box-shadow .28s ease; }
.discovery-flower__petal:nth-child(1) { --petal-index: 1; }
.discovery-flower__petal:nth-child(2) { --petal-index: 2; }
.discovery-flower__petal:nth-child(3) { --petal-index: 3; }
.discovery-flower__petal:nth-child(4) { --petal-index: 4; }
.discovery-flower__petal:nth-child(5) { --petal-index: 5; }
.discovery-flower__petal:nth-child(6) { --petal-index: 6; }
.discovery-flower__petal:nth-child(7) { --petal-index: 7; }
.discovery-flower__petal:nth-child(8) { --petal-index: 8; }
.discovery-flower__petal:nth-child(9) { --petal-index: 9; }
.discovery-flower__petal:nth-child(10) { --petal-index: 10; }
.discovery-flower__petal.is-earned { border-color: #087547; background: linear-gradient(145deg, #20a76e, #087547); box-shadow: 0 5px 13px rgba(8,117,71,.18); }
.discovery-flower__heart { position: absolute; inset: 38px; z-index: 2; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #806b60; font: 700 1rem/1 Georgia, serif; box-shadow: 0 7px 18px rgba(70,48,38,.18); }
.discovery-loyalty__copy { min-width: 0; }
.discovery-loyalty__eyebrow { color: var(--discover-green); font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.discovery-loyalty h2 { margin: .25rem 0 .35rem; color: var(--discover-brown); font-size: clamp(1.12rem, 2vw, 1.48rem); font-weight: 700; line-height: 1.3; }
.discovery-loyalty__copy p { margin: 0; color: #806f66; font-size: .78rem; line-height: 1.65; }
.discovery-loyalty__meter { overflow: hidden; height: 7px; margin-top: .75rem; border-radius: 999px; background: #e6eee9; }
.discovery-loyalty__meter > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #20a76e, #087547); transition: width .4s ease; }
.discovery-reward { display: grid; min-width: 158px; padding: .8rem; text-align: center; border: 1px dashed rgba(8,117,71,.42); border-radius: 1rem; background: #eff8f3; }
.discovery-reward > span { color: #6f625b; font-size: .66rem; }
.discovery-reward > strong { margin: .15rem 0 .45rem; color: var(--discover-green); font-size: 1.2rem; }
.discovery-reward button { padding: .5rem .65rem; border: 0; border-radius: .65rem; color: #fff; background: var(--discover-green); cursor: pointer; font: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .04em; }

.discovery-builder { padding: clamp(3rem, 8vw, 7rem) 0; background: #fffdfb; }
.discovery-builder .mono-container { max-width: 980px; }
.discovery-panel { padding: clamp(1.2rem, 4vw, 3.4rem); border: 1px solid var(--discover-line); border-radius: clamp(1.4rem, 3vw, 2.2rem); background: rgba(255,255,255,.95); box-shadow: 0 28px 80px rgba(83,61,50,.09); }
.discovery-panel__header, .discovery-step__title { display: flex; align-items: center; gap: 1rem; }
.discovery-panel__header > span, .discovery-step__title > span { display: grid; place-items: center; flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; color: #fff; background: var(--discover-green); font-size: .7rem; font-weight: 800; }
.discovery-panel__header p { margin: 0 0 .2rem; color: var(--discover-green); font-size: .74rem; font-weight: 800; }
.discovery-panel__header h2, .discovery-step h3 { margin: 0; color: var(--discover-brown); }
.discovery-panel__header h2 { font-size: clamp(1.55rem, 3.5vw, 2.45rem); }
.discovery-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-top: 1.8rem; }
.discovery-type { position: relative; display: flex; align-items: center; gap: .8rem; min-height: 112px; padding: 1rem; border: 1px solid var(--discover-line); border-radius: 1.2rem; cursor: pointer; transition: .22s ease; }
.discovery-type:hover, .discovery-type.is-selected { transform: translateY(-2px); border-color: rgba(8,117,71,.55); background: #f2f8f5; box-shadow: 0 14px 30px rgba(8,117,71,.08); }
.discovery-type input, .discovery-pill input, .discovery-topic input { position: absolute; opacity: 0; pointer-events: none; }
.discovery-type__icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.8rem; height: 2.8rem; border-radius: .9rem; color: var(--discover-green); background: #e7f3ed; }
.discovery-type__text { min-width: 0; }
.discovery-type__text strong, .discovery-type__text small { display: block; }
.discovery-type__text strong { margin-bottom: .28rem; color: var(--discover-ink); font-size: 1rem; }
.discovery-type__text small { color: #8b7970; font-size: .72rem; line-height: 1.6; }
.discovery-type__check { position: absolute; inset-inline-end: .7rem; top: .7rem; display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; color: transparent; border: 1px solid var(--discover-line); font-size: .55rem; }
.discovery-type.is-selected .discovery-type__check { color: #fff; border-color: var(--discover-green); background: var(--discover-green); }
.discovery-step { margin-top: 2.2rem; padding-top: 2.2rem; border-top: 1px solid var(--discover-line); }
.discovery-step h3 { font-size: 1.12rem; }
.discovery-pills, .discovery-topics { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.15rem; }
.discovery-pill { position: relative; min-width: 104px; padding: .85rem 1rem; text-align: center; border: 1px solid var(--discover-line); border-radius: 1rem; cursor: pointer; transition: .2s ease; }
.discovery-pill strong { display: block; color: var(--discover-brown); font: 600 1.6rem/1 Georgia, serif; }
.discovery-pill span { color: #8d7c72; font-size: .68rem; }
.discovery-pill:hover, .discovery-pill.is-selected { color: #fff; border-color: var(--discover-green); background: var(--discover-green); box-shadow: 0 10px 24px rgba(8,117,71,.18); }
.discovery-pill.is-selected strong, .discovery-pill.is-selected span { color: #fff; }
.discovery-topic { position: relative; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .65rem .9rem; border: 1px solid var(--discover-line); border-radius: 999px; color: #79685f; cursor: pointer; font-size: .78rem; font-weight: 700; transition: .2s ease; }
.discovery-topic i { color: var(--discover-green); }
.discovery-topic:hover, .discovery-topic.is-selected { color: #fff; border-color: var(--discover-green); background: var(--discover-green); }
.discovery-topic.is-selected i { color: #fff; }
.discovery-generate { display: flex; align-items: center; justify-content: center; gap: .8rem; width: 100%; min-height: 58px; margin-top: 2.35rem; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(115deg, var(--discover-green-dark), var(--discover-green)); box-shadow: 0 15px 34px rgba(8,117,71,.22); cursor: pointer; font: inherit; font-weight: 800; transition: .2s ease; }
.discovery-generate:hover { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(8,117,71,.27); }
.discovery-generate:disabled { opacity: .65; cursor: wait; transform: none; }
.discovery-privacy { display: flex; justify-content: center; align-items: flex-start; gap: .4rem; margin: .9rem auto 0; color: #9a8980; font-size: .68rem; line-height: 1.6; text-align: center; }

.discovery-loading, .discovery-result, .discovery-error { margin-top: 1.4rem; border-radius: 1.8rem; }
.discovery-loading { padding: 4rem 1.5rem; text-align: center; border: 1px solid #dcebe4; background: #f3f9f6; }
.discovery-loading h2 { margin: 1.1rem 0 .45rem; color: var(--discover-brown); }
.discovery-loading p { color: #827168; }
.discovery-loader { display: flex; justify-content: center; gap: .45rem; }
.discovery-loader span { width: .7rem; height: .7rem; border-radius: 50%; background: var(--discover-green); animation: discoveryBounce 1s infinite ease-in-out; }
.discovery-loader span:nth-child(2) { animation-delay: .15s; }
.discovery-loader span:nth-child(3) { animation-delay: .3s; }
@keyframes discoveryBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-9px); opacity: 1; } }
.discovery-result { position: relative; overflow: hidden; padding: clamp(1.5rem, 5vw, 4rem); border: 1px solid #dce8e2; background: linear-gradient(145deg, #fff, #f4f9f6); box-shadow: 0 24px 70px rgba(60,44,35,.09); }
.discovery-result::after { content: "M"; position: absolute; inset-inline-end: -1rem; bottom: -5rem; color: rgba(8,117,71,.04); font: 700 18rem/1 Georgia, serif; pointer-events: none; }
.discovery-result__top, .discovery-result h2, .discovery-result__content, .discovery-result__actions { position: relative; z-index: 1; }
.discovery-result__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.discovery-result__badge { padding: .45rem .75rem; border-radius: 999px; color: #fff; background: var(--discover-green); font-size: .7rem; font-weight: 800; }
.discovery-result__time { color: #8a7970; font-size: .72rem; }
.discovery-result h2 { margin: 1.4rem 0; color: var(--discover-brown); font-size: clamp(2rem, 5vw, 3.7rem); font-weight: 500; line-height: 1.2; }
.discovery-result__content { max-width: 760px; color: #5e4f47; font-size: clamp(.98rem, 2vw, 1.1rem); line-height: 2; }
.discovery-result__content p { margin: 0 0 1rem; }
.discovery-result__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.discovery-result__actions button { min-height: 46px; padding: .72rem 1.1rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 800; }
.discovery-again { color: #fff; border: 1px solid var(--discover-green); background: var(--discover-green); }
.discovery-share { color: var(--discover-green); border: 1px solid rgba(8,117,71,.35); background: #fff; }
.discovery-error { padding: 1rem 1.2rem; color: #8a2e2e; border: 1px solid #efcaca; background: #fff3f3; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 780px) {
    .discovery-hero { padding-top: 4rem; }
    .discovery-types { grid-template-columns: 1fr; }
    .discovery-type { min-height: 92px; }
    .discovery-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .discovery-pill { min-width: 0; }
    .discovery-topic { flex: 1 1 calc(50% - .7rem); justify-content: center; text-align: center; }
    .discovery-result__top { align-items: flex-start; flex-direction: column; }
    .discovery-result__actions button { flex: 1 1 100%; }
    .discovery-loyalty { grid-template-columns: 92px minmax(0, 1fr); gap: .8rem; padding: 1rem; }
    .discovery-flower { width: 84px; height: 84px; transform: scale(.72); transform-origin: center; }
    .discovery-reward { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .discovery-loader span { animation: none; }
    .discovery-type, .discovery-pill, .discovery-topic, .discovery-generate { transition: none; }
}
