/* A photographic, warm-white layer. App geometry and keyboard handling stay in witny.css. */
:root{--paper:#fafaf7;--white:#fff;--ink:#243e34;--line:#e5e9e3;--soft:#edf1eb}
html,body{background:var(--paper)}
button,a,input,textarea,select,summary{touch-action:manipulation}
:focus-visible{outline:2px solid #cf532c;outline-offset:4px}
.eyebrow{font-size:9px;letter-spacing:.14em;color:#64776b}
.btn{border-radius:18px;min-height:48px}
.btn.primary{background:#284f40;color:#fff;box-shadow:0 6px 14px #284f4012}
.btn.soft{background:#edf1eb}
.topbar{margin-bottom:8px}
.icon-btn,.members-pill{background:#eef2ed}
.wordmark{letter-spacing:-1.1px}
.screen:not(.chat-screen){padding-left:22px;padding-right:22px}
.witny-greeting{margin:20px 0 22px;align-items:center;gap:8px}
.witny-greeting h1{font-size:27px;line-height:1.16;letter-spacing:-1px;margin:10px 0}
.witny-greeting h1 span,.memories-title span{color:#678473}
.witny-greeting .mascot-button{width:62px;min-width:62px}
.witny-greeting .witny-mark{width:62px;height:76px}
.witny-greeting .sub{font-size:12px}
.trip-cover{display:block;min-height:0;padding:146px 10px 10px;border-radius:28px;background:#d5ddd4;color:var(--ink);box-shadow:0 8px 28px #243e3410}
.trip-cover>img{height:100%;object-position:50% 40%}
.trip-cover:after{background:linear-gradient(180deg,#172e1a15,transparent 50%)}
.trip-countdown{top:14px;left:14px;right:auto;max-width:calc(100% - 78px);background:#ffffffed;color:var(--ink);border:1px solid #ffffff8a;padding:8px 11px;backdrop-filter:blur(12px);font-size:10px}
.trip-cover .cover-copy{padding:17px 17px 16px;border-radius:21px;background:#fffffffa;box-shadow:0 4px 20px #182f2310}
.trip-cover .cover-kicker{font-size:9px;letter-spacing:.13em;color:#69796b}
.trip-cover h2{font-size:24px;line-height:1.16;letter-spacing:-.7px;margin:7px 0 8px;color:#243e34}
.trip-cover p{font-size:12px;color:#5c6f63;line-height:1.55}
.trip-cover>button{position:absolute;top:12px;right:12px;width:40px;height:40px;min-width:40px;background:#fffffff0;color:var(--ink);display:grid;place-items:center}
.next-card{padding:20px;margin-top:18px;border-radius:24px;background:#fff;border-color:var(--line);box-shadow:none}
.next-card h2{font-size:21px;margin:10px 0 7px}
.next-card p{font-size:13px;line-height:1.5;color:#607164;margin-bottom:16px}
.next-card .eyebrow{color:#8c552d}
.readiness{margin-top:24px}
.home-shortcuts button{background:#fff;border:1px solid var(--line)}
.memory-teaser{background:#eef2eb;border-color:#e3e9df;border-radius:24px}
.memory-stamp{background:#fff;transform:rotate(-7deg);border-radius:13px}
/* A floating plate keeps all five labels and the existing composer clearance. */
.tabbar{background:linear-gradient(#fafaf700,var(--paper) 60%);border-top:0;backdrop-filter:none;-webkit-backdrop-filter:none;padding-left:17px;padding-right:17px;padding-top:5px;padding-bottom:calc(9px + var(--safe-bottom));border-radius:0}
.tabbar:before{content:"";position:absolute;inset:3px 12px calc(7px + var(--safe-bottom));border-radius:26px;background:#fffffff5;border:1px solid #e4e9e0;box-shadow:0 5px 24px #243e3412;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);pointer-events:none}
.tab{position:relative;z-index:1;gap:3px;color:#657469;font-size:10px;min-width:0}
.tab svg{width:29px;height:29px;padding:4px;border-radius:50%}
.tab.active{color:#284f40}
.tab.active:before{display:none}
.tab.active svg{background:#284f40;color:#fff;stroke-width:2}
.tab.active span{font-weight:800}
.composer{background:var(--paper)}
.composer-box{background:#fff;border-color:#dde5da}
.context-token,.ai .bubble{background:#eef3e9}
.app>.chat-header{background:var(--paper)}
/* Welcome: two photographic paper cards, followed by one clear next action. */
.welcome-screen{padding-top:calc(var(--safe-top) + 22px);padding-bottom:20px;flex:1;min-height:0}
.welcome-screen>.wordmark{font-size:27px;flex-shrink:0}
.welcome-collage{position:relative;min-height:225px;height:clamp(225px,31vh,280px);flex-shrink:0;margin:25px -7px 20px;isolation:isolate}
.photo-paper{position:absolute;background:#fff;border:1px solid #fff;padding:6px 6px 0;border-radius:19px;box-shadow:0 14px 28px #263b301b;overflow:hidden}
.photo-paper img{display:block;width:100%;object-fit:cover;border-radius:14px}
.photo-paper span{display:block;padding:10px 7px 12px;font-size:12px;font-weight:600;color:#3b4a40}
.photo-paper-back{width:49%;height:85%;top:5%;left:2%;transform:rotate(-12deg)}
.photo-window{height:calc(100% - 38px);overflow:hidden;border-radius:14px}
.photo-paper-back img{height:100%;object-position:100% 0;transform:scale(2.6);transform-origin:100% 0;filter:saturate(.8)}
.photo-paper-back span{text-align:right;font-size:10px}
.photo-paper-front{width:64%;height:94%;top:5%;right:0;transform:rotate(8deg);z-index:2}
.photo-paper-front img{height:calc(100% - 38px);object-position:26% 50%}
.collage-witny{position:absolute;left:0;bottom:-10px;z-index:3;transform:rotate(-12deg);filter:drop-shadow(0 5px 0 #ffffff)}
.collage-witny .witny-mark{width:66px;height:78px}
.welcome-hero{margin:0;padding:7px 0 0;text-align:center}
.welcome-hero .eyebrow{font-size:8px;letter-spacing:.12em}
.welcome-hero h1{font-size:34px;line-height:1.15;font-weight:600;letter-spacing:-1.4px;margin:13px 0}
.welcome-hero em{font:inherit;color:#64816d}
.welcome-hero p{font-size:13px;line-height:1.65;color:#5f7065;max-width:none;margin:0}
.welcome-pills{justify-content:center;gap:5px;margin:19px 0 0}
.welcome-pills span{background:#f0f3ed;border:0;padding:7px 9px;font-size:9px;color:#536a59}
.welcome-actions{position:relative;flex:none;bottom:auto;left:auto;right:auto;background:var(--paper);padding:14px 22px calc(20px + var(--safe-bottom));gap:8px}
.welcome-actions .btn{font-size:13px;min-height:49px}
.welcome-note{font-size:10px;line-height:1.5;color:#607164}
/* Invitation is a compact event cover; preference steps remain scrollable. */
.join-shell{padding:calc(var(--safe-top) + 20px) 22px calc(24px + var(--safe-bottom));gap:0}
.join-top{flex:none;margin-bottom:22px}
.join-photo{position:relative;height:190px;flex:none;overflow:hidden;border-radius:25px;margin-bottom:24px}
.join-photo img{width:100%;height:100%;object-fit:cover;object-position:center 40%}
.join-photo:after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 40%,#14271bb3)}
.join-photo-note{position:absolute;z-index:1;bottom:16px;left:17px;right:17px;color:white;font-size:12px;font-weight:600;line-height:1.5}
.join-copy{margin:0 0 20px}
.join-copy h1{font-size:32px;font-weight:600;line-height:1.15;letter-spacing:-1.1px;margin:12px 0}
.join-copy h1 em{color:#64816d;font-style:normal}
.join-copy p{font-size:13px;line-height:1.6;color:#607164;margin:0}
.invite-card{background:white;border:1px solid var(--line);border-radius:23px;padding:19px;color:var(--ink);box-shadow:none;margin:0 0 18px;flex-shrink:0}
.invite-card:after{display:none}
.invite-card h2{font:600 22px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.6px;color:var(--ink);margin:8px 0 12px;overflow-wrap:anywhere}
.invite-meta{color:#607164;font-size:11px;line-height:1.6;gap:7px 12px}
.invite-meta span{color:#536959;border:0;background:#f2f4ef;border-radius:9px;padding:5px 8px}
.join-actions{margin-top:auto;padding-top:8px}
.join-note{margin-top:12px;color:#607164}
.field input,.field select,.field textarea,.join-form input,.join-form textarea{background:#fff;border-color:#dfe5da}
/* Memories puts contributing before browsing, with large, uncropped media. */
.memories-heading{margin:25px 0 21px}
.memories-title{font-size:34px;line-height:1.1;font-weight:600;letter-spacing:-1.2px;margin:11px 0}
.memories-heading .sub{font-size:12px;line-height:1.6;margin:0}
.memory-add{margin:0 0 25px}
.memory-upload-label{position:relative;display:flex;align-items:center;justify-content:center;gap:9px;cursor:pointer;overflow:hidden;margin:0}
.memory-upload-label>svg:not(.witny-mark){width:19px;height:19px;flex:none}
.memory-file-input{position:absolute;width:1px;height:1px;opacity:0;clip-path:inset(50%);left:50%;bottom:0}
.memory-upload-label:focus-within{outline:2px solid #cf532c;outline-offset:4px}
.memory-progress{font-size:10px;line-height:1.5;margin:10px 2px 8px;color:#607164}
.memory-details{font-size:10px;color:#607164;line-height:1.5;margin:0 2px}
.memory-details summary{cursor:pointer;width:fit-content;text-decoration:underline;text-underline-offset:3px;padding:4px 0}
.memory-details p{font-size:10px;margin:6px 0}
.memory-summary{margin:0 0 15px;align-items:center}
.memory-summary strong{font-size:15px;font-weight:650}
.memory-summary span{font-size:11px;color:#607164}
.memory-filters{gap:5px;display:flex;flex-wrap:wrap;margin-bottom:18px}
.memory-filters button{font-size:11px;padding:9px 12px;min-height:38px;background:#f0f3ed;border:1px solid transparent;border-radius:20px;color:#4f6857}
.memory-filters button[aria-pressed=true]{background:#284f40;border-color:#284f40;color:#fff}
.memories-screen .memory-slide{height:300px;max-height:43vh;object-fit:contain;border-radius:25px;background:#eef1e9}
.memories-screen video.memory-slide{background:#203a30}
.memory-keep{background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px;text-align:left}
.memory-keep[aria-pressed=true]{background:#fff4ee;border-color:#efc4ad}
.memory-keep strong{font-size:12px}
.memory-keep small{font-size:10px;color:#607164}
.memory-grid{gap:9px}
.memory-grid button{border-radius:17px;padding:2px}
.memory-grid img{height:100px;border-radius:13px}
.memory-empty{background:#fff;border:1px solid var(--line);border-radius:27px;padding:35px 23px;margin-top:0}
.memory-empty h2{font-size:22px;line-height:1.2;letter-spacing:-.6px;font-weight:600}
.memory-empty p{font-size:13px;line-height:1.6;color:#607164}
.memory-empty .witny-mark{width:75px;height:85px;transform:rotate(-6deg)}
@media(min-width:760px){
 body{background:#e9ede6}
 .app-shell{border-color:#fff;box-shadow:0 20px 70px #273d311b}
 .welcome-collage{height:250px}
}
@media(max-height:740px){
 .welcome-collage{min-height:160px;height:190px;margin:15px -5px 14px}
 .welcome-hero h1{font-size:30px;margin:12px 0}
 .welcome-hero p{font-size:12px}
 .welcome-pills{margin-top:13px}
 .welcome-screen{padding-top:16px;padding-bottom:14px}
 .welcome-actions{padding-top:10px;padding-bottom:calc(15px + var(--safe-bottom))}
 .join-photo{height:150px;margin-bottom:18px}
 .join-stage-0 .join-copy h1{font-size:28px}
}
@media(max-width:359px){
 .screen:not(.chat-screen),.welcome-actions,.join-shell{padding-left:17px;padding-right:17px}
 .witny-greeting h1{font-size:23px}
 .witny-greeting .eyebrow{font-size:7px}
 .witny-greeting .mascot-button,.witny-greeting .witny-mark{width:51px;min-width:51px}
 .welcome-collage{min-height:150px;height:160px}
 .welcome-hero h1{font-size:27px}
 .welcome-hero .eyebrow{font-size:7px}
 .welcome-pills{gap:3px}
 .welcome-pills span{font-size:8px;padding:6px 8px}
 .tabbar{padding-left:13px;padding-right:13px}
 .tab{font-size:9px}
 .memory-filters button{padding:9px 10px;font-size:10px}
 .memory-summary strong{font-size:14px}
 .memory-summary span{font-size:10px}
}
@media(prefers-reduced-motion:reduce){.photo-paper,.collage-witny{animation:none}}
@media print{body,.app-shell{background:white;box-shadow:none}.tabbar:before{display:none}}

@media(max-height:620px){.welcome-pills{display:none}}
