* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 色と字体。狩猟もの風に、暗い墨色・錆びた赤・くすんだ金で揃える */
:root {
  --ink: #1d1a18;
  --ink-2: #2b2623;
  --rust: #8a3424;
  --rust-dark: #5e2116;
  --tan: rgba(214, 190, 160, 0.6);
  --tan-solid: #d6be9f;
  --paper: #f3e9d8;
  --gold: #e9c27a;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0f0d0c;
  color: var(--paper);
  font-family: var(--serif);
  overscroll-behavior: none;
}
/* 福笑いと同じ：ダブルタップでの拡大だけ止める（none だと Xで共有 がアプリに渡らない） */
html, body, button, a { touch-action: manipulation; }
#view { touch-action: none; }

/* ゲーム画面。縦長(9:16前後)を基準に、横長の画面では中央に縦長領域を取る */
#game {
  --u: 4px; /* 画面幅の1%。main.jsで更新 */
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: min(100vw, 100dvh * 0.75);
  margin: 0 auto;
  overflow: hidden;
  background: var(--ink);
}

#view, #view canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* 画面の四隅をわずかに暗くして、視線を中央へ集める */
#game.title-mode #view::after { opacity: 0.5; } /* タイトルは明るめに */
#view::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 70% at 50% 45%, transparent 55%, rgba(10, 8, 7, 0.38) 100%);
}

/* ---- HUD ---- */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: calc(env(safe-area-inset-top) + 24px) calc(env(safe-area-inset-right) + 4 * var(--u)) 0 calc(env(safe-area-inset-left) + 7 * var(--u));
}

/* 体力・スタミナ：角ばったゲージを設定ボタンの手前まで伸ばす */
.bars { width: calc(100% - 9 * var(--u)); display: flex; flex-direction: column; gap: calc(1.6 * var(--u)); }
.bar { height: calc(2.4 * var(--u)); min-height: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: 0 0 0 1px rgba(214, 190, 160, 0.3); }
.bar.hp { background: #4a3b3e; position: relative; }
.bar.hp .fill { position: absolute; left: 0; top: 0; }
.bar.hp .fill.red { background: #d8382a; transition: none; }
.bar.st { background: #4a4637; height: calc(1.8 * var(--u)); min-height: 7px; }
.bar .fill { height: 100%; width: 100%; transform-origin: left; transition: width 0.12s linear; }
.bar.hp .fill:not(.red) { background: #4cd60e; }
.bar.st .fill { background: #ffdc1e; }
.bar.st.empty .fill { background: #c9861a; }

.icon-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 24px - 2.5 * var(--u));
  right: calc(env(safe-area-inset-right) + 3 * var(--u));
  width: calc(9 * var(--u));
  height: calc(9 * var(--u));
  min-width: 34px;
  min-height: 34px;
  padding: calc(1 * var(--u));
  border: 0;
  background: none;
  color: var(--paper);
  pointer-events: auto;
  touch-action: none;
}

/* ---- 操作UI ---- */
#controls { position: absolute; inset: 0; pointer-events: none; }
.ctrl { position: absolute; pointer-events: auto; touch-action: none; }

/* スティック：見た目より少し広い当たり判定を持つ */
#stick {
  left: calc(env(safe-area-inset-left) + 2 * var(--u));
  bottom: calc(env(safe-area-inset-bottom) + 3 * var(--u));
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
}
.stick-base {
  width: 85%;
  height: 85%;
  border-radius: 50%;
  background: rgba(29, 26, 24, 0.5);
  border: 1.5px solid rgba(214, 190, 160, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stick-knob {
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: rgba(214, 190, 160, 0.75);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.action {
  border-radius: 50%;
  border: 1.5px solid var(--tan);
  background: radial-gradient(circle at 50% 35%, rgba(52, 47, 43, 0.92), rgba(24, 21, 19, 0.92));
  color: var(--paper);
  font: inherit;
  font-size: calc(4.4 * var(--u));
  font-weight: 600;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}
.action.pressed { filter: brightness(1.35); transform: scale(0.95); }
.action.disabled { opacity: 0.45; }

#btn-heal {
  left: calc(env(safe-area-inset-left) + 14 * var(--u));
  bottom: calc(env(safe-area-inset-bottom) + 43 * var(--u));
  width: calc(15 * var(--u));
  height: calc(15 * var(--u));
  font-size: calc(3.8 * var(--u));
}
#btn-heal img { width: 62%; height: auto; pointer-events: none; -webkit-user-drag: none; }
#btn-heal .count { font-size: calc(2.6 * var(--u)); opacity: 0.9; margin-top: calc(-0.5 * var(--u)); }

#btn-dodge {
  right: calc(env(safe-area-inset-right) + 36 * var(--u));
  bottom: calc(env(safe-area-inset-bottom) + 6 * var(--u));
  width: calc(16.5 * var(--u));
  height: calc(16.5 * var(--u));
  font-size: calc(4 * var(--u));
}

/* 仮置き：武器の出し入れ */
#btn-sheathe {
  right: calc(env(safe-area-inset-right) + 7 * var(--u));
  bottom: calc(env(safe-area-inset-bottom) + 58 * var(--u));
  width: calc(13 * var(--u));
  height: calc(13 * var(--u));
  font-size: calc(3.6 * var(--u));
}

#btn-slash {
  right: calc(env(safe-area-inset-right) + 5 * var(--u));
  bottom: calc(env(safe-area-inset-bottom) + 37 * var(--u));
  width: calc(17.5 * var(--u));
  height: calc(17.5 * var(--u));
}

#btn-charge {
  right: calc(env(safe-area-inset-right) + 5 * var(--u));
  bottom: calc(env(safe-area-inset-bottom) + 6 * var(--u));
  width: calc(28 * var(--u));
  height: calc(28 * var(--u));
  background: radial-gradient(circle at 50% 35%, rgba(156, 62, 43, 0.95), rgba(94, 33, 22, 0.95));
  border: 2px solid var(--tan-solid);
}
#btn-charge .main { font-size: calc(5.6 * var(--u)); }
#btn-charge .sub { font-size: calc(3.6 * var(--u)); opacity: 0.85; margin-top: calc(1 * var(--u)); }
#btn-charge .pips { display: flex; gap: calc(1.2 * var(--u)); margin-top: calc(1.2 * var(--u)); }
#btn-charge .pips i {
  width: calc(2 * var(--u));
  height: calc(2 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
#btn-charge[data-level="1"] .pips i:nth-child(-n+1),
#btn-charge[data-level="2"] .pips i:nth-child(-n+2),
#btn-charge[data-level="3"] .pips i:nth-child(-n+3) { background: var(--gold); }
#btn-charge[data-level="3"] { border-color: var(--gold); box-shadow: 0 0 calc(3 * var(--u)) rgba(233, 194, 122, 0.7); }

/* ---- オーバーレイ ---- */
.overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 10, 9, 0.72);
  z-index: 10;
  padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 16px);
}
.overlay.show { display: flex; animation: overlay-in 0.22s ease-out; }
/* 縦の短い画面で中身がはみ出したときはスクロールできるように */
.overlay { overflow-y: auto; }
@media (max-width: 340px) { .controls-list { font-size: 13px; gap: 8px 10px; } }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
/* タイトル：ロゴは少し遅れて浮かび上がる */
.overlay.title-screen.show .title-head { animation: title-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.overlay.title-screen.show .title-box { animation: overlay-in 0.6s 0.4s ease-out both; }
@keyframes title-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.panel {
  width: 100%;
  max-width: 440px;
  text-align: center;
  background: linear-gradient(180deg, rgba(40, 35, 32, 0.96), rgba(24, 21, 19, 0.96));
  border: 1px solid rgba(214, 190, 160, 0.35);
  border-radius: 4px;
  padding: 34px 24px 30px;
}
.panel h2 {
  margin: 0 0 22px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--paper);
}
.panel p { font-size: calc(4 * var(--u)); }
.help { text-align: left; margin: 0 0 calc(3 * var(--u)); padding-left: calc(5 * var(--u)); font-size: calc(3.6 * var(--u)); line-height: 1.7; }
.pc-help { font-size: calc(2.9 * var(--u)) !important; opacity: 0.6; line-height: 1.5; }
.pc-help span { white-space: nowrap; margin: 0 calc(0.8 * var(--u)); } /* 項目の途中で折り返さない */

/* 帯のボタン：両端を矢羽根のように切り欠き、細い枠線を付ける。主な操作は錆びた赤に菱形の印 */
.big-btn {
  --cut: polygon(14px 0, calc(100% - 14px) 0, calc(100% - 5px) 30%, 100% 50%, calc(100% - 5px) 70%, calc(100% - 14px) 100%, 14px 100%, 5px 70%, 0 50%, 5px 30%);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin-top: 14px;
  padding: 0 40px;
  font: inherit;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: var(--paper);
  background: var(--tan);
  border: 0;
  clip-path: var(--cut);
  touch-action: manipulation;
}
.big-btn::before {
  content: '';
  position: absolute;
  inset: 1.5px;
  z-index: -1;
  clip-path: var(--cut);
  background: linear-gradient(180deg, #34302c, var(--ink));
}
.big-btn.primary::before { background: linear-gradient(180deg, #9c3e2b, var(--rust-dark)); }
.big-btn.primary::after {
  content: '';
  position: absolute;
  left: 26px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--paper);
  box-shadow: inset 0 0 0 2.5px var(--rust-dark), inset 0 0 0 6px var(--paper);
  transform: translateY(-50%) rotate(45deg);
}
.big-btn:active { filter: brightness(1.2); }
a.big-btn { text-decoration: none; }
.big-btn.toggle { justify-content: space-between; padding: 0 44px; }
.big-btn.toggle b { font-weight: 700; color: var(--gold); letter-spacing: 0.1em; }
.big-btn.toggle.off b { color: rgba(243, 233, 216, 0.4); }
/* 難易度：名前の下に回復の数だけ小さく */
.diff-btn { flex-direction: column; height: 64px; line-height: 1.25; }
.diff-btn small { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; opacity: 0.75; }
.btn-row .big-btn.primary::after { display: none; } /* 2列のときは幅が足りないので菱形を出さない */
/* 文字だけのボタン（戻る） */
.big-btn.text-btn { height: 40px; background: none; clip-path: none; color: rgba(243, 233, 216, 0.75); font-size: 16px; }
.big-btn.text-btn::before { display: none; }
.btn-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
.btn-row .big-btn { padding: 0 16px; letter-spacing: 0.06em; }
.big-btn.small { height: 44px; font-size: 16px; letter-spacing: 0.06em; padding: 0 20px; }

#rotate-hint {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  font-size: 20px;
}
@media (orientation: landscape) and (pointer: coarse) and (max-height: 600px) {
  #rotate-hint { display: flex; }
}

/* ---- 部位破壊の表示 ---- */
#banner {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(env(safe-area-inset-top) + 19 * var(--u));
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}
#banner.show { animation: banner 2.4s ease-out forwards; }
#banner span {
  padding: calc(1.8 * var(--u)) calc(12 * var(--u));
  font-size: calc(5.2 * var(--u));
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fff4dc;
  text-shadow: 0 0 calc(2.5 * var(--u)) rgba(255, 150, 60, 0.85), 0 1px 2px rgba(0, 0, 0, 0.8);
  background: linear-gradient(90deg, transparent, rgba(24, 12, 6, 0.78) 22%, rgba(24, 12, 6, 0.78) 78%, transparent);
  border-top: 1px solid;
  border-bottom: 1px solid;
  border-image: linear-gradient(90deg, transparent, #e9b56c 30%, #e9b56c 70%, transparent) 1;
}
@keyframes banner {
  0% { opacity: 0; transform: scale(1.3); letter-spacing: 0.4em; }
  9% { opacity: 1; transform: scale(1); letter-spacing: 0.14em; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}
/* ---- リザルト ---- */
#overlay-result { flex-direction: column; }
/* ロゴは枠の外、上に大きく */
.result-logo { display: block; width: auto; max-width: min(88%, 460px); height: auto; max-height: 22dvh; margin: 0 auto 18px; pointer-events: none; -webkit-user-drag: none; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6)); }
.result-panel h2 { margin-bottom: 8px; }
.result-monster { margin: 0 0 22px; font-size: 21px !important; font-weight: 600; letter-spacing: 0.12em; color: var(--gold); }
#result-stats {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 0 4px 10px;
  font-size: 18px;
}
#result-stats dt, #result-stats dd { padding: 11px 0; border-bottom: 1px solid rgba(214, 190, 160, 0.16); }
#result-stats dt { text-align: left; opacity: 0.75; white-space: nowrap; }
#result-stats dd { margin: 0; text-align: right; font-weight: 700; white-space: nowrap; }
.new-record { margin-right: 8px; padding: 1px 6px; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--gold); border-radius: 2px; vertical-align: 2px; }
/* 縦の短い画面では詰める */
@media (max-height: 700px) {
  .result-logo { max-width: 62%; margin-bottom: 10px; }
  .panel { padding: 22px 20px 20px; }
  .panel h2 { font-size: 23px; margin-bottom: 14px; }
  .result-monster { font-size: 18px !important; margin-bottom: 10px; }
  #result-stats { font-size: 15px; }
  #result-stats dt, #result-stats dd { padding: 6px 0; }
  .big-btn { height: 46px; margin-top: 10px; font-size: 17px; }
}
@media (max-height: 580px) {
  .result-logo { max-width: 46%; margin-bottom: 6px; }
  .panel h2 { font-size: 21px; margin-bottom: 6px; }
  .result-monster { margin-bottom: 6px; }
  #result-stats dt, #result-stats dd { padding: 4px 0; }
  .big-btn { height: 42px; margin-top: 8px; }
}
/* リザルト中は戦闘のHUDと操作ボタンを隠す（ロゴと重なるため） */
#game.result-mode #hud, #game.result-mode #controls { display: none; }

/* ---- のしかかり：連打ボタン ---- */
/* 抜け出した直後の連打が回避や回復に化けないよう、他のボタンより上（画面の中ほど）に置く */
#btn-mash {
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 76 * var(--u));
  transform: translateX(-50%);
  width: calc(28 * var(--u));
  height: calc(28 * var(--u));
  background: radial-gradient(circle at 50% 35%, rgba(156, 62, 43, 0.95), rgba(94, 33, 22, 0.95));
  border: 2px solid var(--tan-solid);
  display: none;
  z-index: 3;
}
#btn-mash .main { font-size: calc(6 * var(--u)); font-weight: 700; }
#btn-mash .sub { font-size: calc(3.4 * var(--u)); opacity: 0.85; margin-top: calc(0.8 * var(--u)); }
/* 外周のリングで抜け出すまでの進み具合を出す */
#btn-mash::before {
  content: '';
  position: absolute;
  inset: calc(-2.2 * var(--u));
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--p, 0deg), rgba(243, 233, 216, 0.2) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.4 * var(--u)), #000 calc(100% - 1.4 * var(--u)));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.4 * var(--u)), #000 calc(100% - 1.4 * var(--u)));
  pointer-events: none;
}
#btn-mash.show { display: flex; }
#btn-mash.pressed { transform: translateX(-50%) scale(0.92); }
#game.pinned #controls .ctrl:not(#btn-mash) { opacity: 0.3; }

/* 仮置き：討伐後、死体の近くで出る */
#btn-carve {
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 30 * var(--u));
  width: calc(30 * var(--u));
  height: calc(11 * var(--u));
  border-radius: calc(6 * var(--u));
  font-size: calc(4.4 * var(--u));
  display: none;
}
#btn-carve {
  --cut: polygon(14px 0, calc(100% - 14px) 0, calc(100% - 5px) 30%, 100% 50%, calc(100% - 5px) 70%, calc(100% - 14px) 100%, 14px 100%, 5px 70%, 0 50%, 5px 30%);
  isolation: isolate;
  border: 0;
  border-radius: 0;
  background: var(--tan);
  clip-path: var(--cut);
  letter-spacing: 0.15em;
}
#btn-carve::before {
  content: '';
  position: absolute;
  inset: 1.5px;
  z-index: -1;
  clip-path: var(--cut);
  background: linear-gradient(180deg, #9c3e2b, var(--rust-dark));
}
#btn-carve.show { display: flex; }
#btn-carve.pressed { transform: translateX(-50%) scale(0.95); }

/* 討伐演出中は操作UIを薄くして触れないようにする */
#game.cinematic #controls { opacity: 0.25; pointer-events: none; transition: opacity 0.4s; }
#game.cinematic #controls .ctrl { pointer-events: none; }

/* ---- 画面中央のメッセージ（モンハン風の帯） ---- */
#center-msg {
  position: absolute;
  left: 0;
  right: 0;
  top: 36%;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}
#center-msg.show { animation: centermsg var(--dur, 3s) ease-out forwards; }
#center-msg span {
  position: relative;
  width: 94%;
  padding: calc(2.4 * var(--u)) 12%;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  font-size: calc(4.1 * var(--u));
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f4f1ea;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  background: linear-gradient(90deg, transparent, rgba(12, 12, 14, 0.82) 12%, rgba(12, 12, 14, 0.82) 88%, transparent);
  border-top: 1px solid;
  border-bottom: 1px solid;
  border-image: linear-gradient(90deg, transparent, rgba(220, 214, 200, 0.55) 15%, rgba(220, 214, 200, 0.55) 85%, transparent) 1;
}
/* 両端の飾り */
#center-msg span::before,
#center-msg span::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(2.2 * var(--u));
  height: calc(2.2 * var(--u));
  border: 1px solid rgba(230, 222, 205, 0.8);
  transform: translateY(-50%) rotate(45deg);
}
#center-msg span::before { left: 5%; }
#center-msg span::after { right: 5%; }
@keyframes centermsg {
  0% { opacity: 0; }
  8% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---- タイトル画面（背景は3Dの屋上が見えるよう薄く）。題字は上、操作は下 ---- */
.overlay.title-screen {
  background: linear-gradient(180deg, rgba(10, 8, 7, 0.28) 0%, rgba(10, 8, 7, 0) 25%, rgba(10, 8, 7, 0) 58%, rgba(10, 8, 7, 0.6) 100%);
  flex-direction: column;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 48px) 20px calc(env(safe-area-inset-bottom) + 16px + var(--lift, 60px));
}
@media (max-height: 700px) { .overlay.title-screen { --lift: 36px; padding-top: calc(env(safe-area-inset-top) + 28px); } }
.title-head { text-align: center; }
.game-title { margin: 0; }
.game-title img {
  display: block;
  width: 92%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  -webkit-user-drag: none;
}
.title-box { width: 100%; max-width: 360px; text-align: center; }
/* 読み込み中：スタートを押せないようにし、下に細い進み具合のバーを出す */
.big-btn:disabled { filter: saturate(0.4) brightness(0.8); }
.load-bar { height: 2px; margin: 8px 24px 0; background: rgba(243, 233, 216, 0.15); transition: opacity 0.4s; }
.load-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.2s; }
.load-bar.done { opacity: 0; }
/* ボタンの下、右寄せの作者名と X へのリンク（ボタンと重ならないよう、流れの中に置く） */
.credit {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(243, 233, 216, 0.75);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; -webkit-touch-callout: none; }
@media (pointer: coarse) { .pc-help { display: none; } } /* スマホではPCの操作説明を出さない */
.controls-list {
  display: grid;
  grid-template-columns: auto auto;
  gap: 9px 12px;
  justify-content: center;
  margin: 0 0 12px;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
}
.controls-list dt { color: var(--gold); }
.controls-list dd { margin: 0; }
#overlay-controls .panel { padding-left: 14px; padding-right: 14px; }


/* タイトル・ムービー中は戦闘のUIを隠す */
#game.title-mode #hud, #game.title-mode #controls,
#game.movie-mode #hud, #game.movie-mode #controls { display: none; }

/* ---- 生態ムービー ---- */
#movie { position: absolute; inset: 0; display: none; pointer-events: none; z-index: 8; }
#movie.show { display: block; }
#movie .lb { position: absolute; left: 0; right: 0; height: 11%; background: #000; }
#movie .lb.top { top: 0; }
#movie .lb.bottom { bottom: 0; }
#movie-fade { position: absolute; inset: 0; background: #000; opacity: 0; }
#movie-caption {
  position: absolute;
  left: calc(6 * var(--u));
  bottom: calc(11% + 4 * var(--u));
  font-size: calc(4 * var(--u));
  letter-spacing: 0.25em;
  color: #f2ede2;
  text-shadow: 0 1px 3px #000;
  border-left: 2px solid rgba(240, 230, 210, 0.8);
  padding-left: calc(2 * var(--u));
  opacity: 0;
  transition: opacity 0.6s;
}
#movie-caption.show { opacity: 1; }
#movie-title {
  position: absolute;
  right: calc(4 * var(--u));
  top: calc(11% + 13 * var(--u)); /* スキップボタンの下 */
  width: 36%;
  opacity: 0;
}
#movie-title img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 calc(1.5 * var(--u)) rgba(0, 0, 0, 0.55));
}
#movie-title.show { animation: movietitle 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
@keyframes movietitle {
  0% { opacity: 0; transform: scale(1.8); filter: blur(4px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
#movie-skip {
  position: absolute;
  right: calc(4 * var(--u));
  top: calc(11% + 3 * var(--u));
  padding: calc(1.6 * var(--u)) calc(3.6 * var(--u));
  font: inherit;
  font-size: calc(3.4 * var(--u));
  color: var(--paper);
  background: rgba(20, 17, 15, 0.6);
  border: 1px solid var(--tan);
  border-radius: 2px;
  letter-spacing: 0.1em;
  pointer-events: auto;
  touch-action: manipulation;
}
@media (max-height: 700px) { .big-btn.diff-btn { height: 54px; } }
