:root{
  --maroon:#7A1E2C; --maroon-dark:#551420; --gold:#C9A227; --gold-light:#E4C468;
  --cream:#FAF5EA; --card:#FFFFFF; --ink:#2B211A; --ink-soft:#5C5147; --border:#E6DCC4; --radius:14px;
}
*{box-sizing:border-box;}
[hidden]{ display:none !important; }
body{ margin:0; background:var(--cream); color:var(--ink); font-family:'Work Sans', sans-serif; line-height:1.6; }
h1,h2,h3{ font-family:'Cormorant Garamond', serif; margin:0; }
.mono{ font-family:'IBM Plex Mono', monospace; }
img{ max-width:100%; display:block; }

.site-nav{ position:sticky; top:0; z-index:60; background:var(--maroon); display:flex; align-items:center; justify-content:space-between; padding:10px 28px; box-shadow:0 2px 14px rgba(0,0,0,0.18); }
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }
.brand-logo-badge{ background:#fff; border-radius:10px; padding:4px; display:flex; }
.brand-logo-badge img{ height:34px; width:34px; object-fit:contain; border-radius:6px; }
.brand span{ font-family:'Cormorant Garamond',serif; font-weight:600; font-size:14px; color:#F7ECD9; }
.nav-back{ color:#F0E1C8; text-decoration:none; font-size:13px; font-weight:600; }

.wrap{ max-width:760px; margin:0 auto; padding:40px 20px 80px; }

.intro{ text-align:center; margin-bottom:32px; }
.eyebrow-label{ font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:3px; text-transform:uppercase; color:var(--gold); margin:0 0 10px; }
.intro h1{ font-size:30px; color:var(--maroon); margin-bottom:10px; }
.intro p{ color:var(--ink-soft); font-size:15px; max-width:520px; margin:0 auto; }

.gate-tabs, .hub-tabs{ display:flex; gap:8px; justify-content:center; margin-bottom:24px; flex-wrap:wrap; border-bottom:1px solid var(--border); }
.gate-tabs button, .hub-tabs button{ background:none; border:none; padding:10px 16px; font-weight:600; font-size:13.5px; color:var(--ink-soft); cursor:pointer; border-bottom:2px solid transparent; }
.gate-tabs button.active, .hub-tabs button.active{ color:var(--maroon); border-bottom-color:var(--maroon); }

.card-panel{ background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:26px; }
.field-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.field-grid .full{ grid-column:1/-1; }
.field-group{ margin-bottom:14px; }
label{ display:block; font-size:13px; font-weight:500; margin-bottom:6px; }
label .req{ color:var(--maroon); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea{
  width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:8px; font:inherit; background:#fff; color:var(--ink);
}
input:focus, select:focus, textarea:focus{ outline:none; border-color:var(--maroon); box-shadow:0 0 0 3px rgba(122,30,44,0.14); }
textarea{ resize:vertical; min-height:70px; }
.hint{ font-size:12.5px; color:var(--ink-soft); margin-top:4px; }

.btn-primary{ width:100%; background:var(--maroon); color:#FBF3E3; font-weight:600; font-size:15px; border:none; border-radius:999px; padding:13px; cursor:pointer; }
.btn-primary:disabled{ opacity:0.6; cursor:progress; }
.btn-secondary{ background:var(--card); border:1px solid var(--border); border-radius:999px; padding:8px 16px; font-size:13px; font-weight:600; cursor:pointer; color:var(--ink); }
.form-error{ background:#FBEAE6; color:#93342A; border:1px solid #EFC5BB; border-radius:10px; padding:12px 14px; font-size:14px; margin-bottom:16px; }
.form-success{ background:#E7EFDD; color:#3D6A2E; border:1px solid #C7DDB6; border-radius:10px; padding:14px; font-size:14px; text-align:center; }

/* Profile / then-now card */
.then-now{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:18px; }
.photo-slot{ text-align:center; }
.photo-slot .frame{
  aspect-ratio:1; border-radius:12px; border:1px dashed var(--border); background:#F1EADA;
  display:flex; align-items:center; justify-content:center; overflow:hidden; margin-bottom:8px;
}
.photo-slot .frame img{ width:100%; height:100%; object-fit:cover; }
.photo-slot .frame span{ font-size:12px; color:var(--ink-soft); }
.photo-slot label.upload-label{ display:inline-block; font-size:12.5px; color:var(--maroon); font-weight:600; cursor:pointer; }
.photo-slot input[type="file"]{ display:none; }

.member-card{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin-bottom:14px;
  display:flex; gap:14px;
}
.member-card .avatar{ width:64px; height:64px; border-radius:50%; object-fit:cover; background:#F1EADA; flex-shrink:0; }
.member-card .avatar-fallback{ width:64px; height:64px; border-radius:50%; background:var(--maroon); color:var(--gold-light); display:flex; align-items:center; justify-content:center; font-family:'Cormorant Garamond',serif; font-size:22px; flex-shrink:0; }
.member-card h4{ font-size:16px; color:var(--maroon); margin-bottom:2px; }
.member-card .meta{ font-size:12.5px; color:var(--ink-soft); }
.member-card .bio{ font-size:13.5px; margin-top:6px; }

/* Map */
#worldMap{ height:420px; border-radius:var(--radius); border:1px solid var(--border); }

/* Wall */
.composer textarea{ min-height:80px; }
.composer-row{ display:flex; justify-content:space-between; align-items:center; margin-top:10px; gap:10px; flex-wrap:wrap; }
.composer-row label{ display:flex; align-items:center; gap:6px; font-size:13px; margin:0; font-weight:500; }
.composer-row input[type="checkbox"]{ width:auto; }
.wall-post{ background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin-bottom:16px; }
.wall-post .post-head{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:8px; }
.wall-post .post-author{ font-weight:600; color:var(--maroon); font-size:14px; }
.wall-post .post-time{ font-size:11.5px; color:var(--ink-soft); }
.wall-post .post-text{ font-size:14.5px; margin-bottom:10px; white-space:pre-wrap; }
.wall-post .post-image{ border-radius:10px; margin-bottom:10px; max-height:360px; object-fit:cover; width:100%; }
.help-badge{ display:inline-block; background:#FDF1DC; color:#8A5E10; font-size:11px; font-weight:700; letter-spacing:0.5px; text-transform:uppercase; padding:3px 10px; border-radius:999px; margin-bottom:10px; }
.post-actions{ display:flex; gap:14px; align-items:center; border-top:1px solid var(--border); padding-top:10px; }
.like-btn{ background:none; border:none; cursor:pointer; font-size:13.5px; color:var(--ink-soft); display:flex; align-items:center; gap:5px; }
.like-btn.liked{ color:var(--maroon); font-weight:600; }
.comments-list{ margin-top:10px; }
.comment{ font-size:13px; padding:8px 0; border-top:1px solid #F1EADA; }
.comment b{ color:var(--maroon); }
.comment-form{ display:flex; gap:8px; margin-top:10px; }
.comment-form input{ flex:1; }
.comment-form button{ background:var(--maroon); color:#fff; border:none; border-radius:8px; padding:0 14px; font-size:13px; font-weight:600; cursor:pointer; }

/* Tag old photos */
.tag-category-select{ margin-bottom:16px; }
.tag-photo-frame{ background:#F1EADA; border-radius:var(--radius); border:1px solid var(--border); overflow:hidden; height:360px; display:flex; align-items:center; justify-content:center; margin-bottom:10px; }
.tag-photo-frame img{ max-width:100%; max-height:100%; object-fit:contain; }
.tag-nav-row{ display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.tag-list{ margin-bottom:12px; }
.tag-item{ font-size:13px; padding:8px 0; border-top:1px solid var(--border); }
.tag-item b{ color:var(--maroon); }
.tag-form{ display:flex; gap:8px; }
.tag-form input{ flex:1; }
.tag-form button{ background:var(--maroon); color:#fff; border:none; border-radius:8px; padding:0 14px; font-size:13px; font-weight:600; cursor:pointer; }

.logout-row{ text-align:center; margin-top:30px; }
.logout-row button{ background:none; border:none; color:var(--ink-soft); font-size:13px; cursor:pointer; text-decoration:underline; }
