.javelin-page{max-width:1120px;margin:auto;padding:24px 16px 48px;color:#263332;font-family:"Yu Gothic",Meiryo,system-ui,sans-serif;line-height:1.8}.javelin-hero{padding:20px 0 28px}.javelin-hero h1{font-size:clamp(25px,5vw,40px);line-height:1.4;margin:8px 0}.javelin-info{margin-top:24px;padding:20px;background:#f4faf7;border-radius:18px}#javelin{position:relative;isolation:isolate;overflow:hidden;margin:auto;border:1px solid #cbded4;border-radius:16px;background:#203a40;color:#fff;line-height:1.4;touch-action:none;user-select:none;box-shadow:0 10px 32px #234d3310}#javelin *{box-sizing:border-box}#scene{width:100%;height:100%;display:block;touch-action:none}#javelin button,#javelin select{font:inherit;color:#263332;background:#f4faf7;border:1px solid #9eb8ab;border-radius:9px;min-height:44px;padding:8px 12px;cursor:pointer}#javelin button:disabled{opacity:.55;cursor:default}#javelin :focus-visible{outline:3px solid #ffd96a;outline-offset:2px}#javelin [hidden]{display:none!important}.hud{position:absolute;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;gap:12px;pointer-events:none}.hud>div{width:29%;max-width:240px;padding:7px 10px;border-radius:9px;background:#173038e8;display:grid;font-size:14px}.hud strong{font-size:18px}.hud progress{width:100%;height:12px;accent-color:#72d69a}.hud>div:last-child{text-align:right}.toolbar{position:absolute;top:94px;right:12px;display:flex;gap:6px;z-index:5}.toolbar button{font-size:14px!important;padding:6px 9px!important}.settings{position:absolute;top:145px;right:12px;width:280px;max-width:calc(100% - 24px);padding:12px;background:#f4faf7;color:#263332;border-radius:12px;z-index:8;box-shadow:0 4px 20px #0006;display:grid;gap:5px}.settings h2{font-size:17px;margin:0}.settings label{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px}.settings input[type=range]{height:44px;width:140px}.settings input[type=checkbox]{width:24px;height:24px}.settings small{font-size:12px}.reticle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:30px;line-height:1;color:#fff;text-shadow:0 1px 3px #000;pointer-events:none}.readouts{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);width:min(92%,520px);padding:7px 12px;background:#173038df;border-radius:10px;display:flex;gap:6px 12px;flex-wrap:wrap;justify-content:center;font-size:14px;pointer-events:none}.readouts label{display:flex;gap:7px;align-items:center}.readouts meter{width:80px}#event{width:100%;text-align:center;min-height:20px}.overlay{position:absolute;inset:0;display:grid;place-items:center;background:#10242c38;padding:12px;z-index:4}.card{padding:20px;width:min(500px,95%);border-radius:16px;background:#f4faf7ed;color:#263332;text-align:center;box-shadow:0 4px 24px #0003}.card h2{font-size:clamp(20px,3vw,28px);margin:0 0 12px}.card p{margin:8px 0 14px;white-space:pre-line}.actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}#start{background:#2f8f70!important;color:#fff!important}.stick-wrap{position:absolute;bottom:78px;text-align:center;font-size:12px;text-shadow:0 1px 3px #000}.stick-wrap:first-child{left:16px}.stick-wrap:last-child{right:16px}.stick{width:112px;height:112px;border:2px solid #eaffff99;border-radius:50%;background:#16383f70;display:grid;place-items:center;touch-action:none}.stick i{display:block;width:44px;height:44px;border-radius:50%;background:#eaffffb0;pointer-events:none}.stick-wrap span{display:block;margin-top:4px}.expanded{position:fixed!important;z-index:9999;inset:0!important;border-radius:0!important;border:0!important;margin:auto!important}body.javelin-expanded{overflow:hidden}#javelin[data-mode=touch] .readouts{bottom:12px}#javelin[data-mode=touch] .reticle{font-size:26px}@media(orientation:portrait){.toolbar{top:94px;left:12px;right:12px;justify-content:center}.hud>div{width:44%}.card{padding:16px}.stick{width:100px;height:100px}.stick-wrap:first-child{left:10px}.stick-wrap:last-child{right:10px}.stick-wrap{bottom:84px}.settings{top:145px}}@media(max-height:600px) and (orientation:landscape){.javelin-page{padding-top:10px}.hud{top:6px;left:8px;right:8px}.hud>div{padding:4px 8px;font-size:12px;width:23%}.hud strong{font-size:16px}.toolbar{top:6px;left:26%;right:26%;justify-content:center}.toolbar button{font-size:12px!important;padding:4px 7px!important;white-space:nowrap}.settings{top:56px;width:320px;grid-template-columns:1fr 1fr;gap:2px 10px}.settings h2,.settings small{grid-column:1/-1}.settings label{font-size:12px}.settings input[type=range]{width:78px}.card{padding:12px;width:min(480px,95%)}.card h2{font-size:20px;margin:0 0 6px}.card p{font-size:13px;margin:5px 0 8px}.stick{width:82px;height:82px}.stick-wrap{bottom:12px}.readouts{bottom:6px!important;width:45%;font-size:12px}.stick-wrap:first-child{left:10px}.stick-wrap:last-child{right:10px}}

/* Keep the frame within the parent content box, including its border. */
#javelin{box-sizing:border-box}
@media(orientation:portrait){
 #javelin.settings-open .toolbar{top:6px;z-index:9}
 #javelin.settings-open .hud{visibility:hidden}
 #javelin.settings-open .settings{top:56px;bottom:auto;left:6px;right:6px;width:auto;max-width:none;padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 8px;align-content:start}
 #javelin.settings-open .settings h2,#javelin.settings-open .settings small{grid-column:1/-1}
 #javelin.settings-open .settings h2{font-size:16px;line-height:20px}
 #javelin.settings-open .settings label{font-size:12px;line-height:16px;min-height:60px;gap:0;display:flex;flex-direction:column;justify-content:center;align-items:center}
 #javelin.settings-open .settings input[type=range]{width:100%;max-width:120px;height:44px;margin:0}
 #javelin.settings-open .settings select{width:100%;min-width:0;font-size:12px;padding:4px}
 #javelin.settings-open .settings small{font-size:11px;line-height:15px}
 #javelin.settings-open #close-settings{grid-column:1/-1}
}

@media(max-width:360px) and (orientation:portrait){.toolbar button{font-size:12px!important;padding:6px!important;white-space:nowrap}.stick{width:80px;height:80px}.card p{font-size:13px}.card{padding:12px}.card h2{font-size:20px;margin-bottom:6px}}

@media(orientation:portrait){#javelin.overlay-open .toolbar{top:6px}#javelin.overlay-open .hud,#javelin.overlay-open .readouts{visibility:hidden}#javelin.overlay-open .overlay{padding-top:60px;padding-bottom:12px}#javelin.overlay-open .card h2{font-size:24px}}

/* Keep ballistic targets clear of readouts on narrow portrait screens. */
@media(max-width:440px) and (orientation:portrait){#javelin .readouts{font-size:12px;padding:6px 8px;gap:4px 6px}#javelin .readouts meter{width:44px}#javelin .readouts #event{min-height:17px}}
@media(max-width:360px) and (orientation:portrait){#javelin .hud strong{font-size:15px;white-space:nowrap}#javelin .hud>div{font-size:12px;padding:6px 8px}}

/* Only the initial menu uses the turntable layout. Other overlays retain their card. */
#opponent-preview,.preview-caption{display:none}
#javelin.menu-preview .hud,#javelin.menu-preview .readouts,#javelin.menu-preview .reticle,#javelin.menu-preview #pause{display:none}
#javelin.menu-preview .toolbar{top:8px;left:auto;right:8px}
#javelin.menu-preview .overlay{padding:60px 16px 12px;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px;background:transparent;align-items:center}
#javelin.menu-preview #opponent-preview{display:block;align-self:stretch;min-height:0;width:100%;height:100%;pointer-events:none}
#javelin.menu-preview .card{width:100%;padding:14px;background:#f4faf7ed}
#javelin.menu-preview .preview-caption{display:block;font-size:14px;margin:0 0 10px}
#javelin.menu-preview .card h2{font-size:22px;line-height:1.3;margin:0 0 8px}
#javelin.menu-preview .card p:not(.preview-caption){font-size:14px;line-height:1.5;margin:8px 0 12px}
@media(orientation:portrait){
 #javelin.menu-preview .toolbar{left:6px;right:6px;justify-content:center;top:6px}
 #javelin.menu-preview .overlay{padding:56px 8px 8px;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:2px}
 #javelin.menu-preview .card{padding:8px}
 #javelin.menu-preview .card h2{font-size:17px;line-height:22px;margin:0 0 4px}
 #javelin.menu-preview .preview-caption{font-size:12px;line-height:17px;margin:0 0 4px}
 #javelin.menu-preview .card p:not(.preview-caption){font-size:12px;line-height:17px;margin:0 0 5px}
 #javelin.menu-preview .actions{gap:6px}
 #javelin.menu-preview .actions button{padding:6px 10px;font-size:13px}
}
@media(max-height:400px) and (orientation:landscape){
 #javelin.menu-preview .overlay{padding:54px 8px 6px;gap:6px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 #javelin.menu-preview .card{padding:8px}
 #javelin.menu-preview .card h2{font-size:17px;line-height:22px;margin-bottom:4px}
 #javelin.menu-preview .card p{font-size:12px!important;line-height:17px;margin:4px 0 6px!important}
}

#javelin.menu-preview #panel-text:empty{display:none}

/* Campaign controls stay in the existing game frame. */
#difficulty-options{display:flex;justify-content:center;align-items:center;gap:8px;margin:6px 0}
#difficulty-options select{min-width:140px}
#distance{font-size:12px}
@media(max-width:440px) and (orientation:portrait){#distance{width:100%;font-size:11px}#javelin .readouts{gap:2px 6px}#javelin.menu-preview .preview-caption{display:none}#javelin.menu-preview .card p:not(.preview-caption){font-size:11px;line-height:15px;margin:3px 0}#difficulty-options{font-size:12px;margin:4px 0}#difficulty-options select{font-size:12px;padding:4px 8px}}
@media(max-height:400px) and (orientation:landscape){#javelin.menu-preview .preview-caption{display:none}#javelin.menu-preview .card h2{font-size:16px}#javelin.menu-preview .card p:not(.preview-caption){font-size:11px!important;line-height:14px;margin:3px 0!important}#difficulty-options{font-size:12px;margin:3px 0}#difficulty-options select{font-size:12px;padding:4px 8px}}

/* Keep outcome and 44px actions visible on small portrait screens. */
@media(max-width:360px) and (orientation:portrait){
 #javelin #summary{display:none}
}

/* Match each stick wrapper to its control so labels cannot shift the hit area. */
.stick-wrap{width:112px}
.stick-wrap span{width:100%;white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:14px;min-height:28px}
@media(orientation:portrait){.stick-wrap{width:100px}}
@media(max-width:360px) and (orientation:portrait){.stick-wrap{width:80px}}
@media(max-height:600px) and (orientation:landscape){.stick-wrap{width:82px}}

/* Defense mode stays beside the right control, clear of the opponent. */
#javelin .guard-mode{position:absolute;right:16px;bottom:226px;z-index:3;min-width:96px;min-height:44px;font-size:13px}
#javelin[data-mode=mouse] .guard-mode{bottom:80px}
#javelin .guard-mode[aria-pressed=true]{background:#d6ecff;border-color:#76a9d5}
@media(orientation:portrait){#javelin .guard-mode{right:10px;bottom:220px}}
@media(max-width:360px) and (orientation:portrait){#javelin .guard-mode{bottom:202px;right:10px;min-width:80px;padding:6px}}
@media(max-height:600px) and (orientation:landscape){#javelin .guard-mode{bottom:132px;right:10px;min-width:82px;padding:6px;font-size:12px}}
#javelin[data-mode=touch] .guard-mode{bottom:78px;width:112px;min-width:0;padding:5px 2px}
#javelin[data-mode=touch] .stick-wrap span{min-height:44px}
#javelin[data-mode=touch] .stick-wrap:last-child span{visibility:hidden}
@media(orientation:portrait){#javelin[data-mode=touch] .guard-mode{bottom:84px;right:10px;width:100px}#javelin:not(.overlay-open):not(.settings-open) .toolbar{top:86px}}
@media(max-width:360px) and (orientation:portrait){#javelin[data-mode=touch] .guard-mode{width:80px;font-size:12px}}
@media(max-height:600px) and (orientation:landscape){#javelin[data-mode=touch] .guard-mode{bottom:12px;right:10px;width:82px;font-size:12px}}

#javelin[data-control=shield] .readouts>label{display:none}

/* Two metadata rows leave the distant opponent above the landscape panel. */
@media(max-height:600px) and (orientation:landscape){
 #javelin .readouts{width:54%;padding:6px 8px;gap:3px 6px;font-size:12px;line-height:17px}
 #javelin .readouts #distance{font-size:12px;white-space:nowrap;width:auto}
 #javelin .readouts #aim,#javelin .readouts label{white-space:nowrap}
 #javelin .readouts label{gap:0}
 #javelin .readouts meter{display:none}
 #javelin .readouts #event{font-size:12px;line-height:17px;min-height:17px}
}

/* Readable, paged guidance; game inputs and shared shell stay unchanged. */
.guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.guide-grid>section{padding:16px;background:#fff;border:1px solid #cbded4;border-radius:12px}
.javelin-info h2{margin-top:0}.javelin-info h3{margin:0 0 10px;font-size:19px}
.javelin-info p,.javelin-info li{font-size:16px;line-height:1.8}
.javelin-info ol{margin:0;padding-left:1.5em}.javelin-info li+li{margin-top:6px}
.javelin-info p{margin:12px 0 0}.guide-note{padding-top:16px;border-top:1px solid #cbded4}
.damage-list{display:flex;gap:12px;margin:12px 0}.damage-list div{flex:1;background:#f4faf7;text-align:center;border-radius:8px;padding:8px}
.damage-list dt{font-weight:bold}.damage-list dd{margin:0;font-size:22px;font-weight:bold}
#help-content{text-align:left;font-size:16px;line-height:1.65}
#help-content ol{margin:0;padding-left:1.5em}#help-content li+li{margin-top:10px}
#help-pages{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:16px 0}
#help-page{white-space:nowrap;font-size:16px}
#javelin.help-open .card{padding:20px;width:min(580px,100%)}
#javelin.help-open .card h2{font-size:22px;line-height:1.35;margin:0 0 14px}
#javelin.help-open .actions button{font-size:16px;min-height:44px}
@media(max-width:600px){.guide-grid{grid-template-columns:1fr}.javelin-info{padding:16px}.guide-grid>section{padding:14px}
 #help-content{font-size:14px;line-height:1.6}
 #javelin.help-open .card{padding:14px}#javelin.help-open .card h2{font-size:20px;margin-bottom:12px}
 #javelin.help-open .actions button{font-size:14px}#help-pages{margin:12px 0}
}
@media(max-height:600px) and (orientation:landscape){
 #javelin.help-open .overlay{padding:56px 8px 8px}
 #javelin.help-open .card{width:100%;max-width:720px;padding:12px;display:grid;grid-template-columns:minmax(0,1fr) 172px;gap:8px 18px;align-items:center}
 #javelin.help-open .card h2{grid-column:1;margin:0;font-size:20px}
 #help-content{grid-column:1;grid-row:2;font-size:14px;line-height:1.5}
 #help-content li+li{margin-top:7px}
 #help-pages{grid-column:2;grid-row:1;margin:0;gap:4px}
 #javelin.help-open #help-pages button{padding:8px;min-width:52px;font-size:14px}
 #help-page{font-size:14px}
 #javelin.help-open .actions{grid-column:2;grid-row:2;display:grid;gap:6px}
 #javelin.help-open .actions button{font-size:14px;padding:8px}
}

@media(orientation:portrait){#javelin.help-open .overlay{padding:56px 6px 6px}#javelin.help-open .card{padding:10px}#javelin.help-open .card h2{margin-bottom:6px}#help-content{font-size:14px;line-height:1.5}#help-content li+li{margin-top:4px}#help-pages{margin:6px 0}#javelin.help-open .actions{gap:6px}}

/* Keep the smallest portrait help card clear of fractional frame edges. */
@media(max-width:360px) and (orientation:portrait){#javelin.help-open .card{padding-block:8px}}
