/* ============================================
   BGM Library — Design System
   ============================================
   Apple-like restraint / Spotify-like discovery / Notion-like clarity
   Colors: near-black, gray, blue (3 only)
   Font: system stack + Noto Sans JP
   ============================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* --- Design Tokens --- */
:root {
  /* Color — 3 colors only */
  --c-text:       #1d1d1f;
  --c-text-sub:   #86868b;
  --c-accent:     #0071e3;
  --c-accent-h:   #0077ed;
  --c-bg:         #ffffff;
  --c-surface:    #f5f5f7;
  --c-border:     #d2d2d7;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  --lh-tight:  1.3;
  --lh-normal: 1.7;
  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semi:     600;

  /* Spacing scale (4px base) */
  --s-1: 0.25rem;   /* 4 */
  --s-2: 0.5rem;    /* 8 */
  --s-3: 0.75rem;   /* 12 */
  --s-4: 1rem;      /* 16 */
  --s-5: 1.25rem;   /* 20 */
  --s-6: 1.5rem;    /* 24 */
  --s-8: 2rem;      /* 32 */
  --s-10: 2.5rem;   /* 40 */
  --s-12: 3rem;     /* 48 */
  --s-16: 4rem;     /* 64 */
  --s-20: 5rem;     /* 80 */

  /* Layout */
  --max-w: 1120px;
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 200ms ease;
}

/* --- Base --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--c-text);
  background: var(--c-bg);
}

/* --- Typography --- */
h1 {
  font-size: 2rem;
  font-weight: var(--fw-semi);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.375rem;
  font-weight: var(--fw-semi);
  line-height: var(--lh-tight);
}

h3 {
  font-size: 1rem;
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
}

p {
  color: var(--c-text-sub);
  font-size: 0.9375rem;
}

small {
  font-size: 0.8125rem;
  color: var(--c-text-sub);
}

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-6);
}

/* --- 内部ページ全幅ダークヒーロー --- */
.page-hero {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #1a0a3c 100%);
  position: relative;
  overflow: hidden;
  padding: 48px 0 40px;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 15% 60%, rgba(124, 58, 237, 0.3) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 20%, rgba(219, 39, 119, 0.18) 0%, transparent 45%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.3;
  background: none;
  -webkit-text-fill-color: initial;
  margin-top: var(--s-3);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.68);
  margin-top: var(--s-3);
  font-size: 0.9375rem;
  max-width: 600px;
  line-height: 1.7;
}

.page-hero .breadcrumbs {
  color: rgba(255, 255, 255, 0.45);
}

.page-hero .breadcrumbs a {
  color: rgba(255, 255, 255, 0.45);
}

.page-hero .breadcrumbs a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.page-hero .breadcrumbs [aria-current="page"] {
  color: rgba(255, 255, 255, 0.75);
}

.page-hero .breadcrumbs-sep {
  color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
  .page-hero { padding: 36px 0 28px; }
  .page-hero h1 { font-size: 1.5rem; }
}

/* --- 従来の page-header（ホーム直下など残存ケース用） --- */
.page-header {
  padding: var(--s-12) 0 var(--s-8);
}

.page-header h1 {
  background: linear-gradient(135deg, #302b63 0%, #7c3aed 50%, #db2777 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  margin-top: var(--s-2);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: var(--s-4) 0 0;
  font-size: 0.875rem;
  color: var(--c-text-sub);
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  align-items: center;
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}
.breadcrumbs a {
  color: var(--c-text-sub);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
  color: var(--c-text);
}
.breadcrumbs [aria-current="page"] {
  color: var(--c-text);
  font-weight: 500;
}
.breadcrumbs-sep {
  margin: 0 var(--s-2);
  color: var(--c-border);
}

/* --- FAQ (faq-list / details 両対応) --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin: var(--s-6) 0;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: var(--s-5) var(--s-6);
}
.faq-item > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
  list-style: none;
  position: relative;
  padding-right: var(--s-8);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.25rem;
  color: var(--c-text-sub);
  transition: transform 0.2s ease;
}
.faq-item[open] > summary::after {
  content: '−';
}
.faq-item h2,
.faq-item h3 {
  font-size: 1.0625rem;
  margin: 0 0 var(--s-2);
}
.faq-item p,
.faq-item .faq-answer {
  margin: var(--s-3) 0 0;
  color: var(--c-text);
  line-height: 1.8;
}

/* --- AEO/LLMO 向け本文セクション --- */
.content-section {
  margin: var(--s-10) 0;
}
.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: var(--s-4);
}
.content-section h3 {
  font-size: 1.125rem;
  margin-top: var(--s-5);
  margin-bottom: var(--s-2);
}
.content-section ul {
  margin: var(--s-3) 0;
  padding-left: 1.25rem;
  line-height: 1.9;
}
.intro-lead {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--c-text);
  margin: var(--s-4) 0 var(--s-6);
  max-width: 52rem;
}

/* --- Site Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.site-logo {
  font-size: 0.9375rem;
  font-weight: var(--fw-semi);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.site-logo-image {
  display: block;
  height: 32px;
  width: auto;
  max-height: 40px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.site-nav a {
  font-size: 0.8125rem;
  color: var(--c-text-sub);
  transition: color var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--c-text);
}

/* 使い方・ショーケースなど: 薄いカラーピル */
.site-nav a.nav-feature {
  color: #5b5bd6;
  background: rgba(91, 91, 214, 0.08);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.775rem;
}
.site-nav a.nav-feature:hover {
  background: rgba(91, 91, 214, 0.15);
  color: #4343c8;
}

/* BGM診断: グラデーションCTAピル */
.site-nav a.nav-cta {
  color: #fff !important;
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  padding: 4px 13px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.775rem;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
  transition: opacity var(--transition), box-shadow var(--transition);
}
.site-nav a.nav-cta:hover {
  opacity: 0.88;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

/* --- Site Footer --- */
.site-footer {
  margin-top: var(--s-20);
  padding: var(--s-10) 0;
  background: linear-gradient(180deg, #0d0c1a 0%, #111027 100%);
  border-top: none;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--s-6);
}

.footer-links a {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.site-footer .copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #1a0a3c 100%);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 25% 60%, rgba(124, 58, 237, 0.35) 0%, transparent 55%),
              radial-gradient(ellipse at 75% 20%, rgba(219, 39, 119, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  align-items: center;
  gap: var(--s-10);
  padding-top: var(--s-12);
  padding-bottom: var(--s-12);
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.625rem;
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  color: #fff;
}

.hero p {
  margin-top: var(--s-4);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
}

.hero-actions {
  margin-top: var(--s-8);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.hero-actions .btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  border-radius: 9999px;
  padding: var(--s-3) var(--s-8);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
  font-size: 0.9375rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.hero-actions .btn-primary:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #be185d 100%);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.6);
  transform: translateY(-1px);
}

.hero-actions .btn-text {
  color: rgba(255, 255, 255, 0.75);
}

.hero-actions .btn-text:hover {
  color: #fff;
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}

/* --- Home Sections --- */
.home-section {
  padding: var(--s-12) 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
  gap: var(--s-2);
}

.home-section-header h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-text);
}

.home-section-header p {
  margin-top: var(--s-1);
  font-size: 0.875rem;
  width: 100%;
}

.home-section-more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7c3aed;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(124, 58, 237, 0.06);
  transition: background var(--transition), color var(--transition);
}
.home-section-more:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.use-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.use-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4b5563;
  background: var(--c-bg);
  border: 1.5px solid #e5e7eb;
  border-radius: 9999px;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.use-link:hover {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-6);
}

.card {
  background: var(--c-bg);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13);
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.15);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-badge-new {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  line-height: 1;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumb svg {
  color: var(--c-border);
}

.card-body {
  padding: var(--s-5);
}

.card-title {
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
}

.card-title a {
  transition: color var(--transition);
}

.card-title a:hover {
  color: var(--c-accent);
}

.card-meta {
  display: block;
  margin-top: var(--s-1);
  font-size: 0.8125rem;
  color: var(--c-text-sub);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-link:hover .card-thumb img,
.card-link:hover .card-thumb svg {
  opacity: 0.8;
}
.card-link:hover .card-title {
  color: var(--c-accent);
}
.card-actions {
  margin-top: var(--s-3);
  padding: 0 var(--s-5) var(--s-4);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-primary {
  padding: var(--s-2) var(--s-5);
  background: var(--c-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--c-accent-h);
}

.btn-text {
  padding: 0;
  background: none;
  color: var(--c-accent);
  font-size: 0.8125rem;
}

.btn-text:hover {
  color: var(--c-accent-h);
}

.btn-text svg {
  width: 14px;
  height: 14px;
}

/* --- Forms --- */
.form-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.form-input,
.form-select {
  height: 36px;
  padding: 0 var(--s-3);
  font-size: 0.875rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--c-accent);
}

.form-input {
  min-width: 200px;
}

.form-select {
  appearance: none;
  padding-right: var(--s-8);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.btn-search {
  height: 36px;
  padding: 0 var(--s-4);
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  background: var(--c-text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.btn-search:hover {
  background: #333;
}

.form-clear {
  font-size: 0.8125rem;
  color: var(--c-text-sub);
  transition: color var(--transition);
}

.form-clear:hover {
  color: var(--c-text);
}

/* --- Pagination --- */
.pagination-wrap {
  margin-top: var(--s-12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
}

.pagination-wrap nav > div:first-child {
  display: none; /* Hide "Showing X to Y of Z" default text */
}

.pagination-wrap nav span[role="navigation"] {
  display: flex;
  gap: var(--s-1);
}

/* Laravel pagination overrides */
.pagination-wrap nav span > span,
.pagination-wrap nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--s-2);
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.pagination-wrap nav a {
  color: var(--c-text-sub);
}

.pagination-wrap nav a:hover {
  background: var(--c-surface);
  color: var(--c-text);
}

/* Active page */
.pagination-wrap nav span > span:not([class]) {
  background: var(--c-text);
  color: #fff;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--c-text-sub);
}

/* --- Empty State --- */
.empty-state {
  padding: var(--s-16) 0;
  text-align: center;
}

.empty-state p {
  font-size: 0.9375rem;
}

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: var(--s-1) var(--s-3);
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  color: var(--c-text-sub);
  background: var(--c-surface);
  border-radius: 9999px;
}

/* --- Utilities --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-sub { color: var(--c-text-sub); }
.text-center { text-align: center; }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }

/* --- Prose / Static Pages --- */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: var(--s-20);
}

.prose-section {
  margin-top: var(--s-8);
  padding-top: var(--s-8);
  border-top: 1px solid var(--c-border);
}

.prose-section h2 {
  font-size: 1.0625rem;
  font-weight: var(--fw-semi);
  margin-bottom: var(--s-3);
}

.prose-section p {
  line-height: var(--lh-normal);
}

/* FAQ */
.faq-list {
  margin-top: var(--s-2);
  border-top: 1px solid var(--c-border);
}

.faq-item {
  padding: var(--s-6) 0;
  border-bottom: 1px solid var(--c-border);
}

.faq-item h2 {
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin-bottom: var(--s-2);
}

.faq-item p {
  font-size: 0.9375rem;
}

/* Info Table (operator) */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--s-6);
}

.info-table th,
.info-table td {
  padding: var(--s-4) var(--s-5);
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.9375rem;
  vertical-align: top;
}

.info-table th {
  width: 8rem;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  white-space: nowrap;
}

.info-table td {
  color: var(--c-text-sub);
}

.info-table tr:first-child th,
.info-table tr:first-child td {
  border-top: 1px solid var(--c-border);
}

/* Asset List --- */
.asset-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--c-border);
  margin-bottom: var(--s-8);
}

.asset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--c-border);
}

.asset-item-info {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex: 1;
  min-width: 0;
}

.asset-item-title {
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-item-badges {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
}

.tag-accent {
  display: inline-block;
  padding: var(--s-1) var(--s-3);
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  color: var(--c-accent);
  background: rgba(0, 113, 227, 0.08);
  border-radius: 9999px;
}

/* --- Search Result Note --- */
.search-note {
  font-size: 0.875rem;
  color: var(--c-text-sub);
  margin-bottom: var(--s-6);
}

/* --- Track Detail --- */
.track-detail {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: var(--s-20);
}

.track-thumbnail {
  margin-top: var(--s-8);
  border-radius: var(--radius);
  overflow: hidden;
}
.track-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}
.track-detail-header {
  padding: var(--s-8) 0 var(--s-8);
}

.track-detail-header h1 {
  font-size: 2rem;
  line-height: var(--lh-tight);
}

.track-detail-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-4);
}

.track-preview {
  background: #fff;
  border: 1.5px solid #ebebf0;
  border-radius: 16px;
  padding: var(--s-5);
  margin-bottom: var(--s-8);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.track-preview .player-label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  color: var(--c-text-sub);
  margin-bottom: var(--s-3);
}

.track-preview .player-label svg {
  flex-shrink: 0;
}

.track-preview audio {
  width: 100%;
  height: 40px;
  border-radius: 6px;
}

/* webkit(Chrome/Safari/Edge) でプレーヤーの色をカスタマイズ */
.track-preview audio::-webkit-media-controls-panel {
  background: var(--c-bg);
  border-radius: 6px;
}

.track-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-8) 0;
  color: var(--c-border);
}

.track-preview-empty small {
  font-size: 0.75rem;
  color: var(--c-text-sub);
}

.download-section {
  background: linear-gradient(135deg, #faf7ff 0%, #f0ebff 100%);
  border: 1.5px solid rgba(124, 58, 237, 0.15);
  border-radius: 16px;
  padding: var(--s-6);
  margin-bottom: var(--s-8);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}

.download-terms ul {
  font-size: 0.875rem;
  color: var(--c-text-sub);
  line-height: 1.8;
  padding-left: 1.25rem;
  list-style: disc;
  margin-bottom: var(--s-3);
}

.download-terms-link {
  font-size: 0.8125rem;
  color: var(--c-text-sub);
  margin-bottom: var(--s-5);
}

.download-terms-link a {
  color: var(--c-accent);
}

.track-cta {
  display: flex;
  align-items: center;
  gap: var(--s-6);
}

.btn-lg {
  padding: var(--s-3) var(--s-8);
  font-size: 1rem;
  border-radius: var(--radius);
}

.track-back {
  border-top: 1px solid var(--c-border);
  padding-top: var(--s-6);
}

/* --- Footer Nav Grid --- */
.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-8);
  width: 100%;
  margin-bottom: var(--s-8);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav-section h4 {
  font-size: 0.8125rem;
  font-weight: var(--fw-semi);
  color: #fff;
  margin-bottom: var(--s-3);
}

.footer-nav-section ul {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.footer-nav-section li a {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.15s ease;
}

.footer-nav-section li a:hover {
  color: #fff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.625rem; }
  .page-header { padding: var(--s-8) 0 var(--s-6); }
  .card-grid { grid-template-columns: 1fr; }

  /* Hero: single column, image hidden on mobile */
  .hero .container {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: var(--s-10);
    padding-bottom: var(--s-10);
  }
  .hero h1 { font-size: 1.75rem; color: #fff; }
  .hero-image { display: none; }

  .site-header .container { flex-direction: column; height: auto; padding: var(--s-3) var(--s-6); gap: var(--s-2); }
  .site-nav { gap: var(--s-4); flex-wrap: wrap; justify-content: center; }
  .footer-nav-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================
   再生時間（duration）表示・絞り込み
   ===================================================== */

/* カード内のメタ行（vocal_type と duration を横並び） */
.card-meta-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-1);
  flex-wrap: wrap;
}
.card-meta-row .card-meta { margin-top: 0; }

/* カード内の公開日 */
.card-date {
  display: block;
  margin-top: var(--s-1);
  font-size: 0.75rem;
  color: var(--c-text-sub);
}

/* カード内の再生時間バッジ */
.card-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  color: var(--c-text-sub);
  background: var(--c-surface);
  border-radius: 9999px;
  line-height: 1.4;
  white-space: nowrap;
}
.card-duration svg { flex-shrink: 0; }

/* 詳細ページ用の duration タグ（既存 .tag のバリアント） */
.tag-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 絞り込みフォーム全体 */
.tracks-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
  padding: var(--s-4) var(--s-5);
  background: var(--c-surface);
  border-radius: var(--radius-md, 12px);
}

.tracks-filter-label {
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  color: var(--c-text-sub);
}

/* 絞り込み pill 群 */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.filter-pill {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  color: var(--c-text-sub);
  background: var(--c-bg, #ffffff);
  border: 1px solid var(--c-border, #e5e7eb);
  border-radius: 9999px;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.filter-pill:hover {
  color: var(--c-text);
  border-color: var(--c-text-sub);
}

.filter-pill.is-active {
  color: #ffffff;
  background: var(--c-accent);
  border-color: var(--c-accent);
}

@media (max-width: 768px) {
  .tracks-filter {
    padding: var(--s-3) var(--s-4);
    gap: var(--s-2);
  }
  .filter-pill { padding: 9px 16px; font-size: 0.875rem; min-height: 44px; }
}


/* ==== banner (通常枠) ==== */
.banner-wrap {
  margin: var(--s-5) 0;
  text-align: center;
}
.banner-wrap a { display: block; }
.banner-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
@media (max-width: 768px) {
  .banner-wrap { margin: var(--s-4) 0; }
}


/* ==== 検索フォーム（ヘッダー） ==== */
.site-search { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.site-search-input {
  padding: 6px 10px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 0.875rem; min-width: 200px;
}
.site-search-btn {
  padding: 6px 10px; background: #111; color: #fff; border: none;
  border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center;
}
.site-search-btn:hover { opacity: .9; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (max-width: 768px) {
  .site-search { width: 100%; margin-top: 8px; }
  .site-search-input { flex: 1; min-width: 0; }
}

/* ==== tracks 一覧: 検索・複合フィルタ ==== */
.tracks-search-form {
  background: #fff;
  border: 1.5px solid #e9eaf0;
  padding: 16px 18px;
  border-radius: 14px;
  margin: var(--s-3) 0 var(--s-4);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.tracks-search-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.tracks-search-row:last-child { margin-bottom: 0; }
.tracks-search-row-filters label {
  display: flex; flex-direction: column; gap: 2px; font-size: 0.75rem;
  color: #555; font-weight: 600;
}
.tracks-search-row-filters select { min-width: 130px; }
.tracks-search-status { font-size: 0.875rem; margin: 8px 0; color: #666; }

/* ==== card: DL数 ==== */
.card-meta-row-sub { margin-top: 4px; font-size: 0.75rem; color: #888; }
.card-dl { display: inline-flex; gap: 2px; align-items: center; }

/* ==== track 詳細: タグ・シェア ==== */
.track-tags { margin: var(--s-3) 0; padding: 12px; background: #f8f8f8; border-radius: 8px; }
.track-tags-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.track-tags-row:last-child { margin-bottom: 0; }
.track-tags-label { font-size: 0.75rem; color: #666; font-weight: 600; min-width: 56px; }
.tag-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #f5f5f8;
  border: 1px solid #e5e5ea;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  transition: all 0.15s ease;
}
.tag-link:hover {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
}

.track-share { margin: var(--s-3) 0; }
.track-share-label { display: block; font-size: 0.75rem; color: #666; margin-bottom: 6px; }
.track-share-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btn {
  padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px;
  background: #fff; font-size: 0.75rem; cursor: pointer;
  text-decoration: none; color: #333;
}
.share-btn:hover { background: #f0f0f0; }
.share-btn-x    { border-color: #111; color: #111; }
.share-btn-line { border-color: #06c755; color: #06c755; }
.share-btn-fb   { border-color: #1877f2; color: #1877f2; }
.share-btn-copy { border-color: #999; }
.track-favorite-form { margin-top: 8px; }

.flash-success {
  padding: 12px; background: #e6f7e6; border: 1px solid #9bd39b;
  border-radius: 6px; color: #2a662a; margin: 12px 0;
}


/* ==== 楽曲詳細: クレジット表記スニペット ==== */
.track-credit {
  margin: var(--s-3) 0;
  padding: 12px;
  background: #fdfdfd;
  border: 1px dashed #ccc;
  border-radius: 8px;
}
.track-credit-heading {
  font-size: 0.875rem; font-weight: 600; margin: 0 0 6px;
}
.track-credit-note { font-size: 0.75rem; color: #666; margin: 0 0 8px; }
.track-credit-box {
  display: flex; gap: 8px; align-items: flex-start;
  flex-wrap: wrap;
}
.track-credit-code {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-all;
}

/* admin-table 共通スタイル（既存がなければ） */
.admin-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.admin-table th, .admin-table td {
  padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left; font-size: 0.875rem;
}
.admin-table th { background: #f8f8f8; font-weight: 600; }

/* recently viewed card simplify */
.recently-viewed-card { padding: 12px; background: #fafafa; border: 1px solid #eee; border-radius: 8px; text-decoration: none; color: inherit; }

/* ==============================================================
   Contact form (公開フォーム共通スタイル)
   ============================================================== */
.contact-card {
  max-width: 680px;
  margin: 24px auto 64px;
  padding: 32px;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(17, 17, 17, 0.06);
}
.contact-card .form-intro {
  margin: 0 0 24px;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.7;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.contact-form .form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
  letter-spacing: 0.01em;
}
.contact-form .form-label .required {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: #ff5a5f;
  color: #fff;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}
.contact-form .form-control {
  width: 100%;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  font-size: 1rem;
  color: #111;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: inherit;
}
.contact-form .form-control:hover { background: #fff; }
.contact-form .form-control:focus {
  outline: none;
  background: #fff;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}
.contact-form textarea.form-control {
  resize: vertical;
  min-height: 160px;
  line-height: 1.7;
}
.contact-form .form-hint {
  color: #888;
  font-size: 0.8rem;
  margin-top: 2px;
}
.contact-form .form-error {
  color: #d93025;
  font-size: 0.82rem;
  margin: 4px 0 0;
}
.contact-form .form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}
.contact-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, transform .05s ease;
}
.contact-form .btn-primary { background: #111; color: #fff; }
.contact-form .btn-primary:hover { background: #000; }
.contact-form .btn-primary:active { transform: translateY(1px); }
.contact-form .btn-secondary {
  background: #fff;
  color: #111;
  border-color: #e0e0e0;
}
.contact-form .btn-secondary:hover { background: #f5f5f5; }
@media (max-width: 600px) {
  .contact-card { padding: 20px; border-radius: 12px; margin: 12px auto 40px; }
  .contact-form .form-actions { justify-content: stretch; }
  .contact-form .form-actions .btn { flex: 1 1 auto; }
}

/* ============ クレジット表記コピー（曲詳細） ============ */
.credit-block {
  margin: 24px 0 16px;
  padding: 16px 18px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
}
.credit-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.credit-note {
  font-size: 0.85rem;
  color: #555;
  margin: 0 0 10px;
  line-height: 1.6;
}
.credit-copy {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.credit-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 0.875rem;
  color: #333;
  font-family: inherit;
}
.credit-input:focus { outline: 2px solid #c9c9c9; outline-offset: 1px; }
.credit-copy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.875rem;
  white-space: nowrap;
}
.credit-copy-btn.is-copied { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.credit-copy-btn.is-copied svg { stroke: #fff; }
@media (max-width: 600px) {
  .credit-copy { flex-direction: column; }
  .credit-copy-btn { justify-content: center; }
}

/* ============ カード上の試聴ボタン ============ */
.card-play-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background .15s ease, transform .15s ease;
}
.card-play-btn:hover { background: rgba(0,0,0,0.92); transform: scale(1.05); }
.card-play-btn.is-playing { background: var(--c-accent, #0071e3); }
.card-play-btn svg { width: 20px; height: 20px; }
.card-play-btn .icon-play { margin-left: 2px; } /* 視覚補正 */

/* ============ ミニプレーヤー（画面下に常駐） ============ */
.mini-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.mini-player[hidden] { display: none; }
.mini-player-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mini-player-toggle {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #111;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mini-player-toggle:hover { background: #000; }
.mini-player-toggle .icon-play { margin-left: 2px; }
.mini-player-meta {
  flex: 1 1 auto;
  min-width: 0;
}
.mini-player-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player-title:hover { text-decoration: underline; }
.mini-player-progress {
  margin-top: 6px;
  height: 3px;
  background: #e5e5e5;
  border-radius: 2px;
  overflow: hidden;
}
.mini-player-progress-bar {
  height: 100%;
  background: var(--c-accent, #0071e3);
  width: 0%;
  transition: width .1s linear;
}
.mini-player-link,
.mini-player-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mini-player-link:hover,
.mini-player-close:hover { background: #f0f0f0; color: #111; }

/* ミニプレーヤー表示中はサイトフッターと干渉しないよう padding を確保 */
body.has-mini-player { padding-bottom: 72px; }

@media (max-width: 600px) {
  .mini-player-inner { padding: 8px 12px; gap: 8px; }
  .mini-player-toggle { width: 40px; height: 40px; }
  .mini-player-link { display: none; } /* スマホは外部リンクアイコン省略 */
}

/* ============ 動画尺マッチング（TOPクイック入力） ============ */
.duration-match {
  margin: 32px 0 8px;
  padding: 28px 36px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1a0a3c 100%);
  border: none;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 12px 40px rgba(30, 27, 75, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
.duration-match::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(219, 39, 119, 0.3) 0%, transparent 70%);
  pointer-events: none;
}
.duration-match-text { flex: 1 1 280px; min-width: 240px; position: relative; z-index: 1; }
.duration-match-text h2 {
  font-size: 1.125rem;
  margin: 0 0 6px;
  color: #fff;
  font-weight: 700;
}
.duration-match-text p {
  font-size: 0.875rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}
.duration-match-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.duration-match-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.duration-match-input-wrap input {
  width: 110px;
  padding: 10px 32px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  -moz-appearance: textfield;
}
.duration-match-input-wrap input::placeholder { color: rgba(255,255,255,0.4); }
.duration-match-input-wrap input::-webkit-outer-spin-button,
.duration-match-input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.duration-match-input-wrap input:focus {
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 1px;
  background: rgba(255, 255, 255, 0.18);
}
.duration-match-suffix {
  position: absolute;
  right: 12px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  pointer-events: none;
}
.duration-match-form .btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  border-radius: 9999px;
  padding: 10px 20px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
}
.duration-match-form .btn-primary:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #be185d 100%);
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.55);
}
@media (max-width: 600px) {
  .duration-match { padding: 22px 20px; gap: 18px; }
  .duration-match-form { width: 100%; }
  .duration-match-input-wrap { flex: 1 1 auto; }
  .duration-match-input-wrap input { width: 100%; }
}

/* ============ 記事一覧 / 詳細 ============ */

/* カテゴリカラー変数 */
:root {
  --cat-howto-color:    #2563eb;
  --cat-howto-bg:       rgba(37, 99, 235, 0.08);
  --cat-howto-bar:      linear-gradient(90deg, #2563eb, #60a5fa);
  --cat-playlist-color: #7c3aed;
  --cat-playlist-bg:    rgba(124, 58, 237, 0.08);
  --cat-playlist-bar:   linear-gradient(90deg, #7c3aed, #a78bfa);
  --cat-tip-color:      #0d9488;
  --cat-tip-bg:         rgba(13, 148, 136, 0.08);
  --cat-tip-bar:        linear-gradient(90deg, #0d9488, #5eead4);
}

.article-section {
  margin: 40px 0 32px;
}

/* セクションタイトル: アイコン付き・カラーアクセント */
.article-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.3em;
  border-radius: 3px;
  flex-shrink: 0;
}
.article-section[data-cat="howto"] .article-section-title { color: var(--cat-howto-color); }
.article-section[data-cat="howto"] .article-section-title::before { background: var(--cat-howto-bar); }
.article-section[data-cat="playlist"] .article-section-title { color: var(--cat-playlist-color); }
.article-section[data-cat="playlist"] .article-section-title::before { background: var(--cat-playlist-bar); }
.article-section[data-cat="tip"] .article-section-title { color: var(--cat-tip-color); }
.article-section[data-cat="tip"] .article-section-title::before { background: var(--cat-tip-bar); }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e9e9ec;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}

/* カード上部のカラーバー */
.article-card-bar {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
}
.article-section[data-cat="howto"] .article-card-bar    { background: var(--cat-howto-bar); }
.article-section[data-cat="playlist"] .article-card-bar { background: var(--cat-playlist-bar); }
.article-section[data-cat="tip"] .article-card-bar      { background: var(--cat-tip-bar); }

.article-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-cat {
  display: inline-flex;
  align-items: center;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  align-self: flex-start;
  margin-bottom: 10px;
}
.article-section[data-cat="howto"] .article-card-cat {
  color: var(--cat-howto-color);
  background: var(--cat-howto-bg);
}
.article-section[data-cat="playlist"] .article-card-cat {
  color: var(--cat-playlist-color);
  background: var(--cat-playlist-bg);
}
.article-section[data-cat="tip"] .article-card-cat {
  color: var(--cat-tip-color);
  background: var(--cat-tip-bg);
}

.article-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.5;
  color: #111;
  flex: 1;
}
.article-card-desc {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-date {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: auto;
}
.article-empty {
  padding: 40px 0;
  text-align: center;
  color: #888;
}

.article-detail {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 60px;
}
.article-detail-header { margin-bottom: 28px; }
.article-detail-cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: #111;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.article-detail h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 8px;
}
.article-detail-date { font-size: 0.85rem; color: #888; margin: 0; }

.article-detail-body { line-height: 1.85; color: #222; font-size: 1rem; }
.article-detail-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.article-detail-body h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 24px 0 10px;
}
.article-detail-body p  { margin: 0 0 14px; }
.article-detail-body ul,
.article-detail-body ol { margin: 0 0 16px 1.4em; padding: 0; }
.article-detail-body ul li,
.article-detail-body ol li { margin: 6px 0; line-height: 1.8; }
.article-detail-body ul { list-style: disc; }
.article-detail-body ol { list-style: decimal; }
.article-detail-body a  { color: #0071e3; text-decoration: underline; }
.article-detail-body a:hover { color: #0058b8; }
.article-detail-body strong { font-weight: 700; color: #111; }
.article-detail-body code {
  background: #f4f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.article-detail-body blockquote {
  border-left: 3px solid #ccc;
  margin: 16px 0;
  padding: 4px 14px;
  color: #555;
}

.article-related { margin-top: 40px; }
.article-related h2 {
  font-size: 1.125rem;
  margin-bottom: 14px;
}
.article-back {
  margin-top: 30px;
  text-align: center;
}
.article-back a {
  color: #0071e3;
  text-decoration: none;
  font-size: 0.9rem;
}
.article-back a:hover { text-decoration: underline; }

/* ============ 記事内のコピペブロック ============ */
.article-detail-body pre {
  position: relative;
  background: #f7f7f9;
  border: 1px solid #e3e3e7;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 16px 0;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.article-detail-body pre code {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0;
  font-size: inherit;
  font-family: inherit;
  color: #222;
}
.copy-block-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid #d0d0d4;
  background: #fff;
  color: #333;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}
.copy-block-btn:hover { background: #f0f0f3; }
.copy-block-btn.is-copied { background: #2e7d32; color: #fff; border-color: #2e7d32; }

/* ============ BGM 診断 ============ */
.diagnosis { max-width: 720px; margin: 0 auto; padding: 8px 0 60px; }
.diagnosis-step { background: #fff; padding: 28px 28px 32px; border: 1px solid #ececef; border-radius: 16px; }
.diag-progress { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.diag-progress-bar { display: block; height: 100%; width: 0%; background: #0071e3; transition: width .3s ease; }
.diag-step-num { font-size: 0.85rem; color: #888; margin: 0 0 4px; }
.diag-question { font-size: 1.25rem; font-weight: 700; margin: 0 0 18px; color: #111; line-height: 1.5; }
.diag-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.diag-option {
  display: block; width: 100%; text-align: left;
  padding: 14px 18px; border: 1px solid #d6d6da; border-radius: 12px;
  background: #fff; color: #111; font-size: 1rem; font-weight: 500;
  cursor: pointer; transition: background .12s ease, border-color .12s ease, transform .05s ease;
}
.diag-option:hover { background: #f4f6fa; border-color: #b8c4d8; }
.diag-option:active { transform: translateY(1px); }
.diag-back { display: inline-block; margin-top: 16px; }

.diag-result-card {
  margin: 16px 0 22px; padding: 28px 24px;
  background: linear-gradient(135deg, #fafbff 0%, #f0f2f8 100%);
  border: 1px solid #e3e7ec; border-radius: 14px; text-align: center;
}
.diag-result-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  color: #fff; background: #111; padding: 4px 10px; border-radius: 4px; margin-bottom: 8px;
  letter-spacing: 0.06em;
}
.diag-result-headline { font-size: 1.5rem; font-weight: 800; margin: 4px 0 10px; color: #111; line-height: 1.4; }
.diag-result-desc { font-size: 0.95rem; color: #444; line-height: 1.7; margin: 0; }
.diag-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 16px 0 18px; }
.diag-restart { display: block; margin: 8px auto 0; }
.diag-share { text-align: center; margin-top: 14px; }

@media (max-width: 600px) {
  .diagnosis-step { padding: 20px 18px 24px; }
  .diag-question { font-size: 1.05rem; }
}
