/* Shared appearance tokens cover the map, public catalog, journals and account forms. */
:root {
  color-scheme: light;
  --bg: #fafafc;
  --panel: #ffffff;
  --surface-soft: #f3f3f7;
  --surface-hover: #ececf2;
  --header: #f7f7fa;
  --text: #18181c;
  --muted: #646570;
  --line: #e3e4e9;
  --line-strong: #c9cbd3;
  --accent: #315cd4;
  --accent-soft: #edf1ff;
  --input-selection-bg: #2459c4;
  --input-selection-text: #ffffff;
  --primary: #315edc;
  --on-primary: #ffffff;
  --scrollbar: #a5a7b3;
  --backdrop: #17172080;
  --shadow: #17172014;
  --map-bg: #fdfdff;
  --map-region: #efeff5;
  --map-grid: #d1d3de;
  --map-edge: #737888;
  --genre-roots: #78613a;
  --genre-country: #a25323;
  --genre-jazz: #276c96;
  --genre-rap: #7251b4;
  --genre-rock: #85650b;
  --genre-pop: #a33c7b;
  --genre-club: #477525;
  --genre-bass: #14786a;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141416;
  --panel: #1b1b1f;
  --surface-soft: #232328;
  --surface-hover: #2c2c33;
  --header: #19191c;
  --text: #f2f2f5;
  --muted: #aaaab6;
  --line: #323239;
  --line-strong: #4c4c57;
  --accent: #9ab3ff;
  --accent-soft: #242e48;
  --input-selection-bg: #9ab3ff;
  --input-selection-text: #111827;
  --primary: #3965db;
  --scrollbar: #62626f;
  --backdrop: #000000aa;
  --shadow: #00000033;
  --map-bg: #19191d;
  --map-region: #25252c;
  --map-grid: #3e3e4b;
  --map-edge: #9898ad;
  --genre-roots: #c9b58a;
  --genre-country: #eea46e;
  --genre-jazz: #74b5db;
  --genre-rap: #b6a0ff;
  --genre-rock: #e6be63;
  --genre-pop: #e697c4;
  --genre-club: #b5ed7d;
  --genre-bass: #72d9c7;
}

/* Digg-inspired compact type, quiet surfaces and clear editorial hierarchy. */
body {
  color-scheme: inherit;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
button { font-size: 13px; font-weight: 500; border-radius: 8px; }
p { line-height: 1.6; }
h1, h2, h3, h4 { letter-spacing: -.025em; }
::selection { background: var(--accent-soft); color: var(--text); }
/* Opaque selection keeps edited text distinct from quiet field backgrounds. */
input::selection, textarea::selection {
  background-color: var(--input-selection-bg);
  color: var(--input-selection-text);
  text-shadow: none;
}
.site-header { height: 68px; gap: 24px; padding-top: 0; padding-bottom: 0; background: var(--header); }
.site-header .brand { font-size: 22px; font-weight: 800; letter-spacing: -.9px; gap: 8px; }
.brand:hover { color: var(--text); }
.record { color: var(--text); font-size: 30px; font-weight: 600; line-height: 1; }
.gnb { align-self: center; gap: 4px; }
.gnb button { border-radius: 8px; padding: 8px 14px; font-size: 14px; }
.gnb button.active { color: var(--text); background: var(--surface-hover); font-weight: 650; }
.gnb button.active:after { display: none; }
.gnb button:hover { background: var(--surface-hover); color: var(--text); }
.header-actions { margin-left: 0; }
#account-button { border-radius: 999px; padding: 7px 16px; background: var(--panel); white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.theme-switch { display: inline-flex; align-items: center; flex-shrink: 0; margin-left: auto; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-soft); }
.theme-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 11px; line-height: 18px; padding: 4px 8px; }
.theme-switch button[aria-pressed="true"] { color: var(--text); background: var(--panel); box-shadow: 0 1px 3px var(--shadow); font-weight: 650; }
.theme-switch button:hover { color: var(--text); }
.theme-switch svg { height: 13px; width: 13px; flex: 0 0 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.site-header .language-select { font-size: 12px; border: 0; padding: 6px 3px; background: transparent; }
.atlas-count { font-size: 11px; padding-top: 14px; padding-bottom: 9px; font-variant-numeric: tabular-nums; }
.segmented { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.segmented button { font-size: 12px; border-radius: 999px; padding: 6px 13px; }
.segmented .active { background: var(--panel); color: var(--text); font-weight: 650; box-shadow: 0 1px 3px var(--shadow); }
.toolbar { margin-bottom: 14px; align-items: center; }
.search { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 0 10px; }
.search input { font-size: 12px; padding: 8px 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.map-shell { background: var(--map-bg); border-radius: 12px; }
.map-heading, .map-footer { padding: 12px 16px; font-size: 11px; background: var(--panel); }
.map-heading { letter-spacing: .06em; }
#family-headers { background: var(--surface-soft); }
#family-headers span { font-size: 11px; font-weight: 650; letter-spacing: .025em; }
#year-axis { color: var(--text); }
svg .node text { stroke: var(--map-bg); font-weight: 550; }
svg .node:hover text, svg .node:focus text { fill: var(--text); }
#map { scrollbar-color: var(--scrollbar) var(--map-bg); }
.map-footer>div { gap: 5px; }
.map-footer button { font-size: 12px; }
.map-note { font-size: 11px; line-height: 1.6; }
.country-shortcut { gap: 6px; margin-top: 10px; }
.country-shortcut button { border-color: var(--line); color: var(--muted); background: transparent; font-size: 11px; border-radius: 999px; padding: 5px 10px; }
#hiphop-focus { color: var(--muted); border-color: var(--line); }
.country-shortcut button:hover, #hiphop-focus:hover { color: var(--text); background: var(--surface-soft); }
#detail, #detail.is-welcome { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 16px; scrollbar-color: var(--scrollbar) var(--panel); }
#detail.is-welcome { border-color: var(--line) !important; }
.detail-kicker { font-size: 10px; font-weight: 650; color: var(--muted); letter-spacing: .1em; }
#detail h2 { font-size: 24px; font-weight: 650; letter-spacing: -.035em; }
#detail .welcome-eyebrow { margin-top: 25px; font-size: 12px; color: var(--accent); }
#detail .welcome-title { font-size: 28px; line-height: 1.35; margin-bottom: 15px; }
#detail .welcome-lead { font-size: 13px; line-height: 1.7; margin-bottom: 20px; }
.welcome-steps li { padding: 13px 0 13px 30px; }
.welcome-steps li:before { top: 15px; font-size: 11px; }
.welcome-steps strong { font-size: 13px; }
#detail .welcome-steps p, #detail .welcome-footnote { font-size: 12px; line-height: 1.6; }
#detail .description, #detail .timeline-note, #detail .meta { font-size: 13px; line-height: 1.6; }
#detail .timeline-label { font-size: 14px; font-weight: 600; }
#detail .section-label { font-size: 11px; letter-spacing: .03em; }
.artist { background: var(--surface-soft); border-color: var(--line); }
#detail .artist { border-radius: 10px; padding: 14px 12px 3px; margin: 13px 0; }
#detail .artist+.artist { margin-top: 18px; }
#detail .artist-name { font-size: 18px; font-weight: 650; }
#detail .artist small { font-size: 12px; }
#detail .track-title { font-size: 14px; font-weight: 600; }
.youtube-link, .track-link .youtube-link { font-size: 12px; }
.journal-video { width: 100%; max-width: 640px; margin: 14px 0; }
.journal-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: 1px solid var(--line); border-radius: 8px; background: #000; box-sizing: border-box; }
.journal-video figcaption { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.journal-video figcaption a { color: var(--muted); text-underline-offset: 3px; }
.journal-video figcaption a:hover { color: var(--accent); }
.composer-hint { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.5; }
.related { gap: 5px; }
.related button { border-radius: 999px; padding: 5px 9px; font-size: 12px; }
.detail-source, #detail .detail-source { font-size: 12px; }
.community { max-width: 900px; }
.feed-heading { margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.feed-heading h1 { font-size: 16px; font-weight: 650; }
.post-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 12px; }
.post-top { margin-bottom: 13px; gap: 8px; }
.post-top strong { font-size: 13px; font-weight: 600; }
.post-top small { font-size: 11px; }
.avatar { flex-basis: 30px; height: 30px; font-size: 12px; background: var(--accent-soft); color: var(--accent); }
.post-card h2, .legacy-post h2 { font-size: 20px; line-height: 1.4; font-weight: 650; letter-spacing: -.035em; }
.post-body, .legacy-post p { font-size: 14px; line-height: 1.65; }
.post-actions { gap: 7px; }
.post-actions button { border-radius: 999px; padding: 5px 10px; }
.post-actions [aria-pressed="true"] { background: var(--accent-soft); }
.genre-chips button { border-color: var(--line); color: var(--muted); background: var(--surface-soft); border-radius: 999px; }
.genre-chips button:hover { color: var(--accent); border-color: var(--accent); }
.journal-composer { background: var(--panel); border-color: var(--line); padding: 20px; }
.journal-composer h1 { font-size: 20px; font-weight: 650; margin-bottom: 16px; }
.automatic-music { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.automatic-music h2 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.automatic-music .composer-hint { margin: 0 0 10px; }
.automatic-genres { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.automatic-genres span, .recommendation-label { padding: 3px 7px; border-radius: 5px; background: var(--surface-soft); color: var(--muted); font-size: 12px; line-height: 1.4; }
.automatic-music.is-stale .composer-hint { color: var(--accent); }
.song-identity { flex: 1; min-width: 0; }
.recommendation-label { display: inline-block; margin-left: 8px; border: 1px solid var(--line); }
.composer-tools button[aria-busy="true"] { opacity: 1; cursor: wait; }
.ai-draft-status { display: flex; align-items: flex-start; gap: 10px; padding: 12px; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); font-size: 13px; line-height: 1.6; }
.ai-draft-status[hidden] { display: none; }
.ai-draft-status[data-state="loading"], .ai-draft-status[data-state="waiting"] { border-color: var(--accent); background: var(--accent-soft); }
.ai-draft-message { flex: 1; min-width: 0; }
.ai-draft-elapsed { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-draft-spinner { display: none; flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: draft-spin .85s linear infinite; }
.ai-draft-status[data-state="loading"] .ai-draft-spinner, .ai-draft-status[data-state="waiting"] .ai-draft-spinner { display: block; }
@keyframes draft-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-draft-spinner { animation: none; } }
.form-field { font-size: 12px; gap: 6px; }
.form-field input, .form-field textarea, .draft-track select { background: var(--surface-soft); border-color: var(--line); font-size: 14px; border-radius: 8px; }
.primary { background: var(--primary) !important; color: var(--on-primary) !important; border-color: var(--primary) !important; border-radius: 999px; }
.primary:hover { filter: brightness(1.08); }
.account-dialog, dialog { background: var(--panel); border-color: var(--line); box-shadow: 0 16px 60px var(--shadow); border-radius: 16px; }
.account-dialog h2 { font-weight: 650; letter-spacing: -.035em; }
.form-status { color: var(--accent); }
#feed-status:not(:empty) { background: var(--panel); border-style: solid; }
#toast { background: var(--text); color: var(--panel); box-shadow: 0 6px 28px var(--shadow); border-radius: 999px; font-size: 13px; }
.sleaze-journal { background: var(--panel); }
.study-grid>div, .sleaze-context, .sleaze-artist { background: var(--surface-soft); }
footer { font-size: 11px; letter-spacing: .02em; padding-top: 18px; }

@media (min-width: 761px) { #detail { top: 52px; } }
@media (min-width: 761px) and (max-width: 1100px) {
  .site-header { gap: 12px; }
  .site-header .brand { font-size: 18px; }
  .gnb button { font-size: 13px; padding: 8px 10px; }
  .theme-switch button { padding: 4px 6px; }
  .theme-switch svg { display: none; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .toolbar { flex-wrap: nowrap; }
  .toolbar .search { flex: 1; width: auto; min-width: 100px; }
}
@media (max-width: 760px) {
  .site-header { display: grid; grid-template-columns: minmax(0,1fr) auto auto; height: auto; min-height: 0; gap: 10px 8px; padding: 12px 4%; }
  .site-header .brand { grid-column: 1; grid-row: 1; font-size: 18px; min-width: 0; }
  .record { font-size: 26px; }
  .header-actions { grid-column: 2; grid-row: 1; margin-left: auto; }
  #account-button { font-size: 12px; padding: 5px 11px; max-width: 100px; }
  .site-header .language-select { grid-column: 3; grid-row: 1; width: 74px; font-size: 11px; }
  .gnb { grid-column: 1; grid-row: 2; width: auto; margin: 0; gap: 0; }
  .gnb button { flex: initial; padding: 7px 9px; font-size: 12px; white-space: nowrap; }
  .theme-switch { grid-column: 2 / 4; grid-row: 2; margin-left: auto; }
  .theme-switch button { font-size: 10px; padding: 3px 7px; gap: 3px; }
  .theme-switch svg { width: 11px; height: 11px; flex-basis: 11px; }
  .toolbar { gap: 8px; }
  .search { width: auto; min-width: 150px; }
  .segmented button { padding: 6px 10px; }
  .map-heading, .map-footer { padding: 10px 12px; }
  .workspace #detail { margin-top: 20px; padding: 18px; }
  .community { margin-top: 22px; }
  .post-card, .journal-composer { padding: 16px; }
  .post-card h2, .legacy-post h2 { font-size: 18px; }
  .form-field input, .form-field textarea { font-size: 16px; }
}
@media (max-width: 370px) {
  .site-header .brand { font-size: 16px; }
  .theme-switch svg { display: none; }
}

/* Pending applications stay visible to the administrator. */
.header-actions .approval-button { border-color: var(--accent, #d44a24); font-weight: 650; white-space: nowrap; }
.application { gap: .45rem; }


/* One text-flow policy for cards, including legacy journals and nested music cards.
   Prose uses the available card width; normal language-aware wrapping preserves
   words where possible, with anywhere as a fallback for long unbroken strings. */
:where(.post-card, #detail, .journal-composer, .account-dialog, #feed-status) {
  min-width: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
:where(.post-card, #detail, .journal-composer, .account-dialog, #feed-status)
  :where(h1, h2, h3, h4, h5, h6, p, blockquote, figcaption, summary, a, button) {
  min-width: 0;
  max-width: 100%;
}
:where(.study-grid, .sleaze-artist-grid, .community-song, .artist) > * {
  min-width: 0;
}
/* Authored line breaks remain content; layout must not invent or remove them. */
.post-body, .comment p, .form-field textarea { white-space: pre-wrap; }
#detail .welcome-title { white-space: pre-line; }
/* Let long author names wrap beside the fixed avatar and actions. */
.post-top > div:not(.post-options) { flex: 1; min-width: 0; }
.post-options { flex-shrink: 0; }

.translation-control { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin: 6px 0 10px; color: var(--muted); font-size: 12px; }
.translation-control button, .comment .translation-control button { position: static; border: 0; padding: 0; background: none; color: var(--muted); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.translation-control[aria-busy="true"] > span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; vertical-align: -1px; animation: draft-spin .85s linear infinite; }
@media (prefers-reduced-motion: reduce) { .translation-control[aria-busy="true"] > span::before { animation: none; } }

/* Journal music uses one shared player and a compact 16:9 video grid. */
.community{max-width:1060px}
.post-top{margin-bottom:12px}
.journal-music{margin-top:14px}
.music-video-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 14px}
.music-video-card{min-width:0}
.video-thumbnail{position:relative;display:block;width:100%;aspect-ratio:16/9;padding:0;border:0;border-radius:9px;background:#151515;overflow:hidden;cursor:pointer}
.video-thumbnail img{display:block;width:100%;height:100%;object-fit:cover}
.video-thumbnail:hover .video-play,.video-thumbnail[aria-pressed=true] .video-play{background:#f03;color:#fff}
.video-thumbnail[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:2px}
.video-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:42px;height:30px;border-radius:8px;background:#000b;color:#fff;font-size:14px}
.video-range{position:absolute;bottom:6px;right:6px;background:#000c;color:white;padding:2px 5px;font-size:11px;border-radius:4px}
.video-thumbnail.video-missing{background:var(--surface-soft);color:var(--muted);font-size:12px;cursor:default;border:1px dashed var(--line)}
.post-card .video-info h3{font-size:14px;font-weight:650;line-height:1.4;margin:8px 0 2px;letter-spacing:-.015em}
.post-card .video-info p{font-size:12px;line-height:1.4;margin:0;color:var(--muted)}
.video-meta{display:flex;flex-wrap:wrap;align-items:center;gap:3px 8px;margin-top:3px;font-size:11px;line-height:1.4;color:var(--muted)}
.video-meta a{font-size:10px;color:var(--muted);text-decoration:none;margin-left:auto;white-space:nowrap}
.video-meta a:hover{color:var(--accent)}
.journal-player{margin-bottom:16px;background:var(--surface-soft);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.journal-player iframe{display:block;width:100%;aspect-ratio:16/9;min-height:200px;border:0;background:#000}
.journal-player-bar{display:flex;align-items:center;gap:12px;padding:8px 10px;font-size:13px}
.journal-player-bar strong{flex:1;min-width:0}
.journal-player-bar button{font-size:11px;padding:4px 7px;white-space:nowrap}
.journal-player>a{display:block;font-size:11px;color:var(--muted);padding:7px 10px}
.music-editor-toolbar{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.music-editor-toolbar button{font-size:12px;padding:5px 8px}
.music-edit-row{display:grid;grid-template-columns:1fr 1.3fr auto;gap:7px 10px;padding:10px 0;border-top:1px solid var(--line);align-items:center}
.music-edit-row .form-field{margin:0;gap:4px;font-size:11px}
.music-edit-row input{padding:7px 8px;font-size:13px}
.music-remove{font-size:11px;padding:5px 7px;margin-top:18px}
.music-edit-extras{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:7px 10px}
.music-edit-extras>.form-field{flex:1;min-width:180px}
.music-edit-extras>button{font-size:11px;padding:5px 7px;margin-top:14px}
.music-genres-editor{position:relative;font-size:12px;margin:7px 0}
.music-genres-editor summary{cursor:pointer;font-size:12px;color:var(--muted)}
.music-genres-editor[open]{flex-basis:100%;width:100%}
.music-genres-editor>input{margin:8px 0;width:100%;box-sizing:border-box;padding:7px;border:1px solid var(--line);background:var(--surface-soft);color:var(--text);border-radius:5px}
.music-genre-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:3px 10px;max-height:190px;overflow:auto;padding:5px 0}
.music-genre-options label{display:flex;align-items:center;gap:7px;min-width:0;font-size:11px;line-height:1.35;min-height:25px}
.music-genre-options input{width:13px;height:13px;margin:0;flex:0 0 13px}
@media(max-width:760px){.music-video-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}.post-card .video-info h3{font-size:13px}.video-meta{font-size:10px}.video-meta a{margin-left:0}.music-edit-row{grid-template-columns:1fr 1fr auto}}
@media(max-width:420px){.music-video-grid{grid-template-columns:1fr}.music-edit-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}}
/* Journal composer: a compact, reversible disclosure; uploads share post access. */
.composer-disclosure{border:1px solid var(--line);border-radius:12px;background:var(--surface);margin:0 0 22px}
.composer-summary{display:flex;align-items:center;gap:12px;padding:16px 20px;cursor:pointer;list-style:none}
.composer-summary::-webkit-details-marker{display:none}
.composer-summary-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--surface-soft);color:var(--accent);font-size:24px;flex-shrink:0}
.composer-summary strong{display:block;font-size:15px;line-height:1.5}
.composer-summary small{display:block;font-size:12px;color:var(--muted);line-height:1.5}
.composer-summary:hover{background:var(--surface-soft);border-radius:12px}
.composer-summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.composer-disclosure[open]>.composer-summary{border-bottom:1px solid var(--line)}
.composer-disclosure[open] .composer-summary-icon{transform:rotate(45deg)}
.composer-disclosure .journal-composer{border:0;margin:0;background:transparent;box-shadow:none}
.composer-disclosure .journal-composer>h1{display:none}
.image-editor{border-top:1px solid var(--line);padding-top:14px;margin-top:8px}
.image-editor-bar{display:flex;align-items:center;gap:10px}.image-editor-bar h2{font-size:14px;margin:0 auto 0 0}.image-editor-bar small{color:var(--muted);font-size:11px}
.image-editor-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.image-edit-card{min-width:0}.image-edit-card>img{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;background:var(--surface-soft);border-radius:7px}
.image-edit-actions{display:flex;gap:5px;margin-top:5px}.image-edit-actions button{padding:3px 8px;font-size:11px}.image-edit-actions button:last-child{margin-left:auto}
/* Attached photos lead the media area; videos retain their independent grid. */
.journal-images{width:100%;margin:14px 0 12px}
.image-collage{display:grid;width:100%;gap:4px;border-radius:10px;overflow:hidden;background:var(--surface-soft);isolation:isolate}
.image-collage[data-count="1"]{display:block}
.image-collage[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr));aspect-ratio:4/3}
.image-collage[data-count="3"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:3fr 2fr;aspect-ratio:6/5}
.image-collage[data-count="3"]>.image-thumbnail:first-child{grid-column:1/-1}
.image-collage[data-count="3"].image-collage-portrait{grid-template-rows:repeat(2,minmax(0,1fr));aspect-ratio:4/3}
.image-collage[data-count="3"].image-collage-portrait>.image-thumbnail:first-child{grid-column:1;grid-row:1/3}
.image-collage[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));aspect-ratio:4/3}
.image-collage[data-count="5"]{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:3fr 2fr;aspect-ratio:6/5}
.image-collage[data-count="5"]>.image-thumbnail{grid-column:span 2}
.image-collage[data-count="5"]>.image-thumbnail:nth-child(-n+2){grid-column:span 3}
.image-thumbnail{position:relative;display:block;min-width:0;min-height:0;width:100%;height:100%;padding:0;border:0;border-radius:0;overflow:hidden;background:var(--surface-soft);cursor:zoom-in}
.image-thumbnail img{display:block;width:100%;height:100%;object-fit:cover;transition:filter .15s ease}
.image-thumbnail:hover img{filter:brightness(.9)}
.image-thumbnail:focus-visible{outline:3px solid var(--accent);outline-offset:-3px;z-index:1}
.image-collage[data-count="1"] .image-thumbnail{height:auto}
.image-collage[data-count="1"] img{height:auto;max-height:800px;max-height:min(800px,85svh);object-fit:contain}
.image-thumbnail-error{display:grid;place-items:center;min-height:160px;padding:12px;box-sizing:border-box;color:var(--muted);font-size:12px}
.image-overflow{position:absolute;inset:0;display:grid;place-items:center;background:#0009;color:#fff;font-size:clamp(22px,4vw,42px);font-weight:650;line-height:1;text-shadow:0 1px 8px #0005}
body.image-viewer-open{overflow:hidden}
.image-lightbox{position:fixed;inset:0;box-sizing:border-box;width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#101012;color:#fff;overflow:hidden}
.image-lightbox[open]{display:flex;flex-direction:column}
.image-lightbox::backdrop{background:#101012}
.image-lightbox-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;padding-top:max(12px,env(safe-area-inset-top));padding-right:max(20px,env(safe-area-inset-right));flex-shrink:0;min-height:36px;font-size:13px;color:#eee}
.image-lightbox button{color:#fff;background:#ffffff16;border:1px solid #ffffff30;border-radius:999px;min-height:40px;padding:8px 16px;cursor:pointer}
.image-lightbox button:hover{background:#ffffff28}
.image-lightbox button:focus-visible{outline:2px solid #b7cbff;outline-offset:3px}
.image-lightbox-stage{position:relative;display:grid;place-items:center;flex:1;min-height:0;padding:0 76px max(16px,env(safe-area-inset-bottom));touch-action:pan-y pinch-zoom}
.image-lightbox-stage>img{display:block;max-width:100%;max-height:100%;width:100%;height:100%;min-height:0;object-fit:contain;user-select:none}
.image-lightbox-status{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;color:#ddd;font-size:13px;text-align:center}
.image-lightbox .image-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:44px;padding:0;font-size:32px;line-height:1}
.image-lightbox-prev{left:16px}.image-lightbox-next{right:16px}
.image-lightbox-nav:disabled{opacity:.2;cursor:default}
@media(max-width:600px){
 .image-collage{gap:3px;border-radius:7px}
 .image-lightbox-bar{padding-left:14px;padding-right:14px}
 .image-lightbox-stage{padding-left:0;padding-right:0}
 .image-lightbox .image-lightbox-nav{width:38px;height:38px;background:#101012a6;top:auto;bottom:max(16px,env(safe-area-inset-bottom));transform:none}
 .image-lightbox-prev{left:12px}.image-lightbox-next{right:12px}
}
@media(max-width:600px){.composer-summary{padding:13px 14px}.image-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.composer-always-open>.composer-summary{display:none}.composer-always-open .journal-composer>h1{display:block}

/* Journal-first: discoveries lead the Feed; the complete atlas has its own route. */
body.member-view[data-view="feed"] .community,
body.member-view[data-view="mine"] .community { max-width:1120px; margin-top:28px; }
#feed-intro { margin:0 0 23px; }
#feed-intro .discovery-kicker { margin:0 0 7px; }
#feed-intro h1 { font-size:28px; line-height:1.3; font-weight:700; letter-spacing:-.045em; margin:0; }
#feed-intro p { max-width:680px; margin:7px 0 0; color:var(--muted); font-size:13px; line-height:1.6; }
#feed-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:30px; align-items:start; }
#feed-main { min-width:0; }
#feed-layout:has(>#discovery-sidebar[hidden]) { grid-template-columns:minmax(0,1fr); }
#write-journal { flex:0 0 auto; padding:7px 13px; border-radius:999px; border-color:var(--primary); background:var(--primary); color:var(--on-primary); font-size:12px; font-weight:600; white-space:nowrap; }
#write-journal:hover { filter:brightness(1.08); }
#map-navigation { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:16px 0 3px; color:var(--muted); font-size:12px; }
#map-back { padding:5px 8px; background:transparent; font-size:12px; }
#refresh-feed { display:block; width:100%; padding:10px 14px; margin:0 0 14px; border:1px solid var(--line); border-radius:8px; background:var(--accent-soft); color:var(--accent); font-size:12px; font-weight:600; }
#refresh-feed:hover { border-color:var(--accent); }
#feed-filters { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin:0 0 16px; padding:0 0 11px; border-bottom:1px solid var(--line); }
#feed-filters button { border:0; border-radius:7px; padding:7px 10px; background:transparent; color:var(--muted); font-size:12px; line-height:1.4; }
#feed-filters button:hover { color:var(--text); background:var(--surface-soft); }
#feed-filters button.active,
#feed-filters button[aria-pressed="true"] { color:var(--accent); background:var(--accent-soft); font-weight:650; }
body[data-view="feed"] #feed-main>.feed-heading { gap:12px; margin:0; padding:0; border:0; }
/* Keep the list heading available to assistive technology without repeating the intro. */
body.member-view[data-view="feed"] #feed-title { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body[data-view="feed"] #clear-genre { font-size:11px; padding:4px 9px; border-radius:999px; }
body[data-view="feed"] .post-card { padding:19px 20px 13px; margin-bottom:15px; border-radius:12px; }
body[data-view="feed"] .post-top { gap:9px; margin-bottom:10px; }
body[data-view="feed"] .post-top strong { font-size:12px; }
body[data-view="feed"] .post-top small { margin-top:2px; font-size:10px; }
body[data-view="feed"] .post-options button { padding:4px 6px; font-size:11px; }
body[data-view="feed"] .post-card h2 { margin:9px 0 8px; font-size:20px; line-height:1.4; font-weight:650; letter-spacing:-.035em; }
body[data-view="feed"] .post-body,
body[data-view="feed"] .legacy-post p,
body[data-view="feed"] .post-preview p { font-size:13px; line-height:1.75; }
body[data-view="feed"] .post-preview p { color:var(--muted); margin:7px 0 3px; }
body[data-view="feed"] .post-content { min-width:0; }
.post-expand, .music-expand { border:0; background:transparent; padding:5px 0; margin:4px 0 1px; color:var(--muted); font-size:12px; font-weight:550; line-height:1.5; text-align:left; }
.post-expand:hover, .music-expand:hover { background:transparent; color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
body[data-view="feed"] .journal-music { margin-top:13px; }
/* Three compact video columns apply to every journal route, independently of image attachments. */
.post-card .journal-music>.music-video-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px 12px; }
body[data-view="feed"] .post-card .video-info h3 { margin:7px 0 2px; font-size:13px; }
body[data-view="feed"] .post-card .video-info p { font-size:11px; }
body[data-view="feed"] .video-meta { font-size:10px; gap:3px 6px; }
body[data-view="feed"] .post-card>.genre-chips { margin:11px 0 8px; gap:5px; }
body[data-view="feed"] .post-card>.genre-chips button { padding:3px 8px; font-size:10px; line-height:1.5; }
body[data-view="feed"] .post-actions { flex-wrap:wrap; gap:5px; padding-top:9px; margin-top:13px; }
body[data-view="feed"] .post-actions button { padding:4px 7px; color:var(--muted); font-size:11px; }
body[data-view="feed"] .post-actions button:hover,
body[data-view="feed"] .post-actions button[aria-pressed="true"] { color:var(--accent); }
.post-actions .save-journal { order:1; margin-left:auto; }
.post-actions .mark-read:disabled { opacity:.6; cursor:default; background:transparent; }
.post-unread { display:inline-flex; align-items:center; gap:4px; color:var(--accent); font-size:10px; font-weight:600; }
.post-unread::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
#discovery-sidebar { min-width:0; margin:0; padding:0; border:0; color:var(--text); }
.discovery-section { padding:2px 0 22px; margin:0 0 22px; border-bottom:1px solid var(--line); }
.discovery-section:last-child { border-bottom:0; margin-bottom:0; }
.discovery-kicker { display:block; margin:0 0 9px; font-size:10px; line-height:1.5; font-weight:650; letter-spacing:.11em; color:var(--muted); }
#discovery-sidebar h2, #discovery-sidebar h3 { margin:0 0 10px; font-size:16px; font-weight:650; line-height:1.5; letter-spacing:-.03em; }
#discovery-sidebar p, .discovery-empty { margin:9px 0 12px; color:var(--muted); font-size:12px; line-height:1.7; }
#discovery-sidebar button { font-size:12px; }
.discovery-section>button { padding:6px 9px; }
.discovery-map { position:relative; display:flex; align-items:center; justify-content:space-between; gap:5px; min-height:115px; margin:13px 0; padding:14px 11px; overflow:hidden; border:1px solid var(--line); border-radius:9px; background:linear-gradient(90deg,transparent 32%,var(--line) 32.3%,transparent 32.7%,transparent 66%,var(--line) 66.3%,transparent 66.7%),linear-gradient(0deg,transparent 49%,var(--line) 49.5%,transparent 50%),var(--surface-soft); }
.discovery-map::before { content:""; position:absolute; height:1px; left:20px; right:20px; top:50%; background:var(--line-strong); transform:rotate(19deg); }
.discovery-map>button, .discovery-map>span { position:relative; z-index:1; padding:4px 7px; border:1px solid var(--line-strong); border-radius:999px; background:var(--panel); color:var(--text); font-size:10px; line-height:1.3; white-space:nowrap; }
.discovery-map>:first-child { align-self:flex-start; }
.discovery-map>:last-child { align-self:flex-end; }
.discovery-map>button:hover { border-color:var(--accent); color:var(--accent); }
.discovery-list { margin:0; padding:0; list-style:none; }
.discovery-list>li, .discovery-list>.discovery-item { display:flex; align-items:center; gap:9px; min-width:0; padding:10px 0; border-bottom:1px solid var(--line); }
.discovery-list>li:last-child, .discovery-list>.discovery-item:last-child { border-bottom:0; }
.discovery-saved-item { min-width:0; padding:11px 0; border-bottom:1px solid var(--line); }
.discovery-saved-item:last-child { border-bottom:0; }
.discovery-saved-item>button { display:block; width:100%; font-size:12px; font-weight:550; line-height:1.6; overflow-wrap:anywhere; }
.discovery-list button { min-width:0; padding:0; border:0; background:transparent; text-align:left; color:var(--text); line-height:1.5; }
.discovery-list button:hover { color:var(--accent); background:transparent; }
.discovery-list strong { display:block; min-width:0; font-size:12px; font-weight:550; line-height:1.5; }
.discovery-list small { display:block; color:var(--muted); font-size:10px; line-height:1.5; margin-top:2px; }
.discovery-list .discovery-number { flex:0 0 20px; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.discovery-list img { display:block; flex:0 0 62px; width:62px; height:35px; object-fit:cover; border-radius:5px; }
.composer-disclosure { background:var(--panel); }
body[data-view="feed"] .composer-disclosure { margin-bottom:18px; }
body[data-view="feed"] .composer-summary { padding:14px 17px; }
body[data-view="feed"] .composer-summary strong { font-size:13px; }
body[data-view="feed"] .composer-summary small { font-size:11px; }
body[data-view="mine"] #feed-layout { grid-template-columns:minmax(0,1fr); }
body.member-view[data-view="mine"] .community { max-width:900px; }
@media (min-width:761px) and (max-width:1100px) {
  .site-header { gap:10px; }
  .site-header .theme-switch button>span { display:none; }
  .site-header .theme-switch svg { display:block; }
  .site-header .theme-switch button { padding:6px; }
  .gnb button { padding:8px 9px; }
  #feed-layout { grid-template-columns:minmax(0,1fr) 230px; gap:22px; }
  .discovery-map { padding:12px 7px; }
  .discovery-map>button, .discovery-map>span { padding:4px 5px; font-size:9px; }
}
@media (max-width:900px) {
  #feed-layout { grid-template-columns:minmax(0,1fr); gap:24px; }
  #discovery-sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; padding-top:20px; border-top:1px solid var(--line); }
  .discovery-section { margin:0; padding:0 0 15px; }
  .discovery-section:last-child { grid-column:1/-1; }
}
@media (max-width:760px) {
  .gnb { grid-column:1 / 3; grid-row:2; justify-content:flex-start; gap:2px; }
  .gnb button { padding:8px; font-size:12px; }
  .theme-switch { grid-column:3; grid-row:2; justify-self:end; }
  .theme-switch button { padding:5px; }
  .theme-switch button>span { display:none; }
  .theme-switch svg { display:block; }
  .site-header { gap:7px 8px; }
  /* The same writing action remains first in the Feed and My Journal. */
  #write-journal { display:none; }
  #map-navigation { gap:8px; margin-top:13px; font-size:11px; }
  body.member-view[data-view="feed"] .community, body.member-view[data-view="mine"] .community { margin-top:21px; }
  #feed-intro { margin-bottom:18px; }
  #feed-intro h1 { font-size:23px; }
  #feed-intro p { font-size:12px; }
  #feed-filters { gap:3px; margin-bottom:13px; }
  #feed-filters button { padding:7px 9px; font-size:11px; }
  body[data-view="feed"] .post-card { padding:15px 14px 10px; margin-bottom:12px; }
  body[data-view="feed"] .post-card h2 { font-size:18px; }
  body[data-view="feed"] .post-body, body[data-view="feed"] .legacy-post p, body[data-view="feed"] .post-preview p { font-size:13px; line-height:1.7; }
  .post-card .journal-music>.music-video-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 9px; }
  body[data-view="feed"] .post-card .video-info h3 { font-size:12px; }
  body[data-view="feed"] .video-meta a { margin-left:0; }
  #discovery-sidebar { gap:15px; }
}
@media (max-width:480px) {
  #discovery-sidebar { grid-template-columns:minmax(0,1fr); }
  #discovery-sidebar .discovery-map { max-width:300px; }
  body[data-view="feed"] .post-options { gap:2px; }
  body[data-view="feed"] .post-options button { padding:4px; font-size:10px; }
  body[data-view="feed"] .post-actions button { padding:5px; }
  body[data-view="feed"] .music-video-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}


/* The visitor Feed introduces the real atlas and the journal community. */
#visitor-landing { max-width:1120px; margin:36px auto 42px; }
.landing-hero { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); align-items:center; gap:40px; }
.landing-copy, .landing-visual { min-width:0; }
.landing-copy .discovery-kicker { color:var(--accent); margin-bottom:14px; }
.landing-copy h1 { margin:0 0 18px; font-size:clamp(30px,3.25vw,42px); font-weight:750; line-height:1.2; letter-spacing:-.055em; text-wrap:balance; overflow-wrap:anywhere; }
.landing-copy>p { max-width:37em; margin:0; color:var(--muted); font-size:14px; line-height:1.8; text-wrap:pretty; }
.landing-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:23px; }
.landing-actions button { padding:9px 15px; border-radius:999px; font-size:12px; line-height:1.5; white-space:nowrap; }
.landing-actions button:not(.primary) { background:transparent; }
.landing-actions button:not(.primary):hover { background:var(--surface-soft); }
.landing-access { display:block; max-width:36em; margin-top:13px; color:var(--muted); font-size:11px; line-height:1.65; }
.landing-map-card { display:block; width:100%; padding:0; overflow:hidden; border:1px solid var(--line-strong); border-radius:13px; background:var(--map-bg); text-align:left; box-shadow:0 8px 24px var(--shadow); }
.landing-map-card:hover { background:var(--map-bg); border-color:var(--accent); }
.landing-map-card:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
#landing-map-art { padding:12px 12px 0; aspect-ratio:3240/2413; width:100%; overflow:hidden; pointer-events:none; }
#landing-map-art .landing-overview { width:100%; height:100%; min-width:0; display:block; }
#landing-map-art .node.dim { opacity:1; }
#landing-map-art .node { cursor:inherit; }
#landing-map-art .node text { stroke-width:3px; }
/* Scaled overview needs stronger marks than the full-size interactive explorer. */
#landing-map-art path { stroke-width:3px; opacity:.48; }
#landing-map-art .node>line { stroke-width:6px; opacity:.55; }
#landing-map-art .node>circle[r="5"],
#landing-map-art .node>circle[r="3.5"] { r:7px; stroke-width:2.5px; opacity:1; }
#landing-map-art .node>circle[opacity] { opacity:.15; }
.landing-map-caption { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:5px 12px; padding:12px 15px; border-top:1px solid var(--line); background:var(--panel); }
.landing-map-caption strong { font-size:12px; font-weight:650; line-height:1.5; }
.landing-map-caption span { color:var(--accent); font-size:11px; line-height:1.5; }
.landing-map-note { margin:8px 2px 0; color:var(--muted); font-size:10px; line-height:1.6; }
.landing-features { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; margin-top:36px; padding-top:23px; border-top:1px solid var(--line); }
.landing-features article { min-width:0; }
.landing-features article>span { display:block; margin-bottom:8px; color:var(--accent); font-size:10px; font-weight:650; letter-spacing:.08em; font-variant-numeric:tabular-nums; }
.landing-features h2 { margin:0 0 7px; font-size:15px; font-weight:650; line-height:1.5; letter-spacing:-.025em; }
.landing-features p { margin:0; color:var(--muted); font-size:12px; line-height:1.75; text-wrap:pretty; }
@media (max-width:1000px) {
  .landing-hero { gap:26px; }
  .landing-copy h1 { font-size:32px; }
  .landing-copy>p { font-size:13px; }
  .landing-actions { gap:6px; }
  .landing-actions button { padding:8px 12px; }
}
@media (max-width:760px) {
  #visitor-landing { margin-top:25px; margin-bottom:30px; }
  .landing-hero { grid-template-columns:minmax(0,1fr); gap:24px; }
  .landing-copy { max-width:600px; }
  .landing-copy .discovery-kicker { margin-bottom:10px; }
  .landing-copy h1 { max-width:18em; margin-bottom:12px; font-size:31px; }
  .landing-copy>p { max-width:44em; line-height:1.75; }
  .landing-actions { margin-top:18px; }
  .landing-access { max-width:none; margin-top:10px; }
  .landing-visual { max-width:600px; width:100%; justify-self:center; }
  .landing-features { gap:20px; margin-top:26px; padding-top:20px; }
  .landing-features h2 { font-size:14px; }
  .landing-features p { font-size:11px; }
}
@media (max-width:480px) {
  .site-header .gnb { gap:0; }
  .site-header .gnb button { padding:8px 6px; font-size:11px; }
  .site-header .theme-switch { gap:1px; padding:2px; }
  .site-header .theme-switch button { padding:4px; }
  .landing-copy h1 { font-size:29px; }
  .landing-actions button { padding:9px 12px; font-size:11px; }
  #landing-map-art { padding:7px 7px 0; }
  .landing-map-caption { padding:10px 12px; }
  .landing-features { grid-template-columns:minmax(0,1fr); gap:18px; }
  .landing-features article { display:block; }
  .landing-features article>span { margin:0 0 5px; font-size:9px; }
  .landing-features h2 { margin-bottom:4px; }
  .landing-features p { font-size:12px; }
}
@media (max-width:360px) {
  .post-card .journal-music>.music-video-grid { grid-template-columns:minmax(0,1fr); }
  .site-header .gnb button { padding:8px 4px; font-size:10px; }
}

/* Genre Explorer shares journal video cards, with two columns in the narrow detail panel. */
.map-column>.map-scope-note { margin: -3px 0 10px var(--map-gutter); font-size:12px; line-height:1.5; }
.toolbar .segmented { flex-shrink:0; }
.toolbar .segmented button { white-space:nowrap; padding:7px 11px; }
#detail .map-artist { display:block; padding:12px; margin:12px 0; }
#detail .map-artist+.map-artist { margin-top:14px; }
#detail .map-artist-content { min-width:0; }
#detail .map-artist .artist-name { padding-right:24px; margin:0 0 5px; font-size:16px; }
#detail .map-artist .journal-music { margin-top:10px; }
#detail .music-video-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 9px; }
#detail .video-info h3 { margin:6px 0 2px; font-size:13px; line-height:1.4; letter-spacing:0; }
#detail .video-info p { margin:3px 0; font-size:11px; line-height:1.45; }
#detail .video-info .video-artist { display:none; }
#detail .video-meta { font-size:10px; gap:3px 6px; }
#detail .video-meta a { margin-left:0; }
#detail .video-play { width:32px; height:24px; font-size:11px; }
#detail .journal-player iframe { min-height:0; }
#detail .journal-player-bar { font-size:12px; gap:7px; padding:7px; }
#detail .map-empty { font-size:13px; }
@media(max-width:760px) { .toolbar { flex-wrap:wrap; } .toolbar .search { flex:1; min-width:160px; } }

/* Genre background is secondary to the listening cards. */
#detail .genre-explanation { margin:10px 0 0; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); }
#detail .genre-explanation>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; font-size:12px; font-weight:600; line-height:1.5; cursor:pointer; list-style:none; }
#detail .genre-explanation>summary::-webkit-details-marker { display:none; }
#detail .genre-explanation>summary::after { content:''; width:7px; height:7px; flex-shrink:0; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg) translateY(-2px); color:var(--muted); }
#detail .genre-explanation[open]>summary::after { transform:rotate(225deg) translate(-2px,-1px); }
#detail .genre-explanation>summary:hover { color:var(--accent); }
#detail .genre-explanation-body { padding:10px 12px; border-top:1px solid var(--line); }
#detail .genre-explanation-body>.timeline-label { margin-top:12px; }
#detail .genre-explanation-body>.detail-note:last-child { margin-bottom:0; }

/* Comments share the same compact type scale and theme tokens as journal cards. */
.comments .comment-thread { padding:10px 0; border-bottom:1px solid var(--line); }
.comments .comment { padding:0; margin:0; border:0; position:relative; min-width:0; }
.comment-meta { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; font-size:12px; }
.comment-meta time,.comment-meta small { color:var(--muted); font-size:10px; }
.comments .comment p { margin:5px 0; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.comments .comment-actions { display:flex; gap:12px; margin-top:4px; }
.comments .comment button { position:static; }
.comments .comment-actions button { padding:2px 0; border:0; background:none; font-size:11px; color:var(--muted); }
.comments .comment-actions button:hover { color:var(--accent); }
.comment-replies { margin:10px 0 0 14px; padding-left:14px; border-left:2px solid var(--line); display:grid; gap:12px; }
.comments .comment-deleted { color:var(--muted); font-style:italic; }
.comment-editor { margin-top:8px; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); }
.comment-editor .form-field,.comment-form .form-field { margin:0; flex:1; min-width:0; font-size:11px; }
.comment-editor textarea,.comment-form textarea { font-size:13px; line-height:1.6; min-height:64px; margin-top:5px; }
.comment-editor-actions { display:flex; gap:8px; margin-top:8px; }
.comments .comment-editor-actions button,.comments-more { font-size:11px; padding:5px 10px; }
.comment.is-editing>.comment-body,.comment.is-editing>.translation-control { display:none; }
.comment-delete-confirm { display:flex; align-items:center; gap:8px; margin-top:6px; color:var(--muted); font-size:12px; }
.comments .comment-form { margin-top:12px; align-items:flex-end; }
.comments-more { margin:10px 0 0; }
.member-mention { color:var(--accent); background:var(--accent-soft); border-radius:3px; padding:0 2px; font-weight:600; overflow-wrap:anywhere; }
.mention-field { position:relative; }
.mention-menu { position:absolute; top:100%; left:0; z-index:30; width:min(320px,100%); max-height:210px; overflow:auto; overscroll-behavior:contain; padding:4px; border:1px solid var(--line-strong); border-radius:8px; background:var(--panel); color:var(--muted); box-shadow:0 8px 22px var(--shadow); font-size:12px; }
.mention-menu button,.comments .mention-menu button { display:block; width:100%; text-align:left; white-space:normal; overflow-wrap:anywhere; padding:7px 9px; border:0; border-radius:4px; background:transparent; color:var(--text); font-size:12px; }
.mention-menu button[aria-selected=true],.mention-menu button:hover { background:var(--accent-soft); color:var(--accent); }
@media(max-width:520px){.comment-replies{margin-left:6px;padding-left:10px}.comment-editor{padding:8px}.comment-meta{gap:6px}}

/* Member inbox shares the header's compact controls; the browser dialog keeps it above players. */
.header-actions { display:flex; align-items:center; gap:7px; }
.notification-button { position:relative; display:grid; place-items:center; width:34px; height:34px; padding:6px; border:0; border-radius:50%; background:transparent; flex-shrink:0; }
.notification-button svg { width:21px; height:21px; }
.notification-button:hover { background:var(--surface-hover); }
.notification-badge { position:absolute; top:-3px; right:-5px; min-width:16px; height:16px; padding:0 4px; border-radius:10px; background:var(--accent); color:var(--panel); font-size:10px; line-height:16px; font-weight:700; }
.notifications-panel { position:fixed; inset:74px 16px auto auto; margin:0; width:min(390px,calc(100vw - 24px)); max-height:calc(100svh - 90px); padding:0; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 40px var(--shadow); overflow:auto; overscroll-behavior:contain; }
.notifications-panel::backdrop { background:rgba(0,0,0,.12); }
.notifications-heading { display:flex; align-items:center; justify-content:space-between; padding:13px 15px 5px; }
.notifications-heading h2 { font-size:16px; margin:0; }
.notifications-heading button { position:static; font-size:23px; padding:0 5px; border:0; background:transparent; }
.notifications-tools { display:flex; gap:12px; padding:0 15px 9px; border-bottom:1px solid var(--line); }
.notifications-tools button { background:transparent; border:0; padding:3px 0; font-size:11px; color:var(--muted); }
.notifications-tools button:hover { color:var(--accent); }
.notification-item { width:100%; display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:var(--panel); text-align:left; }
.notification-item.is-unread { background:var(--accent-soft); }
.notification-item:hover { background:var(--surface-hover); }
.notification-item .avatar { flex:0 0 28px; height:28px; margin-top:2px; }
.notification-copy { display:flex; flex-direction:column; gap:4px; min-width:0; flex:1; font-size:12px; line-height:1.5; }
.notification-label { color:var(--text); }
.notification-title { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.notification-preview { color:var(--muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.notification-time { color:var(--muted); font-size:10px; }
.notification-status { margin:0; padding:12px 15px; font-size:12px; line-height:1.6; color:var(--muted); }
.notification-status:empty { display:none; }
.notifications-more { display:block; width:100%; padding:12px; border:0; border-radius:0; font-size:12px; }
.notification-back { margin:0 0 12px; font-size:12px; }
.notification-target { outline:2px solid var(--accent); outline-offset:3px; scroll-margin-top:90px; }
.like-control { position:relative; display:inline-flex; }
.like-tooltip { position:absolute; bottom:calc(100% + 6px); left:0; z-index:20; display:flex; flex-direction:column; gap:5px; width:max-content; min-width:120px; max-width:min(250px,70vw); max-height:220px; overflow:auto; padding:10px 12px; border-radius:8px; border:1px solid var(--line); background:var(--panel); box-shadow:0 4px 18px var(--shadow); color:var(--text); font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.like-tooltip strong { color:var(--muted); font-size:10px; padding-bottom:3px; }
@media(max-width:600px){.notifications-panel { inset:10px 12px auto; max-height:calc(100svh - 20px); width:auto; }.header-actions{gap:4px}.notification-button{width:30px;height:30px}}
#feed-status:has(.notification-back) { padding:0; border:0; background:transparent; }
@media(max-width:700px){
  .header-actions { flex-wrap:wrap; justify-content:flex-end; max-width:108px; }
  .header-actions .approval-button { flex-basis:100%; padding:3px 5px; font-size:10px; }
}
/* The preview and published journal share one explicit media order. */
.release-year{font-weight:400;color:var(--muted);white-space:nowrap;font-size:.9em}
.music-order-editor{margin-top:16px;border-top:1px solid var(--line);padding-top:12px}
.music-order-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}
.music-order-toolbar h3{font-size:14px;margin:0}
.music-order-toolbar button,.music-order-actions button{padding:5px 9px;font-size:12px}
.music-order-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:10px}
.music-order-card{min-width:0;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:var(--panel);cursor:grab}
.music-order-card.is-dragging{opacity:.45}
.music-order-card img,.music-order-placeholder{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}
.music-order-placeholder{display:grid;place-items:center;font-size:12px;background:var(--surface-soft)}
.music-order-card h4{font-size:13px;line-height:1.35;margin:8px 8px 3px;overflow-wrap:anywhere}
.music-order-card p{font-size:12px;margin:0 8px 8px;color:var(--muted)}
.music-order-actions{display:flex;gap:6px;margin:8px}
.music-order-actions button{flex:1;min-width:0;white-space:nowrap}
.music-order-status{display:block;font-size:12px;color:var(--muted);margin-top:6px}
@media(max-width:540px){.music-order-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* One compact card owns ordering, editing and removal. */
.music-order-grid{align-items:start}
.music-order-card{cursor:default}
.music-card-cover{cursor:grab}
.music-card-tags{display:flex;flex-wrap:wrap;gap:3px;margin:6px 8px}
.music-card-tags:empty{display:none}
.music-card-tags span{font-size:10px;color:var(--muted);background:var(--surface-soft);padding:2px 5px;border-radius:4px}
.music-order-actions{gap:4px;flex-wrap:wrap}
.music-order-actions button{font-size:12px;padding:5px 6px;flex:1 0 auto}
.music-order-actions .music-card-remove{color:var(--muted)}
.music-card-editor{padding:10px;border-top:1px solid var(--line);background:var(--surface-soft)}
.music-card-editor .form-field{font-size:12px;margin:0 0 8px;gap:3px}
.music-card-editor input{width:100%;min-width:0;font-size:13px;padding:7px 8px;box-sizing:border-box}
.music-card-editor .music-genre-options{grid-template-columns:1fr;max-height:180px}
.music-card-editor .music-genre-options input{width:13px;padding:0}
.music-card-verify{font-size:12px;padding:5px 8px}
.music-context-genres{font-size:12px;color:var(--muted);margin:8px 0}
.music-context-genres>summary{cursor:pointer}
.music-order-editor{margin-top:10px;padding-top:10px}
@media(max-width:540px){.music-card-editor input{font-size:16px}.music-order-actions button{flex-basis:40%;min-height:32px}}

.music-card-autofill{display:grid;gap:6px;padding-bottom:2px}.music-card-autofill>.music-card-verify{justify-self:start;font-weight:600}.music-card-lookup-status{display:flex;align-items:flex-start;gap:6px;font-size:12px;line-height:1.4;color:var(--muted)}.music-card-lookup-status .ai-draft-spinner{display:block;flex:0 0 12px;width:12px;height:12px;margin-top:2px}

/* Keep discovery actions and their feedback together. */
.music-editor-toolbar{display:grid;grid-template-columns:1.35fr 1fr 1.15fr;gap:10px;align-items:start}
.music-action{display:grid;gap:6px;min-width:0}.music-action button{justify-self:start}.music-action small{font-size:12px;line-height:1.45;color:var(--muted)}
.music-action button[aria-busy="true"]{opacity:1;cursor:wait}.music-action-status{margin:10px 0;padding:10px}.music-action-status[data-state="error"],.music-action-status[data-state="warning"]{border-color:var(--line-strong)}
.music-remap-confirm{padding:10px;margin:10px 0;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface-soft);font-size:13px;line-height:1.5}.music-remap-confirm[hidden]{display:none}.music-remap-confirm p{margin:0 0 8px}.music-remap-confirm>div{display:flex;gap:8px}.music-remap-confirm button{font-size:12px;padding:6px 10px}
@media(max-width:540px){.music-editor-toolbar{grid-template-columns:1fr 1fr}.music-action:first-child{grid-column:1/-1}}

.music-album-choice{display:grid;gap:8px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}.music-album-choice strong{font-size:14px;line-height:1.4}.music-album-choice a{font-size:12px;color:var(--muted)}.music-album-choice label{display:grid;gap:5px}.music-album-choice select{width:100%;min-width:0;padding:8px;border:1px solid var(--line-strong);border-radius:6px;background:var(--panel);color:var(--text);font:inherit}.music-card-lookup-status{font-size:14px;line-height:1.5}
