/* 陣取りの遊ぶ画面。縦向き：上に動画、下にゲーム面 */
html, body.jt-play { height: 100%; overflow: hidden; overscroll-behavior: none; }
/* **画面全体で、文字の選択と長押しのメニュー（「コピー」など）を出さない。**
   ゲーム面の外（上の帯の ☆ や % の文字）に指がかかると出て、遊ぶ邪魔になった（2026/10/22 本人） */
body.jt-play { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.jt-col { height: 100%; width: min(100%, 34em); margin: 0 auto; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }

.jt-hud { display: flex; align-items: center; gap: .7em; padding: .4em .7em; font-size: .9em;
  flex: none; }
.jt-back { text-decoration: none; font-size: 1.3em; color: var(--ink); }
.jt-pct { margin-left: auto; font-variant-numeric: tabular-nums; }
.jt-pct b { font-size: 1.2em; color: var(--accent); }
.jt-lives { color: var(--accent); letter-spacing: .05em; }
.jt-time { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.jt-time.low { color: var(--ng); font-weight: 800; }

/* 動画。16:9。高さを取りすぎないよう画面の3割まで（YouTube の決まりで 200px 以上は保つ） */
.jt-yt { flex: none; display: flex; flex-direction: column; align-items: center; }
.jt-yt[hidden] { display: none; }
.jt-yt-player { width: min(100%, 30vh * 16 / 9); aspect-ratio: 16 / 9; min-width: 22em; max-width: 100%; }
.jt-yt-player iframe, .jt-yt-player > div { width: 100%; height: 100%; display: block; }
.jt-yt-src { margin: .2em .6em .3em; font-size: .68em; color: var(--dim); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.jt-yt-src a { color: var(--dim); }

/* ゲーム面。**ここ全体でなぞれる**（キャンバスの外の余白でも） */
.jt-field { position: relative; flex: 1; min-height: 0; display: flex; align-items: center;
  justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.jt-field canvas { display: block; border-radius: .4em; box-shadow: 0 0 0 1px var(--edge); }
.jt-field.boost canvas { box-shadow: 0 0 1.2em .2em rgba(255, 215, 106, .7), 0 0 0 2px var(--gold);
  animation: jtGlow 1.2s ease-in-out infinite alternate; }
@keyframes jtGlow { from { filter: saturate(1); } to { filter: saturate(1.5) brightness(1.08); } }

.jt-boost { position: absolute; top: 18%; left: 0; right: 0; text-align: center; pointer-events: none;
  font-size: 1.7em; font-weight: 900; color: #fff; letter-spacing: .05em;
  text-shadow: 0 0 .3em var(--accent), 0 0 .6em var(--gold), 0 .1em 0 #6a2a7a;
  animation: jtBoost 2.4s ease-out forwards; }
@keyframes jtBoost {
  0% { transform: scale(.4); opacity: 0; } 15% { transform: scale(1.15); opacity: 1; }
  25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-1em); } }

.jt-pop { position: absolute; left: 0; right: 0; top: 45%; text-align: center; pointer-events: none;
  font-weight: 900; font-size: 1.4em; color: var(--gold); opacity: 0;
  text-shadow: 0 0 .3em rgba(0,0,0,.8); }
.jt-pop.show { animation: jtPop .9s ease-out; }
@keyframes jtPop { 0% { opacity: 0; transform: scale(.6); } 20% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: translateY(-1.5em); } }

/* 開始前・結果。**ゲーム面の上だけ**（動画には重ねない） */
.jt-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(14, 8, 30, .78); padding: 1em; z-index: 5; }
.jt-over[hidden] { display: none; }
.jt-box { background: var(--panel); border: 1px solid var(--edge); border-radius: 1em; padding: 1.2em;
  width: min(100%, 20em); text-align: center; max-height: 100%; overflow: auto; }
.jt-box h2 { margin: 0 0 .4em; font-size: 1.4em; }
.jt-box p { margin: .4em 0; }
.jt-small { font-size: .8em; color: var(--dim); }
.jt-big { font-size: 2.2em; }
.jt-card { width: 60%; aspect-ratio: 59 / 86; object-fit: cover; border-radius: .5em;
  box-shadow: 0 0 1em rgba(255, 122, 200, .5); }
.btn:disabled { opacity: .45; cursor: default; }
.jt-card { max-height: 38vh; width: auto; }

.jt-foot { flex: none; padding: .4em .7em .2em; }
.jt-foot[hidden] { display: none; }
.jt-backbtn { width: 100%; font: inherit; font-weight: 800; font-size: .95em; padding: .6em;
  color: var(--ink); background: var(--panel); border: 1px solid var(--edge); border-radius: .7em;
  touch-action: none; user-select: none; -webkit-user-select: none; }
.jt-backbtn.on { background: var(--accent2); color: #10142c; border-color: var(--accent2); }

/* ===== 開始前の文字 ===== */
.jt-when { font-weight: 900; color: var(--accent); margin: .2em 0 0; }
.jt-pname { font-weight: 800; white-space: nowrap; font-size: clamp(.78em, 4.4vw, 1em); margin: .1em 0 .6em; }
#cardRule { line-height: 1.6; }

/* ===== クリアしたときの花火（ノリノリ！ライブの .gm-fw と同じ作り） =====
   1つの点にたくさんの影を付けて、丸ごと拡大して散らす */
.jt-celebrate { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.jt-celebrate[hidden] { display: none; }
.jt-fw {
  position: absolute; width: .6vh; height: .6vh; border-radius: 50%; background: transparent;
  box-shadow: 7.00vh 0.00vh 0 0 var(--fw), 6.06vh 3.50vh 0 0 var(--fw), 3.50vh 6.06vh 0 0 var(--fw), 0.00vh 7.00vh 0 0 var(--fw), -3.50vh 6.06vh 0 0 var(--fw), -6.06vh 3.50vh 0 0 var(--fw), -7.00vh 0.00vh 0 0 var(--fw), -6.06vh -3.50vh 0 0 var(--fw), -3.50vh -6.06vh 0 0 var(--fw), -0.00vh -7.00vh 0 0 var(--fw), 3.50vh -6.06vh 0 0 var(--fw), 6.06vh -3.50vh 0 0 var(--fw), 3.51vh 1.45vh 0 -.1vh var(--fw), 1.45vh 3.51vh 0 -.1vh var(--fw), -1.45vh 3.51vh 0 -.1vh var(--fw), -3.51vh 1.45vh 0 -.1vh var(--fw), -3.51vh -1.45vh 0 -.1vh var(--fw), -1.45vh -3.51vh 0 -.1vh var(--fw), 1.45vh -3.51vh 0 -.1vh var(--fw), 3.51vh -1.45vh 0 -.1vh var(--fw);
  opacity: 0; transform: scale(.15);
  animation: jtFw 1.6s ease-out infinite;
  filter: drop-shadow(0 0 .6vh rgba(255, 255, 255, .7));
}
@keyframes jtFw {
  0%   { opacity: 0;   transform: scale(.15); }
  6%   { opacity: 1;   transform: scale(.45); }
  40%  { opacity: .95; transform: scale(1.15); }
  66%  { opacity: 0;   transform: scale(1.5); }
  100% { opacity: 0;   transform: scale(1.5); }
}
/* 盤面（カード）を囲むように、四隅の近くで開く */
.jt-fw.f1 { --fw: #ff6fae; left: 12%; top: 14%; animation-duration: 1.5s; animation-delay: 0s; }
.jt-fw.f2 { --fw: #ffd166; left: 84%; top: 20%; animation-duration: 1.9s; animation-delay: -.6s; }
.jt-fw.f3 { --fw: #7fe3ff; left: 16%; top: 76%; animation-duration: 1.7s; animation-delay: -1.1s; }
.jt-fw.f4 { --fw: #b9a2ff; left: 82%; top: 70%; animation-duration: 2.1s; animation-delay: -.3s; }

/* ===== サインチャンスのリール ===== */
.jt-reel-title { font-weight: 900; font-size: 1.3em; color: var(--accent); margin: 0 0 .5em;
  animation: jtBlink .6s ease-in-out infinite alternate; }
@keyframes jtBlink { from { opacity: .55; } to { opacity: 1; } }
.jt-reel { position: relative; width: 58%; margin: 0 auto; aspect-ratio: 59 / 86; overflow: hidden;
  border-radius: .6em; box-shadow: 0 0 0 .2em var(--gold), 0 0 1.2em rgba(255, 200, 60, .7); background: #fff; }
.jt-reel-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.jt-reel-item { position: relative; width: 100%; aspect-ratio: 59 / 86; }
.jt-reel-item > img:first-child { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 印はカードの絵の大きさの指定を受けない（受けると印がカードを覆う） */
.jt-reel-item .jt-mark { width: 26%; height: auto; }

/* レア度ルーレットの札。横長。まだ開いていないレア度は灰色で鍵付き */
.jt-reel.tiers { width: 82%; aspect-ratio: 16 / 9; }
.jt-tier-tile { width: 100%; aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: .2em; color: #fff; }
.jt-tier-tile b { font-size: 2.4em; letter-spacing: -.05em; text-shadow: 0 .06em .12em rgba(0,0,0,.3); }
.jt-tier-tile.t0 { background: linear-gradient(160deg, #c9ecff, #6cc0ff); }
.jt-tier-tile.t1 { background: linear-gradient(160deg, #ffd6ee, #ff7fc0); }
.jt-tier-tile.t2 { background: linear-gradient(160deg, #fff3b8, #ffbb00); }
/* 止まった札の点滅（3回光る） */
.win { animation: jtWin .38s ease-in-out 4 alternate; }
@keyframes jtWin {
  from { filter: brightness(1); }
  to   { filter: brightness(1.55) saturate(1.3); box-shadow: inset 0 0 1.2em rgba(255, 255, 255, .95); }
}
.jt-reel-msg { min-height: 1.6em; font-weight: 900; font-size: 1.15em; margin: .6em 0 0; }
.jt-reel-msg.hit { color: var(--gold); text-shadow: 0 0 .4em rgba(255, 200, 60, .8); }

/* ===== クリア画面のカード ===== */
.jt-cardwrap { position: relative; display: inline-block; border-radius: .5em; }
.jt-cardwrap .jt-mark { width: 22%; }
.jt-new { position: absolute; top: -.3em; right: -.6em; transform: rotate(12deg);
  color: #e60023; font-weight: 900; font-size: 1.35em; letter-spacing: .02em;
  text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, 0 .15em .3em rgba(0,0,0,.25); }
.jt-new[hidden] { display: none; }
#resStat { line-height: 1.6; font-weight: 700; }

/* ===== 新しいレア度が開いた知らせ：5枚を扇に並べる ===== */
.jt-unlock-head { font-weight: 900; font-size: 1.2em; line-height: 1.5; margin: 0 0 .4em; }
.jt-unlock-head .tier { font-size: 1.3em; }
.jt-fan { position: relative; height: 38vh; max-height: 16em; margin: .4em 0 .8em; }
.jt-fan img { position: absolute; left: 50%; bottom: 4%; width: 32%; aspect-ratio: 59 / 86; object-fit: cover;
  border-radius: .4em; box-shadow: 0 .2em .6em rgba(0, 0, 0, .25); transform-origin: 50% 260%;
  translate: -50% 0; animation: jtFanIn .5s ease-out both; }
@keyframes jtFanIn { from { opacity: 0; transform: rotate(0deg) translateY(1em); } }
.jt-box { background: #fff; }
.jt-backbtn.on { color: #fff; }

/* 分断して囲まれた敵の「あだノリ〜！」。位置は play.js が敵のいた場所に置く */
.jt-bubble { position: absolute; z-index: 6; pointer-events: none; white-space: nowrap;
  translate: -50% -100%; margin-top: -.6em;
  background: #fff; color: #b0168a; font-weight: 900; font-size: .95em; padding: .35em .75em;
  border-radius: 1em; border: .15em solid #c06cff; box-shadow: 0 .2em .5em rgba(80, 20, 120, .3);
  animation: jtBubble 1.9s ease-out forwards; }
.jt-bubble::after { content: ""; position: absolute; left: 50%; bottom: -.55em; translate: -50% 0;
  border: .4em solid transparent; border-top-color: #c06cff; border-bottom: 0; }
@keyframes jtBubble {
  0%   { opacity: 0; transform: scale(.3); }
  12%  { opacity: 1; transform: scale(1.12); }
  22%  { transform: scale(1); }
  75%  { opacity: 1; transform: translateY(-.4em); }
  100% { opacity: 0; transform: translateY(-1.2em); }
}

/* 動画の ON/OFF */
.jt-toggle { font: inherit; font-weight: 800; font-size: .95em; padding: .45em 1.2em; margin-top: .2em;
  border-radius: 2em; border: 1px solid var(--accent2); background: #eaf4ff; color: var(--accent2); cursor: pointer; }
.jt-toggle.off { border-color: var(--edge); background: #f1f1f5; color: var(--dim); }
#videoNote { margin: .3em 0 .7em; }

/* X で自慢する */
.jt-share { display: block; width: 100%; margin: 0 0 .5em; padding: .65em; border-radius: .8em; border: 0;
  background: #111; color: #fff; font: inherit; font-weight: 800; font-size: 1em; cursor: pointer; }
.jt-share[hidden] { display: none; }
/* 「もう一度」と見分けるため、白地にピンクの枠 */
.jt-join { display: block; margin: 0 0 .5em; padding: .5em .65em; border-radius: .8em; text-decoration: none;
  background: #fff; color: var(--accent); border: 2px solid var(--accent); font-weight: 800; font-size: 1em; }
.jt-join small { display: block; margin-top: .15em; font-size: .7em; font-weight: 400; color: var(--dim); }
.jt-join[hidden] { display: none; }
