@import url('https://fonts.googleapis.com/css2?family=Chicle&family=DM+Sans:wght@400;500;600;700;800&display=swap');
:root{--orange:#ff9800;--orange2:#ffab17;--gold:#ffc84a;--yellow:#ffd66f;--cream:#fff4d5;--cream2:#ffedbd;--paper:#fffaf0;--white:#fff;--ink:#2a241e;--muted:#746b61;--line:rgba(72,52,23,.14);--danger:#b83a2f;--ok:#79600a;--shadow:0 18px 45px rgba(101,68,10,.20);--nav-h:86px}
*{box-sizing:border-box}html{background:#1b1712}body{margin:0;background:#1b1712;color:var(--ink);font-family:'DM Sans',sans-serif;-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}.hidden{display:none!important}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.icon{width:1.35em;height:1.35em;fill:currentColor;display:inline-block;vertical-align:-.2em}.brand{font-family:'Chicle',cursive;color:#f07e00;letter-spacing:.035em;font-size:34px}.brand-xl{font-size:86px;color:white;line-height:.8;text-shadow:0 4px 0 rgba(122,63,0,.16)}.brand-button{border:0;background:transparent;padding:0}.btn{min-height:48px;border:0;border-radius:16px;padding:12px 18px;font-weight:800;font-size:16px;display:inline-flex;align-items:center;justify-content:center;gap:9px}.btn-dark{background:var(--ink);color:white}.btn-orange{background:var(--orange);color:white}.btn-yellow{background:var(--gold);color:var(--ink)}.btn-light{background:white;color:var(--ink)}.btn-outline{background:transparent;border:2px solid currentColor;color:inherit}.btn-danger{background:#fff0ed;color:var(--danger);border:1px solid rgba(184,58,47,.25)}.btn-ghost{background:transparent;border:1px solid var(--line)}.btn-small{min-height:38px;padding:8px 13px;font-size:13px;border-radius:13px}.auth-screen,.onboarding-screen{width:min(100%,520px);min-height:100dvh;margin:0 auto;background:var(--orange2);position:relative;overflow:hidden}.auth-photo{position:absolute;inset:0 0 43% 0}.auth-photo img{width:100%;height:100%;object-fit:cover}.auth-shade{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.05),rgba(0,0,0,.35))}.auth-wave{position:absolute;left:0;right:0;bottom:34%;width:100%;height:32%;z-index:2}.auth-content{position:absolute;z-index:3;left:28px;right:28px;bottom:max(32px,env(safe-area-inset-bottom));color:white;text-align:center}.auth-content h1{font-family:'Chicle';font-size:44px;line-height:1.05;margin:26px 0 10px;font-weight:400}.auth-content p{font-size:17px;line-height:1.5;margin:0 auto 26px;max-width:390px}.auth-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px}.auth-actions .btn{font-family:'Chicle';font-size:25px;letter-spacing:.03em}.onboarding-screen{display:flex;align-items:center;padding:34px 20px}.onboarding-waves{position:absolute;inset:0;overflow:hidden}.onboarding-waves svg{position:absolute;width:135%;height:44%;left:-12%;bottom:0}.onboarding-card{position:relative;z-index:2;width:100%;max-width:450px;margin:auto;background:rgba(255,248,224,.96);border-radius:30px;padding:28px 24px;box-shadow:var(--shadow);min-height:520px;display:flex;flex-direction:column;justify-content:center}.onboarding-card h1,.onboarding-card h2{font-family:'Chicle';font-weight:400;color:#ef8200;font-size:43px;line-height:1;margin:0 0 14px;text-align:center}.onboarding-card p{font-size:16px;line-height:1.55}.step-dots{display:flex;gap:6px;justify-content:center;margin-bottom:12px}.step-dots i{width:8px;height:8px;border-radius:50%;background:#e0c98c}.step-dots i.active{background:var(--orange)}.form-stack{display:grid;gap:14px}.form-stack label,.field{display:grid;gap:7px;font-size:14px;font-weight:700}.form-stack input,.form-stack textarea,.form-stack select,.field input,.field textarea,.field select,.search-input{width:100%;min-height:49px;border:1px solid var(--line);border-radius:15px;background:white;padding:12px 14px;font-size:16px;outline:none}.form-stack input:focus,.form-stack textarea:focus,.form-stack select:focus,.search-input:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(255,152,0,.15)}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.photo-upload{display:grid;place-items:center;gap:12px}.photo-preview{width:150px;height:150px;border-radius:25px;background:var(--cream2);overflow:hidden;display:grid;place-items:center}.photo-preview img{width:100%;height:100%;object-fit:cover}.icon-button,.round-action{border:0;background:white;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;box-shadow:0 4px 14px rgba(0,0,0,.08)}.icon-button svg,.round-action svg,.side-menu svg,.bottom-nav svg,.tab svg,.icon-tile svg,.mini-action svg{width:23px;height:23px;fill:currentColor}.onboarding-card>.icon-button{position:absolute;right:17px;top:17px}.app-shell{width:min(100%,1180px);min-height:100dvh;margin:auto;background:var(--paper);display:grid;grid-template-columns:0 1fr;position:relative}.app-main{min-width:0;min-height:100dvh;padding-bottom:var(--nav-h)}.top-header{height:86px;padding:17px 20px;display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:12px;position:sticky;top:0;z-index:30;background:rgba(255,250,240,.95);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)}.top-header .brand{text-align:center;font-size:34px}.header-actions{display:flex;gap:9px}.round-action{background:var(--orange);color:white}.side-menu{position:fixed;z-index:80;left:0;top:0;bottom:0;width:280px;background:#fff5d8;box-shadow:0 0 36px rgba(0,0,0,.22);padding:24px 16px;display:flex;flex-direction:column;gap:5px;transform:translateX(-110%);transition:.25s}.side-menu.open{transform:translateX(0)}.side-menu .brand{padding:0 12px 16px}.side-menu button{border:0;background:transparent;padding:12px;border-radius:14px;display:flex;align-items:center;gap:12px;font-weight:700;font-size:15px;text-align:left}.side-menu button:hover,.side-menu button.active{background:var(--gold)}.menu-separator{height:1px;background:var(--line);margin:10px 0}.page{display:none;padding:22px 18px 120px;animation:fade .2s ease}.page.active{display:block}@keyframes fade{from{opacity:0;transform:translateY(5px)}}.page-shell{max-width:1040px;margin:auto}.page-hero{display:flex;justify-content:space-between;align-items:end;gap:18px;margin-bottom:18px}.page-hero h1{font-family:'Chicle';font-weight:400;color:#ef8200;font-size:46px;line-height:.95;margin:4px 0}.page-hero p{font-size:16px;line-height:1.5;margin:8px 0 0;color:var(--muted);max-width:620px}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.17em;font-weight:800;color:#a15a00}.tabs{display:flex;gap:8px;overflow:auto;padding:3px 0 14px;scrollbar-width:none}.tab{border:1px solid var(--line);background:white;border-radius:999px;padding:10px 14px;font-weight:800;font-size:13px;white-space:nowrap;display:flex;align-items:center;gap:7px}.tab.active{background:var(--orange);color:white;border-color:var(--orange)}.summary-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:4px 0 20px}.summary-chip{border:0;background:var(--cream2);border-radius:18px;padding:14px;text-align:left}.summary-chip strong{font-family:'Chicle';font-size:31px;color:#ef8200;display:block;font-weight:400}.summary-chip span{font-size:12px;font-weight:700}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:14px;margin:24px 2px 12px}.section-heading h2{font-size:26px;margin:0}.section-heading p{font-size:13px;color:var(--muted);margin:4px 0 0}.card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.stack{display:grid;gap:14px}.activity-card,.group-card,.person-card,.goal-card,.profile-panel,.content-card{background:white;border-radius:24px;overflow:hidden;border:1px solid rgba(68,45,11,.08);box-shadow:0 8px 28px rgba(90,58,5,.08);position:relative}.activity-card{display:grid;grid-template-columns:180px 1fr;min-height:205px}.activity-image{position:relative;min-height:205px;overflow:hidden}.activity-image img,.group-cover img,.person-photo img{width:100%;height:100%;object-fit:cover;display:block}.activity-image .badge-overlay{position:absolute;left:12px;bottom:12px;background:var(--orange);color:white;padding:7px 10px;border-radius:999px;font-weight:800;font-size:12px}.activity-content{padding:17px;display:flex;flex-direction:column}.meta-row{display:flex;flex-wrap:wrap;gap:8px 13px;color:var(--muted);font-size:12px}.meta-row span{display:inline-flex;align-items:center;gap:5px}.activity-card h3,.group-card h3,.person-card h3,.goal-card h3{font-size:21px;line-height:1.2;margin:9px 0 7px}.activity-card p,.group-card p,.person-card p,.goal-card p{font-size:14px;line-height:1.5;color:#5d554d;margin:0}.chips{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.chip{background:var(--cream);border-radius:999px;padding:6px 9px;font-size:11px;font-weight:800}.chip.orange{background:var(--orange);color:white}.chip.outline{border:1px solid var(--orange);background:white;color:#be6700}.ambition-match{margin-top:auto;background:#fff2bd;border-radius:13px;padding:9px 10px;font-size:12px;font-weight:800;display:flex;gap:8px;align-items:center}.ambition-match svg{width:18px;height:18px;fill:#ef8a00;flex:0 0 auto}.card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.group-card,.person-card,.goal-card{padding-bottom:16px}.group-cover,.person-photo{height:170px;position:relative}.group-copy,.person-copy,.goal-copy{padding:15px 16px 0}.avatar-stack{display:flex;align-items:center;margin:10px 0}.avatar-stack img,.avatar-circle{width:38px;height:38px;border-radius:50%;object-fit:cover;border:3px solid white;margin-right:-10px;background:var(--gold)}.avatar-stack span{margin-left:15px;font-size:12px;font-weight:800}.person-card{display:grid;grid-template-columns:115px 1fr;padding:0;min-height:165px}.person-photo{height:auto;min-height:165px}.person-copy{padding:15px}.goal-card{padding:18px}.goal-progress{height:8px;background:#f2e2b8;border-radius:999px;overflow:hidden;margin:14px 0}.goal-progress span{display:block;height:100%;background:var(--orange)}.topical-card{border-radius:30px;min-height:355px;position:relative;overflow:hidden;color:white;box-shadow:var(--shadow);margin-bottom:22px}.topical-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.topical-card:after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(35,21,6,.78),rgba(35,21,6,.12) 70%)}.topical-copy{position:absolute;z-index:2;left:24px;right:24px;bottom:62px}.topical-copy h2{font-family:'Chicle';font-weight:400;font-size:52px;line-height:.9;margin:8px 0 12px}.topical-copy p{font-size:17px;line-height:1.45;max-width:590px;margin:0 0 14px}.wave-bottom{position:absolute;z-index:3;left:-4%;bottom:-1px;width:108%;height:54px}.search-panel{background:var(--cream2);border-radius:24px;padding:16px;margin-bottom:18px}.search-bar{display:flex;gap:9px}.search-bar .search-input{flex:1}.search-bar .btn{width:auto}.filter-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.filter-button{border:1px solid var(--line);background:white;border-radius:13px;padding:10px 12px;font-size:13px;font-weight:800;display:flex;align-items:center;gap:7px}.filter-button.active{background:var(--orange);color:white;border-color:var(--orange)}.availability-banner{background:linear-gradient(145deg,var(--cream2),#ffe09a);border-radius:23px;padding:16px;display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:13px;margin-bottom:18px}.availability-banner .icon-wrap{width:48px;height:48px;background:var(--orange);color:white;border-radius:16px;display:grid;place-items:center}.availability-banner svg{width:27px;height:27px;fill:currentColor}.availability-banner strong{display:block;font-size:15px}.availability-banner small{font-size:12px;color:var(--muted)}.bottom-nav{position:fixed;z-index:50;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,1180px);height:var(--nav-h);padding:8px 8px max(12px,env(safe-area-inset-bottom));background:#ffc53e;border-top:1px solid rgba(95,58,0,.12);display:grid;grid-template-columns:repeat(5,1fr);box-shadow:0 -10px 26px rgba(87,55,3,.13)}.bottom-nav button{border:0;background:transparent;color:#5d3d08;border-radius:16px;display:grid;place-items:center;align-content:center;gap:4px;font-weight:800;min-width:0}.bottom-nav button svg{width:27px;height:27px}.bottom-nav button span{font-size:11px}.bottom-nav button.active{background:white;color:#d56f00;box-shadow:0 5px 15px rgba(105,65,3,.12)}.profile-hero{position:relative;border-radius:0 0 30px 30px;background:var(--gold);margin:-22px -18px 20px;overflow:hidden;padding-bottom:24px}.profile-photo{height:360px;position:relative}.profile-photo img{width:100%;height:100%;object-fit:cover}.profile-wave{position:absolute;left:-3%;bottom:-2px;width:106%;height:105px}.profile-info{position:relative;margin-top:-4px;padding:0 24px}.profile-info h1{font-family:'Chicle';font-size:48px;font-weight:400;margin:5px 0 0}.profile-info .location{font-weight:800;color:white;font-size:18px}.profile-bio{background:var(--cream);border-radius:18px;padding:16px;font-size:16px;line-height:1.55;margin:16px 0}.profile-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.profile-buttons button{background:var(--orange);color:white;border:0;border-radius:16px;padding:15px 8px;font-size:13px;font-weight:800}.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.profile-stat{background:var(--cream2);border-radius:19px;padding:16px;text-align:center}.profile-stat strong{display:block;font-family:'Chicle';font-size:38px;color:var(--orange);font-weight:400}.profile-stat span{font-size:12px}.reward-wallet{background:linear-gradient(135deg,#ff9c00,#ffc33e);color:white;border-radius:25px;padding:22px}.reward-wallet strong{font-family:'Chicle';font-size:48px;font-weight:400}.reward-wallet p{font-size:14px;line-height:1.45}.settings-list{background:white;border-radius:22px;overflow:hidden}.settings-list button{width:100%;border:0;background:white;padding:16px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);font-size:15px;font-weight:700}.settings-list button:last-child{border-bottom:0}.icon-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.icon-tile{border:1px solid var(--line);background:white;border-radius:18px;padding:14px 8px;display:grid;place-items:center;gap:8px;min-height:104px;font-size:12px;font-weight:800;text-align:center}.icon-tile svg{width:36px;height:36px;color:var(--orange)}.icon-tile.active{border-color:var(--orange);background:#fff4cf}.category-picker{display:flex;gap:7px;flex-wrap:wrap}.category-option{position:relative}.category-option input{position:absolute;opacity:0;pointer-events:none}.category-option span{display:block;border:1px solid var(--line);background:white;border-radius:999px;padding:9px 12px;font-size:12px;font-weight:800}.category-option input:checked+span{background:var(--orange);color:white;border-color:var(--orange)}.image-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.image-choice{border:3px solid transparent;border-radius:14px;overflow:hidden;height:100px;padding:0;background:#eee}.image-choice img{width:100%;height:100%;object-fit:cover}.image-choice.active{border-color:var(--orange)}.main-dialog,.admin-dialog{width:min(calc(100% - 18px),720px);max-height:92dvh;border:0;border-radius:30px;padding:0;background:var(--paper);color:var(--ink);box-shadow:var(--shadow);overflow:auto}.admin-dialog{width:min(calc(100% - 18px),1080px)}.main-dialog::backdrop,.admin-dialog::backdrop{background:rgba(27,19,8,.66);backdrop-filter:blur(6px)}.dialog-close{position:sticky;float:right;top:14px;right:14px;z-index:9;border:0;width:44px;height:44px;border-radius:50%;background:white;box-shadow:0 4px 14px rgba(0,0,0,.14);display:grid;place-items:center;margin:14px}.dialog-close svg{width:22px;height:22px}.dialog-inner{padding:24px;clear:both}.dialog-inner h1,.dialog-inner h2{font-family:'Chicle';font-size:42px;line-height:1;font-weight:400;color:#ee8100;margin:0 0 14px}.detail-hero{height:360px;position:relative;margin:-82px 0 0}.detail-hero img{width:100%;height:100%;object-fit:cover}.detail-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(32,21,9,.82),transparent 65%)}.detail-hero-copy{position:absolute;z-index:2;left:24px;right:70px;bottom:26px;color:white}.detail-hero-copy h1{color:white;font-size:46px;margin:6px 0}.detail-section{padding:18px 24px;border-bottom:1px solid var(--line)}.detail-section:last-child{border-bottom:0}.detail-section h3{font-size:20px;margin:0 0 10px}.detail-section p{font-size:16px;line-height:1.58}.organizer-card{background:var(--cream2);border-radius:18px;padding:13px;display:grid;grid-template-columns:50px 1fr auto;gap:12px;align-items:center}.organizer-card img{width:50px;height:50px;border-radius:50%;object-fit:cover}.updates{display:grid;gap:9px}.update{background:white;border-radius:15px;padding:13px;border:1px solid var(--line)}.update small{color:var(--muted)}.review-hero{background:var(--cream2);border-radius:24px;padding:20px;text-align:center}.review-hero img{width:100%;height:190px;object-fit:cover;border-radius:18px}.rating-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.admin-shell{padding:20px}.admin-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.admin-header h1{font-family:'Chicle';font-size:48px;color:#ef8100;font-weight:400;margin:0}.admin-tabs{display:flex;gap:8px;overflow:auto;margin-bottom:16px}.admin-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.admin-stat{background:var(--cream2);border-radius:18px;padding:16px}.admin-stat strong{font-family:'Chicle';font-size:34px;color:var(--orange);display:block;font-weight:400}.admin-table{width:100%;border-collapse:separate;border-spacing:0 8px}.admin-table th{text-align:left;font-size:11px;color:var(--muted);padding:6px}.admin-table td{background:white;padding:11px;font-size:13px}.admin-table td:first-child{border-radius:13px 0 0 13px}.admin-table td:last-child{border-radius:0 13px 13px 0}.status{display:inline-block;padding:6px 8px;border-radius:999px;background:var(--cream);font-size:11px;font-weight:800}.status.danger{background:#ffe5e0;color:var(--danger)}.status.ok{background:#ffefad;color:#755400}.qr-card{background:white;border-radius:22px;padding:18px;text-align:center}.qr-visual{width:220px;height:220px;margin:auto;background:repeating-conic-gradient(#211a11 0 25%,white 0 50%) 0/24px 24px;border:14px solid white;box-shadow:0 4px 18px rgba(0,0,0,.12);position:relative}.qr-logo{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:70px;height:70px;border-radius:18px;background:var(--orange);color:white;font-family:'Chicle';font-size:29px;display:grid;place-items:center;border:8px solid white}.message-thread{display:grid;gap:9px}.message{max-width:82%;padding:11px 13px;border-radius:16px;background:white;font-size:14px}.message.own{margin-left:auto;background:var(--gold)}#toast{position:fixed;z-index:200;left:50%;bottom:105px;transform:translate(-50%,20px);width:min(calc(100% - 30px),460px);padding:14px 16px;background:var(--ink);color:white;border-radius:15px;text-align:center;font-size:14px;font-weight:700;opacity:0;pointer-events:none;transition:.25s}#toast.show{opacity:1;transform:translate(-50%,0)}.empty-state{background:var(--cream2);border-radius:22px;padding:26px;text-align:center}.empty-state h3{font-family:'Chicle';font-size:33px;color:#ef8100;font-weight:400;margin:0}.empty-state p{font-size:14px;color:var(--muted)}.muted{color:var(--muted)}.danger-text{color:var(--danger)}.inline-note{background:var(--cream2);border-radius:15px;padding:12px 14px;font-size:13px;line-height:1.5}.moderator-only{border-left:4px solid var(--orange)}
@media(max-width:760px){.summary-strip{grid-template-columns:repeat(2,1fr)}.card-grid{grid-template-columns:1fr}.activity-card{display:block}.activity-image{height:235px;min-height:0}.activity-content{padding:16px}.activity-card h3{font-size:22px}.person-card{grid-template-columns:105px 1fr}.topical-copy h2{font-size:47px}.profile-photo{height:330px}.admin-grid{grid-template-columns:repeat(2,1fr)}.admin-table{display:block;overflow:auto}.page-hero h1{font-size:42px}.page{padding-left:14px;padding-right:14px}.profile-hero{margin-left:-14px;margin-right:-14px}.dialog-inner{padding:20px}.detail-section{padding:17px 20px}}
@media(min-width:900px){.app-shell{grid-template-columns:250px 1fr}.side-menu{position:sticky;top:0;transform:none;width:250px;height:100dvh;box-shadow:none;border-right:1px solid var(--line);z-index:10}.app-main{padding-bottom:20px}.bottom-nav{display:none}.top-header #drawerOpen{display:none}.top-header{grid-template-columns:1fr auto}.top-header .brand{text-align:left}.page{padding-bottom:40px}.topical-card{min-height:430px}.profile-hero{border-radius:30px;margin:0 0 22px}.profile-photo{height:430px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* ========================================================================== 
   ALOH UI HOTFIX 0.4.1
   Mobile-first layout repair, readable type, softer cards, desktop rail,
   accessible navigation and resilient dialogs/images.
   ========================================================================== */

:root {
  --nav-h: calc(78px + env(safe-area-inset-bottom));
  --content-max: 960px;
  --rail-w: 310px;
  --sidebar-w: 250px;
  --soft-shadow: 0 10px 30px rgba(98, 62, 7, .10);
}

html,
body {
  min-width: 320px;
  background: var(--paper);
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden;
}

.skip-link {
  position: fixed;
  z-index: 500;
  left: 12px;
  top: 12px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

/* The original mobile grid placed main content in a zero-width column. */
.app-shell {
  display: block;
  width: 100%;
  max-width: 1480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
}

.app-main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-bottom: var(--nav-h);
}

.page {
  width: 100%;
  min-width: 0;
  padding: 18px 16px calc(var(--nav-h) + 34px);
}

.page-shell {
  width: 100%;
  max-width: var(--content-max);
}

.top-header {
  width: 100%;
  height: 72px;
  padding: 12px 14px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.top-header .brand {
  font-size: 32px;
}

.header-context {
  display: none;
  min-width: 0;
}

.header-context strong,
.header-context span {
  display: block;
}

.header-context strong {
  font-size: 18px;
  line-height: 1.15;
}

.header-context span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.header-actions {
  flex: 0 0 auto;
}

.icon-button,
.round-action {
  width: 44px;
  height: 44px;
}

.drawer-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: block;
  border: 0;
  background: rgba(31, 22, 10, .48);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

body.drawer-open .drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  width: min(86vw, 310px);
  padding: calc(20px + env(safe-area-inset-top)) 16px 24px;
  overscroll-behavior: contain;
  overflow-y: auto;
}

.side-menu button {
  min-height: 48px;
  font-size: 16px;
}

.side-menu svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
}

/* Readability */
.page-hero {
  align-items: flex-start;
}

.page-hero h1 {
  font-size: clamp(42px, 12vw, 52px);
  line-height: .98;
}

.page-hero p {
  font-size: 16px;
  line-height: 1.6;
}

.eyebrow {
  font-size: 12px;
  line-height: 1.3;
}

.activity-card p,
.group-card p,
.person-card p,
.goal-card p,
.empty-state p,
.section-heading p {
  font-size: 15px;
  line-height: 1.58;
}

.meta-row {
  font-size: 13px;
  line-height: 1.45;
}

.chip,
.category-option span {
  font-size: 12px;
}

.btn-small {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 14px;
}

/* Softer cards, no harsh black outlines */
.activity-card,
.group-card,
.person-card,
.goal-card,
.profile-panel,
.content-card {
  border-color: rgba(121, 77, 10, .08);
  box-shadow: var(--soft-shadow);
}

.activity-card,
.group-card,
.person-card {
  transition: transform .16s ease, box-shadow .16s ease;
}

.activity-card:focus-within,
.group-card:focus-within,
.person-card:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 152, 0, .20), var(--soft-shadow);
}

.activity-card h3,
.group-card h3,
.person-card h3,
.goal-card h3 {
  font-size: 22px;
}

.activity-content,
.group-copy,
.person-copy,
.goal-copy {
  min-width: 0;
}

.activity-image img,
.group-cover img,
.person-photo img,
.profile-photo img,
.detail-hero img,
.topical-card img,
.review-hero img {
  background: linear-gradient(135deg, var(--cream2), var(--gold));
}

.activity-card[data-event],
.group-card[data-group],
.person-card[data-person] {
  cursor: pointer;
}

/* Tabs clearly scroll and active item remains visible. */
.tabs {
  position: relative;
  padding: 4px 0 15px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 8px;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
}

.tab {
  min-height: 43px;
  padding: 10px 15px;
  font-size: 14px;
  scroll-snap-align: start;
}

.tabs .tab:last-child {
  margin-right: 30px;
}

.summary-chip {
  min-height: 82px;
}

.summary-chip:focus-visible,
.tab:focus-visible,
.bottom-nav button:focus-visible,
.btn:focus-visible,
.icon-button:focus-visible,
.round-action:focus-visible {
  outline: 3px solid rgba(255, 152, 0, .42);
  outline-offset: 2px;
}

/* Search controls */
.search-panel {
  padding: 14px;
}

.search-input {
  min-width: 0;
}

.filter-button {
  min-height: 42px;
  font-size: 14px;
}

/* Bottom navigation */
.bottom-nav {
  left: 0;
  transform: none;
  width: 100%;
  height: auto;
  min-height: var(--nav-h);
  padding: 8px 6px max(10px, env(safe-area-inset-bottom));
  border-top-color: rgba(95, 58, 0, .10);
  background: rgba(255, 197, 62, .98);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  min-height: 58px;
  padding: 5px 2px;
  gap: 3px;
}

.bottom-nav button svg {
  width: 28px;
  height: 28px;
}

.bottom-nav button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.bottom-nav button.active {
  color: #bd6300;
  box-shadow: 0 5px 16px rgba(105, 65, 3, .11);
}

/* Waves remain obvious and asymmetrical. */
.profile-wave {
  height: 116px;
  filter: drop-shadow(0 -5px 10px rgba(102, 64, 2, .08));
}

.wave-bottom {
  height: 66px;
}

.profile-hero {
  border-radius: 0 0 28px 28px;
}

.profile-info h1 {
  font-size: clamp(46px, 13vw, 58px);
}

.profile-bio,
.detail-section p {
  font-size: 16px;
  line-height: 1.65;
}

/* Dialogs become stable mobile sheets. */
.main-dialog,
.admin-dialog {
  max-width: 100%;
  overscroll-behavior: contain;
}

.dialog-close {
  top: 10px;
  right: 10px;
}

.detail-hero {
  min-height: 310px;
}

.detail-hero-copy {
  right: 68px;
}

.detail-hero-copy h1 {
  font-size: clamp(38px, 11vw, 50px);
}

.organizer-card {
  width: 100%;
  border: 0;
  text-align: left;
}

.admin-table th,
.admin-table td {
  font-size: 13px;
  white-space: nowrap;
}

#toast {
  bottom: calc(var(--nav-h) + 14px);
}

.desktop-rail {
  display: none;
}

.rail-inner {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 14px;
  padding: 22px 18px 30px 0;
}

.rail-card {
  overflow: hidden;
  border: 1px solid rgba(121, 77, 10, .08);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.rail-card-header,
.rail-card-body {
  padding: 15px 16px;
}

.rail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}

.rail-card-header strong {
  font-size: 15px;
}

.rail-card-body {
  display: grid;
  gap: 10px;
}

.rail-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.rail-item > svg,
.rail-icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 14px;
  background: var(--gold);
  color: #7b4300;
  fill: currentColor;
}

.rail-item-copy {
  min-width: 0;
}

.rail-item-copy strong,
.rail-item-copy span {
  display: block;
}

.rail-item-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-item-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.rail-points {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(135deg, #ff9500, #ffc84a);
  color: #fff;
}

.rail-points strong {
  display: block;
  font-family: 'Chicle';
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
}

.rail-points span {
  font-size: 13px;
}

@media (max-width: 760px) {
  .page-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-hero > .btn,
  .page-hero > div + .btn {
    width: 100%;
  }

  .page-hero.compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .page-hero.compact .eyebrow,
  .page-hero.compact p {
    display: none;
  }

  .page-hero.compact h1 {
    margin: 0;
    font-size: 39px;
  }

  .page-hero.compact > .btn {
    width: auto;
    min-width: 48px;
    padding-inline: 13px;
  }

  .search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-bar .btn {
    min-width: 50px;
    padding-inline: 14px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .activity-card {
    display: block;
    min-height: 0;
  }

  .activity-image {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .activity-content {
    padding: 17px;
  }

  .group-cover {
    height: auto;
    aspect-ratio: 16 / 8.5;
  }

  .person-card {
    grid-template-columns: 102px minmax(0, 1fr);
    min-height: 176px;
  }

  .person-photo {
    min-height: 176px;
  }

  .person-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .topical-card {
    min-height: 330px;
  }

  .topical-copy {
    left: 19px;
    right: 19px;
    bottom: 58px;
  }

  .topical-copy h2 {
    font-size: clamp(44px, 13vw, 54px);
  }

  .profile-photo {
    height: 330px;
  }

  .profile-buttons {
    grid-template-columns: 1fr;
  }

  .profile-buttons button {
    min-height: 48px;
    font-size: 15px;
  }

  .main-dialog,
  .admin-dialog {
    width: 100%;
    height: min(94dvh, 900px);
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
  }

  .admin-shell {
    padding: 16px;
  }

  .admin-header {
    align-items: flex-start;
  }

  .admin-header h1 {
    font-size: 42px;
  }

  .image-picker,
  .icon-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .page {
    padding-inline: 13px;
  }

  .top-header {
    padding-inline: 10px;
    gap: 8px;
  }

  .header-actions {
    gap: 6px;
  }

  .search-bar {
    grid-template-columns: 1fr;
  }

  .search-bar .btn {
    width: 100%;
  }

  .summary-strip {
    gap: 8px;
  }

  .summary-chip {
    padding: 12px;
  }

  .bottom-nav button span {
    font-size: 11.5px;
  }

  .person-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

/* Desktop: sidebar + central feed. */
@media (min-width: 900px) {
  body {
    background: #f7ecd2;
  }

  .app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    align-items: start;
    box-shadow: 0 0 50px rgba(77, 48, 6, .08);
  }

  .side-menu {
    position: sticky;
    top: 0;
    width: var(--sidebar-w);
    height: 100dvh;
    transform: none;
  }

  .drawer-backdrop,
  #drawerOpen {
    display: none;
  }

  .app-main {
    padding-bottom: 0;
  }

  .top-header {
    height: 82px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 26px;
  }

  .top-header .brand {
    display: none;
  }

  .header-context {
    display: block;
  }

  .page {
    padding: 28px 28px 54px;
  }

  .bottom-nav {
    display: none;
  }

  .profile-hero {
    margin: 0 0 24px;
    border-radius: 30px;
  }

  .profile-photo {
    height: 390px;
  }

  #toast {
    bottom: 28px;
  }
}

/* Wide desktop: restore the useful right context rail. */
@media (min-width: 1280px) {
  .app-shell {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--rail-w);
  }

  .desktop-rail {
    display: block;
    min-width: 0;
  }

  .page {
    padding-inline: 26px;
  }

  .page-shell {
    max-width: 880px;
  }

  .topical-card {
    min-height: 390px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .activity-card:hover,
  .group-card:hover,
  .person-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(98, 62, 7, .14);
  }
}

/* Small follow-up corrections after viewport testing. */
.skip-link:focus { transform: translateY(-150%); }
.skip-link:focus-visible { transform: translateY(0); }
.rail-points { border: 0; text-align: left; }
@media (max-width: 390px) {
  .search-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .search-bar .btn { width: auto; }
}
@media (max-width: 760px) {
  #page-activities .page-hero.discover-mobile .eyebrow,
  #page-activities .page-hero.discover-mobile p {
    display: none;
  }

  #page-activities .page-hero.discover-mobile h1 {
    margin: 0;
  }
}
