/* Auralis ダッシュボード  開発 NEX / 運営 Nexus Inc. / Developer @yua.nex_official */

/* ===== テーマ(Ver.10 リキッドグラス) =====
   --surface* は半透明のガラス。背景には再生中の曲のアートワークをぼかして敷くので、
   どの画面でも曲の色がうっすら透ける。--solid はモーダルなど、下が透けると読みにくい所に使う */
:root, [data-theme="midnight"] {
  --bg: #05060c; --solid: #10121c;
  --surface: rgba(255,255,255,.055); --surface-2: rgba(255,255,255,.085); --surface-3: rgba(255,255,255,.13);
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16); --glass-hi: rgba(255,255,255,.2);
  --text: #eef0f8; --text-2: #bcc2d6; --muted: #868ca5; --accent: #5b84ff; --accent-ink: #fff; --accent-soft: rgba(91,132,255,.18);
  --glow-1: 63,217,255; --glow-2: 155,92,255; --ok: #2fcf8f; --warn: #f2b44a; --bad: #ff6470;
  --shadow: 0 24px 60px -28px rgba(0,0,0,.85); --amb: .72; --veil: rgba(5,6,12,.34);
  color-scheme: dark;
}
[data-theme="daylight"] {
  --bg: #eef1f8; --solid: #f7f8fc;
  --surface: rgba(255,255,255,.58); --surface-2: rgba(238,241,249,.78); --surface-3: rgba(222,227,240,.9);
  --line: rgba(20,28,60,.08); --line-2: rgba(20,28,60,.14); --glass-hi: rgba(255,255,255,.95);
  --text: #12141c; --text-2: #3b4152; --muted: #6b7184; --accent: #3f63f0; --accent-ink: #fff; --accent-soft: rgba(63,99,240,.12);
  --glow-1: 63,140,255; --glow-2: 155,92,255; --ok: #13a36b; --warn: #c98612; --bad: #df3949;
  --shadow: 0 20px 50px -26px rgba(20,30,70,.35); --amb: .38; --veil: rgba(238,241,248,.45);
  color-scheme: light;
}
[data-theme="aurora"] {
  --bg: #0a0614; --solid: #161025;
  --surface: rgba(230,215,255,.06); --surface-2: rgba(230,215,255,.09); --surface-3: rgba(230,215,255,.14);
  --line: rgba(230,215,255,.1); --line-2: rgba(230,215,255,.18); --glass-hi: rgba(240,230,255,.22);
  --text: #f3eeff; --text-2: #cbc1e6; --muted: #9d93bd; --accent: #a374ff; --accent-ink: #fff; --accent-soft: rgba(163,116,255,.2);
  --glow-1: 63,217,255; --glow-2: 200,90,255; --ok: #3fd9a4; --warn: #f5c15a; --bad: #ff6f8a;
  --shadow: 0 24px 60px -28px rgba(0,0,0,.85); --amb: .7; --veil: rgba(10,6,20,.34);
  color-scheme: dark;
}
[data-theme="sakura"] {
  --bg: #fff3f6; --solid: #fff8fa;
  --surface: rgba(255,255,255,.58); --surface-2: rgba(253,236,242,.78); --surface-3: rgba(248,222,231,.9);
  --line: rgba(120,40,70,.09); --line-2: rgba(120,40,70,.15); --glass-hi: rgba(255,255,255,.95);
  --text: #2a1820; --text-2: #5a3d48; --muted: #8e6d78; --accent: #e05a86; --accent-ink: #fff; --accent-soft: rgba(224,90,134,.13);
  --glow-1: 255,150,190; --glow-2: 200,130,255; --ok: #2aa876; --warn: #c98612; --bad: #d63b55;
  --shadow: 0 20px 50px -26px rgba(120,40,70,.3); --amb: .36; --veil: rgba(255,243,246,.45);
  color-scheme: light;
}
[data-theme="ocean"] {
  --bg: #02121a; --solid: #082029;
  --surface: rgba(200,245,255,.055); --surface-2: rgba(200,245,255,.085); --surface-3: rgba(200,245,255,.13);
  --line: rgba(200,245,255,.09); --line-2: rgba(200,245,255,.16); --glass-hi: rgba(220,250,255,.2);
  --text: #e6f7fa; --text-2: #b4d6dd; --muted: #7fa6b0; --accent: #2ec4d6; --accent-ink: #00222a; --accent-soft: rgba(46,196,214,.17);
  --glow-1: 46,196,214; --glow-2: 60,120,255; --ok: #3ddc97; --warn: #f2c14a; --bad: #ff6b6b;
  --shadow: 0 24px 60px -28px rgba(0,0,0,.85); --amb: .7; --veil: rgba(2,18,26,.34);
  color-scheme: dark;
}
[data-theme="mono"] {
  --bg: #0b0b0b; --solid: #171717;
  --surface: rgba(255,255,255,.05); --surface-2: rgba(255,255,255,.08); --surface-3: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16); --glass-hi: rgba(255,255,255,.18);
  --text: #f2f2f2; --text-2: #c4c4c4; --muted: #8d8d8d; --accent: #f2f2f2; --accent-ink: #0d0d0d; --accent-soft: rgba(255,255,255,.1);
  --glow-1: 200,200,200; --glow-2: 120,120,120; --ok: #d8d8d8; --warn: #bdbdbd; --bad: #ff6b6b;
  --shadow: 0 24px 60px -28px rgba(0,0,0,.85); --amb: .3; --veil: rgba(11,11,11,.5);
  color-scheme: dark;
}
:root { --blur: 26px; --r: 22px; --font: "Inter", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif; }

/* ===== 基本 ===== */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font);
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.logo-text { font-family: "Inter", var(--font); font-weight: 800; letter-spacing: -.015em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2);
  display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.on { color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.big { width: 64px; height: 64px; background: var(--text); color: var(--bg); }
.icon-btn.big:hover { background: var(--text); color: var(--bg); transform: scale(1.05); }
.icon-btn.big svg { width: 28px; height: 28px; }
.icon-btn.md { width: 48px; height: 48px; }
.icon-btn.md svg { width: 24px; height: 24px; }

input[type="text"], input[type="search"], input[type="number"], input[type="url"], input[type="time"], select {
  height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 12px; width: 100%; outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .2s var(--ease), background .2s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; width: 100%; height: 22px; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--surface-3) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); margin-top: -5px; border: 0; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }

:root { --ease: cubic-bezier(.16, 1, .3, 1); }

/* ===== ログイン ===== */
.login { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.login::before, .login::after { content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .25; animation: drift 24s ease-in-out infinite alternate; }
.login::before { background: rgb(var(--glow-1)); left: -20vmax; top: -25vmax; }
.login::after { background: rgb(var(--glow-2)); right: -20vmax; bottom: -25vmax; animation-delay: -8s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.1); } }
.login-card { position: relative; z-index: 1; width: min(420px, 100%); text-align: center; }
.login-card img { width: 84px; height: 84px; margin: 0 auto; }
.login-card h1 { margin: 18px 0 0; font-size: 34px; line-height: 1.1; }
.login-card p { color: var(--text-2); margin: 10px 0 0; }
.login-card .btn { margin-top: 28px; height: 50px; width: 100%; font-size: 15px; }
.login-card .note { font-size: 13px; color: var(--muted); margin-top: 18px; }
.ea { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; padding: 6px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; }
[data-theme="mono"] .ea { color: var(--text); }

/* ===== 全体の枠 ===== */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; min-height: 100svh; }
.side { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; scrollbar-width: thin; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; text-decoration: none; font-size: 20px; }
.side .brand img { width: 30px; height: 30px; }
.guild-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: left; }
.guild-btn:hover { border-color: var(--line-2); }
.guild-btn .name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gicon { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-weight: 700; font-size: 13px; overflow: hidden; }
.gicon img { width: 100%; height: 100%; object-fit: cover; }
.nav-list { display: grid; gap: 2px; margin-top: 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 14.5px; border: 0; background: none; cursor: pointer; text-align: left; }
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); }
.nav-item.active svg { color: var(--accent); }
.side .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me img, .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); flex: none; object-fit: cover; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.status-dot.off { background: var(--bad); }

.main { min-width: 0; display: flex; flex-direction: column; }
.page { flex: 1; padding: clamp(20px, 3vw, 34px) clamp(16px, 3vw, 38px) 120px; max-width: 1320px; width: 100%; margin: 0 auto; animation: page-in .45s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 26px; line-height: 1.3; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; margin-bottom: 18px; }
.banner > svg { width: 20px; height: 20px; flex: none; }
.banner.warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.banner.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* ===== サーバー選択 ===== */
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.guild-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, transform .2s var(--ease); }
.guild-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.guild-card .gicon { width: 52px; height: 52px; border-radius: 16px; font-size: 17px; }
.guild-card b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-card small { color: var(--muted); }
.guild-card.off { opacity: .55; cursor: default; }
.guild-card.off:hover { transform: none; }
.guild-card .btn { align-self: flex-start; }
.guild-card-top { display: flex; align-items: center; gap: 13px; min-width: 0; }
.guild-card-copy { min-width: 0; }
.guild-card-copy small { display: block; margin-top: 4px; line-height: 1.45; }
.home-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 18px; }
.home-summary > div { display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; }
.home-summary b { color: var(--text); font-size: 14px; }
.home-summary .status-dot { margin: 0; }

/* ===== プレイヤー ===== */
.player { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 30px; align-items: start; }
.now { position: relative; padding: 26px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); overflow: hidden; isolation: isolate; box-shadow: 0 18px 55px -42px color-mix(in srgb, var(--accent) 70%, transparent), var(--shadow); }
.now .bg { position: absolute; inset: -30%; z-index: -1; background-size: cover; background-position: center; filter: blur(60px) saturate(1.4); opacity: .35; transition: background-image .6s; }
[data-theme="daylight"] .now .bg, [data-theme="sakura"] .now .bg { opacity: .22; }
.player-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.player-kicker span { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 700; }
.player-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent), 0 0 10px var(--accent); }
.player-kicker small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.art { position: relative; width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art .ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, rgba(var(--glow-1), .5), rgba(var(--glow-2), .55)); }
.art .ph img { width: 34%; height: auto; opacity: .9; }
.art.playing { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.012); } }
.eqbars { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 3px; align-items: flex-end; height: 22px; padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); }
.eqbars i { width: 3px; height: 100%; border-radius: 2px; background: #fff; transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.eqbars i:nth-child(2) { animation-duration: 1.15s; animation-delay: -.3s; }
.eqbars i:nth-child(3) { animation-duration: .8s; animation-delay: -.5s; }
.eqbars i:nth-child(4) { animation-duration: 1.3s; animation-delay: -.1s; }
.eqbars.paused i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.track-title { margin: 22px 0 0; font-size: 22px; line-height: 1.35; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.track-sub { margin: 4px 0 0; color: var(--text-2); font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.chip img { width: 16px; height: 16px; border-radius: 50%; }
.progress { margin-top: 18px; }
.bar { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.bar .rail { position: relative; width: 100%; height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); border-radius: 5px; }
.bar .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--text); transform: scale(0); transition: transform .15s; }
.bar:hover .knob, .bar.drag .knob { transform: scale(1); }
.bar.disabled { cursor: default; }
.times { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.subcontrols { display: flex; align-items: center; justify-content: space-between; gap: 2px; margin-top: 14px; }
.subcontrols > .icon-btn { width: 36px; height: 36px; flex: none; }
.subcontrols > .icon-btn svg { width: 18px; height: 18px; }
.vol { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 110px; }
.vol span { font-size: 12.5px; color: var(--muted); width: 36px; text-align: right; }
.idle { text-align: center; padding: 50px 20px; }
.idle h2 { margin: 18px 0 6px; font-size: 20px; }
.idle p { color: var(--muted); margin: 0 0 20px; }
.idle .art { max-width: 220px; margin: 0 auto; }

.side-panel { min-width: 0; }
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; width: 100%; max-width: 100%; overflow-x: auto; box-shadow: var(--shadow); }
.tab { flex: 1; border: 0; background: none; padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.tab small { font-weight: 500; margin-left: 4px; color: var(--muted); }

/* キュー */
.list { display: grid; gap: 2px; }
.row { display: grid; grid-template-columns: 28px 44px 1fr auto auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; transition: background .15s; }
.row:hover { background: var(--surface-2); }
.row .num { color: var(--muted); font-size: 13px; text-align: center; }
.row .thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--surface-3); position: relative; }
.row .thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.row .thumb::before { content: "♪"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 16px; background: linear-gradient(135deg, rgba(var(--glow-1), .18), rgba(var(--glow-2), .22)); }
.row .meta { min-width: 0; }
.row .meta b { display: block; font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .dur { font-size: 13px; color: var(--muted); }
.row .acts { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.row:hover .acts, .row:focus-within .acts { opacity: 1; }
.row .acts .icon-btn { width: 34px; height: 34px; }
.row .acts .icon-btn svg { width: 17px; height: 17px; }
.row.dragging { opacity: .4; }
.row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.row[draggable="true"] { cursor: grab; }
.compact .row { padding: 4px 10px; }
.compact .row .thumb { width: 32px; height: 32px; }
.compact .row { grid-template-columns: 28px 32px 1fr auto auto; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; color: var(--muted); font-size: 13.5px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* 歌詞 */
.lyrics { position: relative; height: min(62vh, 560px); overflow-y: auto; padding: 30% 8px; scroll-behavior: smooth; mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); scrollbar-width: none; }
.lyrics::-webkit-scrollbar { display: none; }
.lyrics p { margin: 0; padding: 7px 10px; border-radius: 10px; font-weight: 700; color: var(--muted); opacity: .55; cursor: pointer; transition: color .35s, opacity .35s, transform .35s var(--ease); transform-origin: left center; }
.lyrics p:hover { opacity: .9; }
.lyrics p.now { color: var(--text); opacity: 1; transform: scale(1.04); }
.lyrics p.past { opacity: .35; }
.lyrics.plain p { cursor: default; opacity: .9; color: var(--text-2); font-weight: 500; }
.lyrics[data-size="s"] p { font-size: 16px; } .lyrics[data-size="m"] p { font-size: 20px; } .lyrics[data-size="l"] p { font-size: 26px; } .lyrics[data-size="xl"] p { font-size: 32px; line-height: 1.4; }
.lyrics-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.karaoke { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: 28px; animation: page-in .4s var(--ease); }
.karaoke .bg { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(80px) saturate(1.3); opacity: .3; z-index: 0; }
.karaoke > * { position: relative; z-index: 1; }
.karaoke .lyrics { height: auto; flex: 1; padding: 35vh 4vw; }
.karaoke .lyrics p { font-size: clamp(26px, 4vw, 48px); line-height: 1.35; }
.karaoke header { display: flex; align-items: center; gap: 14px; }
.karaoke header img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }

/* 検索 */
.search-box { display: flex; gap: 8px; margin-bottom: 12px; }
.search-box input { flex: 1; }

/* 下のミニプレイヤー */
.mini { position: fixed; left: 248px; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 10px 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); animation: mini-in .4s var(--ease); }
@keyframes mini-in { from { transform: translateY(100%); } }
.mini .info { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.mini .info img, .mini .info .ph { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: linear-gradient(135deg, rgba(var(--glow-1), .5), rgba(var(--glow-2), .55)); }
.mini .info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .info span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .ctl { display: flex; align-items: center; gap: 6px; }
.mini .ctl .icon-btn.big { width: 44px; height: 44px; }
.mini .ctl .icon-btn.big svg { width: 20px; height: 20px; }
.mini .right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.mini .right .vol { max-width: 180px; }
.mini .line { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--line); }
.mini .line i { display: block; height: 100%; width: 0; background: var(--accent); }

/* 設定 */
.form { display: grid; gap: 2px; max-width: 760px; }
.field { display: grid; grid-template-columns: 1fr minmax(160px, 260px); align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); }
.field:first-child { border-radius: 16px 16px 0 0; }
.field:last-child { border-radius: 0 0 16px 16px; }
.field:only-child { border-radius: 16px; }
.field b { display: block; font-size: 15px; }
.field small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.field .ctrl { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.form-group-title { margin: 30px 0 10px; font-size: 14px; color: var(--muted); font-weight: 700; }
.form-group-title:first-child { margin-top: 0; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-width: 760px; }
.theme { position: relative; border-radius: 14px; border: 2px solid var(--line); padding: 0; overflow: hidden; cursor: pointer; background: none; text-align: left; transition: border-color .15s, transform .2s var(--ease); }
.theme:hover { transform: translateY(-2px); }
.theme[aria-pressed="true"] { border-color: var(--accent); }
.theme .sw { height: 70px; display: flex; align-items: flex-end; gap: 4px; padding: 10px; }
.theme .sw i { width: 18px; height: 18px; border-radius: 50%; }
.theme span { display: block; padding: 8px 10px; font-weight: 700; font-size: 13.5px; background: var(--surface); }
.plan-card { padding: 20px; max-width: 760px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.plan-card b { font-size: 16px; }

/* プレイリスト */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pl { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: transform .2s var(--ease), border-color .15s; }
.pl:hover { transform: translateY(-2px); border-color: var(--line-2); }
.pl .cover { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: 42px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.pl b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl small { color: var(--muted); }

/* トースト・モーダル */
.toasts { position: fixed; right: 20px; bottom: 96px; z-index: 80; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; max-width: 360px; padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: toast-in .35s var(--ease); }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
.modal-root:empty { display: none; }
.modal-back { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); animation: page-in .3s var(--ease); }
.modal h2 { margin: 0 0 6px; font-size: 19px; }
.modal p { margin: 0 0 16px; color: var(--text-2); font-size: 14px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.kbd { display: inline-block; min-width: 24px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; text-align: center; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; align-items: center; }
.menu { position: fixed; z-index: 75; min-width: 200px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: page-in .2s var(--ease); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; }
.menu button:hover { background: var(--surface-2); }
.menu button.bad { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== スマホ ===== */
.bottom-nav { display: none; }
@media (max-width: 980px) {
  .player { grid-template-columns: 1fr; }
  .now { max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .page { padding: 18px 16px 170px; }
  .mini { left: 0; bottom: 64px; grid-template-columns: 1fr auto; padding: 8px 12px; gap: 10px; }
  .mini .right { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; height: 64px; padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
  .bottom-nav button { border: 0; background: none; display: grid; place-items: center; align-content: center; gap: 2px; font-size: 11px; color: var(--muted); cursor: pointer; }
  .bottom-nav button svg { width: 22px; height: 22px; }
  .bottom-nav button.active { color: var(--accent); }
  [data-theme="mono"] .bottom-nav button.active { color: var(--text); }
  .topbar-m { display: flex !important; }
  .field { grid-template-columns: 1fr; gap: 10px; }
  .field .ctrl { justify-content: flex-start; }
  .row { grid-template-columns: 22px 40px 1fr auto; gap: 10px; }
  .row .dur { display: none; }
  .row .acts { opacity: 1; }
  .toasts { left: 16px; right: 16px; bottom: 140px; justify-items: stretch; }
  .now { padding: 18px; }
  .karaoke { padding: 16px; }
}
.topbar-m { display: none; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 25; }
.topbar-m .guild-btn { flex: 1; }

/* 動きを減らす */
.reduce *, .reduce *::before, .reduce *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
.reduce .lyrics { scroll-behavior: auto; }

/* 操作ボタン(文字付き) */
.controls { gap: 4px; align-items: flex-start; }
.controls .icon-btn.big { margin: 0 6px; }
.ctl { display: grid; justify-items: center; gap: 3px; width: 64px; padding: 8px 0 4px; border: 0; border-radius: 12px; background: none; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.ctl svg { width: 22px; height: 22px; }
.ctl span { font-size: 11px; white-space: nowrap; color: var(--muted); }
.ctl:hover { background: var(--surface-2); color: var(--text); }
.ctl.on, .ctl.on span { color: var(--accent); }
.player-response { min-height: 20px; margin: 5px 0 -2px; color: var(--muted); font-size: 12px; text-align: center; transition: color .18s; }
.player-response.busy { color: var(--text-2); }
.player-response.ok { color: var(--ok); }
.player-response.bad { color: var(--bad); }
.pending { pointer-events: none; opacity: .58; }
.pending svg { animation: player-pulse .75s ease-in-out infinite alternate; }
@keyframes player-pulse { to { transform: scale(.82); opacity: .55; } }
.vol-row { margin-top: 14px; }
.toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 14px; }
.tg { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.tg svg { width: 20px; height: 20px; flex: none; }
.tg span { min-width: 0; }
.tg b { display: block; font-size: 13px; color: var(--text); }
.tg small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg:hover { border-color: var(--line-2); }
.tg.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.tg.on svg, .tg.on small { color: var(--accent); }
[data-theme="mono"] .tg.on svg, [data-theme="mono"] .tg.on small { color: var(--text); }
.tg.danger svg, .tg.danger b { color: var(--bad); }

/* プラン */
.plan-badge { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 7px 12px; border-radius: 10px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); }
.plan-badge b { font-size: 13px; color: var(--text); }
.plan-sapphire { border-color: rgba(61,123,255,.5); background: linear-gradient(90deg, rgba(61,123,255,.16), transparent); }
.plan-sapphire b { color: #7aa5ff; }
.plan-ultimate { border-color: rgba(192,124,255,.55); background: linear-gradient(90deg, rgba(192,124,255,.2), rgba(63,217,255,.08)); }
.plan-ultimate b { background: linear-gradient(90deg, #c07cff, #3fd9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lock { max-width: 640px; margin: 40px auto; padding: 36px 28px; text-align: center; }
.lock-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.lock-icon svg { width: 26px; height: 26px; }
.lock h1 { margin: 0; font-size: 22px; line-height: 1.4; }
.lock p { color: var(--text-2); margin: 10px 0 22px; }
.lock-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; text-align: left; }
.lock-plans div { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.lock-plans b { display: block; font-size: 16px; }
.lock-plans span { display: block; color: var(--accent); font-weight: 700; margin: 2px 0 4px; }
.lock-plans small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 560px) { .lock-plans { grid-template-columns: 1fr; } }

/* 開発者 */
.nav-label { margin: 14px 12px 4px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tile span { display: block; font-size: 12.5px; color: var(--muted); }
.tile b { display: block; font-size: 20px; margin-top: 2px; letter-spacing: -.01em; color: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 700; color: var(--muted); font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.row-acts { white-space: nowrap; text-align: right; }
.row-acts .btn + .btn { margin-left: 6px; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.st i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st-ok i { background: var(--ok); } .st-warn i { background: var(--warn); } .st-bad i { background: var(--bad); } .st-info i { background: var(--accent); }
.tier { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.tier-sapphire { border-color: rgba(61,123,255,.55); color: #7aa5ff; background: rgba(61,123,255,.1); }
.tier-ultimate { border-color: rgba(192,124,255,.6); color: #d3a6ff; background: rgba(192,124,255,.12); }
[data-theme="daylight"] .tier-sapphire, [data-theme="sakura"] .tier-sapphire { color: #2c5fd8; }
[data-theme="daylight"] .tier-ultimate, [data-theme="sakura"] .tier-ultimate { color: #8a3fd6; }
.enforce { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; }
.enforce p { margin: 4px 0 0; font-size: 13.5px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.grant { display: grid; grid-template-columns: 2fr 1fr; gap: 14px 16px; padding: 20px; }
.grant label span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.grant .days { display: flex; gap: 6px; }
.grant .days input { width: 90px; flex: none; }
.grant .days button { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 8px; padding: 0 10px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.grant .days button:hover { color: var(--text); }
.grant-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.audit-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.audit-bar select { width: 160px; }
.audit-bar input { flex: 1; min-width: 200px; }
.audit { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.log { display: grid; grid-template-columns: 150px 108px 1fr; gap: 12px; align-items: start; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log:last-child { border-bottom: 0; }
.log time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.log .what b { margin-right: 6px; }
.log .what small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.log .what code { display: block; margin-top: 4px; font-family: ui-monospace, monospace; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 6px; padding: 4px 8px; white-space: pre-wrap; word-break: break-all; }
.log.fail { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.kind { justify-self: start; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.server-tiles { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
.server-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 10px; margin: 18px 0 8px; }
.server-search { position: relative; min-width: 0; }
.server-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.server-search input { width: 100%; padding-left: 40px; }
.server-toolbar select { min-width: 164px; }
.server-result { display: flex; justify-content: space-between; gap: 12px; margin: 0 2px 12px; color: var(--muted); font-size: 12.5px; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.server-card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.06); overflow: hidden; }
.server-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--line); }
.server-card.is-playing::before { background: var(--ok); }
.server-card.has-issue::before { background: var(--warn); }
.server-card-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.server-card-head .gicon { width: 52px; height: 52px; border-radius: 15px; font-size: 17px; }
.server-card-head h2 { margin: 0 0 3px; overflow: hidden; color: var(--text); font-size: 16px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.server-id { display: block; max-width: 100%; padding: 0; border: 0; background: none; color: var(--muted); font: 11.5px ui-monospace, monospace; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.server-id:hover { color: var(--accent); }
.server-playing { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--ok) 25%, var(--line)); min-width: 0; }
.server-playing > svg { width: 20px; height: 20px; flex: none; color: var(--ok); }
.server-playing span { min-width: 0; }
.server-playing b, .server-playing small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-playing b { font-size: 13.5px; }
.server-playing small { margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.server-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.server-meta div { min-width: 0; }
.server-meta dt { color: var(--muted); font-size: 11.5px; }
.server-meta dd { margin: 2px 0 0; overflow: hidden; color: var(--text-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.server-permission { min-height: 22px; }
.server-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.server-actions .btn svg { width: 16px; height: 16px; }
.server-invite { padding: 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.server-invite label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 700; }
.server-invite > div { display: flex; gap: 6px; }
.server-invite input { min-width: 0; flex: 1; font: 11.5px ui-monospace, monospace; }
.server-invite small { display: block; margin-top: 7px; color: var(--muted); font-size: 11.5px; }
.modal-field { display: grid; gap: 6px; margin: 18px 0 10px; }
.modal-field span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
@media (max-width: 820px) {
  .grant { grid-template-columns: 1fr; }
  .log { grid-template-columns: 1fr; gap: 4px; }
  .server-tiles { grid-template-columns: 1fr 1fr; }
  .server-toolbar { grid-template-columns: 1fr 1fr; }
  .server-search { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .server-grid { grid-template-columns: 1fr; }
  .server-toolbar { grid-template-columns: 1fr; }
  .server-search { grid-column: auto; }
  .server-toolbar select { width: 100%; }
  .server-result { align-items: flex-start; flex-direction: column; gap: 3px; }
  .server-card { padding: 16px; }
  .server-card-head { grid-template-columns: 46px minmax(0, 1fr); }
  .server-card-head .gicon { width: 46px; height: 46px; }
  .server-card-head > .tier { grid-column: 2; justify-self: start; }
  .server-meta { grid-template-columns: 1fr; }
  .server-invite > div { flex-wrap: wrap; }
  .server-invite input { flex-basis: 100%; }
}

/* 開発者: お知らせ */
.news-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.news-form { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.news-form label { display: block; }
.nf-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.nf-label small { font-weight: 500; font-variant-numeric: tabular-nums; }
.nf-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nf-row .nf-label { margin: 0; width: 64px; }
.nf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nf-target { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.nf-target b { font-size: 18px; }
.nf-target .btn { margin-left: auto; }
.nf-target small { flex-basis: 100%; font-size: 12px; line-height: 1.6; }
.news-form textarea { width: 100%; min-height: 180px; resize: vertical; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.65; outline: none; }
.news-form textarea:focus { border-color: var(--accent); }
.swatches { display: flex; gap: 8px; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px var(--surface); }
.swatches button.on { border-color: var(--text); }
.nf-more { border-top: 1px solid var(--line); padding-top: 12px; }
.nf-more summary { cursor: pointer; font-size: 13.5px; color: var(--text-2); font-weight: 700; }
.nf-more[open] summary { margin-bottom: 12px; }
.nf-more > label { margin-top: 12px; }
.nf-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.nf-note { font-size: 12px; flex: 1; min-width: 160px; }
.news-side { position: sticky; top: 18px; }
.news-side .nf-label { margin-bottom: 8px; }
.bad-text { color: var(--bad); }
.news-progress { padding: 16px 18px; margin-bottom: 18px; }
.np-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.np-bar { height: 8px; border-radius: 8px; background: var(--surface-3); margin: 12px 0 8px; overflow: hidden; }
.np-bar i { display: block; height: 100%; background: var(--accent); border-radius: 8px; transition: width .4s; }
.np-nums { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.news-targets { max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin: 12px 0 4px; }
.news-targets div { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.news-targets div:last-child { border-bottom: 0; }
.news-targets span { color: var(--text-2); }
.news-targets small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.news-targets .off b, .news-targets .off span { color: var(--muted); }

/* Discord 風プレビュー(テーマに関係なく Discord のダーク表示) */
.dc-preview { background: #313338; border-radius: 14px; padding: 16px 16px 18px; color: #dbdee1; font-size: 15px; line-height: 1.45; border: 1px solid var(--line); }
.dc-msg { display: flex; gap: 14px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.dc-body { min-width: 0; flex: 1; }
.dc-name { display: flex; align-items: center; gap: 6px; }
.dc-name b { color: #f2f3f5; font-weight: 600; }
.dc-app { font-size: 10.5px; font-weight: 700; background: #5865f2; color: #fff; border-radius: 4px; padding: 0 5px; line-height: 16px; }
.dc-name time { font-size: 12px; color: #949ba4; margin-left: 2px; }
.dc-embed { margin-top: 6px; max-width: 520px; background: #2b2d31; border-radius: 4px; border-left: 4px solid var(--bar); padding: 10px 14px 12px 12px; }
.dc-author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #f2f3f5; }
.dc-author img { width: 22px; height: 22px; border-radius: 50%; }
.dc-title { font-weight: 700; color: #f2f3f5; margin-top: 8px; font-size: 15.5px; }
.dc-desc { margin-top: 6px; font-size: 14px; color: #dbdee1; }
.dc-image { display: block; max-width: 100%; border-radius: 4px; margin-top: 12px; }
.dc-foot { font-size: 12px; color: #b5bac1; margin-top: 10px; }
.dc-text { margin-top: 2px; }
.dc-btn { display: inline-block; margin-top: 8px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 4px; }
.dc-preview code { background: #1e1f22; border-radius: 4px; padding: 1px 4px; font-size: 85%; }
.dc-preview a { color: #00a8fc; }
.dc-preview .md-h1 { font-size: 22px; font-weight: 700; color: #f2f3f5; margin: 6px 0 2px; }
.dc-preview .md-h2 { font-size: 19px; font-weight: 700; color: #f2f3f5; margin: 6px 0 2px; }
.dc-preview .md-h3 { font-size: 16px; font-weight: 700; color: #f2f3f5; margin: 4px 0 2px; }
.dc-preview .md-sub { font-size: 12.5px; color: #949ba4; }
.dc-preview .md-quote { border-left: 4px solid #4e5058; padding-left: 10px; }
@media (max-width: 980px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-side { position: static; }
}
@media (max-width: 560px) { .nf-two { grid-template-columns: 1fr; } }
.news-hist td:nth-child(2) { min-width: 240px; }
.news-hist td:nth-child(3) { white-space: nowrap; }
.nf-mention { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.nf-mention .switch { flex: none; margin-top: 2px; }
.nf-mention b { display: block; font-size: 14px; }
.nf-mention small { display: block; font-size: 12px; line-height: 1.6; margin-top: 2px; }
.nf-mention code, .nf-hint code { font-size: 11.5px; background: var(--surface-2); border-radius: 4px; padding: 0 4px; }
.nf-hint { display: block; font-size: 11.5px; line-height: 1.6; margin-top: 6px; }
.dc-mline { margin-top: 2px; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }

/* Sapphire 以上の機能 */
.plus-tag { display: inline-block; margin-left: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; padding: 0 5px; border-radius: 4px; vertical-align: 1px; color: #7aa5ff; background: rgba(61,123,255,.14); border: 1px solid rgba(61,123,255,.4); }
[data-theme="daylight"] .plus-tag, [data-theme="sakura"] .plus-tag { color: #2c5fd8; }
.restore-card { display: flex; align-items: center; gap: 12px; max-width: 420px; margin: 18px auto 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; }
.restore-card > svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.restore-card div { flex: 1; min-width: 0; }
.restore-card b { display: block; font-size: 13.5px; }
.restore-card span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mood-start { margin-top: 12px; }
.mood-start svg { width: 16px; height: 16px; }
.seg-sm { padding: 3px; border-radius: 10px; }
.seg-sm button { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.eq-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin: 4px 0 18px; }
.eq-presets button, .mood-grid button { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); border-radius: 10px; padding: 9px 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.eq-presets button:hover, .mood-grid button:hover { color: var(--text); border-color: var(--muted); }
.eq-presets button.on, .mood-grid button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.eq-row { display: grid; grid-template-columns: 44px 1fr 32px; align-items: center; gap: 12px; margin: 10px 0; font-size: 13.5px; font-weight: 700; }
.eq-row b { text-align: right; font-variant-numeric: tabular-nums; }
.eq-row input[type="range"] { --p: 50%; }
.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; }
.mood-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; }
.mood-grid i { font-style: normal; font-size: 22px; line-height: 1; }
.lyrics ruby rt { font-size: .5em; font-weight: 500; opacity: .85; letter-spacing: .02em; }
.lyrics[data-yomi="furigana"] p { line-height: 2; }
.lyrics .ro { display: block; font-size: .6em; font-weight: 500; opacity: .8; margin-top: 2px; letter-spacing: .01em; }
@media (max-width: 560px) { .mood-grid { grid-template-columns: repeat(2, 1fr); } }
.tg small .plus-tag { margin-left: 0; }

/* ===== 再生に合わせて動く背景の波 ===== */
#bgwaves { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#app { position: relative; z-index: 1; }

/* ===== プラン(宝石のバッジ) ===== */
.tier-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 6px; border-radius: 999px; position: relative; overflow: hidden; isolation: isolate; vertical-align: middle; white-space: nowrap; line-height: 1.2; }
.tier-badge .gem { width: 18px; height: 18px; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.tier-badge b { font-family: var(--font); font-style: italic; font-weight: 800; font-size: 13px; letter-spacing: .015em; }
.tier-badge.sapphire { background: linear-gradient(120deg, rgba(95,143,255,.2), rgba(28,52,184,.16)); box-shadow: inset 0 0 0 1px rgba(140,175,255,.42); }
.tier-badge.sapphire b { background: linear-gradient(180deg, #e3ecff, #8fb2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tier-badge.ultimate { background: linear-gradient(120deg, rgba(240,140,255,.2), rgba(90,36,214,.2)); box-shadow: inset 0 0 0 1px rgba(214,150,255,.5); }
.tier-badge.ultimate b { background: linear-gradient(180deg, #fff0fd, #d7a3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tier-badge.free { padding: 3px 10px; box-shadow: inset 0 0 0 1px var(--line-2); }
.tier-badge.free b, .tier-badge.free { font-family: var(--font); font-style: italic; font-weight: 700; font-size: 13px; color: var(--text-2); }
/* ゆっくり光が横切る(有料プランだけ) */
.tier-badge.sapphire::after, .tier-badge.ultimate::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%); transform: translateX(-120%); animation: sheen 7s ease-in-out infinite; }
@keyframes sheen { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.tier-badge.sm { padding: 2px 9px 2px 5px; gap: 4px; } .tier-badge.sm .gem { width: 15px; height: 15px; } .tier-badge.sm b { font-size: 11.5px; }
.tier-badge.xs { padding: 1px 7px 1px 3px; gap: 3px; margin-left: 6px; } .tier-badge.xs .gem { width: 12px; height: 12px; } .tier-badge.xs b { font-size: 10px; }
.tier-badge.xs::after { display: none; }
[data-theme="daylight"] .tier-badge.sapphire b, [data-theme="sakura"] .tier-badge.sapphire b { background: none; color: #2846c8; }
[data-theme="daylight"] .tier-badge.ultimate b, [data-theme="sakura"] .tier-badge.ultimate b { background: none; color: #7a2fd0; }
.plan-badge { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border-radius: 12px; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); background: var(--surface-2); }
.plan-badge.plan-sapphire { border-color: rgba(120,160,255,.28); }
.plan-badge.plan-ultimate { border-color: rgba(200,140,255,.32); }
.lock-plans .tier-badge { margin-bottom: 6px; }

/* ===== 操作キー(アンプのボタンのような丸いキーと、オンで灯るランプ) ===== */
.pkeys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 18px; }
.key { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2px 0; border: 0; background: none; color: var(--text-2); cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.key .cap { position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2);
  background: radial-gradient(120% 120% at 50% 15%, var(--surface-3), var(--surface-2) 60%, var(--surface));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -3px 6px rgba(0,0,0,.28), 0 0 0 1px var(--line), 0 8px 16px -10px rgba(0,0,0,.7);
  transition: transform .14s var(--ease), color .25s, box-shadow .25s; }
.key .cap svg { width: 26px; height: 26px; }
.key .led { position: absolute; top: 6px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--line-2); transition: background .25s, box-shadow .25s; }
.key b { font-size: 12px; font-weight: 700; color: var(--text); }
.key small { font-size: 10.5px; color: var(--accent); min-height: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.key:hover .cap { color: var(--text); }
.key:active .cap { transform: scale(.93); box-shadow: inset 0 2px 6px rgba(0,0,0,.4), 0 0 0 1px var(--line); }
.key.on .cap { color: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -3px 6px rgba(0,0,0,.28), 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 8px 18px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.key.on .led { background: var(--accent); box-shadow: 0 0 6px 1px var(--accent); animation: led-on .5s var(--ease); }
@keyframes led-on { 0% { transform: scale(.4); opacity: .2; } 60% { transform: scale(1.6); } }
.key:focus-visible { outline: none; } .key:focus-visible .cap { outline: 2px solid var(--accent); outline-offset: 3px; }
[data-theme="mono"] .key.on .cap, [data-theme="mono"] .key small { color: var(--text); }

/* ===== EQ とムード(中身が見えるパネル) ===== */
.mods { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-top: 18px; }
.mod { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 11px 13px 12px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 85%, transparent); color: var(--text-2); cursor: pointer; text-align: left; font: inherit; transition: border-color .2s, background .2s; }
.mod:hover { border-color: var(--line-2); }
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.mod-head b { font-size: 12.5px; color: var(--text); }
.mod-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-head .tier-badge { margin-left: 0; }
.eq-curve { display: block; width: 100%; height: 46px; overflow: visible; }
.eq-curve .zero { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.eq-curve .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; transition: d .45s var(--ease); }
.eq-curve .area { fill: var(--accent); opacity: .12; transition: d .45s var(--ease); }
.mod.locked .eq-curve .line { stroke: var(--muted); }
.mod.locked .eq-curve .area { opacity: 0; }
.mood-now { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mood-now > span { min-width: 0; }
.mood-now b { display: block; font-size: 14px; color: var(--text); }
.mood-now small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mood-art { width: 34px; height: 34px; flex: none; color: var(--text-2); }
.mod-mood.on { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.mod-mood.on .mood-art { color: var(--accent); }
.mod-mood.on .mood-art { animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-2px) rotate(-3deg); } }
.now-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.now-foot p { margin: 0; font-size: 12.5px; min-width: 0; }
.leave { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 0; background: none; color: var(--bad); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 4px; opacity: .85; }
.leave svg { width: 16px; height: 16px; }
.leave:hover { opacity: 1; }
.mood-start .mood-art { width: 18px; height: 18px; color: currentColor; }

/* モーダルの中 */
.mood-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; }
.mood-grid .mood-art { width: 36px; height: 36px; color: var(--text-2); transition: transform .3s var(--ease); }
.mood-grid button:hover .mood-art { transform: translateY(-2px); color: var(--text); }
.mood-grid button.on .mood-art { color: var(--accent-ink); }
.eq-preview { position: relative; margin: 2px 0 16px; padding: 10px 12px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.eq-preview .eq-curve { height: 72px; }
.eq-preview > span { position: absolute; bottom: 4px; font-size: 10.5px; color: var(--muted); }
.eq-preview > span:first-of-type { left: 12px; } .eq-preview > span:last-of-type { right: 12px; }

/* ===== 曲が変わったときの入れ替わり(この1か所だけ動かす) ===== */
.now.enter .art { animation: art-in .7s var(--ease); }
.now.enter .track-title, .now.enter .track-sub { animation: rise .6s var(--ease) both; }
.now.enter .track-sub { animation-delay: .06s; }
.now.enter .bg { animation: fade 1.2s ease; }
@keyframes art-in { from { opacity: 0; transform: scale(.9) rotate(-1.5deg); filter: blur(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 420px) { .key .cap { width: 48px; height: 48px; } .key .cap svg { width: 23px; height: 23px; } .mods { grid-template-columns: 1fr 1fr; } }
.lyrics .tr { display: block; font-size: .62em; font-weight: 500; opacity: .85; margin-top: 3px; color: var(--text-2); }
.lyrics p.now .tr { color: var(--accent); opacity: 1; }
.lyrics-tools .btn + .seg { margin-left: 6px; }

/* 高性能カラオケの操作(全画面の歌詞の上) */
.kctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kkey { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 12px; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 12.5px; }
.kkey span { margin-right: 6px; color: var(--text-2); }
.kkey b { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; }
.kkey .icon-btn { width: 32px; height: 32px; font-size: 18px; font-weight: 700; }
.kctl .seg { background: rgba(255,255,255,.08); border-color: transparent; }
.kctl-lock { border: 1px dashed var(--line-2); background: none; color: var(--text-2); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
@media (max-width: 720px) { .karaoke header { flex-wrap: wrap; } .kctl { order: 5; width: 100%; } }

/* 入場曲 */
.ent-now { font-size: 13px; color: var(--text-2); text-align: right; }
.ent-body { padding: 4px 18px 16px; }
.ent-body.off { opacity: .55; }
.ent-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.ent-p { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); overflow: hidden; transition: border-color .2s; }
.ent-p.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ent-play { flex: none; width: 38px; display: grid; place-items: center; border: 0; border-right: 1px solid var(--line); background: none; color: var(--text-2); cursor: pointer; }
.ent-play svg { width: 16px; height: 16px; }
.ent-play:hover { color: var(--accent); }
.ent-play.playing { color: var(--accent); animation: pulse-sfx 1s ease-in-out infinite; }
@keyframes pulse-sfx { 50% { opacity: .45; } }
.ent-pick { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; }
.ent-pick:disabled { cursor: default; }
.ent-wave { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ent-p.on .ent-wave { stroke: var(--accent); }
.ent-song { display: grid; grid-template-columns: 1fr 86px auto; gap: 8px; margin-top: 12px; }
.ent-body > .btn { margin-top: 10px; }
.ent-lock { font-size: 12.5px; padding: 0 18px 14px; margin: 0; }
@media (max-width: 560px) { .ent-song { grid-template-columns: 1fr 80px; } .ent-song .btn { grid-column: 1 / -1; } }

/* 配信オーバーレイの設定 */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ov-preview small { display: block; margin-top: 8px; font-size: 12px; }
.ov-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 20% 10%, #2b3a5c, transparent 60%), radial-gradient(90% 80% at 85% 90%, #4a2a5e, transparent 60%), linear-gradient(160deg, #141b2e, #0b0d16); }
.ov-screen::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 2px, transparent 2px 6px); }
.ov-screen iframe { color-scheme: normal; position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; background: transparent; }
.ov-layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ov-l { text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.ov-l b { display: block; font-size: 14px; }
.ov-l small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.ov-l.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ov-form { margin-top: 12px; }
.ov-url { padding: 18px; }
.ov-url-row { display: flex; gap: 8px; }
.ov-url-row input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 12.5px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); padding: 0 12px; }
.ov-steps { margin: 16px 0 10px; padding-left: 1.3em; color: var(--text-2); font-size: 14px; line-height: 1.9; }
.ov-note { font-size: 12.5px; margin: 0 0 12px; }
@media (max-width: 980px) { .ov-grid { grid-template-columns: 1fr; } }

/* ===== スマホの調整 ===== */
.admin-tabs { display: none; }
.sheet-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 6px; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; border-radius: 12px; cursor: pointer; }
.sheet-item svg { width: 22px; height: 22px; color: var(--text-2); }
.sheet-item.active, .sheet-item.active svg { color: var(--accent); }
.sheet-item:active { background: var(--surface-2); }
.sheet-label { font-size: 12px; color: var(--muted); font-weight: 700; margin: 12px 6px 2px; }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: -8px auto 10px; }
@media (max-width: 820px) {
  .bottom-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .admin-tabs { display: flex; gap: 6px; overflow-x: auto; margin: -6px -16px 14px; padding: 4px 16px 10px; position: sticky; top: var(--topbar-h, 0px); z-index: 20; background: linear-gradient(var(--bg) 75%, transparent); scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 700; background: var(--surface); }
  .admin-tabs a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head h1 { font-size: 24px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 12px 13px; }
  .tile b { font-size: 17px; }
  .banner { flex-wrap: wrap; }
  .banner .muted { margin-left: 0 !important; }
  .hide-touch { display: none; }
  /* 表 → カード */
  .table-wrap { border: 0; background: none; overflow: visible; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: auto; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 0; margin-bottom: 10px; }
  .tbl.stack tbody tr:hover { background: var(--surface); }
  .tbl.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 14px; border: 0; text-align: right; min-width: 0 !important; white-space: normal !important; }
  .tbl.stack td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; }
  .tbl.stack td:first-child { font-size: 14.5px; }
  .tbl.stack td:not([data-label])::before, .tbl.stack td[data-label=""]::before { content: none; }
  .tbl.stack td.row-acts { justify-content: flex-end; flex-wrap: wrap; padding-top: 10px; }
  .tbl.stack td.row-acts:empty { display: none; }
  .grant { padding: 16px; }
  .grant .days { flex-wrap: wrap; }
  .audit-bar select { width: 100%; }
  .log { padding: 12px 14px; }
  .enforce .seg { width: 100%; } .enforce .seg button { flex: 1; }
  /* モーダルは下から出るシートに */
  .modal-back { place-items: end center; padding: 0; }
  .modal { width: 100%; max-height: 88vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: sheet-up .32s var(--ease); }
  .modal .acts { position: sticky; bottom: -20px; background: var(--surface); padding: 10px 0 2px; }
  .modal .acts .btn { flex: 1; justify-content: center; }
  .news-form { padding: 16px; }
  .nf-row .nf-label { width: auto; }
  .nf-foot .btn.primary { width: 100%; justify-content: center; }
  .ov-url-row { flex-wrap: wrap; } .ov-url-row input { flex-basis: 100%; }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } }
@media (hover: none) { .hide-touch { display: none; } }

/* 入場曲: 曲の位置 */
.ent-songbox { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ent-sub { display: block; font-size: 13.5px; margin-bottom: 8px; }
.ent-song { grid-template-columns: 1fr auto; margin-top: 0; }
.ent-song .btn svg { width: 15px; height: 15px; }
.ent-res { display: grid; gap: 6px; margin-top: 10px; }
.ent-r { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.ent-r:hover { border-color: var(--line-2); }
.ent-r img, .ent-r .ph, .ent-track img, .ent-track .ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-3); }
.ent-r span { min-width: 0; } .ent-r b, .ent-track b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-r small, .ent-track small { display: block; font-size: 12px; color: var(--muted); }
.ent-ed { margin-top: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); }
.ent-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ent-track > div { min-width: 0; }
.ent-time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 14px 0 8px; font-size: 13px; color: var(--text-2); }
.ent-time b { font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }
.ent-time .muted { flex-basis: 100%; font-size: 12px; }
.ent-range { position: relative; height: 44px; }
.ent-track-bar { position: absolute; left: 0; right: 0; top: 50%; height: 10px; margin-top: -5px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--line-2) 0 2px, transparent 2px 6px), var(--surface-3); overflow: hidden; }
.ent-track-bar .win { position: absolute; top: 0; bottom: 0; left: var(--pos); width: var(--win); min-width: 6px; background: var(--accent); border-radius: 6px; box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); }
.ent-range input[type="range"] { position: absolute; inset: 0; width: 100%; height: 44px; margin: 0; opacity: 0; cursor: grab; touch-action: pan-y; }
.ent-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ent-acts { display: flex; gap: 8px; margin-top: 12px; }
.ent-acts .btn svg { width: 14px; height: 14px; }
#ent-yt iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; margin-top: 12px; }
@media (max-width: 820px) { .ent-acts .btn { flex: 1; justify-content: center; } }

/* ===== 予約・24時間ラジオ ===== */
.sc-radio { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; padding: 20px 22px; position: relative; overflow: hidden; }
.sc-radio.live { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), var(--surface); }
.sc-radio-art { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.sc-radio.live .sc-radio-art { color: var(--accent); background: var(--accent-soft); }
.sc-radio-art svg { width: 46px; height: 46px; }
.sc-radio-art .waves path { opacity: .35; }
.sc-radio-art .waves.live path { animation: rd-wave 2.2s ease-in-out infinite; }
.sc-radio-art .waves.live path:nth-child(3), .sc-radio-art .waves.live path:nth-child(4) { animation-delay: .35s; }
@keyframes rd-wave { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
.sc-radio-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-radio-top b { font-size: 17px; }
.sc-radio-body p { margin: 6px 0 2px; font-size: 14.5px; }
.sc-radio-body small { display: block; font-size: 12.5px; }
.sc-radio-acts { display: flex; gap: 8px; }
.onair { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; color: #ff5d6c; background: rgba(255, 93, 108, .12); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .35); }
.onair i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 rgba(255, 93, 108, .6); animation: onair 1.6s ease-out infinite; }
.onair.wait { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); letter-spacing: .02em; }
.onair.wait i { animation: none; }
@keyframes onair { 0% { box-shadow: 0 0 0 0 rgba(255, 93, 108, .55); } 100% { box-shadow: 0 0 0 7px rgba(255, 93, 108, 0); } }
.onair-chip { color: #ff5d6c; font-weight: 800; letter-spacing: .1em; font-size: 11px; }
.onair-chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: onair 1.6s ease-out infinite; }
.chip svg { width: 13px; height: 13px; }
.sc-now { margin-bottom: 14px; align-items: center; gap: 10px; }
.sc-now svg { width: 18px; height: 18px; flex: none; }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 10px; }
.sc-head .form-group-title { margin: 0; }
.sc-head .form-group-title .muted { font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.sc-list { display: grid; gap: 10px; }
.sc-item { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: opacity .2s, border-color .2s; }
.sc-item:hover { border-color: var(--line-2); }
.sc-item.off { opacity: .55; }
.sc-time b { display: block; font-size: 32px; line-height: 1; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.sc-days { display: flex; gap: 3px; margin-top: 9px; }
.sc-days i { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 5px; font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--surface-2); opacity: .55; }
.sc-days i.on { color: var(--accent); background: var(--accent-soft); opacity: 1; }
.sc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc-name { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-src { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-2); min-width: 0; }
.sc-src svg { width: 17px; height: 17px; flex: none; color: var(--accent); }
.sc-meta { font-size: 12.5px; color: var(--muted); }
.sc-next { font-size: 12.5px; color: var(--accent); font-weight: 700; }
.sc-item.off .sc-next { color: var(--muted); }
.sc-acts { display: flex; align-items: center; gap: 6px; }
.sc-foot { margin-top: 16px; font-size: 12.5px; }
.sc-promo { display: flex; gap: 22px; padding: 24px; align-items: flex-start; }
.sc-promo-art { width: 84px; height: 84px; flex: none; color: var(--accent); }
.sc-promo b { font-size: 17px; }
.sc-promo ul { margin: 10px 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: grid; gap: 4px; }
/* 編集シート */
.modal.wide { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; }
.sc-form { display: grid; gap: 16px; margin-top: 12px; }
.sc-f > label, .sc-f > div > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.sc-when { display: grid; grid-template-columns: 172px 1fr; gap: 10px; }
.sc-when input[type="time"] { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; height: 48px; }
.sc-name-f input { height: 48px; }
.sc-daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sc-daypick button { height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-weight: 800; font-size: 15px; cursor: pointer; transition: background .15s, color .15s, transform .15s var(--ease); }
.sc-daypick button:active { transform: scale(.94); }
.sc-daypick button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sc-quick { display: flex; gap: 6px; margin-top: 8px; }
.sc-quick button { border: 1px solid var(--line-2); background: none; color: var(--text-2); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.sc-quick button:hover { color: var(--text); border-color: var(--muted); }
.sc-srcseg { margin-bottom: 10px; }
.sc-srcbox p { margin: 0; font-size: 13px; }
.sc-moods { grid-template-columns: repeat(4, 1fr); }
.sc-moods button { padding: 10px 4px 9px; font-size: 12px; }
.sc-moods .mood-art { width: 28px; height: 28px; }
.sc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc-check { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; cursor: pointer; }
.sc-check b { display: block; font-size: 14px; }
.sc-check small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (min-width: 821px) { .sheet-grab { display: none; } }
@media (max-width: 820px) {
  .modal.wide { max-height: 92vh; }
  .sc-radio { grid-template-columns: 56px 1fr; gap: 14px; padding: 16px; }
  .sc-radio-art { width: 56px; height: 56px; border-radius: 15px; }
  .sc-radio-art svg { width: 36px; height: 36px; }
  .sc-radio-acts { grid-column: 1 / -1; }
  .sc-radio-acts .btn { flex: 1; justify-content: center; }
  .sc-item { grid-template-columns: 1fr auto; gap: 10px 12px; padding: 14px; }
  .sc-time { display: flex; align-items: center; gap: 12px; }
  .sc-time b { font-size: 26px; }
  .sc-days { margin-top: 0; }
  .sc-main { grid-column: 1 / -1; grid-row: 2; }
  .sc-acts { grid-column: 2; grid-row: 1; }
  .sc-promo { flex-direction: column; gap: 14px; padding: 18px; }
  .sc-promo-art { width: 64px; height: 64px; }
}
@media (max-width: 380px) {
  .sc-when { grid-template-columns: 1fr; }
  .sc-moods { grid-template-columns: repeat(3, 1fr); }
  .sc-daypick { gap: 4px; }
  .sc-daypick button { height: 40px; font-size: 14px; }
  .sc-days i { width: 15px; height: 15px; font-size: 9px; }
}
/* iPhone は 16px 未満の入力欄を触ると画面が拡大されるので、入力欄だけ 16px にする */
@media (hover: none) and (pointer: coarse) {
  input[type="text"], input[type="search"], input[type="number"], input[type="url"], input[type="time"], select, textarea { font-size: 16px; }
}

/* ===== サーバーテーマ ===== */
.th-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.th-preview { position: sticky; top: 16px; display: grid; gap: 10px; }
.th-card { position: relative; aspect-ratio: 1000 / 240; border-radius: 16px; overflow: hidden; background: var(--surface-2); box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .8); }
.th-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, filter .35s ease; }
.th-card.loading img { opacity: .55; filter: saturate(.6) blur(1px); }
.th-card:not(:has(img)) { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.th-spin { position: absolute; right: 12px; top: 12px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; opacity: 0; transition: opacity .2s; animation: spin .8s linear infinite; }
.th-card.loading .th-spin { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.th-sample { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.th-sample-label { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-right: 4px; }
.th-sample .btn { pointer-events: none; }
.th-sample .switch { pointer-events: none; }
.th-sample-bar { flex: 1; min-width: 90px; height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.th-sample-bar i { display: block; width: 62%; height: 100%; background: linear-gradient(90deg, rgb(var(--glow-1)), rgb(var(--glow-2))); border-radius: inherit; }
.th-sample-chip { display: none; }
.th-side { display: grid; gap: 22px; }
.th-sec h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.th-sec .sc-check + .sc-check { margin-top: 8px; }
.th-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.th-sw { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 4px 9px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .15s, transform .15s var(--ease); }
.th-sw:active { transform: scale(.95); }
.th-sw i { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(from 210deg, var(--a), var(--b), var(--a)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 6px 14px -6px var(--a); }
.th-sw.on { border-color: var(--text); color: var(--text); }
.th-sw.on i { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 0 0 3px var(--surface), 0 0 0 5px var(--a); }
.th-custom i { background: conic-gradient(from 210deg, var(--a), var(--b), var(--a)); position: relative; }
.th-custom i::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 17px; font-weight: 800; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.th-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 12px; }
.th-colors label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.th-colors input[type="color"] { -webkit-appearance: none; appearance: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; flex: none; }
.th-colors input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.th-colors input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; }
.th-colors input[type="color"]::-moz-color-swatch { border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; }
.th-colors span { display: grid; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.th-colors code { font-size: 12px; color: var(--muted); font-weight: 500; }
.th-mode { display: flex; }
.th-mode button { flex: 1; }
.th-hint { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.6; }
.th-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.th-cd { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; }
.th-cd svg { width: 100%; height: auto; stroke: currentColor; stroke-width: 1.6; opacity: .8; }
.th-cd svg .f { fill: currentColor; fill-opacity: .35; stroke: none; }
.th-cd svg .f2 { fill: currentColor; fill-opacity: .14; }
.th-cd svg .o { stroke-width: 1; stroke-opacity: .6; }
.th-cd svg .t { stroke: var(--accent); stroke-width: 1.8; }
.th-cd.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.th-cd.on svg { color: var(--accent); opacity: 1; }
.th-label { position: relative; }
.th-label input { padding-right: 56px; }
.th-label span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-variant-numeric: tabular-nums; }
.th-bar { position: sticky; bottom: 12px; z-index: 15; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.th-bar > .muted { margin-right: auto; font-size: 13px; }
.th-bar.dirty { border-color: color-mix(in srgb, var(--accent) 50%, var(--line-2)); }
.th-bar.dirty > .muted { color: var(--text-2); }
@media (max-width: 980px) {
  .th-grid { grid-template-columns: 1fr; }
  .th-preview { position: sticky; top: var(--topbar-h, 0px); z-index: 12; padding: 8px 0 10px; margin: -8px 0 0; background: linear-gradient(var(--bg) 88%, transparent); }
  .th-preview > small, .th-sample { display: none; }
}
@media (max-width: 820px) {
  .th-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .th-bar .btn.primary { min-width: 120px; justify-content: center; }
  .th-swatches { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .th-sw { padding: 9px 2px 8px; font-size: 11px; gap: 6px; }
  .th-sw i { width: 26px; height: 26px; }
  .th-bar > .muted { font-size: 12px; }
  .th-mode button { padding: 7px 6px; }
}
@media (max-width: 380px) { .th-colors { grid-template-columns: 1fr; } }
body:has(.mini) .th-bar { bottom: 88px; }
@media (max-width: 820px) { body:has(.mini) .th-bar { bottom: calc(64px + 66px + 8px + env(safe-area-inset-bottom)); } }
.th-bar:not(.dirty) { position: static; }

/* ===== NEX Secure Network ===== */
.sv-page { background: var(--bg); }
.sv-card { position: relative; z-index: 1; width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 20px; box-shadow: var(--shadow); }
.sv-brand { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.sv-brand svg { width: 16px; height: 16px; color: var(--accent); }
.sv-who { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.sv-who img { width: 38px; height: 38px; border-radius: 50%; flex: none; }
.sv-who b { display: block; font-size: 14.5px; }
.sv-who span { display: block; font-size: 12px; color: var(--muted); }
.sv-title { margin: 20px 0 0; font-size: 24px; line-height: 1.3; }
.sv-sub { margin: 6px 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.sv-body { display: grid; gap: 10px; }
.sv-body .btn { height: 46px; justify-content: center; font-size: 15px; }
.sv-pk { display: grid; justify-items: center; gap: 10px; padding: 18px 12px 4px; text-align: center; border: 1px dashed var(--line-2); border-radius: 14px; }
.sv-pk > svg { width: 40px; height: 40px; color: var(--accent); }
.sv-pk p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.sv-pk .btn { width: 100%; margin-bottom: 12px; }
.sv-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sv-code { height: 54px !important; font-size: 26px !important; font-weight: 800; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.sv-code-b { letter-spacing: .12em; font-size: 22px !important; }
.sv-code::placeholder { color: var(--line-2); }
.sv-note { margin: 0; font-size: 13.5px; color: var(--text-2); }
.sv-send { justify-self: start; height: 38px !important; font-size: 13.5px !important; }
.sv-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sv-alt span { width: 100%; font-size: 12px; font-weight: 700; color: var(--muted); }
.sv-alt button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: none; color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.sv-alt button:hover { color: var(--text); border-color: var(--muted); }
.sv-alt svg { width: 16px; height: 16px; }
.sv-trust { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; cursor: pointer; }
.sv-trust input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.sv-trust b { display: block; font-size: 13.5px; }
.sv-trust small { display: block; font-size: 12px; color: var(--muted); }
.sv-err { margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 13px; color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.sv-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.linkish { border: 0; background: none; padding: 0; color: var(--text-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sv.shake { animation: sv-shake .36s ease; }
@keyframes sv-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.sv-modal .sv-title { font-size: 20px; margin-top: 12px; }
/* セキュリティの画面 */
.sec-hero { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); max-width: 760px; }
.sec-hero b { font-size: 16px; }
.sec-hero p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.sec-mark { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.sec-mark svg { width: 26px; height: 26px; }
.sec-hero.on { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.sec-hero.on .sec-mark { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.sec-list { display: grid; max-width: 760px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.sec-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: start; padding: 16px 18px; }
.sec-row + .sec-row { border-top: 1px solid var(--line); }
.sec-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); color: var(--text-2); }
.sec-ic svg { width: 21px; height: 21px; }
.sec-tx { min-width: 0; padding-top: 1px; }
.sec-tx > b { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; }
.sec-tx > small { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.sec-ctl { display: flex; gap: 6px; align-items: center; padding-top: 4px; }
.sec-rec, .sec-cur, .sec-pend { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.sec-rec { color: var(--accent); background: var(--accent-soft); }
.sec-cur { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.sec-pend { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.sec-pks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.sec-pks li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 6px 8px 12px; border-radius: 10px; background: var(--surface-2); }
.sec-pks b { display: block; font-size: 13.5px; }
.sec-pks small { display: block; font-size: 12px; color: var(--muted); }
.sec-foot { grid-template-columns: 1fr auto; align-items: center; background: var(--surface-2); }
.sec-foot .muted { font-size: 12.5px; }
.sec-log { max-width: 760px; display: grid; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.sec-log > div { display: grid; grid-template-columns: 150px 190px 1fr; gap: 12px; padding: 10px 16px; font-size: 13px; }
.sec-log > div + div { border-top: 1px solid var(--line); }
.sec-log time { color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-log span { color: var(--muted); }
.sec-log .bad b { color: var(--bad); }
.sec-log > p { margin: 0; padding: 16px; }
.sec-off { margin-top: 22px; }
.sec-note { margin-top: 30px; font-size: 12px; }
.sec-codes { list-style: none; counter-reset: c; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.sec-codes li { counter-increment: c; display: flex; align-items: baseline; gap: 8px; }
.sec-codes li::before { content: counter(c); width: 18px; text-align: right; font-size: 11px; color: var(--muted); }
.sec-codes code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15.5px; font-weight: 700; letter-spacing: .06em; }
.sec-code-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sec-steps { margin: 6px 0 14px; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; }
.sec-steps b { display: block; }
.sec-steps span { color: var(--text-2); }
.sec-qr { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.sec-qr .qr { width: 156px; height: 156px; flex: none; padding: 6px; border-radius: 12px; background: #fff; }
.sec-qr .qr svg { width: 100%; height: 100%; display: block; }
.sec-secret { display: grid; gap: 6px; min-width: 0; }
.sec-secret small { font-size: 12px; color: var(--muted); font-weight: 700; }
.sec-secret code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; word-break: break-all; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); }
.sec-inline { display: flex; gap: 8px; }
.sec-inline input { flex: 1; min-width: 0; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 12px; outline: none; }
.sec-inline input:focus { border-color: var(--accent); }
.modal .sv-label { display: block; margin: 12px 0 6px; }
@media (max-width: 820px) {
  .sv-card { padding: 22px 18px 18px; border-radius: 16px; }
  .sec-row { grid-template-columns: 36px 1fr; gap: 12px; padding: 14px; }
  .sec-ic { width: 36px; height: 36px; }
  .sec-ctl { grid-column: 2; padding-top: 0; }
  .sec-foot { grid-template-columns: 1fr; }
  .sec-log > div { grid-template-columns: 1fr; gap: 2px; }
  .sec-qr { flex-direction: column; align-items: stretch; }
  .sec-qr .qr { align-self: center; }
}
.sv-page::before, .sv-page::after { display: none; }
.sv-page { grid-template-columns: minmax(0, 1fr); justify-items: center; }
@media (max-width: 480px) { .sv-page { padding: 16px; place-items: start center; padding-top: 28px; } }

/* =====================================================================
   Ver.10 リキッドグラス
   ここから下は見た目だけ。上の部品の形はそのまま使い、面をガラスにして、
   背景に再生中の曲のアートワークをぼかして敷く。
   ===================================================================== */

/* ----- 背景(アートワーク + テーマの光) ----- */
body { background: var(--bg); letter-spacing: .005em; }
#ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
#ambient .amb-art {
  position: absolute; inset: -18%; background-size: cover; background-position: center;
  filter: blur(90px) saturate(1.6); transform: scale(1.1); opacity: 0;
  transition: opacity 1.4s ease;
}
#ambient .amb-art.on { opacity: var(--amb); }
#ambient .amb-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(55vmax 45vmax at 8% 4%, rgba(var(--glow-1), .2), transparent 60%),
    radial-gradient(50vmax 45vmax at 96% 12%, rgba(var(--glow-2), .2), transparent 60%),
    radial-gradient(60vmax 40vmax at 60% 110%, rgba(var(--glow-2), .12), transparent 60%),
    linear-gradient(var(--veil), var(--veil));
}
.has-art #ambient .amb-glow { opacity: .75; }
#bgwaves { opacity: .55; }

/* ----- ガラスの面(共通) ----- */
.side, .now, .tabs, .card, .guild-card, .pl, .tile, .table-wrap, .plan-card, .banner, .home-summary > div,
.field, .mod, .sc-item, .th-bar, .sv-card, .lock-plans div, .tbl.stack tr {
  background: var(--surface);
  border-color: var(--line-2);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 color-mix(in srgb, var(--glass-hi) 35%, transparent), var(--shadow);
}
.card { border-radius: var(--r); }
.form .field { box-shadow: inset 0 1px 0 var(--glass-hi); }

/* ----- 文字 ----- */
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.page-head p { font-size: 14px; }
.form-group-title { font-size: 12.5px; letter-spacing: .06em; color: var(--muted); }

/* ----- ボタン・入力 ----- */
.btn { border-radius: 999px; background: var(--surface-2); border-color: var(--line-2); box-shadow: inset 0 1px 0 var(--glass-hi); font-weight: 700; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent)); border-color: color-mix(in srgb, var(--accent) 70%, #fff); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px -10px var(--accent); }
.btn.ghost { box-shadow: none; }
.btn.sm { border-radius: 999px; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn.big {
  background: rgba(255,255,255,.94); color: #10121c;
  box-shadow: inset 0 -3px 8px rgba(16,18,28,.12), inset 0 1px 0 #fff, 0 12px 28px -10px rgba(255,255,255,.45), 0 10px 24px -12px rgba(0,0,0,.6);
}
.icon-btn.big:hover { background: #fff; color: #10121c; }
[data-theme="daylight"] .icon-btn.big, [data-theme="sakura"] .icon-btn.big { background: var(--text); color: #fff; box-shadow: 0 12px 26px -12px rgba(0,0,0,.5); }
input[type="text"], input[type="search"], input[type="number"], input[type="url"], input[type="time"], select, .news-form textarea {
  border-radius: 14px; background: var(--surface-2); border-color: var(--line-2); box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select option { background: var(--solid); color: var(--text); }
.switch span { background: var(--surface-3); border-color: var(--line-2); }
.switch span::after { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--surface-3) var(--p, 50%)); }
input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -6px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.seg { background: var(--surface-2); border-color: var(--line-2); border-radius: 999px; box-shadow: inset 0 1px 2px rgba(0,0,0,.12); }
.seg button { border-radius: 999px; }
.seg button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px -4px var(--accent); }
.chip { background: var(--surface-2); border-color: var(--line-2); box-shadow: inset 0 1px 0 var(--glass-hi); }

/* ----- 外枠: 浮いたガラスのサイドバー ----- */
.shell { grid-template-columns: 276px 1fr; }
.side {
  top: 14px; height: calc(100vh - 28px); height: calc(100svh - 28px); margin: 14px 0 14px 14px;
  border: 1px solid var(--line-2); border-radius: 26px; padding: 18px 12px 14px;
}
.side .brand { font-size: 21px; padding: 4px 10px 14px; }
.side .brand img { width: 32px; height: 32px; border-radius: 9px; }
.guild-btn { border-radius: 16px; background: var(--surface-2); border-color: var(--line-2); box-shadow: inset 0 1px 0 var(--glass-hi); }
.guild-btn:hover { background: var(--surface-3); }
.gicon { border-radius: 11px; background: var(--surface-3); }
.nav-list { gap: 3px; }
.nav-item { border-radius: 14px; padding: 10px 12px; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--surface-3); color: var(--text); font-weight: 700; box-shadow: inset 0 1px 0 var(--glass-hi), 0 6px 16px -10px rgba(0,0,0,.5); }
.nav-item.active svg { color: var(--accent); }
.me { margin-top: 6px; padding: 10px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 1px 0 var(--glass-hi); }
.plan-badge { border-radius: 14px; background: var(--surface-2); }
.page { padding: 30px clamp(18px, 2.6vw, 36px) 140px; max-width: 1440px; }

/* ----- プレイヤー ----- */
.player { grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); gap: 22px; }
.now { border-radius: 30px; padding: 22px; border: 1px solid var(--line-2); }
.now .bg { opacity: .28; }
.art { border-radius: 22px; box-shadow: 0 26px 50px -22px rgba(0,0,0,.75), inset 0 0 0 1px rgba(255,255,255,.08); }
.track-title { font-size: 24px; font-weight: 800; letter-spacing: -.005em; margin-top: 20px; }
.bar .rail { height: 6px; background: var(--surface-3); }
.bar .fill { background: linear-gradient(90deg, var(--accent), rgb(var(--glow-2))); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent); }
.bar .knob { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.ctl { border-radius: 16px; }
.ctl:hover { background: var(--surface-2); }
.key .cap {
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -2px 6px rgba(0,0,0,.18), 0 0 0 1px var(--line-2), 0 10px 18px -12px rgba(0,0,0,.7);
}
.key.on .cap { background: color-mix(in srgb, var(--accent) 26%, transparent); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 22px -4px var(--accent); }
[data-theme="daylight"] .key.on .cap, [data-theme="sakura"] .key.on .cap { color: var(--accent); }
.mod { border-radius: 18px; }

/* 右のパネル: 画面の高さに合わせて固定し、中だけスクロール */
.tabs { border-radius: 999px; padding: 5px; border: 1px solid var(--line-2); }
.tab { border-radius: 999px; }
.tab[aria-selected="true"] { background: var(--surface-3); box-shadow: inset 0 1px 0 var(--glass-hi), 0 6px 14px -8px rgba(0,0,0,.6); }
@media (min-width: 981px) {
  .side-panel { position: sticky; top: 24px; display: flex; flex-direction: column; max-height: calc(100vh - 48px); max-height: calc(100svh - 48px); }
  .side-panel #panel { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
  .side-panel .lyrics { height: calc(100svh - 250px); }
}
.list { gap: 4px; }
.row { border-radius: 16px; }
.row:hover { background: var(--surface-2); box-shadow: inset 0 1px 0 var(--glass-hi); }
.row .thumb { border-radius: 10px; }
.lyrics p { border-radius: 14px; }
.lyrics p.now { background: var(--surface-2); box-shadow: inset 0 1px 0 var(--glass-hi); text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent); }
.karaoke { background: transparent; -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%); }
.karaoke::before { content: ""; position: absolute; inset: 0; background: var(--veil); z-index: 0; }

/* ----- 下のミニプレイヤー: 浮いたガラスのバー ----- */
.mini {
  left: calc(276px + 28px); right: 28px; bottom: 16px; border-radius: 22px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 20px 50px -20px rgba(0,0,0,.7); overflow: hidden;
}
.mini .line { top: auto; bottom: 0; height: 3px; background: transparent; }
.mini .line i { background: linear-gradient(90deg, var(--accent), rgb(var(--glow-2))); }
.mini .info img, .mini .info .ph { border-radius: 12px; }

/* ----- モーダル・メニュー・トースト ----- */
.modal-back { background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal, .menu {
  background: color-mix(in srgb, var(--solid) 82%, transparent); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(34px) saturate(180%); backdrop-filter: blur(34px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 80px -30px rgba(0,0,0,.8);
}
.modal { border-radius: 26px; }
.menu { border-radius: 18px; }
.menu button { border-radius: 12px; }
.menu button:hover { background: var(--surface-3); }
.toast {
  border-radius: 999px; padding: 11px 18px; color: var(--text);
  background: color-mix(in srgb, var(--solid) 80%, transparent); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 40px -18px rgba(0,0,0,.7);
}
.toast.bad { background: color-mix(in srgb, var(--bad) 85%, transparent); color: #fff; border-color: transparent; }
.skeleton { background: linear-gradient(90deg, var(--surface), var(--surface-3), var(--surface)); background-size: 200% 100%; }

/* ----- サーバー一覧・プレイリスト ----- */
.guild-card, .pl { border-radius: 22px; }
.guild-card:hover, .pl:hover { background: var(--surface-2); }
.guild-card .gicon { border-radius: 16px; }
.pl .cover { border-radius: 16px; box-shadow: 0 16px 30px -16px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.home-summary > div { border-radius: 999px; }

/* ----- ログイン ----- */
.login::before, .login::after { opacity: .35; }
.login-card { padding: 34px 30px 26px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); }
.login-card img { border-radius: 22px; }

/* ----- スマホ ----- */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .page { padding: 16px 14px 190px; }
  .topbar-m {
    margin: 10px 10px 0; top: 10px; border: 1px solid var(--line-2); border-radius: 20px; padding: 8px;
    background: var(--surface); -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%);
    box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
  }
  .bottom-nav {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 66px; padding: 6px; border-radius: 26px;
    background: var(--surface); border: 1px solid var(--line-2);
    -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
    box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 40px -16px rgba(0,0,0,.7);
  }
  .bottom-nav button { border-radius: 20px; font-weight: 700; }
  .bottom-nav button.active { background: var(--surface-3); box-shadow: inset 0 1px 0 var(--glass-hi); }
  .mini { left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); border-radius: 20px; padding: 8px 10px; }
  .toasts { bottom: calc(160px + env(safe-area-inset-bottom)); }
  .now { border-radius: 26px; padding: 16px; }
  .modal { border-radius: 26px 26px 0 0; }
  .modal .acts { background: transparent; }
  .modal-back { place-items: end center; }
}
@media (max-width: 820px) { body:has(.mini) .th-bar { bottom: calc(86px + 70px + 8px + env(safe-area-inset-bottom)); } }

/* ガラスに対応していないブラウザは、少し濃い面で読めるように */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .side, .now, .tabs, .card, .mini, .bottom-nav, .topbar-m, .modal, .menu, .toast, .field, .guild-card, .pl { background: var(--solid); }
}
.reduce #ambient .amb-art { transition: none; }

/* ----- 右のパネルもガラスの箱に。上に「いつでも追加できる検索欄」 ----- */
.side::-webkit-scrollbar { display: none; }
.side { scrollbar-width: none; }
.side-panel, .lyr-dock {
  padding: 12px; border-radius: 30px; border: 1px solid var(--line-2); background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}
.side-panel .tabs { background: var(--surface-2); box-shadow: inset 0 1px 2px rgba(0,0,0,.12); -webkit-backdrop-filter: none; backdrop-filter: none; margin-bottom: 12px; }
.side-panel .card { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.side-panel #search-form { display: none; }
.quick-add {
  display: flex; align-items: center; gap: 10px; height: 50px; margin-bottom: 10px; padding: 0 8px 0 16px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 var(--glass-hi);
  transition: border-color .15s, box-shadow .15s;
}
.quick-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), inset 0 1px 0 var(--glass-hi); }
.quick-add > svg { width: 19px; height: 19px; flex: none; color: var(--muted); }
.quick-add input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; box-shadow: none; font-size: 15px; }
.quick-add input:focus { box-shadow: none; }
.quick-add .kbd { flex: none; background: var(--surface-3); border-color: var(--line-2); color: var(--muted); }
.list-head { padding: 0 6px; }

/* 広い画面: [曲] [キュー・検索] [歌詞] の3列 */
.lyr-dock { display: none; }
@media (min-width: 1500px) {
  .player.docked { grid-template-columns: minmax(360px, 420px) minmax(0, 1fr) minmax(0, 1fr); }
  .player.docked .tab[data-tab="lyrics"] { display: none; }
  .player.docked .lyr-dock { display: flex; flex-direction: column; position: sticky; top: 24px; max-height: calc(100svh - 48px); min-width: 0; }
  .lyr-dock .lyrics { height: calc(100svh - 210px); }
  .lyr-dock > .card { flex: 1; min-height: 0; }
  .lyr-dock .card { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .dock-head { display: flex; align-items: baseline; gap: 10px; padding: 6px 10px 8px; min-width: 0; }
  .dock-head b { font-size: 15px; }
  .dock-head span { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lyr-dock .lyrics-tools { padding: 0 6px; }
  .page:has(.player.docked) { max-width: none; }
}
@media (max-width: 980px) {
  .side-panel { padding: 10px; border-radius: 26px; }
}

/* ----- 細かいところ ----- */
.topbar-m .guild-btn { background: transparent; border-color: transparent; box-shadow: none; }
#hist-root > .list, #pl-root > .list {
  padding: 8px; border-radius: 26px; border: 1px solid var(--line-2); background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}

/* =====================================================================
   仕上げ(Ver.10): 落ち着いた質感
   ボタンやバーは単色にして、色の付いた光る影・文字の発光はやめる。
   背景の光も1つだけにして、曲のアートワークの色を主役にする。
   ===================================================================== */
#ambient .amb-glow {
  background:
    radial-gradient(80vmax 42vmax at 50% -12%, rgba(var(--glow-1), .1), transparent 62%),
    linear-gradient(var(--veil), var(--veil));
}
#bgwaves { opacity: .3; }
.btn.primary { background: var(--accent); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { filter: brightness(1.06); }
.seg button.on { background: var(--accent); box-shadow: none; }
.bar .fill { background: var(--accent); box-shadow: none; }
.mini .line i { background: var(--accent); }
.icon-btn.big { box-shadow: inset 0 -2px 6px rgba(16,18,28,.1), 0 10px 22px -12px rgba(0,0,0,.65); }
.key.on .cap { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.key.on .led { box-shadow: none; }
.lyrics p.now { text-shadow: none; }
.player-kicker i { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
