:root {
  --bg: #0c0a14;
  --surface: rgba(28, 24, 46, 0.72);
  --surface-strong: #1d1930;
  --text: #f1eefb;
  --muted: #a49cc0;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #ff5c8a;
  --accent-2: #ffb35c;
  --accent-3: #8b5cff;
  --accent-soft: rgba(255, 92, 138, 0.14);
  --grad: linear-gradient(120deg, var(--accent-2), var(--accent) 50%, var(--accent-3));
  --chip: rgba(255, 255, 255, 0.06);
  --danger: #ff6b6b;
  --glow: 0 0 24px rgba(255, 92, 138, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.65;
}

/* 背景のオーロラ */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(139, 92, 255, 0.28), transparent 60%),
    radial-gradient(700px 480px at 95% 0%, rgba(255, 92, 138, 0.22), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(255, 179, 92, 0.12), transparent 60%),
    var(--bg);
}

/* ヘッダー */
.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 8px;
  max-width: 1280px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 48px; height: 48px; filter: drop-shadow(0 6px 18px rgba(255, 92, 138, 0.45)); }
.logo { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.1; }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(16px);
}
.tab {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 20px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: #fff; background: var(--grad); box-shadow: var(--glow); }
[hidden] { display: none !important; }

/* レイアウト */
.layout {
  display: grid;
  gap: 20px;
  padding: 16px 24px 48px;
  max-width: 1280px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .layout { grid-template-columns: 380px 1fr; align-items: start; }
  .panel { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
}

.panel, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.panel { padding: 20px; }
.panel-title {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.hint.error, .error { color: var(--danger); }

input, select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
select option { background: var(--surface-strong); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* 読み取ったコード */
.parsed { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 10px; }
.parsed-chord {
  display: flex;
  flex-direction: column;
  align-items: center;
  font: inherit;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--chip);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.parsed-chord:hover { transform: translateY(-1px); border-color: var(--accent); }
.parsed-chord .symbol { font-weight: 800; }
.parsed-chord .notes { font-size: 10px; color: var(--muted); }
.parsed-chord.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--glow); }
.parsed-chord.invalid { border-color: var(--danger); cursor: help; }
.parsed-chord.invalid .notes { color: var(--danger); }
.insert-point {
  font: inherit;
  font-size: 12px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.insert-point:hover { border-color: var(--accent); color: var(--accent); }
.insert-point.selected { border-style: solid; border-color: transparent; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.focus-line { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.focus-line strong { color: var(--text); margin-left: 6px; }

.palette { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.palette button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.palette button:hover { border-color: var(--accent); background: var(--accent-soft); }
.palette-actions { display: flex; gap: 14px; margin-top: 8px; }

.link {
  font: inherit;
  font-size: 12px;
  background: none;
  border: none;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover { color: var(--text); }

details summary { cursor: pointer; font-size: 13px; color: var(--muted); }
details summary:hover { color: var(--text); }
.options { margin-bottom: 16px; }
.options[open] summary { margin-bottom: 12px; }

.guide { margin-top: 14px; font-size: 12px; }
.guide table { border-collapse: collapse; margin: 8px 0; width: 100%; }
.guide th, .guide td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); font-weight: normal; }
.guide th { color: var(--muted); }
.guide .example { font-weight: 800; }

.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-bottom: 16px; cursor: pointer; color: var(--muted); }
.check input { width: auto; margin-top: 4px; accent-color: var(--accent); }

.primary {
  width: 100%;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: var(--grad);
  background-size: 160% 100%;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: background-position 0.4s, transform 0.15s;
}
.primary:hover { background-position: 100% 0; transform: translateY(-1px); }
.primary:disabled { opacity: 0.6; cursor: wait; }

/* 結果 */
.results-head { min-height: 32px; }
.status { color: var(--muted); margin: 4px 0 12px; font-size: 14px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.card {
  padding: 18px 20px;
  animation: rise 0.45s both;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-strong); }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.card-title { flex: 1; min-width: 0; }
.badge {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 58px;
  padding: 0 10px;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  box-shadow: var(--glow);
}
.technique { margin: 0; font-size: 17px; font-weight: 800; }
.meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.stars { color: var(--accent-2); letter-spacing: 1px; }
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--border);
  font-size: 11px;
}

.score { width: 72px; height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; flex: none; }
.score-bar { display: block; height: 100%; background: var(--grad); border-radius: 3px; }

.progression, .route { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.chord {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--chip);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: box-shadow 0.15s, transform 0.15s;
}
.chord.changed { border-color: rgba(255, 92, 138, 0.5); color: #ffc2d3; background: var(--accent-soft); }
.chord.emo { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.chord.playing, .step.playing { transform: translateY(-2px) scale(1.06); box-shadow: 0 0 0 2px #fff, var(--glow); }
.arrow { color: var(--muted); font-size: 12px; }

.play-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.play {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffd0dd;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.play:hover { box-shadow: var(--glow); }
.play.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.play-before { border-color: var(--border-strong); background: var(--chip); color: var(--muted); }
.change { font-size: 13px; color: var(--muted); }

/* 鍵盤と構成音 */
.detail { display: grid; gap: 14px; margin-bottom: 12px; }
@media (min-width: 1100px) {
  .detail { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
}

.keyboard {
  position: relative;
  display: flex;
  height: 92px;
  padding: 8px 8px 0;
  border-radius: 12px;
  background: linear-gradient(#08070d, #16131f);
  border: 1px solid var(--border);
  overflow: hidden;
}
.key-white {
  position: relative;
  flex: 1;
  margin: 0 1px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(#f4f2f8, #d9d5e3);
  transition: background 0.12s, box-shadow 0.12s;
}
.key-black {
  position: absolute;
  top: 8px;
  height: 52px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(#2a2733, #0b0a10);
  z-index: 1;
  transition: background 0.12s, box-shadow 0.12s;
}
.key-white.on { background: linear-gradient(#cdb8ff, #8b5cff); }
.key-black.on { background: linear-gradient(#a98bff, #5b34d6); }
.key-white.bass { background: linear-gradient(#9fd8ff, #3d8bff); }
.key-black.bass { background: linear-gradient(#6fb6ff, #1f5fd6); }
.key-white.melody, .key-black.melody { background: linear-gradient(#ffd7a6, #ff5c8a); box-shadow: 0 0 16px rgba(255, 92, 138, 0.9); }
.key-label {
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.keyboard-legend { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.keyboard-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

.voicing-box { padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--border); }
.voicing-title { margin: 0 0 6px; font-size: 12px; font-weight: 800; }
.voicing-title .hint { display: inline; font-weight: normal; }
.voicing { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.voicing dt { font-weight: 800; }
.voicing dt.emo { color: #ffc2d3; }
.voicing dd { margin: 0; }
.voicing .sep { color: var(--muted); }
.note { padding: 0 2px; }
.emo-note { color: #fff; background: var(--grad); border-radius: 5px; font-weight: 800; padding: 0 5px; }

/* メロディ */
.melody { display: grid; gap: 6px; margin-bottom: 12px; }
.melody p { margin: 0; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.melody .label {
  flex: none;
  min-width: 128px;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  background: var(--chip);
  border: 1px solid var(--border);
  color: var(--muted);
}
.emo-melody .label { background: var(--grad); border-color: transparent; color: #fff; }
.melody .pitch { font-weight: 900; font-size: 17px; }
.melody .sub { color: var(--muted); font-size: 13px; }

.comment {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: #d9d3ee;
}

/* 転調ルート */
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--chip);
  border: 1px solid var(--border);
  min-width: 84px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.step .role { font-size: 10px; letter-spacing: 0.08em; color: var(--muted); }
.step .chord { background: none; border: none; padding: 0; font-size: 17px; }
.step .notes, .step .roman { font-size: 11px; color: var(--muted); }
.step.role-pivot { background: var(--accent-soft); border-color: rgba(255, 92, 138, 0.5); }
.step.role-pivot .chord, .step.role-bridge .chord { color: #ffc2d3; }
.step.role-to { border: 1px solid transparent; background: linear-gradient(var(--surface-strong), var(--surface-strong)) padding-box, var(--grad) border-box; }

@media (max-width: 600px) {
  .header, .layout { padding-left: 16px; padding-right: 16px; }
  .score { display: none; }
  /* スマホでは3つのタブを横いっぱいに並べ、文字を折り返さない */
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 8px 6px; font-size: 13px; white-space: nowrap; }
}

/* キーと旋法 */
.key-picker { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.scale-line {
  margin: 6px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* 入力欄の横の読み取りボタン */
.input-row { display: flex; gap: 6px; }
.input-row input { flex: 1; min-width: 0; }
.tool {
  flex: none;
  width: 44px;
  font-size: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--chip);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tool:hover { border-color: var(--accent); box-shadow: var(--glow); }
.tool:disabled { opacity: 0.5; cursor: wait; }

/* ピアノロールの読み取り画面 */
body.reader-open { overflow: hidden; }
.reader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(8, 6, 14, 0.94);
  backdrop-filter: blur(6px);
}
.reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.reader-title { margin: 0; font-size: 16px; }
/* 拡大して画面より大きくなってもスクロールで端まで見えるよう、grid の中央寄せではなく margin: auto で寄せる */
.reader-area { flex: 1; min-height: 0; display: flex; overflow: auto; padding: 88px 16px 16px; }
.reader-stage { position: relative; flex: none; margin: auto; cursor: crosshair; user-select: none; touch-action: none; }
.reader-stage.panning { cursor: grabbing; }
.reader-stage img { display: block; width: 100%; height: 100%; pointer-events: none; }
.reader-guide {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--glow);
  pointer-events: none;
}
.reader-sel {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 92, 138, 0.7);
  pointer-events: none;
}
.reader-result { position: absolute; inset: -2px; }
.det-box { position: absolute; border: 1.5px solid #ffd166; border-radius: 2px; box-shadow: 0 0 6px rgba(255, 209, 102, 0.8); }
.det-split { position: absolute; top: 0; bottom: 0; border-left: 1.5px dashed rgba(255, 255, 255, 0.7); }
.det-label {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 10px;
  border-radius: 8px;
  background: var(--grad);
  color: #fff;
  white-space: nowrap;
  box-shadow: var(--glow);
}
.det-label strong { font-size: 15px; }
.det-label span { font-size: 10px; opacity: 0.9; }
.det-label.below { transform: translate(-50%, 0); }
.det-label.unknown { background: #4a2330; border: 1px solid var(--danger); }
.reader-toolbar {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: max-content;
  max-width: min(960px, 90vw);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.reader-toolbar label { font-size: 13px; font-weight: 700; }
.reader-toolbar select { width: auto; padding: 6px 10px; }
.reader-message { font-size: 12px; color: var(--muted); }
.primary.small { width: auto; padding: 8px 16px; font-size: 13px; }

/* 読み取り画面のツールバー */
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.toolbar-row.sub { justify-content: space-between; }
.reader-chords { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.reader-chords:empty { display: none; }
.reader-chords li {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--chip);
  border: 1px solid var(--border);
  font-size: 13px;
  cursor: default;
}
.reader-chords li.hl { border-color: var(--accent); background: var(--accent-soft); }
.reader-chords li.unknown { border-color: var(--danger); }
.reader-chords .num { font-size: 10px; font-weight: 800; color: var(--muted); }
.reader-chords small { font-size: 10px; color: var(--muted); }

/* 画像の上のラベル（狭いときは番号だけ） */
.det-label.compact { min-width: 22px; padding: 1px 6px; border-radius: 999px; }
.det-label.compact strong { font-size: 12px; }
.det-label.hl { z-index: 3; outline: 2px solid #fff; box-shadow: 0 0 18px rgba(255, 255, 255, 0.7); }

/* 拡大・縮小 */
.reader-zoom { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.zoom-btn {
  width: 30px;
  height: 30px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--chip);
  color: var(--text);
  cursor: pointer;
}
.zoom-btn:hover { border-color: var(--accent); }
.zoom-level { min-width: 44px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.reader-toolbar.docked { position: fixed; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--accent); }

/* 入力したコード進行の理論チェック */
.parsed-chord .roman { font-size: 10px; font-weight: 700; color: #9fd8ff; }
.parsed-chord.role-ok { border-color: rgba(139, 92, 255, 0.7); }
.parsed-chord.role-ok .roman { color: #cdb8ff; }
.parsed-chord.role-warn { border-color: var(--danger); }
.parsed-chord.role-warn .roman { color: var(--danger); }

.analysis {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(80, 220, 160, 0.35);
  background: rgba(80, 220, 160, 0.08);
  font-size: 13px;
}
.analysis.level-info { border-color: rgba(120, 180, 255, 0.4); background: rgba(120, 180, 255, 0.08); }
.analysis.level-warn { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.08); }
.analysis-summary { margin: 0; font-weight: 800; color: #7be3b8; }
.analysis.level-info .analysis-summary { color: #9fc8ff; }
.analysis.level-warn .analysis-summary { color: var(--danger); }
.analysis-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.analysis-details { margin-top: 6px; }
.analysis-details summary { font-size: 12px; }
.analysis-details ol { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.analysis-details li { font-size: 12px; }
.analysis-details li strong { margin-right: 6px; }
.analysis-details li .roman { margin-right: 6px; color: #9fd8ff; }
.analysis-details li .role { margin-right: 6px; font-weight: 700; color: #cdb8ff; }
.analysis-details li.level-warn .role { color: var(--danger); }
.analysis-details li .detail { color: var(--muted); }

/* 入力欄のすぐ下のコードボタン */
.palette-box {
  margin-top: 8px;
  padding: 8px 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
.palette-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.palette-title { font-size: 11px; font-weight: 700; color: var(--muted); }
.palette-box .palette { margin-top: 6px; }
.palette-box .palette-actions { margin-top: 0; }

/* 提案一覧の見出し（件数とメロディの切り替え） */
.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.results-head .status { margin: 0; }
.melody-toggle { margin: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }

/* 進行の土台 */
.hint.intro { margin: 0 0 16px; font-size: 12.5px; line-height: 1.7; }
.base-card .route .step { min-width: 64px; }
.base-card .route .roman { font-size: 11px; color: #9fd8ff; }
.base-card.matched { border-color: rgba(255, 92, 138, 0.45); }
.tag.level { color: #9fd8ff; }
.tag.hit { background: var(--accent-soft); border-color: rgba(255, 92, 138, 0.5); color: #ffd0dd; }
.play-buttons .make-emo { margin-left: auto; }
.base-card .route .beats { font-size: 10px; color: var(--accent-2); }

/* MIDI のドラッグ */
.play.midi { border-color: rgba(159, 216, 255, 0.6); background: rgba(159, 216, 255, 0.1); color: #cfeaff; cursor: grab; }
.play.midi.dragging { cursor: grabbing; background: rgba(159, 216, 255, 0.3); }

.credits { margin: 32px auto 24px; padding: 0 16px; text-align: center; font-size: 12px; color: var(--muted); }
.credits a { color: inherit; }

/* 体験版 */
.trial-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  max-width: 1280px; margin: 0 auto 16px; padding: 10px 16px;
  border: 1px solid rgba(255, 179, 92, 0.45); border-radius: 12px;
  background: rgba(255, 179, 92, 0.08); font-size: 13px;
}
.trial-banner strong { color: #ffb35c; }
.trial-link { color: #ffb35c; font-weight: 600; white-space: nowrap; }
.trial-lock { max-width: 640px; margin: 0 auto; }
.trial-lock p { color: var(--muted); line-height: 1.7; }
.trial-more { text-align: center; color: var(--muted); }
.trial-more p { margin: 0 0 6px; }
@media (max-width: 1328px) {
  .trial-banner { margin: 0 24px 16px; }
}
@media (max-width: 600px) {
  .trial-banner { margin: 0 16px 16px; }
}

/* 動きを減らす設定の人には、カードの登場アニメーションを出さない */
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
}
