/* Sheep site nav (beige bar). Scoped so dark pages keep their own :root. */
.nav{
  --sn-bg:#F7F1E8;
  --sn-ink:#2A2118;
  --sn-muted:#6E5E4E;
  --sn-cyan:#C45C28;
  --sn-line:rgba(196,92,40,.22);
  --sn-sans:"Noto Sans TC","PingFang TC","Noto Sans CJK TC","Microsoft JhengHei",sans-serif;
  position:sticky;top:0;z-index:40;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  background:rgba(247,241,232,.88);
  border-bottom:1px solid var(--sn-line);
  padding-top:env(safe-area-inset-top,0px);
  transition:box-shadow .25s;
  color:var(--sn-ink);
  font-family:var(--sn-sans);
  font-size:17px;
  line-height:1.4;
}
.nav.is-scrolled{box-shadow:0 10px 28px rgba(42,33,24,.1)}
.nav .wrap,
.nav .nav-inner{
  width:min(1180px,calc(100% - 40px));
  margin:0 auto;
  position:relative;
  z-index:1;
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 0;gap:12px;min-height:0;
}
.nav .brand{
  display:flex;align-items:center;gap:8px;font-weight:900;font-size:17px;
  white-space:nowrap;color:var(--sn-ink);text-decoration:none;
}
.nav .brand img{width:38px;height:38px;border-radius:50%;object-fit:cover;border:1px solid var(--sn-cyan);background:#1A0808}
.nav-links{display:flex;gap:12px;font-size:17px;color:var(--sn-muted);flex-wrap:nowrap;font-weight:700;align-items:center}
.nav-links a{white-space:nowrap;padding:6px 4px;color:inherit;text-decoration:none;background:none;border:0;border-radius:0;font-weight:700}
.nav-links a:hover,.nav-links a.is-on,.nav-links a[aria-current="page"]{color:var(--sn-cyan)}
.nav-toggle{
  display:none;background:transparent;color:var(--sn-cyan);border:1px solid var(--sn-line);
  border-radius:999px;padding:10px 16px;font-weight:800;cursor:pointer;font-size:17px;
  font-family:inherit;min-height:0;
}
@media (max-width:1100px){
  .nav-toggle{display:inline-flex;align-items:center}
  .nav.is-open::before{
    content:"";position:fixed;inset:0;background:rgba(42,33,24,.34);z-index:0;
  }
  .nav-inner{z-index:1}
  .nav-links{
    display:none;position:absolute;left:0;right:0;top:100%;
    flex-direction:column;gap:0;flex-wrap:nowrap;align-items:stretch;
    background:#F7F1E8;border:1px solid var(--sn-line);border-radius:16px;
    padding:8px 12px 12px;margin-top:8px;z-index:50;
    max-height:min(78vh,640px);overflow:auto;
    box-shadow:0 18px 48px rgba(42,33,24,.18);
  }
  .nav.is-open .nav-links{display:flex}
  body.nav-open{overflow:hidden}
  .nav-links a{
    display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;
    padding:14px 10px;font-size:1.22rem;color:var(--sn-ink);border-bottom:1px solid var(--sn-line);
    --ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='8'/></svg>");
  }
  .nav-links a:last-child{border-bottom:0}
  .nav-links a::before{
    content:"";width:18px;height:18px;flex:0 0 18px;
    background:currentColor;
    -webkit-mask:var(--ico) center/contain no-repeat;
    mask:var(--ico) center/contain no-repeat;
  }
  .nav-links a[href="index.html"],
  .nav-links a[href="https://lungchuntin.com/sheep"],
  .nav-links a[href="https://lungchuntin.com/sheep/"],
  .nav-links a[href="/sheep"],
  .nav-links a[href="/sheep/"]{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 10.5 12 4l8 6.5V20h-6v-7h-4v7H4z'/></svg>")}
  .nav-links a[href="about.html"],
  .nav-links a[href="https://lungchuntin.com/about"],
  .nav-links a[href="/about"]{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='3.2'/><path d='M6 19c.4-3.4 3-5 6-5s5.6 1.6 6 5'/></svg>")}
  .nav-links a[href*="/service"]{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 6h14a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H9l-4 3v-3H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z'/></svg>")}
  .nav-links a[href="https://lungcourse.com"]{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 5.5A2.5 2.5 0 0 1 6.5 3H12v16H6.5A2.5 2.5 0 0 0 4 21.5z'/><path d='M20 5.5A2.5 2.5 0 0 0 17.5 3H12v16h5.5A2.5 2.5 0 0 1 20 21.5z'/></svg>")}
  .nav-links a[href*="patreon"]{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 19s-7-4.3-7-9.2A4 4 0 0 1 12 7a4 4 0 0 1 7 2.8C19 14.7 12 19 12 19z'/></svg>")}
  .nav-links a[href*="/blog"]{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='5' width='16' height='14' rx='2'/><path d='M8 9h8M8 13h8M8 17h5'/></svg>")}
  .nav-links a[href="contact.html"],
  .nav-links a[href*="contact.html"]{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3.5' y='6' width='17' height='12' rx='2'/><path d='M4 8l8 6 8-6'/></svg>")}
}
@media (max-width:640px){
  .nav .brand{font-size:15px;gap:6px}
  .nav .brand img{width:34px;height:34px}
}
