:root {
  --bg: #02030a;
  --panel: rgba(8, 12, 30, 0.78);
  --panel-line: rgba(110, 140, 255, 0.22);
  --text: #e6f0ff;
  --muted: #8a97c0;
  --cyan: #5ef2ff;
  --pink: #ff4fd8;
  --lime: #9dff4f;
  --accent: #5ef2ff;
  --font-d: 'Orbitron', 'Noto Sans JP', sans-serif;
  --font-b: 'Noto Sans JP', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-b); overflow: hidden; }
body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input[type=text] { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; }
kbd { font-family: var(--font-d); }

#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }

.screen { position: fixed; inset: 0; display: none; z-index: 2; }
.screen.active { display: flex; }

/* ---------- タイトル ---------- */
#title { align-items: center; justify-content: center; text-align: center; }
.title-inner { padding: 16px; }
.logo-big { font-family: var(--font-d); font-weight: 900; line-height: 0.95; letter-spacing: 0.06em; }
.logo-big span { display: block; font-size: clamp(22px, 5vw, 44px); color: var(--muted); letter-spacing: 0.5em; margin-right: -0.5em; }
.logo-big b { display: block; font-size: clamp(56px, 14vw, 150px); color: #fff; text-shadow: 0 0 18px var(--cyan), 0 0 50px rgba(94, 242, 255, 0.5), 4px 0 0 rgba(255, 79, 216, 0.6); }
.tagline { font-family: var(--font-d); letter-spacing: 0.6em; color: var(--cyan); font-size: 12px; margin: 18px 0 40px; opacity: 0.8; }
.keys-hint { margin-top: 28px; display: flex; gap: 10px; justify-content: center; }
.keys-hint kbd, .foot-hint kbd { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--panel-line); border-radius: 8px; background: rgba(10, 16, 40, 0.7); color: var(--cyan); font-weight: 700; }

.btn-glow, .btn-line {
  font-family: var(--font-d); font-weight: 700; letter-spacing: 0.12em; font-size: 15px;
  padding: 14px 28px; border-radius: 10px; transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.btn-glow { border: 1px solid var(--accent); background: rgba(94, 242, 255, 0.12); color: #fff; box-shadow: 0 0 18px rgba(94, 242, 255, 0.35), inset 0 0 12px rgba(94, 242, 255, 0.2); }
.btn-glow:hover { background: rgba(94, 242, 255, 0.25); transform: translateY(-1px); }
.btn-line { border: 1px solid var(--panel-line); background: rgba(10, 14, 34, 0.7); }
.btn-line:hover { border-color: var(--accent); }
.btn-glow small, .btn-line small { opacity: 0.55; font-size: 10px; margin-left: 6px; }
#btn-start { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 34px rgba(94, 242, 255, 0.7), inset 0 0 18px rgba(94, 242, 255, 0.3); } }

/* ---------- 選曲 ---------- */
#select { flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; }
.logo-small { font-family: var(--font-d); font-weight: 800; letter-spacing: 0.12em; font-size: 16px; color: var(--muted); }
.logo-small b { color: #fff; text-shadow: 0 0 10px var(--cyan); }
.spacer { flex: 1; }
.chip { display: flex; align-items: center; gap: 6px; border: 1px solid var(--panel-line); background: var(--panel); border-radius: 999px; padding: 8px 14px; font-size: 13px; backdrop-filter: blur(6px); }
.chip:hover { border-color: var(--accent); }
.chip .ico { color: var(--accent); }

.select-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 440px); gap: 18px; padding: 0 20px 8px; }
.song-list { overflow-y: auto; overflow-x: hidden; padding: 4px 16px 20px 2px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: #2a3570 transparent; }
.song-card {
  position: relative; text-align: left; border: 1px solid var(--panel-line); background: var(--panel); border-radius: 12px;
  padding: 14px 16px 14px 20px; backdrop-filter: blur(6px); transition: transform 0.15s, border-color 0.15s, background 0.15s;
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; max-width: 620px;
}
.song-card::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, var(--cyan)); box-shadow: 0 0 10px var(--c, var(--cyan)); }
.song-card:hover { border-color: rgba(160, 180, 255, 0.45); }
.song-card.sel { transform: translateX(10px); border-color: var(--c); background: rgba(14, 20, 50, 0.88); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 30%, transparent); }
.song-card .sc-title { font-family: var(--font-d); font-weight: 700; font-size: 17px; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-card .sc-sub { font-size: 12px; color: var(--muted); grid-column: 1; }
.song-card .sc-lv { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; }
.lv { font-family: var(--font-d); font-size: 12px; font-weight: 700; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; border: 1px solid currentColor; position: relative; }
.lv.easy { color: #6dffb0; } .lv.normal { color: #ffd25e; } .lv.hard { color: #ff5a8a; }
.lv .mark { position: absolute; top: -7px; right: -7px; font-size: 8px; background: #000; padding: 1px 3px; border-radius: 4px; border: 1px solid currentColor; }
.song-card.upload { grid-template-columns: 1fr; border-style: dashed; color: var(--muted); }
.song-card.upload::before { background: var(--muted); box-shadow: none; }
.song-card.upload .sc-title { font-size: 14px; color: var(--text); }

.detail {
  border: 1px solid var(--panel-line); background: var(--panel); border-radius: 16px; padding: 22px; backdrop-filter: blur(8px);
  display: flex; flex-direction: column; min-height: 0; overflow-y: auto;
}
.d-genre { font-family: var(--font-d); font-size: 11px; letter-spacing: 0.35em; color: var(--accent); }
.d-title { font-family: var(--font-d); font-size: 30px; margin: 6px 0 4px; line-height: 1.15; word-break: break-word; text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 50%, transparent); }
.d-meta { color: var(--muted); font-size: 13px; }
.diffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 12px; }
.diff-btn { border: 1px solid var(--panel-line); background: rgba(6, 10, 26, 0.8); border-radius: 10px; padding: 10px 4px; font-family: var(--font-d); text-align: center; }
.diff-btn .dn { font-size: 11px; letter-spacing: 0.15em; font-weight: 700; }
.diff-btn .dl { font-size: 24px; font-weight: 800; }
.diff-btn .dc { font-size: 10px; color: var(--muted); font-family: var(--font-b); }
.diff-btn.sel { border-color: currentColor; box-shadow: 0 0 14px color-mix(in srgb, currentColor 40%, transparent), inset 0 0 14px color-mix(in srgb, currentColor 15%, transparent); }
.diff-btn.easy { color: #6dffb0; } .diff-btn.normal { color: #ffd25e; } .diff-btn.hard { color: #ff5a8a; }
.best { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; font-family: var(--font-d); padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); min-height: 56px; }
.best .b-rank { font-size: 28px; font-weight: 900; grid-row: span 2; min-width: 52px; text-align: center; }
.best .b-score { font-size: 20px; font-weight: 700; }
.best .b-sub { font-size: 11px; color: var(--muted); font-family: var(--font-b); }
.best .b-badges { grid-row: span 2; display: flex; gap: 4px; }
.badge { font-family: var(--font-d); font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 5px; letter-spacing: 0.08em; }
.badge.fc { background: #ffd25e; color: #1a1200; }
.badge.ap { background: linear-gradient(90deg, #5ef2ff, #ff4fd8); color: #000; }
.best.none { color: var(--muted); font-family: var(--font-b); font-size: 13px; display: flex; }

.btn-play {
  margin: 14px 0 16px; padding: 16px; border-radius: 12px; border: 1px solid var(--accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 25%, transparent), color-mix(in srgb, var(--accent) 8%, transparent));
  font-family: var(--font-d); font-weight: 900; font-size: 22px; letter-spacing: 0.3em; display: flex; justify-content: center; align-items: baseline; gap: 12px;
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform 0.12s;
}
.btn-play:hover { transform: scale(1.015); }
.btn-play small { font-size: 10px; letter-spacing: 0.2em; opacity: 0.6; font-weight: 600; }
.btn-play.wait { opacity: 0.6; }

.ranking { flex: 1; min-height: 120px; display: flex; flex-direction: column; }
.rank-head { display: flex; align-items: center; }
.rank-head h3 { font-family: var(--font-d); font-size: 12px; letter-spacing: 0.25em; color: var(--muted); margin: 0; flex: 1; }
.mini { border: 1px solid var(--panel-line); background: transparent; border-radius: 6px; width: 26px; height: 26px; color: var(--muted); }
.rank-list { list-style: none; margin: 8px 0 0; padding: 0; overflow-y: auto; font-size: 13px; }
.rank-list li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid rgba(110, 140, 255, 0.1); }
.rank-list li.me { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 6px; }
.rank-list .rk { font-family: var(--font-d); font-weight: 800; color: var(--muted); text-align: center; }
.rank-list li:nth-child(1) .rk { color: #ffd25e; } .rank-list li:nth-child(2) .rk { color: #d6e0ff; } .rank-list li:nth-child(3) .rk { color: #ff9a5c; }
.rank-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .sc { font-family: var(--font-d); font-weight: 700; }
.rank-list .empty { display: block; color: var(--muted); border: 0; padding: 12px 4px; }
.foot-hint { text-align: center; font-size: 12px; color: var(--muted); padding: 6px 12px 12px; }

.drop-veil { position: fixed; inset: 12px; border: 2px dashed var(--accent); border-radius: 20px; display: none; place-items: center; font-size: 20px; background: rgba(2, 3, 10, 0.75); z-index: 20; font-weight: 700; }
.drop-veil.on { display: grid; }

/* ---------- リザルト ---------- */
#result { align-items: center; justify-content: center; padding: 16px; background: rgba(2, 3, 10, 0.45); }
.result-panel { width: min(680px, 100%); max-height: 100%; overflow-y: auto; border: 1px solid var(--panel-line); background: var(--panel); border-radius: 18px; padding: 24px; backdrop-filter: blur(10px); animation: rise 0.5s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.r-song { font-family: var(--font-d); font-weight: 700; font-size: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.r-diff { font-size: 11px; letter-spacing: 0.2em; padding: 3px 8px; border: 1px solid currentColor; border-radius: 6px; }
.r-main { display: flex; gap: 22px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.r-rank { font-family: var(--font-d); font-weight: 900; font-size: 96px; line-height: 1; min-width: 140px; text-align: center; color: #fff; text-shadow: 0 0 24px var(--accent), 0 0 60px var(--accent); animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop { from { transform: scale(2.2); opacity: 0; } }
.r-scorebox { flex: 1; min-width: 220px; }
.r-new { font-family: var(--font-d); font-size: 12px; letter-spacing: 0.3em; color: #ffd25e; text-shadow: 0 0 10px #ffd25e; visibility: hidden; }
.r-new.on { visibility: visible; animation: blink 0.8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
.r-score { font-family: var(--font-d); font-weight: 800; font-size: clamp(36px, 8vw, 54px); letter-spacing: 0.04em; }
.r-badges { display: flex; gap: 6px; min-height: 22px; margin: 4px 0; }
.r-badges .badge { font-size: 13px; padding: 4px 10px; }
.r-acc { font-family: var(--font-d); font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.r-acc b { color: var(--text); }
.r-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.r-counts div { background: rgba(0, 0, 0, 0.3); border-radius: 10px; padding: 10px; text-align: center; font-family: var(--font-d); }
.r-counts small { display: block; font-size: 10px; letter-spacing: 0.12em; font-weight: 700; }
.r-counts b { font-size: 22px; }
.r-counts .fs { grid-column: 1 / -1; font-size: 12px; color: var(--muted); background: none; padding: 0; }
.r-online { margin-top: 14px; font-size: 13px; }
.r-online .rank-list { max-height: 170px; }
.r-online .r-msg { color: var(--muted); }
.r-online .r-myrank { font-family: var(--font-d); font-weight: 800; font-size: 16px; color: var(--accent); }
.r-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ---------- オーバーレイ ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; background: rgba(2, 3, 10, 0.72); backdrop-filter: blur(4px); padding: 16px; }
.overlay.on { display: flex; }
.pause-box { display: flex; flex-direction: column; gap: 12px; min-width: 240px; text-align: center; }
.pause-box h2, .modal-box h2 { font-family: var(--font-d); letter-spacing: 0.3em; margin: 0 0 10px; }
#loading { flex-direction: column; gap: 14px; font-family: var(--font-d); letter-spacing: 0.3em; color: var(--accent); }
.scanner { width: 220px; height: 4px; background: rgba(94, 242, 255, 0.15); border-radius: 4px; overflow: hidden; }
.scan-bar { width: 40%; height: 100%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: scan 1s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.modal-box { width: min(520px, 100%); max-height: 100%; overflow-y: auto; border: 1px solid var(--panel-line); background: rgba(8, 12, 30, 0.95); border-radius: 16px; padding: 22px; }
.modal-box.narrow { width: min(400px, 100%); }
.row { display: grid; grid-template-columns: 120px 1fr 56px; gap: 10px; align-items: center; padding: 8px 0; font-size: 14px; }
.row input[type=text] { grid-column: 2 / span 2; }
.row output { font-family: var(--font-d); font-size: 12px; text-align: right; color: var(--accent); }
input[type=range] { accent-color: var(--cyan); width: 100%; }
input[type=text] { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--panel-line); color: var(--text); border-radius: 8px; padding: 10px 12px; font: inherit; width: 100%; }
input[type=text]:focus { outline: none; border-color: var(--accent); }
.preview-wrap { margin: 8px 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--panel-line); }
#s-preview { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.muted { color: var(--muted); font-size: 13px; }
#name-input { margin: 8px 0; font-size: 18px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: rgba(10, 16, 40, 0.95); border: 1px solid var(--panel-line); padding: 10px 16px; border-radius: 10px; font-size: 13px; opacity: 0; transition: 0.25s; z-index: 40; pointer-events: none; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

body.playing .screen { display: none !important; }
.btn-pause-game {
  display: none; position: fixed; z-index: 10; top: calc(60px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left));
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--panel-line); background: rgba(8, 12, 30, 0.6);
  color: var(--muted); font-size: 13px; letter-spacing: -2px;
}
body.playing .btn-pause-game { display: block; }
body.touch .foot-hint, body.touch .keys-hint { display: none; }
.screen { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

@media (max-width: 760px) {
  .select-body { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow-y: auto; padding: 0 12px 16px; gap: 12px; align-content: start; }
  .song-list { overflow: visible; flex-direction: row; overflow-x: auto; padding: 4px 2px 8px; gap: 8px; scroll-snap-type: x mandatory; }
  .song-card { min-width: 210px; padding: 10px 12px 10px 16px; scroll-snap-align: start; }
  .song-card .sc-title { font-size: 15px; }
  .song-card .sc-lv { grid-row: auto; grid-column: 1; margin-top: 6px; }
  .song-card .lv { width: 24px; height: 24px; font-size: 11px; }
  .song-card.sel { transform: translateY(-2px); }
  .song-card.upload { min-width: 170px; }
  .detail { padding: 16px; }
  .d-title { font-size: 24px; }
  .diffs { margin: 12px 0 10px; }
  .btn-play { padding: 18px; margin: 12px 0; }
  .rank-list { max-height: none; overflow: visible; }
  .result-panel { padding: 18px; }
  .r-main { gap: 8px; margin: 10px 0; }
  .r-counts b { font-size: 18px; }
  .r-buttons button { flex: 1; }
  .pause-box button { padding: 18px 28px; }
  .detail { overflow: visible; }
  .topbar { padding: 12px 16px; }
  .foot-hint { display: none; }
  .row { grid-template-columns: 96px 1fr 48px; }
  .r-rank { font-size: 72px; min-width: 100px; }
}

/* ---------- ナビ・コイン ---------- */
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav-btn { position: relative; }
.coin-ico { color: #ffd25e; font-weight: 700; margin-right: 3px; }
.coin-chip { font-family: var(--font-d); font-weight: 700; }
.badge-dot { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff4f6e; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; font-family: var(--font-d); }
.badge-dot[hidden] { display: none; }
.team-fx-mini { font-size: 12px; color: var(--muted); margin: -6px 0 12px; text-align: center; }
.link-btn { background: none; border: 0; color: var(--accent); text-decoration: underline; padding: 0; }
.small { font-size: 12px; }

/* ---------- アカウント ---------- */
.acc-tabs, .q-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.acc-tab, .q-tab { position: relative; flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--panel-line); background: rgba(0, 0, 0, 0.3); font-weight: 700; }
.acc-tab.sel, .q-tab.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.f-row { display: block; margin-bottom: 10px; font-size: 13px; }
.f-row span { display: block; color: var(--muted); margin-bottom: 4px; }
.f-row input { width: 100%; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--panel-line); color: var(--text); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 16px; -webkit-user-select: text; user-select: text; }
.f-row input:focus { outline: none; border-color: var(--accent); }
.f-row[hidden] { display: none; }
.acc-msg { color: #ff8a9a; font-size: 13px; min-height: 1em; margin: 4px 0; }
.acc-who { font-family: var(--font-d); font-size: 24px; font-weight: 800; margin: 8px 0 4px; }
#acc-in[hidden], #acc-out[hidden] { display: none; }
.row.check input { width: 22px; height: 22px; accent-color: var(--cyan); justify-self: start; }

/* ---------- メタ画面共通 ---------- */
.screen.meta { flex-direction: column; background: rgba(2, 3, 10, 0.55); }
.meta-title { font-family: var(--font-d); letter-spacing: 0.3em; margin: 0 0 0 8px; font-size: 18px; }
.meta-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 24px; width: min(900px, 100%); margin: 0 auto; }

/* クエスト */
.quest-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.quest { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--panel-line); background: var(--panel); }
.quest.ready { border-color: #ffd25e; box-shadow: 0 0 14px rgba(255, 210, 94, 0.2); }
.quest.claimed { opacity: 0.5; }
.q-title { font-weight: 700; font-size: 14px; }
.q-bar { height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; margin: 6px 0 3px; overflow: hidden; }
.q-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.quest.ready .q-bar span { background: #ffd25e; }
.q-prog { font-size: 11px; color: var(--muted); font-family: var(--font-d); }
.q-reward { font-family: var(--font-d); font-weight: 700; }
.q-claim { padding: 8px 12px; border-radius: 8px; border: 1px solid #ffd25e; background: rgba(255, 210, 94, 0.15); font-weight: 700; font-size: 13px; min-width: 76px; }
.q-claim[disabled] { border-color: var(--panel-line); background: transparent; color: var(--muted); cursor: default; }

/* ガチャ */
.gacha-banner { text-align: center; padding: 26px 16px; border-radius: 18px; border: 1px solid var(--panel-line); background:
  radial-gradient(circle at 50% 0%, rgba(255, 210, 94, 0.18), transparent 60%), radial-gradient(circle at 50% 120%, rgba(94, 242, 255, 0.15), transparent 60%), var(--panel); }
.gb-title { font-family: var(--font-d); font-weight: 900; font-size: clamp(32px, 7vw, 52px); letter-spacing: 0.1em; color: var(--muted); }
.gb-title b { color: #fff; text-shadow: 0 0 16px #ffd25e; }
.gb-sub { color: var(--muted); margin: 4px 0 12px; font-size: 13px; }
.gb-rates { font-size: 12px; color: var(--text); opacity: 0.85; line-height: 1.7; }
.gb-pity { font-family: var(--font-d); color: #ffd25e; margin: 10px 0 16px; font-size: 13px; letter-spacing: 0.05em; }
.gb-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.gb-buttons button { min-width: 150px; }
.gb-buttons button[disabled] { opacity: 0.4; cursor: default; }
.gacha-lineup-head, .team-units-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 8px; }
.gacha-lineup-head h3, .team-units-head h3 { font-family: var(--font-d); font-size: 13px; letter-spacing: 0.2em; color: var(--muted); margin: 0; }
.lineup-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.lineup-row b { width: 56px; font-size: 12px; }
.lineup-u.unowned { filter: grayscale(1) brightness(0.5); }
.gacha-result { position: fixed; inset: 0; z-index: 35; display: none; align-items: center; justify-content: center; background: rgba(2, 3, 10, 0.88); backdrop-filter: blur(6px); padding: 16px; overflow-y: auto; }
.gacha-result.on { display: flex; }
.gr-inner { text-align: center; width: min(760px, 100%); }
.gr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-bottom: 18px; }
.gr-card { position: relative; padding: 12px 6px 10px; border-radius: 12px; border: 1px solid var(--panel-line); background: var(--panel); animation: grIn 0.45s ease-out both; }
@media (prefers-reduced-motion: reduce) { .gr-card { animation: none !important; } }
.gr-card.r3 { border-color: #ff4fd8; box-shadow: 0 0 16px rgba(255, 79, 216, 0.35); }
.gr-card.r4 { border-color: #ffd25e; box-shadow: 0 0 24px rgba(255, 210, 94, 0.55); animation-name: grIn4; }
@keyframes grIn { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes grIn4 { 0% { opacity: 0; transform: scale(1.5); } 60% { opacity: 1; transform: scale(0.96); } 100% { opacity: 1; transform: none; } }
.gr-new { position: absolute; top: 6px; left: 6px; font-family: var(--font-d); font-size: 10px; font-weight: 800; background: #ff4f6e; color: #fff; padding: 2px 6px; border-radius: 4px; }
.gr-stars { font-size: 12px; margin-top: 4px; }
.gr-name { font-family: var(--font-d); font-size: 12px; font-weight: 700; margin-top: 2px; }
.gr-sub { font-size: 11px; color: var(--muted); }

/* 編成 */
.team-slots { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 8px; }
.slot { position: relative; min-height: 170px; padding: 22px 6px 10px; border-radius: 14px; border: 1px solid var(--panel-line); background: var(--panel); display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.slot.leader { border-color: rgba(255, 210, 94, 0.6); }
.slot.sel { border-color: var(--accent); box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 40%, transparent); }
.slot-tag { position: absolute; top: 6px; font-family: var(--font-d); font-size: 9px; letter-spacing: 0.2em; color: var(--muted); }
.slot.leader .slot-tag { color: #ffd25e; }
.slot-name { font-family: var(--font-d); font-size: 11px; font-weight: 700; }
.slot-lv { font-size: 11px; color: var(--muted); }
.slot-skill { font-size: 10.5px; color: var(--text); opacity: 0.85; line-height: 1.35; }
.slot-empty { margin: auto; font-size: 30px; color: var(--muted); }
.team-fx-box { margin: 12px 0 4px; padding: 10px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); font-size: 14px; }
.team-fx-box b { color: var(--accent); }
#team-sort { background: rgba(0, 0, 0, 0.4); color: var(--text); border: 1px solid var(--panel-line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }
.team-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.unit-card { position: relative; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--panel-line); background: var(--panel); text-align: center; }
.unit-card:hover { border-color: rgba(160, 180, 255, 0.5); }
.unit-card.in-team { border-color: var(--accent); }
.in-tag { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #000; font-family: var(--font-d); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.uc-name { font-family: var(--font-d); font-size: 11px; font-weight: 700; margin-top: 4px; }
.uc-meta { font-size: 11px; color: var(--muted); }
.uc-skill { font-size: 10.5px; opacity: 0.85; margin-top: 2px; line-height: 1.35; }
.unit-icon { display: block; margin: 0 auto; }

/* リザルト追加 */
.r-team { font-size: 13px; margin-bottom: 10px; }
.r-team b { font-family: var(--font-d); color: var(--accent); font-size: 16px; }
.r-reward { margin-top: 12px; font-family: var(--font-d); font-weight: 700; font-size: 16px; min-height: 1em; }
.r-reward .muted { font-family: var(--font-b); font-weight: 400; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar .nav { width: 100%; justify-content: flex-start; gap: 6px; }
  .nav .chip { padding: 7px 10px; font-size: 12px; }
  .meta-body { padding: 4px 12px 24px; }
  .team-slots { grid-template-columns: repeat(3, 1fr); }
  .slot.leader { grid-column: span 3; min-height: 150px; }
  .slot { min-height: 150px; }
  .quest { grid-template-columns: 1fr auto; }
  .q-claim { grid-column: span 2; }
}

/* ---------- 編成 v2 ---------- */
.team-guide { font-size: 13px; line-height: 1.6; padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; border: 1px dashed var(--panel-line); background: rgba(0, 0, 0, 0.25); }
.team-guide b { color: var(--accent); }
.team-guide .muted { font-size: 12px; }
.slot { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; }
.slot:not(.filled) { border-style: dashed; cursor: pointer; }
.slot-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.slot-empty small { font-size: 10px; letter-spacing: 0.05em; }
.slot-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--panel-line); background: rgba(0, 0, 0, 0.5); color: var(--muted); font-size: 15px; line-height: 1; display: grid; place-items: center; }
.slot-x:hover { color: #fff; border-color: #ff5a6e; background: rgba(255, 90, 110, 0.3); }
.kind-chip { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; color: var(--k); border: 1px solid var(--k); background: color-mix(in srgb, var(--k) 12%, transparent); margin: 3px 0 1px; white-space: nowrap; }
.team-hint { text-align: center; color: var(--accent); font-weight: 700; font-size: 13px; margin: 8px 0 0; }
.team-hint[hidden] { display: none; }

.team-fx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 10px; }
.fx-tile { padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--k) 45%, transparent); background: color-mix(in srgb, var(--k) 8%, rgba(8, 12, 30, 0.8)); }
.fx-tile.off { opacity: 0.45; border-color: var(--panel-line); }
.fx-label { font-size: 12px; font-weight: 700; color: var(--k); }
.fx-val { font-family: var(--font-d); font-weight: 800; font-size: 22px; margin: 2px 0; }
.fx-desc { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.team-actions { display: flex; gap: 8px; justify-content: flex-end; }
.team-actions button { padding: 9px 16px; font-size: 13px; letter-spacing: 0.05em; font-family: var(--font-b); }

.kind-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.kind-tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--panel-line); background: rgba(0, 0, 0, 0.3); font-size: 12px; font-weight: 700; color: var(--text); }
.kind-tab small { color: var(--muted); margin-left: 2px; }
.kind-tab.sel { border-color: var(--k); color: var(--k); background: color-mix(in srgb, var(--k) 14%, transparent); }
.unit-card { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform 0.12s, opacity 0.12s; }
.unit-card.in-team { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }

/* ドラッグ中 */
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; width: 72px; height: 72px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px var(--accent)); }
.drag-ghost .unit-icon { width: 72px; height: 72px; }
.dragging-src { opacity: 0.35; }
.lift { transform: scale(1.05); box-shadow: 0 0 0 2px var(--accent); }
body.team-dragging, body.team-dragging * { cursor: grabbing !important; }
body.team-dragging .slot { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
body.team-dragging .slot.over { transform: scale(1.04); border-color: var(--accent); border-style: solid; box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 50%, transparent); }
body.drop-remove .drag-ghost { opacity: 0.6; filter: grayscale(1) drop-shadow(0 0 10px #ff5a6e); }

@media (max-width: 760px) {
  .team-fx-grid { grid-template-columns: repeat(2, 1fr); }
  .fx-val { font-size: 18px; }
  .team-actions button { flex: 1; }
}

/* ---------- 検索・並び替え・絞り込み ---------- */
.song-col { display: flex; flex-direction: column; min-height: 0; gap: 8px; }
.song-col .song-list { flex: 1; min-height: 0; }
.list-tools { display: flex; gap: 8px; align-items: center; }
.list-tools input[type=search] {
  flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--panel-line); color: var(--text); border-radius: 10px;
  padding: 9px 12px 9px 34px; font: inherit; font-size: 14px; -webkit-user-select: text; user-select: text;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a97c0' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center; background-size: 16px;
}
.list-tools input[type=search]:focus { outline: none; border-color: var(--accent); }
.list-tools select { background: rgba(0, 0, 0, 0.45); color: var(--text); border: 1px solid var(--panel-line); border-radius: 10px; padding: 9px 8px; font: inherit; font-size: 13px; max-width: 48%; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.f-chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--panel-line); background: rgba(0, 0, 0, 0.3); font-size: 12px; color: var(--text); }
.f-chip:hover { border-color: rgba(160, 180, 255, 0.5); }
.f-chip.sel { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; }
.f-label { font-family: var(--font-d); font-size: 10px; letter-spacing: 0.15em; color: var(--muted); margin-right: 2px; }
.f-sep { width: 1px; height: 18px; background: var(--panel-line); margin: 0 2px; }
.list-empty { color: var(--muted); font-size: 13px; padding: 16px 4px; }
#team .list-tools { margin-bottom: 8px; }
#team .filter-chips { margin-bottom: 10px; }

@media (max-width: 760px) {
  .song-col { min-width: 0; }
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .filter-chips::-webkit-scrollbar { display: none; }
  .f-chip { white-space: nowrap; flex-shrink: 0; }
  .list-tools input[type=search] { font-size: 16px; }
}

/* ---------- 譜面メーカー ---------- */
.screen.editor { flex-direction: column; background: rgba(2, 3, 10, 0.92); }
.ed-top { flex-wrap: wrap; row-gap: 8px; }
.ed-top select, .ed-top input[type=text], .ed-toolbar select, .ed-toolbar input[type=number] {
  background: rgba(0, 0, 0, 0.45); color: var(--text); border: 1px solid var(--panel-line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px;
}
.ed-top input[type=text] { width: min(260px, 40vw); -webkit-user-select: text; user-select: text; }
.ed-top #ed-song { max-width: 220px; }
.ed-lv { font-family: var(--font-d); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.ed-lv small { color: var(--muted); font-family: var(--font-b); }
#ed-post[disabled] { opacity: 0.4; }
.ed-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 20px 8px; }
.tb { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--panel-line); background: rgba(10, 14, 34, 0.8); font-size: 13px; }
button.tb:hover { border-color: var(--accent); }
.tb kbd { font-size: 9px; opacity: 0.55; border: 1px solid var(--panel-line); border-radius: 4px; padding: 1px 4px; }
.tb.rec.on { border-color: #ff4f6e; color: #ff8a9a; background: rgba(255, 79, 110, 0.15); }
.tb.danger:hover { border-color: #ff5a6e; color: #ff8a9a; }
button.tb:disabled { opacity: 0.4; cursor: default; border-color: var(--panel-line); color: inherit; }
.tb input[type=range] { width: 90px; }
.tb input[type=number] { width: 80px; }
.tb-sep { width: 1px; height: 22px; background: var(--panel-line); }
.tb.seg { padding: 2px; gap: 2px; }
.tb.seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; font-size: 13px; }
.tb.seg button.sel { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); font-weight: 700; }
.ed-main { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 0 20px; }
#ed-canvas { flex: 1; min-width: 0; height: 100%; border-radius: 12px; border: 1px solid var(--panel-line); touch-action: none; cursor: crosshair; }
.ed-side { width: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ed-info { padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--panel-line); font-size: 13px; line-height: 1.8; }
.ed-info b { font-family: var(--font-d); font-size: 18px; color: var(--accent); }
.ed-help { padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--panel-line); font-size: 12px; }
.ed-help summary { cursor: pointer; font-weight: 700; }
.ed-help ul { padding-left: 16px; margin: 8px 0 0; line-height: 1.6; }
.ed-help b { color: var(--accent); }
input[type=range].ed-pos { width: calc(100% - 40px); margin: 8px 20px 12px; accent-color: var(--cyan); }
.ed-gpop { position: fixed; z-index: 45; width: 270px; padding: 14px; border-radius: 12px; border: 1px solid rgba(196, 155, 255, 0.6); background: rgba(10, 12, 32, 0.97); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
.ed-gpop[hidden] { display: none; }
.gp-title { font-weight: 700; margin-bottom: 8px; color: #c49bff; }
.gp-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.gp-row[hidden] { display: none; }
.gp-row select, .gp-row input { width: 110px; background: rgba(0, 0, 0, 0.45); color: var(--text); border: 1px solid var(--panel-line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }
.gp-actions { display: flex; gap: 6px; justify-content: flex-end; }
.gp-actions button { padding: 8px 12px; font-size: 13px; font-family: var(--font-b); letter-spacing: 0; }
.gp-actions button[hidden] { display: none; }

/* みんなの譜面 */
.chart-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.chart-row { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--panel-line); background: var(--panel); border-left: 4px solid var(--c); }
.cr-lv { font-family: var(--font-d); font-weight: 900; font-size: 24px; color: var(--c); text-align: center; min-width: 46px; line-height: 1; }
.cr-lv small { display: block; font-size: 9px; letter-spacing: 0.2em; color: var(--muted); }
.cr-title { font-weight: 700; font-size: 15px; word-break: break-word; }
.cr-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cr-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cr-actions .cr-play { padding: 8px 14px; font-size: 13px; letter-spacing: 0.05em; }
.cr-btn { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--panel-line); background: rgba(0, 0, 0, 0.3); font-size: 12px; }
.cr-btn.liked { border-color: #ff4f8a; color: #ff6f9d; }
.cr-btn.danger:hover { border-color: #ff5a6e; color: #ff8a9a; }
.cr-rank { grid-column: 1 / -1; max-height: 260px; }
.cr-rank[hidden] { display: none; }

@media (max-width: 760px) {
  .ed-toolbar { padding: 0 12px 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ed-toolbar::-webkit-scrollbar { display: none; }
  .tb { flex-shrink: 0; white-space: nowrap; }
  .tb kbd { display: none; }
  .ed-main { padding: 0 12px; }
  .ed-side { display: none; }
  input[type=range].ed-pos { width: calc(100% - 24px); margin: 8px 12px 10px; }
  .ed-top input[type=text] { width: 100%; order: 10; }
  .chart-row { grid-template-columns: auto 1fr; }
  .cr-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ================= 洗練ネオン v2 ================= */
/* HUDの角ブラケット(どの要素にも .hud で付けられる) */
.hud { --hc: color-mix(in srgb, var(--accent) 80%, transparent); --hl: 16px; position: relative;
  background-image:
    linear-gradient(var(--hc), var(--hc)), linear-gradient(var(--hc), var(--hc)),
    linear-gradient(var(--hc), var(--hc)), linear-gradient(var(--hc), var(--hc)),
    linear-gradient(var(--hc), var(--hc)), linear-gradient(var(--hc), var(--hc)),
    linear-gradient(var(--hc), var(--hc)), linear-gradient(var(--hc), var(--hc));
  background-size: var(--hl) 2px, 2px var(--hl), var(--hl) 2px, 2px var(--hl), var(--hl) 2px, 2px var(--hl), var(--hl) 2px, 2px var(--hl);
  background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
}
.panel-label { display: flex; justify-content: space-between; font-family: var(--font-d); font-size: 10px; letter-spacing: 0.3em; color: color-mix(in srgb, var(--accent) 70%, var(--muted)); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--panel-line); }
.panel-label span:last-child { letter-spacing: 0.1em; color: var(--muted); }

/* うっすら走査線(UI全体) */
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px); }
body.playing::after { display: none; }

/* ---------- タイトル ---------- */
#title { overflow: hidden; }
.title-frame { position: absolute; inset: 18px; pointer-events: none; --hl: 34px; --hc: rgba(94, 242, 255, 0.55); }
.title-sweep { position: absolute; left: 0; right: 0; height: 2px; top: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(94, 242, 255, 0.9), transparent); box-shadow: 0 0 18px rgba(94, 242, 255, 0.7);
  animation: sweep 4.5s cubic-bezier(0.6, 0, 0.4, 1) infinite; opacity: 0.7; }
@keyframes sweep { 0% { transform: translateY(-10px); } 100% { transform: translateY(100vh); } }
.tele { position: absolute; font-family: var(--font-d); font-size: 10px; letter-spacing: 0.2em; line-height: 1.8; color: rgba(140, 170, 230, 0.6); pointer-events: none; }
.tele.tl { top: 36px; left: 40px; text-align: left; } .tele.tr { top: 36px; right: 40px; text-align: right; }
.tele.bl { bottom: 36px; left: 40px; min-height: 90px; text-align: left; } .tele.br { bottom: 36px; right: 40px; text-align: right; }
.tele b { color: #7ff9ff; font-weight: 600; } .tele b.ok { animation: blink 0.8s steps(2) infinite; }
.logo-big b { position: relative; display: block; animation: logoIn 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.15s; }
.logo-big b::after { content: attr(data-text); position: absolute; inset: 0; color: transparent; -webkit-text-stroke: 1px rgba(255, 79, 216, 0.7);
  transform: translate(4px, 0); animation: glitch 6s steps(1) infinite 1.5s; pointer-events: none; }
@keyframes logoIn { 0% { clip-path: inset(100% -30% -60% -30%); filter: brightness(3); } 100% { clip-path: inset(-60% -30% -60% -30%); filter: none; } }
@keyframes glitch { 0%, 92%, 100% { transform: translate(4px, 0); clip-path: none; } 93% { transform: translate(-6px, 1px); clip-path: inset(20% 0 55% 0); } 95% { transform: translate(8px, -1px); clip-path: inset(60% 0 10% 0); } 97% { transform: translate(-3px, 0); clip-path: inset(40% 0 40% 0); } }
.logo-big span { animation: fadeUp 0.8s ease-out both; }
.logo-rule { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 18px auto 44px; width: min(520px, 86vw); animation: fadeUp 0.8s ease-out both 0.6s; }
.logo-rule i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(94, 242, 255, 0.8)); }
.logo-rule i:last-child { background: linear-gradient(270deg, transparent, rgba(94, 242, 255, 0.8)); }
.logo-rule em { font-style: normal; font-family: var(--font-d); font-size: 11px; letter-spacing: 0.55em; color: var(--cyan); white-space: nowrap; margin-right: -0.55em; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.btn-start { position: relative; font-family: var(--font-d); font-weight: 700; font-size: 14px; letter-spacing: 0.45em; padding: 16px 40px 16px calc(40px + 0.45em);
  color: #fff; background: rgba(94, 242, 255, 0.07); border: 1px solid rgba(94, 242, 255, 0.45);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  animation: fadeUp 0.8s ease-out both 0.9s, breathe2 2.4s ease-in-out infinite 1.7s; transition: background 0.2s; }
.btn-start:hover { background: rgba(94, 242, 255, 0.18); }
@keyframes breathe2 { 50% { background: rgba(94, 242, 255, 0.16); } }
.keys-hint { animation: fadeUp 0.8s ease-out both 1.1s; }
.keys-hint kbd { border-radius: 4px; }

/* ---------- 選曲 ---------- */
.song-card { grid-template-columns: auto 1fr auto; padding: 10px 14px 10px 10px; gap: 12px; border-radius: 6px; }
.song-card::before { display: none; }
.sc-jacket { width: 52px; height: 52px; border-radius: 3px; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.sc-text { min-width: 0; }
.song-card .sc-lv { grid-row: auto; grid-column: auto; }
.song-card.sel { transform: translateX(8px); border-color: transparent; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, rgba(8, 12, 30, 0.9)), rgba(8, 12, 30, 0.9) 70%);
  box-shadow: inset 3px 0 0 var(--c), 0 0 24px color-mix(in srgb, var(--c) 22%, transparent); }
.song-card.sel .sc-jacket { box-shadow: 0 0 0 1px var(--c), 0 0 14px color-mix(in srgb, var(--c) 60%, transparent); }
.song-card.upload { grid-template-columns: 1fr; padding-left: 16px; }
.detail { border-radius: 4px; border-color: rgba(110, 140, 255, 0.16); }
.d-head { display: flex; gap: 16px; align-items: flex-end; }
.d-jacket { width: 132px; height: 132px; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 30px color-mix(in srgb, var(--accent) 25%, transparent);
  animation: jIn 0.35s ease-out; }
@keyframes jIn { from { opacity: 0; transform: translateY(6px) scale(0.97); } }
.d-headtext { min-width: 0; }
.d-title { font-size: 26px; }
.diff-btn { border-radius: 4px; }
.btn-play { border-radius: 4px; clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
.best { border-radius: 4px; }

/* ---------- リザルト ---------- */
.result-panel { border-radius: 4px; }
.r-banner { font-family: var(--font-d); font-weight: 900; font-size: clamp(20px, 4.5vw, 30px); letter-spacing: 0.35em; text-align: center; padding: 8px 0; margin: 10px -24px 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 18%, transparent), transparent); color: #fff; text-shadow: 0 0 14px var(--accent); }
.r-banner.full-combo { color: #ffe39a; text-shadow: 0 0 16px #ffd25e; background: linear-gradient(90deg, transparent, rgba(255, 210, 94, 0.18), transparent); }
.r-banner.all-perfect { background: linear-gradient(90deg, transparent, rgba(94, 242, 255, 0.2), rgba(255, 79, 216, 0.2), transparent); text-shadow: 0 0 16px #ff4fd8, 0 0 30px #5ef2ff; }
.r-banner.failed { color: #ff8a9a; text-shadow: none; background: none; letter-spacing: 0.5em; }
.r-jacket { width: 108px; height: 108px; border-radius: 3px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.r-score { font-variant-numeric: tabular-nums; }
.result-panel.reveal .r-banner { animation: bannerIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.15s; }
.result-panel.reveal .r-jacket { animation: fadeUp 0.5s ease-out both 0.1s; }
.result-panel.reveal .r-rank { animation: rankIn 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both 0.9s; }
.result-panel.reveal .r-counts > div { animation: fadeUp 0.4s ease-out both; }
.result-panel.reveal .r-counts > div:nth-child(1) { animation-delay: 1.1s; } .result-panel.reveal .r-counts > div:nth-child(2) { animation-delay: 1.18s; }
.result-panel.reveal .r-counts > div:nth-child(3) { animation-delay: 1.26s; } .result-panel.reveal .r-counts > div:nth-child(4) { animation-delay: 1.34s; }
.result-panel.reveal .r-counts > div:nth-child(5) { animation-delay: 1.42s; }
@keyframes bannerIn { 0% { clip-path: inset(0 50% 0 50%); opacity: 0; } 100% { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes rankIn { 0% { opacity: 0; transform: scale(2.4); filter: blur(6px) brightness(3); } 100% { opacity: 1; transform: none; filter: none; } }
.r-counts div { border-radius: 4px; }

/* ---------- ガチャ ---------- */
.gacha-banner { border-radius: 6px; }
.gacha-result { isolation: isolate; overflow-x: hidden; background: radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--gc, #5ef2ff) 13%, transparent), transparent 44%), rgba(2, 3, 10, 0.94); }
.gacha-result { align-items: flex-start; }
.gacha-result::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--gc, #5ef2ff) 22%, transparent) 0 3deg, transparent 3deg 22deg); }
.gacha-result.scanning::before { opacity: 0.22; animation: gr-ray-pulse 1.8s ease-in-out infinite; }
.gacha-result.scanning.best4::before { opacity: 0.42; }
@keyframes gr-ray-pulse { 0%, 100% { opacity: 0.14; } 50% { opacity: 0.44; } }
.gr-scan { position: absolute; inset: 0; z-index: 1; display: none; place-items: center; overflow: hidden; background: radial-gradient(circle, color-mix(in srgb, var(--gc, #5ef2ff) 12%, transparent), transparent 48%); }
.gr-scan::after { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--gc, #5ef2ff); box-shadow: 0 0 24px 5px var(--gc, #5ef2ff); opacity: 0.8; animation: gr-scanline 1.7s ease-in-out infinite alternate; }
@keyframes gr-scanline { to { transform: translateY(100vh); } }
.gacha-result.scanning .gr-scan { display: grid; }
.gacha-result.scanning .gr-inner { display: none; }
.gr-scan-visual { position: absolute; left: 50%; top: 43%; width: min(76vw, 460px); aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; }
.gr-ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--gc, #5ef2ff); border-left-color: color-mix(in srgb, var(--gc, #5ef2ff) 40%, transparent); box-shadow: 0 0 40px color-mix(in srgb, var(--gc, #5ef2ff) 40%, transparent); animation: gr-ring-spin 1.1s linear infinite; }
.gr-ring.r2 { width: 78%; height: 78%; animation-duration: 1.7s; animation-direction: reverse; border-top-color: transparent; border-bottom-color: var(--gc, #5ef2ff); }
.gr-ring.r3 { width: 56%; height: 56%; border-width: 1px; border-right-color: var(--gc, #5ef2ff); border-bottom-color: transparent; animation-duration: 2.3s; }
@keyframes gr-ring-spin { to { transform: rotate(360deg); } }
.gr-core { width: 28%; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--gc, #5ef2ff) 80%, white); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gc, #5ef2ff) 55%, transparent), rgba(2, 3, 10, 0.9) 72%); box-shadow: 0 0 24px var(--gc, #5ef2ff), inset 0 0 24px var(--gc, #5ef2ff); animation: gr-core-pulse 1.1s ease-in-out infinite alternate; }
.gr-core span { font-size: clamp(28px, 8vw, 54px); color: #fff; text-shadow: 0 0 14px var(--gc, #5ef2ff); }
@keyframes gr-core-pulse { to { transform: scale(1.16); filter: brightness(1.7); } }
.gr-scantext { position: absolute; top: calc(43% + min(39vw, 220px)); width: min(92vw, 520px); font-family: var(--font-d); font-size: clamp(12px, 2.3vw, 17px); font-weight: 800; letter-spacing: 0.34em; color: #fff; text-align: center; text-shadow: 0 0 14px var(--gc, #5ef2ff); animation: gr-text-pulse 0.8s steps(2) infinite; }
@keyframes gr-text-pulse { 50% { opacity: 0.56; } }
.gr-scantext span { display: block; font-family: var(--font-b); font-size: 12px; letter-spacing: 0.12em; margin-top: 10px; color: var(--gc, #5ef2ff); }
.gr-scan-skip { position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 2; min-height: 44px; }
.gacha-result.best1 { --gc: #8fa3c8; } .gacha-result.best2 { --gc: #5ef2ff; }
.gacha-result.best3 { --gc: #ff4fd8; } .gacha-result.best4 { --gc: #ffd25e; }
.gacha-result.scanning.best4 { animation: goldFlash 2.2s ease-in both; }
@keyframes goldFlash { 70% { background: rgba(2, 3, 10, 0.88); } 92% { background: rgba(255, 210, 94, 0.35); } 100% { background: rgba(2, 3, 10, 0.88); } }
.gr-inner { position: relative; z-index: 2; width: min(760px, 100%); padding: 12px 0; }
.gr-result-head { text-align: center; margin: 0 0 14px; }
.gr-count { display: inline-block; padding: 4px 11px; border: 1px solid color-mix(in srgb, var(--gc, #5ef2ff) 55%, transparent); border-radius: 999px; color: var(--gc, #5ef2ff); font: 700 11px var(--font-d); letter-spacing: 0.12em; }
.gr-status { min-height: 1.5em; margin: 8px 0 0; font-weight: 700; text-shadow: 0 0 12px color-mix(in srgb, var(--gc, #5ef2ff) 65%, transparent); }
.gr-card[hidden] { display: none; }
.gr-card.revealed { animation: gr-card-reveal 0.48s cubic-bezier(0.18, 1.45, 0.42, 1) both; }
@keyframes gr-card-reveal { 0% { opacity: 0; transform: translateY(22px) scale(0.72) rotateY(70deg); filter: brightness(2.5); } 68% { opacity: 1; transform: translateY(-3px) scale(1.06) rotateY(-5deg); } 100% { opacity: 1; transform: none; filter: none; } }
.gr-card.r3.revealed { box-shadow: 0 0 24px rgba(255, 79, 216, 0.5), inset 0 0 16px rgba(255, 79, 216, 0.12); }
.gr-card.r4.revealed { position: relative; z-index: 1; box-shadow: 0 0 32px rgba(255, 210, 94, 0.72), inset 0 0 24px rgba(255, 210, 94, 0.18); animation: gr-card-rare 0.72s cubic-bezier(0.18, 1.5, 0.42, 1) both; }
.gr-card.r4.revealed::before { content: ''; position: absolute; inset: -55%; z-index: 0; pointer-events: none; background: repeating-conic-gradient(from 0deg, rgba(255, 210, 94, 0.18) 0 5deg, transparent 5deg 22deg); animation: gr-card-rays 5s linear infinite; }
.gr-card.r4.revealed > * { position: relative; z-index: 1; }
@keyframes gr-card-rare { 0% { opacity: 0; transform: scale(1.65) rotate(-4deg); filter: brightness(3); } 62% { opacity: 1; transform: scale(0.94) rotate(1deg); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes gr-card-rays { to { transform: rotate(360deg); } }
.gr-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.gr-actions button { min-width: 160px; min-height: 44px; }
.gr-card { border-radius: 6px; overflow: hidden; }
.gr-card.r3::after, .gr-card.r4::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%); transform: translateX(-120%); animation: sheen 2.4s ease-in-out infinite 1s; }
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (max-width: 560px) {
  .gacha-result { padding: 10px; }
  .gr-inner { padding: 8px 0 12px; }
  .gr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .gr-card { padding: 10px 4px 8px; min-width: 0; }
  .gr-name { overflow-wrap: anywhere; }
  .gr-actions { margin-top: 12px; }
  .gr-actions button { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .gacha-result::before, .gr-scan::after, .gr-ring, .gr-core, .gr-scantext,
  .gr-card.revealed, .gr-card.r4.revealed::before, .gr-card.r3::after, .gr-card.r4::after { animation: none !important; }
}

@media (max-width: 760px) {
  .tele { display: none; }
  .title-frame { inset: 10px; --hl: 22px; }
  .sc-jacket { width: 44px; height: 44px; }
  .song-card { grid-template-columns: auto 1fr; }
  .song-card .sc-lv { grid-column: 1 / -1; }
  .d-jacket { width: 92px; height: 92px; }
  .d-title { font-size: 21px; }
  .r-jacket { width: 72px; height: 72px; }
  .r-banner { margin: 8px -18px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .title-sweep, .logo-big b::after { animation: none; }
}

/* ヘッダーを詰める */
.logo-small { white-space: nowrap; }
.nav { gap: 6px; }
.nav .chip { padding: 7px 11px; font-size: 12.5px; border-radius: 4px; }
@media (max-width: 1180px) and (min-width: 761px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar .nav { width: 100%; justify-content: flex-start; }
  .topbar > .spacer { display: none; }
}

/* リザルトの横はみ出し対策 */
.result-panel { overflow-x: hidden; }
.r-main { flex-wrap: nowrap; gap: 16px; }
.r-rank { font-size: clamp(54px, 9vw, 84px); min-width: 0; flex-shrink: 0; }
.r-scorebox { min-width: 0; }
.r-score { font-size: clamp(30px, 5.6vw, 46px); white-space: nowrap; }
.r-badges:empty { display: none; }
@media (max-width: 560px) {
  .r-main { flex-wrap: wrap; justify-content: center; }
  .r-scorebox { flex-basis: 100%; text-align: center; }
}

/* ---------- 読み込み中画面 ---------- */
.overlay.loading-screen { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 10%, rgba(2, 3, 10, 0.94)), rgba(2, 3, 10, 0.97) 70%); backdrop-filter: blur(6px); z-index: 40; }
.ld-card { width: min(560px, 100%); padding: 22px 24px; border: 1px solid var(--panel-line); background-color: rgba(8, 12, 30, 0.85); border-radius: 4px; animation: fadeUp 0.35s ease-out; }
.ld-body { display: flex; gap: 18px; align-items: center; }
.ld-jacket { width: 128px; height: 128px; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 34px color-mix(in srgb, var(--accent) 30%, transparent); animation: ldFloat 3s ease-in-out infinite; }
.ld-jacket[hidden] { display: none; }
@keyframes ldFloat { 50% { transform: translateY(-4px); } }
.ld-info { min-width: 0; }
.ld-genre { font-family: var(--font-d); font-size: 11px; letter-spacing: 0.35em; color: var(--accent); }
.ld-title { font-family: var(--font-d); font-weight: 800; font-size: clamp(22px, 5vw, 30px); line-height: 1.15; margin: 6px 0; word-break: break-word; text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 50%, transparent); }
.ld-diff { font-family: var(--font-d); font-size: 12px; letter-spacing: 0.15em; color: var(--muted); }
.ld-bar { position: relative; height: 4px; margin: 22px 0 8px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.ld-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); transition: width 0.15s linear; }
.ld-bar.indeterminate i { width: 35% !important; animation: scan 1.1s ease-in-out infinite alternate; }
.ld-status { font-family: var(--font-d); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); margin: 0; }
.ld-tips { margin-top: 18px; padding: 12px 14px; border-left: 2px solid var(--accent); background: rgba(0, 0, 0, 0.3); display: flex; gap: 12px; align-items: baseline; min-height: 64px; }
.ld-tips b { font-family: var(--font-d); font-size: 10px; letter-spacing: 0.25em; color: var(--accent); flex-shrink: 0; }
.ld-tips p { margin: 0; font-size: 13.5px; line-height: 1.7; }
.ld-tips p.in { animation: tipIn 0.45s ease-out; }
@keyframes tipIn { from { opacity: 0; transform: translateX(8px); } }
@media (max-width: 560px) {
  .ld-card { padding: 18px; }
  .ld-jacket { width: 88px; height: 88px; }
  .ld-body { gap: 14px; }
}
.ld-card { font-family: var(--font-b); letter-spacing: normal; color: var(--text); }

.d-credit { font-size: 11px; color: var(--muted); margin-top: 4px; }
.d-credit a { color: var(--accent); }
.d-credit:empty { display: none; }
.tele.br { pointer-events: auto; }

/* タイトルの説明文(検索向け・控えめ表示) */
.title-lead { font-family: var(--font-b); font-weight: 500; font-size: 13px; letter-spacing: 0.08em; color: rgba(200,215,255,0.65); margin: 22px 0 6px; animation: fadeUp 0.8s ease-out both 1.2s; }
.title-links { margin: 0; font-size: 12px; animation: fadeUp 0.8s ease-out both 1.3s; }
.title-links a { color: var(--cyan); }
/* 曲ページだけ: 曲の情報と似た曲(検索エンジンが曲どうしをたどれるように) */
.title-related { margin: 8px auto 0; max-width: 640px; font-size: 11px; line-height: 1.7; color: rgba(200,215,255,0.55); animation: fadeUp 0.8s ease-out both 1.4s; }
.title-related a { color: rgba(94,242,255,0.8); }
.title-noscript { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: var(--muted); }

.rec-bias { font-family: var(--font-d); font-size: 11px; color: var(--muted); }

/* 曲ページ・共有 */
.share-btn { display: block; width: 100%; margin: -6px 0 12px; padding: 8px; border-radius: 4px; border: 1px dashed var(--panel-line); background: transparent; color: var(--muted); font-size: 12px; }
.share-btn:hover { color: var(--accent); border-color: var(--accent); }
.title-song { font-family: var(--font-d); font-weight: 700; font-size: 18px; color: #fff; margin: -26px 0 30px; text-shadow: 0 0 12px var(--cyan); animation: fadeUp 0.8s ease-out both 0.8s; }
.title-song[hidden] { display: none; }

/* ================= 洗練ネオン v3: メニュー画面・切り替え ================= */
/* 画面切り替えのワイプ */
.wipe { position: fixed; inset: 0; z-index: 46; pointer-events: none; visibility: hidden; }
.wipe.go { visibility: visible; animation: wipeShow 0.5s linear forwards; }
.wipe::before { content: ''; position: absolute; inset: 0; background: rgba(2, 3, 10, 0.92);
  background-image: repeating-linear-gradient(0deg, rgba(94, 242, 255, 0.05) 0 1px, transparent 1px 4px); }
.wipe::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #bff9ff; box-shadow: 0 0 18px #5ef2ff, 0 0 40px #5ef2ff; }
.wipe.go::before { animation: wipeCurtain 0.45s cubic-bezier(0.5, 0, 0.3, 1) forwards; }
.wipe.go::after { animation: wipeLine 0.45s cubic-bezier(0.5, 0, 0.3, 1) forwards; }
@keyframes wipeCurtain { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(100% 0 0 0); } }
@keyframes wipeLine { from { top: 0; opacity: 1; } 90% { opacity: 1; } to { top: 100%; opacity: 0; } }
@keyframes wipeShow { to { visibility: hidden; } }
.screen.active .meta-body > *, .screen.active .select-body > * { animation: screenIn 0.4s ease-out both; }
.screen.active .meta-body > *:nth-child(2), .screen.active .select-body > *:nth-child(2) { animation-delay: 0.05s; }
.screen.active .meta-body > *:nth-child(3) { animation-delay: 0.1s; }
.screen.active .meta-body > *:nth-child(n+4) { animation-delay: 0.14s; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .wipe.go { display: none; } .screen.active .meta-body > *, .screen.active .select-body > * { animation: none; } }

/* メニュー画面のヘッダー */
.screen.meta .topbar { border-bottom: 1px solid var(--panel-line); background: linear-gradient(180deg, rgba(8, 12, 30, 0.85), rgba(8, 12, 30, 0.35)); margin-bottom: 12px; }
.screen.meta .meta-title { position: relative; padding-left: 14px; }
.screen.meta .meta-title::before { content: ''; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; background: var(--accent); box-shadow: 0 0 10px var(--accent); transform: rotate(45deg); }

/* 角ブラケット(カード類) */
.quest, .chart-row, .slot, .fx-tile, .team-guide, .unit-card {
  --hc: color-mix(in srgb, var(--accent) 55%, transparent); --hl: 10px;
  background-image:
    linear-gradient(var(--hc), var(--hc)), linear-gradient(var(--hc), var(--hc)),
    linear-gradient(var(--hc), var(--hc)), linear-gradient(var(--hc), var(--hc));
  background-size: var(--hl) 1.5px, 1.5px var(--hl), var(--hl) 1.5px, 1.5px var(--hl);
  background-position: 0 0, 0 0, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
}
.fx-tile { --hc: var(--k); }

/* クエスト */
.quest { position: relative; border-radius: 4px; overflow: hidden; transition: transform 0.15s, border-color 0.15s; }
.quest::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: 0.6; }
.quest.ready { animation: questReady 1.8s ease-in-out infinite; }
.quest.ready::before { background: #ffd25e; opacity: 1; box-shadow: 0 0 10px #ffd25e; }
@keyframes questReady { 50% { box-shadow: 0 0 22px rgba(255, 210, 94, 0.35); } }
.quest:hover { transform: translateX(3px); }
.q-bar { height: 6px; border-radius: 0; background: rgba(255, 255, 255, 0.06); }
.q-bar span { border-radius: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, transparent), var(--accent)); box-shadow: 0 0 8px var(--accent); }
.quest.ready .q-bar span { background: linear-gradient(90deg, #ffb84d, #ffe39a); box-shadow: 0 0 10px #ffd25e; }
.q-claim:not([disabled]) { background: linear-gradient(180deg, rgba(255, 210, 94, 0.35), rgba(255, 210, 94, 0.12)); box-shadow: 0 0 14px rgba(255, 210, 94, 0.35); color: #fff; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); border-radius: 0; }
.q-reward { color: #ffe39a; text-shadow: 0 0 10px rgba(255, 210, 94, 0.5); }
.q-tab { border-radius: 4px; }

/* 編成 */
.slot { border-radius: 6px; }
.slot.leader.filled { box-shadow: 0 0 24px rgba(255, 210, 94, 0.18) inset; }
.slot.leader .slot-tag { text-shadow: 0 0 8px #ffd25e; }
.unit-card { border-radius: 6px; transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; }
.unit-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px color-mix(in srgb, var(--accent) 25%, transparent); }
.fx-tile { border-radius: 4px; }
.fx-tile:not(.off) .fx-val { text-shadow: 0 0 12px var(--k); }
.kind-tab, .f-chip { border-radius: 4px; }

/* みんなの譜面 */
.chart-row { grid-template-columns: auto auto 1fr auto; border-radius: 4px; border-left-width: 1px; transition: transform 0.15s, box-shadow 0.15s; }
.chart-row:hover { transform: translateX(3px); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 22%, transparent); }
.cr-jacket { width: 56px; height: 56px; border-radius: 3px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent); }
.cr-lv { border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); padding: 6px 4px; border-radius: 3px; background: color-mix(in srgb, var(--c) 10%, transparent); }
.cr-actions .cr-play { clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); border-radius: 0; }
.cr-btn { border-radius: 3px; }
.cr-rank { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .chart-row { grid-template-columns: auto auto 1fr; }
  .cr-jacket { width: 44px; height: 44px; }
}

/* バージョン・更新履歴 */
.ver-chip { position: relative; font-family: var(--font-d); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.ver-new { position: absolute; top: -7px; right: -8px; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 3px; background: #ff4f6e; color: #fff; letter-spacing: 0.05em; animation: blink 1.2s steps(2) infinite; }
.ver-new[hidden] { display: none; }
.title-ver { font-family: var(--font-d); font-size: 10px; color: rgba(160, 180, 230, 0.6); margin-left: 4px; }
.changelog-box { width: min(620px, 100%); }
.changelog-box h2 { margin-top: 4px; }
.cl-list { list-style: none; padding: 0; margin: 8px 0 0; max-height: min(62vh, 560px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.cl-item { position: relative; padding: 10px 12px 10px 16px; border-left: 2px solid var(--panel-line); background: rgba(0, 0, 0, 0.25); border-radius: 0 4px 4px 0; }
.cl-item.latest { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, rgba(0, 0, 0, 0.25)); }
.cl-item.unseen::after { content: 'NEW'; position: absolute; top: 10px; right: 10px; font-family: var(--font-d); font-size: 9px; font-weight: 800; color: #ff8a9a; }
.cl-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.cl-ver { font-family: var(--font-d); font-weight: 800; font-size: 15px; color: #fff; }
.cl-item.latest .cl-ver { color: var(--accent); text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.cl-date { font-family: var(--font-d); font-size: 11px; color: var(--muted); }
.cl-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--accent); color: var(--accent); }
.cl-item ul { margin: 0; padding-left: 1.2em; font-size: 13px; line-height: 1.7; }

/* みんなでライブ */
.nav-live { border-color: rgba(255, 90, 140, 0.55); }
.nav-live .ico { color: #ff5a8c; animation: blink 1.2s steps(2) infinite; }
#live .meta-body { max-width: 980px; margin: 0 auto; width: 100%; }
.live-intro { border: 1px solid var(--panel-line); background: var(--panel); border-radius: 14px; padding: 18px; }
.live-intro h3 { margin: 6px 0 4px; font-size: 20px; }
.live-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.live-actions small { font-size: 11px; opacity: 0.7; }
.live-join { display: flex; gap: 6px; }
.live-join input { width: 130px; text-transform: uppercase; letter-spacing: 0.2em; font-family: var(--font-d); }
.live-h { margin: 18px 0 8px; font-size: 14px; color: var(--muted); letter-spacing: 0.1em; }
.live-rooms { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.live-rooms .empty { color: var(--muted); font-size: 13px; padding: 10px 4px; }
.live-room { width: 100%; display: grid; grid-template-columns: 48px 1fr auto auto auto; gap: 12px; align-items: center; text-align: left;
  border: 1px solid var(--panel-line); background: var(--panel); border-radius: 10px; padding: 8px 12px; color: inherit; }
.live-room:hover { border-color: var(--accent); }
.live-room:disabled { opacity: 0.5; cursor: default; border-color: var(--panel-line); }
.live-h .mini { margin-left: 6px; vertical-align: middle; }
@media (max-width: 640px) { .live-room { grid-template-columns: 40px 1fr auto; } .live-room img, .live-room > i { width: 40px; height: 40px; } .lr-host, .lr-n { display: none; } }
.live-room img, .live-room > i { width: 48px; height: 48px; border-radius: 6px; display: block; background: #111a33; }
.lr-main { display: flex; flex-direction: column; min-width: 0; }
.lr-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-main small { font-family: var(--font-d); font-size: 11px; }
.lr-host { font-size: 12px; color: var(--muted); }
.lr-n { font-family: var(--font-d); font-size: 13px; }
.lr-st { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid #6dffb0; color: #6dffb0; }
.lr-st.play { border-color: #ff5a8c; color: #ff5a8c; }
.live-roombox { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.live-roombox[hidden], #live-lobby[hidden] { display: none; }
.live-room-main, .live-room-side { border: 1px solid var(--panel-line); background: var(--panel); border-radius: 14px; padding: 18px; }
.live-room-main .panel-label b { font-family: var(--font-d); color: var(--accent); font-size: 15px; letter-spacing: 0.15em; }
.live-room-main .panel-label .mini { width: 22px; height: 22px; margin-left: 4px; }
.lr-song { display: flex; gap: 14px; align-items: center; margin: 10px 0 12px; }
.lr-song img { width: 96px; height: 96px; border-radius: 8px; border: 1px solid var(--panel-line); }
.lr-song > div { min-width: 0; flex: 1; }
.lr-song h3 { margin: 2px 0 8px; font-size: 20px; }
.lr-song select { max-width: 100%; }
.lr-song select:disabled { opacity: 0.55; }
#live-diffs .diff-btn:disabled { cursor: default; }
#live-diffs .diff-btn:not(.sel):disabled { opacity: 0.45; }
#live-start { width: 100%; margin-top: 12px; }
#live-start[hidden] { display: none; }
#live-start small { font-size: 11px; opacity: 0.75; }
#live-start:disabled { opacity: 0.5; filter: grayscale(0.6); }
.live-msg { text-align: center; color: var(--muted); font-size: 13px; min-height: 1.5em; margin: 10px 0 4px; }
.live-leave { display: block; margin: 6px auto 0; font-size: 12px; padding: 6px 14px; }
.live-members { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.live-members li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.25); font-size: 14px; }
.live-members li.me { background: color-mix(in srgb, var(--accent) 14%, rgba(0, 0, 0, 0.25)); }
.lm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-host { font-style: normal; font-family: var(--font-d); font-size: 9px; font-weight: 800; color: #ffd25e; border: 1px solid #ffd25e; border-radius: 3px; padding: 0 4px; margin-right: 6px; vertical-align: 2px; }
.lm-st { font-family: var(--font-d); font-size: 11px; white-space: nowrap; }
.lm-st.ok { color: #6dffb0; } .lm-st.wait { color: var(--muted); } .lm-st.play { color: #ff5a8c; } .lm-st.done { color: #ffd25e; font-weight: 800; }
.r-live { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(255, 90, 140, 0.4); border-radius: 12px; background: rgba(255, 90, 140, 0.06); font-size: 13px; }
.r-live[hidden] { display: none; }
.lv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lv-head b { font-family: var(--font-d); color: #ff7aa2; letter-spacing: 0.12em; }
.lv-head span { font-weight: 700; }
.r-live p { margin: 2px 0 0; }
.lv-list li { grid-template-columns: 34px 1fr auto auto; }
.lv-list li.win .sc { color: #ffd25e; }
.lv-list .cb { font-family: var(--font-d); font-size: 11px; color: var(--muted); }
.lv-mark { font-style: normal; font-family: var(--font-d); font-size: 9px; font-weight: 800; margin-left: 6px; padding: 0 4px; border-radius: 3px; border: 1px solid #7ff9ff; color: #7ff9ff; }
.lv-mark.ap { border-color: #ffd25e; color: #ffd25e; }
body.live #btn-p-retry, body.live #btn-retry { display: none; }
@media (max-width: 760px) {
  .live-roombox { grid-template-columns: 1fr; }
  .live-room { grid-template-columns: 40px 1fr auto; }
  .live-room img, .live-room > i { width: 40px; height: 40px; }
  .lr-host, .lr-n { display: none; }
  .lr-song img { width: 72px; height: 72px; }
}
.lr-song select { background: rgba(0, 0, 0, 0.45); color: var(--text); border: 1px solid var(--panel-line); border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 13px; }
.lr-song select option { background: #0a1024; }

/* ---------- ホーム(モード選択) ---------- */
#home { flex-direction: column; }
.home-body { flex: 1; min-height: 0; overflow-y: auto; width: 100%; max-width: 1120px; margin: 0 auto; padding: 4px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.home-body [hidden] { display: none !important; }
.h-player { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; padding: 10px 14px; border: 1px solid var(--panel-line); border-left: 2px solid var(--accent); background: var(--panel); border-radius: 4px; animation: fadeUp 0.4s ease-out both; }
.h-player b { font-size: 16px; }
.hp-hi { font-family: var(--font-d); font-size: 10px; letter-spacing: 0.2em; color: var(--accent); }
.hp-sep { width: 1px; height: 14px; background: var(--panel-line); }
.hp-login { margin-left: auto; padding: 7px 14px; font-size: 13px; }
.home-main { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.h-tile { --tc: #5ef2ff; position: relative; overflow: hidden; text-align: left; color: var(--text); border: 1px solid var(--panel-line); background: var(--panel); border-radius: 6px;
  padding: 16px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; backdrop-filter: blur(6px);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s; animation: fadeUp 0.45s ease-out both; }
.h-tile::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 16%, transparent), transparent 55%); pointer-events: none; }
.h-tile::after { content: ''; position: absolute; top: 8px; right: 8px; width: 14px; height: 14px; border-top: 2px solid var(--tc); border-right: 2px solid var(--tc); opacity: 0.7; }
.h-tile:hover, .h-tile:focus-visible { transform: translateY(-3px); border-color: var(--tc); box-shadow: 0 0 24px color-mix(in srgb, var(--tc) 30%, transparent); outline: none; }
.h-tile:nth-child(2) { --tc: #6dffb0; animation-delay: 0.05s; }
.h-tile:nth-child(3) { --tc: #ffd25e; animation-delay: 0.1s; }
.h-tile:nth-child(4) { --tc: #ff9a5c; animation-delay: 0.15s; }
.h-tile:nth-child(5) { --tc: #c49bff; animation-delay: 0.2s; }
.h-tile:nth-child(6) { --tc: #ff7ce6; animation-delay: 0.25s; }
.h-label { position: relative; display: flex; flex-direction: column; line-height: 1.15; }
.h-label small { font-family: var(--font-d); font-size: 9px; letter-spacing: 0.25em; color: var(--tc); }
.h-label b { font-family: var(--font-d); font-weight: 900; font-size: 24px; letter-spacing: 0.06em; color: #fff; text-shadow: 0 0 14px color-mix(in srgb, var(--tc) 55%, transparent); }
.h-label span { font-size: 13px; font-weight: 700; color: var(--tc); }
.h-tile p { position: relative; margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.h-badge { position: absolute; top: 10px; left: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ff4f6e; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.h-tile.locked, .hl-card.locked { filter: saturate(0.4); }
.h-tile.locked .h-label, .h-tile.locked p, .hl-card.locked > :not(.hl-lock) { opacity: 0.55; }
.h-tile.locked p::before, .hl-card.locked p::before { content: '🔒 ログインで解放 ・ '; color: #ffd25e; }
.h-go { position: absolute; right: 16px; bottom: 14px; font-style: normal; font-family: var(--font-d); font-size: 11px; letter-spacing: 0.15em; color: var(--tc, var(--accent)); opacity: 0.8; }

/* LIVE(大きいタイル) */
.h-tile.h-live { grid-column: 1 / -1; min-height: min(42vh, 340px); padding: 28px; justify-content: center; }
.h-live::before { background: linear-gradient(90deg, rgba(2, 3, 10, 0.92) 25%, rgba(2, 3, 10, 0.35) 70%, rgba(2, 3, 10, 0.7)); z-index: 1; }
.h-live > :not(.h-jackets) { z-index: 2; }
.h-live::after { z-index: 2; }
.h-jackets { position: absolute; top: -40%; right: -10%; width: 85%; height: 180%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; transform: rotate(-12deg); opacity: 0.85; animation: hjScroll 40s linear infinite; }
.h-jackets img { width: 100%; aspect-ratio: 1; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.12); }
@keyframes hjScroll { from { transform: rotate(-12deg) translateY(0); } to { transform: rotate(-12deg) translateY(-25%); } }
.h-live .h-label b { font-size: clamp(48px, 9vw, 96px); line-height: 1; letter-spacing: 0.08em; }
.h-live .h-label small { font-size: 11px; }
.h-live .h-label span { font-size: 18px; }
.h-live p { font-size: 14px; color: rgba(220, 235, 255, 0.85); margin-top: 6px; }
.h-live .h-go { font-size: 13px; bottom: 22px; right: 26px; animation: blink 1.4s steps(2) infinite; }

/* ライブの選択 */
.home-live { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.hl-head { display: flex; align-items: center; gap: 12px; }
.hl-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 1; min-height: min(60vh, 460px); }
.hl-card { --tc: #5ef2ff; position: relative; overflow: hidden; text-align: left; color: var(--text); border: 1px solid var(--panel-line); background: var(--panel); border-radius: 8px;
  padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; backdrop-filter: blur(6px); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; animation: fadeUp 0.4s ease-out both; }
.hl-card.multi { --tc: #ff5a8c; animation-delay: 0.08s; }
.hl-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 70% 20%, color-mix(in srgb, var(--tc) 22%, transparent), transparent 60%); pointer-events: none; }
.hl-card:hover, .hl-card:focus-visible { transform: translateY(-4px); border-color: var(--tc); box-shadow: 0 0 34px color-mix(in srgb, var(--tc) 35%, transparent); outline: none; }
.hl-card small { position: relative; font-family: var(--font-d); font-size: 11px; letter-spacing: 0.3em; color: var(--tc); }
.hl-card b { position: relative; font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; text-shadow: 0 0 18px color-mix(in srgb, var(--tc) 50%, transparent); }
.hl-card p { position: relative; margin: 0; font-size: 13px; color: rgba(210, 225, 255, 0.8); line-height: 1.6; max-width: 32em; }
.hl-card .h-go { --tc: inherit; color: var(--tc); bottom: 22px; right: 24px; }
.hl-ico { position: absolute; top: 26px; right: 28px; display: flex; gap: 8px; }
.hl-ico i { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--tc); box-shadow: 0 0 16px color-mix(in srgb, var(--tc) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--tc) 40%, transparent); }
.hl-card.multi .hl-ico i { width: 34px; height: 34px; }
.hl-card.multi .hl-ico i:nth-child(2) { margin-top: 14px; }

/* 選曲画面の見出し */
#select .topbar .meta-title { font-size: 15px; }

@media (max-width: 860px) {
  .home-main { grid-template-columns: 1fr 1fr; }
  .h-tile { min-height: 116px; padding: 14px; }
  .h-label b { font-size: 20px; }
  .h-tile.h-live { min-height: 220px; padding: 20px; }
  .h-jackets { width: 110%; right: -40%; }
  .hl-cards { grid-template-columns: 1fr; min-height: 0; }
  .hl-card { min-height: 190px; padding: 22px; }
  .home-body { padding: 4px 12px 20px; }
  .hp-login { margin-left: 0; }
}
@media (max-width: 860px) { .home-main .h-tile:last-child { grid-column: 1 / -1; min-height: 96px; } }
body.touch .h-go { display: none; }
.lm-diff { font-style: normal; font-family: var(--font-d); font-size: 9px; font-weight: 800; color: var(--dc); border: 1px solid var(--dc); border-radius: 3px; padding: 0 4px; margin-left: auto; margin-right: 8px; white-space: nowrap; }
.lv-list .lm-diff { margin: 0 0 0 6px; vertical-align: 1px; }

/* きくだけ(音楽プレーヤー) */
.home-main { grid-template-columns: repeat(3, 1fr); }
.h-tile.h-music { --tc: #5ef2ff; }
#player .topbar input[type=search] { background: rgba(0, 0, 0, 0.45); color: var(--text); border: 1px solid var(--panel-line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; width: min(260px, 40vw); }
.pl-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: 16px; padding: 0 20px 20px; max-width: 1180px; width: 100%; margin: 0 auto; }
.pl-now { border: 1px solid var(--panel-line); background: var(--panel); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.pl-art { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.pl-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-art img { width: 62%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 40%, transparent); animation: plSpin 24s linear infinite; animation-play-state: paused; }
.pl-now.playing .pl-art img { animation-play-state: running; }
@keyframes plSpin { to { transform: rotate(360deg); } }
.pl-info { text-align: center; }
.pl-info h1 { margin: 2px 0; font-size: 22px; }
.pl-artist { font-size: 12px; color: var(--muted); }
.pl-seekrow { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-size: 12px; color: var(--muted); }
.pl-seekrow input { flex: 1; accent-color: var(--accent); }
.pl-ctrl { display: flex; justify-content: center; align-items: center; gap: 14px; }
.pl-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--panel-line); background: rgba(0, 0, 0, 0.35); font-size: 18px; display: grid; place-items: center; }
.pl-btn:hover { border-color: var(--accent); }
.pl-btn.big { width: 66px; height: 66px; font-size: 22px; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, rgba(0, 0, 0, 0.35)); box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.pl-btn.small { width: 38px; height: 38px; font-size: 15px; opacity: 0.45; }
.pl-btn.small.on { opacity: 1; border-color: var(--accent); }
.pl-hint { text-align: center; margin: 0; }
.pl-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.pl-list .empty { color: var(--muted); padding: 12px; }
.pl-list button { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-align: left; color: inherit; border: 1px solid var(--panel-line); background: var(--panel); border-radius: 8px; padding: 6px 12px 6px 6px; }
.pl-list button:hover { border-color: var(--c); }
.pl-list button.cur { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--panel)); }
.pl-list button.cur .pl-tt b::before { content: '♪ '; color: var(--c); }
.pl-list img { width: 44px; height: 44px; border-radius: 4px; }
.pl-tt { display: flex; flex-direction: column; min-width: 0; }
.pl-tt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tt small { font-size: 11px; color: var(--muted); }
.pl-len { font-family: var(--font-d); font-size: 12px; color: var(--muted); }
@media (max-width: 860px) {
  .home-main { grid-template-columns: 1fr 1fr; }
  .pl-body { grid-template-columns: 1fr; overflow-y: auto; padding: 0 12px 16px; }
  .pl-list { overflow: visible; }
  .pl-art { width: min(100%, 320px); margin: 0 auto; }
  #player .topbar input[type=search] { width: 100%; order: 10; }
}
.pl-art { width: min(100%, 46vh); margin: 0 auto; }
@media (max-width: 860px) {
  .pl-body { display: flex; flex-direction: column; }
  .pl-now { overflow: visible; flex: none; }
  .pl-art { width: min(100%, 34vh); }
  .pl-hint { display: none; }
}

/* チュートリアル */
.tut-box h2 { margin: 6px 0 8px; }
.tut-box p { line-height: 1.7; }
.tut-steps { margin: 4px 0 14px; padding-left: 1.4em; line-height: 1.9; }
.tut-steps li::marker { color: var(--accent); font-family: var(--font-d); font-weight: 800; }
.tut-result { font-size: 15px; }
.tut-result b { font-family: var(--font-d); font-size: 22px; color: var(--accent); }
.tut-fc { color: #7ff9ff; font-weight: 800; }
.tut-box .modal-actions { flex-wrap: wrap; }

/* ガチャの切り替え・イベントガチャ */
.gacha-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.g-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--panel-line); background: var(--panel); color: var(--text); font-weight: 700; font-size: 14px; }
.g-tab small { font-weight: 400; font-size: 11px; color: var(--muted); }
.g-tab.sel { border-color: #ffd25e; box-shadow: 0 0 16px rgba(255, 210, 94, 0.3); }
.g-tab.theme-halloween { border-color: rgba(255, 138, 31, 0.5); }
.g-tab.theme-halloween small { color: #ffb36b; }
.g-tab.theme-halloween.sel { border-color: #ff8a1f; background: linear-gradient(135deg, rgba(255, 138, 31, 0.22), rgba(120, 40, 200, 0.22)), var(--panel); box-shadow: 0 0 18px rgba(255, 138, 31, 0.4); }
.gacha-banner { position: relative; overflow: hidden; }
.gacha-banner > * { position: relative; }
.gb-deco { display: none; }
.gb-period { display: inline-block; font-size: 12px; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; border: 1px solid currentColor; }
.gb-period b { margin-left: 6px; }
.gb-pickup { margin: 14px 0 12px; }
.gp-label { font-family: var(--font-d); font-size: 11px; letter-spacing: 0.3em; margin-bottom: 8px; }
.gp-units { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.gp-u { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 104px; font-size: 12px; }
.gp-u b { font-size: 12px; line-height: 1.3; }
.gp-u small { font-size: 10px; color: var(--muted); }
.gp-u.r4 { width: 120px; }
.gacha-banner.theme-halloween { border-color: rgba(255, 138, 31, 0.6); background:
  radial-gradient(circle at 80% -10%, rgba(255, 231, 168, 0.25), transparent 30%),
  radial-gradient(circle at 50% 0%, rgba(255, 138, 31, 0.3), transparent 60%),
  radial-gradient(circle at 50% 120%, rgba(140, 50, 220, 0.35), transparent 60%), #0c0614; }
.gacha-banner.theme-halloween .gb-deco { display: block; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 12% 30%, rgba(255, 138, 31, 0.5) 0 2px, transparent 3px), radial-gradient(circle at 88% 60%, rgba(180, 90, 255, 0.5) 0 2px, transparent 3px), radial-gradient(circle at 30% 80%, rgba(255, 138, 31, 0.4) 0 1.5px, transparent 2.5px), radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px);
  animation: hwFloat 6s ease-in-out infinite alternate; }
@keyframes hwFloat { to { transform: translateY(-8px); } }
.gacha-banner.theme-halloween .gb-title { color: #c08bff; }
.gacha-banner.theme-halloween .gb-title b { text-shadow: 0 0 18px #ff8a1f, 0 0 32px rgba(255, 138, 31, 0.6); }
.gacha-banner.theme-halloween .gb-period, .gacha-banner.theme-halloween .gp-label { color: #ffb36b; }
.gacha-banner.theme-halloween .gb-pity { color: #ff8a1f; }
.gacha-banner.theme-halloween .gb-sub { color: #e9d7ff; }
.gacha-banner.theme-halloween #btn-gacha-10 { border-color: #ff8a1f; background: rgba(255, 138, 31, 0.18); box-shadow: 0 0 18px rgba(255, 138, 31, 0.4); }
.lineup-row b { white-space: nowrap; }
.gr-lim, .uc-lim { font-size: 10px; font-weight: 800; color: #1c0830; background: #ff8a1f; border-radius: 3px; padding: 0 5px; }
.gr-lim { position: absolute; top: 6px; left: 6px; }
.uc-lim { margin-right: 4px; vertical-align: 1px; }
.h-event { color: #ff8a1f; font-weight: 800; }
.h-tile.h-event-on { border-color: rgba(255, 138, 31, 0.6); }
.gp-units + .gp-units { margin-top: 10px; }
.gp-u.r2 { width: 88px; }
.gp-u.r2 b { font-size: 11px; }

/* 管理者ページ */
.adm-chip { border-color: rgba(255, 210, 94, 0.6); color: #ffd25e; }
.adm-chip[hidden] { display: none; }
.adm-body { max-width: 1100px; margin: 0 auto; width: 100%; }
.adm-deny { padding: 40px; text-align: center; color: #ff8a9a; font-weight: 700; }
.adm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.adm-card { border: 1px solid var(--panel-line); background: var(--panel); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.adm-card small { font-size: 11px; color: var(--muted); }
.adm-card b { font-family: var(--font-d); font-size: 26px; color: #fff; }
.adm-card span { font-size: 11px; color: var(--muted); }
.adm-h { margin: 22px 0 8px; font-size: 14px; letter-spacing: 0.08em; color: var(--muted); }
.adm-online { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.adm-online li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--panel-line); background: var(--panel); border-radius: 6px; font-size: 14px; flex-wrap: wrap; }
.adm-online li span { color: var(--accent); }
.adm-online li small { color: var(--muted); margin-left: auto; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6dffb0; box-shadow: 0 0 8px #6dffb0; margin-right: 6px; font-style: normal; }
.adm-table-wrap { overflow-x: auto; border: 1px solid var(--panel-line); border-radius: 8px; background: var(--panel); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.adm-table th, .adm-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(110, 140, 255, 0.12); }
.adm-table th { font-size: 11px; color: var(--muted); font-weight: 700; }
.adm-table th[data-sort] { cursor: pointer; }
.adm-table th.on { color: var(--accent); }
.adm-table td small { display: block; font-size: 10px; color: var(--muted); }
.adm-table td.n { text-align: right; font-family: var(--font-d); }
.adm-table tr.on td:first-child { font-weight: 700; }
.adm-badge { font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 3px; background: #ffd25e; color: #1a1300; }
.adm-badge.fc { background: #7ff9ff; } .adm-badge.ap { background: #ffd25e; }

/* 段位道場 */
.hl-cards { grid-template-columns: repeat(3, 1fr); }
.hl-card.dan { --tc: #ffd25e; animation-delay: 0.16s; }
.hl-card.dan .hl-ico i { border-radius: 4px; transform: rotate(45deg); }
.dan-best { font-weight: 800; color: #ffd25e; margin-left: 10px; }
.hp-dan { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 3px; background: #ffd25e; color: #1a1300; }
.dan-help { margin: 0 0 12px; line-height: 1.7; }
.dan-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dan-card { --dc: hsl(calc(200 - var(--dn) * 18), 90%, 65%); border: 1px solid var(--panel-line); border-top: 3px solid var(--dc); background: var(--panel); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.dan-card.kaiden { --dc: #ffd25e; background: linear-gradient(160deg, rgba(255, 210, 94, 0.12), transparent 60%), var(--panel); box-shadow: 0 0 22px rgba(255, 210, 94, 0.2); }
.dan-card.cleared { border-color: color-mix(in srgb, var(--dc) 60%, transparent); }
.dan-name { display: flex; align-items: center; gap: 10px; }
.dan-name b { font-size: 26px; font-weight: 900; color: var(--dc); text-shadow: 0 0 14px color-mix(in srgb, var(--dc) 50%, transparent); }
.dan-pass { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 3px; background: var(--dc); color: #05060f; }
.dan-songs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dan-songs li { display: flex; align-items: center; gap: 10px; }
.dan-songs img { width: 34px; height: 34px; border-radius: 4px; }
.dan-songs span { display: flex; flex-direction: column; min-width: 0; }
.dan-songs b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dan-songs small { font-size: 10px; color: var(--muted); }
.dan-rule { font-size: 11px; color: var(--muted); }
.dan-go { margin-top: auto; }
body.live #btn-p-retry { display: none; }
.dan-result-box { width: min(560px, 100%); text-align: center; }
.dan-verdict { font-size: 64px; font-weight: 900; letter-spacing: 0.2em; margin: 6px 0; animation: rankIn 0.6s ease-out both; }
.dan-result-box.pass .dan-verdict { color: #ffd25e; text-shadow: 0 0 30px rgba(255, 210, 94, 0.7); }
.dan-result-box.fail .dan-verdict { color: #ff4f6e; text-shadow: 0 0 24px rgba(255, 79, 110, 0.5); }
.dan-sub { color: var(--muted); margin: 0 0 12px; }
.dan-res { list-style: none; padding: 0; margin: 0 0 10px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.dan-res li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.3); }
.dan-res li span { font-family: var(--font-d); font-weight: 800; }
.dan-res li small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.dan-res li.failed span { color: #ff4f6e; }
.dan-reward { color: #ffd25e; font-weight: 700; min-height: 1.2em; }
@media (max-width: 860px) { .hl-cards { grid-template-columns: 1fr; } }

/* お気に入り(☆) */
.sc-fav { float: left; margin: 1px 6px 0 0; font-size: 16px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 4px; transition: color 0.15s, transform 0.15s; }
.sc-fav:hover { color: #ffd25e; transform: scale(1.2); }
.sc-fav.on { color: #ffd25e; text-shadow: 0 0 8px rgba(255, 210, 94, 0.7); }
.d-fav { margin-top: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--panel-line); background: rgba(0, 0, 0, 0.3); color: var(--muted); font-size: 12px; }
.d-fav:hover { border-color: #ffd25e; color: #ffd25e; }
.d-fav.on { border-color: #ffd25e; color: #ffd25e; background: rgba(255, 210, 94, 0.12); font-weight: 700; }

/* みんなでライブ: ホストは左に曲リスト(ひとりでライブの選曲画面と同じ見た目) */
#live .meta-body:has(.live-roombox.host:not([hidden])) { max-width: 1320px; }
.live-pick { display: none; min-width: 0; }
.live-roombox.host { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.75fr); align-items: start; }
.live-roombox.host .live-pick { display: flex; flex-direction: column; gap: 8px; }
.live-pick .song-list { max-height: calc(100vh - 230px); overflow-y: auto; display: grid; gap: 6px; padding: 2px 12px 8px 2px; }
.live-pick .song-card { max-width: none; width: 100%; }
.live-pick .song-card.sel { transform: none; }
.live-pick .song-list.locked .song-card:not(.sel) { opacity: 0.5; }
.live-pick > * { flex-shrink: 0; }
.live-pick .song-col .song-list, .live-pick .song-list { flex: none; }
.live-pick .filter-chips { flex-wrap: wrap; }
.lr-pickmsg { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 1100px) {
  .live-roombox.host { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .live-roombox.host .live-pick { grid-row: span 2; }
}
@media (max-width: 760px) {
  .live-roombox.host { grid-template-columns: 1fr; }
  .live-roombox.host .live-pick { order: 2; grid-row: auto; }
  .live-roombox.host .live-room-side { order: 3; }
  .live-pick .song-list { display: grid; max-height: 55vh; overflow-x: hidden; }
  .live-pick .song-card { min-width: 0; }
}

/* MVつきの曲のマーク */
.mv-tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; font: 700 10px/16px 'Orbitron', sans-serif; letter-spacing: 1px; color: #0a0d1c; background: linear-gradient(90deg, #ff6b9e, #ffd25e); vertical-align: 1px; }

/* デイリーチャレンジ・コースモードのカード */
.hl-card.daily { --tc: #7dffb0; animation-delay: 0.24s; }
.hl-card.daily .hl-ico i { border-radius: 8px; }
.hl-card.course { --tc: #b18cff; animation-delay: 0.32s; }
.hl-card.course .hl-ico i { width: 30px; height: 30px; }
.hl-card.course .hl-ico i:nth-child(2) { margin-top: 12px; }
.daily-info { position: relative; display: flex; gap: 12px; align-items: center; max-width: 34em; }
.daily-info img { width: 64px; height: 64px; border-radius: 6px; flex-shrink: 0; border: 1px solid var(--tc); }
.daily-info span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daily-info b { font-size: 18px !important; text-shadow: none !important; }
.daily-info small { letter-spacing: 0.02em !important; font-family: inherit !important; color: rgba(210, 225, 255, 0.85) !important; font-size: 12px !important; }
.daily-info .daily-top { color: var(--tc) !important; }

/* リザルト: 判定グラフ */
.r-graph-wrap { margin-top: 12px; }
.r-graph { display: block; width: 100%; height: 120px; }
.r-graph-note { margin: 4px 0 0; }

/* コースモード */
.course-box { width: min(640px, 100%); max-height: 88vh; overflow: auto; }
.course-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.course-list li { display: flex; align-items: center; gap: 8px; }
.course-list .cs-no { font-family: var(--font-d); font-weight: 800; color: #b18cff; width: 1.4em; text-align: center; }
.course-list .cs-song { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; text-align: left; color: inherit; font: inherit; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid var(--panel-line); border-left: 3px solid var(--c); border-radius: 8px; transition: background 0.15s, border-color 0.15s; }
.course-list .cs-song:hover, .course-list .cs-song:focus-visible { background: rgba(255,255,255,0.09); border-color: var(--c); }
.course-list img { width: 44px; height: 44px; border-radius: 4px; flex: none; }
.course-list .cs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.course-list .cs-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.course-list .cs-text small { color: #8a94c0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-list .cs-lv { flex: none; font-family: var(--font-d); font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.course-list .cs-lv.easy { color: #7dffb0; background: rgba(125,255,176,0.12); }
.course-list .cs-lv.normal { color: #ffd25e; background: rgba(255,210,94,0.12); }
.course-list .cs-lv.hard { color: #ff6b9e; background: rgba(255,107,158,0.12); }
.course-list .cs-move { display: flex; flex-direction: column; gap: 2px; }
.course-list .cs-move button { background: none; border: 1px solid var(--panel-line); color: inherit; border-radius: 4px; font-size: 9px; line-height: 1; padding: 3px 6px; cursor: pointer; }
.course-list .cs-move button:disabled { opacity: 0.25; cursor: default; }
.cs-del { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--panel-line); background: transparent; color: var(--text); flex: none; }
.cs-del:disabled { opacity: 0.3; }
.course-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.course-row label { margin-left: auto; font-size: 13px; }
.course-result { border: 1px solid var(--panel-line); border-radius: 8px; padding: 10px 14px; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.course-result.pass b { color: #7dffb0; }
.course-result.fail b { color: #ff7a8e; }
.course-result ol { margin: 4px 0 0; padding-left: 1.2em; font-size: 13px; }
.btn-line.small { padding: 6px 12px; font-size: 13px; }

/* 判定タイミングの自動調整 */
.calib-box { width: min(480px, 100%); text-align: center; }
.calib-pad { display: block; width: 100%; height: 120px; margin: 14px 0; border-radius: 10px; border: 2px solid var(--accent); background: rgba(94, 242, 255, 0.06); color: var(--text); font: 800 22px var(--font-d); letter-spacing: 0.1em; }
.calib-pad.hit { animation: calib-hit 0.18s ease-out; }
@keyframes calib-hit { from { background: rgba(94, 242, 255, 0.4); } to { background: rgba(94, 242, 255, 0.06); } }
.calib-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pad-help { margin: 4px 0 8px; }
/* キーコンフィグ */
.kc-wrap { margin: 10px 0 4px; padding: 10px 0 2px; border-top: 1px solid var(--panel-line); }
.kc-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.kc-head > span { flex: 1; }
.kc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 6px; }
.kc-lane { display: grid; gap: 5px; text-align: center; }
.kc-name { font-size: 11px; color: var(--muted); }
.kc-key { font-family: var(--font-d); font-weight: 700; font-size: 18px; min-height: 46px; padding: 4px; border-radius: 8px; cursor: pointer;
  color: var(--text); background: rgba(20, 28, 62, 0.85); border: 1px solid rgba(94, 242, 255, 0.45);
  transition: background 0.15s var(--ease-out, ease), border-color 0.15s, box-shadow 0.15s; }
.kc-lane:nth-child(2) .kc-key, .kc-lane:nth-child(3) .kc-key { border-color: rgba(255, 79, 216, 0.45); }
.kc-key.alt { font-size: 13px; min-height: 34px; color: var(--muted); background: rgba(10, 14, 34, 0.8); }
.kc-key.empty { color: rgba(138, 151, 192, 0.5); border-style: dashed; }
.kc-key:hover { box-shadow: 0 0 0 2px rgba(94, 242, 255, 0.25); }
.kc-key.wait { color: #02030a; background: var(--cyan); border-color: var(--cyan); animation: kc-wait 0.9s ease-in-out infinite; }
@keyframes kc-wait { 50% { box-shadow: 0 0 0 4px rgba(94, 242, 255, 0.35); } }
body.touch .kc-wrap { display: none; }
.modal-box select { background: rgba(0, 0, 0, 0.45); color: var(--text); border: 1px solid var(--panel-line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }

/* コースの曲選び中の選曲画面 */
.pick-bar { display: flex; align-items: center; gap: 10px; margin-left: 12px; padding: 4px 6px 4px 12px; border: 1px solid #b18cff; border-radius: 999px; background: rgba(177,140,255,0.12); font-size: 13px; min-width: 0; }
.pick-bar[hidden] { display: none; }
.pick-bar b { color: #d6c4ff; white-space: nowrap; }
.pick-bar span { color: #8a94c0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.picking #btn-share, body.picking #team-fx-mini { display: none; }
@media (max-width: 700px) { .pick-bar span { display: none; } }

/* ===== クリスマスイベント(12/1〜1/31。body.xmas は js/event.js が付ける) ===== */
body.xmas { --accent: #ff5a6e; --panel-line: rgba(255, 140, 150, 0.24); }
.xmas-snow { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 3; pointer-events: none; }
body.playing .xmas-snow { display: none; }
body.xmas .screen.meta { background:
  radial-gradient(ellipse at 0% 0%, rgba(255, 59, 78, 0.16), transparent 45%),
  radial-gradient(ellipse at 100% 100%, rgba(47, 220, 106, 0.13), transparent 50%), rgba(2, 3, 10, 0.55); }
/* ロゴ: 赤と緑の光 + サンタ帽 */
body.xmas .logo-big b { text-shadow: 0 0 18px #ff3b4e, 0 0 50px rgba(255, 59, 78, 0.45), 4px 0 0 rgba(47, 220, 106, 0.7); }
.xmas-hat { position: absolute; left: -0.1em; top: -0.3em; width: 0.62em; transform: rotate(-16deg); filter: drop-shadow(0 0 10px rgba(255, 59, 78, 0.6)); pointer-events: none; }
body.xmas .logo-small b { color: #fff; text-shadow: 0 0 10px #ff3b4e, 2px 0 0 rgba(47, 220, 106, 0.6); }
body.xmas .logo-small b::after { content: ' 🎄'; text-shadow: none; }
/* 上のバーに電飾 */
body.xmas .screen.meta .topbar { position: relative; }
body.xmas .screen.meta .topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px; pointer-events: none;
  background-image: radial-gradient(circle, #ff3b4e 0 3px, transparent 4px), radial-gradient(circle, #2fdc6a 0 3px, transparent 4px), radial-gradient(circle, #ffd25e 0 3px, transparent 4px), radial-gradient(circle, #5ec8ff 0 3px, transparent 4px);
  background-size: 96px 12px; background-position: 0 0, 24px 0, 48px 0, 72px 0; background-repeat: repeat-x;
  filter: drop-shadow(0 0 4px rgba(255, 220, 160, 0.8)); animation: xmasTwinkle 1.6s steps(2) infinite; }
@keyframes xmasTwinkle { 50% { opacity: 0.55; } }
body.xmas .h-tile:hover, body.xmas .h-tile:focus-visible { border-color: #ff5a6e; }
/* ホームのお知らせ */
.xmas-banner { position: relative; overflow: hidden; flex: none; display: flex; align-items: center; padding: 20px 20px 14px; border-radius: 12px; border: 1px solid rgba(255, 90, 110, 0.6);
  background: linear-gradient(110deg, rgba(200, 20, 40, 0.45), rgba(20, 110, 60, 0.42)), #0a0612; box-shadow: 0 0 24px rgba(255, 59, 78, 0.25); }
.xmas-banner .xb-lights { position: absolute; left: 0; right: 0; top: 2px; height: 10px;
  background-image: radial-gradient(circle, #ffd25e 0 2.5px, transparent 3.5px), radial-gradient(circle, #fff 0 2px, transparent 3px);
  background-size: 40px 10px; background-position: 0 0, 20px 0; animation: xmasTwinkle 1.2s steps(2) infinite; }
.xb-text { display: flex; flex-direction: column; gap: 3px; }
.xb-text small { font-family: var(--font-d); font-size: 11px; letter-spacing: 0.25em; color: #ffd25e; }
.xb-text b { font-size: 20px; color: #fff; text-shadow: 0 0 12px rgba(255, 59, 78, 0.8); }
.xb-text span { font-size: 13px; color: #ffe3e6; }
/* 曲リストの「期間限定」 */
.ev-tag { display: inline-block; font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(90deg, #e0283c, #1f9c50); border-radius: 3px; padding: 0 5px; margin-right: 6px; vertical-align: 2px; letter-spacing: 0; }
/* クリスマスガチャ */
.g-tab.theme-xmas { border-color: rgba(255, 90, 110, 0.5); }
.g-tab.theme-xmas small { color: #ff9aa6; }
.g-tab.theme-xmas.sel { border-color: #ff3b4e; background: linear-gradient(135deg, rgba(255, 59, 78, 0.25), rgba(47, 220, 106, 0.2)), var(--panel); box-shadow: 0 0 18px rgba(255, 59, 78, 0.4); }
.gacha-banner.theme-xmas { border-color: rgba(255, 90, 110, 0.6); background:
  radial-gradient(circle at 50% -10%, rgba(255, 210, 94, 0.25), transparent 35%),
  radial-gradient(circle at 15% 100%, rgba(255, 59, 78, 0.35), transparent 55%),
  radial-gradient(circle at 85% 100%, rgba(47, 220, 106, 0.3), transparent 55%), #070a12; }
.gacha-banner.theme-xmas .gb-deco { display: block; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 10% 20%, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle at 30% 60%, #fff 0 1px, transparent 2px), radial-gradient(circle at 75% 30%, #fff 0 2px, transparent 3px), radial-gradient(circle at 90% 70%, #fff 0 1px, transparent 2px), radial-gradient(circle at 55% 85%, #fff 0 1.5px, transparent 2.5px);
  opacity: 0.7; animation: hwFloat 5s ease-in-out infinite alternate; }
.gacha-banner.theme-xmas .gb-title { color: #7dffb0; }
.gacha-banner.theme-xmas .gb-title b { text-shadow: 0 0 18px #ff3b4e, 0 0 32px rgba(255, 59, 78, 0.6); }
.gacha-banner.theme-xmas .gb-period, .gacha-banner.theme-xmas .gp-label { color: #ffd25e; }
.gacha-banner.theme-xmas .gb-pity { color: #ff5a6e; }
.gacha-banner.theme-xmas .gb-sub { color: #ffe3e6; }
.gacha-banner.theme-xmas #btn-gacha-10 { border-color: #ff3b4e; background: rgba(255, 59, 78, 0.18); box-shadow: 0 0 18px rgba(255, 59, 78, 0.4); }
body.xmas .h-event { color: #ff5a6e; }
body.xmas .h-tile.h-event-on { border-color: rgba(255, 90, 110, 0.6); }

/* お問い合わせ(リクエスト箱) */
.rq-box { width: min(620px, 100%); }
.rq-box h2 { margin-top: 4px; }
.rq-box textarea { width: 100%; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--panel-line); color: var(--text); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; resize: vertical; min-height: 110px; -webkit-user-select: text; user-select: text; }
.rq-box textarea:focus { outline: none; border-color: var(--accent); }
.rq-box select { width: 100%; font-size: 15px; padding: 8px 10px; }
.rq-count { display: block; text-align: right; color: var(--muted); font-size: 11px; margin-top: 2px; }
.rq-count.over { color: #ff8a9a; }
.rq-h { margin: 18px 0 8px; font-size: 14px; color: var(--muted); letter-spacing: 0.1em; }
.rq-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.rq-list li { border: 1px solid var(--panel-line); border-radius: 10px; padding: 8px 12px; background: rgba(0, 0, 0, 0.25); }
.rq-list p { margin: 4px 0 0; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.rq-top { display: flex; gap: 8px; align-items: center; font-size: 11px; }
.rq-top small { color: var(--muted); }
.rq-top small:last-child { margin-left: auto; }
.rq-kind { color: var(--muted); }
.rq-st { padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.st-new { color: #9ab0d6; } .st-doing { color: #ffd25e; } .st-done { color: #6dffb0; } .st-wont { color: #8a8fa6; }
.rq-reply { border-left: 3px solid var(--accent); padding-left: 8px; color: var(--text); }
.rq-reply b { display: block; font-size: 11px; color: var(--accent); }
.adm-rq li { display: block; }
.adm-rq .rq-edit { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.adm-rq .rq-edit input { flex: 1; min-width: 160px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--panel-line); color: var(--text); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; }
.adm-rq .rq-edit select { background: rgba(0, 0, 0, 0.4); color: var(--text); border: 1px solid var(--panel-line); border-radius: 6px; padding: 4px 6px; }

/* =========================================================================
   動きとイージング(motion.js と組み合わせて使う)
   ========================================================================= */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);      /* すっと止まる */
  --ease-spring: cubic-bezier(0.2, 1.3, 0.35, 1);  /* 少し行き過ぎて戻る */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* --- モーダル: 開くとき(背景がふわっと暗くなり、箱が少し下からポンと出る)・閉じるとき --- */
.overlay.on { animation: ovIn 0.24s var(--ease-out) both; }
.overlay.on > .modal-box, .overlay.on > .ld-card { animation: boxIn 0.38s var(--ease-spring) both; }
.overlay.closing { display: flex; pointer-events: none; animation: ovOut 0.2s var(--ease-in-out) both; }
.overlay.closing > .modal-box, .overlay.closing > .ld-card { animation: boxOut 0.2s var(--ease-in-out) both; }
@keyframes ovIn { from { opacity: 0; } }
@keyframes ovOut { to { opacity: 0; } }
@keyframes boxIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes boxOut { to { opacity: 0; transform: translateY(6px) scale(0.97); } }
/* モーダルの中身は少しずつ遅れて入る */
.overlay.on .modal-box > * { animation: fadeUp 0.36s var(--ease-out) both; }
.overlay.on .modal-box > *:nth-child(2) { animation-delay: 0.03s; }
.overlay.on .modal-box > *:nth-child(3) { animation-delay: 0.06s; }
.overlay.on .modal-box > *:nth-child(4) { animation-delay: 0.09s; }
.overlay.on .modal-box > *:nth-child(n+5) { animation-delay: 0.12s; }
/* 更新履歴・リクエスト一覧は1行ずつ */
.overlay.on .cl-list > li, .overlay.on .rq-list > li { animation: fadeUp 0.4s var(--ease-out) both; }
.overlay.on .cl-list > li:nth-child(2), .overlay.on .rq-list > li:nth-child(2) { animation-delay: 0.05s; }
.overlay.on .cl-list > li:nth-child(3), .overlay.on .rq-list > li:nth-child(3) { animation-delay: 0.1s; }
.overlay.on .cl-list > li:nth-child(4), .overlay.on .rq-list > li:nth-child(4) { animation-delay: 0.15s; }
.overlay.on .cl-list > li:nth-child(n+5), .overlay.on .rq-list > li:nth-child(n+5) { animation-delay: 0.2s; }

/* --- トースト: ばねのように下から出る --- */
.toast { transition: opacity 0.22s var(--ease-out), transform 0.42s var(--ease-spring); transform: translate(-50%, 24px) scale(0.96); }
.toast.on { transform: translate(-50%, 0) scale(1); }

/* --- ボタン: なめらかに反応し、押すと少し沈む --- */
.btn-glow, .btn-line, .btn-play, .chip, .f-chip, .diff-btn, .h-tile, .song-card, .cr-btn, .mini, .acc-tab {
  transition: transform 0.22s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.2s var(--ease-out), background 0.25s var(--ease-out), color 0.2s var(--ease-out), opacity 0.2s;
}
/* 押したときは形を変えずに(縮めると端を押したときにクリックが外れるので)、少し暗く沈んだ見た目にする */
.btn-glow:active, .btn-line:active, .btn-play:active, .chip:active, .f-chip:active, .cr-btn:active, .mini:active, .acc-tab:active, .h-tile:active, .diff-btn:active, .song-card:active {
  filter: brightness(0.82); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45); transition-duration: 0.06s; }
.chip:hover, .f-chip:hover { box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.f-chip.sel { animation: chipSel 0.32s var(--ease-spring); }
@keyframes chipSel { 40% { filter: brightness(1.4); } }
.diff-btn:hover { box-shadow: 0 0 12px color-mix(in srgb, currentColor 30%, transparent); }
.diff-btn.sel { animation: diffSel 0.4s var(--ease-spring); }
@keyframes diffSel { 0% { filter: brightness(1.8); } 100% { filter: none; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; transition: outline-offset 0.15s var(--ease-out); }

/* 押した所から広がる波紋 */
.has-ripple { overflow: hidden; isolation: isolate; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent) 0%, transparent 60%);
  transform: scale(0); opacity: 0.9; animation: ripple 0.65s var(--ease-out) forwards; z-index: 0; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* --- 選曲: 曲リストは上から順に流れ込む。選んだ曲は横にすべる --- */
.song-list.stagger > .song-card.anim { animation: cardIn 0.42s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 22ms); }
@keyframes cardIn { from { opacity: 0; transform: translateX(-14px); } }
.song-card { transition-duration: 0.28s; }
.song-card.sel { transition: transform 0.38s var(--ease-spring), background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s; }
.song-card:hover:not(.sel) { background: rgba(14, 20, 50, 0.8); }
/* 曲を変えたら、ジャケットと曲名が入れ替わる */
.d-jacket.swap { animation: jacketSwap 0.45s var(--ease-spring); }
@keyframes jacketSwap { 0% { opacity: 0.2; transform: perspective(500px) rotateY(-28deg) scale(0.9); filter: blur(3px); } 100% { opacity: 1; transform: none; filter: none; } }
.d-title.swap, .d-genre.swap, .d-meta.swap { animation: titleSwap 0.4s var(--ease-out); }
.d-meta.swap { animation-delay: 0.04s; }
@keyframes titleSwap { from { opacity: 0; transform: translateY(8px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.diffs.swap .diff-btn { animation: fadeUp 0.35s var(--ease-out) both; }
.diffs.swap .diff-btn:nth-child(2) { animation-delay: 0.04s; }
.diffs.swap .diff-btn:nth-child(3) { animation-delay: 0.08s; }

/* --- 数字のカウント(コイン): 増えたら金色、減ったら赤っぽく一瞬光る --- */
.num-up { animation: numUp 0.7s var(--ease-out); }
.num-down { animation: numDown 0.7s var(--ease-out); }
@keyframes numUp { 0% { color: #ffd25e; text-shadow: 0 0 12px #ffd25e; transform: translateY(-2px); } }
@keyframes numDown { 0% { color: #ff8a9a; text-shadow: 0 0 10px #ff5a6e; } }
.coin-val { display: inline-block; }

/* --- 曲の読み込み画面: ジャケットと文字が順に入る --- */
#loading.on .ld-jacket { animation: ldJacket 0.6s var(--ease-spring) both; }
#loading.on .ld-info > * { animation: fadeUp 0.45s var(--ease-out) both; }
#loading.on .ld-info > *:nth-child(2) { animation-delay: 0.06s; }
#loading.on .ld-info > *:nth-child(3) { animation-delay: 0.12s; }
#loading.on .ld-bar { animation: ldBar 0.6s var(--ease-out) both 0.15s; transform-origin: left; }
@keyframes ldJacket { from { opacity: 0; transform: perspective(600px) rotateY(-40deg) translateX(-20px) scale(0.85); } }
@keyframes ldBar { from { transform: scaleX(0); } }
.ld-bar i { transition: width 0.3s var(--ease-out); }

/* --- 画面の切り替え: 上の帯と見出しも少し遅れてすべり込む --- */
.screen.active .topbar { animation: topIn 0.42s var(--ease-out) both; }
@keyframes topIn { from { opacity: 0; transform: translateY(-10px); } }
.screen.active .meta-body > *, .screen.active .select-body > * { animation-timing-function: var(--ease-out); animation-duration: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .overlay.on, .overlay.on *, .overlay.closing, .song-list.stagger > *, .swap, .diffs.swap *, .num-up, .num-down, .screen.active .topbar, #loading.on * { animation: none !important; }
  .ripple { display: none; }
}

/* ===== 続けたくなる要素(growth.js / match.js) ===== */
/* 称号・連続日数 */
.g-title { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--tc); border: 1px solid var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent); }
.g-title b { font-family: var(--font-d); font-size: 11px !important; }
.g-streak { font-size: 12px; font-weight: 800; color: #ffb35e; }
.g-streak.warn { color: #ff7a5e; animation: gWarn 1.6s ease-in-out infinite; }
@keyframes gWarn { 50% { opacity: 0.55; } }
.g-prof { padding: 3px 10px !important; font-size: 12px !important; }
.g-up { color: #9dff4f; }
.r-growth { min-height: 1em; margin: 2px 0 6px; font-size: 13px; color: var(--text); }
.d-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 2px; font-size: 12px; color: var(--muted); }
.d-stats b { color: var(--text); font-family: var(--font-d); }
.rank-list .nm[data-player] { cursor: pointer; }
.rank-list .nm[data-player]:hover { text-decoration: underline; color: var(--accent); }

/* 週替わり・ランダムマッチのカード */
.hl-card.weekly { --tc: #ffd25e; animation-delay: 0.4s; cursor: default; }
.hl-card.weekly .hl-ico i { border-radius: 2px; transform: rotate(45deg); }
.hl-card.match { --tc: #ff7a5e; animation-delay: 0.48s; }
.hl-card.match .hl-ico i { width: 26px; height: 26px; border-radius: 50%; }
.hl-card.match .hl-ico i:nth-child(2) { margin-left: -8px; }
.wk-diffs { position: relative; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.wk-d { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--dc); background: color-mix(in srgb, var(--dc) 14%, rgba(0,0,0,0.3)); color: var(--text); font: 700 12px var(--font-d); cursor: pointer; transition: background 0.15s, box-shadow 0.15s; }
.wk-d:hover, .wk-d:focus-visible { background: color-mix(in srgb, var(--dc) 30%, rgba(0,0,0,0.3)); box-shadow: 0 0 12px color-mix(in srgb, var(--dc) 50%, transparent); }
.wk-d b { font-size: 13px !important; text-shadow: none !important; margin-left: 2px; }
.ps-tiers { align-items: start; }
.wk-hall { position: relative; align-self: flex-start; color: var(--tc) !important; }

/* シーズンパス */
.pass-tabs { margin: 0 0 0 10px !important; flex: 0 1 320px; }
.ps-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; margin-bottom: 10px; }
.ps-head small { display: block; font: 700 11px var(--font-d); letter-spacing: 2px; color: var(--accent); }
.ps-head > div > b { font: 800 34px var(--font-d); }
.ps-head > div > b i { font-size: 14px; font-style: normal; color: var(--muted); }
.ps-head > div > span { display: block; }
.ps-bar { position: relative; height: 18px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.ps-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--cyan), var(--pink)); border-radius: inherit; transition: width 0.6s var(--ease-out, ease); }
.ps-bar span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 18px; font-weight: 700; }
.ps-tiers { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ps-tiers li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 8px; border: 1px solid var(--panel-line); background: rgba(0,0,0,0.3); opacity: 0.55; text-align: center; }
.ps-tiers li.open { opacity: 1; border-color: var(--cyan); box-shadow: 0 0 12px rgba(94,242,255,0.25); }
.ps-tiers li.got { opacity: 0.8; border-color: rgba(157,255,79,0.5); }
.ps-tiers li.big { grid-column: span 2; background: linear-gradient(160deg, rgba(255,79,216,0.12), rgba(94,242,255,0.08)); }
.ps-tiers small { font: 700 11px var(--font-d); color: var(--muted); }
.ps-tiers b { font-size: 14px; }
.ps-tiers em { font-size: 11px; font-style: normal; color: var(--muted); }
.ps-tiers li > i { position: absolute; top: 4px; right: 8px; font-style: normal; color: #9dff4f; font-weight: 800; }
.ps-tiers canvas { border-radius: 4px; }
@media (max-width: 700px) { .ps-head { grid-template-columns: 1fr; } }

/* 着せ替え */
.sk-group h3 { margin: 16px 0 8px; font-size: 15px; }
.sk-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sk-list li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 8px; border: 1px solid var(--panel-line); background: rgba(0,0,0,0.3); text-align: center; }
.sk-list li.on { border-color: var(--cyan); box-shadow: 0 0 14px rgba(94,242,255,0.3); }
.sk-list li.lock canvas { filter: saturate(0.4) brightness(0.7); }
.sk-list canvas { border-radius: 6px; width: 120px; height: 48px; }
.sk-on { font-size: 12px; font-weight: 800; color: var(--cyan); }

/* プレイヤーページ */
.pf-box { width: min(640px, 100%); max-height: 88vh; overflow: auto; }
.pf-head { display: flex; gap: 14px; align-items: center; margin: 6px 0 12px; }
.pf-head > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-head h2 { margin: 0; flex-basis: 100%; }
.pf-ava { flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 800 28px var(--font-d); color: var(--tc); border: 2px solid var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--tc) 40%, transparent); }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pf-stats div { padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--panel-line); }
.pf-stats small { display: block; font-size: 11px; color: var(--muted); }
.pf-stats b { font-family: var(--font-d); font-size: 16px; }
.pf-fav { margin: 10px 0 0; font-size: 13px; }
.pf-fav i { font-style: normal; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(94,242,255,0.12); color: var(--cyan); }
.pf-h { margin: 14px 0 6px; font-size: 14px; }
.pf-best { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pf-best li { display: grid; grid-template-columns: 32px 1fr auto auto 44px; gap: 8px; align-items: center; font-size: 13px; }
.pf-best img { width: 32px; height: 32px; border-radius: 4px; }
.pf-best .nm2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-best .lm-diff { margin-left: 6px; }
.pf-best .sc { font-family: var(--font-d); }
.pf-v { font: 700 12px var(--font-d); color: var(--accent); text-align: right; }
.pf-inv { margin-top: 14px; padding: 12px 14px; }
.pf-inv h3 { margin: 0 0 4px; font-size: 14px; }
.pf-code { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.pf-code b { font: 800 24px var(--font-d); letter-spacing: 4px; color: #ffd25e; }
.pf-redeem { display: flex; gap: 6px; }
.pf-redeem input { flex: 1; max-width: 200px; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--panel-line); background: rgba(0,0,0,0.45); color: var(--text); font: inherit; }
@media (max-width: 520px) { .pf-stats { grid-template-columns: 1fr 1fr; } .pf-best li { grid-template-columns: 32px 1fr auto 40px; } .pf-best li > span:nth-child(3) { display: none; } }

/* 殿堂 */
.hall { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hall-h { display: flex; gap: 10px; align-items: baseline; font-size: 13px; border-bottom: 1px solid var(--panel-line); padding-bottom: 3px; margin-bottom: 4px; }
.hall-h span { color: var(--muted); }
.hall-r { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; padding: 2px 0; }
.hall-r .nm { cursor: pointer; }
.hall-r .sc { font-family: var(--font-d); }

/* ログインボーナス */
.lb-box { width: min(520px, 100%); text-align: center; }
.lb-days { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.lb-days li { padding: 8px 2px; border-radius: 6px; border: 1px solid var(--panel-line); background: rgba(0,0,0,0.3); }
.lb-days li small { display: block; font-size: 10px; color: var(--muted); }
.lb-days li b { font-family: var(--font-d); font-size: 13px; }
.lb-days li.got { opacity: 0.5; }
.lb-days li.now { border-color: #ffd25e; background: rgba(255,210,94,0.15); box-shadow: 0 0 14px rgba(255,210,94,0.4); animation: lbPop 0.6s var(--ease-spring, ease) both 0.2s; }
.lb-days li:last-child b { color: #ffd25e; }
.lb-get { font: 800 22px var(--font-d); color: #ffd25e; }
@keyframes lbPop { from { transform: scale(0.7); } }

/* ランダムマッチ */
.match-box { width: min(440px, 100%); text-align: center; }
.match-radar { position: relative; width: 120px; height: 120px; margin: 10px auto 4px; }
.match-radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ff7a5e; opacity: 0; animation: radar 2.4s ease-out infinite; }
.match-radar i:nth-child(2) { animation-delay: 0.8s; }
.match-radar i:nth-child(3) { animation-delay: 1.6s; }
@keyframes radar { from { transform: scale(0.15); opacity: 1; } to { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .match-radar i, .g-streak.warn, .lb-days li.now { animation: none; opacity: 1; } }

/* 管理ページ: 友だち招待 */
.adm-inv code { font-family: var(--font-d); letter-spacing: 2px; color: #ffd25e; }
.adm-inv td small { display: block; color: var(--muted); font-size: 11px; }
.adm-invitee { display: inline-flex; flex-direction: column; margin: 2px 10px 2px 0; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,0.05); border: 1px solid var(--panel-line); }
.adm-invitee small { font-size: 10px !important; }

/* ホーム画面に追加の案内 */
.install-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-top: 10px; border: 1px solid rgba(94,242,255,0.45); border-radius: 6px; background: linear-gradient(90deg, rgba(94,242,255,0.12), rgba(255,79,216,0.08)); animation: fadeUp 0.5s ease-out both; }
.install-bar[hidden] { display: none; }
.ib-ico { font-size: 26px; }
.ib-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ib-text b { font-size: 14px; }
.ib-text small { font-size: 12px; color: var(--muted); }
.ib-share { display: inline-block; padding: 0 5px; border: 1px solid var(--cyan); border-radius: 4px; color: var(--cyan); }
.ib-close { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px 6px; }
.ib-close:hover { color: var(--text); }

/* 埋め込み(?embed=1): ホームや他の画面へ行くボタンを消し、右下に「フルで遊ぶ」 */
.embed-full { display: none; }
body.embed .embed-full { display: block; position: fixed; right: 10px; bottom: 10px; z-index: 50; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #02030a; background: var(--cyan); text-decoration: none; box-shadow: 0 0 14px rgba(94,242,255,0.5); }
body.embed.playing .embed-full { display: none; }
body.embed [data-home], body.embed #btn-share, body.embed #btn-embed, body.embed .coin-chip, body.embed .title-links, body.embed .title-related, body.embed .tele, body.embed #sel-title { display: none !important; }

/* 配信者モード: みんなでライブの参加コードを上に大きく */
.stream-code { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; align-items: center; padding: 6px 18px; border-radius: 8px; background: rgba(2,3,10,0.82); border: 1px solid var(--cyan); box-shadow: 0 0 18px rgba(94,242,255,0.35); pointer-events: none; }
.stream-code[hidden] { display: none; }
.stream-code b { font: 900 30px/1.1 var(--font-d); letter-spacing: 6px; color: #ffd25e; }
.stream-code small { font-size: 11px; color: var(--muted); }
body.stream #live-room-code { font-size: 2em; letter-spacing: 0.2em; }
body.stream-green .bg-canvas, body.stream-green #bg { display: none; }

/* 招待リンクで来た人へのお知らせ(growth.js showInviteBanner) */
.invite-banner { position: fixed; z-index: 25; top: 10px; left: 50%; transform: translateX(-50%); width: min(720px, calc(100% - 20px)); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid rgba(255,210,94,0.6); border-radius: 8px; background: linear-gradient(90deg, rgba(40,30,8,0.94), rgba(30,10,40,0.94)); box-shadow: 0 0 24px rgba(255,210,94,0.25); animation: ivbIn 0.5s var(--ease-out, ease-out) both; }
.invite-banner .ivb-ico { font-size: 26px; }
.invite-banner .ivb-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.invite-banner .ivb-text b { font-size: 15px; }
.invite-banner .ivb-text em { font-style: normal; color: #ffd25e; }
.invite-banner .ivb-text small { flex-basis: 100%; font-size: 12px; color: var(--muted); }
@keyframes ivbIn { from { opacity: 0; transform: translate(-50%, -12px); } }
@media (max-width: 560px) { .invite-banner { flex-wrap: wrap; } .invite-banner .btn-glow { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .invite-banner { animation: none; } }
