@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');
:root{--ink:#29271f;--muted:#827d71;--paper:#fffaf2;--cream:#f7f0e4;--line:#eee5d8;--orange:#e96e3b;--orange-dark:#c94f25;--green:#55745b;--shadow:0 14px 40px rgba(73,49,22,.08)}
*{box-sizing:border-box}body{margin:0;background:#fffdf9;color:var(--ink);font-family:"DM Sans",Arial,sans-serif}button,input,textarea{font:inherit}button{cursor:pointer}.topbar{height:76px;padding:0 max(5vw,24px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:rgba(255,253,249,.94);position:sticky;top:0;z-index:10;backdrop-filter:blur(12px)}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-weight:800}.brand-mark{width:38px;height:38px;border-radius:13px;background:var(--orange);color:white;display:grid;place-items:center;font-size:13px;letter-spacing:-1px}.brand-name{font-size:15px;letter-spacing:-.6px}.brand-name span{color:var(--orange-dark)}.main-nav{display:flex;gap:7px}.nav-link,.category-tab{border:0;background:transparent;color:#777165;padding:10px 13px;border-radius:24px;font-weight:600;font-size:13px}.nav-link:hover,.nav-link.active{background:#fff0e7;color:var(--orange-dark)}.top-actions{display:flex;align-items:center;gap:13px}.icon-button{border:0;background:transparent;font-size:27px;color:#615b50}.profile-chip{display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:white;padding:6px 12px 6px 6px;border-radius:25px;font-size:12px;font-weight:700}.avatar{display:grid;place-items:center;border-radius:50%;background:#e9c5a5;color:#6d3d25;font-weight:800}.mini{width:27px;height:27px}.shell{max-width:1160px;margin:auto;padding:30px 28px 70px}.hero{min-height:365px;background:#f8efe1;border-radius:27px;display:grid;grid-template-columns:1.05fr .95fr;overflow:hidden;position:relative}.hero-copy{padding:54px 0 48px 58px;position:relative;z-index:1}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:800;color:#a16b4b;display:flex;align-items:center;gap:8px}.eyebrow-dot{width:7px;height:7px;border-radius:50%;background:var(--orange)}h1{font-size:52px;line-height:1.08;letter-spacing:-2.4px;margin:20px 0 14px;font-weight:800}h1 em{font-family:"Playfair Display",serif;color:var(--orange);font-weight:600}.hero-copy p{max-width:390px;color:#777064;line-height:1.7;font-size:14px}.hero-actions{display:flex;align-items:center;gap:20px;margin-top:26px}.primary-button{background:var(--orange);color:white;border:0;border-radius:25px;padding:13px 20px;font-weight:700;font-size:13px;box-shadow:0 8px 18px #e96e3b38}.primary-button:hover{background:var(--orange-dark)}.text-button{border:0;background:transparent;color:#615a4e;font-weight:700;font-size:12px}.text-button span{color:var(--orange);font-size:18px;margin-left:5px}.hero-art{position:relative;min-height:365px;background:radial-gradient(circle at 50% 45%,#f4d7b8 0 25%,transparent 26%),linear-gradient(135deg,#f4e2cb,#f8efe1)}.plate{position:absolute;border-radius:50%;background:#fffdf8;box-shadow:0 17px 32px #8f5c3422;display:grid;place-items:center}.plate-large{width:255px;height:255px;top:53px;left:23%;border:12px solid #fff}.plate-small{width:105px;height:105px;right:8%;bottom:33px;border:8px solid white;background:#f7e7d5}.rice{width:185px;height:185px;border-radius:50%;background:radial-gradient(ellipse at 35% 35%,#fff8d9 0 3px,transparent 4px),radial-gradient(ellipse at 60% 60%,#fff8d9 0 3px,transparent 4px),#e6c27e;position:absolute;opacity:.9}.food{position:absolute;border-radius:50%;background:#a94b2c;box-shadow:inset -4px -4px 0 #74351f}.food-a{width:56px;height:42px;top:65px;left:65px;transform:rotate(25deg)}.food-b{width:49px;height:39px;top:120px;left:120px;transform:rotate(-30deg);background:#c16a38}.food-c{width:45px;height:34px;top:83px;right:54px;transform:rotate(10deg);background:#b75a2e}.herb{position:absolute;width:10px;height:25px;background:#66834c;border-radius:100% 0 100% 0;z-index:2}.h1{top:45px;right:82px;transform:rotate(38deg)}.h2{bottom:54px;left:83px;transform:rotate(-45deg)}.side-food{width:64px;height:64px;border-radius:50%;background:radial-gradient(circle at 30% 35%,#d48b46 0 8px,transparent 9px),radial-gradient(circle at 70% 60%,#a9512e 0 11px,transparent 12px),#e7c18d}.art-sticker{position:absolute;z-index:2;background:#fffdf7;padding:9px 13px;border-radius:8px;font-size:9px;letter-spacing:1.1px;font-weight:800;box-shadow:var(--shadow);transform:rotate(-8deg)}.sticker-one{top:33px;right:12%}.sticker-two{bottom:36px;left:10%;background:#60795b;color:white;transform:rotate(7deg);line-height:1.5}.sparkle{position:absolute;color:#d98a4e;font-size:25px}.s1{top:75px;left:12%}.s2{right:8%;top:155px}.s3{left:20%;bottom:38px}.search-panel{margin-top:25px;padding:20px;background:white;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow)}.search-panel label{font-size:13px;font-weight:800}.search-field{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:9px 13px;margin-top:10px}.search-field span{font-size:23px;color:var(--orange)}.search-field input{border:0;outline:0;flex:1;min-width:0}.search-field button{border:0;background:transparent;color:var(--orange-dark);font-weight:700}.hint{font-size:11px;color:var(--muted);margin-bottom:0}.feed-heading{display:flex;justify-content:space-between;align-items:end;margin:48px 0 20px}.feed-heading h2{font-size:27px;letter-spacing:-1px;margin:8px 0 5px}.feed-heading p{font-size:12px;color:var(--muted);margin:0}.outline-button{border:1px solid #e8d9c8;background:white;color:#5e5549;border-radius:24px;padding:11px 16px;font-weight:700;font-size:12px}.outline-button:hover{border-color:var(--orange);color:var(--orange-dark)}.category-tabs{display:flex;gap:7px;overflow:auto;border-bottom:1px solid var(--line);padding-bottom:13px;margin-bottom:23px}.category-tab{white-space:nowrap}.category-tab.selected{background:#2f3d30;color:white}.category-tab span{opacity:.6;margin-left:5px}.feed-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:23px}.bite-card{border:1px solid var(--line);border-radius:17px;overflow:hidden;background:white;transition:transform .2s,box-shadow .2s;cursor:pointer}.bite-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}.bite-art{height:218px;position:relative;display:grid;place-items:center;overflow:hidden;background:#f4e7d5}.bite-art .dish{width:164px;height:164px;border-radius:50%;background:#fffdf8;border:10px solid white;box-shadow:0 12px 26px #71431c26;display:grid;place-items:center;position:relative}.dish:before{content:"";width:124px;height:124px;border-radius:50%;background:var(--dish,#d9a45f);box-shadow:inset 0 0 0 7px #ffffff55}.dish:after{content:"";position:absolute;width:78px;height:58px;border-radius:50%;background:var(--topping,#a94b2d);transform:rotate(-24deg);box-shadow:24px 28px 0 -12px #69834d,-22px -23px 0 -13px #69834d}.bite-art.pasta{background:#f2e5d4}.bite-art.pasta .dish:before{background:repeating-radial-gradient(ellipse,#e8bd69 0 4px,#fff0c6 5px 9px)}.bite-art.kebab{background:#e8e1d0}.bite-art.kebab .dish:before{background:#d6a36a}.bite-art.cake{background:#f5e1df}.bite-art.cake .dish:before{background:#f0c7b7}.bite-art.salad{background:#e7ecd9}.bite-art.salad .dish:before{background:radial-gradient(circle at 30% 35%,#8aab60 0 13px,transparent 14px),radial-gradient(circle at 65% 60%,#d85f48 0 12px,transparent 13px),#d4d9a3}.bite-art.soup{background:#f2e3c9}.bite-art.soup .dish:before{background:#c9783e}.bite-art.rice{background:#e8e0d4}.bite-art.rice .dish:before{background:#e4c98c}.bite-art.wrap{background:#efe3d4}.bite-art.wrap .dish:before{background:#d2a45d}.category-flyer{position:absolute;top:13px;left:13px;background:#fffdf5;color:#4e5140;padding:7px 10px;border-radius:20px;font-size:9px;font-weight:800;letter-spacing:.4px;box-shadow:0 3px 10px #0000000c}.bite-card-body{padding:15px 16px 13px}.bite-title{font-size:16px;margin:0 0 6px;letter-spacing:-.4px}.bite-description{font-size:11px;line-height:1.6;color:#777165;margin:0;min-height:35px}.bite-meta{display:flex;align-items:center;gap:7px;margin-top:13px;color:#999184;font-size:10px}.tiny-avatar{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#f0d7c0;color:#80563b;font-size:9px;font-weight:800}.bite-actions{border-top:1px solid #f3eee7;margin-top:13px;padding-top:10px;display:flex;align-items:center;gap:18px}.bite-action{border:0;background:transparent;color:#6d665b;font-size:11px;font-weight:700;padding:3px 0;display:flex;align-items:center;gap:5px}.bite-action:hover,.bite-action.active{color:var(--orange-dark)}.bite-action .symbol{font-size:17px}.more-button{margin-left:auto;border:0;background:transparent;font-size:20px;color:#80796d;line-height:1}.recipe-link{display:inline-block;margin-top:10px;color:#b75a31;font-size:10px;font-weight:800;text-decoration:none}.empty-state{grid-column:1/-1;padding:60px 20px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:18px}.profile-page{padding-top:30px}.profile-cover{display:flex;align-items:center;gap:22px;padding:30px;background:#f8efe1;border-radius:22px}.profile-avatar{width:92px;height:92px;border-radius:50%;background:#e8c4a4;border:5px solid white;display:grid;place-items:center;font-size:32px;font-weight:800;color:#80563b;flex-shrink:0}.profile-info{flex:1}.profile-name-line{display:flex;align-items:center;gap:8px}.profile-info h2{font-size:24px;margin:0}.verified-dot{background:#648268;color:white;border-radius:50%;font-size:10px;width:17px;height:17px;display:grid;place-items:center}.profile-info p{margin:6px 0;color:var(--muted);font-size:12px}.profile-info .profile-bio{color:#4f4a41;max-width:500px}.profile-stats{display:flex;gap:50px;padding:22px 25px;border-bottom:1px solid var(--line)}.profile-stats div{display:flex;gap:7px;align-items:baseline}.profile-stats strong{font-size:19px}.profile-stats span{font-size:11px;color:var(--muted)}.profile-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin-top:20px}.profile-tabs button{background:transparent;border:0;padding:14px 2px;color:#80796d;font-size:12px;font-weight:700}.profile-tabs button.active{color:var(--orange-dark);border-bottom:2px solid var(--orange)}.lock{font-size:10px}.profile-note{font-size:11px;color:var(--muted);margin:17px 0}.profile-grid{margin-top:15px}.footer{border-top:1px solid var(--line);padding:25px max(5vw,24px);display:flex;align-items:center;gap:18px;color:var(--muted);font-size:11px}.footer-brand{font-weight:800;color:var(--ink)}.footer button{margin-left:auto;border:0;background:transparent;color:var(--orange-dark);font-size:11px;font-weight:700}.modal-backdrop{position:fixed;inset:0;background:#211c16a8;z-index:30;display:grid;place-items:center;padding:20px;overflow:auto}.modal{background:#fffdf9;width:min(640px,100%);max-height:90vh;overflow:auto;border-radius:20px;padding:27px;position:relative;box-shadow:0 25px 80px #0004}.modal-close{position:absolute;right:17px;top:13px;border:0;background:transparent;font-size:27px;color:#746d62}.modal h2{margin:0 35px 8px 0;font-size:23px}.modal p{font-size:13px;line-height:1.7;color:#716b60}.modal .modal-art{height:250px;border-radius:15px;margin:18px 0;display:grid;place-items:center}.modal .modal-art .dish{width:190px;height:190px}.modal-category{display:inline-block;background:#edf1e8;color:#52684f;border-radius:20px;padding:7px 11px;font-size:10px;font-weight:800;margin:5px 0}.modal-section{padding:14px 0;border-top:1px solid var(--line)}.modal-section h3{font-size:13px;margin:0 0 7px}.modal-section p{margin:0}.modal-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.modal-actions button{border:1px solid var(--line);border-radius:20px;padding:10px 14px;background:white;font-size:11px;font-weight:700}.modal-actions .primary-button{background:var(--orange);color:white;border:0}.form-label{display:block;font-size:12px;font-weight:800;margin:15px 0 6px}.form-control{width:100%;border:1px solid var(--line);border-radius:11px;padding:11px 12px;background:white;outline-color:#e9a27f;font-size:12px}.form-control.textarea{min-height:85px;resize:vertical}.choice-row{display:flex;gap:8px;flex-wrap:wrap}.choice-row button{border:1px solid var(--line);background:white;border-radius:20px;padding:9px 13px;font-size:11px;font-weight:700}.choice-row button.selected{background:#2f3d30;color:white;border-color:#2f3d30}.warning-box{background:#fff3e9;border:1px solid #f4d6c2;border-radius:12px;padding:13px;color:#81533c;font-size:11px;line-height:1.6;margin:15px 0}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,20px);background:#2f3d30;color:white;padding:12px 18px;border-radius:30px;font-size:12px;opacity:0;pointer-events:none;transition:.25s;z-index:50}.toast.show{opacity:1;transform:translate(-50%,0)}.hidden{display:none!important}
@media(max-width:800px){.topbar{height:auto;min-height:66px;flex-wrap:wrap;padding:12px 18px;gap:10px}.main-nav{order:3;width:100%;justify-content:space-between;overflow:auto}.nav-link{padding:8px 10px}.top-actions{margin-left:auto}.shell{padding:20px 17px 50px}.hero{grid-template-columns:1fr;min-height:0}.hero-copy{padding:35px 27px 15px}.hero-copy h1{font-size:43px}.hero-art{min-height:260px}.plate-large{width:205px;height:205px;top:25px;left:calc(50% - 102px)}.rice{width:145px;height:145px}.plate-small{width:80px;height:80px;right:10%;bottom:15px}.feed-heading{margin-top:35px;align-items:start;gap:15px}.feed-heading h2{font-size:23px}.feed-heading p{max-width:240px;line-height:1.5}.feed-heading .outline-button{white-space:nowrap;padding:10px 12px}.feed-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.bite-art{height:170px}.bite-art .dish{width:130px;height:130px}.bite-art .dish:before{width:100px;height:100px}.bite-card-body{padding:12px}.bite-title{font-size:14px}.bite-description{font-size:10px}.bite-actions{gap:12px}.profile-cover{padding:20px;gap:14px;flex-wrap:wrap}.profile-avatar{width:70px;height:70px}.profile-info h2{font-size:19px}.edit-profile{margin-left:auto}.profile-stats{gap:24px;padding:18px 8px}.footer{flex-wrap:wrap}.footer button{margin-left:0}}
@media(max-width:480px){.brand-name{font-size:13px}.profile-chip span:last-child{display:none}.hero-copy h1{font-size:39px}.feed-grid{grid-template-columns:1fr}.bite-art{height:220px}.bite-art .dish{width:165px;height:165px}.bite-art .dish:before{width:125px;height:125px}.category-tabs{margin-right:-17px;padding-right:17px}.feed-heading{display:block}.feed-heading .outline-button{margin-top:15px}.profile-tabs{gap:15px}.profile-tabs button{font-size:11px}.modal{padding:22px 18px}.modal .modal-art{height:210px}}

/* V2: two-slide hero carousel */
.hero{display:block;min-height:365px}
.hero-slide{display:none;grid-template-columns:1.05fr .95fr;min-height:365px;height:100%}
.hero-slide.active{display:grid}
.hero-copy{min-width:0}
.hero-dots{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:4}
.hero-dot{width:8px;height:8px;border:0;border-radius:20px;background:#d7c4ad;padding:0}
.hero-dot.active{width:23px;background:var(--orange)}
.hero-message{background:#f8efe1}
.hero-message .hero-copy{padding-top:42px;padding-bottom:55px}
.hero-message h1{font-size:43px;max-width:470px}
.hero-long-message{max-width:430px!important;font-size:13px!important}
.hero-message-art{display:grid;place-items:center;background:radial-gradient(circle at center,#f3dfc8,#f8efe1)}
.message-art-card{width:min(280px,75%);aspect-ratio:1/1.05;background:#fffaf2;border:10px solid white;border-radius:48% 48% 42% 42%;box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;justify-content:center;transform:rotate(3deg);color:var(--green)}
.message-art-card span,.message-art-card small{font-size:10px;letter-spacing:2px;font-weight:800}
.message-art-card strong{font:700 48px/1 "Playfair Display",serif;text-align:center;color:var(--orange);margin:18px 0}
.hero-slide:not(.active){display:none}
/* V2: single Bite per row and photo-aware layouts */
.feed-grid{grid-template-columns:1fr;gap:20px}
.bite-card{display:grid;grid-template-columns:minmax(250px, .78fr) minmax(0,1.22fr);align-items:stretch;cursor:default}
.bite-card:hover{transform:none}
.bite-media{position:relative;min-height:260px;background:#f4e7d5;overflow:hidden}
.bite-media>.bite-art{height:100%;min-height:260px}
.bite-media .category-flyer{z-index:2}
.bite-card-body{padding:22px 25px;display:flex;flex-direction:column;justify-content:center}
.bite-description{min-height:0;font-size:12px}
.bite-photos{height:100%;min-height:260px;display:grid;gap:5px;background:#f4e7d5}
.bite-photos.one-photo{grid-template-columns:1fr}
.bite-photos.two-photos{grid-template-columns:1fr 1fr}
.bite-photos img{width:100%;height:100%;min-height:260px;object-fit:cover;display:block}
.bite-photos.two-photos img{min-width:0}
.inline-recipe{margin-top:12px;padding:14px 16px;border-radius:12px;background:#fbf5ec;border:1px solid var(--line);font-size:12px;line-height:1.75;color:#625b50;white-space:normal}
.recipe-toggle{border:0;background:transparent;padding:0;text-align:left;cursor:pointer}
.category-explanation{margin:10px 0 2px;padding:11px 13px;border-radius:10px;background:#f8f1e7;color:#6f6658;font-size:11px;line-height:1.6}
.account-menu-wrap{position:relative}
.account-menu{position:absolute;right:0;top:calc(100% + 10px);z-index:20;min-width:180px;padding:7px;background:#fffdf9;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}
.account-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:11px 12px;border-radius:8px;color:var(--ink);font-size:12px;font-weight:600}
.account-menu button:hover{background:#fff0e7;color:var(--orange-dark)}
.rules-nav{white-space:nowrap}
@media(max-width:800px){
 .hero-slide{grid-template-columns:1fr}
 .hero-slide .hero-copy{padding:32px 27px 18px}
 .hero-slide .hero-art{min-height:230px}
 .hero-message h1{font-size:38px}
 .hero-message-art{min-height:220px}
 .message-art-card{width:180px}
 .message-art-card strong{font-size:39px}
 .feed-grid{grid-template-columns:1fr}
 .bite-card{grid-template-columns:minmax(190px,.8fr) minmax(0,1.2fr)}
 .bite-media,.bite-media>.bite-art,.bite-photos,.bite-photos img{min-height:230px}
 .rules-nav{font-size:11px}
}
@media(max-width:560px){
 .bite-card{grid-template-columns:1fr}
 .bite-media,.bite-media>.bite-art,.bite-photos,.bite-photos img{min-height:220px;height:220px}
 .bite-card-body{padding:16px}
 .hero-slide .hero-copy{padding:29px 23px 17px}
 .hero-message h1{font-size:34px}
 .hero-message .hero-long-message{font-size:12px!important}
 .hero-message-art{min-height:200px}
 .main-nav{gap:2px}
 .rules-nav{padding:8px 7px;font-size:10px}
 .account-menu{right:0}
}

/* V3 profile, account and notification experience */
.notification-button{position:relative;font-size:22px;width:38px;height:38px;border-radius:50%;display:grid;place-items:center}
.notification-button:hover{background:#fff0e7;color:var(--orange-dark)}
.notification-dot{position:absolute;right:5px;top:5px;width:8px;height:8px;border-radius:50%;background:var(--orange);border:2px solid #fffdf9}
.profile-menu-wrap{position:relative;margin-left:auto}
.profile-more-button{width:39px;height:39px;border:1px solid #e7d9c8;border-radius:50%;background:#fffdf9;color:#665d50;font-size:25px;line-height:1}
.profile-options-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:25;width:205px;padding:7px;background:#fffdf9;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.profile-options-menu button{width:100%;display:block;text-align:left;border:0;background:transparent;padding:10px 12px;border-radius:8px;color:var(--ink);font-size:12px;font-weight:600}
.profile-options-menu button:hover{background:#fff0e7;color:var(--orange-dark)}
.profile-options-menu .logout-option{border-top:1px solid var(--line);border-radius:0 0 8px 8px;color:#b34d36;margin-top:4px;padding-top:13px}
.bite-author{display:flex;flex-direction:column;gap:2px;min-width:0}
.bite-author strong{font-size:11px;color:#625b50;font-weight:700}
.bite-author small,.username-inline{font-size:10px;color:#a0988b;font-weight:500}
.notifications-popover{position:fixed;right:max(5vw,20px);top:68px;z-index:40;width:min(390px,calc(100vw - 28px));max-height:min(590px,calc(100vh - 90px));overflow:auto;background:#fffdf9;border:1px solid var(--line);border-radius:17px;box-shadow:0 18px 55px #392b1c24;padding:12px}
.popover-heading{display:flex;align-items:center;justify-content:space-between;padding:4px 5px 10px;border-bottom:1px solid var(--line)}
.popover-heading strong{font-size:15px}.popover-heading button{border:0;background:transparent;font-size:23px;color:var(--muted)}
.notification-item{display:flex;align-items:flex-start;gap:11px;padding:13px 7px;border-bottom:1px solid #f1ebe2;min-width:0}
.notification-avatar{width:36px;height:36px;flex:0 0 36px;border-radius:50%;display:grid;place-items:center;background:#f0d7c0;color:#80563b;font-size:11px;font-weight:800}
.notification-avatar.follow{background:#e4ecdf;color:#55745b}.notification-avatar.comment{background:#f7e4d9;color:#a65c3b}.notification-avatar.system{background:#eee9df;color:#776b5a}.notification-avatar.yum{background:#f8e7d8;color:#c65b32}
.notification-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.notification-copy strong{font-size:11px;line-height:1.45;color:var(--ink)}
.notification-copy small{font-size:10px;line-height:1.5;color:var(--muted)}
.notification-copy em{font-size:9px;color:#a49b8d;font-style:normal}
.notification-unread{width:7px;height:7px;border-radius:50%;background:var(--orange);margin:6px 3px 0 0;flex:0 0 7px}
.show-all-notifications{width:100%;border:0;background:#fff4eb;color:var(--orange-dark);padding:12px;border-radius:10px;font-size:11px;font-weight:800;margin-top:10px}
.notifications-page{padding-top:28px;max-width:850px;margin:0 auto}
.notifications-heading{display:flex;justify-content:space-between;align-items:end;gap:18px;margin-bottom:22px}
.notifications-heading h2{font-size:29px;letter-spacing:-1px;margin:8px 0 5px}
.notifications-heading p{font-size:12px;color:var(--muted);margin:0;line-height:1.6}
.notifications-list{background:#fff;border:1px solid var(--line);border-radius:17px;overflow:hidden}
.notifications-list .notification-item{padding:17px 19px}
.notifications-list .notification-copy strong{font-size:12px}
.notifications-list .notification-copy small{font-size:11px}
.load-more-note{text-align:center;color:var(--muted);font-size:11px;padding:18px}
.settings-list{display:flex;flex-direction:column;margin-top:15px}
.settings-list button{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 4px;border:0;border-top:1px solid var(--line);background:transparent;text-align:left;color:var(--ink)}
.settings-list button span{display:flex;flex-direction:column;gap:4px}.settings-list button strong{font-size:12px}.settings-list button small{font-size:10px;color:var(--muted)}.settings-list button b{font-size:20px;color:var(--muted)}
/* Dark mode is an optional user preference; the original warm palette remains the default. */
body.dark-mode{--ink:#f2eadf;--muted:#b7aa99;--paper:#211f1b;--cream:#302b25;--line:#484035;--shadow:0 14px 40px rgba(0,0,0,.25);background:#1e1c19;color:var(--ink)}
body.dark-mode .topbar,body.dark-mode .notifications-popover,body.dark-mode .profile-options-menu,body.dark-mode .modal,body.dark-mode .search-panel,body.dark-mode .notifications-list,body.dark-mode .bite-card,body.dark-mode .profile-more-button{background:#292621;color:var(--ink);border-color:var(--line)}
body.dark-mode .profile-cover,body.dark-mode .hero,body.dark-mode .hero-message{background:#342d25}body.dark-mode .hero-art{background:linear-gradient(135deg,#3b3026,#342d25)}
body.dark-mode .bite-author strong,body.dark-mode .notification-copy strong,body.dark-mode .settings-list button,body.dark-mode .modal h2{color:var(--ink)}
body.dark-mode .notification-item,body.dark-mode .settings-list button{border-color:var(--line)}body.dark-mode .inline-recipe,body.dark-mode .category-explanation{background:#332d25;border-color:var(--line);color:#d4c7b6}
body.dark-mode .profile-options-menu button,body.dark-mode .account-menu button{color:var(--ink)}body.dark-mode .profile-options-menu button:hover{background:#3a3028}
body.dark-mode .outline-button,body.dark-mode .profile-chip{background:#292621;color:var(--ink);border-color:var(--line)}body.dark-mode .modal p{color:#c5b9a9}
@media(max-width:700px){.notifications-heading{align-items:flex-start;flex-direction:column}.notifications-heading .outline-button{align-self:flex-start}.notifications-popover{right:12px;top:62px}.profile-cover{position:relative;padding-right:65px}.profile-menu-wrap{position:absolute;right:17px;top:17px}.edit-profile{margin-left:0}}
@media(max-width:480px){.notification-button{width:32px;height:34px;font-size:20px}.top-actions{gap:6px}.profile-chip{padding:5px 8px 5px 5px}.profile-chip span:last-child{display:inline;font-size:10px}.notifications-heading h2{font-size:25px}.notifications-list .notification-item{padding:14px 12px}}


/* V3.1: Instagram-style Bite cards; fixed media area stays independent of recipe expansion. */
.bite-card{display:flex;flex-direction:column;cursor:default}
.bite-category-row{padding:12px 15px 0;min-height:36px}
.bite-category-row .category-flyer{position:static;display:inline-flex;box-shadow:none;border:1px solid var(--line);background:#f7f0e4;color:#5b574b}
.bite-photos{height:260px;min-height:260px;display:grid;gap:5px;background:#f4e7d5;overflow:hidden}
.bite-photos.one-photo{grid-template-columns:1fr}
.bite-photos.two-photos{grid-template-columns:1fr 1fr}
.bite-photos .photo-open{display:block;position:relative;width:100%;height:260px;min-width:0;min-height:0;padding:0;border:0;background:transparent;overflow:hidden}
.bite-photos .photo-open>img{display:block;width:100%;height:100%;min-height:0;object-fit:cover}
.bite-photos .photo-open>.bite-art{width:100%;height:100%;min-height:0}
.bite-photos .photo-open .dish{transform:scale(.92)}
.bite-card-body{flex:1}
.bite-description{font-size:12px;line-height:1.7}
.inline-recipe{font-size:13px;line-height:1.8}
.profile-info .profile-bio{font-size:13px;line-height:1.7}
.bite-author strong{font-size:12px}
.bite-author small,.username-inline{font-size:11px}
.image-only-backdrop{padding:18px}
.image-only-backdrop .modal{width:min(1100px,100%);max-height:94vh;padding:0;background:transparent;box-shadow:none;overflow:visible}
.image-only-backdrop .modal-close{z-index:3;right:10px;top:8px;width:38px;height:38px;border-radius:50%;background:#171411bb;color:#fff;font-size:27px}
.image-only-view{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-height:94vh}
.image-only-view .lightbox-photo{display:block;max-width:100%;max-height:90vh;object-fit:contain;border-radius:8px}
.image-only-view .lightbox-mock{width:min(850px,100%);max-height:90vh}
.image-only-view .bite-art{height:min(82vh,850px);width:100%;border-radius:8px}
.image-only-view .bite-art .dish{transform:scale(1.35)}
.image-only-view .lightbox-mock.hidden,.image-only-view .lightbox-photo[hidden]{display:none}
body.dark-mode .bite-title{color:#fff1df}
body.dark-mode .bite-description{color:#e0d5c7}
body.dark-mode .bite-author strong{color:#f5eadc}
body.dark-mode .bite-author small{color:#c8b9a7}
body.dark-mode .inline-recipe{color:#eee2d4;background:#383128}
body.dark-mode .profile-info .profile-bio{color:#e0d5c7}
body.dark-mode .bite-category-row .category-flyer{background:#393329;color:#f1e5d6;border-color:#5a4c3d}
@media(max-width:700px){.bite-photos,.bite-photos .photo-open{height:240px;min-height:240px}.image-only-view .bite-art{height:75vh}}
@media(max-width:480px){.bite-photos,.bite-photos .photo-open{height:230px;min-height:230px}.bite-category-row{padding:10px 12px 0}.bite-description{font-size:12px}.inline-recipe{font-size:13px}.profile-info .profile-bio{font-size:13px}}

/* V3.2 corrections: restore the profile's Instagram-like two-column photo grid. */
.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-items:stretch}
.profile-bite-tile{display:block;position:relative;width:100%;aspect-ratio:1/1;min-width:0;padding:0;border:0;border-radius:3px;overflow:hidden;background:#eee4d8;cursor:pointer}
.profile-tile-image,.profile-tile-image>.bite-art{display:block;width:100%;height:100%;min-height:0}
.profile-tile-image>img{display:block;width:100%;height:100%;object-fit:cover}
.profile-tile-image>.bite-art .dish{transform:scale(.9)}
.profile-bite-tile:hover{filter:brightness(.94)}
.multi-photo-indicator{position:absolute;right:10px;top:9px;width:25px;height:25px;border-radius:6px;background:#171411a8;color:#fff;display:grid;place-items:center;font-size:17px;font-weight:700}
/* Distinct, high-contrast category flyers. */
.bite-category-row .category-flyer{border:0;color:#fff;padding:7px 12px;text-shadow:0 1px 1px #0003}
.category-flyer.category-men,.modal-category.category-men{background:#2869b2;color:#fff;border-color:#2869b2}
.category-flyer.category-women,.modal-category.category-women{background:#c94f83;color:#fff;border-color:#c94f83}
.category-flyer.category-couples,.modal-category.category-couples{background:#7651a8;color:#fff;border-color:#7651a8}
.modal-category{color:#fff}
/* Full Bite detail can display both photos without changing profile thumbnail behavior. */
.bite-detail-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:16px 0}
.detail-photo{display:block;width:100%;height:220px;padding:0;border:0;border-radius:12px;overflow:hidden;background:transparent;cursor:pointer}
.detail-photo>img{width:100%;height:100%;object-fit:cover;display:block}
.detail-photo>.bite-art{height:100%;width:100%;border-radius:12px}
.single-detail-photo{margin:16px 0}
.lightbox-arrow{position:absolute;z-index:4;top:50%;transform:translateY(-50%);width:44px;height:54px;border:0;border-radius:12px;background:#171411b8;color:white;font-size:38px;line-height:1;display:grid;place-items:center;cursor:pointer}
.lightbox-prev{left:10px}.lightbox-next{right:10px}
.lightbox-arrow:hover{background:#171411e8}
.lightbox-count{text-align:center;color:#fff;font-size:12px;font-weight:700;margin-top:8px;text-shadow:0 1px 5px #000}
.image-only-backdrop .modal{position:relative}
@media(max-width:700px){.profile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.detail-photo{height:170px}.lightbox-arrow{width:38px;height:48px;font-size:33px}}

/* V4: comments and local prototype interactions */
.comments-subtitle{margin:5px 0 16px!important}
.comments-list{display:flex;flex-direction:column;gap:0;max-height:42vh;overflow:auto;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.comment-item{display:flex;gap:11px;padding:14px 2px;border-bottom:1px solid var(--line)}
.comment-item:last-child{border-bottom:0}
.comment-avatar{width:34px;height:34px;flex:0 0 34px;border-radius:50%;display:grid;place-items:center;background:#f2dfcc;color:#81563c;font-size:12px;font-weight:800}
.comment-content{min-width:0;flex:1}
.comment-content strong{font-size:12px;color:var(--ink)}
.comment-content strong small{font-size:10px;color:var(--muted);font-weight:500;margin-left:4px}
.comment-content p{margin:5px 0 3px;font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.comment-content time{font-size:10px;color:var(--muted)}
.comments-empty{padding:28px 10px;text-align:center;color:var(--muted);font-size:12px}
.comment-form{padding-top:12px}
.comment-form .textarea{min-height:78px}
.comment-form-footer{display:flex;align-items:center;justify-content:space-between;margin-top:9px}
.comment-form-footer small{color:var(--muted);font-size:10px}
.comment-form-footer .primary-button{border:0;border-radius:20px;padding:10px 16px;background:var(--orange);color:white;font-size:11px;font-weight:800;cursor:pointer}
.danger-action,.danger-button{color:#b33f35!important}
body.dark-mode .comment-content strong{color:#f5eadc}
body.dark-mode .comment-avatar{background:#4a382b;color:#f1d8c0}

/* V4.1: profile-feed navigation, dark-mode contrast and comment controls. */
body.dark-mode .bite-category-row .category-flyer.category-men,
body.dark-mode .modal-category.category-men{background:#2869b2!important;color:#fff!important;border-color:#2869b2!important}
body.dark-mode .bite-category-row .category-flyer.category-women,
body.dark-mode .modal-category.category-women{background:#c94f83!important;color:#fff!important;border-color:#c94f83!important}
body.dark-mode .bite-category-row .category-flyer.category-couples,
body.dark-mode .modal-category.category-couples{background:#7651a8!important;color:#fff!important;border-color:#7651a8!important}
body.dark-mode .art-sticker.sticker-one{background:#fffdf7!important;color:#40372e!important;border:1px solid #e8dccb}
.comment-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.comment-more{border:0;background:transparent;color:var(--muted);font-size:22px;line-height:1;padding:2px 7px;border-radius:8px}
.comment-more:hover{background:var(--cream);color:var(--ink)}
.comment-actions{display:flex;gap:15px;flex-wrap:wrap;margin-top:7px}
.comment-actions button{border:0;background:transparent;padding:2px 0;color:var(--muted);font-size:11px;font-weight:700}
.comment-actions button:hover{color:var(--orange-dark)}
body.dark-mode .comment-actions button,body.dark-mode .comment-more{color:#cbbdab}
body.dark-mode .comment-more:hover{background:#3a332b}
.profile-photo-edit{display:flex;align-items:center;gap:15px}
.profile-photo-edit .profile-avatar{width:58px;height:58px;font-size:22px}
.profile-scroll-feed{max-width:760px;margin:18px auto 0}
.profile-scroll-feed .bite-card{width:100%}
.profile-avatar img,.avatar img{width:100%;height:100%;display:block;object-fit:cover;border-radius:50%}
.profile-avatar.has-profile-photo,.avatar.has-profile-photo{overflow:hidden;padding:0}

/* V4.2 fixes: strong carousel sticker contrast and clear profile-tab selection. */
.art-sticker.sticker-one{background:#514538!important;color:#fff!important;border:1px solid #776653}
body.dark-mode .art-sticker.sticker-one{background:#514538!important;color:#fff!important;border-color:#776653}
.profile-tabs button{position:relative;border-bottom:2px solid transparent;margin-bottom:-1px}
.profile-tabs button.active{color:var(--orange-dark);border-bottom-color:var(--orange)}
body.dark-mode .profile-tabs button{color:#c5b9a9}
body.dark-mode .profile-tabs button.active{color:#ffad7f;border-bottom-color:#ffad7f}

/* V4.3 nested conversation and profile connection lists */
.comment-replies{margin:12px 0 4px 18px;padding-left:14px;border-left:2px solid var(--line,#e8e2d8)}
.comment-replies.replies-collapsed{display:none}
.comment-reply{margin-top:10px}
.reply-count-button,.cancel-reply{border:0;background:transparent;color:var(--accent,#b65b32);font:inherit;font-size:.84rem;font-weight:700;padding:5px 0;cursor:pointer}
.cancel-reply{margin:0 0 8px}
.cook-author-badge{display:inline-flex;align-items:center;margin-left:7px;padding:2px 7px;border-radius:999px;background:#e8f2e8;color:#28633a;font-size:.68rem;font-weight:800;vertical-align:middle}
.comment-edited{display:block;color:var(--muted,#888);font-size:.72rem;margin-top:2px}
.profile-stat-button{border:0;background:transparent;color:inherit;font:inherit;display:flex;flex-direction:column;align-items:center;cursor:pointer;padding:0}
.profile-stat-button strong{font-size:1.15rem}
.profile-stat-button span{font-size:.82rem;color:var(--muted,#777)}
.people-list{display:flex;flex-direction:column;gap:4px;max-height:55vh;overflow:auto}
.people-list-row{display:flex;align-items:center;gap:12px;padding:10px 2px;border-bottom:1px solid var(--line,#e8e2d8)}
.people-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--soft,#f2e9df);font-weight:800}
.people-identity{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}
.people-identity small,.people-list-note{color:var(--muted,#777);font-size:.82rem}
.people-follow-button{padding:7px 12px;min-height:34px}
.people-unfollow-button{font-size:.82rem}

/* V4.4: sticky feed selector, third carousel slide, and Savor controls */
.topbar{position:sticky;top:0;z-index:25}
.category-tabs{position:sticky;top:var(--feed-sticky-top,70px);z-index:24;background:var(--paper,#fffaf2);padding-top:12px;padding-bottom:12px;border-bottom:1px solid var(--line);box-shadow:0 7px 14px #00000009}
body.dark-mode .category-tabs{background:#211e1a;border-color:var(--line)}
.hero-memory-art{display:grid;place-items:center;background:radial-gradient(circle at 30% 30%,#f9d9a8,#df9b70 75%)}
.memory-art-card{width:min(78%,310px);padding:30px 24px;border-radius:22px;background:#fff9ed;box-shadow:14px 17px 0 #9e583f40;transform:rotate(-5deg);display:flex;flex-direction:column;gap:17px;color:#543d30}
.memory-art-card span,.memory-art-card small{font-size:11px;letter-spacing:2px;font-weight:800}
.memory-art-card strong{font-family:Georgia,serif;font-size:clamp(30px,4vw,48px);line-height:1.08}
body.dark-mode .memory-art-card{background:#342c26;color:#fff1dc}
.comment-liked{color:var(--orange-dark)!important;font-weight:800}
.bite-actions{flex-wrap:wrap;gap:10px 16px}
@media(max-width:800px){.category-tabs{top:var(--feed-sticky-top,105px)}}

/* V4.5: search modes, cook results and bio feedback */
.search-modes{display:flex;gap:8px;flex-wrap:wrap}.search-mode{border:1px solid var(--line);border-radius:24px;padding:9px 15px;background:transparent;color:var(--ink);font-size:12px;font-weight:800}.search-mode.active{background:#2f3d30;color:#fff;border-color:#2f3d30}.cook-search-results{display:grid;gap:8px;margin-top:16px;max-height:480px;overflow:auto}.cook-result{display:flex;align-items:center;gap:12px;width:100%;padding:11px;text-align:left;border:1px solid var(--line);border-radius:12px;background:transparent;color:var(--ink);cursor:pointer}.cook-result:hover{border-color:var(--orange)}.cook-result .people-identity{flex:1}.cook-result-arrow{font-size:11px;color:var(--muted)}.bio-counter{text-align:right;color:var(--muted);font-size:11px;margin-top:4px}.identity-change-notice{background:var(--cream,#faf4ec);border:1px solid var(--line);border-radius:10px;padding:10px;font-size:11px!important}.cook-preview-bites{display:grid;gap:8px}.cook-preview-bites button{padding:12px;border:1px solid var(--line);border-radius:10px;text-align:left;background:transparent;color:var(--ink)}body.dark-mode .search-mode.active{background:#637b5c;color:white}body.dark-mode .identity-change-notice{background:#343029}body.dark-mode .search-field input{background:transparent;color:var(--ink)}

/* V4.6 scoped additions */
.hero{position:relative;cursor:zoom-in}.hero-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:5;border:0;border-radius:50%;width:40px;height:40px;background:#fffdf0e8;color:#343127;font-size:30px;cursor:pointer;box-shadow:0 2px 10px #0003;opacity:0;transition:opacity .15s}.hero:hover .hero-arrow,.hero:focus-within .hero-arrow{opacity:1}.hero-prev{left:8px}.hero-next{right:8px}.hero-preview .hero-copy{padding:8px 0}.hero-preview .hero-art{min-height:180px;max-height:250px;overflow:hidden}.hero-preview-art{display:none}.hero-preview-nav{justify-content:space-between}.person-clickable,.people-profile-link{cursor:pointer}.people-profile-link{border:0;background:none;text-align:left;color:inherit}.other-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.search-panel:not(.hidden){position:fixed;top:calc(var(--feed-sticky-top,70px) + 10px);right:18px;width:min(450px,calc(100vw - 36px));max-height:75vh;overflow:auto;z-index:29;background:var(--paper,#fffaf2);border:1px solid var(--line);box-shadow:0 12px 45px #0003;border-radius:16px;padding:18px}.feed-heading{position:sticky;top:var(--feed-sticky-top,70px);z-index:24;background:var(--paper,#fffaf2);padding:12px 0 8px;margin-bottom:0}.category-tabs{top:calc(var(--feed-sticky-top,70px) + var(--feed-heading-height,90px));z-index:24}.feed-heading .eyebrow,.feed-heading p{display:none}.feed-heading h2{font-size:18px}.feed-heading .outline-button{margin:0}.feed-heading:has(+ .category-tabs.hidden){position:static}body.dark-mode .feed-heading,body.dark-mode .search-panel:not(.hidden){background:#211e1a}@media(max-width:650px){.hero-arrow{opacity:1;width:32px;height:32px}.feed-heading h2{font-size:15px}.feed-heading .outline-button{font-size:11px;padding:8px}.search-panel:not(.hidden){left:12px;right:12px;width:auto}}
/* V4.7: compact Facebook-style multi-image previews */
.bite-photos .photo-open{position:relative;overflow:hidden}
.photo-more-count{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.57);color:white;font-size:clamp(32px,5vw,55px);font-weight:750;pointer-events:none}
.profile-photo-count{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.75);color:white;padding:5px 9px;border-radius:8px;font-size:13px;font-weight:700;pointer-events:none}
.profile-tile-image{position:relative;display:block}
.lightbox-media{display:flex;align-items:center;justify-content:center;min-width:0;flex:1}
.lightbox-media .lightbox-photo{display:block;max-width:100%;max-height:86vh;object-fit:contain;-webkit-touch-callout:default;user-select:auto}
.lightbox-media img{-webkit-touch-callout:default}
.search-field #runSearch{background:var(--accent,#c96934);color:#fff;border-radius:8px;padding:7px 12px;cursor:pointer}
.other-profile-top{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.other-profile-top h2{margin:0}
.other-avatar-button{background:transparent;border:0;cursor:zoom-in;padding:0}
.other-avatar-button .people-avatar{width:78px;height:78px;font-size:29px}
.other-fullscreen{margin-left:auto}
.other-profile-stats{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:15px 0}
.other-profile-stats button{border:0;background:transparent;color:inherit;cursor:pointer;text-decoration:underline}
.other-profile-tabs{display:flex;gap:14px;border-bottom:1px solid var(--line);margin:18px 0 12px}
.other-profile-tabs button{padding:10px 14px;background:transparent;border:0;color:inherit;cursor:pointer}
.other-profile-tabs button.active{border-bottom:3px solid var(--accent,#c96934);font-weight:700}
.avatar-full-view{display:flex;justify-content:center;align-items:center;min-height:280px}
.avatar-full-view img{max-height:75vh;max-width:100%;object-fit:contain}
.avatar-full-view .expanded-avatar{width:min(70vw,350px);height:min(70vw,350px);font-size:120px}
.other-profile-fullscreen .modal{width:min(1250px,98vw);height:96vh;max-height:96vh}
@media(max-width:700px){.modal-backdrop:has(.other-profile) {padding:0}.modal-backdrop:has(.other-profile) .modal{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.other-fullscreen{display:none}.other-profile-top .people-avatar{width:62px;height:62px}.lightbox-media .lightbox-photo{max-height:78dvh}}

/* V4.8: independent modal back/close, compact tiles, persistent profile and trending controls */
.modal-back{position:absolute;left:17px;top:13px;border:0;background:transparent;font-size:25px;color:#746d62;cursor:pointer;z-index:3}
.modal-close{cursor:pointer;z-index:3}
.profile-bite-tile,.other-profile-grid .profile-bite-tile{aspect-ratio:2/1!important;height:auto!important;min-height:0!important}
.profile-bite-tile .profile-tile-image{height:100%!important;min-height:0!important}
.profile-bite-tile img,.profile-bite-tile .bite-art{height:100%!important;object-fit:cover}
.profile-page .profile-cover,.profile-page .profile-stats,.profile-page .profile-tabs{position:sticky;z-index:12;background:var(--paper,#fffaf2)}
.profile-page .profile-cover{top:var(--feed-sticky-top,70px)}
.profile-page .profile-stats{top:calc(var(--feed-sticky-top,70px) + var(--profile-cover-height,155px))}
.profile-page .profile-tabs{top:calc(var(--feed-sticky-top,70px) + var(--profile-cover-height,155px) + var(--profile-stats-height,65px))}
.other-profile-top,.other-profile-stats,.other-profile-tabs{position:sticky;z-index:3;background:var(--paper,#fffaf2)}
.other-profile-top{top:0;padding-top:16px}.other-profile-stats{top:95px}.other-profile-tabs{top:143px}
.feed-heading:has(+ .category-tabs.hidden){position:sticky;top:var(--feed-sticky-top,70px)}
.profile-scroll-feed .bite-card,.other-scroll-feed .bite-card{scroll-margin-top:100px}
.other-scroll-feed{display:grid;grid-template-columns:1fr;gap:18px;max-width:650px;margin:auto}
.other-feed-heading{position:sticky;top:0;z-index:4;background:var(--paper,#fffaf2);padding:12px 0}
body.dark-mode .profile-page .profile-cover,body.dark-mode .profile-page .profile-stats,body.dark-mode .profile-page .profile-tabs,body.dark-mode .other-profile-top,body.dark-mode .other-profile-stats,body.dark-mode .other-profile-tabs,body.dark-mode .other-feed-heading{background:#211e1a}
@media(max-width:700px){.profile-page .profile-cover{top:var(--feed-sticky-top,105px)}.profile-page .profile-stats{top:calc(var(--feed-sticky-top,105px) + var(--profile-cover-height,155px))}.profile-page .profile-tabs{top:calc(var(--feed-sticky-top,105px) + var(--profile-cover-height,155px) + var(--profile-stats-height,65px))}}

/* V4.9 targeted corrections */
/* Overlay navigation remains visible over sticky profile and comment headers. */
#modalBackdrop .modal-back,#modalBackdrop .modal-close{position:fixed!important;top:clamp(12px,3vh,25px)!important;z-index:10000!important;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#30271fe8!important;color:#fff!important;box-shadow:0 2px 12px #0005;line-height:1}
#modalBackdrop .modal-back{left:clamp(12px,3vw,36px)!important;right:auto!important}
#modalBackdrop .modal-close{right:clamp(12px,3vw,36px)!important;left:auto!important}
#modalBackdrop .modal-back.hidden{display:none!important}
#modalBackdrop .modal{padding-top:55px!important}
#modalBackdrop .other-profile-top,#modalBackdrop .other-feed-heading{z-index:4}
/* All profile thumbnail galleries: reduce the height by another 20%. */
.profile-bite-tile,.other-profile-grid .profile-bite-tile{aspect-ratio:2.5/1!important}
/* The profile menu must paint above every sticky profile section. */
.profile-page .profile-cover{z-index:60!important;overflow:visible!important}
.profile-page .profile-stats{z-index:13!important}
.profile-page .profile-tabs{z-index:12!important}
.profile-menu-wrap{z-index:80!important}
.profile-options-menu{z-index:90!important}

/* V4.10: modal navigation lives outside the scrolling dialog so it never scrolls
   under sticky profile names, comment titles or edit-profile content. */
#modalBackdrop{overflow:hidden!important}
#modalBackdrop>.modal{overflow-y:auto;overscroll-behavior:contain}
#modalBackdrop>.modal-back,#modalBackdrop>.modal-close{position:fixed!important;z-index:10001!important;top:max(12px,env(safe-area-inset-top))!important}
#modalBackdrop>.modal-back{left:max(12px,env(safe-area-inset-left))!important}
#modalBackdrop>.modal-close{right:max(12px,env(safe-area-inset-right))!important}
#modalBackdrop .other-profile-top,#modalBackdrop .other-feed-heading{padding-left:42px;padding-right:42px}
/* Menu is anchored to the viewport rather than clipped by sticky profile layers. */
.profile-options-menu:not(.hidden){position:fixed!important;left:auto!important;z-index:1000!important;max-height:calc(100dvh - 24px);overflow-y:auto}
.profile-page .profile-cover{isolation:auto}
/* Uniform 80%-height gallery tiles for Bites, Saved and Savor, including other cooks. */
.profile-grid .profile-bite-tile,.other-profile-grid .profile-bite-tile{aspect-ratio:2.5/1!important}

/* V4.11 — overlays must cover the sticky profile header, with controls
   anchored to the dialog rather than to the viewport edges. */
#modalBackdrop.modal-backdrop{z-index:2000!important}
#modalBackdrop>.modal-back,#modalBackdrop>.modal-close{
  position:absolute!important;
  top:calc(5vh + 12px)!important;
  z-index:2002!important;
  width:36px!important;height:36px!important;
  background:#30271fe8!important;color:#fff!important;
}
#modalBackdrop>.modal-back{
  left:calc(50% - min(320px, (100vw - 40px)/2) + 12px)!important;
  right:auto!important;
}
#modalBackdrop>.modal-close{
  right:calc(50% - min(320px, (100vw - 40px)/2) + 12px)!important;
  left:auto!important;
}
#modalBackdrop.other-profile-fullscreen>.modal-back,
#modalBackdrop.other-profile-fullscreen>.modal-close{top:calc(2vh + 12px)!important}
#modalBackdrop.other-profile-fullscreen>.modal-back{left:calc(1vw + 12px)!important}
#modalBackdrop.other-profile-fullscreen>.modal-close{right:calc(1vw + 12px)!important}
#modalBackdrop.image-only-backdrop>.modal-back,
#modalBackdrop.image-only-backdrop>.modal-close{top:calc(3vh + 12px)!important}
#modalBackdrop.image-only-backdrop>.modal-back{left:max(14px,calc(50% - min(550px, (100vw - 40px)/2) + 12px))!important}
#modalBackdrop.image-only-backdrop>.modal-close{right:max(14px,calc(50% - min(550px, (100vw - 40px)/2) + 12px))!important}
/* Keep the feed's own return action visible without altering the main profile. */
#profileFeedPage>.notifications-heading{
  position:sticky;top:var(--feed-sticky-top,76px);z-index:20;
  background:var(--paper,#fffdf9);padding:12px 0;
  border-bottom:1px solid var(--line);
}
body.dark-mode #profileFeedPage>.notifications-heading{background:#211e1a}
@media(max-width:700px){
  #modalBackdrop>.modal-back,#modalBackdrop>.modal-close{top:12px!important}
  #modalBackdrop>.modal-back{left:12px!important}
  #modalBackdrop>.modal-close{right:12px!important}
  #modalBackdrop.other-profile-fullscreen>.modal-back,#modalBackdrop.other-profile-fullscreen>.modal-close{top:12px!important}
}

/* V5: show complete Bite photographs without cropping their edges */
.bite-photos{height:auto!important;min-height:0!important;align-items:stretch;background:transparent}
.bite-photos .photo-open{height:auto!important;min-height:0!important;display:flex;align-items:center;justify-content:center;background:#f4e7d5}
.bite-photos .photo-open>img{height:auto!important;min-height:0!important;max-height:680px;width:100%;object-fit:contain!important}
.bite-photos.two-photos .photo-open>img{max-height:520px}
.bite-photos .photo-open>.bite-art{min-height:230px}
.profile-tile-image>img,.detail-photo>img,.bite-detail-gallery img{object-fit:contain!important;background:#f4e7d5}
/* Search and validation feedback must stay visible above dialogs */
.toast{z-index:4000!important}
.search-panel:not(.hidden){position:fixed}
.search-panel-close{position:absolute;right:12px;top:9px;border:0;background:transparent;color:inherit;font-size:25px;cursor:pointer;z-index:2}
.search-modes{padding-right:30px}
/* Editable photo selection */
.selected-photo-previews{display:grid;grid-template-columns:repeat(auto-fill,minmax(85px,1fr));gap:10px;margin-top:10px}
.selected-photo-tile{position:relative;aspect-ratio:1;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#f4e7d5}
.selected-photo-tile img{width:100%;height:100%;object-fit:contain}
.selected-photo-remove{position:absolute;right:3px;top:3px;border:0;border-radius:50%;background:#26211de8;color:white;width:26px;height:26px;font-size:19px;cursor:pointer}
.photo-crop-stage{touch-action:none;display:grid;place-items:center;background:#e6ddd0;border-radius:18px;min-height:290px;cursor:grab;margin-top:15px}
.photo-crop-circle{width:min(260px,75vw);height:min(260px,75vw);border-radius:50%;border:4px solid white;overflow:hidden;box-shadow:0 0 0 100vmax #0001}
.photo-crop-circle img{width:100%;height:100%;object-fit:cover;display:block}
.crop-controls{display:grid;gap:10px;margin:14px 0}.crop-controls label{display:grid;gap:4px;font-size:12px}.crop-controls input{width:100%}
#profilePage .profile-avatar{cursor:zoom-in}
body.dark-mode .selected-photo-tile,body.dark-mode .photo-crop-stage{background:#39352e}

/* V5.1: consistent, non-cropping feed photo frames. */
.bite-photos,.bite-photos.one-photo,.bite-photos.two-photos{height:320px!important;min-height:320px!important;max-height:320px!important;overflow:hidden;background:#f4e7d5}
.bite-photos .photo-open{height:320px!important;min-height:320px!important;max-height:320px!important;overflow:hidden;background:#f4e7d5}
.bite-photos .photo-open>img,.bite-photos.two-photos .photo-open>img{width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;object-position:center!important}
.bite-photos .photo-open>.bite-art{height:100%!important}
.upload-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;clip-path:inset(50%)}
.upload-choose-button{display:inline-flex;align-items:center;cursor:pointer;margin:8px 8px 8px 0}
.upload-file-count{font-size:12px;color:var(--muted)}
.profile-photo-edit .profile-avatar{overflow:hidden;border-radius:50%}
.profile-photo-edit .profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.avatar-full-view img{border-radius:50%}
@media(max-width:650px){.bite-photos,.bite-photos.one-photo,.bite-photos.two-photos,.bite-photos .photo-open{height:250px!important;min-height:250px!important;max-height:250px!important}}

/* V5.2 — readable, wrapping text across cards, profiles and all dialogs. */
.bite-description,.bite-title,.inline-recipe,.modal p,.modal h2,
.modal-section,.comment-content,.comment-content p,.profile-info,
.profile-info p,.profile-bio,.notification-copy,.notification-copy strong,
.notification-copy small,.people-identity,.other-profile,
.other-profile-top,.form-control,.form-control.textarea,
.bite-card-body,.bite-meta,.bite-author,.search-panel,
.notifications-popover,.notifications-list,.warning-box,.category-explanation{
  overflow-wrap:anywhere;word-break:normal;min-width:0;max-width:100%;
}
.bite-description,.modal p,.profile-bio{white-space:pre-wrap;}
.inline-recipe{white-space:pre-wrap;}
/* The global navigation must be above the sticky profile header so its
   notification popover cannot be covered by the profile identity panel. */
.topbar{z-index:100!important;}
.notifications-popover{z-index:110!important;}
/* Keep the upload control on the right on narrow screens as on desktop. */
@media(max-width:800px){
  .feed-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;}
  .feed-heading .outline-button{margin:0 0 0 auto;flex-shrink:0;}
  .feed-heading>div{min-width:0;}
}

/* V5.3: fill the uniform feed image frame without distorting aspect ratio.
   Portrait uploads crop horizontally/vertically within a consistent card,
   while the full original remains accessible in the photo viewer. */
.bite-photos .photo-open>img,.bite-photos.two-photos .photo-open>img{object-fit:cover!important}
/* Keep the opened cook-feed heading opaque and above all scrolling cards. */
#modalBackdrop .other-feed-heading{position:sticky!important;top:0!important;z-index:30!important;background:#fffdf9!important;isolation:isolate;box-shadow:0 1px 0 var(--line);}
#modalBackdrop .other-scroll-feed{position:relative;z-index:1;isolation:isolate}
body.dark-mode #modalBackdrop .other-feed-heading{background:#211e1a!important}

/* V5.4 — keep the same filled photo presentation on every profile surface. */
.profile-tile-image>img,.other-profile-grid .profile-tile-image>img,
.profile-grid .profile-tile-image>img{object-fit:cover!important;object-position:center!important;background:#f4e7d5}
.profile-grid .profile-tile-image,.other-profile-grid .profile-tile-image{overflow:hidden}
/* Removing the redundant Edit Profile button lets the compact identity panel
   and the followers row occupy less vertical space on phones. */
.profile-page .profile-cover{gap:12px}
.profile-page .profile-menu-wrap{margin-left:auto;align-self:center}
@media(max-width:700px){
 .profile-page{padding-top:10px}
 .profile-page .profile-cover{padding:12px 14px;gap:10px}
 .profile-page .profile-avatar{width:58px;height:58px;flex-shrink:0}
 .profile-page .profile-info h2{font-size:17px}
 .profile-page .profile-info p{margin:3px 0;font-size:11px}
 .profile-page .profile-stats{padding:10px 8px;gap:20px}
 .profile-page .profile-tabs{margin-top:5px}
 .profile-page .profile-tabs button{padding:9px 2px}
}
/* Sticky navigation must form one continuous opaque surface, so Bite cards
   never become visible in a gap between the top navigation and feed controls. */
.topbar{background:#fffdf9!important;isolation:isolate}
.feed-heading{background:#fffdf9!important;isolation:isolate;box-shadow:none}
.category-tabs{background:#fffdf9!important;isolation:isolate;margin-top:0!important}
body.dark-mode .topbar,body.dark-mode .feed-heading,body.dark-mode .category-tabs{background:#211e1a!important}
/* Prevent the scrollable cook feed from peeking above its sticky title. */
#modalBackdrop .other-feed-heading{background:#fffdf9!important;z-index:40!important;overflow:hidden}
#modalBackdrop .other-feed-heading::before{content:"";position:absolute;bottom:100%;left:0;right:0;height:120px;background:inherit;pointer-events:none}
#modalBackdrop .other-scroll-feed{z-index:0!important}
body.dark-mode #modalBackdrop .other-feed-heading{background:#211e1a!important}

/* V5.5 — contiguous, opaque sticky feed navigation on desktop and mobile. */
.feed-heading{padding-top:0!important;padding-bottom:0!important;margin-top:0!important;margin-bottom:0!important;box-shadow:0 -12px 0 #fffdf9!important}
.category-tabs{padding-top:0!important;margin-top:0!important;box-shadow:0 -3px 0 #fffdf9!important}
body.dark-mode .feed-heading,body.dark-mode .category-tabs{box-shadow:0 -12px 0 #211e1a!important}
/* Cover the strip immediately above a sticky cook-profile heading so cards
   cannot appear behind the name as they leave the scroll viewport. */
#modalBackdrop .other-feed-heading{z-index:60!important;box-shadow:0 -180px 0 0 #fffdf9,0 1px 0 var(--line)!important;isolation:isolate}
#modalBackdrop .other-feed-heading::before{height:180px!important}
body.dark-mode #modalBackdrop .other-feed-heading{box-shadow:0 -180px 0 0 #211e1a,0 1px 0 var(--line)!important}

/* V5.6: give the Home category selector breathing room without changing Trending. */
#feedHeading:not(:has(+ .category-tabs.hidden)) + #categoryTabs:not(.hidden){padding-top:5px!important;}

/* V5.7: Home-only category row clearance; keep the sticky surface opaque. */
#feedHeading:not(:has(+ .category-tabs.hidden)) + #categoryTabs:not(.hidden){padding-top:10px!important;box-shadow:0 -8px 0 #fffdf9!important;}
body.dark-mode #feedHeading:not(:has(+ .category-tabs.hidden)) + #categoryTabs:not(.hidden){box-shadow:0 -8px 0 #211e1a!important;}
