/* ステラログ：明るい船の色（生成り・青緑・ミント・珊瑚・ひまわり）。黒い影を使わない（世界と設定.md §8） */
:root { --cream: #fff8ec; --ink: #3d3a5c; --teal: #2f8f86; --mint: #9fd8c4; --coral: #ee7d6a; --sun: #f2c21b; --brass: #c8973f; --navy: #2b2f6b; --pad: max(10px, env(safe-area-inset-left)); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2b2f6b; color: var(--ink); font-family: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.scr { position: fixed; inset: 0; display: none; }
.scr.on { display: block; }
button { font: inherit; cursor: pointer; }
.pill { border: 3px solid var(--brass); background: linear-gradient(#3fb3a6, #24877e); color: #fff; border-radius: 999px; padding: .55em 1.3em; font-weight: 700; font-size: clamp(14px, 2.2vmin, 18px); box-shadow: 0 3px 0 #a87a2c, inset 0 2px 0 rgba(255,255,255,.35); text-shadow: 0 1px 0 rgba(30,60,60,.4); white-space: nowrap; }
.pill:active { transform: translateY(2px); box-shadow: 0 1px 0 #a87a2c; }
.pill.main { background: linear-gradient(#f6a35a, #e2743e); }
.pill:disabled { filter: grayscale(.7) opacity(.6); }
input { font: inherit; border: 2px solid #d9c49a; border-radius: 10px; padding: .45em .7em; background: #fffdf7; color: var(--ink); min-width: 0; user-select: text; -webkit-user-select: text; }
.row { display: flex; gap: 8px; align-items: center; }
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; background: var(--cream); border: 4px solid var(--teal); border-radius: 22px; padding: 18px 20px; box-shadow: 0 0 0 3px var(--brass), 0 10px 40px rgba(60,40,120,.35); }
.panel h2 { margin: 0 0 10px; font-size: clamp(18px, 3vmin, 24px); }
.note { font-size: 13px; opacity: .8; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }

/* タイトル */
#title .tbg { position: absolute; inset: 0; background: url(art/bg/key_title.webp) center/cover; }
.tcard { position: absolute; right: max(3vw, 12px); top: 50%; transform: translateY(-50%); width: min(430px, calc(100% - 24px)); max-height: calc(100% - 20px); overflow: auto; background: rgba(255,248,236,.94); border: 4px solid var(--teal); border-radius: 22px; padding: 14px 18px; box-shadow: 0 0 0 3px var(--brass); text-align: center; }
.tcard .logo { width: 78px; height: 78px; margin: -4px auto 0; display: block; }
.tcard h1 { margin: 2px 0 2px; font-size: clamp(26px, 5vmin, 38px); letter-spacing: .08em; color: var(--navy); }
.tcard h1 small { display: block; font-size: .4em; letter-spacing: .3em; color: var(--teal); }
.lead { font-size: 13px; line-height: 1.6; margin: 6px 0 8px; }
.f { display: block; text-align: left; font-size: 13px; font-weight: 700; margin: 6px 0; }
.f input { width: 100%; margin-top: 3px; }
.pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 4px; }
.pick button { aspect-ratio: 1; border: 2px solid #e2d3b3; border-radius: 12px; background: #fff center/90% no-repeat; padding: 0; }
.pick button.on { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral); }
.pick.col button { border-radius: 50%; }
@media (max-aspect-ratio: 1/1) { .tcard { right: 50%; transform: translate(50%, -50%); } }

/* 待合 */
#lobby { background: url(art/room/starhall.webp) center/contain no-repeat, radial-gradient(#4b5aa0, #2b2f6b); }
#lbList { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
#lbList li { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 4px 8px; border: 2px solid #eadcbc; font-weight: 700; }
#lbList canvas { width: 40px; height: 40px; }

/* 役の発表 */
#reveal .rvbg { position: absolute; inset: 0; background: center/cover; animation: zoomIn 6s ease-out; }
#reveal.thief .rvbg { background-image: url(art/bg/reveal_thief.webp); }
#reveal.crew .rvbg, #reveal.neutral .rvbg { background-image: url(art/bg/reveal_crew.webp); }
.rvcard { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4vmin; padding: 16px; animation: rise .8s cubic-bezier(.2,.9,.3,1.2); }
.card { position: relative; height: min(70vh, 120vw); aspect-ratio: 676/900; filter: drop-shadow(0 8px 20px rgba(40,30,90,.4)); }
.card img { position: absolute; }
#rvArt { left: 8%; top: 6%; width: 84%; height: 74%; object-fit: cover; border-radius: 10px; }
.card .frame { inset: 0; width: 100%; height: 100%; }
#rvName { position: absolute; left: 0; right: 0; bottom: 6.5%; text-align: center; font-weight: 900; font-size: clamp(16px, 3.4vmin, 28px); color: var(--navy); }
.rvtext { max-width: 420px; background: rgba(255,248,236,.92); border-radius: 18px; padding: 14px 18px; border: 3px solid var(--brass); }
#rvTeam { font-weight: 900; font-size: clamp(18px, 3.6vmin, 30px); }
#rvLine { font-size: clamp(14px, 2.4vmin, 18px); font-style: italic; color: var(--teal); }
#rvHow { font-size: 14px; line-height: 1.6; }
@media (max-aspect-ratio: 1/1) { .rvcard { flex-direction: column; } .card { height: 46vh; } }
@keyframes zoomIn { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes rise { from { transform: translateY(40px) scale(.9); opacity: 0; } }

/* 航行 */
#hud { pointer-events: none; }
#hud > * { pointer-events: auto; }
#topL { position: absolute; left: var(--pad); top: max(8px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
#bMap { width: clamp(64px, 15vmin, 96px); height: auto; aspect-ratio: 120/116; border-radius: 14px; border: 3px solid var(--brass); background: #2b2f6b; padding: 0; overflow: hidden; }
#bMap canvas { width: 100%; height: 100%; display: block; }
#topC { position: absolute; left: calc(var(--pad) + clamp(64px, 15vmin, 96px) + 10px); top: max(8px, env(safe-area-inset-top)); width: min(300px, calc(100vw - clamp(64px, 15vmin, 96px) - 36px)); }
.prog { position: relative; height: 24px; border-radius: 12px; background: rgba(255,248,236,.88); border: 2px solid var(--brass); overflow: hidden; cursor: pointer; }
.prog i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #8cc43f, #2f9e62); width: 0; transition: width .6s; }
.prog span { position: relative; font-size: 12px; font-weight: 700; padding-left: 8px; line-height: 20px; }
.prog b { position: absolute; right: 8px; top: 0; font-size: 12px; line-height: 20px; }
#taskList { list-style: none; margin: 5px 0 0; padding: 5px 8px; background: rgba(255,248,236,.84); border-radius: 10px; font-size: 12.5px; line-height: 1.5; max-height: 30vh; overflow: auto; }
#taskList.fold { display: none; }
#taskList li.done { text-decoration: line-through; opacity: .5; }
#taskList li.here { color: var(--coral); font-weight: 700; }
.ib { width: 44px; height: 44px; border-radius: 50%; border: none; background: center/contain no-repeat; filter: drop-shadow(0 2px 3px rgba(40,30,90,.35)); }
#status { margin-top: 5px; display: inline-block; background: rgba(255,248,236,.9); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 12.5px; border: 2px solid var(--brass); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#status:empty { display: none; }
/* 片手のスティック：左半分のどこを押してもそこに出る（はなすと元の場所に薄く戻る） */
#stick { position: absolute; left: max(22px, env(safe-area-inset-left)); bottom: max(22px, env(safe-area-inset-bottom)); width: 124px; height: 124px; margin: 0; border-radius: 50%; background: rgba(255,248,236,.16); border: 3px solid rgba(200,151,63,.55); pointer-events: none !important; opacity: .55; transition: opacity .15s; }
#stick.on { opacity: 1; background: rgba(255,248,236,.24); transition: none; }
#stick i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff8ec, #e9d3a6); border: 3px solid var(--brass); box-shadow: 0 2px 6px rgba(40,30,90,.35); }
body.keys #stick { display: none; }
/* 右下：使う（いちばん大きい）・その上に知らせる・左に転送／調べる */
#acts { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: 1px; height: 1px; }
.act { position: absolute; border: none; border-radius: 50%; padding: 0; background: url(art/ui/btn_round.webp) center/contain no-repeat; filter: drop-shadow(0 3px 4px rgba(40,30,90,.35)); --s: clamp(70px, 12vmin, 86px); width: var(--s); height: var(--s); }
.act.s-main { --s: clamp(92px, 17vmin, 118px); right: 0; bottom: 0; }
.act.s-up { right: calc(clamp(92px, 17vmin, 118px) * .12); bottom: calc(clamp(92px, 17vmin, 118px) + 14px); }
.act.s-left { right: calc(clamp(92px, 17vmin, 118px) + 12px); bottom: 0; }
.act.s-ul { --s: clamp(62px, 10.5vmin, 76px); right: calc(clamp(92px, 17vmin, 118px) + 10px); bottom: calc(clamp(92px, 17vmin, 118px) + 4px); }
.act img { position: absolute; inset: 17%; width: 66%; height: 66%; pointer-events: none; }
.act b { position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 11.5px; padding: 1px 8px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.act:disabled { filter: grayscale(.9) opacity(.5); }
.act.hot { animation: hot 1s ease-in-out infinite; }
.act.hot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 4px solid rgba(255,214,90,.95); box-shadow: 0 0 14px rgba(255,214,90,.9); pointer-events: none; }
.act.red.hot::after { border-color: rgba(238,96,80,.95); box-shadow: 0 0 14px rgba(238,96,80,.9); }
.act:active:not(:disabled) { transform: scale(.93); }
@keyframes hot { 50% { transform: scale(1.05); } }
.act .cd { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 24px; color: var(--navy); background: rgba(255,248,236,.55); border-radius: 50%; }
.pop { position: absolute; display: none; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(255,248,236,.96); border: 4px solid var(--teal); border-radius: 18px; padding: 10px; box-shadow: 0 0 0 3px var(--brass); }
.pop.on { display: block; }
#mapCv, #mMapCv { display: block; width: min(76vmin, 560px); height: auto; aspect-ratio: 72/70; }
#trailBox { font-size: 12.5px; max-height: 18vh; overflow: auto; }

/* 当番 */
#task { background: rgba(43,47,107,.55); }
.tkwrap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vmin, 640px); aspect-ratio: 1; border-radius: 22px; overflow: hidden; border: 5px solid var(--brass); box-shadow: 0 0 0 4px var(--teal), 0 10px 40px rgba(20,10,60,.5); animation: rise .35s; }
#tkBg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#tkCv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
#tkHint { position: absolute; left: 0; right: 0; top: 0; padding: 8px 60px 8px 12px; background: rgba(255,248,236,.9); font-weight: 700; font-size: clamp(13px, 2.4vmin, 17px); }
.x { position: absolute; right: 8px; top: 6px; border: 2px solid var(--brass); background: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 700; }

/* カットイン */
#cutin { background: rgba(43,47,107,.4); }
#ciBg { position: absolute; left: 0; top: 50%; width: 100%; height: min(56vw, 70vh); transform: translateY(-50%); object-fit: cover; animation: slideIn .45s cubic-bezier(.2,.9,.3,1.1); }
.ciFace { position: absolute; left: 4vw; top: 50%; transform: translateY(-50%); width: min(30vw, 40vh); aspect-ratio: 1; border-radius: 50%; background: rgba(255,248,236,.85); border: 5px solid var(--brass); overflow: hidden; animation: pop .5s .15s both cubic-bezier(.2,.9,.3,1.4); }
.ciFace canvas { width: 100%; height: 100%; }
#ciText { position: absolute; right: 5vw; top: 50%; transform: translateY(-50%); font-size: clamp(22px, 6vmin, 54px); font-weight: 900; color: #fff; text-shadow: 0 3px 0 var(--navy), 0 0 18px rgba(43,47,107,.8); text-align: right; animation: slideIn .5s .1s both; }
@keyframes slideIn { from { transform: translate(-30%, -50%); opacity: 0; } }
@keyframes pop { from { transform: translateY(-50%) scale(.3); opacity: 0; } }

/* 会議 */
#meeting { display: none; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) minmax(0, .8fr) auto; grid-template-areas: "h h" "f b" "f l" "c c"; gap: 8px; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
#meeting.on { display: grid; }
.mbg { position: fixed; inset: 0; background: url(art/bg/meeting_bg.webp) center/cover; z-index: -1; }
#mHead { grid-area: h; position: relative; display: flex; align-items: center; gap: 10px; background: rgba(255,248,236,.92); border: 3px solid var(--brass); border-radius: 999px; padding: 4px 14px; overflow: hidden; }
#mPhase { font-size: clamp(14px, 2.6vmin, 19px); } #mTime { margin-left: auto; font-weight: 900; font-variant-numeric: tabular-nums; }
#mBar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--coral); }
#mFaces { grid-area: f; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-content: start; overflow: auto; }
.fc { position: relative; border: none; background: none; padding: 0; aspect-ratio: 867/900; }
.fc canvas { position: absolute; left: 13%; top: 7%; width: 74%; height: 74%; border-radius: 50%; }
.fc .fr { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fc .nm { position: absolute; left: 18%; right: 18%; bottom: 3%; font-size: clamp(10px, 1.7vmin, 13px); font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc.sel { filter: drop-shadow(0 0 6px var(--coral)) drop-shadow(0 0 2px var(--coral)); }
.fc.turn { animation: talk 1s infinite; }
.fc.dead canvas { filter: grayscale(.4) opacity(.4); }
.fc .vt { position: absolute; right: 6%; top: 4%; background: var(--teal); color: #fff; border-radius: 8px; font-size: 11px; padding: 0 5px; }
.fc .me { position: absolute; left: 50%; transform: translateX(-50%); bottom: 22%; opacity: .92; background: var(--coral); color: #fff; border-radius: 8px; font-size: 11px; padding: 0 5px; }
.fc .votes { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-weight: 900; font-size: 22px; color: var(--coral); text-shadow: 0 0 4px #fff; }
@keyframes talk { 50% { transform: translateY(-3px); } }
#mBoard { grid-area: b; position: relative; overflow: auto; background: url(art/ui/record_board.webp) center/100% 100% no-repeat; padding: 9% 9% 7%; min-height: 0; }
#mBoard h3 { margin: 0 0 4px; font-size: 14px; text-align: center; }
#mRecs { margin: 0; padding-left: 1.6em; font-size: clamp(11.5px, 1.9vmin, 14px); line-height: 1.5; }
#mRecs li { padding: 2px 4px; border-radius: 6px; cursor: pointer; }
#mRecs li.sel { background: rgba(238,125,106,.25); }
#mRecs li .chk { font-weight: 900; margin-left: 4px; }
#mRecs .dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; vertical-align: -1px; margin: 0 2px; border: 1px solid rgba(0,0,0,.2); }
#mRecNote { font-size: 11.5px; margin: 4px 0 0; }
#mLog { grid-area: l; overflow: auto; background: rgba(255,248,236,.9); border-radius: 14px; padding: 6px 8px; font-size: clamp(12px, 1.9vmin, 14px); border: 2px solid #e2d3b3; min-height: 0; }
#mLog p { margin: 2px 0; } #mLog b { margin-right: 4px; }
#mCtl { grid-area: c; background: rgba(255,248,236,.93); border-radius: 16px; padding: 6px 8px; border: 2px solid var(--brass); }
#mSel { font-size: 12px; min-height: 1.3em; }
#mBtns { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
#mBtns button { border: 2px solid #d9c49a; background: #fff; border-radius: 999px; padding: .32em .8em; font-weight: 700; font-size: clamp(12px, 2vmin, 14px); }
#mBtns button.v { background: var(--coral); color: #fff; border-color: #c25c4c; }
#mBtns button:disabled { opacity: .4; }
#mCtl .row input { flex: 1; }
@media (max-aspect-ratio: 1/1) {
  #meeting { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) minmax(0, .7fr) auto; grid-template-areas: "h" "f" "b" "l" "c"; }
  #mFaces { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  #meeting { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "h h h" "f b l" "c c c"; gap: 6px; }
  #mFaces { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
}

/* 送り出し・決着 */
#eject .ejbg { position: absolute; inset: 0; background: url(art/bg/eject_bg.webp) center/cover; }
#ejShip { position: absolute; left: -20%; top: 42%; width: 22vmin; height: 12vmin; background: url(art/ui/ship_exterior.webp) center/contain no-repeat; animation: fly 4s ease-in forwards; }
@keyframes fly { to { left: 110%; top: 18%; transform: scale(.4); } }
#ejText { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); width: min(640px, 90vw); text-align: center; background: rgba(255,248,236,.92); border: 3px solid var(--brass); border-radius: 16px; padding: 10px 16px; font-weight: 700; font-size: clamp(15px, 3vmin, 22px); }
#over .ovbg { position: absolute; inset: 0; background: center/cover; }
#over.crew .ovbg { background-image: url(art/bg/win_crew.webp); } #over.thief .ovbg { background-image: url(art/bg/win_thief.webp); } #over.neutral .ovbg, #over.none .ovbg { background-image: url(art/bg/eject_bg.webp); }
#over .panel { top: auto; bottom: 12px; transform: translateX(-50%); max-height: 62%; }
#ovList { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 5px; font-size: 13px; }
#ovList li { background: #fff; border-radius: 10px; padding: 3px 8px; border: 2px solid #eadcbc; }
#ovList li.win { border-color: var(--sun); }
#toast { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); background: rgba(43,47,107,.9); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; font-size: 14px; }
#toast.on { opacity: 1; }
@media (max-height: 520px) { #topC { width: min(250px, 40vw); } #taskList { font-size: 11.5px; line-height: 1.4; max-height: 34vh; } }
/* 転送札を貼られた時：画面が一瞬青く光る */
body.hit::after { content: ''; position: fixed; inset: 0; background: radial-gradient(circle, rgba(191,232,255,.0) 20%, rgba(127,208,255,.75)); pointer-events: none; animation: hit .9s ease-out forwards; z-index: 50; }
@keyframes hit { from { opacity: 1; } to { opacity: 0; } }
/* S2：役としかけ */
.act.s-l2 { right: calc(clamp(92px, 17vmin, 118px) + clamp(70px, 12vmin, 86px) + 22px); bottom: 0; }
.act.s-ul2 { --s: clamp(62px, 10.5vmin, 76px); right: calc(clamp(92px, 17vmin, 118px) + clamp(62px, 10.5vmin, 76px) + 20px); bottom: calc(clamp(92px, 17vmin, 118px) + 4px); }
.act b { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
#status.alarm { background: #fde3dc; border-color: #e2493f; color: #a3302a; animation: hot 1s ease-in-out infinite; }
body.alarm #cv { filter: saturate(1.15) hue-rotate(-8deg); }
body.alarm::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 40; box-shadow: inset 0 0 60px rgba(226,73,63,.55); animation: hot 1.2s ease-in-out infinite; }
.pop.menu { width: min(420px, calc(100vw - 24px)); max-height: 80vh; overflow: auto; display: none; flex-wrap: wrap; gap: 8px; padding: 34px 12px 12px; }
.pop.menu.on { display: flex; }
.pop.menu p { width: 100%; margin: 4px 0 0; font-weight: 700; font-size: 13px; }
.pop.menu .pill { font-size: 13px; padding: .4em .9em; }

/* S2：つなぎ直し・観戦・答え合わせ */
#net { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); display: none; z-index: 60; background: rgba(255,248,236,.95); border: 3px solid var(--brass); border-radius: 14px; padding: 10px 18px; font-weight: 700; }
#net.on { display: block; }
#bWatchNext { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: none; z-index: 30; }
body.watching #bWatchNext { display: block; }
body.watching #stick, body.watching #acts, body.watching #taskList { display: none !important; }
body.watching #mCtl { display: none; }
#nowBox { margin-top: 10px; }
#replay { width: min(720px, calc(100vw - 20px)); max-height: 92vh; overflow: auto; z-index: 70; padding-top: 34px; }
#replay canvas { width: auto; max-width: 100%; max-height: 58vh; aspect-ratio: 72/70; display: block; margin: 0 auto; border-radius: 10px; }
#replay .row { margin: 8px 0; } #replay input[type=range] { flex: 1; }
#rpNow { font-weight: 700; margin: 4px 0; } #replay h3 { margin: 8px 0 4px; font-size: 15px; } #rpLies { font-size: 13px; margin: 0; padding-left: 1.2em; }

/* S2：声・無線・通報 */
#topR { position: absolute; right: max(10px, env(safe-area-inset-right)); top: max(8px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pill.sm { font-size: 12px; padding: .3em .8em; border-width: 2px; }
.bMic.on { background: linear-gradient(#f6a35a, #e2743e); }
#bChat.new { animation: hot 1s ease-in-out infinite; }
#chatBox { top: auto; bottom: 150px; left: auto; right: 12px; transform: none; width: min(320px, calc(100vw - 24px)); }
#chatLog { max-height: 26vh; overflow: auto; font-size: 13px; margin: 6px 0; } #chatLog p { margin: 2px 0; }
#mHead .bMic { margin-left: 8px; }
@media (max-width: 520px) { #topC { width: min(300px, calc(100vw - clamp(64px, 15vmin, 96px) - 110px)); } }
#menuBox { position: fixed; z-index: 65; }

/* ---------- 演出の仕上げ（S3）：解析の段取り（役の発表・転送・鐘と跡・送り出し・決着）に合わせた、ステラログの形 ---------- */
.fig { display: inline-flex; flex-direction: column; align-items: center; animation: figIn .5s both cubic-bezier(.2,.9,.3,1.3); }
.fig canvas { height: clamp(44px, 8.5vmin, 80px); width: auto; filter: drop-shadow(0 0 6px rgba(127,208,255,.9)); }
.fig small { font-size: 11px; font-weight: 700; color: var(--navy); white-space: nowrap; max-width: 6em; overflow: hidden; text-overflow: ellipsis; }
.fig.me canvas { height: clamp(52px, 10vmin, 96px); filter: drop-shadow(0 0 8px rgba(242,194,27,1)); }
@keyframes figIn { from { transform: translateY(18px) scale(.6); opacity: 0; } }
/* 役の発表：後ろの光・陣営の仲間が並ぶ */
#reveal .rvrays { position: absolute; left: 50%; top: 50%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; background: repeating-conic-gradient(rgba(255,244,200,.28) 0 7deg, transparent 7deg 18deg); -webkit-mask: radial-gradient(circle, #000 8%, transparent 42%); mask: radial-gradient(circle, #000 8%, transparent 42%); animation: spin 24s linear infinite, fadeIn 1.2s both; pointer-events: none; }
#reveal.thief .rvrays { background: repeating-conic-gradient(rgba(255,150,140,.3) 0 7deg, transparent 7deg 18deg); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }
#rvRow { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; margin-top: 6px; }
#reveal.thief .fig canvas { filter: drop-shadow(0 0 7px rgba(226,73,63,.95)); }
#reveal.thief .fig.me canvas { filter: drop-shadow(0 0 9px rgba(242,194,27,1)); }
/* 鐘と跡：鐘は音の輪、跡は見つかった人のホロの顔と場所 */
.ciWave { position: absolute; left: calc(4vw + min(15vw, 20vh)); top: 50%; width: 0; height: 0; pointer-events: none; }
.ciWave i { position: absolute; left: 0; top: 0; width: min(30vw, 40vh); aspect-ratio: 1; border: 4px solid rgba(255,236,170,.9); border-radius: 50%; transform: translate(-50%, -50%) scale(.6); opacity: 0; animation: wave 1.4s ease-out infinite; }
.ciWave i:nth-child(2) { animation-delay: .35s; } .ciWave i:nth-child(3) { animation-delay: .7s; }
#cutin.report .ciWave i { border-color: rgba(127,208,255,.9); }
@keyframes wave { 0% { transform: translate(-50%, -50%) scale(.9); opacity: .9; } 100% { transform: translate(-50%, -50%) scale(2); opacity: 0; } }
#cutin.bell { animation: shake .45s .1s; }
@keyframes shake { 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, 0); } }
#ciSub { position: absolute; right: 5vw; top: calc(50% + clamp(48px, 10vmin, 96px)); display: none; align-items: center; gap: 8px; background: rgba(43,47,107,.78); color: #fff; border: 2px solid #7fd0ff; border-radius: 14px; padding: 4px 12px 4px 4px; font-weight: 700; font-size: clamp(13px, 2.6vmin, 20px); animation: fadeIn .5s .35s both; }
#cutin.report #ciSub { display: flex; }
#ciSubFace { width: clamp(40px, 8vmin, 64px); height: clamp(40px, 8vmin, 64px); border-radius: 50%; background: rgba(127,208,255,.25); filter: saturate(.3) brightness(1.15) drop-shadow(0 0 6px #7fd0ff); opacity: .85; }
/* 転送された人：自分の姿が光にほどけて、ホロになる */
#hitPanel { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; pointer-events: none; z-index: 60; background: radial-gradient(circle, rgba(43,47,107,.15) 10%, rgba(43,47,107,.65)); }
#hitPanel.on { display: flex; animation: hpOut 3s forwards; }
@keyframes hpOut { 0%, 78% { opacity: 1; } 100% { opacity: 0; } }
#hpFig { height: clamp(120px, 30vmin, 240px); width: auto; animation: unravel 1.8s .15s both; }
@keyframes unravel { 0% { filter: brightness(1); transform: none; } 12% { filter: brightness(3) saturate(0); transform: translateX(-4px); } 22% { transform: translateX(4px); } 100% { filter: brightness(1.3) saturate(.3) hue-rotate(160deg) drop-shadow(0 0 14px #7fd0ff); opacity: .55; transform: translateY(-14px); } }
.hpRing { position: absolute; width: clamp(160px, 44vmin, 360px); aspect-ratio: 1; border-radius: 50%; border: 6px solid rgba(191,232,255,.95); box-shadow: 0 0 30px #7fd0ff, inset 0 0 30px #7fd0ff; animation: hpRing 1.2s ease-out both; }
@keyframes hpRing { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
#hpText { margin: 10px 16px 0; text-align: center; color: #fff; text-shadow: 0 2px 0 var(--navy), 0 0 12px rgba(43,47,107,.9); animation: fadeIn .5s .7s both; }
#hpText b { display: block; font-size: clamp(22px, 5.5vmin, 40px); font-weight: 900; }
#hpText span { font-size: clamp(13px, 2.6vmin, 18px); font-weight: 700; }
/* 送り出し：姿と名前 → 小型艇が出る → 役の札 */
#ejShip { animation: fly 2.6s 1.3s ease-in both; }
#ejSpot { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; animation: board 1.6s .1s both; }
#ejFig { height: clamp(120px, 26vmin, 220px); width: auto; filter: drop-shadow(0 0 12px rgba(255,240,190,.9)); }
#ejName { margin-top: 4px; background: var(--navy); color: #fff; border-radius: 10px; padding: 2px 14px; font-size: clamp(15px, 3vmin, 22px); }
@keyframes board { 0% { opacity: 0; transform: translateX(-50%) translateY(20px); } 18%, 62% { opacity: 1; transform: translateX(-50%); } 100% { opacity: 0; transform: translateX(-120%) translateY(10%) scale(.35); } }
#ejRole { position: absolute; left: 50%; top: 34%; transform: translate(-50%, 0) rotate(-6deg); display: flex; align-items: center; gap: 10px; background: rgba(255,248,236,.95); border: 4px solid var(--teal); border-radius: 18px; padding: 8px 18px; font-weight: 900; font-size: clamp(20px, 5vmin, 40px); color: var(--teal); animation: stamp .45s 2.3s both cubic-bezier(.2,.9,.3,1.4); white-space: nowrap; }
#ejRole.thief { border-color: #c2453c; color: #c2453c; } #ejRole.neutral { border-color: #8d55c8; color: #8d55c8; } #ejRole.hide { display: none; }
#ejIcon { width: clamp(36px, 8vmin, 64px); height: clamp(36px, 8vmin, 64px); }
@keyframes stamp { from { transform: translate(-50%, 0) rotate(-6deg) scale(2.2); opacity: 0; } }
/* 決着：一瞬の間（光と帯）→ 勝ち負けの判と、勝った人が並んで跳ねる */
#finale { position: fixed; inset: 0; display: none; pointer-events: none; z-index: 55; }
#finale.on { display: block; background: radial-gradient(circle, rgba(255,255,255,.75), rgba(255,255,255,0) 60%); animation: flash 1.6s both; }
#finale::before, #finale::after { content: ''; position: absolute; left: 0; right: 0; height: 11%; background: #1b1d44; animation: bars .5s both; }
#finale::before { top: 0; } #finale::after { bottom: 0; }
@keyframes bars { from { transform: scaleY(0); } }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: .35; } }
body.finale #cv { filter: saturate(.55) brightness(1.08); transition: filter .4s; }
#ovStamp { position: absolute; left: 50%; top: 3%; transform: translateX(-50%) rotate(-4deg); font-weight: 900; font-size: clamp(28px, 8vmin, 64px); letter-spacing: .2em; padding: 2px 28px 2px 36px; border-radius: 14px; border: 5px solid var(--sun); color: var(--sun); background: rgba(43,47,107,.82); text-shadow: 0 2px 0 #7a5a10; animation: stampTop .5s .2s both cubic-bezier(.2,.9,.3,1.4); white-space: nowrap; }
#ovStamp.lose { border-color: #9fa3c9; color: #dfe2f5; text-shadow: none; }
#ovStamp:empty { display: none; }
@keyframes stampTop { from { transform: translateX(-50%) rotate(-4deg) scale(2); opacity: 0; } }
#ovRow { position: absolute; left: 0; right: 0; top: calc(3% + clamp(48px, 12vmin, 96px)); display: flex; justify-content: center; align-items: flex-end; gap: 0 clamp(2px, 1.4vmin, 14px); flex-wrap: wrap; padding: 0 8px; }
#ovRow .fig canvas { height: clamp(56px, 15vh, 140px); filter: drop-shadow(0 0 8px rgba(255,240,190,.95)); animation: hop 1.1s infinite ease-in-out; }
#ovRow .fig.me canvas { height: clamp(64px, 18vh, 160px); filter: drop-shadow(0 0 10px rgba(242,194,27,1)); }
#ovRow .fig small { background: rgba(255,248,236,.9); border-radius: 8px; padding: 0 6px; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-14%); } 55% { transform: translateY(-14%) scaleY(.98); } }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) { #ovRow { top: calc(2% + 46px); } #ovRow .fig canvas { height: 13vh; } #ovRow .fig small { display: none; } #ovStamp { font-size: 26px; top: 2%; } }
@media (max-aspect-ratio: 1/1) { .card { height: 42vh; } #rvRow .fig canvas { height: clamp(40px, 6.5vh, 64px); } #rvRow .fig.me canvas { height: clamp(46px, 7.5vh, 74px); } }
#ovRow.many .fig canvas { height: clamp(46px, 10vh, 112px); } #ovRow.many .fig.me canvas { height: clamp(52px, 12vh, 128px); }
@media (max-aspect-ratio: 1/1) { #ovRow { flex-wrap: nowrap; } #ovRow .fig { flex: 0 1 auto; min-width: 0; } #ovRow .fig canvas, #ovRow.many .fig canvas, #ovRow .fig.me canvas, #ovRow.many .fig.me canvas { height: auto; width: 100%; max-width: 92px; max-height: 15vh; object-fit: contain; } #ovRow.many .fig small { display: none; } }

/* S4：決着の板を横のスマホでたためる形に（ふだんは札を出さない） */
.ovmore { display: none; }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .ovmore { display: inline-block; margin: 0 0 6px; padding: 4px 14px; border-radius: 999px; border: 2px solid #eadcbc; background: #fff; color: var(--ink, #2b2f6b); font: inherit; font-size: 13px; font-weight: 700; }
  #over:not(.open) #ovList { display: none; }
  #over .panel { padding-top: 8px; padding-bottom: 8px; }
  #over .panel h2 { margin: 0 0 2px; font-size: 17px; } #over #ovWhy { margin: 0 0 4px; font-size: 14px; }
  #over:not(.open) #ovRow { top: calc(2% + 52px); }
  #over:not(.open) #ovRow .fig canvas { height: 24vh; } #over:not(.open) #ovRow .fig.me canvas { height: 28vh; }
  #over:not(.open) #ovRow .fig small { display: inline; }
  #over:not(.open) #ovRow.many .fig canvas { height: 20vh; } #over:not(.open) #ovRow.many .fig.me canvas { height: 23vh; }
  #over:not(.open) #ovRow { flex-wrap: nowrap; } #over:not(.open) #ovRow .fig { flex: 0 1 auto; min-width: 0; } #over:not(.open) #ovRow.many .fig small { display: none; }
  #over.open .panel { max-height: calc(100% - 16px); }
}

/* S4：当番の窓を開いている間は、知らせの札を下へ（見出しと重ねない） */
#task.on ~ #toast { top: auto; bottom: calc(3% + env(safe-area-inset-bottom)); }
/* S4：縦の画面は役の一覧を 2 列に（12 人でボタンが板の下に隠れていた） */
@media (max-aspect-ratio: 1/1) and (max-width: 480px) { #ovList { grid-template-columns: 1fr 1fr; font-size: 12px; } #ovList li { padding: 3px 6px; } }

/* 1108（ステラログ＋）：船の決まり */
.ship { display: grid; gap: 6px; margin: 4px 0 8px; }
.ship .sr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ship .sr > b { font-size: 13px; min-width: 4.6em; color: #6b5a3a; }
.ship .chip { min-width: 44px; min-height: 40px; padding: 4px 12px; border-radius: 20px; border: 2px solid #eadcbc; background: #fff; font: inherit; font-weight: 700; font-size: 14px; color: #4a3a22; cursor: pointer; }
.ship .chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.ship .chip:disabled { opacity: 1; cursor: default; }
.ship .chip:disabled:not(.on) { opacity: .45; }
.ship .ro { font-size: 12px; color: #7a6a4a; }
.tg { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 13px; margin: 6px 0; min-height: 40px; }
.tg input { width: 22px; height: 22px; }
#ovPair { margin: 4px 0 6px; font-size: 13px; color: #4a3a22; background: #fff8e6; border-radius: 10px; padding: 4px 10px; }
#ovPair:empty { display: none; }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) { #ovPair { font-size: 12px; padding: 2px 8px; margin: 2px 0; } .ship .chip { min-height: 34px; padding: 2px 10px; } }
.shipd { margin: 2px 0 8px; text-align: left; }
.shipd summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; font-size: 13px; font-weight: 700; color: #4a3a22; background: #fff; border: 2px solid #eadcbc; border-radius: 20px; padding: 2px 12px; }
.shipd summary::-webkit-details-marker { display: none; }
.shipd summary::after { content: '変える'; font-size: 12px; color: #fff; background: var(--teal); border-radius: 12px; padding: 1px 8px; }
.shipd[open] summary::after { content: 'とじる'; }
.shipd .ship { margin-top: 6px; }
@media (max-width: 460px) { .ship .sr > b { min-width: 100%; } .ship .chip { min-width: 40px; padding: 4px 9px; font-size: 13px; } }

/* ====================== 1110 底上げ：演出・手ごたえ・日誌・手引き ====================== */
/* 演出の層 */
#fxCv { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.fxFlash { position: fixed; inset: 0; pointer-events: none; z-index: 88; animation: fxFlash .26s ease-out forwards; }
@keyframes fxFlash { from { opacity: 1; } to { opacity: 0; } }
#fxIris { position: fixed; inset: 0; pointer-events: none; z-index: 95; display: none; overflow: hidden; }
#fxIris.in, #fxIris.out { display: block; }
#fxIris::before { content: ''; position: absolute; left: calc(var(--ix) - 10px); top: calc(var(--iy) - 10px); width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 300vmax #1b1d44, inset 0 0 6px 2px rgba(255,214,90,.9); }
#fxIris.in::before { animation: irisIn var(--it) cubic-bezier(.6,0,.9,.4) forwards; }
#fxIris.out::before { animation: irisOut var(--it) cubic-bezier(.1,.6,.3,1) forwards; }
@keyframes irisIn { from { transform: scale(160); } to { transform: scale(0); } }
@keyframes irisOut { from { transform: scale(0); } to { transform: scale(160); } }
body.shk { animation: shk var(--shkT, 320ms) linear; }
@keyframes shk { 0%, 100% { transform: none; } 12% { transform: translate(calc(var(--shk) * -1), calc(var(--shk) * .5)); } 28% { transform: translate(var(--shk), calc(var(--shk) * -.6)); } 44% { transform: translate(calc(var(--shk) * -.7), calc(var(--shk) * -.3)); } 60% { transform: translate(calc(var(--shk) * .5), calc(var(--shk) * .4)); } 78% { transform: translate(calc(var(--shk) * -.25), 0); } }
/* 画面のふちの暗がりは、重ねの層を増やさないため入れていない（霧が同じ役をする） */

/* ボタンの手ごたえ */
.pill { transition: transform .12s cubic-bezier(.3,1.6,.5,1), filter .15s, box-shadow .12s; position: relative; overflow: hidden; }
.pill::after { content: ''; position: absolute; left: -60%; top: 0; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-18deg); pointer-events: none; opacity: 0; }
.pill.main::after { opacity: 1; animation: sheen 3.4s ease-in-out infinite; }
@keyframes sheen { 0%, 62% { left: -60%; } 100% { left: 130%; } }
.pill:not(:disabled):hover { filter: brightness(1.07); transform: translateY(-1px); }
.pill:active:not(:disabled) { transform: translateY(2px) scale(.97); }
.chip, #mBtns button, .x, .pick button { transition: transform .12s cubic-bezier(.3,1.6,.5,1), background .15s, border-color .15s, box-shadow .15s; }
.chip:active:not(:disabled), #mBtns button:active:not(:disabled), .x:active, .pick button:active { transform: scale(.93); }
.pick button.on { animation: pickOn .3s cubic-bezier(.3,1.8,.5,1); }
@keyframes pickOn { from { transform: scale(.8); } }
input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,143,134,.25); }

/* タイトル */
#title .tbg { animation: tbgDrift 40s ease-in-out infinite alternate; }
@keyframes tbgDrift { from { transform: scale(1.06) translate(-1%, 0); } to { transform: scale(1.12) translate(1.2%, -1%); } }
.tstars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tstars i { position: absolute; inset: -10%; background-image: radial-gradient(circle, rgba(255,250,225,.95) 0 1.2px, transparent 1.8px), radial-gradient(circle, rgba(255,236,170,.9) 0 1.6px, transparent 2.4px), radial-gradient(circle, rgba(191,232,255,.9) 0 1px, transparent 1.6px); background-size: 173px 197px, 311px 263px, 127px 149px; background-position: 20px 40px, 150px 90px, 70px 10px; animation: twinkle 3.6s ease-in-out infinite alternate, starDrift 60s linear infinite; }
.tstars i:nth-child(2) { background-size: 233px 181px, 277px 331px, 163px 139px; animation-delay: -1.8s, -20s; opacity: .7; }
.tstars i:nth-child(3) { background-size: 397px 283px, 191px 353px, 211px 227px; animation-delay: -.9s, -40s; }
@keyframes twinkle { from { opacity: .25; } to { opacity: .95; } }
@keyframes starDrift { to { transform: translate(-6%, 4%); } }
.tcard { animation: cardIn .7s cubic-bezier(.2,.9,.3,1.15) both; box-shadow: 0 0 0 3px var(--brass), 0 14px 44px rgba(30,20,80,.45); }
@keyframes cardIn { from { opacity: 0; margin-top: 30px; } }
.tcard .logo { animation: bob 4.5s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(60,40,120,.3)); }
@keyframes bob { 50% { transform: translateY(-5px) rotate(2deg); } }
.tcard h1 { background: linear-gradient(100deg, #2b2f6b 0 38%, #5b63c4 48%, #c8973f 52%, #2b2f6b 62% 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: logoSheen 5.5s ease-in-out infinite; }
.tcard h1 small { -webkit-text-fill-color: var(--teal); }
@keyframes logoSheen { 0%, 55% { background-position: 100% 0; } 100% { background-position: -30% 0; } }
#tBar { display: flex; align-items: center; gap: 8px; margin: -2px -4px 4px; }
#tRank { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; border: 2px solid #eadcbc; background: #fffdf7; border-radius: 14px; padding: 4px 10px 4px 5px; color: var(--ink); transition: transform .12s, border-color .15s; }
#tRank:active { transform: scale(.97); } #tRank:hover { border-color: var(--brass); }
.rkBadge { position: relative; flex: none; width: 42px; height: 42px; background: url(art/icon/menu.webp) 66.666% 66.666% / 400% 400%; border-radius: 50%; filter: drop-shadow(0 2px 2px rgba(60,40,120,.3)); }
.rkBadge b { position: absolute; left: 0; right: 0; top: 17%; text-align: center; font: 900 15px/1.2 system-ui, sans-serif; color: #fff; text-shadow: 0 1px 0 #7a5a10, 0 0 3px #7a5a10; }
.rkBadge.r0, .rkBadge.r1, .rkBadge.r2 { filter: saturate(.55) sepia(.3) drop-shadow(0 2px 2px rgba(60,40,120,.3)); }
.rkBadge.r3, .rkBadge.r4, .rkBadge.r5 { filter: hue-rotate(150deg) saturate(.8) drop-shadow(0 2px 2px rgba(60,40,120,.3)); }
.rkBadge.r9 { filter: hue-rotate(250deg) saturate(1.4) drop-shadow(0 0 6px rgba(201,164,240,.9)); }
.rkBadge.up { animation: badgeUp .8s cubic-bezier(.3,1.7,.5,1); }
@keyframes badgeUp { 0% { transform: scale(.3) rotate(-200deg); } 100% { transform: none; } }
.rkTxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rkTxt > b { font-size: 14px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rkTxt small { font-size: 10.5px; color: #7a6a4a; font-weight: 700; }
.xpbar { height: 7px; border-radius: 4px; background: #eadcbc; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #f2c21b, #ee7d6a); transition: width .65s cubic-bezier(.3,.8,.3,1); }
.tIcons { display: flex; gap: 5px; }
.rb { width: 50px; border: none; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 0; color: var(--navy); }
.rb .ic { width: 40px; height: 40px; border-radius: 50%; background: url(art/icon/menu.webp) 0 0 / 400% 400%; filter: drop-shadow(0 2px 2px rgba(60,40,120,.3)); transition: transform .14s cubic-bezier(.3,1.8,.5,1); }
.rb:hover .ic { transform: translateY(-2px) rotate(-5deg); } .rb:active .ic { transform: scale(.88); }
.rb .ic.book { background-position: 100% 33.333%; } .rb .ic.how { background-position: 100% 66.666%; } .rb .ic.set { background-position: 33.333% 33.333%; }
.rb span { font-size: 9.5px; font-weight: 800; white-space: nowrap; }
@media (max-height: 700px) { .tcard .logo { width: 54px; height: 54px; } .lead { display: none; } }

/* 日誌・あそびかた・設定の板 */
.pop.big { position: fixed; z-index: 80; width: min(600px, calc(100vw - 16px)); max-height: min(92vh, 760px); overflow: auto; padding: 14px 16px 16px; box-shadow: 0 0 0 3px var(--brass), 0 0 0 200vmax rgba(27,29,68,.55), 0 14px 40px rgba(20,10,60,.5); overscroll-behavior: contain; touch-action: pan-y; }
.pop.big.on { animation: popIn .32s cubic-bezier(.3,1.5,.5,1); }
.pop.big.sm { width: min(400px, calc(100vw - 16px)); }
@keyframes popIn { from { transform: translate(-50%, -46%) scale(.86); opacity: 0; } }
.pop.big h2 { margin: 0 44px 8px 0; font-size: 20px; color: var(--navy); }
.bkTabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabb { flex: 1; border: 2px solid #eadcbc; background: #fff; border-radius: 12px; padding: 7px 4px; font-weight: 800; font-size: 13px; color: #6b5a3a; min-height: 40px; }
.tabb.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.bkBody { animation: fadeUp .3s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.bkRank { display: flex; gap: 12px; align-items: center; background: linear-gradient(120deg, #fff, #fff3d6); border: 2px solid #eadcbc; border-radius: 16px; padding: 10px 12px; }
.bkRank .rkBadge { width: 64px; height: 64px; } .bkRank .rkBadge b { font-size: 22px; } .bkRank .rkTxt > b { font-size: 20px; } .bkRank .xpbar { height: 10px; margin: 3px 0; }
.bkGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.bkGrid div { background: #fff; border: 2px solid #eadcbc; border-radius: 12px; padding: 6px 4px; text-align: center; }
.bkGrid small { display: block; font-size: 10.5px; color: #7a6a4a; font-weight: 700; } .bkGrid b { font-size: 16px; color: var(--navy); }
@media (max-width: 460px) { .bkGrid { grid-template-columns: repeat(2, 1fr); } }
.bkBody h4 { margin: 10px 0 4px; font-size: 13px; color: #6b5a3a; }
.bkHist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bkHist li { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid #eadcbc; border-radius: 10px; padding: 4px 10px; font-size: 13px; }
.bkHist li.w { border-color: var(--sun); } .bkHist li span { flex: 1; font-weight: 700; } .bkHist em { font-style: normal; font-size: 12px; color: #7a6a4a; } .bkHist li.none { justify-content: center; color: #7a6a4a; padding: 14px; }
.g { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font: 900 15px/1 system-ui, sans-serif; font-style: normal; color: #fff; background: #9fa3c9; }
.g.gS { background: linear-gradient(135deg, #f2c21b, #ee7d6a); } .g.gA { background: #2f8f86; } .g.gB { background: #5b7fd6; }
.bkAch { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 460px) { .bkAch { grid-template-columns: 1fr; } }
.bkAch li { display: flex; gap: 8px; align-items: center; background: #f4efe2; border: 2px solid #e6dcc4; border-radius: 12px; padding: 6px 8px; opacity: .62; }
.bkAch li i { flex: none; width: 34px; height: 34px; border-radius: 50%; background: url(art/icon/menu.webp) 66.666% 33.333% / 400% 400%; filter: grayscale(1) brightness(1.1); }
.bkAch li.got { background: #fff; border-color: var(--sun); opacity: 1; } .bkAch li.got i { filter: drop-shadow(0 0 4px rgba(242,194,27,.8)); }
.bkAch b { display: block; font-size: 13.5px; color: var(--navy); } .bkAch small { font-size: 11px; color: #7a6a4a; line-height: 1.35; display: block; }
.bkRoles { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.rc { background: #fff; border: 2px solid #eadcbc; border-radius: 12px; padding: 5px; text-align: center; }
.rcArt { aspect-ratio: 4/3; border-radius: 8px; background: #2b2f6b center 20% / cover; filter: brightness(0) invert(.25) opacity(.5); }
.rc.got .rcArt { filter: none; } .rc.got.thief { border-color: #e3a39b; } .rc.got.crew { border-color: #9fd8c4; } .rc.got.neutral { border-color: #c9a4f0; }
.rc b { display: block; font-size: 13px; margin-top: 3px; color: var(--navy); } .rc small { font-size: 10.5px; color: #7a6a4a; } .rc p { margin: 3px 0 0; font-size: 10.5px; line-height: 1.4; text-align: left; color: #5a4a3a; }
#howImg { aspect-ratio: 16/8; border-radius: 12px; background: #2b2f6b center/cover; border: 3px solid var(--brass); }
#howImg.in { animation: fadeUp .35s both; }
#howS { font-size: 14px; line-height: 1.75; min-height: 6.2em; margin: 6px 0; }
#howT { margin: 10px 0 0 !important; }
#howDots { display: flex; justify-content: center; gap: 6px; } #howDots i { width: 8px; height: 8px; border-radius: 50%; background: #eadcbc; transition: all .2s; } #howDots i.on { background: var(--coral); width: 20px; }
.sl { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; margin: 10px 0; } .sl span { min-width: 4em; } .sl input { flex: 1; padding: 0; height: 28px; accent-color: var(--teal); }
#setBox .tg { justify-content: flex-start; }

/* 待合 */
#lobby .panel { animation: cardIn .5s cubic-bezier(.2,.9,.3,1.15) both; }
#lbList li { animation: fadeUp .35s both; }

/* 役の発表：札がめくれて出る */
.rvcard .card { animation: flipIn .9s cubic-bezier(.2,.8,.3,1.1) both; }
@keyframes flipIn { 0% { transform: perspective(900px) rotateY(-150deg) scale(.6); opacity: 0; } 55% { opacity: 1; } 100% { transform: perspective(900px) rotateY(0) scale(1); } }
.rvtext { animation: fadeUp .5s .55s both; }
#rvTeam { animation: teamPop .5s .8s both cubic-bezier(.3,1.8,.5,1); transform-origin: left center; }
@keyframes teamPop { from { transform: scale(.5); opacity: 0; } }

/* 航行：上の板・つぎの当番・ボタン */
#topC, #topL, #topR, #acts, #stick { transition: opacity .25s; }
body[data-scr="cutin"] #topC, body[data-scr="cutin"] #topL, body[data-scr="cutin"] #topR, body[data-scr="cutin"] #acts, body[data-scr="cutin"] #stick, body[data-scr="cutin"] #toast, body[data-scr="cutin"] #coach { opacity: 0 !important; }
body[data-scr="hud"] #topC, body[data-scr="hud"] #topL { animation: hudIn .5s both cubic-bezier(.2,.9,.3,1.1); }
@keyframes hudIn { from { transform: translateY(-30px); opacity: 0; } }
.prog { box-shadow: 0 2px 6px rgba(40,30,90,.25); height: 26px; }
.prog i { background: linear-gradient(90deg, #8cc43f, #2f9e62 70%, #9fe88a); box-shadow: 0 0 8px rgba(140,196,63,.8); }
.prog i::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 26px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.75)); }
.prog span, .prog b { line-height: 22px; }
.prog.bump { animation: bump .5s cubic-bezier(.3,1.9,.5,1); } .prog.glint { animation: glint .6s; }
@keyframes bump { 30% { transform: scale(1.09); box-shadow: 0 0 18px rgba(255,214,90,1); } }
@keyframes glint { 40% { box-shadow: 0 0 12px rgba(140,196,63,.95); filter: brightness(1.12); } }
#taskNext { display: none; margin-top: 5px; padding: 4px 10px; background: rgba(255,248,236,.9); border: 2px solid var(--sun); border-radius: 10px; font-size: 12.5px; font-weight: 800; color: #5a4310; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(40,30,90,.2); }
#taskNext:empty { display: none !important; }
#taskNext:has(+ #taskList.fold) { display: block; }
#taskNext.kpop { animation: chipPop .35s cubic-bezier(.3,1.7,.5,1); }
@keyframes chipPop { from { transform: scale(.9); filter: brightness(1.3); } }
#taskList { box-shadow: 0 2px 6px rgba(40,30,90,.2); animation: fadeUp .2s; }
#taskList li.here { animation: hot 1s ease-in-out infinite; }
#status:not(:empty) { animation: chipPop .3s; }
.act { transition: transform .13s cubic-bezier(.3,1.8,.5,1), filter .2s; }
.act:active:not(:disabled) { transform: scale(.88); }
.act.ready { animation: actReady .45s cubic-bezier(.3,1.9,.5,1), hot 1s .45s ease-in-out infinite; }
@keyframes actReady { 0% { transform: scale(.7); } 60% { transform: scale(1.14); } }
.act .cd { background: conic-gradient(rgba(43,47,107,.0) calc(100% - var(--p, 100%)), rgba(43,47,107,.5) 0); color: #fff; text-shadow: 0 1px 2px #1b1d44; }
#toast { top: 16%; padding: 8px 18px; border: 2px solid rgba(255,214,90,.8); box-shadow: 0 4px 14px rgba(20,10,60,.4); z-index: 58; max-width: calc(100vw - 20px); overflow: hidden; text-overflow: ellipsis; }
#toast.kpop { animation: toastIn .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes toastIn { from { transform: translateX(-50%) translateY(-14px) scale(.9); } }
#stick.on { animation: stickOn .18s cubic-bezier(.3,1.8,.5,1); } @keyframes stickOn { from { transform: scale(.7); opacity: 0; } }

/* 当番の窓 */
#task { animation: fadeIn .2s; }
.tkwrap.in { animation: tkIn .34s cubic-bezier(.3,1.5,.5,1); }
@keyframes tkIn { from { transform: translate(-50%, -44%) scale(.82); opacity: 0; } }
#tkDone { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; background: radial-gradient(circle, rgba(255,250,225,.7), rgba(255,250,225,0) 62%); }
#tkDone.on { display: flex; animation: fadeIn .2s; }
#tkDone b { font-size: clamp(34px, 9vmin, 64px); font-weight: 900; color: #fff; letter-spacing: .08em; padding: .1em .6em; border-radius: 18px; background: linear-gradient(#3fb3a6, #24877e); border: 5px solid #fff; box-shadow: 0 0 0 4px var(--brass), 0 8px 24px rgba(20,10,60,.4); transform: rotate(-5deg); animation: stampIn .4s cubic-bezier(.3,1.9,.5,1) both; text-shadow: 0 2px 0 rgba(30,60,60,.5); }
@keyframes stampIn { from { transform: rotate(-5deg) scale(2.4); opacity: 0; } }

/* カットイン：速さの線・暗い幕 */
#cutin { background: rgba(27,29,68,.72); animation: fadeIn .18s; }
.ciLines { position: absolute; left: 0; right: 0; top: 50%; height: min(56vw, 70vh); transform: translateY(-50%); overflow: hidden; z-index: 1; pointer-events: none; mix-blend-mode: screen; }
.ciLines::before { content: ''; position: absolute; inset: 0 -100% 0 0; background: repeating-linear-gradient(90deg, transparent 0 60px, rgba(255,255,255,.22) 60px 180px, transparent 180px 260px, rgba(255,236,170,.2) 260px 300px, transparent 300px 420px); -webkit-mask: repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 19px); mask: repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 19px); animation: ciRun .5s linear infinite; }
@keyframes ciRun { to { transform: translateX(-420px); } }
#ciBg { box-shadow: 0 0 0 4px var(--brass), 0 0 0 8px #1b1d44, 0 0 40px rgba(0,0,0,.5); }
.ciFace, #ciText, #ciSub, .ciWave { z-index: 2; }
#ciText { animation: ciTxt .5s .12s both cubic-bezier(.2,.9,.3,1.2); }
@keyframes ciTxt { from { transform: translate(40%, -50%) skewX(-12deg); opacity: 0; } }

/* 会議 */
#mHead { box-shadow: 0 3px 10px rgba(40,30,90,.25); animation: hudIn .45s both; }
#mBar { height: 5px; background: linear-gradient(90deg, var(--teal), var(--coral)); transition: width .25s linear; }
#mHead.hurry { animation: hot .5s ease-in-out infinite; border-color: #e2493f; } #mHead.hurry #mTime { color: #e2493f; transform: scale(1.25); }
#mTime { transition: transform .2s, color .2s; }
.fc > canvas, .fc > .fr, .fc > .nm { animation: fcIn .5s calc(var(--i, 0) * 55ms + .1s) both cubic-bezier(.3,1.6,.5,1); }
@keyframes fcIn { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }
.fc { transition: transform .15s cubic-bezier(.3,1.7,.5,1), filter .15s; }
.fc:active { transform: scale(.94); }
.fc.sel { transform: scale(1.07); z-index: 2; filter: drop-shadow(0 0 7px var(--coral)) drop-shadow(0 0 2px var(--coral)); }
.fc.turn { filter: drop-shadow(0 0 8px rgba(255,214,90,1)); z-index: 2; }
.fc.spk { animation: spk .4s cubic-bezier(.3,1.8,.5,1); } @keyframes spk { 35% { transform: translateY(-7%) scale(1.06); } }
.fc.stampd { animation: stampd .35s; } @keyframes stampd { 40% { transform: scale(.92) rotate(-3deg); } }
.fc.hitv, .skipbox.hitv { animation: hitv .28s; } @keyframes hitv { 30% { transform: scale(1.14) rotate(3deg); filter: brightness(1.25); } }
.fc.top { animation: topv 1s ease-in-out infinite; filter: drop-shadow(0 0 10px #e2493f) drop-shadow(0 0 3px #e2493f); z-index: 3; }
@keyframes topv { 50% { transform: scale(1.1) rotate(-2deg); } }
.fc .vt { background: var(--teal); border: 2px solid #fff; box-shadow: 0 2px 4px rgba(20,10,60,.3); font-weight: 800; transform: rotate(8deg); animation: stampIn2 .3s cubic-bezier(.3,1.9,.5,1); }
@keyframes stampIn2 { from { transform: rotate(8deg) scale(2.2); opacity: 0; } }
.fc .votes { top: 30%; font-size: clamp(16px, 4.4vmin, 30px); color: #fff; -webkit-text-stroke: 0; text-shadow: 0 0 0 #000, 0 2px 0 #a3302a, 0 0 8px #e2493f, 0 0 2px #a3302a; }
.fc .votes:not(:empty) { background: rgba(226,73,63,.88); width: max-content; margin: 0 auto; padding: 0 .5em; border-radius: 999px; border: 2px solid #fff; left: 50%; right: auto; transform: translateX(-50%); }
.skipbox { display: none; align-self: center; justify-self: center; flex-direction: column; align-items: center; background: rgba(255,248,236,.92); border: 3px dashed var(--brass); border-radius: 14px; padding: 4px 10px; font-weight: 800; font-size: 12px; color: #6b5a3a; }
.skipbox.show { display: flex; } .skipbox b { font-size: 20px; color: var(--navy); }
.bub { position: fixed; z-index: 20; max-width: min(240px, 62vw); background: #fff; color: var(--ink); border: 2px solid var(--navy); border-radius: 12px; padding: 3px 9px; font-size: clamp(11px, 1.9vmin, 13.5px); font-weight: 700; line-height: 1.35; pointer-events: none; box-shadow: 0 3px 8px rgba(20,10,60,.3); animation: bubIn .3s cubic-bezier(.3,1.7,.5,1), bubOut .3s 2.3s forwards; transform-origin: var(--ax, 50%) 0; }
.bub::before { content: ''; position: absolute; left: calc(var(--ax, 50%) - 6px); top: -8px; border: 6px solid transparent; border-top: 0; border-bottom: 8px solid var(--navy); }
@keyframes bubIn { from { transform: scale(.3); opacity: 0; } } @keyframes bubOut { to { opacity: 0; transform: translateY(-4px); } }
#mBanner { position: fixed; left: 0; right: 0; top: 42%; z-index: 25; text-align: center; pointer-events: none; opacity: 0; font-weight: 900; font-size: clamp(24px, 6.5vmin, 54px); letter-spacing: .1em; color: #fff; padding: .25em 0; background: linear-gradient(90deg, transparent, rgba(43,47,107,.92) 18% 82%, transparent); text-shadow: 0 3px 0 #1b1d44; border-top: 3px solid var(--sun); border-bottom: 3px solid var(--sun); }
#mBanner.red { background: linear-gradient(90deg, transparent, rgba(163,48,42,.92) 18% 82%, transparent); }
#mBanner.on { animation: bannerIn 1.5s both; }
@keyframes bannerIn { 0% { opacity: 0; transform: scaleY(0) translateX(-6%); } 14% { opacity: 1; transform: none; } 78% { opacity: 1; transform: translateX(1%); } 100% { opacity: 0; transform: translateX(6%); } }
#mBoard { animation: fadeUp .45s .2s both; }
#mRecs { list-style: none; padding: 0; counter-reset: rec; display: grid; gap: 4px; }
#mRecs li { counter-increment: rec; display: flex; align-items: center; gap: 6px; background: rgba(255,253,247,.86); border: 2px solid #e2c9a0; border-radius: 10px; padding: 4px 8px; font-weight: 700; animation: recIn .4s both cubic-bezier(.3,1.4,.5,1); transition: transform .12s, background .15s, border-color .15s; }
#mRecs li::before { content: counter(rec); flex: none; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: .82em; }
#mRecs li:nth-child(2) { animation-delay: .1s; } #mRecs li:nth-child(3) { animation-delay: .2s; } #mRecs li:nth-child(4) { animation-delay: .3s; } #mRecs li:nth-child(5) { animation-delay: .4s; }
#mRecs li:active { transform: scale(.97); } #mRecs li.sel { background: #ffe1d8; border-color: var(--coral); }
#mRecs .dot { width: 1.1em; height: 1.1em; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); flex: none; }
@keyframes recIn { from { transform: translateX(-16px) scale(.9); opacity: 0; } }
#mBoard h3 { font-size: 15px; letter-spacing: .2em; color: #6b3a2a; }
#mLog { box-shadow: inset 0 2px 6px rgba(120,90,40,.12); }
#mLog p { padding: 2px 6px; border-radius: 8px; } #mLog p.in { animation: logIn .35s cubic-bezier(.3,1.4,.5,1); background: rgba(255,236,170,.0); }
@keyframes logIn { from { transform: translateX(-10px); opacity: 0; background: rgba(255,236,170,.9); } }
#mCtl { box-shadow: 0 -3px 10px rgba(40,30,90,.18); animation: fadeUp .4s .15s both; }
#mBtns button { min-height: 34px; box-shadow: 0 2px 0 #d9c49a; }
#mBtns button.v { box-shadow: 0 2px 0 #a3483a; animation: vglow 1.2s ease-in-out infinite; } #mBtns button.v:disabled { animation: none; }
@keyframes vglow { 50% { box-shadow: 0 2px 0 #a3483a, 0 0 0 4px rgba(238,125,106,.45); } }

/* 送り出し */
#eject .ejbg { animation: zoomIn 5s ease-out both; }
#eject::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 2px); background-size: 140px 90px; opacity: .5; animation: ejStars 1.2s linear infinite; -webkit-mask: linear-gradient(#000 0 55%, transparent 70%); mask: linear-gradient(#000 0 55%, transparent 70%); }
@keyframes ejStars { to { background-position: -140px 0; } }
#ejText { animation: fadeUp .4s both; min-height: 3.2em; }

/* 決着 */
#over .ovbg { animation: zoomIn 7s ease-out both; }
#over .panel { animation: ovPanel .6s .35s both cubic-bezier(.2,.9,.3,1.1); max-height: 66%; padding: 12px 16px; }
@keyframes ovPanel { from { transform: translateX(-50%) translateY(60px); opacity: 0; } }
#over .panel h2 { margin: 0 0 2px; font-size: clamp(16px, 2.8vmin, 22px); } #ovWhy { margin: 0 0 6px; font-size: 13px; }
.ovmore { display: inline-block; margin: 2px 0 6px; padding: 4px 14px; border-radius: 999px; border: 2px solid #eadcbc; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; }
#over:not(.open) #ovList { display: none; }
#ovScore:empty { display: none; }
#ovScore { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; background: linear-gradient(120deg, #fff, #fff3d6); border: 2px solid #eadcbc; border-radius: 14px; padding: 8px 10px; margin-bottom: 6px; }
.scTop { display: flex; flex-direction: column; align-items: center; gap: 2px; grid-row: span 2; }
.scGrade { position: relative; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: #9fa3c9; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--brass), 0 4px 10px rgba(20,10,60,.3); transform: scale(0) rotate(-40deg); }
.scGrade.gS { background: linear-gradient(135deg, #f2c21b, #ee7d6a); } .scGrade.gA { background: linear-gradient(135deg, #3fb3a6, #24877e); } .scGrade.gB { background: linear-gradient(135deg, #7f9fe8, #4b6fd0); }
.scGrade small { position: absolute; top: 7px; font-size: 9px; font-weight: 800; color: #fff; letter-spacing: .1em; } .scGrade b { font: 900 40px/1 system-ui, sans-serif; color: #fff; margin-top: 8px; text-shadow: 0 3px 0 rgba(0,0,0,.2); }
.scGrade.on { animation: gradeIn .5s cubic-bezier(.3,1.9,.5,1) forwards; }
@keyframes gradeIn { from { transform: scale(2.6) rotate(-40deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.scGrade.gS.on::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid rgba(242,194,27,.9); animation: wave 1.4s ease-out infinite; left: 50%; top: 50%; width: 100%; height: 100%; inset: auto; }
.scPts b { font: 900 22px/1 system-ui, sans-serif; color: var(--navy); font-variant-numeric: tabular-nums; } .scPts small { font-size: 11px; font-weight: 800; margin-left: 2px; }
.scLines { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; font-size: 12.5px; }
.scLines li { display: flex; gap: 8px; align-items: baseline; border-bottom: 1px dashed #e6d6b0; padding: 1px 2px; animation: recIn .35s calc(.5s + var(--i) * .17s) both; }
.scLines span { flex: 1; font-weight: 700; } .scLines em { font-style: normal; color: #7a6a4a; font-size: 11.5px; } .scLines b { min-width: 2.6em; text-align: right; color: #2f8f86; font-variant-numeric: tabular-nums; } .scLines b.z { color: #b9ad94; }
.scRank { display: flex; align-items: center; gap: 8px; }
.scRank .rkBadge { width: 38px; height: 38px; } .scRank .rkBadge b { font-size: 13px; }
#scXp { color: #e2743e; font-weight: 900; font-size: 12px; display: inline-block; margin-left: 4px; } #scXp.kpop { animation: chipPop .4s cubic-bezier(.3,1.9,.5,1); }
#scNew { grid-column: 1 / -1; display: grid; gap: 3px; } #scNew:empty { display: none; }
.nw { margin: 0; padding: 3px 10px 3px 30px; position: relative; background: #fff; border: 2px solid var(--sun); border-radius: 10px; font-size: 12.5px; font-weight: 800; color: #5a4310; animation: nwIn .45s cubic-bezier(.3,1.6,.5,1); }
.nw::before { content: ''; position: absolute; left: 4px; top: 50%; width: 22px; height: 22px; margin-top: -11px; background: url(art/icon/menu.webp) 66.666% 33.333% / 400% 400%; }
.nw.up { background: linear-gradient(90deg, #fff3c4, #ffe1d8); border-color: var(--coral); }
@keyframes nwIn { from { transform: scale(.7) translateY(8px); opacity: 0; } }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) { #ovScore { padding: 4px 8px; } .scGrade { width: 52px; height: 52px; } .scGrade b { font-size: 28px; } .scLines { grid-template-columns: 1fr 1fr; gap: 0 12px; font-size: 11.5px; } #over .panel { max-height: 74%; } }
@media (min-width: 700px) and (min-height: 521px) { .scLines { grid-template-columns: 1fr 1fr; gap: 1px 16px; } }

/* 手引き（マモリン） */
#coach { position: fixed; left: 50%; top: clamp(118px, 23vh, 210px); z-index: 57; width: min(430px, calc(100vw - 20px)); transform: translateX(-50%); display: none; align-items: flex-end; gap: 6px; pointer-events: none; }
#coach.on { display: flex; } #coach.mid { top: auto; bottom: clamp(150px, 30vh, 260px); }
#coach.kpop { animation: coachIn .45s cubic-bezier(.3,1.6,.5,1); }
/* 1110d：当番の窓が開いている間、手引きの札は窓の外（上の空き／横の空き）。どちらも無い画面では窓を閉じるまで休む */
#coach.dkTop, #coach.dkTop.mid { top: auto; }
#coach.dkSide, #coach.dkSide.mid { left: 8px; top: 50%; bottom: auto; transform: translateY(-50%); }
#coach.dkSide.kpop { animation: none; }
#coach.parked { display: none; }
@keyframes coachIn { from { transform: translateX(-50%) translateY(12px) scale(.85); opacity: 0; } }
#coach img { width: 50px; height: auto; flex: none; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 3px 4px rgba(20,10,60,.4)); }
#coach .cb { position: relative; flex: 1; background: rgba(255,253,247,.97); border: 3px solid var(--teal); border-radius: 16px 16px 16px 4px; padding: 6px 30px 9px 12px; box-shadow: 0 0 0 2px var(--brass), 0 6px 16px rgba(20,10,60,.35); overflow: hidden; }
#coach .cb b { display: block; font-size: 14px; color: var(--teal); } #coach .cb span { font-size: 13px; line-height: 1.5; font-weight: 700; }
#coach .cbar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--sun); transform-origin: left; transform: scaleX(0); }
@keyframes cbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
#coach .cx { position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #d9c49a; background: #fff; font-weight: 900; color: #7a6a4a; pointer-events: auto; padding: 0; line-height: 1; }
#coachHand { position: fixed; display: none; pointer-events: none; z-index: 56; }
#coachHand.stick { display: block; left: 22vw; bottom: 22vh; width: 54px; height: 54px; margin: -27px; border-radius: 50%; border: 4px solid rgba(255,255,255,.95); background: rgba(255,214,90,.5); box-shadow: 0 0 16px rgba(255,214,90,.9); animation: handDrag 1.8s ease-in-out infinite; }
@keyframes handDrag { 0%, 15% { transform: scale(1.25); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 70% { transform: translate(46px, -30px); opacity: 1; } 100% { transform: translate(46px, -30px); opacity: 0; } }
#coachHand.keys { display: none; }
.coachHot::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 0 18px #ffd65a, inset 0 0 12px #ffd65a; animation: wave2 1s ease-out infinite; pointer-events: none; }
@keyframes wave2 { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@media (max-height: 520px) { #coach { top: 76px; width: min(380px, 56vw); } #coach.mid { bottom: 96px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.rc:not(.got) .rcArt { background-image: url(art/ui/card_back.webp) !important; background-position: center 38%; filter: saturate(.5) brightness(.9); }
#howImg { margin-top: 30px; }

/* 縦の画面の会議：記録の板は中身の高さまで（空きを作らない）。残りは話のログへ */
@media (max-aspect-ratio: 1/1) { #meeting { grid-template-rows: auto auto auto minmax(0, 1fr) auto; } #mBoard { max-height: 36vh; padding: 8% 8% 6%; } #mLog { min-height: 16vh; } }
@media (max-aspect-ratio: 1/1) { #meeting { grid-template-rows: auto auto auto minmax(0, 1fr) auto; } #mBoard { max-height: 36vh; padding: 8% 8% 6%; } #mLog { min-height: 16vh; } }
/* 投票ずみは小さな丸い判に（せまい画面で顔をかくさない）・見送りの札は 1 行 */
.fc .vt { font-size: 0; width: clamp(16px, 4.2vmin, 24px); height: clamp(16px, 4.2vmin, 24px); padding: 0; border-radius: 50%; right: 4%; top: 2%; display: grid; place-items: center; }
.fc .vt::before { content: '✓'; font-size: clamp(11px, 2.8vmin, 16px); font-weight: 900; line-height: 1; }
.skipbox { white-space: nowrap; font-size: 11px; padding: 3px 8px; }
/* 決着：知らせが多い時（はじめての航海は 8 こほど）も、ボタンがいつも見える */
#scNew { display: flex; flex-wrap: wrap; gap: 4px; max-height: 5.4em; overflow: auto; }
#scNew .nw { font-size: 11.5px; padding: 2px 8px 2px 26px; } #scNew .nw::before { width: 18px; height: 18px; margin-top: -9px; }
#over .panel .btns { position: sticky; bottom: -12px; margin: 6px -4px -12px; padding: 6px 0 10px; background: linear-gradient(transparent, var(--cream) 30%); z-index: 2; }
/* タイトル：背の低い画面は紋章と前書きをたたみ、出航のボタンと合言葉の行まで 1 画面に入れる */
@media (max-height: 820px) { .tcard .logo { display: none; } .tcard h1 { margin-top: 0; font-size: clamp(22px, 4.4vmin, 32px); } .lead { display: block; font-size: 12px; margin: 2px 0 4px; line-height: 1.45; } .tcard { padding: 10px 16px; } .f { margin: 4px 0; } }
@media (max-height: 760px) { .lead { display: none; } }

#tkCv.bad { animation: tkBad .28s; } @keyframes tkBad { 25% { transform: translateX(-5px); } 55% { transform: translateX(5px); } 80% { transform: translateX(-2px); } }

/* ---------- 1110e：会議の動き・乗組員の姿・顔つきの吹き出し・知らせる姿・転送された ---------- */
#meeting .mbg { animation: mbgDrift 26s ease-in-out infinite alternate; transform-origin: 50% 60%; }
@keyframes mbgDrift { from { transform: scale(1); } to { transform: scale(1.06) translateY(-1%); } }
#mLog { display: flex; flex-direction: column; gap: 4px; }
#mLog p { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 0; background: none !important; flex: none; }
#mLog p .lf { width: clamp(24px, 4.4vmin, 32px); height: clamp(24px, 4.4vmin, 32px); border-radius: 50%; flex: none; background: #fff; border: 2px solid var(--pc, #c8973f); box-shadow: 0 1px 3px rgba(60,40,90,.25); }
#mLog p .lb { position: relative; background: #fff; border: 2px solid #e8dcc0; border-left: 4px solid var(--pc, #c8973f); border-radius: 4px 12px 12px 12px; padding: 2px 9px 3px; line-height: 1.45; box-shadow: 0 1px 3px rgba(120,90,40,.14); max-width: calc(100% - 44px); overflow-wrap: anywhere; }
#mLog p.mine { flex-direction: row-reverse; } #mLog p.mine .lb { border-left-width: 2px; border-right: 4px solid var(--pc, #c8973f); border-radius: 12px 4px 12px 12px; background: #fff9e8; }
#mLog p.in .lb { animation: logIn .35s cubic-bezier(.3,1.4,.5,1); } #mLog p.in .lf { animation: pop .35s cubic-bezier(.3,1.7,.5,1); }
#mLog:empty::before { content: 'ここに、みんなのひとことが並びます'; color: #b0a288; font-size: 12px; text-align: center; margin: auto; }
#mStage { position: relative; grid-area: f; align-self: end; display: flex; justify-content: center; align-items: flex-end; gap: 0; padding: 0 4px 2px; height: clamp(84px, 17vh, 150px); pointer-events: none; z-index: 1; }
#mStage::before { content: ''; position: absolute; left: 4%; right: 4%; bottom: 0; height: 34%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, rgba(120,110,200,.5), rgba(61,63,156,.28) 60%, rgba(61,63,156,0) 72%); }
#mStage.hide { display: none; }
#mStage .sf { position: relative; flex: 1 1 0; min-width: 0; max-width: clamp(54px, 9vmin, 84px); height: 100%; border: none; background: none; padding: 0; pointer-events: auto; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; animation: sfIn .5s calc(var(--i, 0) * 50ms + .25s) both cubic-bezier(.3,1.5,.5,1); }
@keyframes sfIn { from { opacity: 0; transform: translateY(18px) scale(.8); } }
#mStage .sf canvas { width: 118%; max-width: none; height: auto; max-height: 86%; object-fit: contain; flex: none; transform-origin: 50% 100%; animation: sfBreath 2.8s calc(var(--i, 0) * -370ms) ease-in-out infinite; filter: drop-shadow(0 0 1px rgba(43,47,107,.7)) drop-shadow(0 3px 2px rgba(40,30,90,.35)); }
@keyframes sfBreath { 50% { transform: scale(1.025, .975) rotate(calc((var(--i, 0) - 4) * .25deg)); } }
#mStage .sf small { font-size: clamp(8px, 1.5vmin, 11px); font-weight: 800; color: #fff; background: rgba(43,47,107,.78); border-radius: 8px; padding: 0 5px; max-width: 110%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; border-bottom: 2px solid var(--pc, #c8973f); }
#mStage .sf.me small { background: var(--coral); }
#mStage .sf.spk canvas { animation: sfHop .5s cubic-bezier(.3,1.8,.5,1); } @keyframes sfHop { 30% { transform: translateY(-16%) scale(1.08); } }
#mStage .sf.turn canvas { filter: drop-shadow(0 0 7px rgba(255,214,90,1)) drop-shadow(0 3px 2px rgba(40,30,90,.35)); }
#mStage .sf.sel canvas { filter: drop-shadow(0 0 6px var(--coral)) drop-shadow(0 0 2px var(--coral)); }
#mStage .sf.top canvas { filter: drop-shadow(0 0 9px #e2493f) drop-shadow(0 0 3px #e2493f); animation: topv 1s ease-in-out infinite; }
#mStage .sf.holo canvas { filter: grayscale(.5) brightness(1.2) sepia(.3) hue-rotate(150deg) drop-shadow(0 0 6px #7fd0ff); opacity: .5; }
#mStage .sf .sv { position: absolute; right: 2%; top: 4%; width: clamp(13px, 3vmin, 19px); height: clamp(13px, 3vmin, 19px); border-radius: 50%; background: var(--teal); border: 2px solid #fff; display: none; place-items: center; box-shadow: 0 2px 4px rgba(20,10,60,.3); }
#mStage .sf .sv::before { content: '✓'; color: #fff; font-size: clamp(8px, 2vmin, 12px); font-weight: 900; line-height: 1; font-style: normal; }
#mStage .sf.voted .sv { display: grid; animation: stampIn2 .3s cubic-bezier(.3,1.9,.5,1); }
/* 縦長の画面：下の段を 1 行ふやして、ひとことの並びの下に置く */
@media (max-aspect-ratio: 1/1) { #meeting { grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; grid-template-areas: "h" "f" "b" "l" "s" "c"; } #mStage { grid-area: s; align-self: auto; height: clamp(88px, 15vh, 150px); } }
/* 背の低い横長（3 列の形）：下の段は出さない */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) { #mStage { display: none; } }
/* 知らせる姿（カットイン） */
#ciBody { position: absolute; left: 3vw; top: 50%; transform: translateY(-50%); height: min(44vw, 58vh); width: auto; z-index: 2; display: none; filter: drop-shadow(0 6px 8px rgba(20,10,60,.5)) drop-shadow(0 0 14px rgba(127,208,255,.7)); animation: ciBodyIn .55s .12s both cubic-bezier(.2,.9,.3,1.35); }
@keyframes ciBodyIn { from { opacity: 0; transform: translateY(-50%) translateX(-30%) scale(.7); } }
#cutin.body #ciBody { display: block; } #cutin.body .ciFace { display: none; }
/* 転送された（自分）：届いた絵の「転送された」の姿を大きく */
#hpFig { height: clamp(150px, 38vmin, 300px); }
/* 会議の手引きの札は、下の段（乗組員の姿）に重ならないよう画面のまん中（ひとことの並びの上）へ */
body[data-scr="meeting"] #coach.mid { bottom: auto; top: 50%; }
@media (max-height: 520px) { body[data-scr="meeting"] #coach.mid { top: 40%; } }

/* ---------- 1110f：会議の顔の動き・投票の結果のまとめ ---------- */
.fc > canvas { transition: transform .12s; }
.fc.spk > canvas { animation: fcTalk .5s ease-in-out 3; } @keyframes fcTalk { 25% { transform: translateY(-3%) rotate(-2deg); } 75% { transform: translateY(1%) rotate(2deg); } }
.fc.hitv > canvas { animation: fcFlinch .32s; } @keyframes fcFlinch { 30% { transform: translateX(-5%) rotate(-5deg); } 65% { transform: translateX(4%) rotate(4deg); } }
#mStage .sf.nod canvas { animation: sfNod .4s; } @keyframes sfNod { 40% { transform: translateY(5%) scale(1.03, .95); } }
#mStage .sf.flinch canvas { animation: sfFlinch .34s; } @keyframes sfFlinch { 30% { transform: translateX(-9%) rotate(-7deg); } 65% { transform: translateX(7%) rotate(5deg); } }
#mStage .sf .sto { position: absolute; left: 50%; top: -4%; transform: translateX(-50%); display: grid; place-items: center; width: clamp(18px, 4vmin, 26px); height: clamp(18px, 4vmin, 26px); border-radius: 50%; background: #fff; border: 2px solid var(--coral); box-shadow: 0 2px 5px rgba(20,10,60,.35); font-style: normal; font-weight: 900; font-size: 12px; color: #7a6a4a; line-height: 1; animation: stampIn2 .3s cubic-bezier(.3,1.9,.5,1); z-index: 2; }
#mStage .sf .sto.skip { border-color: #b9ad90; background: #f4eedd; }
#mStage .sf .sto .vf { width: 100%; height: 100%; border-radius: 50%; border: none; }
#mStage .sf .sto::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -4px; border: 4px solid transparent; border-top-color: var(--coral); border-bottom: 0; }
#mStage .sf .sto.skip::after { border-top-color: #b9ad90; }
#mLog .vd { flex: none; margin: 4px 0 2px; padding: 6px 10px 8px; border-radius: 12px; background: linear-gradient(#fffdf6, #f6ecd4); border: 2px solid var(--brass); box-shadow: 0 2px 6px rgba(120,90,40,.2); }
#mLog .vd.in { animation: logIn .45s cubic-bezier(.3,1.4,.5,1); }
#mLog .vd > b { display: inline-block; font-size: 13px; letter-spacing: .08em; color: #fff; background: var(--navy); border-radius: 999px; padding: 0 10px; margin-right: 6px; }
#mLog .vd.out > b { background: #a3302a; }
#mLog .vd .vw { font-weight: 800; }
#mLog .vd .vr { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; }
#mLog .vd .vrow { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.75); border: 1px solid #e2d3b3; border-radius: 999px; padding: 2px 8px 2px 3px; }
#mLog .vd .vrow.skip { background: rgba(240,234,218,.8); }
#mLog .vd .vfrom { display: flex; } #mLog .vd .vfrom .vf + .vf { margin-left: -6px; }
#mLog .vd .vf { width: clamp(20px, 3.8vmin, 26px); height: clamp(20px, 3.8vmin, 26px); border-radius: 50%; background: #fff; border: 2px solid var(--pc, #c8973f); }
#mLog .vd .vf.to { border-color: #e2493f; box-shadow: 0 0 0 2px rgba(226,73,63,.25); }
#mLog .vd .var { font-style: normal; font-weight: 900; color: #a3302a; font-size: 12px; } #mLog .vd .vrow.skip .var { color: #7a6a4a; }
#mLog .vd em { font-style: normal; font-weight: 800; font-size: 12px; }
/* 会議が閉じた後の航行の画面に、投票の結果の札を 7 秒だけ */
#vdHud { position: fixed; left: 50%; top: clamp(118px, 23vh, 210px); transform: translateX(-50%); width: min(430px, calc(100vw - 20px)); z-index: 58; pointer-events: none; font-size: clamp(12px, 1.9vmin, 14px); animation: fadeUp .4s both; transition: opacity .45s; }
#vdHud.off { opacity: 0; }
#vdHud .vd { margin: 0; padding: 6px 10px 8px; border-radius: 12px; background: linear-gradient(#fffdf6, #f6ecd4); border: 2px solid var(--brass); box-shadow: 0 0 0 2px rgba(43,47,107,.35), 0 6px 16px rgba(20,10,60,.4); }
#vdHud .vd > b { display: inline-block; font-size: 13px; letter-spacing: .08em; color: #fff; background: var(--navy); border-radius: 999px; padding: 0 10px; margin-right: 6px; }
#vdHud .vd .vw { font-weight: 800; } #vdHud .vd .vr { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; }
#vdHud .vd .vrow { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.75); border: 1px solid #e2d3b3; border-radius: 999px; padding: 2px 8px 2px 3px; } #vdHud .vd .vrow.skip { background: rgba(240,234,218,.8); }
#vdHud .vd .vfrom { display: flex; } #vdHud .vd .vfrom .vf + .vf { margin-left: -6px; }
#vdHud .vd .vf { width: clamp(20px, 3.8vmin, 26px); height: clamp(20px, 3.8vmin, 26px); border-radius: 50%; background: #fff; border: 2px solid var(--pc, #c8973f); } #vdHud .vd .vf.to { border-color: #e2493f; }
#vdHud .vd .var { font-style: normal; font-weight: 900; color: #a3302a; font-size: 12px; } #vdHud .vd .vrow.skip .var { color: #7a6a4a; } #vdHud .vd em { font-style: normal; font-weight: 800; font-size: 12px; }
body[data-scr="hud"]:has(#vdHud) #coach { opacity: 0; }
@media (max-height: 520px) { #vdHud { top: 76px; width: min(380px, 56vw); } }
/* 1110h：音楽のクレジット（設定の画面の下・いつも見える） */
#setBox .note.credit { text-align: right; margin-top: 8px; font-weight: 700; white-space: nowrap; }
