
/* レイアウト：スマホ幅の1カラム。夜の部屋とレコードの世界観で単一テーマ（ダーク）。--dir は向きの色でページごとに body に入る */
:root {
  --night: #10141f;
  --panel: #182031;
  --panel-2: #1f2a3f;
  --line: #2c3850;
  --paper: #efe8db;
  --muted: #a3abbd;
  --dir: #5b86c9;          /* 向きの色。画面ごとに data-dir で切り替える */
  --dir-soft: rgba(91,134,201,.18);
  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --radius: 14px;
  color-scheme: dark;
}
[data-dir="浸る"]  { --dir: #5b86c9; --dir-soft: rgba(91,134,201,.18); }
[data-dir="ほどく"] { --dir: #86b39a; --dir-soft: rgba(134,179,154,.18); }
[data-dir="整える"] { --dir: #b3b4d8; --dir-soft: rgba(179,180,216,.18); }
[data-dir="上げる"] { --dir: #f0b94e; --dir-soft: rgba(240,185,78,.18); }
[data-dir="燃える"] { --dir: #e8643f; --dir-soft: rgba(232,100,63,.2); }

* { box-sizing: border-box; }
html, body { background: var(--night); color: var(--paper); }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.7; padding-inline: 16px; padding-block: 20px 40px; }
button, input, select { font: inherit; color: inherit; }
/* iOS Safari は 16px 未満の入力欄にフォーカスすると画面を自動拡大し、カードがはみ出して見える。入力欄は16px以上にする */
input, select { font-size: 16px; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--dir); outline-offset: 2px; }

.shell { max-width: 1040px; margin: 0 auto; display: grid; gap: 20px; }
.topbar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.topbar h1 { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin: 0; letter-spacing: .02em; }
.topbar p { margin: 0; color: var(--muted); font-size: 13px; }
.screens { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.screens button { flex: none; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--muted); }
.screens button[aria-pressed="true"] { border-color: var(--paper); color: var(--paper); }

.stage { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .stage { grid-template-columns: 420px 1fr; } }

/* スマホ画面 */
.phone { width: 100%; max-width: 420px; margin: 0 auto; background: linear-gradient(180deg, var(--dir-soft), transparent 260px), var(--night); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; min-height: 760px; transition: background .5s ease; }
.app-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .03em; }
.logo span { color: var(--dir); transition: color .5s ease; }
.clock { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.app-body { flex: 1; padding: 8px 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; }
.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--panel); }
.tabbar button { background: none; border: 0; padding: 10px 4px 12px; font-size: 11px; color: var(--muted); display: grid; justify-items: center; gap: 2px; }
.tabbar button[aria-current="page"] { color: var(--paper); }
.tabbar svg { width: 20px; height: 20px; }

.eyebrow { font-size: 11px; letter-spacing: .12em; color: var(--muted); margin: 0 0 8px; }
.h2 { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.45; margin: 0; text-wrap: balance; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.5; margin: 0; text-wrap: balance; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* モーメントのカード */
.moment-list { display: grid; gap: 10px; }
.moment { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; }
.moment:hover { border-color: var(--muted); }
.moment .sent { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.55; }
.moment .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.moment .jackets { display: flex; gap: 6px; }
.moment .jackets .jacket { border-radius: 6px; flex: none; font-size: 9px; overflow: hidden; }
.moment .meta .more { margin-left: auto; color: var(--dir); font-weight: 600; }
.now-head { display: grid; gap: 4px; margin-top: 8px; }
.now-head h2 { margin: 0; }
.moment.empty { border-style: dashed; }
.moment.empty .meta { flex-wrap: wrap; row-gap: 4px; }
.moment.empty .first { color: var(--dir); font-weight: 600; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
#results { scroll-margin-top: 16px; }
.intro { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; }
.intro-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; color: var(--muted); }
.dirpill { white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 1px 9px; border-radius: 999px; border: 1px solid currentColor; }

/* ジャケット */
.jacket { width: 64px; height: 64px; border-radius: 6px; flex: none; display: grid; place-items: end start; padding: 6px; font-family: var(--font-display); font-weight: 800; font-size: 11px; line-height: 1.2; color: rgba(255,255,255,.9); box-shadow: 0 6px 16px rgba(0,0,0,.35); overflow: hidden; }
.song { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; }
.song + .song { border-top: 1px solid var(--line); padding-top: 14px; }
.song-body { min-width: 0; display: grid; gap: 4px; }
.song-title { font-weight: 700; }
.quote { font-family: var(--font-display); font-size: 14px; line-height: 1.7; margin: 2px 0 0; padding-left: 10px; border-left: 2px solid var(--dir); }
.who { font-size: 11px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 12px; font-size: 12px; }
.btn[aria-pressed="true"] { background: var(--dir); border-color: var(--dir); color: var(--night); font-weight: 700; }
.btn-main { display: block; width: 100%; text-align: center; background: var(--dir); color: var(--night); border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: 15px; }
.btn-ghost { display: block; width: 100%; text-align: center; background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; font-size: 14px; }

/* 今夜の1曲 */
.tonight { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.tonight .song { grid-template-columns: 96px 1fr; }
.tonight .jacket { width: 96px; height: 96px; font-size: 14px; }

.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.entry { text-align: left; border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); background: var(--panel); display: grid; gap: 4px; }
.entry b { font-family: var(--font-display); font-size: 15px; line-height: 1.45; }
.entry span { font-size: 12px; color: var(--muted); }

/* さっき届いた思い出（#46） */
.recent { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; }
.recent-list li + li { border-top: 1px solid var(--line); }
.recent-item { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start; padding: 10px 0; }
.recent-item .jacket { width: 48px; height: 48px; font-size: 9px; padding: 4px; }
.recent-head { font-family: var(--font-display); font-size: 14px; line-height: 1.5; }
.recent-item .small { overflow-wrap: anywhere; }
.recent-mine { display: inline-block; margin-left: 8px; padding: 0 8px; border: 1px solid var(--dir); border-radius: 999px; color: var(--paper); font-size: 11px; }

/* あなたの1曲が並んだ場所（#46） */
.placed { display: grid; gap: 8px; }
.placed-title { font-family: var(--font-display); font-size: 15px; }
.placed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.placed-list li { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.placed-list a { text-decoration: underline; text-underline-offset: 3px; }
.placed-place { display: inline-block; margin-right: 8px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-size: 11px; color: var(--muted); }

.banner { border-radius: var(--radius); padding: 14px 16px; background: linear-gradient(120deg, #f2a96c, #d9706a 45%, #6d4a8a); color: #fffaf3; display: grid; gap: 2px; text-align: left; border: 0; }
.banner b { font-family: var(--font-display); font-size: 17px; }

.timepick { display: flex; flex-wrap: wrap; gap: 6px; }

/* モーメント・ビルダー */
.builder { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sentence { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 2.1; }
.slot { display: inline-block; border: 0; border-bottom: 2px solid var(--dir); background: var(--dir-soft); border-radius: 6px 6px 0 0; padding: 0 8px; margin: 0 2px; font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.6; }
.slot.empty { color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 11px; font-size: 13px; }
.chip small { color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { border-color: var(--dir); background: var(--dir-soft); }
.chip:disabled { opacity: .35; cursor: default; }
.slotlabel { font-size: 11px; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.dirs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dirbtn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 8px 2px; font-size: 13px; display: grid; justify-items: center; gap: 4px; }
.dirbtn i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dirbtn[aria-pressed="true"] { border-color: currentColor; }
.textsearch { display: flex; gap: 8px; }
.textsearch input { flex: 1; min-width: 0; width: 100%; background: var(--night); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.maybe { font-size: 13px; color: var(--muted); }
.maybe button { background: none; border: 0; color: var(--dir); text-decoration: underline; padding: 0; }

/* モーメントページ */
.mhead { display: grid; gap: 10px; }
.dirswitch { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.dirswitch button { border: 0; background: transparent; border-radius: 8px; padding: 7px 0; font-size: 13px; color: var(--muted); }
.dirswitch button[aria-pressed="true"] { background: var(--dir); color: var(--night); font-weight: 700; }
.dirswitch button.none { opacity: .45; }
.post-part { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.card-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.voices { display: grid; gap: 8px; }
.voices p { margin: 0; font-family: var(--font-display); font-size: 14px; color: var(--paper); }
.voices p::before { content: "― "; color: var(--muted); }
.wanted { border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; text-align: center; }

/* 懐かしい */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 8px; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--paper); }
.selects { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.selects select, .field select, .field input { background: var(--night); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.field select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.form, .field, .seg, .card-preview, .dirs { min-width: 0; }
.grid9 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { border: 0; background: none; padding: 0; text-align: left; display: grid; gap: 4px; min-width: 0; }
/* 仮のジャケット（画像のない曲）は style 属性で大きさを持つため、マスの幅に合わせて上書きする */
.tile .jacket { width: 100% !important; height: auto !important; aspect-ratio: 1; max-width: 100%; font-size: 12px; }
.tile span { font-size: 11px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.tile[aria-pressed="true"] .jacket { outline: 3px solid var(--dir); outline-offset: 2px; }
.suggest { display: grid; gap: 6px; }
.suggest button { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.suggest .jacket { width: 40px; height: 40px; font-size: 0; padding: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; border-radius: 999px; padding: 3px 10px; background: var(--dir-soft); border: 1px solid var(--dir); }
.engine { font-size: 11px; letter-spacing: .06em; color: var(--dir); font-weight: 700; }
.steps { display: flex; gap: 6px; font-size: 11px; color: var(--muted); }
.steps b { color: var(--paper); }

/* 投稿とカード */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.field input[type="text"] { width: 100%; }
.card-preview { border-radius: 16px; overflow: hidden; aspect-ratio: 1200 / 630; max-width: 100%; position: relative; padding: 5% 5.5%; display: grid; grid-template-columns: 44% 1fr; gap: 5%; align-items: center; color: #fffaf3; }
.cp-art { position: relative; aspect-ratio: 1.45; }
.cp-sleeve { position: absolute; inset: 0 31% 0 0; border-radius: 4px; box-shadow: 0 8px 20px rgba(0,0,0,.4); display: grid; place-items: end start; padding: 8%; font-family: var(--font-display); font-weight: 800; font-size: clamp(9px, 2.6vw, 13px); line-height: 1.25; z-index: 2; }
.cp-record { position: absolute; top: 4%; bottom: 4%; aspect-ratio: 1; right: 0; border-radius: 50%; background: radial-gradient(circle, #222 0 17%, #0e0e0e 18% 38%, #1b1b1b 39% 40%, #0b0b0b 41% 68%, #171717 69% 70%, #0a0a0a 71%); display: grid; place-items: center; animation: spin 1.8s linear infinite; }
.cp-label { width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--dir); display: grid; place-items: center; font-size: 6px; font-weight: 700; color: rgba(0,0,0,.7); letter-spacing: .05em; }
.cp-label::after { content: "SIDE A"; }
.cp-notes { position: absolute; right: 2%; top: 0; bottom: 0; width: 36%; pointer-events: none; z-index: 3; }
.cp-notes span { position: absolute; bottom: 35%; font-size: clamp(10px, 3vw, 15px); color: #ffd29d; animation: rise 3.6s ease-in-out infinite; opacity: 0; }
.cp-notes span:nth-child(1) { left: 10%; animation-delay: 0s; }
.cp-notes span:nth-child(2) { left: 45%; animation-delay: 1.2s; font-size: clamp(12px, 3.4vw, 17px); }
.cp-notes span:nth-child(3) { left: 78%; animation-delay: 2.4s; }
.cp-text { display: grid; gap: 6px; min-width: 0; }
.cp-head { font-family: var(--font-display); font-weight: 800; font-size: clamp(12px, 3.6vw, 19px); line-height: 1.4; text-wrap: balance; }
.cp-song { font-weight: 700; font-size: clamp(10px, 2.6vw, 13px); }
.cp-note { font-family: var(--font-display); font-size: clamp(9px, 2.3vw, 12px); line-height: 1.5; border-left: 2px solid #ffd29d; padding-left: 6px; }
.cp-foot { display: flex; justify-content: space-between; font-size: clamp(8px, 2.1vw, 11px); font-weight: 700; color: #ffd29d; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-160%) translateX(6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cp-record, .cp-notes span { animation: none; } .cp-notes span { opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--paper); color: var(--night); border-radius: 12px; padding: 10px 16px; font-size: 13px; max-width: min(92vw, 420px); box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 10; }
.posttext { white-space: pre-wrap; background: var(--night); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 0; }

/* 設計メモ */
.notes { display: grid; gap: 14px; align-content: start; }
.notes h2 { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin: 0; }
.notes ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--paper); }
.notes li { max-width: 60ch; }
.notes .ref { font-size: 12px; color: var(--muted); }

/* 3つの問い（探す・投稿で共通の部品） */
.qgroup { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.qgroup + .qgroup { border-top: 1px solid var(--line); padding-top: 14px; }
.qtitle { font-family: var(--font-display); font-weight: 800; font-size: 16px; padding: 0; margin-bottom: 2px; }
.qgroup.compact { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; gap: 8px; }
/* トップの「いつ？」：今の値をラベルで見せ、「時間を変える」で選択欄を開く */
.when { display: grid; gap: 8px; margin-top: 8px; }
.when > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; }
.when > summary::-webkit-details-marker { display: none; }
.when > summary:focus-visible { outline: 2px solid var(--dir); outline-offset: 2px; border-radius: 8px; }
.when-tags { display: flex; gap: 6px; }
.when-toggle { font-size: 13px; color: var(--dir); font-weight: 600; }
.when-toggle::after { content: "›"; display: inline-block; margin-left: 4px; transition: transform .15s; }
.when[open] .when-toggle::after { transform: rotate(90deg); }
.axisrow { display: grid; gap: 4px; min-width: 0; }
.req, .opt { font-size: 10px; margin-left: 6px; padding: 0 6px; border-radius: 4px; letter-spacing: 0; }
.req { background: var(--dir); color: var(--night); }
.opt { border: 1px solid var(--line); color: var(--muted); }
.dirbtn:disabled { opacity: .35; cursor: default; }
.words { display: flex; flex-wrap: wrap; gap: 6px; }
.word { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; border-radius: 8px; padding: 3px 10px; background: var(--dir-soft); border: 1px solid var(--dir); }
.word small { font-size: 10px; color: var(--muted); }
.word em { font-style: normal; font-size: 11px; color: var(--muted); }
.madeof { display: grid; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); }
.lands { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; }
.lands ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lands li { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; font-size: 13px; }
.lands li b { color: var(--dir); font-weight: 700; }
.lands li span { min-width: 0; overflow-wrap: anywhere; }

/* ---- アプリ用 ---- */
body { padding: 0; }
a { color: inherit; }
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, color-mix(in srgb, var(--dir) 18%, transparent), transparent 280px), var(--night); }
.app-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(8px); }
.logo { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding-block: 6px; }
/* 図形の高さ 24px（横 75px）。文字は brand/logo の横長ロゴと同じ書体・色・字間 */
.logo-symbol { height: 24px; width: auto; aspect-ratio: 440 / 140; flex: none; }
.logo .logo-text { color: #7566a3; font-size: 18px; line-height: 1; letter-spacing: .156em; }
.app-body { padding-inline: 16px; padding-block: 8px 28px; }
.tabbar { position: sticky; bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar a { text-align: center; text-decoration: none; padding: 12px 4px 14px; font-size: 12px; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--paper); font-weight: 700; }
.moment, .entry, .banner, .tile, .chip, .dirbtn, .btn, .seg a, .dirswitch a { text-decoration: none; }
.song-title { text-decoration: none; }
a.chip[aria-pressed="true"], label.chip:has(input:checked) { border-color: var(--dir); background: color-mix(in srgb, var(--dir) 18%, transparent); }
a.dirbtn[aria-pressed="true"], label.dirbtn:has(input:checked) { border-color: currentColor; background: color-mix(in srgb, currentColor 16%, transparent); }
.dirbtn { flex-direction: column; align-items: center; display: flex; color: inherit; }
.chip.disabled, .dirbtn.disabled { opacity: .35; }
label.chip, label.dirbtn { cursor: pointer; }
label.chip input, label.dirbtn input { position: absolute; opacity: 0; pointer-events: none; }
label.chip:has(input:focus-visible), label.dirbtn:has(input:focus-visible) { outline: 2px solid var(--dir); outline-offset: 2px; }
.dirs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dirbtn { font-size: 12px; }
.seg a { border-radius: 8px; padding: 8px; font-size: 13px; color: var(--muted); text-align: center; }
.seg a[aria-pressed="true"] { background: var(--panel-2); color: var(--paper); }
.dirswitch a { border-radius: 8px; padding: 7px 0; font-size: 13px; color: var(--muted); text-align: center; }
.dirswitch a[aria-pressed="true"] { background: var(--dir); color: var(--night); font-weight: 700; }
.dirswitch a.none { opacity: .45; }
img.jacket { padding: 0; object-fit: cover; }
.tile .jacket { width: 100%; height: auto; }
.field-label { font-size: 12px; color: var(--muted); }
.field input[type="text"], .search-input { width: 100%; background: var(--night); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--paper); }
.search-row { display: flex; gap: 8px; align-items: stretch; }
.search-row .search-input { flex: 1; min-width: 0; width: auto; }
.search-go { flex: none; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.picked:empty { display: none; }
.suggest:empty { display: none; }
.suggest > p { margin: 0; }
.suggest button img { width: 40px; height: 40px; border-radius: 4px; }
.error { color: #ff9b85; font-size: 13px; margin: 0; white-space: pre-line; }
.credit { font-size: 11px; color: var(--muted); margin: 0; }
.listen { display: grid; gap: 6px; }
.listen .row { align-items: center; }
/* Apple のバッジ：高さ40px、周囲の余白は高さの1/10以上（4px） */
.am-badge { display: inline-block; padding: 4px; line-height: 0; }
.am-badge img { height: 40px; width: auto; display: block; }
.cp-sleeve img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.cp-sleeve { background: linear-gradient(140deg, #3b6ea5, #1d3557); }
.wanted .btn { justify-self: center; }

.app a { text-decoration: none; }

/* ストーリーズ用の動くカード（#4） */
.story-status { display: grid; gap: 10px; }
.story-status progress { width: 100%; }
.story-canvas { width: 96px; height: auto; border-radius: 8px; display: block; }

/* フッター・相談窓口・規約のページ */
.site-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px 16px; font-size: 12px; }
.site-foot a { color: var(--muted); }
.help-notice { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--panel); display: grid; gap: 6px; }
.help-notice p { margin: 0; }
.legal { display: grid; gap: 14px; }
.legal h2 { font-size: 16px; margin: 8px 0 0; }
.legal p, .legal li { font-size: 14px; line-height: 1.8; }
.legal a, .suggest a { color: var(--paper); text-decoration: underline; }
.help-notice a { color: var(--paper); text-decoration: underline; }

/* 管理画面 */
.admin-nav { margin-bottom: 12px; }
.admin-form { display: grid; gap: 8px; }
.admin-form label { display: grid; gap: 4px; font-size: 13px; }
.admin-form input, .admin-form textarea, .admin-form select { width: 100%; box-sizing: border-box; padding: 8px; font: inherit; }
.admin-form label.check { display: flex; align-items: center; gap: 8px; }
.admin-form label.check input { width: auto; }

/* アイコンと絵文字（docs/19）。線のアイコンは文字の色を受け継ぎ、文字の大きさに合わせる */
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-style: normal; line-height: 1; margin-right: .3em; }
.btn .icon, .btn-main .icon, .btn-ghost .icon, .search-go .icon, .banner .icon { margin-right: .35em; }
.search-go { display: inline-flex; align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 6px; }
.eyebrow .icon { color: var(--dir); width: 15px; height: 15px; }
.qtitle { display: flex; align-items: center; gap: 8px; }
.qtitle .icon { color: var(--dir); width: 20px; height: 20px; }
/* タブ：アイコンを上、文字を下に */
.tabbar a { display: grid; justify-items: center; gap: 3px; padding: 9px 4px 11px; font-size: 11px; }
.tabbar .icon { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] .icon { color: var(--dir); stroke-width: 2.1; }
/* 向き：色と形の両方で見分ける */
.dirbtn .icon { width: 20px; height: 20px; }
.dirpill small { color: var(--muted); margin-right: 4px; font-size: 11px; }
.dirpill .icon { width: 13px; height: 13px; }
.dirswitch a { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dirswitch a .icon { width: 18px; height: 18px; }
.word .icon { width: 14px; height: 14px; align-self: center; }
.word .emoji { margin-right: 0; }
/* 入口のカード：アイコンを大きく */
.entry .entry-icon { width: 26px; height: 26px; color: var(--dir); margin-bottom: 2px; }
.banner .icon { width: 13px; height: 13px; }
/* パンくず（検索向けの階層。docs/07 §6） */
.crumbs { color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); }
/* 気持ちのページ：子モーメントと、その1位の曲 */
.feel-moment { display: grid; gap: 8px; }
.feel-list { display: grid; gap: 18px; }
.entry .emoji { font-size: 22px; line-height: 1; }
/* 記事（docs/21） */
.article { display: grid; gap: 12px; line-height: 1.85; font-size: 15px; }
.article p, .article ul { margin: 0; }
.article ul { padding-left: 1.2em; display: grid; gap: 4px; }
.article-h2 { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.article-h3 { font-size: 15px; margin: 6px 0 0; }
.article-aside { border-left: 2px solid var(--line); padding-left: 10px; color: var(--muted); }
.article-toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--panel); }
.article-toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: 14px; }
.article-song { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.article-note { margin: 6px 0 0; font-size: 14px; line-height: 1.8; }
.article-slot { border: 1px dashed var(--dir); border-radius: 10px; padding: 12px; font-size: 13px; color: var(--muted); }
.article-draft { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; color: var(--muted); }
.article-faq { display: grid; gap: 8px; }
.article-faq details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.article-faq summary { font-weight: 700; cursor: pointer; }
.article-faq details p { margin-top: 8px; }
.ranking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ranking-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.article-post { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }

/* 管理画面の日次・月次レポート（docs/24）。数字の枠・SVG の棒グラフ・表。375px 幅で横にはみ出さない */
.report-block { margin-top: 12px; }
.report-alert { border-color: var(--dir); }
.report-alert ul { margin: 0; padding-left: 20px; }
.report-nav { margin: 4px 0 8px; }
.report-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-stat { display: grid; gap: 2px; align-content: start; background: var(--panel-2); border-radius: 10px; padding: 10px; overflow-wrap: anywhere; }
.report-stat b { font-family: var(--font-display); font-size: 24px; line-height: 1.3; }
.report-figure { margin: 0; display: grid; gap: 4px; }
.report-chart { width: 100%; height: auto; display: block; }
.report-chart .axis { stroke: var(--line); stroke-width: 1; }
.report-chart .bar-a { fill: #5b86c9; }
.report-chart .bar-b { fill: #f0b94e; }
.report-chart text { fill: var(--muted); font-size: 9px; }
.report-chart .val { fill: var(--paper); }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
.report-table th, .report-table td { text-align: left; padding: 6px 6px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.report-table th { color: var(--muted); font-weight: 400; font-size: 12px; }
.report-table .path { word-break: break-all; }
.report-table .block { display: block; }
.report-meter { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.report-meter span { display: block; height: 100%; background: var(--dir); }
.report-songs { margin: 4px 0 0; padding-left: 20px; }

/* 年表（/lineup）：枠ごとのタイル・曲を探すダイアログ・年表のページ */
.post-simple { justify-self: start; color: var(--dir); font-weight: 700; text-decoration: none; }
.lineup-slot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.lineup-head { margin: 0; line-height: 1.6; }
.lineup-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.lineup-tile { min-width: 0; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 6px 4px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--paper); text-align: center; font: inherit; }
.lineup-tile .jacket { width: 100%; max-width: 64px; height: auto; aspect-ratio: 1; font-size: 0; padding: 0; }
.lineup-tile .lt-title { font-size: 11px; line-height: 1.35; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.lineup-tile small { font-size: 10px; color: var(--muted); }
.lineup-tile.draft { border-color: var(--dir); background: var(--dir-soft); }
.lineup-tile.draft small { color: var(--dir); font-weight: 700; }
.lineup-tile.saved { opacity: .9; }
.lineup-tile.add { border-style: dashed; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; min-height: 78px; align-content: center; }
.lineup-tile.add:hover { color: var(--paper); border-color: var(--muted); }
.lineup-dialog { width: min(92vw, 520px); max-height: 86vh; margin: auto; background: var(--panel); color: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow: auto; }
.lineup-dialog[open] { display: grid; gap: 12px; }
.lineup-dialog::backdrop { background: rgba(8, 11, 18, .72); }
.lineup-dialog .field, .lineup-dialog .btn { min-width: 0; }
.lineup-dialog .btn { justify-self: end; }
.lineup-cards { display: grid; gap: 10px; }
.lineup-card { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; text-decoration: none; color: inherit; min-width: 0; }
.lineup-card:hover { border-color: var(--muted); }
.lineup-card .lc-jackets { display: flex; gap: 4px; }
.lineup-card .jacket { width: 40px; height: 40px; border-radius: 4px; padding: 0; font-size: 0; }
.lineup-card .lc-name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.lineup-era h2 a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.lineup-era h2 .emoji { margin-right: .4em; }
@media (max-width: 420px) { .lineup-card { grid-template-columns: 1fr auto; } .lineup-card .lc-jackets { grid-column: 1 / -1; } }
.lineup-og { width: 100%; height: auto; border-radius: 10px; display: block; }

/* 物販のアフィリエイト（D24）。広告は「PR」の枠で見分けられるようにする */
.pr { display: inline-block; flex: none; margin-right: 8px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--font-body); font-size: 10px; font-weight: 700; line-height: 1.6; letter-spacing: .08em; color: var(--muted); vertical-align: middle; }
.shop { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.shop a, .shop-shelf a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.shop-shelf ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.shop-shelf li { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.shop-shelf p { margin: 0; }
.site-note { margin: 0; padding: 0 16px 16px; }
