@font-face{font-family:Pixelify;src:url("assets/fonts/PixelifySans.woff2") format("woff2"),url("assets/fonts/PixelifySans.ttf") format("truetype");font-weight:400 700;font-display:swap}
@font-face{font-family:"DM Sans";src:url("assets/fonts/DMSans.woff2") format("woff2"),url("assets/fonts/DMSans.ttf") format("truetype");font-weight:100 1000;font-display:swap}
:root{color-scheme:light;--bg:#f5dfbe;--rail:#66344a;--ink:#3c2731;--pixel:Pixelify,monospace;--sans:"DM Sans",Arial,sans-serif;--serif:Georgia,"Times New Roman",serif;--post-stripe:url("assets/interface/post-tape.webp")}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
html.game-expanded,html.game-expanded body{overflow:hidden;overscroll-behavior:none}
body{font-family:var(--sans);background-color:var(--bg);color:var(--ink);background-image:none;isolation:isolate}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible{outline:3px solid #1889a0;outline-offset:4px}
button[hidden],[hidden]{display:none!important}
.symbol-bank{position:absolute;width:0;height:0;overflow:hidden}
.icon{display:inline-block;flex:none;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.wrap{width:calc(100% - clamp(60px,14vw,288px));max-width:1390px;margin:auto}
.header-content{height:74px;display:flex;justify-content:space-between;align-items:center}
.brand,.header-actions,.utility,.location,.scoreboard,.counter,.guide-heading,.guide-heading h2,.control-list,.control-list>span,.rail-actions,.rail-actions button,.mobile-controls-label{display:flex;align-items:center}
.rail-actions button:hover{color:#9d3a58}
.main{padding:25px 0 46px}
.machine{background:var(--rail);border:2px solid #653248;border-radius:13px;box-shadow:0 0 0 2px #f9d790,0 0 0 3px #9d745a,0 5px 0 2px #713f48,0 12px 25px #59382e42;position:relative;isolation:isolate}
.machine-rail,.control-rail{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 22px;background:linear-gradient(90deg,#5d3046,#7b4054 55%,#603248);color:#ffefd8}
.machine-rail{min-height:50px;border-radius:10px 10px 0 0;border-bottom:2px solid #d5a965}
.location{gap:13px;font:600 19px/1 var(--pixel);letter-spacing:.1px;color:#ffefd6}
.world-label{font:700 11px/1 var(--pixel);letter-spacing:1.35px;color:#ffe1ab;display:inline-flex;gap:5px;align-items:center;white-space:nowrap}
#clearing-stamp{flex:none;width:34px;height:23px;object-fit:cover;padding:1px;background:#fff1cc;border:1px dashed #a57263;box-shadow:0 0 0 1px #f5d39e;transform:rotate(-4deg)}
.location-slash{font:400 17px/1 var(--pixel);color:#d39aa5}
.scoreboard{gap:19px;white-space:nowrap}
.life-meter{display:inline-flex;align-items:center;gap:4px}
.life-meter img{height:18px;width:18px;image-rendering:pixelated}
.life-meter img.lost{filter:grayscale(1) brightness(.65);opacity:.45}
.rail-sep{height:15px;width:1px;background:#bd8491}
.counter{gap:7px;font:550 16px/1 var(--pixel)}
.counter small{font:500 14px/1 var(--pixel);color:#ebc8cf}
.counter b{font-weight:600}
.counter img{object-fit:contain;filter:drop-shadow(0 1px 1px #1116)}
.heart-icon{width:29px;height:24px}.bear-icon{width:21px;height:24px}
.scene{width:100%;position:relative;overflow:hidden;isolation:isolate;aspect-ratio:2.75;background:#4f3449}
#world,.title-screen{position:absolute;inset:0;width:100%;height:100%}
#world{display:block;outline:0;touch-action:none}
#scene-loading:not([hidden]){position:absolute;inset:0;z-index:3;display:grid;place-items:center;background:#463244;color:#fff0d2;font:600 18px/1.4 var(--serif);text-align:center}
.title-screen{display:flex;align-items:center;background-image:url("assets/interface/heartwood-cover.webp");background-position:center;background-size:cover}
.title-music{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;gap:7px;min-height:36px;padding:0 12px;border:1px solid #ddbe88;border-radius:20px;color:#fff4d8;background:#442c40ef;font:650 14px/1 var(--pixel);box-shadow:0 2px 0 #322335}
.title-music .icon{width:16px;height:16px;color:#ffce83}
.title-music:hover,.title-music:focus-visible{background:#6f4053}
@media(pointer:coarse){.title-music{min-height:44px}}
@media(max-width:520px){.title-music{right:auto;bottom:auto;left:8px;top:8px}}
.title-screen::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#071b202d,#0823220a 42%,transparent 54%);pointer-events:none}
.intro-content{position:relative;width:46%;display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 2%;margin-top:-.3%}
h1{margin:0}
.intro-content h1{width:89%;max-width:570px;line-height:0;filter:drop-shadow(0 6px 0 #09211d4d)}
.game-logo{width:100%;height:auto;display:block}
.intro-content p{margin:clamp(8px,1vw,17px) 0 clamp(13px,1.35vw,23px);font-size:clamp(12px,1.12vw,17px);font-weight:600;line-height:1.4;color:#fff6d7;text-shadow:0 2px 3px #211725,0 0 9px #151426}
.game-button{display:inline-flex;align-items:center;justify-content:center;gap:11px;min-height:46px;padding:7px 23px 9px;border:2px solid #63263d;border-radius:8px;font:650 clamp(19px,1.55vw,25px)/1.08 var(--pixel);letter-spacing:-.45px;color:#fff8e5;background:linear-gradient(#b74868,#983758);box-shadow:inset 0 2px 0 #e98f9e,inset 0 -2px 0 #842b4c,0 3px 0 #622a40,0 5px 0 #361f3036;transition:transform .12s,filter .12s}
.game-button:hover{filter:brightness(1.08);transform:translateY(-2px)}
.game-button:active{transform:translateY(2px);box-shadow:inset 0 1px 0 #db8390,0 1px 0 #602740}
.game-button .icon{width:16px;height:16px}
.enter-hint{display:flex;gap:6px;align-items:center;margin-top:14px;font-size:11px;letter-spacing:.2px;color:#fff0d4;font-weight:550;text-shadow:0 1px 3px #372536}
kbd{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font:500 13px/1 var(--pixel);min-width:23px;height:22px;padding:1px 5px 2px;border:1px solid #647360;border-bottom-width:2px;border-radius:4px;color:#583649;background:#fff0cf;border-color:#b78d77}
.enter-hint kbd{background:#533048d9;border-color:#d4a287;color:#fff3db;min-width:31px;height:18px;font-size:11px;padding:1px 3px}
.control-rail{border-top:2px solid #bc8b68;border-radius:0 0 10px 10px;min-height:50px;background:linear-gradient(90deg,#fff0d3,#f2d8b2);color:#563544}
.control-list{color:#5d4046;font-size:12px;font-weight:550}
.control-list>span{gap:6px}
.control-list>span kbd+kbd{margin-left:-3px}
.control-list .gamepad{color:#824457;width:20px;height:20px}
.rail-actions{gap:18px}
.rail-actions button,.mobile-controls-label{font:600 12px/1 var(--sans);gap:7px;color:#6c394b;padding:7px 0}
.rail-actions .icon,.mobile-controls-label .icon{width:16px;height:16px}
.mobile-controls-label{display:none}
.ledge-guide{display:none;align-items:center;gap:12px;color:#71354b;font:600 12px var(--sans)}
.ledge-guide span{display:flex;align-items:center;gap:4px;white-space:nowrap}
.machine[data-mode="playing"][data-hanging="true"] .control-list,.machine[data-mode="playing"][data-hanging="true"] .mobile-controls-label{display:none}
.machine[data-mode="playing"][data-hanging="true"] .ledge-guide{display:flex}
.field-guide{margin-top:31px;position:relative;isolation:isolate;padding:19px 23px 22px;filter:drop-shadow(0 4px 4px #613c2938)}
.guide-heading{justify-content:space-between;flex-wrap:wrap;gap:8px 20px;margin-bottom:14px;border-bottom:1px solid #c9a688;padding-bottom:10px}
.guide-heading h2{gap:11px;font:italic 700 29px/1.14 var(--serif);letter-spacing:-1px;margin:0;color:#693249}
.guide-heading h2 .icon{width:22px;height:22px;color:#94445f;stroke-width:1.75}
.guide-tabs{display:flex;padding:3px;background:#f4ddbd;border:1px solid #c39b78;border-radius:5px;gap:3px}
.guide-tabs button{padding:5px 12px;border-radius:3px;color:#64434b;font-size:12px;line-height:1.35;font-weight:700}
.guide-tabs button[aria-selected=true]{background:#803a55;color:#fff4da;box-shadow:inset 0 0 0 1px #78314b}
.guide-tabs button:hover{color:#61223c}
.entries{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.entry{display:flex;align-items:center;gap:12px;padding:15px;min-height:100px;border-radius:4px;border:1px solid #cfad85;background:linear-gradient(120deg,#fff9e8,#fff2d9);box-shadow:0 2px 0 #b58b6626}
.entry-sprite{width:52px;min-width:52px;height:54px;display:flex;align-items:center;justify-content:center;position:relative;background:url("assets/interface/post-specimen.webp") center / contain no-repeat}
.entry-sprite img{position:relative;object-fit:contain;max-width:100%;max-height:100%;filter:drop-shadow(0 2px 1px #6f4a3524)}
.entry[data-kind="heart"] .entry-sprite img{width:72px}
.entry[data-kind="bear"] .entry-sprite img{height:62px}
.entry[data-kind="springcap"] .entry-sprite img{height:49px}
.entry h3{font:700 20px/1.1 var(--serif);letter-spacing:-.5px;margin:0 0 5px;color:#643248}
.entry-place{display:block;color:#86514b;font-size:10px;line-height:1.3;margin-bottom:5px;letter-spacing:.3px;font-weight:700}
.entry p{font-size:13px;font-weight:450;color:#5c4843;margin:0;line-height:1.45;max-width:28ch}
.scene-toast{opacity:0;pointer-events:none;position:absolute;top:15px;left:50%;transform:translate(-50%,-5px);text-align:center;color:#fff4da;background:#552d44f5;padding:8px 14px;border-radius:5px;border:1px solid #efc68d;font:550 16px/1.2 var(--pixel);transition:opacity .15s,transform .15s;max-width:90%;z-index:2}
.scene-toast.visible{opacity:1;transform:translate(-50%,0)}
#world-bubble{
  position:absolute;left:0;top:0;z-index:2;pointer-events:none;width:max-content;
  max-width:min(26ch,calc(100% - 24px));padding:7px 12px 8px;
  color:#4a2c3b;background:#fff3d6;border:2px solid #774958;border-radius:11px 13px 10px 12px;
  box-shadow:inset 0 0 0 2px #fffaf0,0 2px 0 #462b3a59;
  font:650 clamp(13px,1.05vw,16px)/1.28 var(--sans);text-wrap:pretty;
}
#world-bubble::after{
  content:"";position:absolute;left:var(--tail);bottom:-6px;width:10px;height:10px;
  transform:translateX(-50%) rotate(45deg);background:#fff3d6;
  border-right:2px solid #774958;border-bottom:2px solid #774958;border-radius:0 0 2px;
}
#world-bubble[data-tail="up"]::after{bottom:auto;top:-6px;transform:translateX(-50%) rotate(225deg)}
#world-bubble:is([data-tail="left"],[data-tail="right"])::after{
  bottom:auto;top:var(--tail);width:3px;height:10px;
  transform:translateY(-50%);border:0;border-radius:0;
}
#world-bubble[data-tail="left"]::after{left:-2px}
#world-bubble[data-tail="right"]::after{left:auto;right:-2px}
.machine:not([data-mode="playing"]) #world-bubble{display:none}
@media (max-width:520px),(orientation:landscape) and (max-height:580px){
  #world-bubble{max-width:min(25ch,67%);font-size:13px;padding:6px 9px}
}
.shield-status{position:absolute;top:12px;left:12px;z-index:2;display:flex;align-items:center;gap:6px;padding:5px 9px;pointer-events:none;border:1px solid #d9b378;border-radius:6px;background:#6d314cf0;color:#fff0cb;font:600 15px/1 var(--pixel);box-shadow:0 2px 0 #1727208c;border-color:#efbb8a}
.shield-status .icon{width:17px;height:19px}
.shield-status b{min-width:2ch;color:#ffbacf;text-align:right}
@media(max-width:800px){
  .shield-status{top:8px;left:8px}
  .scene-toast{top:8px;left:auto;right:8px;width:max-content;max-width:57%;padding:5px 8px;font-size:12px;text-align:left;transform:translateY(-4px)}
  .scene-toast.visible{transform:translateY(0)}
}
.play-area{position:relative}
.touch-controls{display:none;justify-content:space-between;align-items:center;gap:8px;padding:10px clamp(7px,2.3vw,24px) 12px;background:linear-gradient(#744354,#583446);border-top:2px solid #d4a572;user-select:none;-webkit-user-select:none;touch-action:none}
.touch-controls button{width:100%;height:100%;touch-action:none;min-width:0;min-height:0;padding:0 2px;border:1px solid #e3b997;border-bottom:3px solid #aa7c71;border-radius:12px;box-shadow:0 2px 0 #3d2030;color:#653347;background:linear-gradient(#fff4dc,#ead3b4);font:650 clamp(16px,4.4vw,20px)/1 var(--pixel)}
#dpad{--diameter:clamp(136px,38vw,174px);position:relative;isolation:isolate;flex:none;width:var(--diameter);height:var(--diameter);border-radius:50%;touch-action:none;-webkit-tap-highlight-color:transparent}
.dpad-surface{position:absolute;inset:0;width:100%;height:100%;background:url("assets/interface/controller-compass.webp") center / contain no-repeat;pointer-events:none}
#dpad button{position:absolute;inset:auto;display:block;padding:0;margin:0;border:0;background:none;box-shadow:none;outline:0;transform:none;border-radius:0;-webkit-tap-highlight-color:transparent}
#dpad [data-action="up"],#dpad [data-action="down"]{left:0;width:100%;height:50%}
#dpad [data-action="left"],#dpad [data-action="right"]{top:0;width:50%;height:100%}
#dpad [data-action="up"]{top:0;clip-path:polygon(0 0,100% 0,50% 100%)}
#dpad [data-action="down"]{bottom:0;clip-path:polygon(50% 0,100% 100%,0 100%)}
#dpad [data-action="left"]{left:0;clip-path:polygon(0 0,100% 50%,0 100%)}
#dpad [data-action="right"]{right:0;clip-path:polygon(100% 0,100% 100%,0 50%)}
#dpad button span{position:absolute;top:0;left:0;width:var(--diameter);height:var(--diameter);opacity:0;background:url("assets/interface/controller-compass-lit.webp") center / contain no-repeat;pointer-events:none}
#dpad [data-action="down"] span{top:auto;bottom:0}
#dpad [data-action="right"] span{left:auto;right:0}
.machine[data-can-climb="true"] #dpad :is([data-action="up"],[data-action="down"]) span{opacity:.62}
.machine[data-portal-dir="up"] #dpad [data-action="up"] span,.machine[data-portal-dir="down"] #dpad [data-action="down"] span{opacity:.87}
.machine #dpad button[data-action]:is(:focus-visible,.pressed) span{opacity:1;filter:brightness(1.12)}
#dpad button:focus-visible span{outline:3px solid #fff4b7;outline-offset:-6px;border-radius:50%}
.charm-lock{display:none}
.machine[data-has-bow="false"] .charm-lock{display:inline-block;width:13px;height:14px}
.machine[data-has-bow="false"] .charm-key{color:#735d64}
.machine[data-has-bow="false"] .charm-key kbd{background:#f1e4d4;color:#736270;border-style:dashed;border-color:#af9894}
.charm-recharging .charm-key kbd{filter:saturate(.45) brightness(.76)}
.veil{position:absolute;inset:0;display:grid;place-items:center;background:#301b32a6;backdrop-filter:blur(3px);z-index:3}
.menu-panel,dialog{color:var(--ink);text-align:center;background:var(--post-stripe) top / 132px 7px repeat-x,linear-gradient(140deg,#fff7e2,#f6deb8);border:2px solid #9d715d;border-radius:6px 12px 8px 10px;box-shadow:inset 0 0 0 3px #fff0ce,0 4px 0 #794652,0 14px 40px #351b335c}
.menu-panel{padding:22px 30px;max-width:min(92%,420px)}
.menu-panel h2,dialog h2{font:700 32px/1.1 var(--serif);margin:6px 0;color:#70344e;letter-spacing:-.9px}
.menu-panel p,dialog p{font-size:14px;line-height:1.5;color:#5d4644;margin:8px 0 18px}
.menu-sigil img{width:43px;height:35px;object-fit:contain}
.menu-sigil .icon{width:26px;height:26px;color:#9f4861}
.menu-secondary{display:block;margin:13px auto 0;font-size:13px;text-decoration:underline;text-underline-offset:3px;color:#79374e;font-weight:650}
.menu-links{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0 clamp(8px,3vw,22px)}
.menu-links .menu-secondary{margin:13px 0 0}
#world-interaction{position:absolute;z-index:4;left:50%;bottom:10px;transform:translateX(-50%);max-width:70%;min-height:36px;padding:5px 15px;border:2px solid #805167;border-radius:18px;background:#ffefce;color:#603048;box-shadow:0 2px 0 #542d46;font:650 16px/1.12 var(--pixel);white-space:normal}
#world-interaction:hover,#world-interaction:focus-visible{background:#fff8df}
#map-party{margin:12px auto 0;min-height:40px}
#tea-party{padding:0;overflow:auto;width:min(850px,calc(100vw - 24px));max-height:94dvh}
.party-heading{position:relative;padding:13px 54px 9px}
.party-heading h2{margin:0;font-size:clamp(22px,3vw,34px)}
#party-close{top:5px;right:6px;width:43px;height:43px;font:500 29px/1 var(--sans)}
#party-picture{display:block;width:100%;height:auto;background:#797f46;border-block:2px solid #ad8067}
@media(orientation:portrait) and (max-width:560px){#party-picture{aspect-ratio:1.58;object-fit:cover}}
@media(orientation:landscape) and (max-height:580px){#tea-party[open]{display:flex;flex-direction:column}#tea-party .party-heading,#tea-party .party-footer{flex:none}#party-picture{min-height:0;flex-shrink:1;object-fit:cover}}
.party-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 20px 16px;text-align:left}
.party-footer p{margin:0;max-width:60ch;line-height:1.4}
.party-footer button{flex:none}
#party-visit{
  flex:0 0 152px;width:152px;min-width:0;max-width:100%;min-height:44px;padding:6px 8px;
  border:1.5px solid #89644b;border-radius:7px;background:#fff3d7;color:#593c39;
  font:650 14px/1.2 var(--sans);cursor:pointer;color-scheme:light
}
#party-visit:focus-visible{outline:3px solid #397563;outline-offset:2px}
#tea-party.has-guardians .party-footer{gap:12px}
@media(orientation:portrait) and (max-width:560px){
  #tea-party.has-guardians .party-footer{display:flex;flex-wrap:wrap;gap:8px}
  #tea-party.has-guardians .party-footer p{flex:1 0 100%}
  #tea-party.has-guardians #party-visit{flex:1 1 116px}
  #tea-party.has-guardians #party-seat{flex:1 1 100px;min-height:44px;padding-inline:7px}
}
@media(max-width:560px){.party-footer{display:grid;gap:9px;padding:10px 13px 13px}.party-footer p{font-size:13px}.party-footer button{justify-self:start}.party-heading{padding:12px 43px 9px}#world-interaction{min-height:44px;max-width:72%;font-size:15px}}
@media(orientation:landscape) and (max-height:580px){#tea-party{width:min(calc((100dvh - 100px)*2.04),calc(100vw - 22px));max-height:98dvh}.party-heading{padding:7px 42px 5px}.party-heading h2{font-size:22px}#party-close{top:0;height:36px}.party-footer{display:flex;padding:5px 11px 8px;gap:10px}.party-footer p{font-size:12px}.party-footer .game-button{min-height:39px;padding:3px 10px;font-size:16px}.touch-device #world-interaction{bottom:var(--safe-bottom,8px);min-height:44px;max-width:32%;padding-inline:9px}}
@media(orientation:landscape) and (max-height:580px){
  #tea-party.has-guardians[open]{display:grid;align-items:center;grid-template-columns:minmax(0,2.35fr) minmax(152px,.88fr);width:min(890px,calc(100vw - 20px));padding-bottom:8px}
  #tea-party.has-guardians .party-heading{grid-column:1/-1}
  #tea-party.has-guardians #party-picture{object-fit:contain;height:auto;align-self:center}
  #tea-party.has-guardians .party-footer{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:5px 10px}
  #tea-party.has-guardians #party-visit{flex:none;width:100%;min-height:44px;font-size:13px;padding-inline:5px}
  #tea-party.has-guardians #party-seat{min-height:44px}
}
.veil{grid-template-rows:minmax(0,1fr);padding:5px}
.menu-panel{max-height:100%;overflow-y:auto}
.machine[data-biome="cavern"] .world-label{color:#d5e7ff}
.machine[data-mode="cleared"] .menu-panel,.machine[data-mode="won"] .menu-panel{padding:18px 24px}
.machine[data-mode="cleared"] .menu-panel h2,.machine[data-mode="won"] .menu-panel h2{font-size:clamp(22px,2.2vw,30px)}
.machine[data-mode="cleared"] #menu-primary{font-size:clamp(16px,1.65vw,22px)}
#trail-map{width:min(800px,calc(100% - 24px));max-height:min(92dvh,850px);padding:0;overflow:hidden;text-align:left;background:var(--post-stripe) top / 132px 7px repeat-x,linear-gradient(130deg,#fff7e2,#f7e4c5)}
#trail-map[open]{display:flex;flex-direction:column}
.trail-map-heading{display:flex;align-items:center;gap:12px;flex:none;position:relative;padding:18px 54px 12px 22px;border-bottom:1px solid #d5b796}
#trail-title{display:flex;align-items:center;gap:9px;flex:1;min-width:0;margin:0;font-size:clamp(21px,3.2vw,31px)}
#trail-title .icon{height:26px;width:26px;flex:none;color:#8a4056}
#trail-chapters{max-width:190px;min-width:0;min-height:36px;border:1px solid #b78d70;border-radius:5px;padding:4px 5px;color:#6b3b47;background:#fff7e5;font:650 13px/1.25 var(--sans)}
.trail-map-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;position:relative;scrollbar-color:#ac896b #ead5ad}
#trail-atlas{position:relative;isolation:isolate;background-color:#f6e6be}
#trail-paper{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:center top;opacity:.6;pointer-events:none}
#trail-atlas::before{content:"";position:absolute;inset:7px;z-index:-1;pointer-events:none;border:1px solid #a482533b;border-radius:9px 4px 8px 6px}
#trail-route{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none;overflow:visible}
#trail-route path{fill:none;stroke:#856352;stroke-width:3.25;stroke-dasharray:.1 8;stroke-linecap:round}
#trail-route .route-open{stroke:#8d3f4a;stroke-width:3.8}
#trail-route .route-halo path{stroke:#fff1c6;stroke-width:6}
#trail-stops,.destination-list{list-style:none;margin:0;padding:0}
#trail-stops{position:relative}
.trail-chapter{position:relative;height:252px;isolation:isolate}
.trail-chapter>header{position:absolute;z-index:1;left:5%;top:11px;display:grid;grid-template-columns:auto auto;align-items:baseline;column-gap:10px;max-width:80%;padding:2px 9px 3px 5px;color:#6b3b37;text-shadow:0 1px 2px #fff1c9,0 0 5px #fff2ce,0 0 9px #f7e5bd}
.trail-chapter:nth-child(even)>header{left:auto;right:5%;text-align:right}
.chapter-number,.destination-kind{display:block;color:#765141;font:750 10px/1.2 var(--sans);letter-spacing:1.05px;text-transform:uppercase}
.chapter-number{grid-column:1;grid-row:1}
.trail-chapter h3{grid-column:1/-1;grid-row:2;margin:1px 0 0;font:italic 700 clamp(21px,2.6vw,26px)/1.05 var(--serif);color:#733d40}
.trail-record{grid-row:1;grid-column:2;color:#694c34;font:650 10px/1.25 var(--sans)}
.destination-list>li{position:absolute;left:var(--map-x);top:var(--map-y);width:23%;transform:translateX(-50%)}
.destination-list button{display:flex;flex-direction:column;align-items:center;width:100%;min-height:44px;padding:0;border:0;box-shadow:none;border-radius:14px;background:transparent;color:#562e3f;text-align:center;overflow-wrap:anywhere}
.trail-landmark{display:block;position:relative;width:min(100%,116px);aspect-ratio:4 / 3;flex:none}
.trail-symbol{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1px 1px #7257344d)}
.waypoint-dock{position:absolute;left:50%;bottom:0;display:block;width:20px;height:20px;object-fit:contain;transform:translateX(-50%);filter:drop-shadow(0 1px 1px #694c34)}
.destination-copy{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;padding:3px 1px 5px;background:radial-gradient(ellipse at center,#fff0c4f5 0%,#ffedc3e8 40%,#ffebbd7a 62%,transparent 74%);text-shadow:0 1px 1px #fff4d2,0 0 3px #fff0c8,0 0 5px #fff4d8}
.destination-list button strong{max-width:100%;color:inherit;font:700 clamp(15px,2vw,18px)/1.07 var(--serif)}
.destination-list .destination-status{display:block;max-width:100%;color:#6b4338;font:650 11px/1.19 var(--sans)}
.destination-list button:disabled{opacity:1;cursor:default;color:#5f493d}
.destination-list button:disabled .trail-symbol{filter:saturate(.82) drop-shadow(0 1px 1px #7257344d)}
.destination-list .marked-stop:enabled{color:#244c41}
.destination-list .marked-stop:enabled .waypoint-dock{filter:drop-shadow(0 0 2px #ffe9a0)}
.destination-list .marked-stop:enabled .destination-status{color:#235742}
.destination-list .boss-stop .destination-kind{color:#853a42}
.destination-list button:enabled:hover strong,.destination-list button:focus-visible strong{text-decoration:underline;text-underline-offset:3px}
.destination-list button:enabled:hover .trail-symbol{filter:drop-shadow(0 0 4px #fff2b3) drop-shadow(0 1px 1px #71513299)}
.destination-list button:focus-visible{outline:2px dashed #854157;outline-offset:2px}
.trail-map-footer{flex:none;display:flex;justify-content:center;border-top:1px solid #d5b796;background:#faeacb}
#trail-map #map-party{margin:0;min-height:40px;padding:5px 14px}
@media(max-width:640px){
  .trail-map-heading{flex-wrap:wrap;gap:5px;padding:11px 42px 8px 12px}#trail-title{flex:none;width:100%}#trail-title .icon{width:22px;height:22px}#trail-chapters{min-height:32px;max-width:100%;font-size:12px}
  .trail-chapter{height:410px}.trail-chapter>header,.trail-chapter:nth-child(even)>header{left:5%;right:auto;top:12px;text-align:left}
  .destination-list>li{width:43%}.destination-list>li:nth-child(1){left:24%;top:54px}.destination-list>li:nth-child(2){left:75%;top:82px}
  .destination-list>li:nth-child(3){left:74%;top:236px}.destination-list>li:nth-child(4){left:25%;top:252px}
  .trail-landmark{width:min(100%,93px)}.destination-copy{gap:2px;padding:3px 1px 4px}.destination-list button strong{font-size:16px}
}
@media(max-width:351px){.trail-chapter{height:425px}.trail-landmark{width:79px}.destination-list button strong{font-size:15px}}
@media(orientation:landscape) and (max-height:490px){#trail-map{max-height:96dvh}.trail-map-heading{flex-wrap:nowrap;padding:8px 44px 5px 12px}#trail-title{flex:1;width:auto;font-size:22px}#trail-chapters{max-width:155px;min-height:32px}#trail-map #map-party{min-height:32px}}
.result-line{font:500 15px var(--pixel);margin:0 0 16px;color:#883f55}
dialog{padding:30px;width:min(440px,calc(100% - 28px));max-height:90dvh}
dialog::backdrop{background:#361d35b3;backdrop-filter:blur(4px)}
.dialog-x{position:absolute;right:10px;top:10px;display:grid;place-items:center;width:32px;height:32px;color:#753a50}
.help-symbol{color:#924458;width:28px;height:28px;margin-bottom:5px}
.help-keys{margin:18px 0 20px;text-align:left}
.help-keys div{border-top:1px dashed #bc9d7e;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;font-size:13px}
.help-keys dt{font-weight:650}.help-keys dd{margin:0;color:#684e48}
.touch-tip{display:none}
.machine:fullscreen,.machine.pseudo-fullscreen{display:flex;flex-direction:column;width:100%;height:100dvh;max-width:none;max-height:none;border-radius:0}
.machine:fullscreen .scene,.machine.pseudo-fullscreen .scene{flex:1;min-height:0;aspect-ratio:auto}
.machine:fullscreen .title-screen,.machine.pseudo-fullscreen .title-screen{background-size:cover}
.machine:fullscreen .machine-rail,.machine:fullscreen .control-rail,.machine.pseudo-fullscreen .machine-rail,.machine.pseudo-fullscreen .control-rail{border-radius:0;flex:none}
.machine.pseudo-fullscreen{position:fixed;inset:0;z-index:10}
.machine:not([data-mode="ready"]) .scene{aspect-ratio:2.35}
@media(min-width:1650px){.main{padding-top:32px}.machine-rail,.control-rail{min-height:58px}.field-guide{margin-top:34px}}
@media(max-width:1000px){.wrap{width:calc(100% - 44px)}.main{padding-top:21px}.scene{aspect-ratio:2.5}.machine-rail,.control-rail{padding-inline:15px}.intro-content h1{width:94%}.intro-content{width:46%}.guide-heading h2{font-size:24px}.entry{gap:10px;padding:13px 11px}.entry-sprite{width:51px;min-width:51px;height:48px}.entry p{font-size:12px}.entry h3{font-size:18px}.entries{grid-template-columns:repeat(2,minmax(0,1fr))}.field-guide{margin-top:24px}}
@media(max-width:730px){.wrap{width:calc(100% - 26px)}.main{padding-top:15px}.machine-rail{min-height:43px}.location{gap:7px;font-size:16px}.world-label{font-size:10px;letter-spacing:.6px}.scoreboard{gap:9px}.life-meter{gap:2px}.life-meter img{width:14px;height:14px}.counter{font-size:14px;gap:4px}.counter small{font-size:12px}.heart-icon{width:23px;height:19px}.bear-icon{width:17px;height:20px}.scene{aspect-ratio:2.15}.intro-content{width:47%;padding:0 1%}.intro-content p{max-width:225px;margin:7px 8px 12px;font-size:11px}.game-button{min-height:38px;font-size:18px;padding:5px 14px 7px;gap:7px}.enter-hint{margin-top:9px;font-size:10px}.control-list{gap:11px;font-size:11px}.control-list .gamepad{display:none}.control-list>span{gap:4px}.control-rail{min-height:42px}.entries{gap:8px}.entry{padding:13px 10px}.entry-sprite{width:56px;height:42px}.entry h3{margin-bottom:4px}.guide-heading{margin-bottom:11px}.guide-tabs button{font-size:11px;padding:4px 9px}.rail-actions{gap:10px}}
@media(max-width:520px){.wrap{width:calc(100% - 22px)}.machine-rail,.control-rail{padding-inline:10px}.location{gap:5px;font-size:14px}.world-label{font-size:9px;letter-spacing:.3px}.world-label .icon{display:none}.scoreboard{gap:6px}.rail-sep{height:12px}.life-meter{gap:1px}.life-meter img{width:12px;height:12px}.counter{gap:3px;font-size:13px}.counter small{font-size:11px}.heart-icon{width:21px;height:16px}.bear-icon{width:14px;height:17px}.scene{height:clamp(345px,99vw,470px);aspect-ratio:auto}.title-screen{align-items:flex-end;background-position:73% center}.title-screen::before{background:linear-gradient(0deg,#331e38ed,rgba(54,25,49,.78) 31%,transparent 65%)}.intro-content{width:100%;padding:0 5% 18px;margin:0}.intro-content h1{width:56%;max-width:230px;align-self:flex-start}.intro-content p{align-self:flex-start;font-size:12px;max-width:none;margin:6px 0 11px;text-align:left}.intro-content .game-button{align-self:flex-start;min-height:41px}.enter-hint{display:none}.location-slash{font-size:12px}.machine:not([data-mode="ready"]) .scene{height:clamp(345px,99vw,470px)}.control-list{gap:7px}.control-list>span:nth-last-child(1){display:none}.control-list kbd{height:19px;min-width:17px;padding:1px 3px;font-size:11px}.rail-actions button{font-size:11px}.rail-actions .icon{width:14px;height:14px}.guide-heading h2{gap:7px;font-size:23px}.guide-heading h2 .icon{width:19px;height:19px}.entries{grid-template-columns:1fr}.entry{flex-direction:row;align-items:center;min-height:76px;padding:10px 15px;gap:15px}.entry-sprite{width:48px;min-width:48px;height:46px}.entry p{max-width:none}.menu-panel{padding:20px}.guide-tabs button{padding-inline:7px}.field-guide{margin-top:23px}}
.touch-device .control-list{display:none}.touch-device .mobile-controls-label{display:flex}.touch-device .machine[data-mode="playing"] .touch-controls{display:flex}.touch-device .touch-tip{display:block}.touch-device .enter-hint{visibility:hidden}
@media(pointer:coarse),(max-width:600px){.control-list{display:none}.mobile-controls-label{display:flex}.machine[data-mode="playing"] .touch-controls{display:flex}.touch-tip{display:block}.enter-hint{visibility:hidden}}
@media(max-width:520px){.machine:not([data-mode="ready"]) .scene{aspect-ratio:auto}.location .world-label,.location-slash{display:none}#clearing-stamp{width:23px;height:16px;margin-right:2px}}
@media(max-height:480px) and (orientation:landscape){.machine:fullscreen .scene,.machine.pseudo-fullscreen .scene{height:0}.machine:fullscreen .intro-content h1,.machine.pseudo-fullscreen .intro-content h1{max-width:215px}.menu-panel{padding:10px 25px}.menu-sigil{display:none}.menu-panel h2{font-size:23px}.menu-panel p{margin:5px 0 9px}.machine:fullscreen .enter-hint,.machine.pseudo-fullscreen .enter-hint{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media(max-width:730px),(max-height:480px) and (orientation:landscape){
  .machine[data-mode="cleared"] .menu-panel,.machine[data-mode="won"] .menu-panel{padding:11px 13px;max-width:95%}
  .menu-panel .menu-sigil img{height:24px;width:29px}
  .menu-panel p{margin:5px 0 9px;font-size:12px;line-height:1.4}
  .menu-panel .result-line{margin-bottom:9px;font-size:13px}
  .menu-panel .menu-secondary{margin-top:9px;font-size:12px}
  .menu-panel .game-button{min-height:33px;font-size:17px}
}

/* Illustrated endpaper sits outside the live playfield. */
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:#f6dfbc url("assets/interface/heartwood-endpaper.webp") center center/100% 100% no-repeat}
.guide-tabs button[aria-selected=true]:hover{color:#fff4da}
.field-guide::before{content:"";position:absolute;inset:-4px;z-index:-1;border:18px solid transparent;border-image:url("assets/interface/post-parchment.webp") 20% fill / 18px round;pointer-events:none}
.rail-actions button:hover{color:#a13555}
.machine:fullscreen,.machine.pseudo-fullscreen{border:0;box-shadow:none}
.machine:fullscreen .play-area,.machine.pseudo-fullscreen .play-area{flex:1;min-height:0;display:flex;flex-direction:column}
.touch-controls[inert] button{opacity:.5;box-shadow:none}
#puzzle-button img{width:25px;height:25px;object-fit:contain}
.location,.place-caption{min-width:0}
.place-caption{display:grid;gap:3px}
#switch-count{font:650 11px/1 var(--sans);color:#ffe1aa;letter-spacing:.1px}
#puzzle-button{color:#774356;white-space:nowrap;gap:4px}
#route-note{margin:14px 12px 16px;padding:12px 15px;border:1px dashed #b38768;background:#fff5df;border-radius:4px}
#route-note summary{display:flex;align-items:center;gap:8px;min-height:32px;cursor:pointer;font:650 12px/1.25 var(--sans);color:#79523c}
#route-note summary .icon{width:17px;height:17px}
#route-note summary::after{content:"▾";margin-left:auto}
#route-note[open] summary::after{content:"▴"}
#route-heading{display:inline-block;margin:0 0 0 5px;font:700 16px/1.2 var(--serif);color:#73384e}
#chapter-itinerary{padding-left:21px;margin:4px 0 11px;font:600 14px/1.6 var(--sans);color:#685448}
#chapter-itinerary [aria-current]{font-weight:800;color:#7b3e54}
#chapter-itinerary img{width:19px;height:19px;object-fit:contain;vertical-align:middle;margin-left:5px}
#route-rooms{display:flex;flex-wrap:wrap;gap:7px 15px;list-style:none;padding:0;margin:0}
#route-rooms li{display:grid;grid-template-columns:22px 1fr;column-gap:6px;align-items:center;font:650 13px var(--sans)}
#route-rooms li img{grid-row:span 2;width:22px;height:24px;object-fit:contain}
#route-rooms li small{font:550 11px var(--sans);color:#775951}
#route-rooms li[aria-current]{color:#7b3e54;font-weight:800}
#route-clue{margin:10px 0 0;font-size:13px}
.touch-actions button:active,.touch-actions button.pressed{transform:translateY(2px);box-shadow:none}
.control-list{flex-wrap:wrap;gap:4px clamp(9px,1.45vw,24px);min-width:0;padding-block:5px}
.rail-actions{flex:none;white-space:nowrap}
@media(max-width:1200px){.control-list>span:last-child{display:none}}
@media(pointer:coarse),(max-width:600px){
  .machine:not([data-mode="ready"]) .touch-controls{display:flex}
  .machine:not([data-mode="ready"]) .scene{height:clamp(195px,min(96vw,calc(100svh - 307px)),465px);aspect-ratio:auto}
  .touch-controls{padding-left:max(7px,env(safe-area-inset-left));padding-right:max(7px,env(safe-area-inset-right))}
  .rail-actions{gap:6px;margin-left:auto}
  .rail-actions button{min-width:44px;min-height:44px;justify-content:center}
  .machine:not([data-mode="ready"]) .mobile-controls-label{display:none}
  .machine[data-mode="playing"][data-hanging="true"] .ledge-guide{display:none}
  .machine:not([data-mode="ready"]) .rail-actions{width:100%;justify-content:space-between}
  .dialog-x{width:44px;height:44px;right:4px;top:5px}
  .game-button,.menu-panel .game-button,.guide-tabs button,.menu-links button{min-height:44px}
  .menu-links .menu-secondary{margin-top:2px}
}
@media (orientation:landscape) and (min-width:540px) and (max-height:600px){
  .touch-device .machine:not([data-mode="ready"]) .play-area{--wing:clamp(149px,22vw,206px);display:grid;grid-template-columns:var(--wing) minmax(0,1fr) var(--wing);background:linear-gradient(#734255,#593648)}
  .touch-device .machine:not([data-mode="ready"]) .scene{grid-area:1/2;width:100%;height:clamp(190px,calc(100svh - 158px),410px);min-height:0;aspect-ratio:auto}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .scene{height:100%}
  .touch-device .machine:not([data-mode="ready"]) .touch-controls{display:flex;grid-area:1/1/2/4;padding:3px;border:0;pointer-events:none;background:none}
  .touch-device .touch-actions{pointer-events:auto}
  .touch-device #dpad{--diameter:calc(var(--wing) - 6px);pointer-events:auto}
}
@media(min-width:1001px){.machine-rail{padding-inline:30px;position:relative}
  .machine-rail::before,.machine-rail::after{content:"";position:absolute;top:4px;width:19px;height:19px;background:url("assets/interface/post-corner.webp") center / contain no-repeat;pointer-events:none}
  .machine-rail::before{left:4px}.machine-rail::after{right:4px;transform:scaleX(-1)}
  .machine:is(:fullscreen,.pseudo-fullscreen) .machine-rail::before,.machine:is(:fullscreen,.pseudo-fullscreen) .machine-rail::after{display:none}
}
@media(max-width:730px){.field-guide{padding:12px 13px 14px}.guide-heading{column-gap:9px}.entry h3{font-size:18px}}
@media(max-width:520px){body::before{background-size:auto 100%;background-position:80% center}.wrap{width:calc(100% - 24px)}.field-guide{padding-inline:11px}.guide-tabs button{padding:5px 7px}.entry-sprite{height:46px}.field-guide::before{inset:-3px}.guide-heading{gap:7px}.guide-heading h2{font-size:23px}}

/* The three secondary caps arc around the larger jump button. */
#action-face{
  --face-size:var(--action-face-size,clamp(132px,38vw,180px));
  position:relative;display:block;flex:none;width:var(--face-size);height:calc(var(--face-size) * 1.07);
}
#action-face button{
  --cap:calc(var(--face-size) * .395);--tile:0%;--ink:#fff6dc;
  position:absolute;display:flex;align-items:flex-end;justify-content:center;
  width:var(--cap);height:var(--cap);padding:0 0 calc(var(--cap) * .17);border:0;border-radius:50%;
  color:var(--ink);background:transparent url("assets/interface/controller-actions.webp") var(--tile) center / 500% 100% no-repeat;
  text-shadow:0 1px 1px #482b3e;box-shadow:none;
  font:650 clamp(12px,calc(var(--face-size) * .083),16px)/1 var(--pixel);
  touch-action:none;-webkit-tap-highlight-color:transparent;
}
#action-face button>*{pointer-events:none}
#action-face [data-action="melee"]{left:0;top:22%}
#action-face [data-action="charm"]{left:40%;top:0;--tile:25%}
.machine[data-has-bow="false"] #action-face [data-action="charm"]{--tile:100%}
#action-face [data-action="dash"]{left:5%;bottom:0;--tile:50%}
#action-face [data-action="jump"]{
  --cap:calc(var(--face-size) * .52);--tile:75%;--ink:#482d36;
  right:0;top:44%;font-size:clamp(16px,calc(var(--face-size) * .119),22px);font-weight:700;text-shadow:0 1px 1px #ffdda1;
}
#action-face button.pressed{transform:translateY(2px);filter:brightness(1.18)}
.charm-recharging #action-face [data-action="charm"]{filter:saturate(.4) brightness(.91)}
#action-face button:focus-visible{outline:2px solid #fff1b0;outline-offset:2px}
@media (orientation:portrait){
  .touch-device .touch-controls{
    container-type:inline-size;gap:6px;padding-block:6px 8px;
    padding-inline:max(5px,env(safe-area-inset-left)) max(5px,env(safe-area-inset-right));
  }
  .touch-device #dpad{--diameter:min(224px,calc(50cqi - 3px))}
  .touch-device #action-face{--face-size:min(224px,calc(50cqi - 3px))}
}
@media (orientation:portrait) and (max-width:520px){
  .touch-device .machine:not([data-mode="ready"]):not(:fullscreen):not(.pseudo-fullscreen){
    width:calc(100% + 16px);margin-inline:-8px;
  }
}
@media (orientation:portrait) and (max-width:350px){
  .touch-device .touch-controls{gap:4px;padding-inline:max(3px,env(safe-area-inset-left)) max(3px,env(safe-area-inset-right))}
  .touch-device #dpad{--diameter:calc(50cqi + 2px)}

  .touch-device #action-face{--face-size:calc(50cqi - 6px);height:calc(var(--face-size) * 1.18)}
  .touch-device #action-face button{--cap:calc(var(--face-size) * .43)}
  .touch-device #action-face [data-action="dash"]{left:0}
  .touch-device #action-face [data-action="jump"]{--cap:calc(var(--face-size) * .57);top:39.5%}
}
@media (orientation:portrait) and (max-width:520px) and (max-height:710px){
  .touch-device .machine:not([data-mode="ready"]):not(:fullscreen):not(.pseudo-fullscreen) .scene{
    max-height:max(195px,calc(100svh - 326px));
  }
}
@media (orientation:landscape) and (min-width:540px) and (max-height:600px){
  .touch-device #action-face{--face-size:var(--action-face-size,calc(var(--wing) - 6px))}
}

/* In handheld fullscreen the trails run underneath the two thumb controls. */
@media (orientation:landscape) and (pointer:coarse), (orientation:landscape) and (max-width:1024px) and (max-height:600px){
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]){
    --safe-left:max(8px,env(safe-area-inset-left));--safe-right:max(8px,env(safe-area-inset-right));
    --safe-top:max(4px,env(safe-area-inset-top));--safe-bottom:max(8px,env(safe-area-inset-bottom));
    --action-face-size:min(clamp(160px,min(24vw,53svh),210px),calc((100vw - var(--safe-left) - var(--safe-right)) * .36));
    display:block;padding:0;border:0;overflow:hidden;
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(.play-area,.scene){
    position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;aspect-ratio:auto;
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) #world{--thumb-camera:1}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .touch-controls{
    position:absolute;inset:0;z-index:3;display:flex;align-items:flex-end;justify-content:space-between;
    padding:0 var(--safe-right) var(--safe-bottom) var(--safe-left);background:none;border:0;pointer-events:none;
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) #dpad{
    --diameter:min(clamp(144px,min(22vw,45svh),194px),calc((100vw - var(--safe-left) - var(--safe-right)) * .31));opacity:.75;pointer-events:auto;
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) #action-face{opacity:.82;pointer-events:none}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) #action-face button{pointer-events:auto}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen).charm-recharging #action-face [data-action="charm"]{
    filter:saturate(.48) brightness(.96);
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(#dpad,#action-face):is(:active,:focus-visible){opacity:1}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .touch-controls[inert]{visibility:hidden}

  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(.machine-rail,.control-rail){
    position:absolute;top:var(--safe-top);z-index:4;min-height:0;padding:0;gap:4px;background:none;border:0;pointer-events:none;
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .machine-rail{
    left:var(--safe-left);max-width:calc(100% - var(--safe-left) - var(--safe-right) - 200px);
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(.location,.scoreboard,.rail-actions){
    background:#47283de6;border:1px solid #eac391a6;border-radius:8px;box-shadow:0 1px 3px #35223670;
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(.location,.scoreboard){
    min-height:32px;padding:4px 7px;gap:6px;
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .location{font-size:15px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) #clearing-stamp{width:23px;height:18px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) #clearing-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .world-label{font-size:9px;letter-spacing:.4px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .location-slash{display:none}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .scoreboard{flex:none}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .life-meter{gap:2px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .life-meter img{width:13px;height:13px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .counter{gap:2px;font-size:13px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .counter small{font-size:11px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .counter img{width:19px;height:18px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .control-rail{right:var(--safe-right)}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(.control-list,.mobile-controls-label,.ledge-guide){display:none}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .rail-actions{width:auto;margin:0;gap:0;pointer-events:auto}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .rail-actions button{
    justify-content:center;gap:1px;min-width:44px;min-height:44px;padding:0 4px;font-size:0;color:#fff0dc;
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .rail-actions .icon{width:18px;height:18px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) #puzzle-button img{width:20px;height:20px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) #key-count{font:650 12px/1 var(--pixel);color:#fff2d6}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(.shield-status,.scene-toast){top:calc(var(--safe-top) + 48px)}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .shield-status{left:var(--safe-left)}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .scene-toast{
    left:auto;right:var(--safe-right);width:max-content;max-width:60%;font-size:14px;padding:5px 9px;text-align:left;transform:translateY(-4px);
  }
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .scene-toast.visible{transform:translateY(0)}
}
@media (orientation:landscape) and (max-width:700px) and (max-height:600px){
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(.world-label,#clearing-stamp){display:none}
}
@media (orientation:landscape) and (max-width:620px) and (max-height:600px){
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .machine-rail{align-items:flex-start;flex-direction:column;gap:2px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) :is(.location,.scoreboard){min-height:24px;max-width:100%;padding:2px 6px}
  .touch-device .machine:is(:fullscreen,.pseudo-fullscreen):not([data-mode="ready"]) .shield-status{top:calc(var(--safe-top) + 64px)}
}

/* The mounted portrait and the brass trim belong to the cover of the trail book. */
.heartwood-masthead{
  --mast-cream:#fff0cd;
  position:sticky;top:0;z-index:5;isolation:isolate;
  background:#293d42 url("assets/interface/heartwood-masthead.webp") center 51% / cover no-repeat;
  border:0;border-bottom:3px solid #6f4a42;
  box-shadow:inset 0 -1px #fee0a0,0 2px 0 #d8ad75,0 4px 9px #53364838;
}
.heartwood-masthead::before{
  content:"";position:absolute;inset:0 0 auto;height:3px;pointer-events:none;
  background:linear-gradient(90deg,#956c53,#e8cc8f 21%,#967558 44%,#e6c385 73%,#896448);
  box-shadow:0 1px #382e3c;
}
.heartwood-masthead .header-content{height:75px;gap:16px}
.heartwood-masthead .brand{min-width:0;gap:13px;white-space:nowrap}
.portrait-medallion{
  display:block;flex:0 0 auto;width:58px;height:58px;
  background:transparent url("assets/interface/post-tokens.webp") 0 center / 400% 100% no-repeat;
  filter:drop-shadow(0 2px 1px #16222ca3);
}
.heartwood-masthead .brand-name{
  display:flex;align-items:baseline;gap:.14em;font:700 clamp(25px,2.25vw,33px)/1 var(--serif);
  letter-spacing:-.045em;color:var(--mast-cream);text-shadow:0 2px 1px #362732,0 0 7px #29373c;
}
.brand-first{font-size:1.16em;font-style:italic;color:#ffdb87}
.brand-link{margin:0 .04em;font-size:.64em;font-weight:400;font-style:italic;letter-spacing:0;color:#f1d49a}
.heartwood-masthead .header-actions{flex:none;gap:9px}
.heartwood-masthead .utility{
  justify-content:center;gap:8px;min-height:40px;padding:8px 13px;border:1px solid #ccae78;border-radius:7px;
  background:linear-gradient(#354e4af2,#213b3df7);color:#ffedc7;
  font:700 13px/1 var(--sans);white-space:nowrap;
  box-shadow:inset 0 1px #f2dc9b38,inset 0 0 0 2px #18363b5c,0 2px 1px #24323b;
}
.heartwood-masthead #trail-button{border-color:#eed298;background:linear-gradient(#ffeac0,#e7c487);color:#593745;box-shadow:inset 0 0 0 1px #fff1c6,0 2px 1px #322b39}
.heartwood-masthead .utility .icon{width:17px;height:17px;stroke-width:1.8}
.heartwood-masthead .utility:hover{border-color:#ffe9ad;background:#41625a;color:#fff6de}
.heartwood-masthead #trail-button:hover{background:#fff1c7;color:#693c4f}
.heartwood-masthead .utility:active{transform:translateY(1px)}
.heartwood-masthead .utility:focus-visible{outline:3px solid #fff1aa;outline-offset:3px}
@media(pointer:coarse){.heartwood-masthead .utility{min-width:44px;min-height:44px}}
@media(max-width:900px){
  .heartwood-masthead .header-content{height:67px}
  .portrait-medallion{width:49px;height:49px}
  .heartwood-masthead .header-actions{gap:7px}
}
@media(max-width:730px){
  .heartwood-masthead .header-content{height:62px}
  .heartwood-masthead .utility{min-width:44px;min-height:44px;padding:7px 9px}
  .heartwood-masthead .brand{gap:9px}
  .portrait-medallion{width:43px;height:43px}
}
@media(max-width:640px){
  .heartwood-masthead .utility span{display:none}
  .heartwood-masthead .header-actions{gap:5px}
  .heartwood-masthead .header-content{gap:8px}
}
@media(max-width:445px){
  .heartwood-masthead{background-position:46% center}
  .heartwood-masthead .header-actions{gap:3px}
  .heartwood-masthead .header-content{height:60px}
  .heartwood-masthead .brand{gap:8px}
  .heartwood-masthead .brand-name{display:grid;grid-template-columns:auto 1fr;align-items:end;column-gap:3px;row-gap:0;font-size:19px;line-height:.94}
  .heartwood-masthead .brand-first{font-size:1.08em}
  .heartwood-masthead .brand-link{align-self:end;margin:0 0 1px;font-size:.70em}
  .heartwood-masthead .brand-place{grid-column:1/-1;font-size:1.04em}
  .portrait-medallion{width:40px;height:40px}
}
@media(max-width:350px){
  .heartwood-masthead .brand{gap:6px}
  .heartwood-masthead .brand-name{font-size:18px}
  .portrait-medallion{width:38px;height:38px}
}
