/* Match the scroll-locked page and cap it to the visible area as toolbars move. */
html.card-focus,html.card-focus body{height:100%;overflow:hidden;overscroll-behavior:none;touch-action:none;background:#f7efdf}
html.card-focus{height:min(100%,100dvh)}
.app.card-select-active{height:100%;max-height:var(--visible-height,100dvh);min-height:0;overflow:hidden}
.app.card-select-active>.site-header,.app.card-select-active>.back-row{display:none}
.app.card-select-active #main-content{height:auto;flex:1 1 0;overflow:hidden;padding:0;margin:0;overscroll-behavior:none}
.app .deck-scene.card-focus-scene{width:100%;height:100%;min-height:0;padding:0;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;overflow:hidden;background-image:linear-gradient(#fffdf2cf,#fffdf2cf),var(--table-image);background-size:cover}
.card-focus-toolbar{height:62px;padding:8px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.card-focus-brand{font:25px Georgia;background:transparent;padding:0;color:#34594c}
.card-focus-toolbar>div{display:flex;gap:10px;align-items:center}
.card-focus-toolbar .focus-shuffle{font-size:12px;padding:8px 13px;min-height:40px;border-radius:24px;background:#fffef9;border:1px solid #e1e4d5;display:flex;gap:7px;align-items:center;color:#6e7e61}
.card-focus-toolbar .focus-close{background:#fffef9;border:1px solid #e1e4d5;width:40px;height:40px}
.app .card-focus-scene .deck-title{position:relative;padding:10px 20px 4px;text-align:center;z-index:3}
.app .card-focus-scene .deck-title h1{font-size:clamp(24px,6.9vw,34px);line-height:1.4;margin:0 0 10px;color:#35594c;font-weight:400}
.deck-title h1 strong{font:1.1em Georgia;color:#8c784e}
.app .card-focus-scene .deck-question{max-width:540px;padding:0;border:0;background:transparent;border-radius:0;box-shadow:none}
.deck-question summary{display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;list-style:none;font-size:12px;color:#71816a;line-height:1.6}
.deck-question summary::-webkit-details-marker{display:none}
.deck-question summary>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:85%}
.deck-question summary svg{width:14px;height:14px;transform:rotate(90deg);flex:none}
.app .card-focus-scene .deck-question>p{position:absolute;left:16px;right:16px;top:100%;max-width:600px;max-height:130px;overflow:auto;margin:auto;padding:14px 16px;border:1px solid #d9dfcc;border-radius:10px;background:#fffef9;font-size:14px;line-height:1.7;box-shadow:0 8px 22px #294b3c19;touch-action:pan-y;overscroll-behavior:contain}
.focus-picked{padding:12px 18px 5px;text-align:center;z-index:2}
.app .card-focus-scene .picked-shelf{min-height:0;margin:0;gap:12px}
.app .card-focus-scene .picked-slot{width:clamp(43px,12.4vw,64px);height:auto;aspect-ratio:951/1585;flex:none;border-radius:3%/1.75%}
.app .card-focus-scene .selection-count{font-size:11px;color:#748367;margin-top:8px;line-height:1.6}
.app .card-focus-scene .picked-slot.empty{background:#fffef94d;border:1px solid #c8d2ba}
.app .card-focus-scene .picked-slot.is-next{box-shadow:none;border-color:#859e72;background:#fafbf4}
.app .picked-slot.filled,.app .picked-slot.filled>button{background:transparent;box-shadow:none;border:0}
.app .picked-slot.filled .physical-card,.app .reveal-cards .physical-card,.app .fan-card .physical-card{border-radius:3%/1.75%;border:0;overflow:hidden;background:transparent}
.app .physical-card>img,.app .picked-slot.filled .physical-card img,.app .reveal-cards .physical-card img{border-radius:inherit}
.app .picked-slot.filled .physical-card,.app .reveal-cards .physical-card{box-shadow:0 3px 6px #294b3c20}
.app .card-focus-scene .fan-window{height:auto;min-height:0;width:100%;max-width:none;margin:0;overflow:hidden;align-self:stretch;touch-action:none}
.card-focus-scene #fan,.card-focus-scene #fan .fan-card{touch-action:none}
.app .card-focus-scene .fan-card{border-radius:3%/1.75%}
.card-focus-scene .fan-card .physical-card{transition:none;box-shadow:none}
.card-focus-scene .fan-card:active .physical-card{translate:none;filter:none}
.card-focus-scene .fan-window.is-panning .physical-card{translate:none;filter:none}
.app .card-focus-scene .fan-arrow{top:42%;width:40px;height:40px;background:#fffef9f2;box-shadow:0 3px 12px #294b3c13}
.app .card-focus-scene .fan-arrow.previous{left:12px}.app .card-focus-scene .fan-arrow.next{right:12px}
.focus-footer{padding:3px 18px max(12px,env(safe-area-inset-bottom));width:100%;max-width:620px;justify-self:center}
.app .card-focus-scene .deck-position{font-size:10px;line-height:1.6;margin:0 0 9px;min-height:16px}
.app .card-focus-scene .deck-actions{padding:0}
.app .card-focus-scene .deck-actions .primary{width:100%;min-width:0;min-height:46px;font-size:14px}
.app .card-focus-scene .deck-actions p{font-size:10px;line-height:1.5;margin-top:7px}
.deck-frozen-note{position:absolute;left:12px;right:12px;top:110px;z-index:4;background:#fffef9;padding:5px;font-size:11px}
/* Actual response wait. No fake percentage or timed successful transition. */
.reading-pending>#main-content,.reading-pending>.site-header,.reading-pending>.back-row{filter:blur(7px);pointer-events:none}
html.reading-wait,html.reading-wait body{overflow:hidden!important;overscroll-behavior:none}
.reading-loading{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:28px 24px;background:#293b30ad;color:#fffdf4;text-align:center;overscroll-behavior:none;touch-action:none}
.loading-card{position:relative;width:clamp(94px,28vw,150px);aspect-ratio:951/1585;filter:drop-shadow(0 14px 24px #14241e40);animation:reading-float 3.5s ease-in-out infinite;overflow:hidden;border-radius:3%/1.75%}
.loading-card img{display:block;width:100%;height:100%;object-fit:contain}
.loading-card:after{content:'';position:absolute;inset:-20%;background:linear-gradient(105deg,transparent 35%,#fffef72b 50%,transparent 65%);animation:reading-light 3.6s ease-in-out infinite}
.reading-loading h2{font-size:clamp(20px,5.6vw,29px);font-weight:400;line-height:1.6;margin:25px 0 13px;color:#fffdf4}
.loading-question{max-width:560px;max-height:24vh;overflow:auto;font-size:14px;line-height:1.8;color:#f1efdf;overflow-wrap:anywhere}
.loading-dots{display:flex;gap:7px;margin-top:24px}
.loading-dots i{width:4px;height:4px;background:#e6dbba;border-radius:50%;animation:reading-dot 1.6s ease-in-out infinite}
.loading-dots i:nth-child(2){animation-delay:.2s}.loading-dots i:nth-child(3){animation-delay:.4s}
.loading-cancel{background:transparent;color:#efefdf;min-height:44px;padding:6px 12px;margin-top:24px;font-size:12px;text-decoration:underline;text-underline-offset:5px;text-decoration-color:#dce0cf70}
.loading-cancel:focus-visible{outline:1px solid #e7e0c5;outline-offset:3px;border-radius:6px}
.reveal-tools .sound-toggle{background:#fffef9;border:1px solid #dce2d3;border-radius:24px;font-size:11px;padding:6px 11px;min-height:34px}
@keyframes reading-float{50%{transform:translateY(-7px) rotate(1.5deg)}}
@keyframes reading-light{0%,20%{transform:translateX(-95%)}70%,100%{transform:translateX(95%)}}
@keyframes reading-dot{50%{opacity:.25;transform:translateY(-3px)}}
/* Mobile reading follows the document. No fixed footer or reserved input block. */
@media(max-width:759px){
 html.page-scroll .app.reading-active{height:auto;min-height:var(--visible-height,100svh);overflow:visible;display:block}
 html.page-scroll .app.reading-active>.site-header{position:static}
 html.page-scroll .app.mobile.reading-active #main-content{display:block;height:auto;min-height:0;overflow:visible;padding:0;margin:0}
 html.page-scroll .app.mobile.reading-active .reading-room{height:auto;min-height:0;display:block;overflow:visible;margin:0;padding:0}
 html.page-scroll .app.mobile.reading-active .reading-context{position:static;width:100%;height:auto;padding:10px 16px}
 html.page-scroll .app.mobile.reading-active .reading-column{display:block;height:auto;min-height:0;overflow:visible;padding:0 16px}
 html.page-scroll .app.mobile.reading-active .reading-scroll{display:block;height:auto;min-height:0;overflow:visible;padding:15px 0 0;margin:0;touch-action:pan-y}
 html.page-scroll .app.mobile.reading-active .reading-scroll>.reading-composer{position:static;display:block;height:auto;min-height:0;inset:auto;flex:none;padding:12px 0 max(8px,env(safe-area-inset-bottom));margin:10px 0 0;background:#fffef9;border:0;box-shadow:none;backdrop-filter:none}
 .app.mobile.reading-active .reading-composer>small{display:none}
 .app.mobile.reading-active .reading-composer:before,.app.mobile.reading-active .reading-composer:after{display:none}
 .app.mobile .context-cards .physical-card{aspect-ratio:951/1585;height:auto;border-radius:3%/1.75%}
}
@media(max-height:670px){.card-focus-toolbar{height:50px}.app .card-focus-scene .deck-title{padding-top:3px}.app .card-focus-scene .deck-title h1{font-size:23px;margin-bottom:5px}.focus-picked{padding-top:7px}.app .card-focus-scene .picked-slot{width:43px}.focus-footer{padding-bottom:8px}.app .card-focus-scene .deck-actions p{margin-top:5px}}
@media(orientation:landscape) and (max-height:520px){.app .deck-scene.card-focus-scene{grid-template-columns:230px minmax(0,1fr);grid-template-rows:48px auto 1fr auto}.card-focus-toolbar{grid-column:1/-1;height:48px}.app .card-focus-scene .deck-title{grid-column:1;grid-row:2;padding-top:6px}.app .card-focus-scene .deck-title h1{font-size:21px}.focus-picked{grid-column:1;grid-row:3;padding-top:8px}.app .card-focus-scene .picked-slot{width:42px}.app .card-focus-scene .fan-window{grid-column:2;grid-row:2/5}.focus-footer{grid-column:1;grid-row:4;padding:4px 12px 10px}.app .card-focus-scene .deck-position{font-size:8px;margin-bottom:5px}.app .card-focus-scene .deck-actions p{display:none}.app .card-focus-scene .deck-actions .primary{min-height:40px;font-size:12px}.app .card-focus-scene .fan-arrow{width:32px;height:32px}}
@media(prefers-reduced-motion:reduce){.loading-card,.loading-card:after,.loading-dots i{animation:none}}

/* Native pull-to-refresh belongs to the reading document. Restrict only selection. */
html.reading-page:not(.reading-wait),
html.reading-page:not(.reading-wait) body:not(.modal-open),
html.reading-page .app.reading-active,
html.reading-page .app.reading-active #main-content,
html.reading-page .reading-room,
html.reading-page .reading-column,
html.reading-page .app.mobile.reading-active .reading-scroll{
 overscroll-behavior:auto;touch-action:auto;
}
html.reading-page:not(.reading-wait){height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
html.reading-page:not(.reading-wait) body:not(.modal-open){height:auto;min-height:100%;overflow:visible}
/* Context thumbnails use the same single surface as the reveal cards. */
.app .context-cards .physical-card{border:0;border-radius:3%/1.75%;background:transparent;overflow:hidden;box-shadow:0 3px 6px #294b3c20}
.app .context-cards .physical-card>img{border-radius:inherit}

/* The supplied image is the complete card, including its frame and corners. */
#app .physical-card{border:0;border-radius:0;background:transparent;aspect-ratio:951/1585}
#app .physical-card:after{display:none}
#app .physical-card>img{object-fit:contain;border-radius:0;background:transparent;filter:none}
#app .loading-card{border-radius:0}


/* Keep long questions inside one centered viewport column. */
#app.card-select-active,#app.card-select-active #main-content{width:100%;max-width:100%;min-width:0}
#app .card-focus-scene{grid-template-columns:minmax(0,1fr);max-width:100%;min-width:0}
#app .card-focus-scene>*{min-width:0;max-width:100%;box-sizing:border-box}
#app .card-focus-scene .deck-title,#app .card-focus-scene .focus-picked{width:100%}
#app .card-focus-scene .deck-question{width:100%;min-width:0;margin-inline:auto}
#app .card-focus-scene .deck-question summary{min-width:0}
#app .card-focus-scene .deck-question summary>span{min-width:0;flex:0 1 auto}
#app .card-focus-scene .focus-footer{width:100%}
/* A back is one flat image; panning must not add lift, glow or extruded edges. */
#app #fan .fan-card,#app #fan .physical-card,
#app #fan-window.is-panning .fan-card .physical-card,
#app .daylight-fan-card,#app .daylight-fan-card .physical-card{
 box-shadow:none;filter:none;translate:none;background:transparent;border:0;transition:none;
}
#app #fan .fan-card:hover,#app #fan .fan-card:active,
#app #fan .fan-card:hover .physical-card,#app #fan .fan-card:active .physical-card{
 filter:none;translate:none;box-shadow:none;
}
/* Homepage: one composed desktop scene, with the question beside the cards. */
#app .daylight-hero{
 height:auto;min-height:0;display:block;grid-template:none;gap:0;
 padding:60px 32px 24px;text-align:left;
 background-image:linear-gradient(90deg,#fffdf5f2 0%,#fffdf5d9 42%,#fffdf53d 100%),var(--table-image);
 background-size:cover;background-position:center 52%;
}
#app .daylight-hero-layout{
 width:min(1180px,100%);margin:0 auto;display:grid;
 grid-template-columns:minmax(0,.95fr) minmax(0,1.1fr);
 grid-template-rows:auto auto;grid-template-areas:'intro cards' 'entry cards';
 column-gap:64px;row-gap:25px;align-items:center;
}
#app .daylight-hero .daylight-intro{grid-area:intro;min-width:0;max-width:520px;text-align:left}
#app .daylight-hero .daylight-intro .eyebrow{font-size:11px;line-height:1.7;letter-spacing:.14em;color:#8c7a52}
#app .daylight-hero .daylight-intro h1{font-size:clamp(40px,3.55vw,56px);line-height:1.2;letter-spacing:-1.8px;margin:15px 0 17px;font-weight:400;word-break:keep-all}
#app .daylight-hero .daylight-intro p{font-size:15px;line-height:1.8;color:#617564;margin:0}
#app .daylight-hero-art{grid-area:cards;position:relative;isolation:isolate;width:100%;height:405px;min-width:0;align-self:center;overflow:visible;pointer-events:none}
#app .daylight-hero-art:after{content:'';position:absolute;z-index:-1;width:68%;height:32px;left:16%;bottom:19px;border-radius:50%;background:#4860441c;filter:blur(18px)}
#app .daylight-hero-cards{position:relative;width:100%;height:100%;perspective:1200px}
#app .daylight-hero-card{position:absolute;display:block;width:178px;height:auto;aspect-ratio:951/1585;left:calc(50% - 89px);top:46px;transform-origin:50% 75%;filter:drop-shadow(0 12px 16px #253d2a20)}
#app .daylight-hero-card .physical-card{display:block;width:100%;height:100%;box-shadow:none}
#app .daylight-hero-card.hero-card-left{transform:translate(-118px,21px) rotate(-14deg);z-index:1}
#app .daylight-hero-card.hero-card-right{transform:translate(118px,21px) rotate(14deg);z-index:2}
#app .daylight-hero-card.hero-card-center{transform:rotate(-2deg);z-index:3}
#app .daylight-entry{grid-area:entry;min-width:0;max-width:500px;align-self:start;position:relative;z-index:3}
#app .daylight-hero .home-form{grid-area:auto;align-self:auto;width:100%;max-width:none;margin:0;padding:20px 22px 18px;border:1px solid #d8dfcf;border-radius:16px;background:#fffef9f2;box-shadow:0 8px 28px #3a543c0b;text-align:left}
#app .daylight-hero .home-form label{font-size:12px;line-height:1.7;color:#66765f}
#app .daylight-hero .home-form textarea{min-height:58px;height:58px;max-height:110px;padding:9px 0 10px;font-size:16px;line-height:1.6;resize:none}
#app .daylight-hero .home-form .primary{height:48px;min-height:48px;font-size:14px;border-radius:9px}
#app .daylight-hero .entry-note{font-size:10px;line-height:1.6;margin-top:9px}
#app .daylight-hero .resume-link{display:block;width:max-content;max-width:100%;margin:12px 0 0;padding:2px 0;min-height:26px;font-size:11px}
#app .daylight-hero .hero-scroll{grid-area:auto;display:flex;width:max-content;max-width:100%;justify-self:auto;align-self:auto;margin:27px auto 0;min-height:24px;font-size:10px}
@media(min-width:960px) and (max-width:1199px){
 #app .daylight-hero{padding:44px 32px 22px}
 #app .daylight-hero-layout{column-gap:30px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 #app .daylight-hero-art{height:365px}
 #app .daylight-hero-card{width:155px;left:calc(50% - 77.5px);top:42px}
 #app .daylight-hero-card.hero-card-left{transform:translate(-96px,18px) rotate(-13deg)}
 #app .daylight-hero-card.hero-card-right{transform:translate(96px,18px) rotate(13deg)}
}
@media(max-width:959px){
 #app .daylight-hero,#app.mobile .daylight-hero{
  height:auto;min-height:0;padding:27px 20px 19px;text-align:center;
  background-image:linear-gradient(#fffdf568,#fffdf52e),var(--table-image);background-position:center 44%;
 }
 #app .daylight-hero-layout{max-width:450px;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;grid-template-areas:'intro' 'cards' 'entry';gap:0}
 #app .daylight-hero .daylight-intro{max-width:none;text-align:center}
 #app .daylight-hero .daylight-intro .eyebrow{font-size:9px;letter-spacing:.1em;line-height:1.5}
 #app .daylight-hero .daylight-intro h1{font-size:34px;line-height:1.24;letter-spacing:-1.1px;margin:12px 0 12px}
 #app .daylight-hero .daylight-intro p{font-size:12px;line-height:1.75}
 #app .daylight-hero-art{height:213px;width:100%;max-width:none;margin:16px 0 15px;overflow:visible}
 #app .daylight-hero-card{width:104px;left:calc(50% - 52px);top:10px;filter:drop-shadow(0 7px 10px #253d2a1c)}
 #app .daylight-hero-card.hero-card-left{transform:translate(-72px,14px) rotate(-13deg)}
 #app .daylight-hero-card.hero-card-right{transform:translate(72px,14px) rotate(13deg)}
 #app .daylight-hero-art:after{bottom:8px;height:20px}
 #app .daylight-entry{width:100%;max-width:none}
 #app .daylight-hero .home-form{padding:15px 16px 13px;border-radius:14px}
 #app .daylight-hero .home-form textarea{height:68px;min-height:68px;max-height:100px;font-size:16px;padding:8px 0}
 #app .daylight-hero .home-form .primary{height:47px;min-height:47px;font-size:13px}
 #app .daylight-hero .entry-note{font-size:9px;margin-top:8px}
 #app .daylight-hero .resume-link{margin:10px auto 0;font-size:10px;min-height:24px}
 #app .daylight-hero .hero-scroll{margin-top:15px;font-size:9px}
}
@media(max-width:759px) and (max-height:700px){
 #app.mobile .daylight-hero{padding-top:18px;padding-bottom:15px}
 #app.mobile .daylight-hero .daylight-intro h1{font-size:30px;line-height:1.2;margin:9px 0}
 #app.mobile .daylight-hero .daylight-intro p{font-size:12px;line-height:1.6}
 #app.mobile .daylight-hero-art{height:166px;margin-top:12px;margin-bottom:10px}
 #app.mobile .daylight-hero-card{width:86px;left:calc(50% - 43px);top:0}
 #app.mobile .daylight-hero-card.hero-card-left{transform:translate(-61px,10px) rotate(-12deg)}
 #app.mobile .daylight-hero-card.hero-card-right{transform:translate(61px,10px) rotate(12deg)}
 #app.mobile .daylight-hero .home-form{padding-top:13px;padding-bottom:11px}
 #app.mobile .daylight-hero .home-form textarea{height:68px;min-height:68px}
}
@media(orientation:landscape) and (max-height:520px){
 #app .deck-scene.card-focus-scene{grid-template-columns:230px minmax(0,1fr)}
}

/* Question confirmation */
.intake-options{display:grid;gap:7px;margin:10px 0 14px}
.intake-options .intake-choice{width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere}
.format-choices .intake-choice span,.format-choices .intake-choice small{display:block}
.format-choices .intake-choice small{margin-top:3px}
.confirmation .consultation-welcome{margin:0 0 10px}
