/* 音像設計室 別館 — Suno プロンプトライン
   本館 (../style.css) とは独立したスタイルシート。共有・継承はしない。 */

:root {
  --ink: #080d11;
  --panel: #0f161c;
  --panel-2: #131c23;
  --panel-3: #18232b;
  --line: rgba(223, 236, 244, 0.14);
  --line-strong: rgba(223, 236, 244, 0.28);
  --paper: #dfecf4;
  --muted: #869aa6;
  --neon: #5ad9f0;
  --neon-soft: rgba(90, 217, 240, 0.12);
  --magenta: #e07be0;
  --amber: #f2a950;
  --danger: #ff846e;
  --green: #77d689;
  --radius: 4px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--ink);
  background-size: 32px 32px;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

button, input, textarea, select { font: inherit; }
button, summary, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}
a { color: inherit; }

.ambient { position: fixed; pointer-events: none; z-index: -1; filter: blur(80px); opacity: .16; border-radius: 50%; }
.ambient-one { width: 560px; height: 560px; top: -260px; right: -140px; background: var(--neon); }
.ambient-two { width: 480px; height: 480px; bottom: 2vh; left: -340px; background: #7a4a8f; }

/* ------------------------------------------------------------- header */
.site-header {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand b { display: block; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .12em; font-size: 16px; }
.brand small { display: block; color: var(--muted); font: 9px/1.4 Consolas, monospace; letter-spacing: .17em; margin-top: 2px; }
.brand-mark { width: 34px; height: 34px; display: flex; gap: 3px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); transform: rotate(45deg); }
.brand-mark i { width: 2px; background: var(--neon); animation: meter 1.8s ease-in-out infinite alternate; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 18px; animation-delay: -.5s; }
.brand-mark i:nth-child(3) { height: 25px; animation-delay: -.9s; }
.brand-mark i:nth-child(4) { height: 12px; animation-delay: -.2s; }
@keyframes meter { to { transform: scaleY(.48); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .brand-mark i { animation: none; } }

.header-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.save-indicator { color: var(--muted); font: 11px Consolas, monospace; letter-spacing: .06em; }
.save-indicator i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.save-indicator.saving i { background: var(--amber); box-shadow: 0 0 12px var(--amber); }

.button { border: 0; color: inherit; transition: .2s ease; }
.button-quiet { display: inline-block; padding: 9px 12px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 12px; text-decoration: none; }
.button-quiet:hover { color: var(--paper); border-color: var(--line-strong); }
.button-primary { min-width: 280px; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: var(--neon); color: var(--ink); font-weight: 700; }
.button-primary:hover { background: #8ee9fa; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(90,217,240,.16); }

/* --------------------------------------------------------------- hero */
main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hero { min-height: 420px; display: grid; grid-template-columns: 1.4fr .6fr; align-items: end; gap: 8vw; padding: 90px 0 68px; }
.eyebrow, .section-kicker { margin: 0 0 22px; color: var(--neon); font: 10px Consolas, monospace; letter-spacing: .22em; }
.hero h1 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(38px, 5.8vw, 74px); font-weight: 500; line-height: 1.18; letter-spacing: .02em; word-break: keep-all; }
.hero h1 em { color: var(--neon); font-style: normal; }
.hero-copy { max-width: 400px; margin: 0 0 10px; padding-top: 22px; border-top: 1px solid var(--line-strong); color: #adbcc6; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 14px; }
.hero-copy b { color: var(--neon); font-weight: 500; }

.step-rail { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(8,13,17,.93); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.step-rail a { display: flex; gap: 12px; align-items: center; padding: 15px 18px; text-decoration: none; color: var(--muted); font-size: 12px; border-right: 1px solid var(--line); transition: .2s ease; }
.step-rail a:last-child { border-right: 0; }
.step-rail a:hover { color: var(--paper); background: var(--neon-soft); }
.step-rail span { color: var(--neon); font: 10px Consolas, monospace; }

.status-message { position: sticky; top: 58px; z-index: 19; margin: 14px 0 -50px auto; width: fit-content; max-width: 100%; padding: 11px 15px; color: var(--ink); background: var(--neon); box-shadow: var(--shadow); font-size: 13px; }
.status-message.error { color: #fff; background: #a9473d; }

/* ----------------------------------------------------------- sections */
.work-section { scroll-margin-top: 70px; padding: 100px 0 24px; }
.section-heading { display: grid; grid-template-columns: 66px 1fr minmax(220px, 340px); align-items: start; gap: 22px; margin-bottom: 40px; }
.step-number { width: 50px; height: 50px; display: grid; place-items: center; color: var(--neon); border: 1px solid var(--line-strong); font: 12px Consolas, monospace; }
.section-heading h2 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(26px, 3.6vw, 38px); font-weight: 500; line-height: 1.3; }
.section-heading .section-kicker { margin: 0 0 7px; }
.section-heading > p { margin: 9px 0 0; color: var(--muted); font-size: 12px; border-left: 1px solid var(--line-strong); padding-left: 18px; }

.field { display: flex; flex-direction: column; min-width: 0; padding: 18px; background: var(--panel); border: 1px solid var(--line); }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.field-label b { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .08em; }
.field-label small, .field-help { color: var(--muted); font-size: 10px; }
.field-help { margin: 12px 0 0; line-height: 1.7; }
textarea, input[type="search"], input[type="text"], select {
  width: 100%; padding: 11px 12px; color: var(--paper); background: #0a1015; border: 1px solid var(--line); border-radius: 0;
}
textarea { display: block; resize: vertical; line-height: 1.75; font-family: Consolas, "Yu Gothic UI", monospace; font-size: 13px; }
textarea::placeholder, input::placeholder { color: #4f5d67; }
textarea:focus, input:focus, select:focus { border-color: rgba(90,217,240,.7); outline: none; box-shadow: 0 0 0 1px rgba(90,217,240,.2); }
textarea[readonly] { background: #0c141a; color: #c9dde8; }

.search-controls { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 22px; }
.dual-shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.field-check { justify-content: space-between; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--neon); }

/* -------------------------------------------------- step01 selection */
.selection-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.slot { padding: 18px; background: var(--panel-2); border: 1px solid var(--line); }
.slot-role { margin: 0 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .08em; }
.slot-role small { color: var(--muted); font: 9px Consolas, monospace; letter-spacing: .12em; }
#mainSlot { border-left: 2px solid var(--neon); }
#subSlot { border-left: 2px solid var(--magenta); }
.slot-empty { color: var(--muted); font-size: 12px; }
.slot-pick b { display: block; font-size: 17px; letter-spacing: .02em; }
.slot-pick .slot-meta { color: var(--muted); font: 10px Consolas, monospace; letter-spacing: .06em; margin: 3px 0 8px; }
.slot-pick .slot-sonic { margin: 0 0 12px; color: #b6c7d2; font-size: 12px; line-height: 1.7; }

.genre-detail { margin-bottom: 22px; padding: 20px; background: var(--panel); border: 1px solid var(--line-strong); }
.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.detail-head h3 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 22px; font-weight: 500; }
.detail-head .scene-tag { padding: 3px 9px; border: 1px solid var(--line-strong); color: var(--neon); font: 10px Consolas, monospace; letter-spacing: .1em; }
.detail-head .detail-years { color: var(--muted); font: 11px Consolas, monospace; }
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.detail-cols h4 { margin: 0 0 9px; color: var(--neon); font: 10px Consolas, monospace; letter-spacing: .18em; font-weight: 400; }
.detail-cols p { margin: 0 0 16px; font-size: 13px; line-height: 1.8; color: #c2d2dc; }
.lineage-row { margin-bottom: 14px; }
.lineage-row .lineage-none { color: var(--muted); font-size: 12px; }
.track-list { margin: 0; padding: 0; list-style: none; }
.track-list li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(223,236,244,.06); font-size: 12px; }
.track-list li > span { min-width: 0; overflow-wrap: anywhere; }
.track-list li:last-child { border-bottom: 0; }
.track-list .track-year { color: var(--neon); font: 11px Consolas, monospace; }
.track-list .track-artist { color: var(--muted); }

.result-count { margin: 0 0 14px; color: var(--muted); font: 11px Consolas, monospace; letter-spacing: .08em; }
.genre-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.genre-card { display: flex; flex-direction: column; gap: 8px; padding: 15px 16px; background: var(--panel); border: 1px solid var(--line); transition: .18s ease; }
.genre-card:hover { border-color: var(--line-strong); background: var(--panel-2); }
.genre-card.is-main { border-color: var(--neon); box-shadow: inset 2px 0 0 var(--neon); }
.genre-card.is-sub { border-color: var(--magenta); box-shadow: inset 2px 0 0 var(--magenta); }
.genre-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.genre-card-head b { font-size: 15px; letter-spacing: .01em; min-width: 0; overflow-wrap: anywhere; }
/* emerged は "1950s roots, electronic era 80s" のように長いものがある。
   狭い幅では折り返させ、カードから溢れさせない。 */
.genre-card-head span { min-width: 0; color: var(--muted); font: 9px Consolas, monospace; letter-spacing: .1em; overflow-wrap: anywhere; }
.genre-card .card-sonic { margin: 0; color: #9fb2bf; font-size: 11px; line-height: 1.65; }
.genre-card .card-aka { margin: 0; color: var(--muted); font-size: 10px; }
.genre-card-actions { display: flex; gap: 8px; margin-top: 2px; }
.genre-card-actions button { flex: 1; padding: 6px 8px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 11px; transition: .18s ease; }
.genre-card-actions button:hover { color: var(--paper); border-color: var(--line-strong); }
.genre-card-actions button.pick-main:hover { border-color: var(--neon); color: var(--neon); }
.genre-card-actions button.pick-sub:hover { border-color: var(--magenta); color: var(--magenta); }

/* --------------------------------------------------- step02 structure */
.profile-info { font-size: 12px; line-height: 1.8; color: #c2d2dc; }
.profile-info em { color: var(--neon); font-style: normal; }
.profile-info ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }

.tag-chain { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.tag-chain li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 7px 10px; background: var(--panel-3); border: 1px solid var(--line); }
.tag-chain .chain-index { color: var(--neon); font: 10px Consolas, monospace; }
.tag-chain .chain-text { font-family: Consolas, monospace; font-size: 12px; word-break: break-word; }
.tag-chain .chain-buttons { display: flex; gap: 4px; }
.tag-chain .chain-buttons button { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.tag-chain .chain-buttons button:hover { color: var(--paper); border-color: var(--line-strong); }
.tag-chain-empty { color: var(--muted); font-size: 12px; }
.inline-add { display: flex; gap: 8px; margin-top: 12px; }
.inline-add input { flex: 1; min-width: 0; }

.palette-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.palette-group { margin-bottom: 16px; }
.palette-group:last-child { margin-bottom: 0; }
.palette-group h4 { margin: 0 0 8px; color: var(--muted); font: 10px Consolas, monospace; letter-spacing: .14em; font-weight: 400; }
.chip-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 10px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; transition: .16s ease; text-align: left; overflow-wrap: anywhere; }
.chip:hover { color: var(--paper); border-color: var(--line-strong); }
.chip.is-on { color: var(--ink); background: var(--neon); border-color: var(--neon); font-weight: 600; }
.chip-list .chip { color: var(--paper); border-color: var(--line-strong); }
.chip-remove { color: inherit; opacity: .65; }
.chip-empty { color: var(--muted); font-size: 11px; }

/* ------------------------------------------------------ step04 output */
.output-block { margin-bottom: 18px; padding: 18px; background: var(--panel); border: 1px solid var(--line); }
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.output-head h3 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 16px; font-weight: 500; letter-spacing: .08em; }
.output-actions { display: flex; align-items: center; gap: 12px; }
.char-meter { color: var(--muted); font: 11px Consolas, monospace; letter-spacing: .05em; }
.char-meter.zone-short { color: var(--amber); }
.char-meter.zone-good { color: var(--green); }
.char-meter.zone-long { color: var(--amber); }
.char-meter.zone-over { color: var(--danger); }
.zone-bar { position: relative; height: 4px; margin-top: 10px; background: rgba(223,236,244,.08); overflow: hidden; }
.zone-bar i { display: block; height: 100%; width: 0; background: var(--neon); transition: width .2s ease; }
.zone-bar.zone-over i { background: var(--danger); }

.primary-action-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.primary-action-wrap p { margin: 0; color: var(--muted); font-size: 10px; }

.fold { margin-top: 26px; border: 1px solid var(--line); background: var(--panel); }
.fold summary { padding: 14px 18px; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.fold summary:hover { color: var(--paper); }
.fold-body { padding: 0 18px 18px; }
.fold-body .output-actions { justify-content: flex-end; margin-top: 10px; }

/* ------------------------------------------------------- step05 rules */
.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.rule-card { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); }
.rule-card h4 { margin: 0 0 8px; color: var(--neon); font: 10px Consolas, monospace; letter-spacing: .16em; font-weight: 400; }
.rule-card p { margin: 0; font-size: 12px; line-height: 1.85; color: #c2d2dc; }
.source-card div { font-size: 12px; line-height: 1.9; color: #c2d2dc; }
.source-card a { color: var(--neon); }
.source-card dt { color: var(--muted); font: 10px Consolas, monospace; letter-spacing: .1em; margin-top: 10px; }
.source-card dd { margin: 2px 0 0; }
.source-card dl { margin: 0; }

/* ------------------------------------------------------------- footer */
.site-footer { width: min(1180px, calc(100% - 48px)); margin: 90px auto 0; padding: 26px 0 60px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.9; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--neon); }

/* --------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding: 60px 0 44px; }
  .hero-copy { max-width: none; }
  .section-heading { grid-template-columns: 50px 1fr; }
  .section-heading > p { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
  .detail-cols { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 680px) {
  .site-header, main, .site-footer { width: calc(100% - 28px); }
  .step-rail { grid-template-columns: repeat(5, 1fr); }
  .step-rail a { flex-direction: column; gap: 3px; padding: 10px 4px; font-size: 10px; text-align: center; }
  .work-section { padding: 66px 0 18px; }
  .search-controls, .dual-shelf, .spec-grid, .selection-panel, .rules-grid, .palette-stack { grid-template-columns: 1fr; }
  .inline-add { flex-wrap: wrap; }
  .inline-add input { flex: 1 1 100%; }
  .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .genre-card { padding: 12px; gap: 6px; }
  .genre-card-head b { font-size: 13px; }
  .genre-card .card-sonic { font-size: 10px; }
  .genre-card-actions { flex-direction: column; }
  .button-primary { min-width: 0; width: 100%; }
  .primary-action-wrap { justify-content: stretch; }
}
