*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --cream:#F5F1EB;--ink:#1A1916;--ink-muted:#5C5A55;--ink-faint:#9C9A94;
  --gold:#B8965A;--gold-light:#D4B07A;--gold-faint:#F0E8D8;
  --teal:#2A6B6B;--teal-light:#E8F2F2;--red:#C84B3A;
  --border:rgba(26,25,22,0.11);--border-strong:rgba(26,25,22,0.2);
  --shadow:0 2px 16px rgba(26,25,22,0.08);--radius:12px;--radius-sm:8px;
  --header-h:0px;
  --footer-h:0px;
}
html,body{height:100%}
body{font-family:'DM Sans',sans-serif;background:var(--cream);color:var(--ink);font-size:15px;line-height:1.6;overflow-x:hidden}

/* ── TOP HEADER (persistent nav) ── */
.logo-dot{width:6px;height:6px;background:var(--gold);border-radius:50%;flex-shrink:0}
.app-header{position:fixed;top:0;left:0;right:0;height:var(--header-h);z-index:170;background:var(--ink);display:flex;align-items:center;gap:18px;padding:0 20px;border-bottom:1px solid rgba(255,255,255,.07)}
.app-header-brand{display:flex;align-items:center;gap:9px;font-family:'Playfair Display',serif;font-size:18px;color:#fff;font-weight:500;background:none;border:none;cursor:pointer;padding:4px 6px;margin-left:-6px;border-radius:8px;transition:background .15s;-webkit-tap-highlight-color:transparent}
.app-header-brand:hover{background:rgba(255,255,255,.07)}
.app-logo-fish{flex-shrink:0;display:block}
.app-nav{display:flex;align-items:center;gap:4px;margin-left:auto}
.app-nav-link{font-family:'DM Sans',sans-serif;font-size:13.5px;font-weight:500;color:rgba(255,255,255,.6);background:none;border:none;cursor:pointer;padding:8px 14px;border-radius:8px;transition:all .15s;-webkit-tap-highlight-color:transparent}
.app-nav-link:hover{color:#fff;background:rgba(255,255,255,.07)}
.app-nav-link.active{color:var(--gold-light);background:rgba(184,150,90,.16)}

/* ── BOTTOM FOOTER ── */
.app-footer{position:fixed;bottom:0;left:0;right:0;height:var(--footer-h);z-index:170;background:var(--ink);display:flex;align-items:center;justify-content:center;gap:10px;padding:0 16px;border-top:1px solid rgba(255,255,255,.07)}
.app-footer-version{font-size:11px;color:rgba(255,255,255,.45);letter-spacing:.03em}
.app-footer-legal{display:flex;align-items:center;gap:8px}
.app-footer a{font-size:11px;color:rgba(255,255,255,.55);text-decoration:none;transition:color .15s}
.app-footer a:hover{color:var(--gold-light)}
.app-footer-sep{color:rgba(255,255,255,.2);font-size:11px}

/* ── HAMBURGER (mobile only) ── */
.hamburger{display:none;margin-left:auto;width:38px;height:38px;border-radius:9px;border:1px solid rgba(255,255,255,.15);background:transparent;cursor:pointer;flex-direction:column;align-items:center;justify-content:center;gap:5px;transition:background .15s;-webkit-tap-highlight-color:transparent}
.hamburger:hover{background:rgba(255,255,255,.08)}
@media(max-width:640px){
  .app-nav{display:none}
  .hamburger{display:flex}
  .app-header-brand{font-size:16px}
}
.hamburger span{display:block;width:17px;height:1.5px;background:rgba(255,255,255,.78);border-radius:2px;transition:all .25s}
.hamburger.open{background:#2e2c28}
.hamburger.open span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
.hamburger.open span:nth-child(2){opacity:0;transform:scaleX(0)}
.hamburger.open span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}


/* ── DRAWER ── */
.drawer-backdrop{display:none;position:fixed;inset:0;background:rgba(26,25,22,.4);z-index:180;opacity:0;transition:opacity .25s}
.drawer-backdrop.open{display:block;opacity:1}
.drawer{position:fixed;top:0;right:0;bottom:0;width:272px;background:#211F1C;z-index:190;transform:translateX(100%);transition:transform .28s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;overflow-y:auto}
.drawer.open{transform:translateX(0)}
.drawer-head{padding:18px 18px 14px;border-bottom:1px solid rgba(255,255,255,.06)}
.drawer-head-title{font-size:10px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.28);margin-bottom:12px}
.module-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;cursor:pointer;transition:background .15s;-webkit-tap-highlight-color:transparent;border:none;background:none;width:100%;font-family:'DM Sans',sans-serif;text-align:left}
.module-item.active{background:rgba(184,150,90,.14)}
.module-icon{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:rgba(255,255,255,.06)}
.module-item.active .module-icon{background:rgba(184,150,90,.18)}
.module-label{font-size:13.5px;color:rgba(255,255,255,.55);font-weight:400}
.module-item.active .module-label{color:var(--gold-light);font-weight:500}
.module-badge{font-size:10px;padding:2px 7px;border-radius:10px;background:rgba(184,150,90,.2);color:var(--gold-light);margin-left:auto;flex-shrink:0}

/* Add module button */
.add-module-btn{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;cursor:pointer;transition:all .15s;border:1.5px dashed rgba(255,255,255,.12);background:transparent;width:100%;font-family:'DM Sans',sans-serif;text-align:left;margin-top:6px;-webkit-tap-highlight-color:transparent}
.add-module-btn:hover{border-color:rgba(184,150,90,.4);background:rgba(184,150,90,.06)}
.add-module-icon{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:1.5px dashed rgba(255,255,255,.18)}
.add-module-label{font-size:13px;color:rgba(255,255,255,.35)}

.drawer-footer{padding:16px 18px 20px;border-top:1px solid rgba(255,255,255,.06);margin-top:auto}
.drawer-version{font-family:'DM Sans',sans-serif;font-size:11px;color:rgba(255,255,255,.45);letter-spacing:.04em;margin-bottom:10px}
.drawer-legal{display:flex;align-items:center;gap:8px;margin-bottom:14px}
.drawer-legal a{font-size:11px;color:rgba(255,255,255,.55);text-decoration:none;transition:color .15s}
.drawer-legal a:hover{color:var(--gold-light)}
.drawer-legal-sep{color:rgba(255,255,255,.2);font-size:11px}
