/* ------------------------------------------------------------------
 * Overtone — ライトテーマ
 * OSのダークモード設定に関わらず、常に明るい配色で表示します。
 * ------------------------------------------------------------------ */

:root {
  --bg:          #fdf9f4;   /* 全体の下地（クリーム） */
  --panel:       #ffffff;   /* カード・ヘッダー */
  --panel-2:     #f4f0fe;   /* 入力欄・バッジの下地（うすい藤色） */
  --line:        #ece6f8;   /* 罫線 */
  --text:        #2d2549;
  --muted:       #7d7594;

  --accent:      #6440d9;   /* 主役の紫 */
  --accent-2:    #7d57ec;   /* 主役色のグラデーションの片側 */
  --accent-soft: #efeafd;   /* 紫のうすい面 */
  --accent-ink:  #ffffff;
  --accent-glow: rgba(100, 64, 217, .28);  /* 主役色のボタンの影 */
  --field:       #ded6f2;   /* 入力欄・ボタンの枠線 */
  --pop:         #ff7a59;   /* 差し色のコーラル（面に使う用） */
  --pop-soft:    #fff0eb;   /* コーラルのうすい面 */
  --pop-ink:     #c9431c;   /* 差し色系の文字色（淡い面の上でも読める濃さ） */
  --pop-ink-2:   #e2622f;   /* その明るい側（グラデーション用） */
  --pop-glow:    rgba(201, 67, 28, .3);    /* 差し色ボタンの影 */

  --ok:          #12784a;
  --ok-bg:       #e6f8ef;
  --ng:          #d02840;
  --ng-bg:       #fdedef;
  --add:         #0e8043;   /* 登録ボタン */
  --add-2:       #16a35a;
  --add-ink:     #ffffff;

  --gold:        #e6a700;
  --silver:      #9aa3b2;
  --bronze:      #c47b3f;

  /* 背景にうっすら置く色のにじみ（プロバイダごとに変えられる） */
  --blob-a:      rgba(255, 122, 89, .16);
  --blob-b:      rgba(100, 64, 217, .14);
  --blob-c:      rgba(80, 190, 255, .12);

  --header-bg:   var(--panel);   /* ヘッダーの下地（グラデーションも可） */

  --radius:      16px;
  --shadow:      0 2px 10px rgba(70, 50, 120, .07);
  --shadow-lift: 0 6px 18px rgba(70, 50, 120, .13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* うっすら色の乗った、やわらかい背景 */
  background-image:
    radial-gradient(60rem 32rem at 8% -8%,  var(--blob-a), transparent 60%),
    radial-gradient(52rem 30rem at 96% 4%,  var(--blob-b), transparent 62%),
    radial-gradient(46rem 30rem at 50% 108%, var(--blob-c), transparent 60%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  line-height: 1.7;
  /* 内容が短いページでもフッターが画面下に収まるように */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
 * ヘッダー
 * ------------------------------------------------------------------ */
.site-header {
  padding: 12px 16px 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(70, 50, 120, .06);
}

/* 1段目: サイト名（左）とアカウント（右） */
.header-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.site-header .brand {
  display: flex; align-items: baseline; gap: 8px;
  color: var(--text); text-decoration: none;
}
.site-header .brand:hover { text-decoration: none; }
.brand-mark { color: var(--pop); font-size: 1.35rem; line-height: 1; transform: translateY(2px); }
.brand-name {
  font-weight: 800; font-size: 1.2rem; letter-spacing: .06em;
  font-family: "Avenir Next", "Segoe UI", Optima, sans-serif;
  background: linear-gradient(100deg, var(--accent) 15%, var(--pop) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent);
}
.brand-tagline { color: var(--muted); font-size: .72rem; letter-spacing: .02em; }
@media (max-width: 560px) { .brand-tagline { display: none; } }

.site-user {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
  font-size: .88rem;
}
.site-user .me {
  color: var(--text); font-weight: 700;
  max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 2段目: ページのナビゲーション */
.site-nav {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0 20px;
  margin-top: 8px;
  font-size: .92rem;
}
.site-nav a {
  padding: 8px 0;
  white-space: nowrap;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease;
}
.site-nav a:hover {
  color: var(--accent); text-decoration: none;
  border-bottom-color: var(--pop);
}
/* 姉妹サイトへのリンクだけ右端に寄せる */
.site-nav .sister {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.site-nav .sister:hover { border-bottom-color: var(--accent); }

@media (max-width: 560px) {
  .site-user .me { max-width: 7em; }
  .site-nav { gap: 16px; font-size: .88rem; }
}

/* ------------------------------------------------------------------
 * 見出し・カード
 * ------------------------------------------------------------------ */
h1 { font-size: 1.55rem; margin: 10px 0 4px; letter-spacing: .01em; }
h1 .sub { font-size: .9rem; color: var(--muted); font-weight: 400; margin-left: 8px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: .95rem; margin: 16px 0 8px; }

.muted { color: var(--muted); font-size: .9rem; }
.comment { color: var(--muted); font-style: italic; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}

/* フラッシュメッセージ */
.flash {
  padding: 11px 16px; border-radius: var(--radius); margin: 12px 0;
  font-size: .92rem; font-weight: 500;
}
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.ng { background: var(--ng-bg); color: var(--ng); }

/* ------------------------------------------------------------------
 * フォーム
 * ------------------------------------------------------------------ */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.form small { color: var(--muted); font-size: .8rem; }
.req { color: var(--ng); font-size: .72rem; margin-left: 6px; }

input[type="text"], input[type="password"], input[type="search"], select {
  background: #fff;
  border: 1px solid var(--field);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 1rem;
  width: 100%;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="search"]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--field);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: .92rem;
  cursor: pointer;
  white-space: nowrap;        /* 丸ボタンの中で文字が折り返さないように */
  transition: border-color .12s ease, color .12s ease, transform .1s ease, box-shadow .12s ease;
}
/* 縦積みフォームの中でボタンだけ横に伸びないようにする */
.form > button { align-self: flex-start; }
button:hover { border-color: var(--accent); color: var(--accent); }
button.primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); border-color: transparent; font-weight: 700;
  box-shadow: 0 2px 8px var(--accent-glow);
}
button.primary:hover { color: var(--accent-ink); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
button.small { padding: 6px 14px; font-size: .82rem; white-space: nowrap; }

/* 登録ボタン: 一覧の中で一番目を引かせる */
button.btn-add {
  background: linear-gradient(100deg, var(--add), var(--add-2));
  color: var(--add-ink);
  border-color: transparent;
  font-weight: 700;
  padding: 7px 17px;
  box-shadow: 0 2px 7px rgba(14, 128, 67, .3);
}
button.btn-add:hover, button.btn-add:focus-visible {
  color: var(--add-ink); border-color: transparent;
  transform: translateY(-1px); box-shadow: 0 5px 14px rgba(14, 128, 67, .34);
}
button.btn-add:active { transform: translateY(0); }
button.ghost { color: var(--muted); border-color: var(--line); }
button.ghost:hover { color: var(--ng); border-color: var(--ng); }
.link-btn { background: none; border: none; color: var(--accent); padding: 0; font-size: .9rem; border-radius: 0; }
.link-btn:hover { text-decoration: underline; }
.inline { display: inline; }

.search-form { display: flex; gap: 8px; margin-bottom: 14px; }
.search-form button { flex: 0 0 auto; }
.manual-form button { flex: 0 0 auto; }

/* ------------------------------------------------------------------
 * アーティストの行
 * ------------------------------------------------------------------ */
.result-list, .artist-grid, .match-list { list-style: none; margin: 0; padding: 0; }
.result-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.result-list li:last-child { border-bottom: none; }
/* 長い名前は必ず折り返す（横スクロールを出さない） */
.artist-name { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.genre { color: var(--muted); font-size: .8rem; margin-right: auto; overflow-wrap: anywhere; min-width: 0; }
/* 検索結果の補足（「劇場版 ・ 1998」など）は、語の途中で折り返さないようにする。
   区切りの空白では折り返してよい */
.result-list .genre { overflow-wrap: normal; word-break: keep-all; }

.artist-grid li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.artist-grid li:last-child { border-bottom: none; }
.artist-grid li > div {
  display: flex; flex-direction: column; align-items: flex-start;
  margin-right: auto;
  /* これが無いと、長い名前が縮まずに行がはみ出す */
  flex: 1 1 auto; min-width: 0; max-width: 100%;
}
.artist-grid .genre { margin-right: 0; }

/* サムネイル（Apple Music へのリンク） */
.thumb {
  display: block; flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), var(--pop-soft));
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: var(--accent); font-size: 1.2rem;
}
/* プロバイダがアイコン（SVG）を指定しているとき。枠の大きさに追従させる */
.thumb-ph svg { width: 56%; height: 56%; opacity: .9; }
a.thumb { transition: transform .14s ease, box-shadow .14s ease; }
a.thumb:hover, a.thumb:focus-visible {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-lift);
  outline: none;
}

a.artist-name { color: var(--text); }
a.artist-name:hover { color: var(--accent); text-decoration: none; }

/* ------------------------------------------------------------------
 * 相性マッチング
 * ------------------------------------------------------------------ */
.match-list li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.match-list li:last-child { border-bottom: none; }
.match-head { display: flex; align-items: center; gap: 10px; }
.medal {
  flex: 0 0 auto; width: 1.6em; text-align: center;
  font-size: 1.3rem; line-height: 1;
}
/* 4位以降は数字で表示 */
.medal.rank-num {
  font-size: .95rem; font-weight: 800; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.match-name { font-weight: 700; font-size: 1.04rem; }
.shared-artists { margin: 4px 0 0 34px; color: var(--muted); font-size: .85rem; }
.shared-artists a { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--field); }
.shared-artists a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
.shared-artists .sep { color: var(--field); margin: 0 2px; }

/* 「ほか◯組を見る」— チェックボックスを label で切り替える（JavaScript不要） */
.more-toggle {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; margin: 0;   /* 見えないがキーボードでは選択できる */
}
.more-rest { display: none; }
.more-toggle:checked ~ .more-rest { display: inline; }

.more-btn {
  display: inline-block; margin-left: 8px;
  padding: 1px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: .78rem; font-weight: 700; white-space: nowrap;
  cursor: pointer; user-select: none;
}
.more-btn:hover { background: var(--accent); color: #fff; }
.more-btn.is-open::after  { content: " ▾"; }
.more-btn.is-close::after { content: " ▴"; }
.more-btn.is-close { display: none; }
.more-toggle:checked ~ .more-btn.is-open  { display: none; }
.more-toggle:checked ~ .more-btn.is-close { display: inline-block; }
.more-toggle:focus-visible ~ .more-btn { outline: 2px solid var(--accent); outline-offset: 2px; }

.badge {
  background: var(--accent-soft); border: 1px solid transparent;
  border-radius: 999px; padding: 2px 11px; font-size: .78rem;
  color: var(--accent); font-weight: 600;
  /* 「◯組」などのバッジは、隣がどれだけ長くても必ず1行に収める */
  flex: 0 0 auto; white-space: nowrap;
}
.badge.subtle { font-size: .74rem; background: var(--panel-2); color: var(--muted); font-weight: 500; }

.chip {
  display: inline-block; background: #fff; border: 1px solid var(--field);
  border-radius: 999px; padding: 5px 13px; font-size: .86rem; margin: 3px 4px 3px 0;
  color: var(--accent);
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }

.mates { border-color: var(--pop); background: linear-gradient(180deg, var(--pop-soft), #fff 60%); }
.mates-list { margin: 0; }

/* ------------------------------------------------------------------
 * ユーザーリスト（罫線を使わず、行ごとの面で区切る）
 * ------------------------------------------------------------------ */
.user-list { list-style: none; margin: 0; padding: 0; }
.user-list li { margin-bottom: 4px; }
.user-list li > a {
  display: flex; align-items: baseline;
  flex-wrap: wrap;            /* 幅が足りなければ「ひとこと」が次の行に落ちる */
  column-gap: 10px; row-gap: 3px;
  padding: 10px 14px; border-radius: 12px;
  color: var(--text); text-decoration: none;
  transition: background .12s ease, transform .1s ease;
}
/* 名前と「◯組」バッジは常にひとかたまり */
.user-head {
  display: flex; align-items: baseline; gap: 10px;
  flex: 0 1 auto; min-width: 0;
}
.user-list li > a:hover, .user-list li > a:focus-visible {
  background: var(--accent-soft); text-decoration: none; outline: none;
  transform: translateX(3px);
}
.user-list li > a:hover .user-name { color: var(--accent); }
.user-name { font-weight: 700; overflow-wrap: anywhere; }
/* ひとことは省略せず全文を出す（長ければ折り返して複数行になる） */
.user-comment {
  /* 12em 分の幅が取れないときは、潰さずに丸ごと次の行へ送る */
  flex: 1 1 12em; min-width: 0;
  color: var(--muted); font-size: .86rem;
  white-space: normal;
  overflow-wrap: anywhere;   /* 空白のない長文でもはみ出さない */
  line-height: 1.55;
}
.user-meta { margin-left: auto; flex: 0 0 auto; color: var(--muted); font-size: .78rem; white-space: nowrap; }
/* スマホ幅では、ひとことは常に名前の下の行に回して読みやすい幅を確保する */
@media (max-width: 560px) {
  .user-comment { flex-basis: 100%; }
}
.user-list li.is-me > a { background: var(--pop-soft); }

/* テーブル（管理画面など） */
.user-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.user-table th, .user-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.user-table th { font-size: .82rem; color: var(--muted); font-weight: 600; }
.user-table .num { text-align: right; width: 8em; }

.manual { margin-top: 14px; }
.manual summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.manual-form { display: flex; gap: 8px; margin: 10px 0 4px; }

/* 「◯人が登録」— 押すとアーティストのページへ */
a.holders-badge {
  flex: 0 0 auto; white-space: nowrap;
  transition: color .12s ease, background .12s ease;
}
a.holders-badge:hover, a.holders-badge:focus-visible {
  background: var(--accent-soft); color: var(--accent); text-decoration: none;
}
a.holders-badge::after { content: " ›"; }

/* 他に登録者がいるアーティストは目を引く色にする */
a.holders-badge.has-holders {
  color: var(--pop-ink);
  background: var(--pop-soft);
  font-weight: 700;
}
a.holders-badge.has-holders:hover, a.holders-badge.has-holders:focus-visible {
  color: #fff; background: var(--pop-ink);
}

/* ------------------------------------------------------------------
 * ランキング
 * ------------------------------------------------------------------ */
.stat-row { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: .9rem; }
.stat b { color: var(--accent); font-size: 1.25rem; margin-right: 2px; font-weight: 800; }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.rank-no {
  flex: 0 0 auto; width: 2em; text-align: center;
  font-weight: 800; font-size: .95rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rank-no.rank-1 { color: var(--gold); font-size: 1.3rem; }
.rank-no.rank-2 { color: var(--silver); font-size: 1.15rem; }
.rank-no.rank-3 { color: var(--bronze); font-size: 1.08rem; }
.rank-body { flex: 1 1 auto; min-width: 0; }
/* アーティスト名は省略しない。長ければ折り返して複数行になる */
.rank-title {
  display: flex; align-items: baseline; flex-wrap: wrap;
  column-gap: 8px; row-gap: 2px; min-width: 0;
}
.rank-title .artist-name { overflow-wrap: anywhere; }
.rank-title .genre { margin-right: 0; }
.rank-bar {
  display: block; height: 6px; margin-top: 6px;
  background: var(--panel-2); border-radius: 999px; overflow: hidden;
}
.rank-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--pop));
  border-radius: 999px;
}

/* ユーザーの私的ベスト5 */
.best-form { max-width: 38rem; }
.best-form label { display: grid; grid-template-columns: 3.5em minmax(0, 1fr); align-items: center; }
.best-list { list-style: none; margin: 0; padding: 0; }
.best-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.best-list li:last-child { border-bottom: 0; }
.best-rank { flex: 0 0 2.5em; color: var(--muted); font-size: 1.05rem; font-weight: 800; text-align: center; }
.best-rank small { margin-left: 1px; font-size: .68em; }
.best-rank.rank-1 { color: var(--gold); font-size: 1.35rem; }
.best-rank.rank-2 { color: var(--silver); font-size: 1.2rem; }
.best-rank.rank-3 { color: var(--bronze); font-size: 1.12rem; }
.best-list .thumb { flex: 0 0 auto; }
.best-body { flex: 1 1 auto; min-width: 0; }
.best-body .artist-name { overflow-wrap: anywhere; }

.genre-list { list-style: none; margin: 0; padding: 0; }
.genre-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.genre-name { flex: 0 0 11em; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.genre-list .rank-bar { flex: 1 1 auto; }
.genre-count { flex: 0 0 auto; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }

@media (max-width: 520px) { .genre-name { flex-basis: 7em; } }

/* ------------------------------------------------------------------
 * アーティストのページ
 * ------------------------------------------------------------------ */
.artist-hero {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(120deg, var(--accent-soft), var(--pop-soft) 80%);
  border-color: transparent;
}
.artist-hero .thumb { width: 84px; height: 84px; border-radius: 16px; background: #fff; }
.artist-hero-body { min-width: 0; }
.artist-hero h1 { margin: 0 0 2px; font-size: 1.45rem; }
.artist-hero p { margin: 0 0 10px; }
.btn-row.wrap { flex-wrap: wrap; gap: 8px; }
tr.is-me td { background: var(--pop-soft); }

/* ------------------------------------------------------------------
 * おすすめの1曲
 * ------------------------------------------------------------------ */
/* おすすめ曲へのボタン。未設定のときは目に留まるように塗りつぶす */
.track-link {
  align-self: flex-start;
  display: inline-block; margin-top: 5px;
  padding: 3px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; line-height: 1.6;
  overflow-wrap: anywhere;
  transition: filter .12s ease, background .12s ease, transform .1s ease;
}
.track-link.cta {
  background: linear-gradient(100deg, var(--pop-ink), var(--pop-ink-2));
  color: #fff;
  box-shadow: 0 2px 7px var(--pop-glow);
}
.track-link.cta:hover, .track-link.cta:focus-visible {
  color: #fff; text-decoration: none;
  filter: brightness(1.08); transform: translateY(-1px);
}
.track-link.set {
  background: var(--pop-soft); color: var(--pop-ink);
  box-shadow: none;
}
.track-link.set:hover { background: var(--pop-ink); color: #fff; text-decoration: none; }
label.track-link { cursor: pointer; user-select: none; }
label.track-link::after { content: " ▾"; font-size: .8em; }
.more-toggle:checked ~ label.track-link::after { content: " ▴"; }
.track-link.plain { cursor: default; }

/* 押したときに開く部分（ひとこと＋試聴プレイヤー） */
.track-reveal { display: none; max-width: 100%; }
.more-toggle:checked ~ .track-reveal { display: block; }
.track-reveal .track-note { display: block; margin: 6px 0 0; }
.track-reveal audio.preview { max-width: min(320px, 100%); }
.more-toggle:focus-visible ~ label.track-link { outline: 2px solid var(--accent); outline-offset: 2px; }

.track-body { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.track-name { font-weight: 700; overflow-wrap: anywhere; }
.track-note { color: var(--muted); font-size: .86rem; margin: 4px 0 0; overflow-wrap: anywhere; }

.track-list li { align-items: center; gap: 10px; flex-wrap: wrap; }
.current-track { border-color: var(--pop); background: linear-gradient(180deg, var(--pop-soft), #fff 60%); }

audio.preview {
  display: block; width: 100%; max-width: 320px;
  height: 34px; margin: 8px 0 4px;
}
audio.preview.mini { max-width: 210px; margin: 0; flex: 0 0 auto; }

.recommends { border-color: var(--accent); }
.recommend-list { list-style: none; margin: 0; padding: 0; }
.recommend-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.recommend-list li:last-child { border-bottom: none; }
.recommend-list li.is-me { background: var(--pop-soft); border-radius: 12px; padding: 12px 14px; }
.recommend-head {
  display: flex; align-items: baseline; flex-wrap: wrap;
  column-gap: 6px; row-gap: 2px;
}
.rec-user { font-weight: 700; }
.rec-arrow { color: var(--muted); font-size: .8rem; margin-right: 4px; }
.rec-cta { margin: -6px 0 18px; }

/* ------------------------------------------------------------------
 * 管理者モード
 * ------------------------------------------------------------------ */
button.danger {
  background: var(--ng); border-color: transparent;
  color: #fff; font-weight: 700;
  box-shadow: 0 2px 7px rgba(208, 40, 64, .28);
}
button.danger:hover { color: #fff; border-color: transparent; transform: translateY(-1px); }
.danger-zone { border-color: var(--ng); background: linear-gradient(180deg, var(--ng-bg), #fff 55%); }
.danger-zone b { color: var(--ng); }
.small-link { font-size: .82rem; }
.danger-link { color: var(--ng); }
.btn-row { display: flex; align-items: center; gap: 12px; }
.checkbox { flex-direction: row !important; align-items: center; gap: 8px !important; }
.checkbox input { width: auto; }
.admin-table td, .admin-table th { padding: 7px 8px; font-size: .88rem; }
.admin-table .nowrap { white-space: nowrap; }
.rename-form { display: flex; gap: 6px; align-items: center; }
.rename-form input[type="text"] { min-width: 12em; }
.ban-list { list-style: none; margin: 0; padding: 0; }
.ban-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.ban-list li:last-child { border-bottom: none; }
.ban-list li > span:first-child { font-weight: 700; margin-right: auto; }
.hash-out, .log {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; overflow-x: auto; font-size: .82rem; white-space: pre-wrap;
  word-break: break-all;
}
.log { max-height: 18em; overflow-y: auto; white-space: pre; word-break: normal; }
code {
  background: var(--panel-2); border-radius: 5px;
  padding: 1px 6px; font-size: .88em;
}

.site-footer {
  text-align: center; padding: 22px;
  color: var(--muted); font-size: .78rem;
  border-top: 1px solid var(--line);
}

[aria-busy="true"] { opacity: .5; }

@media (max-width: 560px) {
  /* スマホでは、バッジと削除ボタンを次の行に落として名前の幅を確保する */
  .artist-grid li { flex-wrap: wrap; row-gap: 8px; }
  .artist-grid li > div { flex-basis: calc(100% - 58px); }
  .artist-grid li > .badge,
  .artist-grid li > a.holders-badge,
  .artist-grid li > form { margin-left: 58px; }
  .artist-grid li > form { margin-left: 0; }
  .best-form label { grid-template-columns: 3em minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .user-table .num { width: 5em; }
  .shared-artists { margin-left: 0; }
  .artist-hero { gap: 14px; }
  .artist-hero .thumb { width: 64px; height: 64px; }
}

/* アニメーションを減らす設定の人には動きを出さない */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  a.thumb:hover, .user-list li > a:hover,
  button.primary:hover, button.btn-add:hover, button.danger:hover { transform: none; }
}

.search-hint { margin: -6px 0 12px; }
.track-note.inline { display: block; margin-top: 4px; }
.type-badge {
  display: inline-block; margin-left: 8px;
  padding: 0 8px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted);
  font-size: .72rem; font-weight: 600; white-space: nowrap;
}
/* 独自性（その人だけが登録している割合） */
.uniqueness { margin: -4px 0 14px; }
.uniq-line { margin: 0 0 2px; font-size: .9rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.uniq-value { color: var(--accent); font-size: 1.1rem; font-variant-numeric: tabular-nums; }

/* 公開年。ジャンルの隣に控えめに出す。
   ジャンルはテキストノードなので :first-child では判定できない。
   常に左に余白をとる（種別バッジと同じ考え方） */
.release-year { margin-left: 6px; white-space: nowrap; }

/* 種別ごとに色を変える（プロバイダが key を返したとき） */
.type-badge.is-anime { background: var(--accent-soft); color: var(--accent); }
.type-badge.is-manga { background: var(--pop-soft);    color: var(--pop-ink); }
/* 横並びの行に置くとき（検索結果など）は、行の gap にまかせる */
.type-badge.tight { margin-left: 0; flex: 0 0 auto; }
