/* 龍が如く風の HUD。index.html の <style> のあとに読み込んで上書きする */
@font-face { font-family: "Fude"; src: local("HGGyoshotai"), local("HG行書体"), local("HGRGY"); }
:root { --fude: "Fude", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif; }

/* ---- プレイヤー ---- */
#hud { left: 26px; top: 20px; width: 430px; }
#hud .plate { display: flex; align-items: center; gap: 12px; }
#hud .crest { width: 62px; height: 62px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a1010, #0a0505 70%); border: 2px solid #c9a24a;
  box-shadow: 0 0 0 3px rgba(0,0,0,.7), 0 0 18px rgba(201,162,74,.35);
  display: grid; place-items: center; font: 900 34px var(--fude); color: #f4e4b0; text-shadow: 0 0 6px #000; }
#hud .bars { flex: 1; }
#name { font: 700 22px var(--fude); letter-spacing: .18em; color: #f4ecd8; margin: 0 0 4px 2px;
  text-shadow: 0 0 2px #000, 0 2px 6px #000; }
#hud .bar { position: relative; height: 15px; background: linear-gradient(#141416, #050506);
  border: 1px solid #8a7a50; box-shadow: 0 0 0 1px #000, inset 0 0 6px #000; transform: skewX(-24deg);
  margin-bottom: 7px; overflow: hidden; }
#hpTrail { position: absolute; inset: 0 auto 0 0; width: 100%; background: #f2efe6; transition: width .6s cubic-bezier(.3,.6,.4,1) .25s; }
#hp { position: absolute; inset: 0 auto 0 0; height: 100%; width: 100%; transition: width .08s;
  background: linear-gradient(180deg, #8dff9c 0%, #2ccf5a 45%, #138a37 100%); box-shadow: inset 0 -2px 0 rgba(0,0,0,.35); }
#hp.mid { background: linear-gradient(180deg, #ffe68a 0%, #f2b21e 45%, #9a6a08 100%); }
#hp.low { background: linear-gradient(180deg, #ff8a8a 0%, #e82a2a 45%, #8a0a0a 100%); animation: lowhp .5s infinite alternate; }
@keyframes lowhp { to { filter: brightness(1.5); } }
#hud .bar .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0,0,0,.55) calc(10% - 1px) 10%); }

/* ヒート: 3 段のゲージ、満タンで炎 */
#heatbar { height: 11px !important; width: 82% !important; border-color: #3a6aa0 !important; }
#heat { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #9fe0ff, #2a8cff 50%, #0a3a90) !important; }
#heatbar .seg { position: absolute; top: 0; bottom: 0; width: 2px; background: #000; }
#heatbar.full { border-color: #ffb030 !important; box-shadow: 0 0 0 1px #000, 0 0 14px #ff8a20, 0 0 30px rgba(255,90,20,.6) !important; }
#heatbar.full #heat { background: linear-gradient(180deg, #fff2a0, #ffa020 45%, #d02a00) !important; animation: heatfire .18s infinite alternate !important; }
@keyframes heatfire { to { filter: brightness(1.45) saturate(1.3); } }
#heatlab { font: 800 12px/1 system-ui, sans-serif !important; letter-spacing: .32em !important; color: #8fd3ff !important; margin-left: 4px; }
#heatlab b { font: 700 16px var(--fude); letter-spacing: .1em; margin-left: 8px; color: #ffd36a; opacity: 0; }
#heatbar.full + #heatlab { color: #ffcf5a !important; }
#heatbar.full + #heatlab b { opacity: 1; animation: pulse .4s infinite alternate; }

/* ---- ウェーブとコンボ ---- */
#wave { right: 30px; top: 18px; }
#wave .w { font: 800 12px system-ui, sans-serif; letter-spacing: .4em; color: #c9a24a; opacity: 1 !important; }
#wave .n { font: 700 40px/1 var(--fude); color: #f4ecd8; text-shadow: 0 0 2px #000, 0 3px 10px #000; }
#combo { position: fixed; right: 34px; top: 34%; text-align: right; pointer-events: none; opacity: 0; transition: opacity .3s; }
#combo .num { font: 900 74px/1 "Impact", "Arial Black", sans-serif; color: #fff; font-style: italic;
  -webkit-text-stroke: 2px #000; text-shadow: 0 0 18px rgba(255,160,40,.8), 4px 4px 0 #a01a10; display: inline-block; }
#combo .lab { font: 700 26px var(--fude); color: #ffcf5a; text-shadow: 0 0 4px #000, 0 2px 6px #000; margin-left: 6px; }
#combo.pop .num { animation: combopop .18s ease-out; }
@keyframes combopop { from { transform: scale(1.5) rotate(-6deg); } to { transform: scale(1); } }

/* ---- 敵の頭上 ---- */
.ehp .nm { font: 700 15px var(--fude) !important; letter-spacing: .12em !important; color: #f0e6d0; text-shadow: 0 0 2px #000, 0 1px 4px #000 !important; }
.ehp .b { width: 84px !important; height: 6px !important; background: #050505 !important; border: 1px solid #6a5a3a !important;
  transform: skewX(-24deg); position: relative; overflow: hidden; }
.ehp .t { position: absolute; inset: 0 auto 0 0; width: 100%; background: #f2efe6; transition: width .5s ease .2s; }
.ehp .f { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ff8a8a, #d81a24 60%, #7a0a10) !important; }
.ehp.boss { display: none !important; }
.ehp .intent { min-height: 17px; font: 800 12px/17px system-ui, sans-serif; letter-spacing: .08em;
  color: #91eeff; text-shadow: 0 1px 3px #000, 0 0 5px #000; }
.ehp.targeted .b { border-color: #91eeff !important; box-shadow: 0 0 5px #163e49; }
.ehp.warning .intent { color: #ffcf85; background: rgba(43,17,3,.88); padding: 2px 7px; border: 1px solid #ffa347; border-radius: 3px; }
.ehp.warning .nm { color: #ffcf85; }
.ehp.boss.targeted, .ehp.boss.warning { display: block !important; }
.ehp.boss .nm, .ehp.boss .b { display: none; }

/* ボス: 画面下の大きなゲージ */
#bossbar { position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%); width: min(720px, 70vw); display: none; pointer-events: none; }
#bossbar.show { display: block; }
#bossbar .bn { font: 700 30px var(--fude); color: #f4ecd8; letter-spacing: .2em; text-shadow: 0 0 2px #000, 0 2px 8px #000; margin-bottom: 4px; }
#bossbar .bn small { font: 800 12px system-ui, sans-serif; letter-spacing: .4em; color: #c9a24a; margin-right: 14px; }
#bossbar .b { position: relative; height: 16px; background: #050506; border: 1px solid #c9a24a; box-shadow: 0 0 0 1px #000; transform: skewX(-24deg); overflow: hidden; }
#bossbar .t { position: absolute; inset: 0 auto 0 0; width: 100%; background: #f2efe6; transition: width .6s ease .25s; }
#bossbar .f { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(180deg, #ffb070, #d8341a 55%, #6a0a00); }

/* ---- ダメージ数字 ---- */
.dmg { font: 900 26px "Impact", "Arial Black", sans-serif !important; font-style: italic !important; -webkit-text-stroke: 1.5px #000;
  text-shadow: 0 3px 0 #000 !important; animation: dmgpop .22s ease-out; }
.dmg.big { font-size: 40px !important; color: #ffd23f !important; text-shadow: 0 0 14px rgba(255,140,30,.9), 0 3px 0 #000 !important; }
@keyframes dmgpop { from { transform: translate(-50%, -50%) scale(1.8); } to { transform: translate(-50%, -50%) scale(1); } }

/* ---- 大見出し（ウェーブ・ヒートアクション・決着） ---- */
#banner { font: 700 92px var(--fude) !important; letter-spacing: .12em !important; color: #f4ecd8;
  text-shadow: 0 0 3px #000, 0 6px 24px rgba(0,0,0,.95) !important; }
#banner small { font: 800 16px system-ui, sans-serif !important; letter-spacing: .6em !important; color: #c9a24a; }
#banner.heat { color: #ffd04a !important; -webkit-text-stroke: 0 !important; text-shadow: 0 0 22px #ff6a00, 0 0 4px #000, 0 6px 20px #000 !important; }
.overlay h1 { font: 700 96px var(--fude) !important; letter-spacing: .14em !important; color: #f4ecd8; text-shadow: 0 0 30px rgba(200,30,30,.5); }
.overlay h1 .subtitle { display: block; margin: 8px 0 22px; font: 700 clamp(20px, 4vw, 32px)/1.4 var(--fude); letter-spacing: .14em; color: #c9a24a; }
button.big { font: 700 24px var(--fude) !important; letter-spacing: .3em !important; background: linear-gradient(#b4141c, #6a0a0e) !important;
  border: 1px solid #c9a24a !important; padding: 12px 44px !important; }
#help { font-size: 11px; opacity: .8; }
.game-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 0 16px 16px; }
.game-options label { display: grid; gap: 5px; text-align: left; font-size: 12px; color: #c9a24a; }
.game-options select { padding: 8px 12px; background: #18141c; color: #f4ecd8; border: 1px solid #77653f; font: inherit; min-width: 180px; }
.overlay p.combo-tip { font-size: 12px; color: #dec596; margin-bottom: 18px; }
#heat-prompt { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); padding: 10px 22px;
  border: 1px solid #d9a74c; background: rgba(30,14,6,.88); color: #ffe7a4; text-shadow: 0 1px 3px #000; pointer-events: none; font: 800 17px system-ui, sans-serif; white-space: nowrap; }
#heat-prompt b { display: inline-block; padding: 2px 7px; margin-right: 5px; background: #f7d47b; color: #35150b; border-radius: 3px; }
#heat-prompt small { display: block; text-align: center; font-size: 11px; font-weight: 400; margin-top: 3px; }
#bossbar.show ~ #heat-prompt { bottom: 130px; }

#playtest-tools { position: fixed; right: 24px; top: 98px; z-index: 6; width: min(310px, calc(100vw - 48px));
  padding: 9px 12px; box-sizing: border-box; background: rgba(8,10,16,.9); border: 1px solid #77653f; border-radius: 5px; font: 12px/1.5 system-ui, sans-serif; }
#playtest-tools summary { cursor: pointer; color: #f4ecd8; }
#log-status { display: block; margin-left: 13px; color: #91d8ba; font-size: 10px; }
#playtest-tools .log-actions { display: flex; gap: 8px; margin: 10px 0; }
#playtest-tools button { font: inherit; cursor: pointer; color: #f4ecd8; border: 1px solid #77653f; border-radius: 3px; background: #252229; padding: 5px 8px; }
#playtest-tools label { display: block; margin-bottom: 4px; color: #c8c9ce; }
#playtest-tools textarea { display: block; box-sizing: border-box; width: 100%; margin-bottom: 6px; resize: vertical; font: inherit; background: #13151d; color: #fff; border: 1px solid #616575; padding: 6px; user-select: text; }
