:root { --rail:0px; --bar-top:calc(22px + env(safe-area-inset-top,0px)); --head-h:calc(var(--bar-top) + 62px); }
body { padding-left:0; }
#solar-field { left:0;width:100%; }

.section-index.arc {
  position:fixed; top:50vh; left:4px; width:140px; height:380px; transform:translateY(-50%); display:block;
  pointer-events:none; isolation:isolate;
}
.section-index.arc::before {content:"";position:absolute;top:0;bottom:0;left:5px;width:70px;border:1px solid #bd9e6199;border-radius:50%;clip-path:inset(0 52% 0 0);}
.section-index.arc a {
  position:absolute; top:50%;left:4px;width:max-content;max-width:122px; min-height:32px;padding:4px 6px 4px 2px;
  gap:6px;border:0;line-height:1.1;font-size:.83rem;color:var(--muted);pointer-events:auto;
  transform:translate(var(--x,0px),calc(-50% + var(--y,0px))) rotate(var(--tilt,0deg)); transform-origin:left center;
}
.section-index.arc a span {background:var(--bg);padding:4px 7px;border-radius:20px;box-shadow:0 0 8px var(--bg);}
.section-index.arc a::before {width:4px;height:4px;flex:none;border-radius:50%;background:var(--gold);}
.section-index.arc a[aria-current=location]{color:var(--gold);}
.section-index.arc a[aria-current=location]::before{width:6px;height:6px;box-shadow:0 0 8px #e9c976;}
.section-index.arc a[aria-current=location] span {color:var(--ink);outline:1px solid var(--line);}
@media(min-width:901px){

 .landing .wrap,.ingredient-page .wrap {width:min(calc(100% - 205px),1160px);margin-left:max(155px,calc((100% - 1160px)/2));margin-right:auto;}
 .landing .wrap.hero-foot {margin-left:0;left:max(155px,calc((100% - 1160px)/2));transform:none;}
 .creator-byline {left:max(130px,10%);}
 .landing section[id],.ingredient-page .materia [id],.creator-letter{scroll-margin-top:var(--head-h);}
 .cover-journey{--pin-offset:var(--head-h);}
 .field-story{--stage-height:calc(100svh - var(--head-h));}
 .field-story .field-stage,.creator-portrait{top:var(--head-h);}
 .field-beat{padding-left:max(155px,10vw);}
 .creator-portrait{height:min(calc(100svh - var(--head-h)),900px);}
}
@media(max-width:900px){
 :root{--bar-top:calc(16px + env(safe-area-inset-top,0px));}

 #mobile-index[open] {background:#181812f7;}
 #mobile-index .section-index.arc {position:relative;top:auto;left:auto;transform:none;width:100%;height:380px;--bg:#181812;--muted:#d0c9b8;--gold:#e6cf93;--ink:#fff6e3;}
 #mobile-index .section-index.arc a {font-size:1.04rem;max-width:none;min-height:36px;}
}

@media(min-width:901px){
 .landing .morph-stage {top:0;height:min(100svh,1080px);}
 .ingredient-page .back-link {top:max(26px,calc(var(--head-h) - 12px));}
 .ingredient-page .view-selector{top:calc(var(--head-h) + 6px);}
 .ingredient-page .cover-journey {--pin-offset:0px;}
 .ingredient-page .cover-journey.is-linked{padding-bottom:0;}
 .ingredient-page .cover-journey.is-linked::after{content:"";display:block;height:clamp(280px,49vh,530px);}
}
@media(max-width:900px){

 .ingredient-page .cover-journey {--pin-offset:0px;}
 .ingredient-page .cover-journey.is-linked{padding-bottom:0;}
 .ingredient-page .cover-journey.is-linked::after{content:"";display:block;height:32vh;}
 .ingredient-page .cover-journey .back-link{top:calc(var(--head-h) + 6px);}
 .ingredient-page .cover-journey .view-selector{top:calc(var(--head-h) + 2px);}
}

.section-index.arc::before {
  top:50%;bottom:auto;width:160px;height:var(--arc-height,380px);transform:translateY(-50%);
  clip-path:inset(var(--trace-start,0px) 50% var(--trace-end,0px) 0);
}

/* The toolbar and the independent side index share one sticky header. */
.site-rail {
  pointer-events:none; position:sticky; inset:0 0 auto; z-index:6;
  width:100%; height:var(--head-h); margin-bottom:calc(-1 * var(--head-h)); padding:0;
  display:grid; grid-template-columns:minmax(0,1fr); place-items:center; border:0; background:transparent; backdrop-filter:none;
}
.oracle-bar {
  position:relative;
  --bar-ink:#fff6df; --bar-edge:#d7c7a838; --bar-hover:#f3dba722;
  pointer-events:auto; box-sizing:border-box; display:flex; align-items:center; justify-content:space-between;
  align-self:start; margin-top:var(--bar-top);
  width:min(488px,calc(100% - 20px)); min-height:54px; margin-inline:auto; padding:0 12px 0 16px;
  border-radius:21px; border:1px solid var(--bar-edge); color:var(--bar-ink);
  background:linear-gradient(110deg,#49443ae0,#34332fce 52%,#49463bd9);
  box-shadow:0 8px 26px -5px #05040163,inset 0 1px #fff5d412;
  -webkit-backdrop-filter:blur(12px) saturate(130%); backdrop-filter:blur(12px) saturate(130%);
}
.oracle-bar .rail-brand {width:105px;max-width:none;height:52px;flex:none;}
.oracle-bar .rail-brand img {width:100%;height:100%;object-fit:contain;object-position:left center;}
.oracle-bar .rail-tools {display:flex;align-items:center;justify-content:flex-end;gap:2px;width:auto;margin:0 0 0 auto;padding:0;border:0;}
.oracle-bar .rail-tools button {
  display:inline-flex;align-items:center;justify-content:center;flex:none;gap:5px;
  height:44px;min-width:36px;padding:0 8px;border:0;border-radius:14px;background:transparent;
  color:var(--bar-ink);font:500 .85rem/1 var(--font);cursor:pointer;
}
.oracle-bar .rail-tools svg {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.oracle-bar .rail-tools .bag-btn span {display:inline;}
.oracle-bar #open-bag {position:absolute;left:50%;translate:-50% 0;}
.oracle-bar #theme {position:relative;margin-inline-start:10px;}
.oracle-bar #theme::before {
  content:"";position:absolute;left:-6px;top:50%;height:18px;
  border-left:1px solid currentColor;opacity:.38;transform:translateY(-50%);pointer-events:none;
}
.oracle-bar .rail-tools .bag-btn b {background:#ecd7a4;color:#282317;min-width:19px;height:19px;border-radius:50%;font-size:.75rem;}
.oracle-bar .rail-tools .index-toggle {display:none;}
.oracle-bar .rail-tools .icon-btn {width:36px;}
.oracle-bar .rail-tools button:is(:hover,:focus-visible) {background:var(--bar-hover);}
.oracle-bar :focus-visible {outline:2px solid var(--bar-ink);outline-offset:0;}
.back-to-top {
  position:fixed; z-index:5;
  right:calc(clamp(14px,2vw,30px) + env(safe-area-inset-right,0px));
  bottom:calc(clamp(16px,2vw,30px) + env(safe-area-inset-bottom,0px));
  display:grid; place-items:center; width:46px; height:46px; box-sizing:border-box;
  border:1px solid #b6a07199; border-radius:50%; background:#24221eea; color:#efdaa4;
  box-shadow:0 5px 18px #08070242; backdrop-filter:blur(10px);
}
.back-to-top[hidden],.back-to-top.yield-to-control {display:none;}
.back-to-top:is(:hover,:focus-visible) {border-color:currentColor;}
.back-to-top:focus-visible {outline:2px solid currentColor;outline-offset:3px;}
[data-theme=dia] .back-to-top {background:#f4eddfed;color:#594927;}
[data-theme=dia] .oracle-bar {
  --bar-ink:#312a1f;--bar-edge:#8a795350;--bar-hover:#8268311b;
  background:linear-gradient(110deg,#f2ede3ed,#e6dfd1e0);box-shadow:0 4px 18px #382b181e;
}
[data-theme=dia] .oracle-bar .rail-brand img {filter:brightness(.45);}
[data-theme=dia] footer .brand img {filter:brightness(.45);}
@media(max-width:900px){
  .site-rail>.section-index.arc {display:none;}
  .oracle-bar .rail-tools .index-toggle {display:inline-flex;padding:0;width:36px;}
}
@media(max-width:550px){
  :root{--head-h:calc(var(--bar-top) + 54px);}
  .oracle-bar {width:min(430px,calc(100% - 14px));min-height:46px;padding:0 6px 0 11px;border-radius:16px;}
  .oracle-bar .rail-brand {width:89px;height:44px;}
  .oracle-bar .rail-tools {gap:0;}
  .oracle-bar .rail-tools button {padding:0 7px;}
  .oracle-bar .rail-tools .bag-btn span {display:none;}
}
@media(max-width:380px){
  .oracle-bar {padding-left:8px;padding-right:4px;}
  .oracle-bar .rail-tools button {padding-inline:4px;}
}
@media(prefers-reduced-motion:no-preference){
  .oracle-bar {animation:toolbar-arrive .58s cubic-bezier(.16,.8,.24,1) both;}
  @keyframes toolbar-arrive {from{clip-path:inset(0 43% round 21px);opacity:.65;}to{clip-path:inset(0 0 round 21px);opacity:1;}}
}
