:root{
  --ink:#1B2420;
  --ink-soft:#242F29;
  --paper:#F1ECE1;
  --clay:#C1602D;
  --clay-dim:#8C4620;
  --dusk:#5A6BA8;
  --gold:#D4A73D;
  --gold-dim:#9C7A28;
  --mist:#93A497;
  --line: rgba(241,236,225,0.14);
  --line-strong: rgba(241,236,225,0.28);
  --font-display: 'Iowan Old Style','Palatino Linotype','Book Antiqua', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono','Menlo','Consolas', monospace;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background: radial-gradient(circle at 20% -10%, #2A362E 0%, var(--ink) 55%, #12160F 100%);
  min-height:100vh;
  font-family:var(--font-body);
  color:var(--paper);
}
.wrap{ max-width:480px; margin:0 auto; min-height:100vh; display:flex; flex-direction:column; }
.main{ flex:1; padding:20px 18px 90px; }
a{ color:var(--gold); text-decoration:none; }

.topbar{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px 0; }
.topbar .brand{ font-family:var(--font-display); font-size:19px; }
.topbar .nav{ display:none; }

.eyebrow{ font-family:var(--font-mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--mist); margin:0 0 6px; }
h1.title{ font-family:var(--font-display); font-size:26px; font-weight:600; margin:0 0 4px; }
h2.section-title{ font-family:var(--font-display); font-size:19px; margin:0 0 12px; }
p.lede{ color:var(--mist); font-size:14px; line-height:1.55; margin:0 0 18px; }

.tag{ display:inline-flex; align-items:center; gap:6px; font-family:var(--font-mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; padding:4px 9px; border-radius:20px; border:1px solid var(--line-strong); }
.tag.physical{ color:var(--clay); border-color:rgba(193,96,45,.5); background:rgba(193,96,45,.08); }
.tag.mental{ color:#8B99DA; border-color:rgba(90,107,168,.5); background:rgba(90,107,168,.1); }
.tag.spiritual{ color:var(--gold); border-color:rgba(212,167,61,.5); background:rgba(212,167,61,.08); }
.dot{ width:6px; height:6px; border-radius:50%; display:inline-block; }
.dot.physical{ background:var(--clay); } .dot.mental{ background:#8B99DA; } .dot.spiritual{ background:var(--gold); }

.card{ background:rgba(241,236,225,0.04); border:1px solid var(--line); border-radius:18px; padding:18px; margin-bottom:14px; }

button, .btn{ font-family:var(--font-body); cursor:pointer; }
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; width:100%; padding:13px 16px; border-radius:12px; border:1px solid var(--line-strong); background:rgba(241,236,225,0.06); color:var(--paper); font-size:14.5px; font-weight:600; }
.btn.primary{ background:linear-gradient(135deg, var(--clay), var(--clay-dim)); border-color:transparent; color:#FBF3E9; }
.btn.gold{ background:linear-gradient(135deg, var(--gold), var(--gold-dim)); border-color:transparent; color:#241B04; }
.btn.ghost{ background:transparent; }
.btn.small{ width:auto; padding:8px 14px; font-size:12.5px; }
.btn:disabled{ opacity:.4; cursor:not-allowed; }

textarea, input[type=text], input[type=email], input[type=password], input[type=file]{
  width:100%; background:rgba(241,236,225,0.05); border:1px solid var(--line-strong); border-radius:10px;
  color:var(--paper); font-family:var(--font-body); font-size:14px; padding:11px 12px; margin-bottom:10px;
}
label.checkline{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--mist); margin-bottom:14px; }
input[type=checkbox]{ accent-color:var(--gold); width:17px; height:17px; }

.pillar-pick{ display:flex; flex-direction:column; gap:10px; margin:18px 0 22px; }
.pillar-opt{ display:flex; align-items:center; gap:12px; border:1px solid var(--line-strong); border-radius:14px; padding:14px 16px; background:rgba(241,236,225,0.03); }
.pillar-opt .p-name{ font-family:var(--font-display); font-size:16px; }
.pillar-opt .p-desc{ font-size:12px; color:var(--mist); margin-top:2px; }

.progress-track{ width:100%; height:6px; background:rgba(241,236,225,0.08); border-radius:6px; overflow:hidden; }
.progress-fill{ height:100%; background:linear-gradient(90deg, var(--gold), var(--clay)); border-radius:6px; }

.thumb{ width:100%; border-radius:12px; margin:10px 0; display:block; max-height:280px; object-fit:cover; }

.post{ border-bottom:1px solid var(--line); padding:16px 0; }
.post:last-child{ border-bottom:none; }
.post-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.post-author{ font-size:13px; font-weight:600; }
.post-time{ font-size:11px; color:var(--mist); font-family:var(--font-mono); }
.post-note{ font-size:13.5px; line-height:1.5; color:#DCD6C6; margin:8px 0; }
.post-actions{ display:flex; gap:16px; margin-top:8px; }
.icon-btn{ background:none; border:none; color:var(--mist); font-size:12.5px; display:inline-flex; gap:5px; align-items:center; cursor:pointer; font-family:var(--font-body);}
.icon-btn.liked{ color:var(--clay); }
.comment{ font-size:12.5px; color:var(--mist); margin-top:6px; padding-left:10px; border-left:2px solid var(--line); }
.comment b{ color:var(--paper); }
.comment-row{ display:flex; gap:8px; margin-top:10px; }
.comment-row input{ margin-bottom:0; flex:1; }

.stat-row{ display:flex; gap:10px; margin-bottom:6px; }
.stat{ flex:1; background:rgba(241,236,225,0.04); border:1px solid var(--line); border-radius:14px; padding:14px; text-align:center; }
.stat .num{ font-family:var(--font-display); font-size:24px; color:var(--gold); }
.stat .lbl{ font-family:var(--font-mono); font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--mist); margin-top:2px; }

.code-box{ font-family:var(--font-mono); font-size:26px; letter-spacing:.14em; text-align:center; background:var(--paper); color:var(--ink); border-radius:12px; padding:18px; margin:14px 0; }

.empty{ text-align:center; padding:40px 10px; color:var(--mist); font-size:13.5px; }
.divider{ height:1px; background:var(--line); margin:18px 0; }

.flash{ padding:10px 14px; border-radius:10px; font-size:13px; margin-bottom:14px; }
.flash-error{ background:rgba(193,96,45,0.15); border:1px solid rgba(193,96,45,.4); color:#F2C6AC; }
.flash-info{ background:rgba(212,167,61,0.12); border:1px solid rgba(212,167,61,.4); color:#EBD79D; }

.tabbar{
  position:sticky; bottom:0; display:flex; border-top:1px solid var(--line);
  background:rgba(18,20,15,0.92); padding:10px 6px calc(10px + env(safe-area-inset-bottom));
}
.tabbar a{ flex:1; text-align:center; color:var(--mist); font-size:11px; font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.04em; padding:6px 2px; border-radius:10px; }
.tabbar a.active{ color:var(--gold); }

.auth-card{ margin-top:14vh; }
.center-cup{ display:flex; justify-content:center; margin:6px 0 14px; }
