@font-face { font-family: Folio; src: url('/media/fonts/folio.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: Folio; src: url('/media/fonts/folio-italic.woff2') format('woff2'); font-style: italic; font-weight: 500; font-display: swap; }
:root {
  color-scheme: dark;
  --ink: #0d1521; --shell: #f7eee5; --silver: #c3cfdf; --blush: #edaecc; --honey: #f3cf93;
  --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --serif: Folio, Georgia, 'Times New Roman', serif;
  font-family: var(--sans); color: var(--shell); background: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
button,input { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; }
button:focus-visible,a:focus-visible,input:focus-visible { outline: 2px solid #ffe0a8; outline-offset: 4px; }
[hidden] { display: none !important; }
.web-ready, .web-ready body { overflow: hidden; overscroll-behavior: none; }
#habitat { position: fixed; inset: 0; overflow: hidden; isolation: isolate; background: #121d2c; -webkit-tap-highlight-color: transparent; }
#habitat button, #habitat a { -webkit-user-select: none; user-select: none; }
#habitat a { text-decoration: none; }
.scenery,.scene-image,.scene-shade,#viewport,#plane,#knots,#silk { position: absolute; inset: 0; }
.scenery { overflow: hidden; background: #15212f; }
.scene-image { inset: -10px; background-position: 50% 53%; background-size: cover; }
.scene-image.moonlit { background-image: url('/media/scenery/moonlit-wanderings.webp'); }
.scene-image.sundown { background-image: url('/media/scenery/sundown.webp'); }
.scene-image.sea { background-image: url('/media/scenery/sea-breeze.webp'); }
.scene-shade { background: radial-gradient(ellipse at 49% 43%, #20233312 0%, #10192b18 47%, #08101b80 100%), linear-gradient(to bottom,#0d172ac4 0%,#16213a67 15%,#202c4363 50%,#10162677 75%,#09101be8 100%); }
.scenery::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .26; background: url('/media/ui/grain.png'); }
#viewport { touch-action: none; overflow: hidden; cursor: grab; }
#viewport.panning, #viewport.pulling, #viewport.pulling .knot { cursor: grabbing; }
#plane { transform-origin: 0 0; }
#silk { display: block; pointer-events: none; }
#knots { pointer-events: none; }
.knot { position: absolute; top: 0; left: 0; display: grid; place-items: center; padding: 0; pointer-events: auto; text-align: center; line-height: 1.08; touch-action: none; -webkit-user-drag: none; }
.knot img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.knot:focus-visible { outline-offset: 5px; }
.knot-label,.resident-name,.resident-caption { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); color: #fff5ec; pointer-events: none; }
.knot-label { padding-top: 6px; width: max-content; max-width: 178px; font: 500 clamp(.91rem,1.35vw,1.32rem)/1.08 var(--serif); letter-spacing: -.024em; text-shadow: 0 1px 3px #050912,0 0 7px #070c15,0 0 12px #10141f; }
.world-view { --lens: clamp(56px,min(7.25vw,12vh),124px); width: calc(var(--lens) * var(--scale-lens,1)); aspect-ratio: 1; border-radius: 50%; z-index: 3; }
.world-view.prime { --scale-lens: 1.26; }
.world-view:nth-child(4) { --scale-lens: 1.12; }
.world-view[data-name="SunDown"] { --focal-x: 98%; }
.world-view[data-name="MoonLit Wanderings"],.world-view[data-name="OutCasted"] { --focal-x: 80%; }
.world-view[data-name="SkyFall"] { --focal-x: 70%; }
.world-bubble {
  position: absolute; inset: 0; padding: 1px; overflow: hidden; border-radius: inherit;
  background: conic-gradient(from -40deg,#e0edf3db,#a0b6d464 14%,#6e83993d 32%,#dab9c990 48%,#adcfdfad 61%,#68829254 75%,#e0edf3db);
  box-shadow: 0 1px 3px #07111f4d;
}
.world-bubble img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--focal-x,50%) center; border-radius: inherit; }
.world-bubble::after {
  content: ''; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse 45% 20% at 31% 6%,#edf7ff33,transparent 86%),
    radial-gradient(ellipse 32% 44% at 102% 76%,#edb8d43b,transparent 89%),
    radial-gradient(ellipse 45% 25% at 25% 103%,#9cdaf045,transparent 92%),
    radial-gradient(circle closest-side,transparent 68%,#111e331c 90%,#14203961);
  box-shadow: inset 1px 2px 2.5px -1px #f1f8ff9c, inset -1px -1px 2px -1px #c2d7ea63;
}
.world-view > .knot-label { pointer-events: auto; }
.world-view:is(:hover,:focus-visible) .knot-label { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.world-seed { width: 26px; height: 26px; z-index: 1; border-radius: 50%; }
.seed { position: relative; display: block; width: 8px; height: 6px; transform: rotate(-19deg); }
.seed::before,.seed::after { content: ''; position: absolute; inset: 1px 0; border: 1px solid #d1cfdeb3; border-radius: 60%; transform: rotate(39deg); }
.seed::after { transform: rotate(-36deg); border-color: #a4a6b9c9; }
.world-seed:nth-child(4n) .seed { transform: rotate(21deg) scale(.86); }
.world-seed:nth-child(5n) .seed { transform: rotate(-29deg) scale(1.15); }
.world-seed .knot-label { display: none; top: 90%; padding: 5px 9px; z-index: 1; font: 500 .82rem/1.2 var(--sans); letter-spacing: 0; background: #14202bf2; border: 1px solid #758198; border-radius: 4px; }
.world-seed:is(:focus-visible,:hover) { z-index: 8; }
.world-seed:is(:focus-visible,:hover) .knot-label { display: block; }
.world-seed.left-edge .knot-label { left: 0; transform: none; }
.world-seed.right-edge .knot-label { right: 0; left: auto; transform: none; }
.resident { --resident: clamp(118px,13vw,208px); width: var(--resident); height: calc(var(--resident)*1.14); z-index: 4; }
.resident img { position: relative; width: 100%; height: 100%; object-fit: contain; transform: rotate(-4deg); filter: drop-shadow(1px 4px 3px #080d1c9c) drop-shadow(0 0 2px #eedcffa0); }
.nest-halo { position: absolute; inset: -20%; pointer-events: none; background: radial-gradient(ellipse,#ded5ff30 5%,#b1acd718 42%,transparent 68%); }
.resident-name { top: 94%; width: max-content; font: 500 clamp(1.25rem,2.1vw,2rem)/1.05 var(--serif); letter-spacing: -.06em; text-shadow: 0 2px 4px #0a0d16,0 0 12px #101222; }
.resident-name i { color: #f4c7df; }
.resident-caption { top: calc(94% + clamp(1.28rem,2.22vw,2.1rem)); font-size: .71rem; color: #e2d5e5; width: max-content; text-shadow: 0 1px 4px #111426,0 0 6px #050712; }
.resident:is(:hover,:focus-visible) img { filter: drop-shadow(1px 4px 4px #080d1c8c) drop-shadow(0 0 5px #f1d7ffae); }

.mast {
  --gutter: max(10px,env(safe-area-inset-left),env(safe-area-inset-right));
  position: absolute; z-index: 5; top: max(clamp(10px,1.7vh,20px),env(safe-area-inset-top)); inset-inline: var(--gutter);
  display: grid; justify-items: center; row-gap: 7px; pointer-events: none; text-align: center;
}
.wordmark { min-width: 0; text-shadow: 0 1px 5px #0b101a,0 0 12px #06080b; }
.wordmark h1 { margin: 0; font: 500 clamp(1.95rem,3.3vw,3.4rem)/1.03 var(--serif); letter-spacing: -.05em; }
.wordmark h1 i { color: #f4c7e1; white-space: nowrap; }
.community { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(4px,.65vw,10px); width: min(100%,25rem); }
.community a {
  --tint: #d5e2ff;
  display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 44px; padding: 4px 8px;
  pointer-events: auto; color: var(--tint); font-size: 1rem; font-weight: 650; line-height: 1; border-bottom: 1px solid color-mix(in srgb,var(--tint) 52%,transparent);
  border-radius: 5px; background: linear-gradient(#101a2b82,#0e1727ca);
}
.community .support { --tint: #f5d4d2; } .community .shop { --tint: #f6dfc1; }
.community img { width: 23px; height: 23px; flex: none; filter: invert(1); }
.community a:is(:hover,:focus-visible) { border-color: var(--tint); background: #111d2fe8; }
.community a:is(:hover,:focus-visible) span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.mast > .dew-tally { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0; color: #e7e2e7; font-size: .76rem; line-height: 1.15; text-shadow: 0 1px 3px #08101c,0 0 6px #0d1724; }
/* reserve space for the counter so the first pickup doesn't shift the web */
.dew-tally[aria-hidden="true"] { visibility: hidden; }
.dew-tally > svg { width: 12px; height: 17px; flex: none; }
.dew-tally > b { color: #fcf3ea; font-weight: 600; font-variant-numeric: tabular-nums; }
.edge-tools { position: absolute; z-index: 6; left: max(24px,env(safe-area-inset-left)); right: max(24px,env(safe-area-inset-right)); bottom: max(13px,env(safe-area-inset-bottom)); display: grid; align-items: end; grid-template-columns: 1fr auto 1fr; gap: 12px; pointer-events: none; }
.edge-tools>* { pointer-events: auto; }
.visits-locket { justify-self: start; align-self: end; display: inline-flex; align-items: center; min-height: 46px; padding: 2px 8px 5px 0; text-shadow: 0 1px 4px #060a11,0 0 9px #080b16; }
.visits-locket strong,.visits-locket small { display: block; }
.visits-locket strong { font: 500 clamp(1.45rem,2.2vw,2.15rem)/1.05 var(--serif); color: #f5e9e4; letter-spacing: -.016em; }
.visits-locket small { font-size: .75rem; color: #ded3df; }
.visits-locket:hover strong { color: #ffe2ac; }
.toolbox { text-align: center; pointer-events: none; }
.scene-caption { display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 4px; color: #e5e0e6; font: 500 .77rem/1.3 var(--sans); text-shadow: 0 1px 3px #080d16,0 0 7px #030910; }
#whisper { margin: 0; }
#rain-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; min-height: 24px; padding: 2px 5px; pointer-events: auto; border: 0; border-radius: 3px; background: transparent; font: inherit; color: #cbd0da; text-shadow: inherit; }
#rain-toggle:is(:hover,:focus-visible) { background: #142030; color: #fff; }
#rain-toggle[aria-pressed="true"] .play, #rain-toggle[aria-pressed="false"] .pause { display: none; }
.tool-line { display: flex; align-items: stretch; justify-content: center; gap: 5px; width: fit-content; max-width: 100%; margin-inline: auto; padding: 3px 12px 5px; pointer-events: auto; border: 1px solid #96a3b345; background: #101a26ec; border-radius: 10px; }
.tool { padding: 1px 5px 0; display: inline-flex; align-items: center; flex-direction: column; justify-content: center; gap: 2px; position: relative; color: #f0edf1; background: none; border: 0; border-radius: 5px; font: 600 .75rem/1.22 var(--sans); min-width: 66px; cursor: pointer; }
.tool-art,.print-stack,.scenic-tile { display: block; position: relative; width: 36px; height: 34px; object-fit: contain; }
#spider-toggle { min-width: 7em; min-height: 44px; white-space: nowrap; }
#spider-toggle .tool-art { width: auto; aspect-ratio: 1; background: url('/media/creature/spider-stride.svg') left center / 1300% 100% no-repeat; }
#spider-toggle.is-off .tool-art { background: url('/media/ui/instruments/spider-off.svg') center / contain no-repeat; }
.print-stack img,.scenic-tile img { position: absolute; width: 30px; height: 20px; left: 1px; top: 7px; object-fit: cover; border: 1px solid #ded7cc; box-shadow: 0 1px 2px #111722; }
.print-stack img:first-child { transform: rotate(-12deg) translate(-2px,-2px); }
.print-stack img+img { transform: rotate(5deg) translate(4px,3px); }
.scenic-tile img { width: 33px; height: 22px; top: 6px; border: 2px solid #b9a088; border-radius: 2px; }
.tool:is(:hover,:focus-visible) { color: #f6d1e6; }
.plain-link,.plain-return { color: #f5c6df; text-underline-offset: 4px; }
.plain-return { display: inline-block; margin: 24px; }
.skip-link { position: fixed; z-index: 15; left: 12px; top: -160px; padding: 14px 18px; background: #eee3d5; color: #152136; border-radius: 5px; }
.skip-link:focus { top: 8px; }
.arrival,.lost { display: grid; place-items: center; align-content: center; gap: 12px; padding: 26px; text-align: center; }
.arrival p,.lost h1 { margin: 0; font: 500 2rem var(--serif); }
.lost { min-height: 100vh; }
.web-ready .arrival { display: none; }
@media (max-width:850px) {
  .edge-tools { left: max(15px,env(safe-area-inset-left)); right: max(15px,env(safe-area-inset-right)); }
  .tool { min-width: 55px; }
  .tool-line { gap: 0; }
}
@media (max-width:650px) and (orientation:portrait) {
  .mast { top: max(8px,env(safe-area-inset-top)); row-gap: 5px; }
  .wordmark h1 { font-size: clamp(1.7rem,7.1vw,2.45rem); }
  .community { width: min(100%,22rem); }
  .community a { gap: 5px; padding-inline: 3px; font-size: clamp(.85rem,3.7vw,.94rem); }
  .community img { width: 20px; height: 20px; }
  .mast > .dew-tally { font-size: .71rem; }
  .dew-tally > svg { width: 10px; height: 14px; }
  .world-view { --lens: clamp(44px,min(14.2vw,9.3vh),83px); }
  .knot-label { max-width: clamp(85px,26vw,136px); padding-top: 3px; font-size: clamp(.78rem,3.25vw,.99rem); }
  .world-view.prime .knot-label { max-width: min(35vw,156px); }
  .world-seed { width: 25px; height: 25px; }
  .world-seed .seed { scale: .86; }
  .resident { --resident: clamp(77px,24vw,133px); }
  .resident-name { font-size: clamp(1.05rem,5.15vw,1.55rem); }
  .resident-caption { top: calc(94% + clamp(1.12rem,5.35vw,1.65rem)); font-size: .62rem; }
  .edge-tools { display: flex; flex-direction: column; align-items: center; gap: 3px; bottom: max(7px,env(safe-area-inset-bottom)); }
  .visits-locket { align-self: center; padding: 2px 6px; min-height: 25px; }
  .visits-locket>span:last-child { display: flex; align-items: baseline; gap: 5px; }
  .visits-locket strong { font-size: 1.16rem; } .visits-locket small { font-size: .65rem; }
  .scene-caption { font-size: .70rem; margin-bottom: 2px; }
  .tool-line { gap: 4px; padding: 4px 7px; }
  .tool { min-width: clamp(52px,16vw,72px); min-height: 42px; font-size: .68rem; }
  .tool-art,.print-stack,.scenic-tile { height: 30px; }
}
@media (max-height:550px) and (orientation:landscape) {
  .mast { top: max(4px,env(safe-area-inset-top)); row-gap: 2px; }
  .wordmark h1 { font-size: clamp(1.16rem,5.3vh,1.65rem); line-height: 1; }
  .community { width: min(100%,22rem); gap: 5px; }
  .community a { gap: 6px; padding: 2px 5px; font-size: .875rem; }
  .community img { width: 20px; height: 20px; }
  .mast > .dew-tally { font-size: .69rem; } .dew-tally > svg { width: 10px; height: 14px; }
  .edge-tools { bottom: max(4px,env(safe-area-inset-bottom)); } .scene-caption { font-size: .68rem; margin-bottom: 1px; }
  .tool { font-size: .66rem; min-height: 36px; } .tool-line { padding-block: 1px; }
  .tool-art,.print-stack,.scenic-tile { height: 25px; }
  .world-view { --lens: clamp(44px,13vh,58px); }
  .resident { --resident: clamp(54px,16.4vh,80px); } .resident-name { font-size: clamp(.94rem,4vh,1.12rem); } .resident-caption { display: none; }
  .knot-label { max-width: min(21vw,130px); padding-top: 3px; font-size: clamp(.72rem,3.15vh,.8rem); }
  .visits-locket strong { font-size: 1.2rem; } .visits-locket small { font-size: .62rem; }
}
@media (prefers-reduced-motion:no-preference) {
  .tool-art,.print-stack,.scenic-tile { transition: transform .2s ease-out; }
  .tool:is(:hover,:focus-visible) :is(.tool-art,.print-stack,.scenic-tile) { transform: translateY(-2px); }
}
@media (forced-colors:active) and (prefers-color-scheme:light) {
  .community img { filter: none; }
}
