/* Modern minimal mobile app layer. Phones only. Brand: #111 / #fff / #B8FF5A, Inter. */
@media(max-width:700px){
 :root{--tab-h:58px}
 html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
 body{animation:twb-in .18s ease-out both}
 @keyframes twb-in{from{opacity:.001}to{opacity:1}}
 .mobile-nav{display:none!important}
 .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:80;display:grid;grid-template-columns:repeat(5,1fr);padding:6px max(8px,var(--sar)) calc(6px + var(--sab)) max(8px,var(--sal));background:rgba(255,255,255,.88);-webkit-backdrop-filter:saturate(1.6) blur(18px);backdrop-filter:saturate(1.6) blur(18px);border-top:1px solid #e6e6e6}
 .tabbar a{min-height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#6b6b6b;font-size:12px;font-weight:600;letter-spacing:.01em;border-radius:14px;transition:transform .12s,color .12s}
 .tabbar a:active{transform:scale(.94)}
 .tabbar a[aria-current=page]{color:#111}
 .tabbar a[aria-current=page] svg{stroke-width:2.3}
 .tabbar a:after{content:"";width:18px;height:3px;border-radius:3px;background:transparent;margin-top:-1px}
 .tabbar a[aria-current=page]:after{background:#B8FF5A}
 .has-tabbar .app-header .account-access,.has-tabbar .folio-nav nav{display:none!important}
 .tabbar a.start{color:#111}
 .tabbar a.start svg{background:#B8FF5A;border-radius:50%;padding:5px;box-sizing:content-box;width:20px;height:20px;margin-top:-2px}
 .has-tabbar body,body:has(.tabbar){padding-bottom:calc(var(--tab-h) + var(--sab))}
 .has-tabbar .wizard-actions{bottom:calc(var(--tab-h) + var(--sab) + 10px)!important}
 /* touch comfort */
 a,button,summary,[role=button]{touch-action:manipulation}
 button:active,.btn:active,.cta:active{transform:scale(.98)}
 input,select,textarea{font-size:16px!important;min-height:48px;border-radius:14px}
 .btn,.cta,button.primary{min-height:48px}
 /* calmer rhythm */
 .app-header{backdrop-filter:saturate(1.6) blur(18px);-webkit-backdrop-filter:saturate(1.6) blur(18px)}
 h1{text-wrap:balance}
 p{text-wrap:pretty}
}
@media(prefers-reduced-motion:reduce){body{animation:none!important}.tabbar a{transition:none}}

/* ---- gesture layer ---- */
@media(max-width:700px){
 .has-deck body,body:has(.deck){overflow:hidden;height:100dvh;padding-bottom:0}
 .deck{position:fixed;left:0;right:0;top:calc(var(--deck-top,60px) + 44px);bottom:var(--deck-bottom,calc(var(--tab-h) + var(--sab)));display:flex!important;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:none;margin:0!important;padding:0!important;max-width:none!important;width:auto!important;background:#fff}
 .deck::-webkit-scrollbar{display:none}
 .deck-pane{flex:0 0 100%;width:100%;min-width:100%;scroll-snap-align:start;scroll-snap-stop:always;overflow-y:auto;overscroll-behavior-y:contain;overscroll-behavior-x:auto;min-height:0!important;height:100%!important;margin:0!important;padding:8px max(20px,var(--sar)) 28px max(20px,var(--sal))!important;box-sizing:border-box;border:0!important;animation:deck-in .35s ease both}
 @keyframes deck-in{from{opacity:.4}to{opacity:1}}
 .deck-pane .reveal{opacity:1!important;transform:none!important}
 .deck-pane h1{font-size:clamp(34px,10vw,44px)!important;line-height:1.02}
 .deck-pane h2{font-size:clamp(28px,8vw,34px)!important;line-height:1.08}
 .deck-pane blockquote{border-left:4px solid #B8FF5A;margin:18px 0;padding:4px 0 4px 14px;font-size:20px;font-weight:700;line-height:1.3}
 .story-page.deck .deck-pane{display:flex;flex-direction:column;justify-content:center}
 .story-page.deck .deck-pane p{font-size:17px;line-height:1.5}
 .deck-bar{position:fixed;left:0;right:0;top:var(--deck-top,60px);z-index:70;height:44px;padding:8px max(20px,var(--sar)) 0 max(20px,var(--sal));background:rgba(255,255,255,.92);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
 .deck-segs{display:flex;gap:3px}.deck-segs i{flex:1;height:3px;border-radius:3px;background:#e4e4e0;transition:background .25s}.deck-segs i.on{background:#111}
 .deck-meta{display:flex;justify-content:space-between;margin-top:7px;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#6b6b6b}
 .deck-meta b{font-weight:700;color:#111;max-width:70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .deck-hint{position:fixed;right:18px;bottom:calc(var(--tab-h) + var(--sab) + 16px);z-index:75;background:#111;color:#fff;font-size:13px;font-weight:700;padding:10px 16px;border-radius:999px;animation:nudge 1.1s ease-in-out infinite;transition:opacity .4s}
 .deck-hint.gone{opacity:0;pointer-events:none}
 @keyframes nudge{50%{transform:translateX(8px)}}
 .deck-pane .hero-copy,.deck-pane>div{max-width:100%}
 /* assistant bottom sheet */
 .has-sheet body{overflow:hidden;height:100dvh}
 .has-sheet .assistant-page{display:block;padding:0!important;min-height:0}
 .has-sheet .assistant-side{position:fixed;left:0;right:0;top:calc(var(--sat) + 64px);padding:20px 24px;z-index:1}
 .has-sheet .assistant-side h1{font-size:30px!important;line-height:1.05}
 .has-sheet .assistant-side .steps,.has-sheet .assistant-side .trust,.has-sheet .assistant-side>p:not(.overline){display:none}
 .has-sheet .wizard{position:fixed!important;left:0;right:0;bottom:0;top:auto!important;z-index:60;max-height:76dvh;overflow-y:auto;background:#fff;border-radius:26px 26px 0 0!important;box-shadow:0 -14px 50px rgba(0,0,0,.18);padding:6px 20px calc(18px + var(--sab))!important;margin:0!important;border:0!important;transition:max-height .3s cubic-bezier(.2,.8,.2,1);animation:sheet-up .45s cubic-bezier(.2,.8,.2,1) both}
 .has-sheet .wizard.min{max-height:150px;overflow:hidden}
 @keyframes sheet-up{from{transform:translateY(60%)}to{transform:none}}
 .sheet-grab{display:block;width:100%;height:26px;background:none;border:0;position:relative;min-height:26px!important}
 .sheet-grab:after{content:"";position:absolute;left:50%;top:10px;width:42px;height:5px;margin-left:-21px;border-radius:3px;background:#d4d4cf}
 .has-sheet .choice{min-height:64px;border-radius:18px;padding:14px 16px;text-align:left}
 .has-sheet .choice.selected{background:#B8FF5A;border-color:#111;transform:scale(.98)}
 .has-sheet .wizard-actions{position:static!important;margin-top:12px}
 .has-sheet .tabbar{display:none}
}
@media(max-width:700px){
 .has-sheet .wizard[data-step="0"] .choice small,.has-sheet .wizard[data-step="0"] .choice br{display:none}
 .has-sheet .wizard[data-step="0"] .choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}
 .has-sheet .wizard[data-step="0"] .choice{min-height:72px;font-weight:700}
 .has-sheet .wizard:not([data-step="3"]) .wizard-actions .next{display:none}
 .has-sheet .wizard-actions{position:static!important;inset:auto!important;background:none!important;box-shadow:none!important;padding:0!important}
}

@media(max-width:700px){.deck-flat{display:contents!important}.deck-pane.project-card{display:flex;flex-direction:column;justify-content:center}.deck-pane.project-card img{max-height:44dvh;object-fit:cover;border-radius:20px}.portal.deck{display:flex!important;grid-template-columns:none!important}.portal.deck>.card,.portal.deck .side-stack>.card{margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important}.deck-pane.card{padding-top:12px!important}}
@media(max-width:700px){.deck-bar.many .deck-segs{gap:0}.deck-bar.many .deck-segs i{border-radius:0}.portal.deck .portal-head{display:flex!important;flex-direction:column;justify-content:center}.portal.deck{padding:0!important}.portal.deck .deck-pane.card{margin:0!important}}

/* Work sheet: scroll is base, swipe only inside the sheet */
@media(max-width:700px){
 html.psheet-open body{overflow:hidden}
 .psheet{position:fixed;inset:0;z-index:120}
 .psheet-bg{position:absolute;inset:0;background:rgba(17,17,17,.45);opacity:0;transition:opacity .2s}
 .psheet.on .psheet-bg{opacity:1}
 .psheet-card{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:26px 26px 0 0;padding:0 0 calc(18px + var(--sab,0px));transform:translateY(100%);transition:transform .22s ease-out;max-height:88dvh;overflow:hidden}
 .psheet.on .psheet-card{transform:none}
 .psheet-grab{display:block;width:100%;height:28px;border:0;background:none;position:relative}
 .psheet-grab:after{content:"";position:absolute;left:50%;top:11px;width:42px;height:5px;margin-left:-21px;border-radius:3px;background:#d4d4cf}
 .psheet-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
 .psheet-track::-webkit-scrollbar{display:none}
 .psheet-slide{flex:0 0 100%;scroll-snap-align:center;padding:4px 22px 6px;display:flex;flex-direction:column;gap:10px}
 .psheet-slide img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:16px;background:#f1f1ed}
 .psheet-tag{font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#6b6b6b}
 .psheet-slide h2{margin:0;font-size:26px;line-height:1.12;letter-spacing:-.02em}
 .psheet-slide p{margin:0;font-size:16px;line-height:1.5;color:#444}
 .psheet-go{margin-top:6px;min-height:52px;display:flex;align-items:center;justify-content:center;border-radius:999px;background:#B8FF5A;color:#111;font-weight:800;font-size:16px}
 .psheet-dots{display:flex;justify-content:center;gap:6px;padding-top:10px;font-size:13px;color:#6b6b6b}
 .psheet-dots i{width:6px;height:6px;border-radius:50%;background:#d4d4cf}.psheet-dots i.on{background:#111}
}
@media(max-width:700px){
 .folio-controls{position:static!important;padding:12px 16px!important}
 #filters{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:8px;scrollbar-width:none;margin:0 -16px;padding:0 16px}
 #filters::-webkit-scrollbar{display:none}
 #filters button{flex:0 0 auto;white-space:nowrap;min-height:44px}
 #viewNote{display:none}
 
}

.wizard-actions{background:#fff;box-shadow:0 -14px 14px -2px #fff;padding-top:12px;bottom:0}
.type-fields{margin-bottom:22px}.tf-chips span{min-height:44px;display:inline-flex;align-items:center}
@media(max-width:700px){
 .as-deep .assistant-side{display:none}
 .as-deep .wizard{padding-bottom:0!important;top:calc(var(--sat) + 64px)!important;max-height:none;border-radius:22px 22px 0 0!important}
 .as-deep .wizard-actions{position:sticky!important;bottom:0!important;background:#fff!important;padding:12px 0 calc(8px + var(--sab))!important;margin-top:8px;border-top:1px solid #eee;display:flex;justify-content:space-between;z-index:2}
}
