/* =============================================
   バトベイ  見た目：夜のスタジアム（黒・メタル・オレンジ）
   ============================================= */
:root { --bg: #0b0d14; --panel: #161a26; --panel2: #1f2433; --line: #2d3346; --ink: #f2f4f8; --dim: #9aa3b8; --hot: #ff7a1a; --hot2: #ffb020; --cyan: #33c7ff; --red: #ff4d5e; --green: #2fd27c; --metal: linear-gradient(180deg, #f4f6fa, #aab2c0 55%, #e6e9ef);
  --display: "Dela Gothic One", "M PLUS Rounded 1c", sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: "M PLUS Rounded 1c", sans-serif; font-weight: 800; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.screen { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; }
.screen.active { display: flex; }
.btn { border: 0; border-radius: 14px; padding: 12px 14px; font-size: 16px; font-weight: 900; background: var(--panel2); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 0 rgba(0,0,0,.45); width: 100%; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.btn.hot { background: linear-gradient(180deg, #ff9a3c, #ff6a00); color: #1a0d00; box-shadow: 0 3px 0 #a33f00, 0 0 18px rgba(255,122,26,.35); }
.btn.sub { background: var(--panel2); }
.btn.lv[data-level="easy"] { background: #1f3a2c; } .btn.lv[data-level="normal"] { background: #3a3218; } .btn.lv[data-level="hard"] { background: #3d1c22; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .4; }
.mini { border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel2); padding: 6px 10px; font-size: 13px; font-weight: 900; flex-shrink: 0; white-space: nowrap; }
.mini.go { background: linear-gradient(180deg, #ff9a3c, #ff6a00); color: #1a0d00; border-color: #ff6a00; }
.mini.warn { color: var(--red); }
.mini:disabled { opacity: .35; }

/* タイトル */
#title { justify-content: center; padding: 16px; background: radial-gradient(ellipse at 50% 30%, rgba(255,122,26,.18), transparent 60%), rgba(11,13,20,.55); overflow-y: auto; }
.t-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 9px; margin: auto; }
.logo { font-family: var(--display); font-weight: 400; font-size: 64px; margin: 0; text-align: center; line-height: 1; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff 0%, #c9d1e0 45%, #7e889c 52%, #eef1f6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 14px rgba(51,199,255,.35)); }
.logo span { background: linear-gradient(180deg, #ffd27a, #ff7a1a 55%, #c94400); -webkit-background-clip: text; background-clip: text; }
.tag { text-align: center; margin: -2px 0 6px; color: var(--dim); font-size: 14px; }
.my-top { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #1b2030, #12151f); border: 1.5px solid var(--line); border-radius: 18px; padding: 10px 12px; }
.my-top canvas { width: 92px; height: 92px; flex-shrink: 0; }
.my-top > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
#t-name { margin: 0; font-size: 17px; }
.t-id { margin: 0; font-size: 12px; color: var(--dim); } .t-id:empty { display: none; } .t-id button { margin-left: 6px; border: 1px solid var(--line); background: var(--panel2); border-radius: 6px; font-size: 11px; padding: 1px 6px; }
.t-id .gone { color: var(--red); }
.label { margin: 4px 0 -2px; font-size: 13px; color: var(--dim); }
.row3 { display: flex; gap: 8px; } .row3 .btn { flex: 1; padding: 11px 4px; }
.row2 { display: flex; gap: 8px; } .row2 .btn { flex: 1; padding: 10px 4px; font-size: 14px; }
.home-link { text-align: center; color: var(--dim); font-size: 13px; margin-top: 6px; }

/* 描く */
#editor { background: var(--bg); padding: calc(6px + env(safe-area-inset-top, 0px)) 8px calc(6px + env(safe-area-inset-bottom, 0px)); gap: 6px; }
#editor > *, #setup > * { width: 100%; max-width: 520px; }
.ed-top, .su-top { display: flex; gap: 6px; align-items: center; }
.ed-title { flex: 1; font-size: 16px; }
.ed-timer { min-width: 42px; height: 36px; line-height: 32px; text-align: center; font-family: var(--display); font-weight: 400; font-size: 21px; border: 2px solid var(--hot); border-radius: 50%; color: var(--hot); }
.ed-timer[hidden] { display: none; } .ed-timer.hurry { background: var(--red); color: #fff; border-color: var(--red); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }
#editor.raku #ed-back, #editor.raku #ed-sample { display: none; }
.ed-wrap { position: relative; flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; background: #10131c; }
#ed-canvas { display: block; touch-action: none; }
.ed-sub { position: absolute; left: 6px; right: 54px; top: 6px; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; z-index: 2; }
.ed-sub:empty { display: none; } .ed-sub::-webkit-scrollbar { display: none; }
.ed-sub button { flex: 0 0 auto; border: 1.5px solid var(--line); border-radius: 10px; background: rgba(31,36,51,.95); padding: 5px 9px; font-size: 12px; }
.ed-sub button.on { background: var(--hot); color: #1a0d00; border-color: var(--hot); }
.ed-zoom { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
.ed-zoom button { border: 1.5px solid var(--line); border-radius: 10px; background: rgba(31,36,51,.92); min-width: 40px; padding: 5px; font-size: 13px; }
.ed-meter { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 8px; font-size: 12px; z-index: 2; pointer-events: none; }
.ed-meter span { background: rgba(11,13,20,.8); border-radius: 8px; padding: 2px 8px; white-space: nowrap; }
.ed-meter i { position: relative; flex: 1; height: 8px; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden; }
.ed-meter i b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); width: 0; }
.ed-meter i b.ok { background: var(--green); }
.ed-meter i em { position: absolute; left: 33%; top: -2px; bottom: -2px; width: 2px; background: #fff; }
.ed-menu { position: absolute; right: 6px; top: 6px; z-index: 5; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; }
.ed-menu[hidden] { display: none; } .ed-menu button { border: 1.5px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 9px 12px; text-align: left; } .ed-menu .warn { color: var(--red); }
.ed-tools { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ed-tools button { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel2); padding: 4px 0 3px; font-size: 10.5px; min-width: 0; white-space: nowrap; overflow: hidden; }
.ed-tools button i { font-style: normal; font-size: 17px; }
.ed-tools button.on { background: var(--hot); color: #1a0d00; border-color: var(--hot); }
.ed-tools button.sym.on { background: var(--cyan); border-color: var(--cyan); color: #00222e; }
.ed-tools button:disabled { opacity: .35; }
@media (max-width: 345px) { .ed-tools button { font-size: 9.5px; letter-spacing: -.5px; } }
.ed-paint { position: relative; display: flex; align-items: center; gap: 6px; }
.ed-colors { flex: 1; display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.ed-colors button { aspect-ratio: 1; border-radius: 50%; border: 2px solid #000; padding: 0; min-width: 0; font-size: 13px; box-shadow: 0 0 0 1px var(--line); }
.ed-colors button.on { outline: 3px solid var(--hot); outline-offset: 1px; }
.ed-colors button.free { background: conic-gradient(#ef4444, #f5b800, #22c55e, #3b82f6, #8b5cf6, #ef4444); }
#ed-color-in { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ed-size-btn { flex: 0 0 38px; height: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel2); display: flex; align-items: center; justify-content: center; padding: 0; }
.ed-size-btn i { display: block; border-radius: 50%; border: 1.5px solid #fff; }
.ed-size { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 6; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.ed-size[hidden] { display: none; } .ed-size input { flex: 1; accent-color: var(--hot); }

/* 設定 */
#setup { background: var(--bg); padding: calc(6px + env(safe-area-inset-top, 0px)) 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
.su-top { justify-content: space-between; margin-bottom: 6px; }
.su-body { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 2px 20px; display: flex; flex-direction: column; gap: 8px; }
.su-head { display: flex; gap: 12px; align-items: center; }
.su-head canvas { width: 110px; height: 110px; flex-shrink: 0; }
.su-head > div { flex: 1; min-width: 0; }
#setup h3 { margin: 8px 0 0; font-size: 15px; } #setup h3 small { font-size: 11px; color: var(--dim); font-weight: 800; }
#su-left { color: var(--hot); font-size: 16px; }
.pts { display: flex; flex-direction: column; gap: 6px; }
.pt { display: grid; grid-template-columns: 52px 36px 1fr 36px; align-items: center; gap: 6px; }
.pt span { font-size: 14px; } .pt button { height: 32px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel2); font-size: 18px; padding: 0; }
.pt .bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; height: 18px; }
.pt .bar i { background: rgba(255,255,255,.08); border-radius: 3px; } .pt .bar i.on { background: var(--c, var(--hot)); box-shadow: 0 0 6px var(--c, var(--hot)); }
.pick3, .pick2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .pick2 { grid-template-columns: 1fr 1fr; }
.pick3 button, .pick2 button { border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel2); padding: 8px 4px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.pick3 button small { font-size: 9.5px; color: var(--dim); font-weight: 800; line-height: 1.3; }
.pick3 button.on, .pick2 button.on { border-color: var(--hot); background: #3a2410; box-shadow: 0 0 10px rgba(255,122,26,.35); }
.lock-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); } .lock-row input { flex: 1; accent-color: var(--hot); }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.skills button { border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel2); padding: 8px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.skills button b { font-size: 14px; } .skills button small { font-size: 10.5px; color: var(--dim); font-weight: 800; }
.skills button.on { border-color: var(--cyan); background: #0f2a36; box-shadow: 0 0 10px rgba(51,199,255,.3); }
.field-l { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); text-align: left; }
.field-l input, .id-row input { font: inherit; font-size: 17px; font-weight: 900; color: var(--ink); background: var(--panel2); border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; outline: none; -webkit-user-select: text; user-select: text; width: 100%; }
.field-l input:focus, .id-row input:focus { border-color: var(--hot); }
.hint { margin: 0; font-size: 12px; color: var(--dim); font-weight: 500; line-height: 1.6; } .hint:empty { display: none; } .hint.warn { color: var(--hot2); font-weight: 800; }
.err { margin: 0; font-size: 13px; color: var(--red); } .err:empty { display: none; }

/* たたかう */
#battle { pointer-events: none; }
#battle > * { pointer-events: auto; }
.hud { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 0; pointer-events: none !important; }
.hud .side { display: flex; align-items: center; gap: 6px; background: linear-gradient(180deg, rgba(22,26,38,.92), rgba(22,26,38,.75)); border: 1.5px solid var(--line); border-radius: 14px; padding: 5px 8px; min-width: 0; flex: 1; max-width: 220px; }
.hud .side.s1 { justify-content: flex-end; text-align: right; }
.hud .side canvas { width: 40px; height: 40px; flex-shrink: 0; }
.hud .side > div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hud .side b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s0 { border-color: rgba(51,199,255,.6) !important; } .s1 { border-color: rgba(255,77,94,.6) !important; }
.pips { display: flex; gap: 3px; } .s1 .pips { justify-content: flex-end; }
.pips i { width: 14px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); } .pips i.on { background: var(--hot2); box-shadow: 0 0 6px var(--hot2); }
.spin { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; } .spin b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--cyan), #9be7ff); } .s1 .spin b { background: linear-gradient(90deg, #ff9aa4, var(--red)); margin-left: auto; }
.hud .mid { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: auto; }
.round { font-family: var(--display); font-weight: 400; font-size: 15px; background: rgba(11,13,20,.8); border-radius: 10px; padding: 2px 10px; white-space: nowrap; }
.watchers { font-size: 11px; background: rgba(11,13,20,.8); border-radius: 8px; padding: 1px 7px; } .watchers[hidden] { display: none; }
.big { position: fixed; left: 0; right: 0; top: 34%; text-align: center; font-family: var(--display); font-weight: 400; font-size: min(54px, 10.5vw); white-space: nowrap; color: #fff; text-shadow: 0 4px 0 #000, 0 0 24px rgba(255,122,26,.7); opacity: 0; transform: scale(.7); transition: .18s; pointer-events: none !important; line-height: 1.15; }
.big.show { opacity: 1; transform: scale(1); }
.big small { display: block; font-family: "M PLUS Rounded 1c", sans-serif; font-weight: 900; font-size: 18px; text-shadow: 0 2px 0 #000; }
.big.red { text-shadow: 0 4px 0 #000, 0 0 24px rgba(255,77,94,.9); } .big.cyan { text-shadow: 0 4px 0 #000, 0 0 24px rgba(51,199,255,.9); }
.aim-tip { position: fixed; left: 50%; bottom: 26%; transform: translateX(-50%); background: rgba(11,13,20,.85); border: 1.5px solid var(--cyan); border-radius: 12px; padding: 6px 14px; font-size: 13px; pointer-events: none !important; white-space: nowrap; }
.aim-tip[hidden] { display: none; }
.watch-tag { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); background: var(--cyan); color: #00222e; border-radius: 8px; padding: 2px 12px; font-size: 13px; pointer-events: none !important; } .watch-tag[hidden] { display: none; }
.launch { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.launch[hidden] { display: none; }
.gauge { position: relative; width: min(78vw, 360px); height: 18px; border-radius: 9px; background: rgba(255,255,255,.12); border: 1.5px solid var(--line); overflow: hidden; }
.gauge i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--cyan), var(--hot2) 70%, var(--red)); }
.gauge .z-good { position: absolute; left: calc(82% / 1.3); width: calc(14% / 1.3); top: 0; bottom: 0; border: 2px solid #fff; border-radius: 4px; }
.gauge .z-over { position: absolute; left: calc(100% / 1.3); right: 0; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(255,77,94,.35) 0 6px, transparent 6px 12px); }
#b-hold { width: 128px; height: 128px; border-radius: 50%; border: 4px solid #fff; background: radial-gradient(circle at 40% 35%, #ffb55c, #ff6a00 60%, #b84400); color: #1a0d00; font-size: 17px; font-weight: 900; box-shadow: 0 6px 0 #6b2700, 0 0 30px rgba(255,122,26,.5); touch-action: none; }
#b-hold.on { transform: scale(.94); box-shadow: 0 2px 0 #6b2700, 0 0 50px rgba(255,180,60,.9); }
.skill-btn { position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 96px; height: 96px; border: 0; background: rgba(11,13,20,.85); border-radius: 50%; padding: 0; }
.skill-btn[hidden] { display: none; }
.skill-btn svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.skill-btn .bg { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 8; } .skill-btn .fg { fill: none; stroke: var(--cyan); stroke-width: 8; stroke-dasharray: 276.5; stroke-dashoffset: 276.5; stroke-linecap: round; }
.skill-btn span { position: relative; font-size: 15px; font-weight: 900; }
.skill-btn.ready { background: radial-gradient(circle, #1a6b8f, #0b2b3a); animation: glow .6s infinite alternate; } .skill-btn.used { opacity: .35; }
@keyframes glow { to { box-shadow: 0 0 26px rgba(51,199,255,.9); } }
.cheer-bar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 6px; background: rgba(22,26,38,.92); border: 1.5px solid var(--line); border-radius: 16px; padding: 6px 8px; }
.cheer-bar[hidden] { display: none; } .cheer-bar.in-card { position: static; transform: none; justify-content: center; }
.cheer-bar button { font-size: 26px; background: none; border: 0; padding: 3px; } .cheer-bar button:active { transform: scale(1.3); }
.cheer-pop { position: absolute; bottom: 120px; display: flex; flex-direction: column; align-items: center; animation: cheerUp 2.2s ease-out forwards; }
.cheer-pop span { font-size: 38px; } .cheer-pop small { font-size: 10px; background: rgba(11,13,20,.85); border-radius: 6px; padding: 0 5px; }
@keyframes cheerUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { transform: translateY(-30px) scale(1.15); opacity: 1; } 100% { transform: translateY(-260px); opacity: 0; } }

/* カード（重なる画面） */
.overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(5,6,10,.6); z-index: 20; padding: 14px; }
.overlay.show { display: flex; }
.card { background: linear-gradient(180deg, #1c2130, #141824); border: 1.5px solid var(--line); border-radius: 22px; padding: 18px; width: 100%; max-width: 400px; max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 10px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.card h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; }
.card h2.win { color: var(--hot2); text-shadow: 0 0 18px rgba(255,176,32,.6); } .card h2.lose { color: #8fb3ff; }
.card p { margin: 0; font-size: 14px; white-space: pre-line; }
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stages button { border: 2px solid var(--line); border-radius: 14px; background: var(--panel2); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stages button canvas { width: 100%; height: auto; aspect-ratio: 1; }
.stages button b { font-size: 13px; } .stages button small { font-size: 10px; color: var(--dim); font-weight: 800; line-height: 1.35; }
.stages button.on { border-color: var(--hot); background: #3a2410; box-shadow: 0 0 14px rgba(255,122,26,.4); }
.stages button .votes { font-size: 12px; color: var(--hot2); min-height: 16px; }
.stages button.win { border-color: var(--hot2); transform: scale(1.06); }
.vote-time { height: 6px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; } .vote-time i { display: block; height: 100%; background: var(--hot); width: 100%; }
.vs-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.vs-row figure { margin: 0; } .vs-row canvas { width: 104px; height: 104px; } .vs-row figcaption { font-size: 12px; } .vs-row b { font-family: var(--display); font-weight: 400; color: var(--hot); }
.mode-pick { display: flex; gap: 6px; }
.mode-pick button { flex: 1; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel2); padding: 9px 4px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.mode-pick button small { font-size: 10px; color: var(--dim); font-weight: 800; } .mode-pick button.on { border-color: var(--hot); background: #3a2410; }
.wait-code b { color: var(--hot); font-size: 18px; } .wait-msg { color: var(--dim); }
.dw-timer { align-self: center; width: 110px; height: 110px; border-radius: 50%; border: 3px solid var(--hot); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 52px; color: var(--hot); }
.reveal-ov { background: rgba(5,6,10,.94); z-index: 25; }
.reveal { text-align: center; } .rv-say { font-family: var(--display); font-size: 52px; margin: 0 0 18px; }
.rv-row { display: flex; align-items: center; gap: 12px; justify-content: center; }
.rv-row figure { margin: 0; transform: rotateY(90deg) scale(.6); transition: transform .45s cubic-bezier(.2,1.4,.4,1); } .rv-row canvas { width: min(36vw, 150px); height: auto; } .rv-row figcaption { font-size: 13px; }
.rv-row b { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--hot); }
.reveal.open figure { transform: none; } .reveal.open figure:last-child { transition-delay: .12s; }
.mini-prev { align-self: center; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; text-align: left; } .chk input { width: 22px; height: 22px; accent-color: var(--hot); } .chk[hidden] { display: none; }
.big-id { font-family: var(--display); font-size: 32px !important; letter-spacing: 3px; color: var(--hot); border: 2px dashed var(--hot); border-radius: 12px; padding: 6px; -webkit-user-select: all; user-select: all; }
.id-row { display: flex; gap: 8px; } .id-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 2px; } .id-row .btn { width: auto; padding: 8px 16px; }
.my-ids { display: flex; flex-direction: column; gap: 6px; text-align: left; } .my-ids:empty { display: none; } .my-ids p { font-size: 12px; color: var(--dim); }
.my-ids button { display: flex; justify-content: space-between; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel2); padding: 7px 10px; font-size: 13px; } .my-ids button b { color: var(--hot); letter-spacing: 1px; } .my-ids button.gone { opacity: .5; } .my-ids button em { color: var(--red); font-style: normal; font-size: 11px; }
.cd-meta { font-size: 12px !important; color: var(--dim); } .cd-small { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.card.gal { max-width: 460px; height: 100%; }
.gal-tabs { display: flex; gap: 6px; } .gal-tabs button { flex: 1; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel2); padding: 7px; font-size: 13px; } .gal-tabs button.on { border-color: var(--hot); background: #3a2410; }
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex: 1; min-height: 0; overflow: auto; align-content: start; }
.gal-grid button { border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel2); padding: 5px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gal-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; } .gal-grid b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gal-grid small { font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.howto ul { text-align: left; padding-left: 18px; margin: 0; font-size: 13px; font-weight: 500; line-height: 1.6; color: #d6dbe6; } .howto li { margin-bottom: 6px; } .howto b { color: var(--hot2); }
.toast { position: fixed; left: 50%; bottom: 140px; transform: translate(-50%, 20px); background: rgba(22,26,38,.96); border: 1.5px solid var(--hot); color: #fff; padding: 8px 16px; border-radius: 12px; font-size: 13px; opacity: 0; transition: .25s; pointer-events: none; z-index: 40; max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- インパクト演出 ---- */
.flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none !important; z-index: 40; mix-blend-mode: screen; }
.flash.on { animation: flash .38s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.vignette { position: fixed; inset: 0; pointer-events: none !important; opacity: 0; transition: opacity .6s; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(120,0,20,.55) 100%); }
.vignette.on { opacity: 1; animation: beat .8s infinite; }
@keyframes beat { 0%, 100% { opacity: .65; } 12% { opacity: 1; } 30% { opacity: .75; } 42% { opacity: .95; } }
.fx-layer { position: fixed; inset: 0; pointer-events: none !important; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); white-space: nowrap; color: #fff; text-shadow: 0 3px 0 #000, 0 0 14px rgba(255,170,40,.9); animation: pop .75s ease-out forwards; }
.pop.t2 { font-size: 26px; } .pop.t3 { font-size: 40px; color: #ffe27a; } .pop.t4 { font-size: 60px; color: #ff9b3d; text-shadow: 0 4px 0 #000, 0 0 26px rgba(255,80,20,1); }
.pop.grd { font-size: 18px; color: #ffd1f0; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255,80,200,.9); animation-duration: .5s; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15) rotate(-4deg); } 30% { transform: translate(-50%, -62%) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translate(-50%, -110%) scale(1) rotate(-4deg); } }
.spin-lbl { position: absolute; transform: translate(-50%, -100%); font-family: var(--display); font-size: 22px; text-shadow: 0 2px 0 #000; padding: 0 8px; border-radius: 10px; background: rgba(11,13,20,.6); }
.spin-lbl.me { color: var(--cyan); } .spin-lbl.op { color: #ff6b7a; }
.combo { position: fixed; left: 12px; top: calc(78px + env(safe-area-inset-top, 0px)); font-family: var(--display); font-size: 30px; color: #ffd166; text-shadow: 0 3px 0 #000, 0 0 16px rgba(255,140,30,.9); opacity: 0; transform: scale(.6); transition: .12s; pointer-events: none !important; }
.combo.show { opacity: 1; transform: scale(1); } .combo small { font-size: 16px; margin-left: 2px; }
.combo.bump { animation: cbump .2s; } @keyframes cbump { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.final-tag { position: fixed; left: 0; right: 0; top: calc(84px + env(safe-area-inset-top, 0px)); text-align: center; font-family: var(--display); font-size: min(40px, 9vw); color: #ff5d73; text-shadow: 0 3px 0 #000, 0 0 18px rgba(255,40,80,.9); opacity: 0; pointer-events: none !important; transition: opacity .4s; }
.final-tag.on { opacity: 1; animation: ftag .8s infinite; } @keyframes ftag { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.08); } }
.tap-hint { position: fixed; left: 12px; right: 124px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); text-align: left; font-size: 13px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #000; pointer-events: none !important; animation: hintb 1s infinite alternate; }
.tap-hint[hidden] { display: none; } @keyframes hintb { from { opacity: .55; } to { opacity: 1; } }
.tap-ring { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 3px solid var(--cyan); border-radius: 50%; animation: tapr .45s ease-out forwards; }
@keyframes tapr { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.tap-plus { position: absolute; transform: translate(-50%, -50%); font-weight: 900; color: var(--cyan); font-size: 15px; text-shadow: 0 2px 0 #000; animation: pop .6s ease-out forwards; }

.call { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -8px) scale(.9); white-space: nowrap; font-weight: 900; font-size: min(20px, 4.6vw); color: #fff; background: rgba(11,13,20,.82); border: 2px solid #ffd23f; border-radius: 999px; padding: 4px 16px; opacity: 0; transition: .18s; pointer-events: none !important; z-index: 6; }
.call.show { opacity: 1; transform: translate(-50%, 0) scale(1); } .call.red { border-color: #ff5d73; } .call.cyan { border-color: var(--cyan); }
.replay-tag { position: fixed; left: 14px; top: calc(70px + env(safe-area-inset-top, 0px)); font-family: var(--display); font-size: 26px; color: #fff; background: #e11d48; padding: 2px 14px; border-radius: 6px; letter-spacing: .1em; pointer-events: none !important; animation: rp 1s infinite; }
.replay-tag[hidden] { display: none; } @keyframes rp { 50% { opacity: .55; } }
.pop.crit { font-size: 64px; color: #fff36b; text-shadow: 0 4px 0 #000, 0 0 30px rgba(255,200,40,1); }
.pop.miss { font-size: 30px; color: #ff6b7a; } .pop.crk { font-size: 22px; color: #ffb4b4; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255,40,40,.9); }

/* ことばの切りかえ */
.langs{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:2px}
.langs button{font:800 13px 'M PLUS Rounded 1c',sans-serif;background:transparent;color:var(--dim);border:1.5px solid var(--line);border-radius:999px;padding:4px 12px;cursor:pointer}
.langs button[aria-pressed="true"]{background:var(--hot);color:#1a0d00;border-color:var(--hot)}
/* 韓国語は題字・大きい文字に Black Han Sans */
html[data-lang="ko"]{--display:"Black Han Sans","Dela Gothic One",sans-serif}
/* 中国語：M PLUS にない字は丸ゴシックの Chiron GoRound TC で */
html[data-lang="zh"] body, html[data-lang="zh"] .big small{font-family:"M PLUS Rounded 1c","Chiron GoRound TC",sans-serif}
html[data-lang="zh"]{--display:"Dela Gothic One","Chiron GoRound TC",sans-serif}
html[data-lang="ko"] body, html[data-lang="ko"] .big small, html[data-lang="ko"] .langs button{font-family:"Jua","M PLUS Rounded 1c",sans-serif;font-weight:400}
html[data-lang="ko"] .btn, html[data-lang="ko"] .mini, html[data-lang="ko"] input{font-weight:400}
html[data-lang="en"] .logo{font-size:min(60px,13vw)}
