/* 案５「言葉はめ」作り直し版（2026-11-18）。a6.js と組。
   色の決まり：FLICK＝オレンジ／HOLD＝ピンク／RUSH＝緑／SYNC＝紫。札の地＝主な押し方、外枠＝足した動き（フリック→オレンジ、SYNC→紫） */
:root { --a6-flick:#ff8a1a; --a6-hold:#ff2f63; --a6-rush:#13a86c; --a6-sync:#7a4dff; --a6-ink:#15151c; --a6-cream:#fff1d6; }

/* 画面：成績バーとふりがなは出さない。下に帯 */
.a6 #mbar { display:none; }
.a6 #play rt { display:none; }
#a5strip { position:relative; z-index:6; height:118px; margin:0 12px calc(var(--sb, 0px) + 12px); border-radius:16px; touch-action:none; overflow:hidden;
  background:linear-gradient(rgba(40,6,8,.55), rgba(16,2,4,.72)); box-shadow:inset 0 0 0 1px rgba(255,241,214,.3), inset 0 1px 0 rgba(255,255,255,.14); }
#a5strip .a5hint { position:absolute; left:0; right:0; bottom:12px; text-align:center; font:400 10px/1 "Jost","Hiragino Sans",sans-serif; letter-spacing:.42em; color:rgba(255,241,214,.42); pointer-events:none; }
#a5strip .a5tap { position:absolute; top:0; bottom:0; width:110px; margin-left:-55px; background:radial-gradient(ellipse at 50% 100%, rgba(255,241,214,.6), transparent 70%); pointer-events:none; }
#a5fest { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
#a6snd { position:fixed; z-index:1000; right:12px; top:calc(env(safe-area-inset-top) + 10px); font:700 12px/1 "Hiragino Sans",sans-serif; color:#ffe38f; text-decoration:none; padding:9px 12px; border-radius:99px; background:rgba(0,0,0,.55); box-shadow:inset 0 0 0 1px rgba(255,241,214,.3); }
.a6 #count:not(.wide) { position:fixed; top:calc(46% - 17vw); }

/* CHAIN（5段の色は chain.js）。少し大きく */
.a6 #chain { height:130px; top:70px; }
.a6 #chain canvas { height:130px; }
.a6 #chain .cb { top:41px; }
.a6 #chain .cn { font-size:42px; }
.a6 #chain .cl { font-size:10px; margin-top:3px; }

/* 判定の字：PERFECT 黄・GREAT 青・GOOD 白・MISS 灰 */
.a6 .jlbl.great { color:#5b86ff !important; }
.a6 .jlbl.good { color:#fff !important; }

/* 行 */
.a6 .fline { position:relative; }
.a6 .fline.a6fin { opacity:0 !important; transition:opacity .25s; }
.a6 .lyrics .zone.a6clr { opacity:1 !important; }

/* 言葉の場所（特殊ノート）：中身は出さず、札の大きさの場所だけ取る */
.a6 .fline .w.a6a { padding:0 !important; box-sizing:content-box; background:none !important; box-shadow:none !important; }
.a6 .fline .w.a6a > * { visibility:hidden !important; position:absolute !important; }
.a6 .fline .w.a6a::before, .a6 .fline .w.a6a::after { display:none !important; }

/* ───── 札（特殊ノートは全部この型）───── */
.a6c { position:absolute; z-index:2; box-sizing:border-box; padding:19px 12px 5px; border-radius:12px; text-align:center; white-space:nowrap; line-height:1.02;
  color:#fff; background:var(--c); box-shadow:0 0 0 2px var(--a6-ink), 0 0 0 5px var(--f1, var(--a6-cream)), 0 0 0 8px var(--f2, transparent);
  transition:opacity .14s, scale .14s; pointer-events:none; }
.a6c.wait { opacity:0; scale:.8; }
.a6c.k-flick { --c:var(--a6-flick); } .a6c.k-hold { --c:var(--a6-hold); } .a6c.k-rush { --c:var(--a6-rush); } .a6c.k-sync { --c:var(--a6-sync); }
.a6c.o-flick { --f1:var(--a6-flick); }
.a6c.o-sync { --f1:var(--a6-sync); } .a6c.o-flick.o-sync { --f1:var(--a6-flick); --f2:var(--a6-sync); }
.a6c .tx { position:relative; z-index:1; display:block; }
.a6c .lb { position:absolute; left:0; right:0; top:5px; height:10px; display:flex; align-items:center; justify-content:center; gap:4px; z-index:2;
  font:900 10px/1 var(--en-bold, "Montserrat Black", sans-serif); letter-spacing:.16em; color:#fff; white-space:nowrap; }
.a6c .gg { position:absolute; left:4px; right:4px; top:calc(100% + 9px); height:5px; border-radius:3px; background:color-mix(in srgb, var(--c) 55%, #fff); box-shadow:0 0 0 1.5px var(--a6-ink); transform-origin:center; opacity:0; }
.a6c.hold .gg { opacity:1; }
/* RUSH：叩いた分だけ下から埋まる（札の左右の端まで）。字は白＋濃い縁で、どちらの色の上でも読める */
.a6c.k-rush { background:linear-gradient(to top, #dff7ea var(--fill, 0%), var(--c) var(--fill, 0%)); }
.a6c.k-rush .tx { -webkit-text-stroke:3px #0b6b44; paint-order:stroke fill; }
/* 決まった：札ぜんぶが うすい色＋濃い字。名前の所に判定 */
.a6c.ok { background:color-mix(in srgb, var(--c) 16%, #fff); color:color-mix(in srgb, var(--c) 72%, #000); box-shadow:0 0 0 2px var(--a6-ink), 0 0 0 5px var(--a6-cream), 0 0 16px rgba(255,241,214,.55); }
.a6c.ok .tx { -webkit-text-stroke:0; }
.a6c.ok .cl, .a6c.ok .gg { opacity:0; }
.a6c .lb .jd { font:400 14px/1 var(--en, "Anton", sans-serif); letter-spacing:.06em; text-shadow:0 1px 2px rgba(21,21,28,.55); }
.a6c .lb .jd.perfect { color:var(--judge-perfect, #ffc400); } .a6c .lb .jd.great { color:#5b86ff; } .a6c .lb .jd.good { color:#fff; }
/* 外した：うすい枠だけ */
.a6c.miss { background:none; box-shadow:0 0 0 2px rgba(255,241,214,.3); color:rgba(255,241,214,.35); }
.a6c.miss .lb, .a6c.miss .cl, .a6c.miss .gg { opacity:0; }
.a6c.miss .tx { -webkit-text-stroke:0; }
.a6 .fline.leaving > .a6c, .a6 .fline.leaving > .a6link, .a6 .fline.leaving > .a6dest { opacity:0; transition:opacity .15s; }

/* 山形の矢印（1つの部品：名前の横 sm／行き先・飛ぶ矢印 md／フリックの字の後ろ big）。下向きが元、--rot で回す */
.a6chev { position:relative; display:inline-block; flex:none; width:var(--w); height:var(--h); rotate:var(--rot); }
.a6chev i { all:unset; position:absolute; left:0; width:100%; height:calc(var(--h) * .46); background:var(--ac, #ffb056); clip-path:polygon(0 0, 50% 60%, 100% 0, 100% 35%, 50% 100%, 0 35%); animation:a6flow var(--dur, 1s) linear infinite; }
.a6chev i:nth-child(2) { animation-delay:calc(var(--dur, 1s) * -.333); } .a6chev i:nth-child(3) { animation-delay:calc(var(--dur, 1s) * -.667); }
@keyframes a6flow { 0% { top:-10%; opacity:0; } 25% { opacity:1; } 75% { opacity:1; } 100% { top:64%; opacity:0; } }
.a6chev.cs { --w:9px; --h:16px; --ac:#ffd9a8; margin:-3px 0; }
.a6c.k-hold .a6chev.cs, .a6c.k-rush .a6chev.cs, .a6c.k-sync .a6chev.cs { --ac:#ffb056; }
.a6chev.cm { --w:22px; --h:32px; --ac:#ffb056; }
.a6chev.cl { position:absolute; left:50%; top:calc(50% + 7px); --w:38px; --h:52px; margin:-26px 0 0 -19px; --ac:rgba(255,255,255,.34); z-index:0; }
.a6c.go .a6chev { --dur:.35s; }
.a6c.go .a6chev.cs { --ac:#fff3c4; }

/* SYNC：2つの札を実線でつなぐ（札の下） */
.a6link { position:absolute; z-index:1; height:5px; margin-top:-2.5px; transform-origin:0 50%; background:var(--a6-cream); box-shadow:0 0 0 1.5px var(--a6-ink); border-radius:3px; pointer-events:none; transition:opacity .15s; }
.a6link.wait, .a6link.off { opacity:0; }
/* HOLD SLIDE：行き先の枠（点線）とレール。札は指についてレールの上を動く */
.a6dest { position:absolute; z-index:1; pointer-events:none; transition:opacity .15s; }
.a6dest.wait { opacity:0; }
.a6dest .rail { position:absolute; left:calc(var(--cw) / 2); right:calc(var(--cw) / 2); top:50%; height:6px; margin-top:-3px; border-radius:3px; background:linear-gradient(90deg, var(--a6-hold), #ff9bb6); box-shadow:0 0 0 1.5px var(--a6-ink); }
.a6dest.neg .rail { background:linear-gradient(270deg, var(--a6-hold), #ff9bb6); }
.a6dest .end { position:absolute; right:0; top:0; width:var(--cw); height:100%; box-sizing:border-box; border:2px dashed var(--a6-cream); border-radius:12px; background:rgba(255,47,99,.16); display:flex; align-items:center; justify-content:center; }
.a6dest.neg .end { right:auto; left:0; }

/* 合図（シャッター）：四隅のカギ。ちょうどで黄色 */
.a6shut { position:absolute; pointer-events:none; z-index:4; }
.a6shut i { position:absolute; width:16px; height:16px; border:0 solid var(--fg, #fff1d6); }
.a6shut i:nth-child(1) { left:0; top:0; border-width:4px 0 0 4px; } .a6shut i:nth-child(2) { right:0; top:0; border-width:4px 4px 0 0; }
.a6shut i:nth-child(3) { left:0; bottom:0; border-width:0 0 4px 4px; } .a6shut i:nth-child(4) { right:0; bottom:0; border-width:0 4px 4px 0; }
.a6shut.just i { border-color:#ffc400; filter:drop-shadow(0 0 4px rgba(255,196,0,.95)); }

/* 演出の部品 */
.a6col { position:absolute; transform-origin:bottom; border-radius:8px; pointer-events:none; background:linear-gradient(rgba(255,255,255,1), rgba(255,236,170,.85) 30%, rgba(255,214,90,.35) 75%, rgba(255,196,0,.05)); box-shadow:0 0 30px rgba(255,214,90,.95); }
.a6plate { position:absolute; border-radius:6px; background:#fff1d6; box-shadow:0 0 12px rgba(255,255,255,.9); pointer-events:none; }
.a6edge { position:absolute; border-radius:6px; box-shadow:0 0 0 3px #fff, 0 0 10px 2px rgba(255,255,255,.9); background:rgba(255,255,255,.35); pointer-events:none; }
.a6spk { position:absolute; width:14px; height:2px; margin-top:-1px; background:#ffe38f; box-shadow:0 0 6px #ffc400; transform-origin:left center; border-radius:2px; pointer-events:none; }
.a6fly { position:absolute; width:32px; height:32px; display:flex; align-items:center; justify-content:center; pointer-events:none; z-index:6; }
.a6fly .a6chev { --ac:#ffe38f; filter:drop-shadow(0 0 4px #ff8a1a); }
.a6sweep { position:absolute; background:linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.95) 55%, rgba(255,255,255,0)); filter:blur(1px); pointer-events:none; }
.a6band { position:absolute; transform-origin:center; pointer-events:none; background:linear-gradient(rgba(255,196,0,0), rgba(255,214,90,.42) 30%, rgba(255,240,190,.55) 50%, rgba(255,214,90,.42) 70%, rgba(255,196,0,0)); }
.a6rail { position:absolute; height:2px; margin-top:-1px; pointer-events:none; background:linear-gradient(90deg, rgba(255,214,90,0), #ffe38f 12%, #fff 50%, #ffe38f 88%, rgba(255,214,90,0)); box-shadow:0 0 10px rgba(255,196,0,.95); }
.a6blk { position:absolute; background:#ffd54a; box-shadow:inset 0 0 0 1px rgba(255,255,255,.75), 0 0 8px rgba(255,196,0,.9); border-radius:1px; pointer-events:none; }
.a6lbl { position:absolute; text-align:center; font:500 13px/1 "Jost","Hiragino Sans",sans-serif; color:#fff3c4; text-shadow:0 0 10px rgba(255,196,0,.95), 0 1px 0 rgba(0,0,0,.35); padding-left:.6em; pointer-events:none; }
/* 帯の目印：これから叩く言葉の真下が光る（ちょうどで黄色） */
#a5strip .a6aim { position:absolute; top:0; bottom:0; pointer-events:none; border-radius:10px; background:linear-gradient(rgba(255,241,214,.06), rgba(255,241,214,.34)); box-shadow:inset 0 0 0 2px rgba(255,241,214,.75); }
#a5strip .a6aim.just { background:linear-gradient(rgba(255,196,0,.12), rgba(255,196,0,.5)); box-shadow:inset 0 0 0 2px #ffc400, 0 0 12px rgba(255,196,0,.7); }
