.gift-finder { min-height: 100svh; color: #30291f; background: #fffdf7; font-family: "DM Sans", system-ui, sans-serif; }
.gift-finder button { cursor: pointer; color: inherit; }
.gift-finder button:disabled { cursor: default; }
.gift-finder :is(button,input,textarea,summary,a):focus-visible { outline: 3px solid #84600d; outline-offset: 3px; }
.finder-layout { width: min(1170px, calc(100% - 80px)); margin: clamp(40px,7vh,78px) auto 90px; display: grid; grid-template-columns: minmax(150px, .32fr) minmax(0, 1fr); gap: clamp(25px,5vw,74px); max-width: 1170px; align-items: start; }
.finder-progress { position: sticky; top: 32px; align-self: start; }
#finder-previous { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 6px 12px; margin: 0 0 14px -2px; border: 1px solid #d9d0bb; border-radius: 9px; background: #fffdf7; font: inherit; font-size: .86rem; font-weight: 620; }
#finder-previous span { font-size: 1rem; }
#finder-previous:hover { background: #fff5cf; border-color: #baa26a; }
.gift-finder #finder-previous[hidden] { display: inline-flex !important; visibility: hidden; }
#stage-list { list-style: none; margin: 0; padding: 6px 0; }
#stage-list li { position: relative; display: flex; align-items: center; gap: 13px; min-height: 40px; color: #756b5b; font-size: .89rem; font-weight: 540; }
#stage-list li::before { content: ''; flex: 0 0 10px; height: 10px; border: 2px solid #c7bda7; border-radius: 100%; background: #fffdf7; z-index: 1; }
#stage-list li:not(:last-child)::after { content: ''; position: absolute; top: calc(50% + 4px); left: 4px; bottom: -18px; width: 2px; background: #ded5bf; }
#stage-list .done::before { background: #d3ae43; border-color: #d3ae43; }
#stage-list [aria-current] { color: #382e1e; font-weight: 800; }
#stage-list [aria-current]::before { background: #efc139; border-color: #51401c; box-shadow: 0 0 0 3px #ffedac; }
.parcel-stamp { display: block; margin-top: 27px; margin-left: -14px; width: min(85%,160px); height: auto; transform: rotate(-4deg); }
.conversation { width: 100%; max-width: 795px; min-width: 0; overflow-anchor: none; }
.current-turn { --question-inset: 24px; scroll-margin-block-start: var(--question-inset); min-block-size: calc(100dvh - var(--question-inset)); }
#history:empty { display: none; }
#history { margin: 0 0 28px; }
.transcript-turn { padding: 12px 0; border-bottom: 1px solid #eee4d0; }
.transcript-turn p { margin: 0 0 5px; color: #635541; font-weight: 600; }
.history-reply { max-width: 85%; padding: 8px 12px; background: #f9f0d6; color: #453923; border: 1px solid #dfd1af; border-radius: 15px 15px 2px 15px; font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.history-reply span { margin-left: 8px; font-size: .8em; color: #6b604b; }
#stage-list button { min-height: 36px; padding: 0; background: transparent; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
#stage-list button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
#stage-list button:disabled, .transcript-turn button:disabled { color: #827c72; cursor: default; }
#question { scroll-margin-block-start: var(--question-inset); }
.answer-log { position: relative; margin: 0 0 10px; width: fit-content; }
.answer-log summary { color: #6b5c42; font-weight: 600; font-size: .86rem; cursor: pointer; }
.answer-log ul { padding: 0; margin: 12px 0; display: grid; gap: 7px; list-style: none; }
.answer-log button { background: transparent; border: 0; padding: 4px 0; text-align: left; text-decoration: underline; text-decoration-color: #b9a989; text-underline-offset: 3px; }
.answer-row { display: flex; justify-content: flex-end; }
.answer-bubble { max-width: min(85%,550px); padding: 10px 14px; border: 1px solid #ddcca2; border-radius: 17px 17px 3px 17px; background: #fff1bd; font-size: .94rem; font-weight: 560; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.answer-bubble span { color: #77633a; margin-left: 8px; font-size: .82rem; }
#question { outline: none; }
.greeting { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; color: #715c31; font-size: 1rem; font-weight: 700; }
.question-intro { display:flex; align-items:center; gap:15px; }
.question-art { flex:none; display:grid; place-items:center; width:66px; height:60px; background:#fff6d9; border:1px solid #e8d8ad; border-radius:15px; }
.question-art .art-icon { width:54px; height:47px; }
.question-intro .finder-prompt { margin:0; }
.question-intro .greeting { margin-bottom:2px; font-size:.88rem; }
.finder-prompt { font-family: inherit; font-size: clamp(1.18rem,1.5vw,1.52rem); font-weight: 675; line-height: 1.4; letter-spacing: -.013em; margin: 0 0 10px; max-width: 44ch; text-wrap: pretty; }
.finder-hint { color: #675d4c; font-size: 1rem; line-height: 1.5; margin: 0 0 20px; }
.finder-controls { margin-top: 25px; }
.f-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.f-options.f-wide { grid-template-columns: repeat(2,minmax(0,1fr)); }
.f-options.f-art { grid-template-columns: repeat(4,minmax(0,1fr)); }
.f-option { display: flex; gap: 10px; align-items: center; justify-content: space-between; text-align: left; background: #fffefb; border: 1px solid #d8cfbb; border-radius: 12px; min-height: 51px; padding: 11px 14px; font-size: .98rem; font-weight: 570; line-height: 1.35; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; }
.f-option:hover { border-color: #b89a4f; background: #fff9e5; }
.f-option:active { transform: translateY(1px) scale(.987); }
.f-option[aria-pressed=true] { background: #fff2bb; border-color: #ab8121; box-shadow: inset 0 0 0 1px #c49422; }
.f-mark { flex: 0 0 17px; width: 17px; height: 17px; border: 1px solid #c4bba5; border-radius: 4px; display: grid; place-items: center; color: transparent; font-size: 12px; }
[aria-pressed=true] > .f-mark { background: #443620; border-color: #443620; color: #fff8d6; }
.f-art .f-option { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 109px; padding: 12px 6px 11px; text-align: center; font-size: .85rem; }
.f-art .f-mark { position: absolute; top: 8px; left: 8px; width: 14px; height: 14px; font-size: 10px; }
.art-icon { display: block; width: 61px; height: 49px; }
.f-option:hover .art-icon { transform: rotate(-4deg); }
.f-option[aria-pressed=true] .art-icon { transform: rotate(-5deg) translateY(-1px); }
.art-icon { transition: transform .16s ease-out; }
.f-illustrated .f-option { justify-content:flex-start; min-height:64px; gap:9px; padding:8px 10px; }
.f-illustrated .art-icon { flex:0 0 46px; width:46px; height:43px; }
.f-illustrated .f-mark { margin-left:auto; }
.f-specific .f-option { padding-inline:8px; min-height:112px; }
.f-chip:has(.art-icon) { display:inline-flex; align-items:center; gap:5px; padding-left:7px; }
.f-chip .art-icon { width:26px; height:25px; flex:none; }
.finder-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.f-chip,.f-link,.f-secondary { min-height: 38px; border: 1px solid #d8cfbb; border-radius: 999px; background: #fffdf7; padding: 7px 13px; font-size: .9rem; font-weight: 600; line-height: 1.25; }
.f-chip:hover,.f-secondary:hover { border-color: #aa903f; background: #fff7db; }
.f-form { display: flex; align-items: center; gap: 7px; max-width: 100%; }
.f-form:not([hidden]) { margin-top:12px; }
[data-dictate] { display:inline-flex; align-items:center; gap:.4rem; }
[data-dictate] svg { width:17px; height:17px; flex:none; }
.gift-finder [hidden] { display: none !important; }
.f-form input,.finder-controls textarea { min-width: 0; font: inherit; color: #342e27; border: 1px solid #bdaf91; border-radius: 10px; background: #fffefa; padding: 10px 12px; }
.f-form input { width: min(240px,55vw); }
.finder-controls textarea { width: 100%; display: block; min-height: 99px; resize: vertical; line-height: 1.5; }
.f-skip { display:inline-flex; align-items:center; gap:.55rem; min-height:45px; padding:9px 17px; border:1px solid #b98b70; border-radius:11px; background:#fff0e1; color:#633c2b; font-weight:650; }
.f-skip:hover { background:#ffdec7; border-color:#925d42; }
.f-skip:active { transform:translateY(1px); }
.finder-actions { margin-top: 24px; }
.f-next { min-height: 45px; text-align: center; font-weight: 780; background: #f6cf4d; border: 1px solid #604d23; border-radius: 11px; padding: 9px 19px; box-shadow: 0 2px 0 #5d4928; }
.f-next:hover:not(:disabled) { background: #ffe178; }
.f-next:disabled { color: #796e55; background: #eae5d8; border-color: #d8d1c0; box-shadow: none; }
.f-link { color: #665940; background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.f-count { color: #706346; font-size: .87rem; }
#finder-feedback { margin-top: 26px; }
#finder-error:not(:empty) { margin: 14px 0; color: #8c3924; }
.reply-in-flight { position: fixed; z-index: 4; pointer-events: none; margin: 0; }
#question.outgoing-question { animation: start-question-lift .14s ease-in both; }
.reveal-pending .finder-controls { opacity: 0; }
.typing .finder-prompt { animation: lift-next-prompt .27s cubic-bezier(.22,.68,.24,1) both; }
.reveal-options { animation: reveal-options .20s ease-out both; }
.finder-swapping-out #question { view-transition-name: gift-question-out; }
.finder-swapping-out .reply-in-flight,.finder-swapping-in .answer-bubble { view-transition-name: gift-reply; }
.finder-swapping-in #question { view-transition-name: gift-question-in; }
::view-transition-group(gift-reply) { animation-duration: 350ms; animation-timing-function: cubic-bezier(.22,.68,.24,1); }
::view-transition-group(gift-question-out), ::view-transition-group(gift-question-in) { animation-duration: 350ms; }
::view-transition-old(gift-question-out) { animation: release-question 290ms cubic-bezier(.3,.1,.3,1) both; }
::view-transition-new(gift-question-in) { animation: hold-next-question 350ms step-end both; }
html.finder-swapping-in::view-transition-old(root), html.finder-swapping-in::view-transition-new(root) { animation-duration: 230ms; }
@keyframes hold-next-question { from { opacity: 0; } to { opacity: 1; } }
@keyframes release-question { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-100px); } }
@keyframes start-question-lift { from { opacity: 1; transform: translateY(0); } to { opacity: .5; transform: translateY(-24px); } }
@keyframes lift-next-prompt { from { opacity: .25; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.typing .prompt-letters::after { content: ''; display: inline-block; width: 2px; height: .84em; margin-left: 3px; vertical-align: -.03em; background: #c69512; }
.finder-prompt { display: grid; }
.finder-prompt::before,.prompt-letters { grid-area: 1 / 1; }
.finder-prompt::before { content: attr(aria-label); visibility: hidden; }
@keyframes reveal-options { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media(max-width: 780px) {
  .finder-layout { width: calc(100% - 40px); display: block; margin: 0 auto 62px; }
  .finder-progress { position: sticky; top: 0; z-index: 3; padding: 8px 0 5px; background: #fffdf6; }
  .current-turn { --question-inset: calc(var(--finder-rail-height, 104px) + 8px); }
  #finder-previous { margin: -5px 0 10px; min-height: 36px; }
  .parcel-stamp { display: none; }
  #stage-list { display: flex; padding: 0; gap: 4px; }
  #stage-list li { flex: 1; min-width: 0; display: block; min-height: auto; padding-top: 9px; font-size: .73rem; }
  #stage-list li::before,#stage-list [aria-current]::before { position: absolute; top: 0; left: 0; right: 0; width: auto; height: 3px; border: 0; border-radius: 8px; background: #e3dcc8; box-shadow: none; }
  #stage-list .done::before,#stage-list [aria-current]::before { background: #bd8c14; }
  #stage-list li::after { display: none; }
  #history { margin-bottom: 19px; }
  .finder-prompt { font-size: 1.2rem; }
  .f-options.f-art { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width: 500px) {
  .question-art { width:50px; height:48px; border-radius:11px; }
  .question-art .art-icon { width:43px; height:39px; }
  .question-intro { gap:10px; }
  .f-illustrated .art-icon { width:36px; height:35px; flex-basis:36px; }
  .f-illustrated .f-option { min-height:54px; padding:6px; gap:5px; }
  .f-options.f-specific { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .f-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .f-option { min-height: 46px; padding: 10px; font-size: .9rem; }
  .f-options.f-wide { grid-template-columns: 1fr; }
  .f-art .f-option { font-size: .78rem; min-height: 100px; }
  .f-count { font-size: .8rem; }
  .finder-controls { margin-top: 19px; }
}
@media(prefers-reduced-motion: reduce) {
  .gift-finder *, .gift-finder *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*) { animation-duration: 0s !important; }
}
.finder-beta-note { margin: .5rem 0 1rem; font-size:.85rem; line-height:1.45; color:#605743; max-width:38rem; }
.finder-beta-note a { color:inherit; }
