:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #1c1f26;
    --muted: #6b7280;
    --border: #e2e4e9;
    --accent: #3f6fd8;
    --accent-2: #16a394;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14161c;
        --panel: #1c1f27;
        --text: #eceef2;
        --muted: #9aa1ac;
        --border: #2b2f3a;
        --accent: #6f93e6;
        --accent-2: #34c9b6;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: env(safe-area-inset-bottom);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top));
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
}

.disc-icon {
    width: 1.1em;
    height: 1.1em;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--bg) 0 15%, transparent 16%),
        conic-gradient(var(--accent), var(--accent-2), var(--accent));
    display: inline-block;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.topbar nav a:hover { color: var(--accent); }

.nav-menu { position: relative; }

.nav-menu-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    line-height: 1;
}

.nav-menu-btn:hover { color: var(--accent); }

.gear-icon { font-size: 1.15rem; }

.nav-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem;
    min-width: 9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.nav-menu-dropdown.open { display: flex; flex-direction: column; }

.nav-menu-dropdown a {
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.nav-menu-dropdown a:hover { background: var(--bg); }

.nav-menu-dropdown button.link-btn {
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

.nav-menu-dropdown button.link-btn:hover { background: var(--bg); opacity: 1; }

.content {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem;
}

h1 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }
h2 { font-size: 1rem; margin: 0 0 0.5rem; }

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

fieldset {
    border: none;
    border-top: 1px solid var(--border);
    padding: 0.75rem 0;
    margin: 0 0 0.5rem;
}

fieldset legend {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0 0.25rem;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

label.checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

input[type="text"], input[type="password"], select {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}

button:hover { opacity: 0.9; }
button.danger { background: #d64545; }

.flash {
    color: var(--accent-2);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

.hint {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0;
}

.catalog-overview {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 1rem;
}

.catalog-header-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
}

.catalog-header-info {
    flex: 1;
    min-width: 0;
}

.taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.tag-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-list li {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.3rem 0.2rem 0.7rem;
    font-size: 0.82rem;
}

.tag-list li.empty {
    color: var(--muted);
    border: none;
    background: none;
    padding-left: 0;
}

.tag-list button.remove {
    background: none;
    color: var(--muted);
    border: none;
    border-radius: 50%;
    width: 1.4em;
    height: 1.4em;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.tag-list button.remove:hover { color: #d64545; }

.add-item {
    display: flex;
    gap: 0.4rem;
}

.add-item input { flex: 1; margin-top: 0; }

.htmx-indicator { display: none; margin-left: 0.6rem; color: var(--muted); font-size: 0.85rem; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }

.flash.error { color: #d64545; }

.disc-grid, .candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

/* An empty-results message (no candidates found) is a lone child inside
   the grid — without this, it sits in just the first track's width
   instead of spanning the row (see the "tiny column on the left"
   report). */
.candidate-grid > p.hint {
    grid-column: 1 / -1;
}

.disc-card {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--text);
    position: relative;
}

.disc-card:hover { border-color: var(--accent); }

.disc-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg);
    margin-bottom: 0.5rem;
    display: block;
}

.disc-cover.disc-cover-square {
    aspect-ratio: 1;
}

.disc-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.disc-title { font-size: 0.9rem; font-weight: 600; }
.disc-subtitle { font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }

.disc-status {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
}

.disc-status-error { color: #d64545; }
.disc-status-pending { color: var(--accent-2); }
.disc-status-scanning { color: var(--accent); }

.candidate-card { display: flex; flex-direction: column; }

.track-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.track-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.track-table th, .track-table td {
    text-align: left;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--border);
}
.track-table th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }

.search-row { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.search-row input { flex: 1; }
/* The global `select { width: 100% }` rule below wins over this select's
   flexbox sizing (an explicit width overrides flex-basis:auto), so on a
   wide desktop row it tries to claim the whole row and squeezes the
   search input down to nothing. Keep it compact instead. */
.search-row select { flex: 0 0 auto; width: auto; min-width: 180px; }

.lang-switcher {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.6rem;
}
.lang-switcher select {
    width: auto;
    min-width: 0;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    border-radius: 6px;
}

.candidate-option { cursor: pointer; }
.candidate-option input[type="radio"] { margin-bottom: 0.4rem; }
.candidate-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }

.check-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.check-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    cursor: pointer;
    background: var(--bg);
}
.check-pill:has(input:checked:not(:disabled)) { border-color: var(--accent); color: var(--accent); }
.check-pill:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }

.title-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.title-include { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.title-include input { width: auto; }

.stream-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.6rem;
    padding-left: 1.6rem;
}

.stream-cols .check-row { margin-top: 0.3rem; }

.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: hidden;
    margin: 0.4rem 0;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.4s ease;
}

.job-log {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.78rem;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.table-scroll {
    overflow-x: auto;
}

.error-summary {
    border-color: #d64545;
    background: color-mix(in srgb, #d64545 8%, var(--panel));
}
.error-summary-inline {
    max-width: 220px;
    white-space: normal;
}

.degraded-summary {
    border-color: #c98a1f;
    background: color-mix(in srgb, #c98a1f 8%, var(--panel));
}
.degraded-summary-inline {
    max-width: 220px;
    white-space: normal;
    color: #c98a1f;
}

.boxset-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.boxset-banner label { color: var(--text); font-size: 0.9rem; }

.temp-alert-banner {
    border-color: #d64545;
    background: color-mix(in srgb, #d64545 12%, var(--panel));
}
.temp-alert-banner strong { color: #d64545; }

.mobile-note { display: none; }

@media (max-width: 680px) {
    .desktop-only > *:not(.mobile-note) { display: none; }
    .mobile-note { display: block; }
    .desktop-only-inline { display: none; }

    .topbar { padding-left: 1rem; padding-right: 1rem; }
    .topbar nav { display: flex; gap: 0.75rem; }
    .content { padding: 1rem; }

    button, .add-item button, input[type="submit"] {
        min-height: 44px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    input[type="text"], input[type="password"], select { min-height: 40px; }

    .stream-cols { grid-template-columns: 1fr; }
    .disc-grid, .candidate-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .search-row { flex-direction: column; }
    .search-row button { width: 100%; }
    .search-row select { width: 100%; }
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.6rem;
}

.player-controls button {
    font-size: 1.1rem;
    padding: 0.4rem 0.9rem;
}

.player-controls input[type="range"] {
    flex: 1;
    max-width: 160px;
}

.output-pill { display: inline-block; }

.usage-row { margin-bottom: 0.9rem; }
.usage-label {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}
.progress-fill-alert { background: #d64545; }

.disk-card { display: flex; flex-direction: column; gap: 0.3rem; }
.disk-card button { margin-top: 0.4rem; align-self: flex-start; }

.smart-panel { margin-top: 0.5rem; font-size: 0.85rem; }

.hw-disk {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.hw-disk:last-of-type { border-bottom: none; }
.hw-disk-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.hw-subhead {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--muted);
    margin: 1rem 0 0.4rem;
}
.hw-subhead:first-child { margin-top: 0; }

/* ---- Music: app shell ---- */

body:has(.music-shell) .content { padding-bottom: 150px; }

.music-shell { max-width: 100%; }

.music-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    position: sticky;
    top: 0;
    background: var(--bg);
    padding: 0.5rem 0;
    z-index: 5;
}

.tabs { display: flex; gap: 0.3rem; }

.tab-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); background: var(--panel); border: 1px solid var(--border); }

.music-search { display: flex; gap: 0.4rem; align-items: center; }
.music-search input {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    color: var(--text);
    font-size: 0.85rem;
    width: 200px;
}
.music-search button {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--muted);
}

/* Album / artist grid, Deezer-style tiles with hover play overlay */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}

.tile { cursor: pointer; }

.tile-art {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.tile-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tile-art .tile-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--muted);
}

.tile-play {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tile:hover .tile-play, .tile:focus-within .tile-play { opacity: 1; transform: translateY(0); }

.tile-title { font-size: 0.88rem; font-weight: 600; }
.tile-subtitle { font-size: 0.78rem; color: var(--muted); }

/* Track rows: whole row clickable to play */
.track-rows { display: flex; flex-direction: column; }

.track-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--text);
    font: inherit;
}

.track-row:hover { background: var(--panel); }
.track-row.playing { color: var(--accent); }

.track-row .track-num { width: 1.6rem; color: var(--muted); font-size: 0.82rem; flex-shrink: 0; }
.track-row .track-info { flex: 1; min-width: 0; }
.track-row .track-title { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row .track-artist { font-size: 0.78rem; color: var(--muted); }
.track-row .track-duration { font-size: 0.78rem; color: var(--muted); flex-shrink: 0; }

.track-add {
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 1.8rem;
    height: 1.8rem;
    color: var(--muted);
    cursor: pointer;
}
.track-add:hover { color: var(--accent); border-color: var(--accent); }

/* Persistent bottom player bar */
.player-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--panel);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
    z-index: 20;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.player-bar-track { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.player-bar-cover { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--bg); }
.player-bar-info { min-width: 0; flex: 1; }
.player-bar-title { font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-bar-artist { font-size: 0.75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* All icon buttons (transport, outputs, queue) share one look — plain
   currentColor SVGs, never Unicode glyphs. Emoji-presentation Unicode
   symbols (⏮ ⏭ ❚❚) render as full-color Apple emoji art on iOS regardless
   of button CSS, which is why they used to look like mismatched glossy
   badges next to a barely-visible plain-text play triangle — see the
   "player pas très visible / icônes arrangées bizarrement" report. */
.player-bar-icon-btn {
    background: none; border: none; padding: 0.35rem; margin: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); cursor: pointer; border-radius: 50%;
}
.player-bar-icon-btn:hover { color: var(--text); background: var(--bg); }
.player-bar-outputs-btn { flex-shrink: 0; }

.player-bar-progress { display: flex; align-items: center; gap: 0.5rem; }
.player-bar-progress .progress-bar { flex: 1; margin: 0; }
.player-bar-progress .hint { font-size: 0.7rem; min-width: 2.2em; color: var(--muted); }

.player-bar-controls { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.player-bar-volume { flex: 0 0 auto; }
.player-bar-volume input[type="range"] { width: 70px; }
.player-bar-transport { display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex: 1; }
.player-bar-transport .player-bar-icon-btn { color: var(--text); }
.player-bar-play {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; flex-shrink: 0;
}
.player-bar-play:hover { opacity: 0.9; background: var(--accent); }
.player-bar-play svg { margin-left: 2px; } /* optically center the play triangle */

/* Queue drawer */
.queue-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 132px;
    width: 340px;
    max-width: 90vw;
    background: var(--panel);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    z-index: 25;
    padding: 1rem;
    overflow-y: auto;
}
.queue-drawer.open { transform: translateX(0); }

.queue-drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.queue-drawer-header button { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); }

.queue-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 24;
    display: none;
}
.queue-backdrop.open { display: block; }

/* Outputs popover */
.outputs-popover {
    position: fixed;
    right: 1.25rem;
    bottom: 90px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 26;
    display: none;
    min-width: 220px;
}
.outputs-popover.open { display: block; }

@media (max-width: 680px) {
    .player-bar { padding: 0.5rem 0.75rem; }
    .player-bar-volume input[type="range"] { width: 52px; }
    .player-bar-transport { gap: 0.25rem; }
    .music-search input { width: 130px; }
    .queue-drawer { bottom: 118px; }
}

details.panel summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

details.panel[open] summary { margin-bottom: 0.75rem; }

.smartpl-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.smartpl-form label { font-size: 0.8rem; color: var(--muted); }
.smartpl-form button { grid-column: 1 / -1; justify-self: start; }

.home-scan { text-align: center; padding: 2rem 1.25rem; }
.home-scan > button {
    font-size: 1.1rem;
    padding: 0.9rem 2.2rem;
    border-radius: 999px;
}
.home-scan #home-scan-result { margin-top: 1.25rem; text-align: left; max-width: 260px; margin-left: auto; margin-right: auto; }
.home-scan #home-scan-result:empty { margin-top: 0; }

.home-job .disc-title { display: block; margin-bottom: 0.4rem; }

.home-music .candidate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.9rem;
}
.home-music .candidate-card .disc-title { margin: 0; }

.home-music-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.component-category h2 { margin-bottom: 0.75rem; }

.component-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.component-row:last-child { border-bottom: none; }

.component-info { flex: 1 1 220px; min-width: 180px; }
.component-name { font-weight: 600; }
.component-desc { margin-top: 0.15rem; }

.component-versions {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.component-versions .hint { display: inline-block; min-width: 4.2em; }

.component-notes { flex: 1 1 200px; min-width: 160px; }

.component-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.component-actions button { font-size: 0.78rem; padding: 0.35rem 0.6rem; }

@media (max-width: 720px) {
    .component-row { flex-direction: column; }
    .component-versions, .component-notes, .component-actions { flex-basis: auto; width: 100%; }
}

.button, a.button {
    display: inline-block;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}
.button:hover, a.button:hover { opacity: 0.9; }
