/* Phase 3 only: preserve the flag-off layout and karma tokens. */
.phase3{--header-height:68px;--bottom-height:82px;height:100dvh;overflow:hidden}
.phase3 button,.phase3 h1,.phase3 h2,.phase3 h3,.phase3 label,.phase3 .tag{overflow-wrap:normal;word-break:normal;hyphens:none}
.phase3>header{height:calc(var(--header-height) + var(--safe-top));padding:10px max(14px,var(--safe-right)) 10px max(14px,var(--safe-left));gap:8px}
.phase3 .brand{font-size:1.35rem;white-space:nowrap;flex-shrink:0;letter-spacing:-.045em}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:6px;min-width:0}
.header-actions button{padding:8px;font-size:.8rem;white-space:nowrap}
.header-actions .bell{position:relative;background:none;border:0;flex-shrink:0}
.badge{position:absolute;top:0;right:0;min-width:18px;border-radius:12px;background:var(--gold);color:var(--on-gold);padding:1px 4px;font-size:10px;line-height:16px}
.phase3 #nav{bottom:0;width:100%;max-width:var(--content-width);border-radius:0;border-width:1px 0 0;padding:8px max(8px,var(--safe-right)) calc(8px + var(--safe-bottom)) max(8px,var(--safe-left));gap:0;background:var(--bg);height:calc(var(--bottom-height) + var(--safe-bottom))}
.phase3 #nav button{font-size:11px;border-radius:10px;padding:6px 1px;gap:6px}
.phase3 #nav svg{flex-shrink:0}
.phase3 .nav-label{white-space:nowrap;line-height:18px;word-break:keep-all}
.phase3 #screen{overflow-x:hidden;height:calc(100dvh - var(--header-height) - var(--bottom-height) - var(--safe-top) - var(--safe-bottom) - var(--status-height,0px));overflow-y:auto;overscroll-behavior:contain;padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right));padding-bottom:24px;scrollbar-width:none}
.phase3 #screen[data-page=reels]{padding:0;min-height:0}
.phase3 h1{font-size:1.55rem;margin:20px 0 14px}
.phase3 h2{font-size:1.2rem}
.phase3 #screen[data-page=notifications] .section-heading{display:block}
.phase3 #screen[data-page=notifications] .section-heading .text-button{text-align:left;max-width:100%}
.phase3 .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.phase3 .card{min-height:210px}
.phase3 .card strong{font-size:.9rem;overflow-wrap:break-word}
.phase3 .chips button{flex:0 1 auto;font-size:.8rem;white-space:normal}
.segments{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:14px;background:var(--surface);margin:14px 0}
.segments button{flex:1;min-width:0;border:0;background:transparent;font-weight:650;font-size:.85rem;padding:10px 6px}
.segments button[aria-pressed=true]{background:var(--raised);color:var(--gold)}
.story-strip{display:flex;gap:14px;overflow-x:auto;overscroll-behavior-x:contain;padding:10px 2px 16px;scrollbar-width:none;max-width:100%}
.story-bubble{display:flex;flex-direction:column;gap:7px;flex:0 0 72px;width:72px;border:0;background:none;padding:0;font-size:.7rem;line-height:1.3;justify-content:flex-start}
.story-bubble>span:last-child{width:72px;white-space:normal;overflow-wrap:break-word}
.story-avatar{display:flex;align-items:center;justify-content:center;width:64px;height:64px;flex:0 0 64px;border-radius:50%;padding:3px;border:2px solid var(--line);overflow:hidden}
.story-avatar img,.story-avatar .initials{width:100%;height:100%;border-radius:50%;object-fit:cover;font-size:1.3rem}
.unseen{border-color:var(--gold)!important;box-shadow:0 0 0 2px var(--bg),0 0 0 3px var(--gold)}
.add-story{font-size:1.8rem;color:var(--gold);background:var(--surface)}
.community-card{display:flex;align-items:center;gap:10px;border:1px solid var(--line);padding:14px 10px;border-radius:14px;margin:10px 0;background:var(--surface);flex-wrap:wrap}
.community-icon{width:40px;height:40px;border-radius:50%;display:grid;place-content:center;color:var(--gold);background:rgba(236,208,139,.12);border:1px solid rgba(236,208,139,.35);font-size:17px;font-weight:900;flex-shrink:0}
.community-copy{flex:1;min-width:100px}
.community-copy h3{font-size:.95rem;margin:0 0 4px;overflow-wrap:break-word}
.community-copy p{font-size:.75rem;color:var(--muted);margin:0}
.community-card button{font-size:.8rem;padding:8px 12px}
.community-open{width:100%;text-align:left;font-weight:inherit;flex-wrap:nowrap}.community-open:active{background:var(--raised)}
.chevron{color:var(--muted);font-size:1.4rem;flex-shrink:0}
.group-head{display:flex;align-items:center;gap:10px;margin:14px 0 8px}.group-head h1{font-size:1.15rem;margin:0 0 4px;overflow-wrap:anywhere}.group-head p{margin:0;font-size:.78rem;color:var(--muted)}
.group-back{flex:0 0 40px;width:40px;height:40px;font-size:1.6rem;line-height:1;padding:0}
.group-stats{border:1px solid var(--line);border-radius:14px;background:var(--surface);padding:12px 14px;margin:8px 0 4px}
.group-stats summary{font-weight:700;cursor:pointer}.group-stats h3{font-size:.85rem;color:var(--gold);margin:14px 0 6px}
.facts{display:grid;grid-template-columns:minmax(0,auto) minmax(0,1fr);gap:8px 14px;margin:14px 0;font-size:.85rem}
.facts dt{color:var(--muted)}.facts dd{margin:0;overflow-wrap:anywhere}
.member-title{flex:1;min-width:0}.member-title h1{margin:0 0 4px;font-size:1.2rem;overflow-wrap:anywhere}.member-title p{margin:0}
.phase3 .grid:has(>p){display:block}
.member-badge{font-size:.75rem;color:var(--gold);padding:5px 8px;background:var(--raised);border-radius:20px}
.search-form{display:flex;align-items:center;gap:6px}
.search-form input{flex:1;width:0;margin:0;font-size:.85rem}
.search-form button{font-size:.8rem;padding:8px}
.club-status{text-align:center;background:radial-gradient(ellipse at top,color-mix(in srgb,var(--gold) 15%,var(--surface)),var(--surface));padding:24px 18px;border:1px solid var(--line);border-radius:18px;margin:12px 0 24px}
.club-emblem{font-size:38px;color:var(--gold)}
.club-status h2{margin:12px 0}.club-status h3{color:var(--gold)}
.profile-toolbar{display:flex;align-items:center;justify-content:space-between;font-weight:700}
.profile-toolbar button{border:0;background:none}
.profile-top{display:flex;align-items:center;gap:14px;padding:16px 0 4px}
.profile-avatar{display:block;width:84px;height:84px;flex:0 0 84px;border-radius:50%;overflow:hidden;border:2px solid var(--line);padding:3px}
.profile-avatar img,.profile-avatar .initials{width:100%;height:100%;object-fit:cover;border-radius:50%;font-size:1.8rem}
.profile-stats{display:flex;align-items:flex-start;justify-content:space-around;flex:1;min-width:0;gap:8px}
.profile-stats>div{display:flex;flex-direction:column;text-align:center;min-width:0;flex:1}
.profile-stats strong{font-size:1.15rem}.profile-stats span{font-size:.68rem;color:var(--muted);line-height:1.4}
.profile-head h1{margin:14px 0 4px;font-size:1.3rem}.profile-head p{margin:4px 0 10px}
.profile-actions{display:flex;gap:8px;margin:16px 0}.profile-actions button{flex:1;min-width:0;font-size:.8rem;padding:10px 8px}.profile-actions .icon-button{flex:0 0 44px}
.settings-list{border:1px solid var(--line);border-radius:16px;overflow:hidden;margin:20px 0;background:var(--surface)}
.settings-row{display:flex;justify-content:space-between;text-align:left;width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;padding:18px 16px;font-size:.9rem;gap:14px}
.settings-row:last-child{border:0}.settings-row>span{color:var(--muted)}
.phase3 .post-grid:has(>p){display:block}
.reels3-list{height:calc(100dvh - var(--header-height) - var(--bottom-height) - var(--safe-top) - var(--safe-bottom) - var(--status-height,0px));overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior:contain;scrollbar-width:none;background:#080808}
.reel3{position:relative;height:100%;min-height:300px;scroll-snap-align:start;scroll-snap-stop:always;overflow:hidden;isolation:isolate}
.reel-media{position:absolute;inset:0;overflow:hidden;cursor:pointer}
.reel-media>img,.reel-media>video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.reel-media .reel-backdrop{object-fit:cover;filter:blur(26px) brightness(.4);transform:scale(1.1);z-index:-1}
.reel3::after{content:'';position:absolute;inset:55% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.85));pointer-events:none;z-index:0}
.reel-copy{position:absolute;left:16px;right:82px;bottom:20px;z-index:1;font-size:.9rem;text-shadow:0 1px 3px #000}
.reel-copy strong{display:block;overflow-wrap:break-word}.reel-caption{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.82rem;line-height:1.4;margin:6px 0;white-space:pre-wrap}
.caption-more{min-height:32px;padding:0;background:transparent;border:0;border-radius:0;color:var(--gold);font-size:.75rem}
.reel-rail{position:absolute;right:10px;bottom:30px;display:flex;flex-direction:column;align-items:center;gap:16px;z-index:2;width:52px}
.reel-action{display:flex;flex-direction:column;gap:0;background:transparent;border:0;padding:0;min-width:44px;min-height:44px;color:white;text-shadow:0 1px 4px #000}
.reel-action>span{font-size:30px;line-height:34px}.reel-action small{color:white;font-size:12px}.reel-action[aria-pressed=true]{color:var(--gold)}
.reel-action svg{width:28px;height:32px}
.reel-avatar{width:44px;height:44px;padding:2px;min-height:44px;border-radius:50%;border:2px solid white;overflow:hidden;background:var(--surface)}
.reel-avatar img,.reel-avatar .initials{width:100%;height:100%;object-fit:cover;border-radius:50%;font-size:16px}
.reel-heart{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%) scale(0);color:var(--gold);font-size:96px;z-index:3;pointer-events:none}
.reel-heart.animate{animation:reel-heart .7s ease-out}.reel-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px;text-align:center}
@keyframes reel-heart{0%{transform:translate(-50%,-50%) scale(.3);opacity:0}30%{transform:translate(-50%,-50%) scale(1.1);opacity:1}80%{opacity:1}100%{transform:translate(-50%,-50%) scale(1);opacity:0}}
.phase3 dialog.reels-sheet{padding:0;width:100%;max-height:100dvh;height:100dvh;border:0;border-radius:0;overflow:hidden}
.reels-sheet>.toolbar{margin:0;padding:8px 14px;height:76px;top:0}.reels-sheet>.toolbar h2{margin:0}.reels-sheet .reels3-list{height:calc(100dvh - 76px)}
.story-viewer{width:100%;max-width:var(--content-width);height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:0;background:#080808;overflow:hidden;touch-action:none}
.story-progress{position:absolute;top:calc(12px + var(--safe-top));left:12px;right:12px;display:flex;gap:4px;z-index:3}
.story-segment{height:3px;flex:1;background:#ffffff50;border-radius:2px;overflow:hidden}.story-segment i{display:block;height:100%;background:var(--gold)}
.story-heading{position:absolute;top:calc(24px + var(--safe-top));left:12px;right:12px;display:flex;align-items:center;gap:10px;z-index:3}.story-heading strong{flex:1;font-size:.9rem;overflow-wrap:break-word}.story-heading .icon-button{flex-shrink:0}
.story-media{position:absolute;inset:90px 0 130px;touch-action:none}.story-media img,.story-media video{width:100%;height:100%;object-fit:contain}
.story-navigation{position:absolute;bottom:calc(64px + var(--safe-bottom));left:12px;right:12px;display:flex;justify-content:space-between;gap:12px}.story-step{width:44px;font-size:24px;padding:0}.story-pause{font-size:.8rem}
.story-footer{position:absolute;bottom:calc(12px + var(--safe-bottom));left:12px;right:12px;text-align:center}
.story-viewers{position:absolute;bottom:0;left:0;right:0;z-index:5;padding:20px 16px;background:var(--bg);border:1px solid var(--line);border-radius:20px 20px 0 0;max-height:65%;overflow:auto;touch-action:pan-y}
.viewer-row{display:flex;align-items:center;gap:12px;padding:10px 0}
@media(max-width:350px){.profile-top{gap:10px}.profile-avatar{width:64px;height:64px;flex-basis:64px}.profile-stats{gap:6px}.profile-stats span{font-size:.65rem}.phase3 .card{min-height:190px}.phase3 .brand{font-size:1.2rem}.header-actions .share-button{font-size:.75rem}.community-copy{min-width:80px}}
@media(prefers-reduced-motion:reduce){.reel-heart.animate{animation:none;transform:translate(-50%,-50%) scale(1);opacity:1}}
.scroll-chips{flex-wrap:nowrap;overflow-x:auto;max-width:none;scrollbar-width:none;-webkit-overflow-scrolling:touch;margin-inline:-18px;padding-inline:18px;scroll-padding-inline:18px}
.scroll-chips::-webkit-scrollbar{display:none}
/* Phase 3 screens have a 14px gutter: bleeding further makes the whole page drag sideways. */
.phase3 .scroll-chips{margin-inline:-14px;padding-inline:14px;scroll-padding-inline:14px}
.scroll-chips button,.phase3 .scroll-chips button{flex:0 0 auto;white-space:nowrap}
.member-list{display:flex;flex-direction:column;gap:2px}
.member-row{display:flex;align-items:center;gap:12px;width:100%;min-height:60px;padding:8px 6px;border:0;border-radius:12px;background:transparent;text-align:left}
.member-row:active,.member-row:hover{background:var(--surface)}
.member-avatar{flex:0 0 44px;width:44px;height:44px;border-radius:50%;overflow:hidden;background:var(--raised);display:flex;align-items:center;justify-content:center}
.member-avatar img,.member-avatar .initials{width:100%;height:100%;object-fit:cover;border-radius:50%;font-size:1.05rem}
.member-copy{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.member-copy strong{font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.member-copy small{font-size:.75rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.member-activity{flex:0 0 auto;font-size:.72rem;color:var(--muted);white-space:nowrap}
