/* 『極める男』の画面（土台は base.css。『今日の一軒』の見た目と演出を流用） */

/* タイトル */
.t-bg img { object-position: 50% 30%; filter: blur(2px) brightness(.8); }
.t-man { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); position: absolute; left: 50%; top: 4%; width: 78%; max-width: 360px; transform: translateX(-50%); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .7)); animation: tman 1s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tman { from { opacity: 0; transform: translateX(-50%) scale(1.15); } }
.t-sub { font-family: var(--serif); color: var(--gold); letter-spacing: 0.3em; font-size: 1rem; text-shadow: 0 1px 6px #000; }
.t-name { font-size: 3.2rem; color: #fff6dc; text-shadow: 0 0 2px #000, 4px 4px 0 #8e2219, 0 0 30px rgba(255, 200, 90, .6); }
.t-best { font-size: 0.95rem; color: var(--gold); min-height: 1.2em; }

/* 勝負の画面 */
.tr-head { flex: none; display: flex; align-items: baseline; gap: 0.6rem; font-family: var(--serif); }
.tr-no { color: var(--gold); font-size: 1rem; letter-spacing: 0.1em; }
.tr-name { font-size: 1.6rem; letter-spacing: 0.2em; }
.tr-dots { margin-left: auto; font-size: 0.95rem; color: var(--dim); letter-spacing: 0.15em; }
.tr-dots b { color: var(--gold); }
.tr-scene { position: relative; flex: 1 1 auto; min-height: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; touch-action: none; }
.tr-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
#trSvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tr-how { position: absolute; left: 0.6rem; top: 0.6rem; max-width: 62%; background: rgba(22, 17, 13, .86); border: 1px solid var(--gold); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.95rem; line-height: 1.5; white-space: pre-line; transition: opacity .3s; }
.tr-how.off { opacity: 0; }
.tr-stars { position: absolute; left: 50%; bottom: 0.7rem; transform: translateX(-50%); white-space: nowrap; background: rgba(22, 17, 13, .9); border: 2px solid var(--gold); border-radius: 999px; padding: 0.3rem 0.9rem; font-family: var(--serif); font-size: 1.1rem; display: none; }
.tr-stars.on { display: block; animation: starsin .5s cubic-bezier(.2, 1.6, .4, 1); }
.tr-stars i { font-style: normal; color: #ffd36b; letter-spacing: 0.08em; text-shadow: 0 0 8px rgba(255, 200, 90, .7); }
.tr-stars i.off { color: #5a4a3c; text-shadow: none; }
.tr-stars b { margin-left: 0.4rem; }
.tr-stars small { color: var(--dim); margin-left: 0.3rem; font-size: 0.9rem; }
@keyframes starsin { from { opacity: 0; transform: translateX(-50%) scale(1.6); } }
#trial .mono-box { min-height: 6.6rem; }
.act { flex: none; min-height: 4rem; font-size: 1.25rem; touch-action: none; }
.act.hold { background: linear-gradient(#e0b45a, #a07228); border-color: #ffe08a; color: #2a1e16; }
.act.holding { transform: scale(.97); filter: brightness(1.25); box-shadow: 0 0 24px rgba(255, 210, 120, .8); }
.act:disabled { opacity: .45; }

/* 動作の絵（SVG） */
#trSvg .meter-band { fill: rgba(224, 180, 90, .55); }
#trSvg .meter-core { fill: #ffe08a; }
#trSvg text { font-family: var(--serif); fill: #f1e7d6; font-weight: 700; }
.sv-cap.fly { animation: capfly 1s cubic-bezier(.2, .8, .4, 1) forwards; transform-box: fill-box; transform-origin: center; }
@keyframes capfly { to { transform: translate(60px, -160px) rotate(540deg); opacity: 0; } }
.sv-cap.pop { animation: cappop .5s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes cappop { 40% { transform: translateY(-14px) rotate(30deg); } 100% { transform: translateY(-4px) rotate(40deg); } }
.sv-cap.slip { animation: capslip .45s linear; transform-box: fill-box; transform-origin: center; }
@keyframes capslip { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-3px); } }
.sv-bottle.squash { animation: squash .5s ease; transform-box: fill-box; transform-origin: bottom center; }
@keyframes squash { 30% { transform: scale(1.06, .94); } 60% { transform: scale(.98, 1.03); } }
.spray circle { animation: spray 1.1s ease-out forwards; }
@keyframes spray { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
.puff { animation: puff .9s ease-out forwards; }
@keyframes puff { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px) scale(1.4); } }
.puff, .spray circle { transform-box: fill-box; transform-origin: center; }
.sv-noodle.hang { animation: hang 1.2s ease-in-out; transform-box: fill-box; transform-origin: top center; }
@keyframes hang { 20% { transform: skewX(6deg); } 45% { transform: skewX(-5deg); } 70% { transform: skewX(3deg); } }
.drip { animation: dripdown 1.2s ease-in forwards; }
@keyframes dripdown { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(60px); } }

/* 結果 */
#result .r-rank { font-family: var(--serif); font-size: 2.2rem; margin: 0.4rem 0 0; }
.r-rows { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.4rem; }
.r-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.8rem; text-align: left; opacity: 0; animation: rcin .5s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.r-row .n { font-family: var(--serif); font-size: 1.15rem; }
.r-row .n small { display: block; color: var(--dim); font-size: 0.8rem; }
.r-row .s { color: #ffd36b; font-size: 1.1rem; letter-spacing: 0.06em; }
.r-row .s i { font-style: normal; color: #5a4a3c; }
.r-row .v { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.r-row.g4 { border-color: #ffd36b; box-shadow: 0 0 16px rgba(255, 200, 90, .45); background: linear-gradient(90deg, rgba(142, 34, 25, .6), rgba(0, 0, 0, .3)); }
.r-best { color: var(--gold); font-size: 0.95rem; margin-top: 0.3rem; }

/* 失敗の大げさ：あふれる・吹き出す・むせる */
#fx.boom #fxTint { background: radial-gradient(circle, transparent 25%, rgba(200, 60, 40, .5)); animation: fade1 1.3s ease forwards; }
#fx.boom #fxFlash { background: #ffdddd; animation: flash3 .3s ease-out forwards; }

@media (max-height: 700px) {
  .tr-name { font-size: 1.35rem; }
  .act { min-height: 3.4rem; }
  #trial .mono-box { min-height: 5.6rem; }
}
.tr-how { max-width: 62%; } html.fz1 .tr-how { font-size: 0.88rem; } html.fz2 .tr-how { font-size: 0.8rem; }
.r-scroll { scrollbar-width: none; } .r-scroll::-webkit-scrollbar { display: none; }

/* ================= 物語（映画のように見せる） ================= */
#movie { padding: 0; gap: 0; background: #000; }
#movie.on { animation: none; }
.mv-bar { flex: none; background: #000; position: relative; z-index: 3; }
.mv-top { height: max(44px, calc(env(safe-area-inset-top) + 30px)); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
#mvAct { font-family: var(--serif); font-size: 0.8rem; letter-spacing: 0.4em; color: rgba(224, 180, 90, .75); }
.mv-bottom { cursor: pointer; height: calc(10.5rem + env(safe-area-inset-bottom)); padding: 0.9rem 1.2rem calc(0.8rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
#movie.intro .mv-top, #movie.intro .mv-bottom { animation: barin 1.2s cubic-bezier(.6, 0, .2, 1); }
@keyframes barin { from { flex-basis: 50%; height: 50%; } }
.mv-shot { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #000; cursor: pointer; }
.mv-bgs, .mv-bgs img { position: absolute; inset: 0; }
.mv-bgs img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.mv-bgs img.on { opacity: 1; animation: kb var(--kbt, 14s) linear forwards; }
@keyframes kb { from { transform: scale(var(--s0, 1.04)) translate(var(--x0, 0), var(--y0, 0)); } to { transform: scale(var(--s1, 1.14)) translate(var(--x1, 0), var(--y1, 0)); } }
.mv-chr { position: absolute; bottom: 0; height: 88%; max-height: 520px; width: auto; max-width: 92%; opacity: 0; pointer-events: none; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .75)); transition: opacity .35s; }
.mv-chr.l { left: -6%; } .mv-chr.r { right: -6%; } .mv-chr.c { left: 50%; transform: translateX(-50%); }
.mv-chr.on { opacity: 1; }
.mv-chr.in.l { animation: chrL .55s cubic-bezier(.2, .8, .3, 1); } .mv-chr.in.r { animation: chrR .55s cubic-bezier(.2, .8, .3, 1); }
@keyframes chrL { from { opacity: 0; transform: translateX(-24px) scale(1.04); } }
@keyframes chrR { from { opacity: 0; transform: translateX(24px) scale(1.04); } }
.mv-shot::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(0, 0, 0, .75); z-index: 2; }
.mv-grain { position: absolute; inset: -50%; pointer-events: none; z-index: 2; opacity: .09; background-image: radial-gradient(rgba(255, 255, 255, .9) 0.6px, transparent 0.8px); background-size: 3px 3px; animation: grain .5s steps(4) infinite; }
@keyframes grain { 25% { transform: translate(-1%, 1%); } 50% { transform: translate(1%, -1%); } 75% { transform: translate(-1%, -1%); } }
.mv-time { position: absolute; left: 1rem; top: 0.9rem; z-index: 3; font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.18em; color: #fff; text-shadow: 0 1px 8px #000, 0 0 2px #000; opacity: 0; }
.mv-time.on { animation: timein 4.5s ease forwards; }
@keyframes timein { 0% { opacity: 0; transform: translateY(4px); } 15%, 80% { opacity: 1; transform: none; } 100% { opacity: .0; } }
.mv-letter { position: absolute; left: 50%; top: 50%; z-index: 3; width: min(84%, 340px); transform: translate(-50%, -50%) rotate(-1.5deg); background: linear-gradient(#f6eedc, #e9dcc0); color: #3a2a1a; border-radius: 3px; padding: 1.1rem 1.2rem; font-family: var(--serif); font-size: 0.98rem; line-height: 1.75; white-space: pre-line; box-shadow: 0 16px 40px rgba(0, 0, 0, .7); display: none; }
.mv-letter.on { display: block; animation: letterin .9s cubic-bezier(.2, .8, .3, 1); }
@keyframes letterin { from { opacity: 0; transform: translate(-50%, -42%) rotate(-5deg) scale(.95); } }
.mv-card { position: absolute; inset: 0; z-index: 4; background: #000; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.5rem; font-family: var(--serif); padding: 1.5rem; }
.mv-card.on { display: flex; }
.mv-card .c-no { color: var(--gold); letter-spacing: 0.5em; font-size: 1rem; opacity: 0; animation: cfade 1s ease .2s forwards; }
.mv-card .c-title { font-size: 2.8rem; letter-spacing: 0.4em; margin-left: 0.4em; color: #fff6dc; opacity: 0; animation: cfade 1.4s ease .6s forwards; }
.mv-card .c-time { color: #bfb2a0; font-size: 0.95rem; letter-spacing: 0.2em; opacity: 0; animation: cfade 1s ease 1.3s forwards; }
.mv-card .c-black { font-size: 1.25rem; line-height: 2.1; white-space: pre-line; color: #efe4d0; opacity: 0; animation: cfade 1.6s ease .2s forwards; }
.mv-card .c-movie { font-size: 3.3rem; letter-spacing: 0.25em; margin-left: 0.25em; color: #fff6dc; text-shadow: 4px 4px 0 #8e2219, 0 0 30px rgba(255, 200, 90, .5); opacity: 0; animation: ctitle 2.4s ease .3s forwards; }
.mv-card .c-movie-sub { color: var(--gold); letter-spacing: 0.3em; font-size: 1.05rem; opacity: 0; animation: cfade 1.2s ease 1.6s forwards; }
@keyframes cfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ctitle { 0% { opacity: 0; transform: scale(1.25); filter: blur(6px); } 60% { opacity: 1; filter: none; } 100% { opacity: 1; transform: none; } }
.mv-credits { position: absolute; inset: 0; z-index: 5; background: #000; overflow: hidden; display: none; }
.mv-credits.on { display: block; }
.mv-roll { position: absolute; left: 0; right: 0; top: 100%; text-align: center; font-family: var(--serif); color: #e9dfcc; animation: roll var(--rt, 22s) linear forwards; padding: 0 1rem; }
@keyframes roll { to { transform: translateY(calc(-100% - var(--rh, 600px))); } }
.mv-roll h3 { font-size: 2.3rem; letter-spacing: 0.25em; margin: 0 0 0.2rem; color: #fff6dc; }
.mv-roll .sub { color: var(--gold); letter-spacing: 0.5em; margin-bottom: 3rem; }
.mv-roll h4 { color: var(--gold); font-size: 0.9rem; letter-spacing: 0.5em; margin: 2.6rem 0 1rem; font-weight: 400; }
.mv-roll .row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.8rem; margin: 0.55rem 0; font-size: 1.05rem; }
.mv-roll .row span:first-child { text-align: right; color: #a99c88; }
.mv-roll .row span:last-child { text-align: left; }
.mv-roll .row i { font-style: normal; color: #5a4a3c; }
.mv-roll .rec { font-size: 1.05rem; margin: 0.5rem 0; }
.mv-roll .rec b { color: #ffd36b; }
.mv-roll .end { margin-top: 4rem; font-size: 1.6rem; letter-spacing: 0.6em; }
.mv-sub { width: 100%; text-align: center; font-family: var(--serif); opacity: 0; }
.mv-sub.on { opacity: 1; transition: opacity .25s; }
.mv-sub b { display: block; color: var(--gold); font-size: 0.85rem; letter-spacing: 0.3em; font-weight: 400; min-height: 1.1em; margin-bottom: 0.25rem; }
.mv-sub p { margin: 0; font-size: 1.16rem; line-height: 1.75; color: #fff; }
.mv-sub.narr p { color: #d9cdb8; font-size: 1.06rem; }
.mv-sub .ch2 { opacity: 0; } .mv-sub .ch2.v { opacity: 1; }
.mv-next { position: absolute; right: 1rem; bottom: calc(0.6rem + env(safe-area-inset-bottom)); color: var(--gold); font-size: 0.85rem; opacity: 0; }
.mv-next.on { opacity: 1; animation: nextb 1s ease-in-out infinite; }
@keyframes nextb { 50% { transform: translateY(4px); } }
.mv-skip { position: absolute; right: 0.6rem; top: max(8px, env(safe-area-inset-top)); z-index: 6; font: inherit; font-size: 0.8rem; color: #bfb2a0; background: rgba(0, 0, 0, .5); border: 1px solid #3a3028; border-radius: 999px; padding: 0.3rem 0.75rem; }
#movie.fadeout .mv-shot, #movie.fadeout .mv-sub { transition: opacity .6s; opacity: 0; }
html.fz1 .mv-sub, html.fz1 .mv-letter, html.fz1 .mv-card .c-black { zoom: 1.12; }
html.fz2 .mv-sub, html.fz2 .mv-letter, html.fz2 .mv-card .c-black { zoom: 1.24; }
html.fz1 .mv-bottom { height: calc(11.8rem + env(safe-area-inset-bottom)); }
html.fz2 .mv-bottom { height: calc(13rem + env(safe-area-inset-bottom)); }
@media (max-height: 700px) { .mv-bottom { height: calc(9.6rem + env(safe-area-inset-bottom)); } html.fz2 .mv-bottom { height: calc(11.6rem + env(safe-area-inset-bottom)); } }
/* 物語の中の勝負：上下を黒い帯にして、映画の続きに見せる */
#trial.story { background: #000; }
/* 第二話 */
.btn .new { font-style: normal; font-size: 0.72rem; background: #ffd36b; color: #2a1e16; border-radius: 999px; padding: 0.05rem 0.45rem; margin-left: 0.4rem; vertical-align: 0.15em; }
#trSvg .arc-bg { fill: rgba(10, 8, 6, .55); stroke: rgba(224, 180, 90, .6); stroke-width: 1.5; }
#trSvg.jolt { animation: jolt .5s ease; }
@keyframes jolt { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } }
.t-btns .btn.big { padding: 0.7rem 1rem; }
#trSvg text { paint-order: stroke; stroke: rgba(20, 14, 10, .85); stroke-width: 3.5px; stroke-linejoin: round; }
