:root{--ivory:#e7dfc7;--gold:#d5bb7d;--ink:#171916;--serif:"STKaiti","KaiTi","FangSong","Songti SC",serif}
*{box-sizing:border-box}html,body,main{margin:0;width:100%;height:100%;overflow:hidden}body{background:#191d1b;color:var(--ivory);font-family:var(--serif);user-select:none;touch-action:none}main{position:relative;isolation:isolate}canvas{display:block}#world,#fx,.vignette,#injury,#title,#hud,#overlay,#touch{position:absolute;inset:0;width:100%;height:100%}#world{outline:none}.vignette{background:radial-gradient(ellipse at 50% 45%,transparent 48%,#17191536 88%,#080b0d78 110%);pointer-events:none}#fx,#injury{pointer-events:none}#injury{box-shadow:inset 0 0 17vmin 1vmin #780f08;opacity:0}button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}button:focus-visible{outline:1px solid #e6d0a3;outline-offset:4px}button:disabled{cursor:wait}.titleType{width:100%;height:auto}.titleType canvas{width:100%;height:auto}.roman{display:flex;align-items:center;justify-content:center;gap:12px;font:500 clamp(13px,1.3vw,23px) Georgia,serif;letter-spacing:.45em;color:#e0d1b3;padding-left:.45em;text-shadow:0 1px 5px #000}.roman i{display:block;height:1px;width:12%;background:linear-gradient(90deg,transparent,#b49b77)}.roman i:last-child{transform:rotate(180deg)}
#title{background:linear-gradient(90deg,#0c1215c2 0%,#10161961 29%,transparent 55%),linear-gradient(0deg,#0a0d12a8 0%,transparent 17%,transparent 88%,#0a0d102f 100%);display:flex;align-items:center;padding:0 0 4vh 6vw}#titleMenu{width:clamp(205px,25vw,430px);text-align:center;text-shadow:0 2px 7px #08090a}#title nav{margin:clamp(24px,6.4vh,74px) auto 0;width:68%;display:grid;gap:8px}.venue{margin:clamp(14px,2.7vh,32px) 0 0;color:#e3d6bd;font-size:clamp(15px,1.48vw,26px);letter-spacing:.23em}.venue span{margin:0 .42em}.brushBtn,.plainBtn{display:block;position:relative;width:100%;padding:9px 20px;color:#f4e7ca;letter-spacing:.16em;font-size:clamp(16px,1.4vw,24px);text-shadow:0 1px 5px #231907}.brushBtn{background:linear-gradient(90deg,transparent,#88683377 16%,#b29a5994 49%,#6c4f2666 83%,transparent);clip-path:polygon(0 30%,7% 23%,3% 12%,25% 11%,33% 4%,68% 9%,89% 4%,98% 16%,93% 24%,100% 36%,96% 48%,100% 67%,90% 70%,95% 82%,70% 89%,62% 96%,22% 89%,4% 96%,10% 80%,0 77%,5% 53%)}.brushBtn:hover,.brushBtn:focus-visible{filter:brightness(1.28)}.plainBtn{font-size:clamp(14px,1.15vw,20px);color:#d2c6ad}.plainBtn:hover{color:white}#load{position:absolute;right:3vw;bottom:4vh;color:#e4d9bf}.nodes{display:flex;gap:4px}.nodes i,#resNodes i{border-radius:50%;background:radial-gradient(circle at 36% 37%,#ffceb6 0%,#eb796d 27%,#a33232 63%,#6e2325 80%);border:1px solid #dcb59a;box-shadow:0 1px 4px #130b07,inset 0 0 2px #442b19;width:14px;height:14px}.nodes i.used,#resNodes i.used{background:#241b17;border-color:#796557}
#hud{display:none;pointer-events:none;color:#e7dfc4;text-shadow:0 2px 3px #100d09,0 0 6px #100d09}.bossHud,.playerHud{position:absolute;left:4%;width:clamp(140px,17vw,290px)}.bossHud{top:5.2%}.bossName{font-size:clamp(15px,1.45vw,25px);letter-spacing:.06em;margin:5px 0 3px 0;background:linear-gradient(90deg,#211b17c4,transparent);padding:1px 5px}.health{height:clamp(8px,1.07vh,14px);position:relative;background:#241c17;border:1px solid #584e3f;box-shadow:0 1px 3px 1px #100a08b3;transform:skew(-8deg);overflow:hidden}.health i,.health b{position:absolute;inset:1px;background:linear-gradient(0deg,#852f28 0%,#ac4f3a 65%,#d88063 100%);transform-origin:left}.health b{background:#c49760;transition:transform .6s .16s}.playerHud{bottom:5.5%}#resNodes{margin-bottom:6px}#resNodes i{background:radial-gradient(circle at 38% 34%,#f9c2cc,#b46d89 65%,#744b62);color:#643d4d;border:1px solid #d5acae;display:grid;place-items:center;font-family:serif;font-weight:bold;font-size:12px;width:19px;height:19px;text-shadow:none}
.posture{position:absolute;left:50%;transform:translateX(-50%);width:clamp(160px,28vw,520px);height:9px;background:linear-gradient(90deg,transparent,#271d13bb 8%,#271d13 50%,#271d13bb 93%,transparent);opacity:.88;transition:opacity .3s}.bossPosture{top:5.5%}.wolfPosture{bottom:5.7%;width:clamp(140px,22vw,410px)}.posture::before,.posture::after{content:"";position:absolute;top:1px;height:5px;width:5px;border:1px solid #b9a578;transform:rotate(45deg)}.posture::before{left:0}.posture::after{right:0}.postureWell{position:absolute;inset:2px 9px;border-block:1px solid #aa956d80;display:flex;align-items:center;justify-content:center}.postureWell i{display:block;width:100%;height:4px;transform:scaleX(0);background:linear-gradient(0deg,#89642b,#f4c568);box-shadow:0 0 4px #cc9c3855}.posture.high i{background:linear-gradient(0deg,#b13e27,#ff9e44)}.equip{position:absolute;right:4%;bottom:4.7%;text-align:center}.gourdFrame{width:clamp(50px,5.5vw,95px);margin:auto;aspect-ratio:1;background:radial-gradient(ellipse,#31251da9,#140f0cdc);border:1px solid #9583689c;outline:1px solid #201a16;outline-offset:2px;position:relative}#gourd{width:100%;height:100%}.gourdFrame strong{position:absolute;right:3px;bottom:-5px;font:20px Georgia,serif;color:#eee4cc}.equip span{display:block;margin-top:8px;font-size:clamp(12px,1vw,19px)}kbd{font:10px Georgia,serif;border:1px solid #978b74;padding:1px 4px;vertical-align:middle;color:#d3c4a8}
#lock,#danger,#killDot{position:absolute;left:0;top:0;pointer-events:none}#lock{width:6px;height:6px;margin:-3px;border-radius:50%;background:#f4f3df;box-shadow:0 0 3px 1px #302f28}#danger{font:clamp(52px,6.5vw,104px) "STXingkai","KaiTi",serif;text-shadow:0 0 16px #b71008,0 1px 4px #5a0d05;color:#f15136;opacity:0;line-height:1;transform:translate(-50%,-50%)}#killDot{display:none;width:19px;height:19px;border-radius:50%;background:radial-gradient(circle,#fff1bf,#fb6e52 23%,#cf2217 59%,transparent 71%);box-shadow:0 0 16px #df291c;transform:translate(-50%,-50%)}#arenaName,#cue{position:absolute;left:50%;transform:translateX(-50%);color:#eee5d0;text-align:center;opacity:0}#arenaName{top:20%;white-space:nowrap;font-size:clamp(25px,3.5vw,60px);letter-spacing:.15em}#cue{bottom:17%;font-size:clamp(17px,1.75vw,28px);letter-spacing:.15em}.pauseBtn{pointer-events:auto;position:absolute;right:2%;top:2.5%;font:15px Georgia,serif;color:#e1d8bb99;padding:7px}
#overlay{z-index:5;display:grid;place-items:center;background:radial-gradient(ellipse,#171916a8,#0b0e10d9);backdrop-filter:blur(3px)}[hidden]{display:none!important}#panel{width:min(520px,88vw);text-align:center;padding:24px 14px}#panel h2{font:normal clamp(34px,5vw,78px) "STXingkai",var(--serif);line-height:1.05;color:#e8dbc3;margin:0 0 24px;letter-spacing:.16em;text-shadow:0 2px 10px black}#panel h2.death{color:#b54333;font-size:clamp(65px,11vw,170px)}#panelBody{font-size:clamp(14px,1.25vw,19px);line-height:1.5;color:#cfc6af}#panelBody p{margin:10px 0}#panelBody dl{display:grid;grid-template-columns:1fr 1.5fr;max-width:320px;margin:0 auto 20px;column-gap:1.6em;row-gap:3px}dt{text-align:right;color:#ece1c5}dd{margin:0;text-align:left}#panelButtons{width:230px;max-width:80%;margin:23px auto 0;display:grid;gap:6px}
body[data-state="play"] #hud,body[data-state="pause"] #hud,body[data-state="end"] #hud{display:block}body:not([data-state="title"]) #title{display:none}#touch{display:none;pointer-events:none}#stick,#touchMoves button{pointer-events:auto;touch-action:none}#stick{position:absolute;bottom:16%;left:5%;width:84px;height:84px;border:1px solid #d9cfad55;border-radius:50%;background:#2224}#stick i{position:absolute;left:25px;top:25px;width:32px;height:32px;border-radius:50%;background:#dacda866}#touchMoves{position:absolute;bottom:22%;right:2%;width:150px;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:5px}#touchMoves button{width:43px;height:43px;border-radius:50%;font:15px var(--serif);background:#221e19a1;border:1px solid #baa47c99;color:#f1dfb8}@media (pointer:coarse){body[data-state="play"] #touch{display:block}}@media(max-width:650px){#title{padding-left:4vw}#titleMenu{width:clamp(165px,38vw,250px)}.nodes i{width:10px;height:10px}#panel h2{margin-bottom:12px}#panelBody dl{row-gap:0}#panelButtons{margin-top:10px}#panelButtons button{padding:5px}.bossHud,.playerHud{width:25%}.equip span{font-size:10px}}@media(max-height:490px){#panel{padding:7px}#panel h2{font-size:28px;margin-bottom:6px}#panelBody{font-size:13px}#panelBody dl{row-gap:0;margin-bottom:5px}#panelButtons{margin-top:5px;gap:2px}#panelButtons button{padding:4px}}
.equip{display:flex;gap:9px;align-items:flex-end}.prosthetic{transform:translateY(-13%)}.prosthetic .gourdFrame{width:clamp(43px,4.7vw,80px)}#wheel{width:100%;height:100%}#resNodes i{font:16px Georgia,serif;color:#f4c4ce;text-shadow:0 0 2px #864654}.endingWord{font:clamp(13px,1.3vw,22px) Georgia,serif;letter-spacing:.38em;text-indent:.38em;color:#d0af7e}.endingWord.red{color:#b86b5e}
#panel{max-height:94dvh;overflow:auto}#audioUnlock{position:absolute;right:3%;top:9%;font:15px var(--serif);color:#e9d9aa;background:#1f201bd9;padding:7px 15px;z-index:3}body:not([data-state="play"]) #audioUnlock{display:none}.bossName{background:transparent;position:relative;isolation:isolate}.bossName::before{content:"";position:absolute;z-index:-1;inset:-2px -5% -1px -1%;background:linear-gradient(90deg,#1b1814e0 2%,#211c18bd 31%,#2520176b 63%,transparent 94%);clip-path:polygon(0 15%,9% 7%,29% 10%,55% 0,90% 12%,99% 28%,80% 37%,96% 50%,85% 64%,99% 78%,67% 80%,58% 95%,29% 86%,1% 100%)}.posture.high .postureWell i{box-shadow:0 0 5px #ce782f88}
@media (pointer:coarse){
  #touchMoves{bottom:max(21%,calc(78px + env(safe-area-inset-bottom)));right:max(2%,env(safe-area-inset-right))}
  #touchMoves button{width:46px;height:46px;white-space:nowrap;padding:0;line-height:1}
  .equip kbd{display:none}
}
@media (pointer:coarse) and (max-height:490px){
  .equip{bottom:max(3.5%,env(safe-area-inset-bottom));right:max(3%,env(safe-area-inset-right))}
  .equip .gourdFrame{width:38px}
  .equip span{font-size:11px;margin-top:4px}
  .equip .prosthetic{transform:none}
}
#frameMeter{position:absolute;top:7%;right:2%;padding:4px 7px;border-radius:2px;background:#171916bb;color:#eadfc9;font:12px/1.35 Consolas,monospace;font-variant-numeric:tabular-nums;white-space:nowrap}
#lock{margin:0}
#injury{box-shadow:none;background:radial-gradient(ellipse at center,transparent 44%,rgba(105,12,6,.24) 70%,rgba(117,13,7,.79) 100%);will-change:opacity}
#killDot{width:43px;height:43px;background:none;box-shadow:none;border:0;border-radius:0}
#danger{width:clamp(75px,9.35vw,150px);height:auto;text-shadow:none;will-change:transform,opacity}
body[data-state="title"] #hud{display:block;opacity:.006;pointer-events:none}
body[data-state="title"] #hud button{visibility:hidden}
#hud{will-change:opacity}
#curtain,#passage{position:absolute;pointer-events:none;opacity:0}
#curtain{inset:0;background:#080a0b}
#passage{left:7%;right:7%;bottom:13%;text-align:center;color:#e1d6bc;font:clamp(23px,3.2vw,49px) var(--serif);letter-spacing:.14em;text-shadow:0 1px 9px black}
body[data-state="cinema"] #stage::after{content:"";pointer-events:none;position:absolute;inset:0;border-block:5vh solid #101111}
body[data-prime] #cue,body[data-prime] #arenaName,body[data-prime] #danger{opacity:1}
body[data-prime] #killDot{display:block;left:52%;top:46%}
body[data-prime] #danger{left:53%;top:36%}
body[data-loading] #titleMenu{visibility:hidden}
#load{z-index:3;pointer-events:none}
html[lang="en"] #titleMenu{font-family:Georgia,serif}
html[lang="en"] #title nav{width:90%}
html[lang="en"] #title nav button{letter-spacing:.04em}
html[lang="en"] #touchMoves button{font-family:system-ui,sans-serif;font-size:11px}
html[lang="en"] #arenaName{max-width:94%;font-size:clamp(20px,3.2vw,56px);letter-spacing:.07em}
html[lang="en"] #danger{width:clamp(128px,16vw,240px)}
@media (pointer:fine) and (min-width:900px){
  .playerHud{left:5.65%;bottom:8.1%;width:min(18.7vw,37vh)}
  .playerHud .health{height:clamp(9px,1.42vh,22px);transform:none;border-color:#393028}
  .playerHud .health i{background:linear-gradient(#71332b,#9d4c3e 60%,#824033)}
  #resNodes{margin:0 0 .8vh}
  #resNodes i{width:clamp(20px,3.4vh,49px);height:clamp(20px,3.4vh,49px);font-size:clamp(13px,1.75vh,25px);border:2px solid #bd8a97;box-shadow:inset 0 0 0 2px #6f4653,inset 0 0 0 4px #e09aaa,0 1px 3px #251a1a}
  .equip{right:5.4%;bottom:5.8%}
  .equip .gourdFrame{width:clamp(44px,6.9vh,103px);outline:none;border-color:#392e2399;border-radius:5%}
  .equip .prosthetic{transform:none}
  .equip .prosthetic .gourdFrame{width:clamp(60px,10.7vh,155px)}
}
#rotateGate{position:absolute;z-index:9;top:max(7px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);display:flex;align-items:center;gap:8px;padding:6px 12px;border:1px solid #84735377;border-radius:3px;background:#171c1cf2;box-shadow:0 2px 8px #08090960;color:var(--ivory);pointer-events:none}
#rotateGate h2{margin:0;font:normal 14px/1.35 var(--serif);letter-spacing:.04em}
#rotateGate p{margin:0;max-width:30ch;font:12px/1.35 system-ui,sans-serif;color:#c9c3b3}
.turnPhone{flex:none;width:23px;height:22px;display:grid;place-items:center}
.turnPhone i{position:relative;display:block;width:11px;height:18px;border:1px solid #cfb781;border-radius:3px;transform:rotate(90deg);animation:turn-sideways 3.3s ease-in-out infinite}
.turnPhone i::after{content:"";position:absolute;bottom:2px;left:3px;width:3px;height:1px;background:#cfb781;border-radius:3px}
@keyframes turn-sideways{0%,12%{transform:rotate(0)}50%,90%{transform:rotate(90deg)}}
@media(prefers-reduced-motion:reduce){.turnPhone i{animation:none}}
@media (pointer:coarse){
  #stage{--left:max(12px,env(safe-area-inset-left));--right:max(12px,env(safe-area-inset-right));--top:max(6px,env(safe-area-inset-top));--bottom:max(8px,env(safe-area-inset-bottom));--stick:clamp(76px,21vh,108px);--key:clamp(45px,12vh,62px)}
  #title{padding-left:calc(var(--left) + 2vw);padding-top:var(--top);padding-bottom:var(--bottom)}
  #title nav button,#panelButtons button{min-height:44px}
  #overlay{padding:var(--top) var(--right) var(--bottom) var(--left)}
  #panel{max-height:100%;touch-action:pan-y;overscroll-behavior:contain}
  .bossHud,.playerHud{left:var(--left);width:clamp(112px,22vw,215px)}
  .bossHud{top:var(--top)}
  .playerHud{bottom:var(--bottom)}
  .bossPosture{top:calc(var(--top) + 3px)}
  .wolfPosture{bottom:var(--bottom)}
  .pauseBtn{right:var(--right);top:var(--top);width:44px;height:44px;font-size:19px;color:#eee5cc}
  #audioUnlock,#frameMeter{right:calc(var(--right) + 44px);top:var(--top)}
  .equip{display:none}
  #stick{bottom:calc(var(--bottom) + 45px);left:var(--left);width:var(--stick);height:var(--stick);background:radial-gradient(circle,#24221f55 48%,#51483b5e);border-color:#dacaaa88}
  #stick i{top:32%;left:32%;width:36%;height:36%;border:1px solid #d3c2a48a;background:#b5a99177}
  #touchItems{position:absolute;left:calc(var(--left) + var(--stick) + 7px);bottom:calc(var(--bottom) + 44px);display:flex;gap:5px}
  #touchMoves{position:absolute;right:var(--right);bottom:calc(var(--bottom) + 13px);width:calc(var(--key) * 3 + 8px);height:calc(var(--key) * 2 + 14px);display:block}
  #touch button{touch-action:none;pointer-events:auto;-webkit-tap-highlight-color:transparent;color:#f5e7cc;background:radial-gradient(circle at 44% 38%,#302d23a8,#1b1e1bc2);border:1px solid #c3b18d9e;border-radius:50%;padding:0;text-shadow:0 1px 2px #15130d}
  #touch button.pressed{background:#a08246ce;border-color:#ffe5a9;box-shadow:inset 0 0 9px #e8cd8755}
  #touchMoves button{position:absolute;width:var(--key);height:var(--key);line-height:1}
  #touchMoves [data-action="guard"]{left:0;top:28%;font-weight:bold}
  #touchMoves [data-action="attack"]{right:0;top:27%;width:calc(var(--key) + 4px);height:calc(var(--key) + 4px);border-color:#e9d6a8}
  #touchMoves [data-action="jump"]{left:calc(50% - var(--key) / 2);top:0}
  #touchMoves [data-action="dodge"]{left:calc(50% - var(--key) / 2);bottom:0}
  #touchItems button{width:44px;height:44px;line-height:1;display:grid;align-content:center;justify-items:center;gap:2px;font-size:13px}
  #touchItems small{font:11px/1 Georgia,serif;color:#edd3a2}
  html[lang="en"] #touchItems button{font:12px/1 system-ui,sans-serif}
  #cue{bottom:calc(var(--bottom) + 15px);max-width:42%;font-size:15px}
}
@media (pointer:coarse) and (max-height:360px){
  #titleMenu{width:clamp(155px,31vh,200px)}
  #title nav{margin-top:8px;gap:0}
  #title .venue{margin-top:5px}
  #panel{padding:4px}
  #panelButtons{width:min(440px,95%);grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;margin-top:5px}
  #panelButtons button:only-child{grid-column:1/-1}
}
#title{background:linear-gradient(90deg,rgba(12,16,18,.87),rgba(19,22,22,.60) 24%,rgba(33,28,27,.12) 51%,transparent 70%),linear-gradient(0deg,#111719ad,transparent 19%,transparent 83%,#181c2055);padding:0 0 1vh 8.4vw}
#titleMenu{width:min(43vw,680px);text-align:left;text-shadow:0 3px 15px #18150f}
.mast,.titleFooter{position:absolute;left:4.25%;right:4.25%;display:flex;align-items:center;color:#d8c7a6}
.mast{top:5.5%;gap:.75em;font:600 clamp(10px,.84vw,15px) Georgia,serif;letter-spacing:.18em}
.mast i{font-style:normal;font-size:.9em;color:#ab8e62}.crestMark{font-size:1.72em;font-weight:400;color:#c2a476;line-height:1}
.epithet{margin:0 0 .9em .23em;font:400 clamp(13px,1.10vw,21px) var(--serif);letter-spacing:.48em;color:#e2d0ab}
#duelTitle{font:normal clamp(50px,6.95vw,145px)/1.05 "STKaiti","KaiTi","Songti SC","SimSun",Georgia,serif;letter-spacing:.015em;margin:0;color:#f0e5ce}
.latinTitle{margin:.68em 0 0 .18em;font:normal clamp(12px,1.18vw,23px) Georgia,"SimSun",serif;letter-spacing:.57em;color:#c4aa82}
.menuRule{width:min(21vw,335px);height:1px;margin:clamp(22px,4.3vh,53px) 0 clamp(17px,3.5vh,43px);background:linear-gradient(90deg,#c9a66c 0,#a9936da1 28%,transparent 100%);position:relative}.menuRule i{position:absolute;left:0;top:-2px;width:5px;height:5px;transform:rotate(45deg);background:#c6a576}
#title nav,html[lang=en] #title nav{margin:0;width:max-content;display:flex;align-items:center;gap:clamp(13px,2vw,34px)}
#title nav button{min-height:44px;white-space:nowrap}
#title #start{border:1px solid #b4a28082;background:linear-gradient(130deg,#5c513e99,#2a2b26bb);border-radius:1px;clip-path:none;padding:10px clamp(19px,2.5vw,45px);width:auto;font-size:clamp(15px,1.22vw,23px);box-shadow:inset 0 0 0 2px #201d1644}
#title #start:hover,#title #start:focus-visible{border-color:#ddc99b;background-color:#6b5a3d}
#title #openControls{width:auto;padding:9px 1px;font:normal clamp(12px,1.02vw,18px) var(--serif);color:#d5ccbb}
.titleFooter{bottom:5%;justify-content:space-between;font:normal clamp(11px,.85vw,15px) var(--serif);letter-spacing:.19em}
#langToggle{font:normal 13px Georgia,"SimSun",serif;letter-spacing:.08em;padding:7px 0 7px 14px;color:#e4d6bd}
html[lang=en] #duelTitle{font-family:"Baskerville","Palatino Linotype",Georgia,serif;letter-spacing:-.055em;font-size:clamp(58px,8.2vw,148px)}
html[lang=en] .epithet{font-family:Georgia,serif;text-transform:uppercase;letter-spacing:.28em}
@media(max-width:700px){#title{padding-left:6vw}.epithet{letter-spacing:.31em}.mast,.titleFooter{left:5%;right:5%}.bossName{white-space:nowrap;font-size:14px}}
@media(max-height:490px){#titleMenu{width:46vw}.mast{top:5%;font-size:9px}.titleFooter{bottom:3%}.menuRule{margin:14px 0 9px}.epithet{margin-bottom:.47em}.latinTitle{margin-top:.35em}#duelTitle{font-size:clamp(43px,7.5vw,75px)}}
.bossName{width:max-content;max-width:min(50vw,420px);white-space:nowrap}
@media (pointer:coarse){.bossName{font-size:clamp(11px,2.8vh,16px)}}

#display{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background:#111617}
#stage{flex:none}
#duelTitle{font-size:clamp(30px,5.4vw,93px);white-space:nowrap}
html[lang=en] #duelTitle{font-size:clamp(30px,5.3vw,90px)}
.latinTitle{letter-spacing:.26em}

/* Keep the duel in one landscape frame, with space for thumbs below it. */
@media (max-aspect-ratio:1/1) {
  #display{background:radial-gradient(ellipse at 50% 55%,#292a24 0,#1a201e 42%,#111617 88%)}
  #stage{width:100%;height:auto;aspect-ratio:16/9;overflow:visible;box-shadow:0 1px #8e7b5659,0 -1px #8e7b5638,0 10px 38px #06090a75}
  #overlay{position:fixed;inset:0;width:100%;height:100%;padding:12px max(14px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-bottom))}
  #panel{max-height:100%;overflow:auto;touch-action:pan-y}
  #title{padding:0 4.5%;background:linear-gradient(90deg,#0e1518ce,transparent 78%)}
  #titleMenu{width:90%}
  #title .mast{top:5%;font-size:clamp(8px,1.8vw,12px)}
  #title .epithet{margin:0 0 .4em;font-size:clamp(10px,2.3vw,17px)}
  #title .latinTitle{margin:.45em 0 0;font-size:clamp(9px,2.3vw,15px)}
  #title .menuRule{margin:clamp(7px,1.8vw,14px) 0;width:28%;height:1px}
  #title #start{font-size:clamp(14px,3vw,20px);padding:6px 18px}
  #title .titleFooter{bottom:2%;font-size:clamp(9px,2.3vw,13px)}
  #title #langToggle{padding:4px 0 4px 9px}
  .bossHud,.playerHud{width:clamp(88px,27vw,210px)}
  .bossHud{top:4%}
  .playerHud{bottom:5%}
  .bossPosture,.wolfPosture{width:29%}
  .bossName{max-width:62vw;font-size:clamp(10px,2.8vw,17px);line-height:1.2;margin:3px 0}
  .health{height:clamp(6px,1.5vw,12px)}
  #resNodes i{width:clamp(12px,3.3vw,22px);height:clamp(12px,3.3vw,22px);font-size:11px}
  #arenaName,html[lang=en] #arenaName{font-size:clamp(16px,3.6vw,28px)}
}
@media (pointer:coarse) and (max-aspect-ratio:1/1) {
  #display{--deck:clamp(120px,27vh,215px);padding:env(safe-area-inset-top) 0 calc(var(--deck) + env(safe-area-inset-bottom))}
  #stage{--stick:clamp(72px,23vw,120px);--key:clamp(43px,12.5vw,64px)}
  #touch{top:100%;bottom:auto;height:var(--deck)}
  #stick{left:max(6vw,env(safe-area-inset-left));bottom:16%}
  #touchMoves{right:max(4vw,env(safe-area-inset-right));bottom:12%;width:calc(var(--key) * 2.7);height:calc(var(--key) * 2.05)}
  #touchItems{left:max(6vw,env(safe-area-inset-left));top:5%;bottom:auto;gap:8px}
  #touchItems button{width:44px;height:44px}
  #cue{max-width:65%;bottom:11%;font-size:clamp(11px,3vw,16px)}
  body[data-state=title] #title nav{position:absolute;top:calc(100% + 10px);left:5%;gap:16px}
  #title .menuRule{display:none}
}
@media (pointer:coarse) and (max-aspect-ratio:1/1) and (max-height:540px) {
  #stick{bottom:9%}
  #touchItems{left:calc(max(6vw,env(safe-area-inset-left)) + var(--stick) + 4px);top:8%;flex-direction:column;gap:3px}
}
/* Hammered iron, charred ivory and the burnt red of the King's standards. */
#title{background:linear-gradient(90deg,#100d0ef7,#171013d4 23%,#1c11145c 46%,transparent 66%),linear-gradient(0deg,#100c0edb,transparent 19%,transparent 87%,#1710158c)}
#title .mast,#title .titleFooter{left:6.2%;right:5.5%}
.mast{color:#f3d7a6;gap:1em;letter-spacing:.32em}
.keepSeal{display:inline-block;width:27px;height:23px;background:linear-gradient(#e8cc8f,#a37844);clip-path:polygon(0 8%,22% 34%,30% 4%,50% 44%,70% 4%,79% 34%,100% 8%,89% 70%,12% 70%,15% 82%,86% 82%,84% 96%,16% 96%)}
#titleMenu{padding-top:1vh}
#epithet{display:flex;align-items:center;gap:.85em;letter-spacing:.42em;color:#dbab73}
#epithet:before{content:"";width:25px;height:1px;background:#b78759}
#duelTitle{display:flex;align-items:baseline;gap:.15em;line-height:1.23;color:#f8ead1;font-weight:bold;letter-spacing:.025em}
#duelTitle i{color:#d28454;font:italic normal .42em Georgia,serif;letter-spacing:-.08em;margin:0 .08em}
#nameKing{color:#eac395}
#latinTitle{color:#d4b194;font-family:Georgia,serif;letter-spacing:.35em}
.menuRule{width:min(22vw,335px);background:linear-gradient(90deg,#be865a,#b68b5d66 57%,transparent)}
#title #start{color:#fff0d7;background:linear-gradient(105deg,#803d29f5,#54251ee8);border:1px solid #c0895e;box-shadow:inset 0 0 0 3px #31181970,0 5px 24px #0b06072e;padding-inline:clamp(21px,2.1vw,35px)}
#title #start span:after{content:"";display:inline-block;width:.38em;height:.38em;border-right:1px solid;border-top:1px solid;transform:rotate(45deg);margin:0 .08em .13em .75em;color:#f0c392}
#title #start:hover,#title #start:focus-visible{background:#924a32;border-color:#e5b17d}
#title .titleFooter{color:#caaf99}.mast,.titleFooter{text-shadow:0 1px 5px #10090a}
@media(max-aspect-ratio:1/1){#title{background:linear-gradient(90deg,#100d0ee3,#17101491 40%,transparent 75%)}#duelTitle{font-size:clamp(24px,6.1vw,64px)}.keepSeal{width:17px;height:14px}#epithet:before{width:14px}}
@media (max-width:540px) and (min-aspect-ratio:1/1) {
  #title #epithet{font-size:10px;letter-spacing:.21em;white-space:nowrap}
  #title #epithet:before{width:15px}
  #title #duelTitle{font-size:clamp(22px,6.25vw,30px)}
  #title nav,html[lang=en] #title nav{gap:9px}
  #title #start{padding-inline:12px;font-size:clamp(11px,2.85vw,14px);letter-spacing:.04em}
  #title #openControls{font-size:11px;letter-spacing:.04em}
}

select#langToggle{max-width:min(100%,14rem);padding:.35rem .65rem;background:#241d1a;color:#fff3dd;border:1px solid #a88967;border-radius:4px;font:inherit} #titleMenu>select#langToggle{margin-top:.7rem}
