:root {
    --ink: #242424;
    --label: #616161;
    --paper: #f5f5f5;
    --hover: #ffffff;
    color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}

header, main, footer {
    width: min(1120px, calc(100% - 48px));
    margin-inline: auto;
}

header { padding: 36px 0 4px; }

.mark {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.brand-mark {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex: none;
}

.lede {
    margin: 4px 0 0;
    color: var(--label);
    font-size: 0.95rem;
}

.launcher {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, 104px);
    gap: 4px 2px;
    justify-content: start;
    margin: 28px 0 0;
    padding: 0;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 96px;
    padding: 12px 6px 10px;
    border-radius: 8px;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.tile:hover,
.tile:focus-visible {
    background: var(--hover);
    outline: none;
}

.icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    color: #fff;
}

.icon svg { width: 24px; height: 24px; fill: currentColor; }

.icon.is-logo {
    background: transparent;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(32, 33, 36, 0.18);
}

.icon.is-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-sierra { background: #2f6f4e; }
.icon-emby { background: #52b54b; }
.icon-seerr { background: #6d4aff; }
.icon-home { background: #18bcf2; }
.icon-git { background: #c4552a; }
.icon-files { background: #0b57d0; }
.icon-word { background: #3d4f63; }
.icon-apps { background: #01875f; }
.icon-cookbook { background: #b3261e; }
.icon-messenger { background: #0b57d0; }
.icon-social { background: #b3261e; }
.icon-music { background: #1DB954; }

.name {
    max-width: 92px;
    font-size: 12px;
    line-height: 1.25;
    color: var(--label);
}

.recent { margin-top: 36px; }

.recent h2 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 8px;
}

.recent-list li + li { border-top: 1px solid #ececec; }

.recent-list a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
}

.recent-list a:hover,
.recent-list a:focus-visible {
    background: var(--hover);
    outline: none;
}

.recent-meta {
    color: var(--label);
    font-size: 13px;
    text-align: right;
}

footer {
    padding: 36px 0 28px;
    color: var(--label);
    font-size: 12px;
}

footer p { margin: 0; }

.bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.mark a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

body:has(.browser) .brand-mark,
body:has(.apps-shell) .brand-mark,
body:has(.cookbook-shell) .brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 5px;
}

.session {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 2px;
    color: var(--label);
    font-size: 14px;
}

.session a { color: inherit; }

.session button,
.links button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--label);
    font: inherit;
    cursor: pointer;
}

.auth { width: min(440px, 100%); margin-top: 12px; }

.panel {
    margin-top: 16px;
    padding: 8px 18px 6px;
    background: #fff;
    border-radius: 8px;
}

.panel h1,
.panel h2 {
    margin: 12px 0 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.help {
    margin: 8px 0 0;
    color: var(--label);
    font-size: 13px;
    line-height: 1.4;
}

label {
    display: block;
    margin-top: 12px;
    color: var(--label);
    font-size: 12px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    color: var(--ink);
    font: inherit;
    background: #fff;
}

button.primary {
    margin: 16px 0 12px;
    padding: 8px 14px;
    border: 0;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.panel hr {
    margin: 4px 0 14px;
    border: 0;
    border-top: 1px solid #e6e6e6;
}

.options-label {
    margin: 0 0 4px;
    color: var(--label);
    font-size: 12px;
}

.login-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 8px;
}

.login-options button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--label);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.login-options button:hover,
.login-options button:focus-visible {
    background: var(--paper);
    outline: none;
}

.notice {
    margin: 16px 0 0;
    padding: 12px 14px;
    background: #fff;
    border-radius: 8px;
}

.toast-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100% - 32px));
}

.toast-stack .alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.toast-stack .alert span { flex: 1; }

.toast-stack .alert-success {
    color: #0f5132;
    background: #d1e7dd;
    border-color: #badbcc;
}

.toast-stack .alert-danger {
    color: #842029;
    background: #f8d7da;
    border-color: #f5c2c7;
}

.toast-stack .alert-info {
    color: #055160;
    background: #cff4fc;
    border-color: #b6effb;
}

.toast-stack .alert-warning {
    color: #664d03;
    background: #fff3cd;
    border-color: #ffecb5;
}

.toast-stack.music-toasts {
    top: 16px;
    right: 16px;
    bottom: auto;
    z-index: 120;
}

.toast-stack .alert-close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 18px;
    line-height: 24px;
    cursor: pointer;
}

.toast-stack .alert.fade-out {
    animation: toast-away 0.45s ease forwards;
}

@keyframes toast-away {
    to {
        opacity: 0;
        transform: translateX(110%);
    }
}

.links {
    list-style: none;
    margin: 12px 0;
    padding: 0;
}

.links li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #ececec;
}

.admin-shell,
.account-shell {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 24px;
}

.admin-side,
.account-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
}

.admin-side a,
.account-side a {
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
}

.admin-side a:hover,
.admin-side a:focus-visible,
.admin-side a[aria-current="page"],
.account-side a:hover,
.account-side a:focus-visible,
.account-side a[aria-current="page"] {
    background: var(--paper);
    outline: none;
}

.account-dialog {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 20, 20, 0.45);
}

.account-dialog .panel {
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    margin: 0;
    overflow: auto;
}

.account-dialog.wide .panel { width: min(520px, 100%); }

.import-list {
    max-height: 320px;
    margin-top: 8px;
    overflow: auto;
}

.account-dialog .notice {
    margin-top: 12px;
    border: 1px solid #e4e4e4;
}

.admin-main > .notice,
.account-main > .notice { margin-top: 0; }
.admin-main > .panel:first-child,
.account-main > .panel:first-child { margin-top: 0; }

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 12px;
}

.toolbar a.primary,
.toolbar button.primary { margin: 0; }

a.primary {
    display: inline-block;
    margin: 16px 0 12px;
    padding: 8px 14px;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font: inherit;
    text-decoration: none;
}

.table-wrap {
    background: #fff;
    border-radius: 8px;
    overflow: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
}

.user-table th {
    color: var(--label);
    font-size: 12px;
    font-weight: 600;
}

.user-table tr:last-child td { border-bottom: 0; }

.user-table a {
    color: var(--ink);
}

.checks label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--ink);
    font-size: 14px;
}

.checks input { margin: 0; }

.back {
    display: inline-block;
    margin: 0 0 12px;
    color: var(--label);
    font-size: 13px;
}

@media (max-width: 700px) {
    .admin-shell,
    .account-shell { grid-template-columns: 1fr; }
    .admin-side,
    .account-side { flex-direction: row; flex-wrap: wrap; }
    .metric-columns { grid-template-columns: 1fr; }
}

select {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    color: var(--ink);
    font: inherit;
    background: #fff;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.actions form,
.actions .help { margin: 0; }

.actions button.primary { margin: 0; }

button.quiet,
a.quiet {
    display: inline-block;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

button.quiet:disabled {
    color: var(--label);
    cursor: default;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.metric {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
}

.metric strong {
    display: block;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.15;
}

.metric span {
    display: block;
    margin-top: 4px;
    color: var(--label);
    font-size: 12px;
}

.metric-head {
    margin: 22px 0 10px;
    font-size: 13px;
    font-weight: 600;
}

.metric-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.metric-note {
    margin: 0 0 14px;
    color: var(--label);
    font-size: 13px;
}

.log-table td,
.log-table th { white-space: normal; }

.log-table td.agent,
.log-table td.detail { max-width: 220px; }

.filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
}

.filters select { width: auto; min-width: 140px; margin: 0; }

.filters input[type="number"] {
    width: 88px;
    margin: 0;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.row-actions form { margin: 0; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 0 12px;
    color: var(--label);
    font-size: 14px;
}

.crumbs a { color: var(--ink); text-decoration: none; }

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

.browser {
    background: #fff;
    border-radius: 8px;
}

.files-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    position: relative;
    padding: 14px 20px 10px;
    border-bottom: 1px solid #ececec;
}

.files-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-menu { position: relative; }

.toolbar-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.toolbar-button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.toolbar-button.primary {
    border-color: #f5e1a6;
    background: #f5e1a6;
    color: #1f1f1f;
}

.toolbar-button:hover,
.toolbar-button:focus-visible {
    background: var(--paper);
    outline: none;
}

.toolbar-button.primary:hover,
.toolbar-button.primary:focus-visible {
    background: #edd58e;
    border-color: #edd58e;
    color: #1f1f1f;
}

.view-switch {
    display: inline-flex;
    margin-left: auto;
    padding: 3px;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    background: #f7f7f7;
}

.view-switch a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--label);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.view-switch a svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.view-switch a[aria-current="true"] {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.view-switch a:hover,
.view-switch a:focus-visible {
    color: var(--ink);
    outline: none;
}

.dropdown button,
.context-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 9px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.dropdown button:hover,
.dropdown button:focus-visible,
.context-menu button:hover,
.context-menu button:focus-visible {
    background: var(--paper);
    outline: none;
}

.menu-icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
}

.menu-icon .glyph {
    width: 18px;
    height: 18px;
}

.dropdown,
.context-menu {
    z-index: 5;
    min-width: 220px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
}

.dropdown form { margin: 6px 4px 4px; }

.dropdown form input[type="text"] { width: 100%; }

.dropdown form button.primary { margin: 10px 0 4px; justify-content: center; }

.context-menu { position: fixed; }

.picker {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.files-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 20px 4px;
    color: var(--label);
    font-size: 14px;
}

.files-path a {
    color: var(--ink);
    text-decoration: none;
    border-radius: 4px;
}

.files-path a:hover,
.files-path a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.files-path .path-root {
    font-weight: 600;
}

.files-path .path-root.is-current,
.files-path .path-current {
    color: var(--ink);
    font-weight: 600;
}

.files-path .path-sep {
    color: #b0b0b0;
}

.files-path .path-count {
    margin-left: auto;
    color: var(--label);
    font-size: 13px;
}

.file-list {
    position: relative;
    min-height: 360px;
}

.file-list.dropping .drop-overlay {
    opacity: 1;
    pointer-events: none;
}

.drop-overlay {
    position: absolute;
    inset: 10px;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 2px dashed #8d6e4c;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    opacity: 0;
    transition: opacity 0.12s ease;
    pointer-events: none;
}

.drop-overlay > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-overlay .glyph {
    width: 42px;
    height: 42px;
    fill: #f5e1a6;
}

.drop-overlay p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.browser .table-wrap {
    border-radius: 0;
    box-shadow: none;
}

.files-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 420px;
    padding: 48px 20px;
    text-align: center;
    color: var(--label);
}

.files-empty .empty-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 8px;
    border-radius: 18px;
    background: #f5e1a6;
}

.files-empty .empty-mark .glyph {
    width: 36px;
    height: 36px;
    fill: #1f1f1f;
}

.files-empty h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 600;
}

.files-empty p {
    margin: 0 0 10px;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.45;
}

.files-empty .primary {
    min-width: 140px;
}

body:has(.browser) {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
}

body:has(.browser) header {
    flex: none;
    width: 100%;
    margin: 0;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

body:has(.browser) .bar {
    align-items: center;
    min-height: 52px;
    gap: 16px;
}

body:has(.browser) .mark {
    font-size: 15px;
    line-height: 1;
}

body:has(.browser) .lede { display: none; }

body:has(.browser) .session {
    margin: 0;
    font-size: 14px;
}

body:has(.browser) footer { display: none; }

body:has(.browser) main {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    margin: 0;
}

body:has(.browser) .browser {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    border-radius: 0;
}

body:has(.browser) .file-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

body:has(.browser) .toast-stack {
    bottom: 80px;
}

.quota {
    flex: none;
    margin: 0;
    padding: 12px 20px 14px;
    background: #fff;
    border-top: 1px solid #ececec;
}

.quota-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--label);
    font-size: 13px;
}

.quota-heading span:first-child {
    color: var(--ink);
    font-weight: 600;
}

.quota-track {
    height: 6px;
    background: #ececec;
    border-radius: 99px;
    overflow: hidden;
}

.quota-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #8d6e4c, #a4845d);
}

.drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 16px;
    background: #fff;
    border: 1px dashed #c8c8c8;
    border-radius: 8px;
    text-align: center;
    color: var(--label);
}

.drop.dropping,
main.dropping {
    border-color: var(--ink);
}

.drop svg {
    width: 88px;
    height: 56px;
    fill: #8d6e4c;
}

.drop p { margin: 0; font-size: 14px; }

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    border-bottom: 1px solid #ececec;
    background: #fff;
    color: var(--label);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.file-table .col-name { padding-left: 20px; }
.file-table .col-size { width: 120px; }
.file-table .col-modified { width: 160px; }
.file-table .col-actions { width: 52px; padding-right: 12px; }

.file-table tbody td {
    height: 52px;
    padding: 0 12px;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
    color: var(--label);
    font-size: 13px;
}

.file-table tbody tr:hover {
    background: #faf7f4;
}

.file-table td.name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
    color: var(--ink);
}

.file-table td.name-cell .item-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.file-table td.name-cell .item-name:hover {
    text-decoration: underline;
}

.item-more {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--label);
    font: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
}

.file-table tbody tr:hover .item-more,
.grid-item:hover .item-more,
.item-more:focus-visible {
    opacity: 1;
    outline: none;
}

.item-more:hover,
.item-more:focus-visible {
    background: #efe8e0;
    color: var(--ink);
}

.preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f4f1ed;
}

.preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-sm {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 8px;
}

.preview-lg {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
}

.preview .glyph {
    width: 20px;
    height: 20px;
}

.preview-lg .glyph {
    width: 44px;
    height: 44px;
}

.glyph-folder { fill: #f5e1a6; }
.glyph-image { fill: #5b8f6b; }
.glyph-video { fill: #5b6f8f; }
.glyph-audio { fill: #7a628f; }
.glyph-pdf { fill: #b4574a; }
.glyph-text { fill: #616161; }
.glyph-file { fill: #8d6e4c; }
.glyph-up { fill: #8a8a8a; }

.preview-folder { background: #faf6e8; }
.preview-image { background: #eef5f0; }
.preview-video { background: #eef1f6; }
.preview-audio { background: #f3eff7; }
.preview-pdf { background: #f8efed; }
.preview-text,
.preview-file,
.preview-up { background: #f4f1ed; }

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
    padding: 16px 20px 24px;
}

.grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
}

a.grid-item:hover,
.grid-item:hover {
    background: #faf7f4;
    border-color: #efe6db;
}

.grid-item .item-more {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
}

.grid-item .item-name,
.grid-item .item-label {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-item .item-meta {
    margin-top: -4px;
    color: var(--label);
    font-size: 12px;
}

@media (max-width: 720px) {
    .files-toolbar {
        padding: 12px 14px 8px;
    }

    .toolbar-button span:not(:only-child),
    .view-switch a span {
        display: none;
    }

    .files-path {
        padding: 8px 14px 2px;
    }

    .files-path .path-count {
        width: 100%;
        margin: 4px 0 0;
    }

    .file-table .col-size,
    .file-table .col-modified {
        display: none;
    }

    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
        padding: 12px 14px 20px;
    }

    .item-more {
        opacity: 1;
    }
}

.preview-layer {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 20, 20, 0.72);
}

body:has(.preview-layer) { overflow: hidden; }

.preview-backdrop {
    position: absolute;
    inset: 0;
}

.preview-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(980px, 100%);
    height: min(640px, calc(100vh - 48px));
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.preview-media {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 24px;
    background: #2b2b2b;
}

.preview-media img,
.preview-media video {
    max-width: 100%;
    max-height: 100%;
}

.preview-media audio { width: min(480px, 100%); }

.preview-media iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.preview-media .stage-text {
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: auto;
    margin: 0;
    padding: 16px;
    background: #1f1f1f;
    color: #f5f5f5;
    white-space: pre-wrap;
    word-break: break-word;
    font: 13px/1.45 ui-monospace, monospace;
}

.preview-side {
    display: flex;
    flex: 0 0 280px;
    flex-direction: column;
    gap: 8px;
    width: 280px;
    padding: 20px;
    background: #fff;
}

.preview-close {
    align-self: flex-end;
    color: var(--label);
    font-size: 13px;
    text-decoration: none;
}

.preview-side h2 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    word-break: break-word;
}

.preview-side dl { margin: 0; }

.preview-side dt {
    color: var(--label);
    font-size: 12px;
    font-weight: 600;
}

.preview-side dd {
    margin: 2px 0 12px;
    font-size: 14px;
}

.preview-side .stage-note { text-align: left; }

.preview-side a.primary {
    margin: auto 0 0;
    text-align: center;
}

.stage-note {
    margin: 0;
    color: var(--label);
    font-size: 13px;
}

.stage-missing {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-missing .glyph {
    width: 64px;
    height: 64px;
    fill: #c8b39a;
}

@media (max-width: 700px) {
    .preview-dialog { flex-direction: column; }
    .preview-side { width: auto; flex-basis: auto; }
}

.file-list .name-edit {
    display: block;
    width: 100%;
    height: 28px;
    margin: 0;
    padding: 2px 6px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    background: #fff;
}

.file-table .name-edit {
    width: auto;
    flex: 1;
    min-width: 0;
}

.pager {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--label);
    font-size: 13px;
}

.pager a { color: var(--ink); }

.note {
    margin: 12px 0 0;
    color: var(--label);
    font-size: 14px;
}

body:has(.ribbon) header,
body:has(.ribbon) main {
    width: 100%;
    margin: 0;
}

body:has(.ribbon) header {
    padding: 0 18px;
    background: #fff;
    border-bottom: 1px solid #e4e4e4;
}

body:has(.ribbon) .bar {
    align-items: center;
    min-height: 48px;
    gap: 16px;
}

body:has(.ribbon) .mark {
    font-size: 15px;
    line-height: 1;
}

body:has(.ribbon) .lede { display: none; }

body:has(.ribbon) .session {
    margin: 0;
    font-size: 14px;
}

body:has(.ribbon) .crumbs { display: none; }

body:has(.ribbon) .notice,
body:has(.ribbon) .note {
    width: min(1120px, calc(100% - 48px));
    margin-inline: auto;
}

.ribbon {
    position: sticky;
    top: 0;
    z-index: 5;
    margin-top: 0;
    background: #fff;
    color: var(--ink);
    border-bottom: 1px solid #e4e4e4;
}

.ribbon-tabs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    background: var(--paper);
    border-bottom: 1px solid #e4e4e4;
}

.ribbon-tabset {
    display: flex;
    align-items: stretch;
    gap: 2px;
}

.ribbon button,
.ribbon-label {
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.ribbon-tabset > button {
    padding: 10px 14px 8px;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}

.ribbon-tabset > button[aria-selected="true"] {
    background: #fff;
    border-bottom-color: var(--ink);
}

.doc-name { position: relative; }

#name-button {
    display: inline-flex;
    align-items: center;
    max-width: min(420px, 46vw);
    padding: 6px 8px;
    font-size: 14px;
    font-weight: 600;
}

#name-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#name-button::after {
    content: "";
    display: inline-block;
    margin-left: 8px;
    border: 4px solid transparent;
    border-top-color: var(--label);
    transform: translateY(2px);
}

.name-pop { width: 320px; padding: 12px; }

.name-pop label {
    display: block;
    margin: 0 0 10px;
    color: var(--label);
    font-size: 13px;
}

.name-pop input {
    display: block;
    width: 100%;
    height: 32px;
    margin: 4px 0 0;
    padding: 0 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.location-pick {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

#doc-folder-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#folder-browse {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    width: auto;
    height: 32px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: var(--ink);
    text-align: center;
}

#folder-browse:hover { background: var(--paper); color: var(--ink); }

#name-apply {
    width: auto;
    margin-top: 2px;
    padding: 0 12px;
    background: var(--ink);
    color: #fff;
    text-align: center;
}

#name-apply:hover { background: #111; color: #fff; }

.folder-browser {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 20, 0.72);
}

.folder-browser[hidden] { display: none !important; }

.folder-dialog {
    display: flex;
    flex-direction: column;
    width: min(420px, calc(100% - 32px));
    max-height: min(520px, calc(100% - 32px));
    padding: 16px;
    background: #fff;
    border-radius: 8px;
}

.folder-dialog h2 {
    margin: 0 0 8px;
    font-size: 16px;
}

#folder-here {
    margin: 0 0 10px;
    color: var(--label);
    font-size: 13px;
    word-break: break-all;
}

#folder-list {
    min-height: 180px;
    overflow: auto;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
}

#folder-list button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

#folder-list button:hover { background: var(--paper); }

.folder-empty {
    margin: 0;
    padding: 12px;
    color: var(--label);
    font-size: 14px;
}

.folder-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.folder-actions button {
    height: 32px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

#folder-use { background: var(--ink); color: #fff; }
#folder-use:hover { background: #111; }

.name-error {
    margin: 0 0 8px;
    color: #8a1f1f;
    font-size: 13px;
}

.save-status {
    justify-self: end;
    margin: 0;
    padding-right: 8px;
    color: var(--label);
    font-size: 13px;
}

.ribbon-row {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 56px;
    padding: 8px 12px;
    background: #fff;
    overflow-x: auto;
}

.ribbon-row[hidden] { display: none !important; }

.ribbon-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    border-right: 1px solid #e4e4e4;
}

.ribbon-group:last-child { border-right: 0; }

.ribbon-styles { margin-left: auto; }

.ribbon-row button,
.ribbon-label {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 32px;
    text-decoration: none;
    white-space: nowrap;
}

.ribbon-row button:hover,
.ribbon-tabset > button:hover,
#name-button:hover,
.ribbon-label:hover {
    background: var(--paper);
}

.mode-switch {
    display: flex;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    overflow: hidden;
}

.mode-switch button { border-radius: 0; }

.mode-switch button[aria-pressed="true"],
.mode-switch button[aria-pressed="true"]:hover {
    background: var(--ink);
    color: #fff;
}

body.reading .ribbon-row:not([data-panel="view"]) {
    opacity: 0.45;
    pointer-events: none;
}

body.reading .sheet {
    caret-color: transparent;
}

body.reading .table-handle { display: none; }

.ribbon select {
    width: auto;
    height: 32px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

#font-name { min-width: 168px; }
#font-size { width: 68px; }

.ink-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.ink-tool input {
    width: 18px;
    height: 4px;
    margin: 1px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mark-tool input { height: 6px; }

.u-mark { text-decoration: underline; }

.style-chip {
    height: 34px;
    padding: 0 12px;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.style-chip.heading { font-size: 16px; font-weight: 700; }
.style-chip.title { font-size: 15px; }
.style-chip.sub { font-size: 13px; color: var(--label); }

.ribbon-label { display: inline-flex; align-items: center; }

.writer-workspace {
    margin: 0;
    padding: 32px 24px 72px;
    background: var(--paper);
}

.sheet {
    width: min(816px, 100%);
    min-height: 960px;
    margin: 0 auto;
    padding: 72px 84px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    outline: none;
    font-family: Georgia, "Liberation Serif", serif;
    font-size: 12pt;
    line-height: 1.45;
    color: #242424;
}

.sheet p { margin: 0 0 10px; }
.sheet h1 { font-size: 24pt; line-height: 1.2; margin: 0 0 12px; }
.sheet h2 { font-size: 18pt; line-height: 1.25; margin: 0 0 10px; }
.sheet h3 { font-size: 14pt; margin: 0 0 8px; }
.sheet table { width: 100%; margin: 0 0 12px; border-collapse: collapse; }
.sheet td, .sheet th { min-width: 48px; padding: 6px; border: 1px solid #bbb; vertical-align: top; }
.table-frame { position: relative; margin: 18px 0 12px; }
.table-frame table { margin: 0; }
.table-frame.selected table { outline: 2px solid var(--ink); outline-offset: 2px; }
.table-frame.dragging { pointer-events: none; }
.table-handle {
    position: absolute;
    top: -2px;
    left: -28px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    cursor: grab;
}
.table-handle::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    margin: 5px auto;
    background: radial-gradient(circle, #242424 1.2px, transparent 1.4px) 0 0 / 5px 5px;
}
.doc-menu {
    position: fixed;
    z-index: 30;
    min-width: 180px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.doc-menu[hidden] { display: none !important; }
.doc-menu p { margin: 0 0 8px; font-size: 13px; color: var(--label); }
.doc-menu button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.doc-menu button:hover { background: var(--paper); }
.table-cells { display: grid; grid-template-columns: repeat(10, 16px); gap: 2px; }
.table-cells button {
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid #d0d0d0;
    border-radius: 2px;
    background: #fff;
}
.table-cells button.on { background: #ececec; border-color: var(--ink); }
.sheet img { max-width: 100%; height: auto; }
.sheet a { color: #1a4fbf; }
.sheet hr.page-break { margin: 28px 0; border: 0; border-top: 1px dashed #bbb; }

@media (max-width: 700px) {
    .sheet { min-height: 70vh; padding: 28px 16px; }
}

.apps-shell {
    width: 90%;
    max-width: none;
    margin: 0 auto 48px;
}

.store-get {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 16px;
    padding: 12px 12px 12px 14px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(32, 33, 36, 0.08);
}

.store-get[hidden] {
    display: none;
}

.store-get-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
}

.store-get-copy strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.store-get-copy p {
    margin: 2px 0 0;
    color: #5f6368;
    font-size: 12px;
    line-height: 1.35;
}

.store-get-open,
.store-get-install {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.store-get-open {
    background: #e8f5ef;
    color: #01875f;
}

.store-get-install {
    background: #01875f;
    color: #fff;
}

.store-get-dismiss {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #80868b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.store-top {
    margin: 8px 0 18px;
}

.store-top h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.store-title-link {
    color: inherit;
    text-decoration: none;
}

.store-title-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

body:has(.apps-shell) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fafafa;
}

body:has(.apps-shell) header {
    flex: none;
    width: 100%;
    margin: 0;
    padding: 0 20px;
    background: #fafafa;
    border-bottom: 0;
}

body:has(.apps-shell) .bar {
    align-items: center;
    min-height: 52px;
    gap: 16px;
}

body:has(.apps-shell) .mark {
    font-size: 15px;
    line-height: 1;
}

body:has(.apps-shell) .lede {
    display: none;
}

body:has(.apps-shell) .session {
    margin: 0;
    font-size: 14px;
}

body:has(.apps-shell) footer {
    display: none;
}

body:has(.apps-shell) main.apps-shell {
    flex: 1;
    width: 90%;
    margin: 0 auto 48px;
    padding-top: 18px;
}

.apps-shell > .files-path {
    margin: 0 0 18px;
    padding: 0;
    background: transparent;
    border: 0;
}

.store-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 56px 24px;
    text-align: center;
    background:
        radial-gradient(circle at top, rgba(1, 135, 95, 0.08), transparent 48%),
        #fff;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(32, 33, 36, 0.06);
}

.store-empty-mark {
    width: 72px;
    height: 72px;
    border-radius: 20px;
}

.store-empty-mark svg {
    width: 34px;
    height: 34px;
}

.store-empty h2 {
    margin: 8px 0 0;
    font-size: 1.25rem;
}

.store-empty p {
    margin: 0;
    max-width: 360px;
    color: var(--label);
}

.store-feature {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: center;
    min-height: 320px;
    padding: 36px 40px;
    border-radius: 32px;
    overflow: hidden;
    color: #202124;
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.55), transparent 34%),
        linear-gradient(135deg, #e8f5ef 0%, #d9ebe3 42%, #f7fbf8 100%);
    box-shadow: 0 24px 50px rgba(32, 33, 36, 0.08);
}

.store-feature.tone-apps,
.store-feature.tone-guardian {
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.58), transparent 34%),
        linear-gradient(135deg, #e7f0ff 0%, #d4e4fb 46%, #f5f9ff 100%);
}

.store-feature.tone-store {
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.58), transparent 34%),
        linear-gradient(135deg, #e8f5ef 0%, #d4ebe1 46%, #f5fbf8 100%);
}

.store-feature.tone-backup {
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.58), transparent 34%),
        linear-gradient(135deg, #e4eef6 0%, #d0e0ec 46%, #f3f7fa 100%);
}

.store-badge {
    display: inline-flex;
    margin: 0 0 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(1, 135, 95, 0.12);
    color: #01875f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.store-feature.tone-apps .store-badge,
.store-feature.tone-guardian .store-badge {
    background: rgba(11, 87, 208, 0.12);
    color: #0b57d0;
}

.store-feature.tone-store .store-badge {
    background: rgba(1, 135, 95, 0.12);
    color: #01875f;
}

.store-feature.tone-backup .store-badge {
    background: rgba(27, 79, 114, 0.12);
    color: #1b4f72;
}

.store-feature-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.store-developer {
    margin: 10px 0 0;
    color: #5f6368;
    font-size: 14px;
    font-weight: 600;
}

.store-summary {
    margin: 14px 0 0;
    max-width: 34rem;
    color: #3c4043;
    font-size: 1.02rem;
    line-height: 1.5;
}

.store-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    margin: 22px 0 0;
}

.store-stats div {
    display: grid;
    gap: 2px;
}

.store-stats strong {
    font-size: 14px;
    font-weight: 700;
    color: #202124;
}

.store-stats span {
    color: #5f6368;
    font-size: 12px;
}

.store-install,
.store-chip,
.store-card-foot a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #01875f;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.store-install:hover,
.store-chip:hover,
.store-card-foot a:hover {
    background: #016b4c;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(1, 135, 95, 0.22);
}

.store-install {
    margin-top: 26px;
    min-width: 148px;
    padding: 14px 28px;
    font-size: 15px;
}

.store-feature-art {
    display: grid;
    place-items: center;
    min-height: 240px;
}

.store-feature-icon {
    display: grid;
    place-items: center;
    width: 168px;
    height: 168px;
    border-radius: 38px;
    box-shadow:
        0 28px 48px rgba(32, 33, 36, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    text-decoration: none;
    overflow: hidden;
    color: #fff;
}

.store-feature-icon svg {
    width: 78px;
    height: 78px;
    fill: currentColor;
}

.store-feature-icon.is-logo,
.store-row-icon.is-logo,
.store-card-icon.is-logo,
.store-detail-icon.is-logo {
    background: transparent;
    padding: 0;
    box-shadow: 0 28px 48px rgba(32, 33, 36, 0.18);
}

.store-feature-icon.is-logo img,
.store-row-icon.is-logo img,
.store-card-icon.is-logo img,
.store-detail-icon.is-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-detail {
    display: grid;
    gap: 22px;
}

.store-detail-hero {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 32px 36px;
    border-radius: 32px;
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.55), transparent 34%),
        linear-gradient(135deg, #e8f5ef 0%, #d9ebe3 42%, #f7fbf8 100%);
    box-shadow: 0 24px 50px rgba(32, 33, 36, 0.08);
}

.store-detail.tone-apps .store-detail-hero,
.store-detail.tone-guardian .store-detail-hero {
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.58), transparent 34%),
        linear-gradient(135deg, #e7f0ff 0%, #d4e4fb 46%, #f5f9ff 100%);
}

.store-detail.tone-store .store-detail-hero {
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.58), transparent 34%),
        linear-gradient(135deg, #e8f5ef 0%, #d4ebe1 46%, #f5fbf8 100%);
}

.store-detail-icon {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    border-radius: 30px;
    overflow: hidden;
    color: #fff;
    box-shadow:
        0 22px 40px rgba(32, 33, 36, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.store-detail-icon svg {
    width: 58px;
    height: 58px;
    fill: currentColor;
}

.store-detail-copy h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.store-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.7fr);
    gap: 16px;
    align-items: start;
}

.store-detail-panel {
    padding: 24px 26px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(32, 33, 36, 0.05);
}

.store-detail-panel h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 700;
}

.store-detail-panel p {
    margin: 0 0 12px;
    color: #3c4043;
    font-size: 15px;
    line-height: 1.55;
}

.store-detail-panel p:last-child {
    margin-bottom: 0;
}

.store-detail-meta dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.store-detail-meta div {
    display: grid;
    gap: 3px;
}

.store-detail-meta dt {
    color: #80868b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.store-detail-meta dd {
    margin: 0;
    color: #202124;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.store-detail-meta dd span {
    color: #80868b;
}

.store-detail-meta code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.store-admin-body textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
}

.store-section {
    margin-top: 34px;
}

.store-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.store-section-head h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.store-section-head p {
    margin: 0;
    color: var(--label);
    font-size: 13px;
}

.store-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.store-row {
    display: grid;
    grid-template-columns: 28px 64px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(32, 33, 36, 0.05);
}

.store-rank {
    color: #9aa0a6;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.store-row-icon,
.store-card-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-decoration: none;
}

.store-row-icon svg,
.store-card-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.store-row-icon.is-logo,
.store-card-icon.is-logo,
.store-detail-icon.is-logo {
    box-shadow: 0 10px 22px rgba(32, 33, 36, 0.12);
}

.store-row-body h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.store-row-body p {
    margin: 4px 0 0;
    color: #5f6368;
    font-size: 13px;
    line-height: 1.35;
}

.store-row-meta {
    color: #80868b !important;
    font-size: 12px !important;
}

.store-chip {
    min-width: 96px;
    padding: 10px 18px;
    font-size: 13px;
}

.store-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.store-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(32, 33, 36, 0.05);
}

.store-card h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
}

.store-card > p {
    margin: 0;
    min-height: 2.6em;
    color: #5f6368;
    font-size: 13px;
    line-height: 1.4;
}

.store-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.store-card-foot span {
    color: #80868b;
    font-size: 12px;
}

.store-card-foot a {
    min-width: 84px;
    padding: 8px 14px;
    font-size: 12px;
}

.store-admin {
    margin-top: 36px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(32, 33, 36, 0.05);
    overflow: hidden;
}

.store-admin > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.store-admin > summary::-webkit-details-marker {
    display: none;
}

.store-admin-hint {
    color: var(--label);
    font-size: 12px;
    font-weight: 500;
}

.store-admin-body {
    padding: 0 20px 20px;
    border-top: 1px solid rgba(32, 33, 36, 0.06);
}

.store-admin-body .help {
    margin: 14px 0 0;
}

.store-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 820px) {
    .store-feature {
        grid-template-columns: 1fr;
        padding: 28px 24px;
    }

    .store-feature-art {
        order: -1;
        min-height: 180px;
    }

    .store-feature-icon {
        width: 132px;
        height: 132px;
        border-radius: 30px;
    }

    .store-feature-icon svg {
        width: 60px;
        height: 60px;
    }

    .store-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .apps-shell {
        width: 90%;
    }

    .store-get {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 8px 10px;
    }

    .store-get-icon {
        grid-row: 1 / span 2;
        width: 48px;
        height: 48px;
    }

    .store-get-copy {
        grid-column: 2;
    }

    .store-get-dismiss {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .store-get-open,
    .store-get-install {
        grid-row: 2;
    }

    .store-get-open {
        grid-column: 2;
        justify-self: start;
    }

    .store-get-install {
        grid-column: 3;
        justify-self: end;
    }

    .store-row {
        grid-template-columns: 22px 52px minmax(0, 1fr);
        gap: 12px;
    }

    .store-row-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .store-chip {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .store-detail-hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .store-detail-icon {
        width: 96px;
        height: 96px;
        border-radius: 24px;
    }

    .store-detail-icon svg {
        width: 42px;
        height: 42px;
    }

    .store-admin-grid {
        grid-template-columns: 1fr;
    }
}

body:has(.cookbook-shell) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f3efe8;
}

body:has(.cookbook-shell) header {
    flex: none;
    width: 100%;
    margin: 0;
    padding: 0 20px;
    background: #f3efe8;
    border-bottom: 0;
}

body:has(.cookbook-shell) .bar {
    align-items: center;
    min-height: 52px;
    gap: 16px;
}

body:has(.cookbook-shell) .mark { font-size: 15px; line-height: 1; }
body:has(.cookbook-shell) .lede { display: none; }
body:has(.cookbook-shell) .session { margin: 0; font-size: 14px; }
body:has(.cookbook-shell) footer { display: none; }

.cookbook-shell {
    flex: 1;
    width: 90%;
    max-width: none;
    margin: 0 auto 64px;
    padding-top: 8px;
}

.cookbook-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 18px;
}

.cookbook-shell h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #1c241f;
}

.cookbook-new,
.cookbook-dialog-actions .cookbook-new,
.cookbook-edit-footer .cookbook-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #1f5c45;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.cookbook-new:hover { background: #174a37; }

.cookbook-find {
    margin: 0 0 14px;
}

.cookbook-find input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    font: inherit;
    box-shadow: 0 8px 24px rgba(34, 48, 41, 0.05);
}

.cookbook-cravings {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 8px;
    margin: 0 0 22px;
    scrollbar-width: none;
}

.cookbook-cravings::-webkit-scrollbar { display: none; }

.cookbook-craving {
    flex: none;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: #405048;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.cookbook-craving.is-active,
.cookbook-craving:hover {
    background: #1f5c45;
    color: #fff;
}

.cookbook-section {
    margin: 0 0 28px;
}

.cookbook-section > h2 {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1c241f;
}

.cookbook-featured {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.cookbook-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.cookbook-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(34, 48, 41, 0.06);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.cookbook-tile:hover,
.cookbook-tile:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(34, 48, 41, 0.1);
    outline: none;
}

.cookbook-tile-media {
    display: block;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 30% 20%, hsla(var(--card-hue), 55%, 72%, 0.9), transparent 42%),
        linear-gradient(160deg, hsl(var(--card-hue), 42%, 42%), hsl(calc(var(--card-hue) + 28), 36%, 28%));
}

.cookbook-tile-feature .cookbook-tile-media {
    aspect-ratio: 1;
}

.cookbook-tile-media img,
.cookbook-hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cookbook-tile-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.92);
    font-size: 2.4rem;
    font-weight: 700;
}

.cookbook-tile-copy {
    display: grid;
    gap: 4px;
    padding: 12px 14px 14px;
}

.cookbook-tile-copy strong {
    font-size: 0.98rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.cookbook-tile-copy span {
    color: #6a746e;
    font-size: 12px;
    font-weight: 600;
}

.cookbook-tile-feature .cookbook-tile-copy strong {
    font-size: 1.05rem;
}

.cookbook-empty {
    display: grid;
    justify-items: start;
    gap: 8px;
    padding: 36px 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(34, 48, 41, 0.05);
}

.cookbook-empty h3 {
    margin: 0;
    font-size: 1.2rem;
}

.cookbook-empty p {
    margin: 0;
    color: #6a746e;
}

.cookbook-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 16px;
}

.cookbook-nav > a {
    color: #1f5c45;
    font-weight: 700;
    text-decoration: none;
}

.cookbook-nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cookbook-ghost,
.cookbook-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #334039;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(34, 48, 41, 0.05);
}

.cookbook-danger { color: #8a2f2f; }

.cookbook-share {
    position: relative;
}

.cookbook-share > summary {
    list-style: none;
}

.cookbook-share > summary::-webkit-details-marker {
    display: none;
}

.cookbook-share-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    width: min(320px, 82vw);
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(34, 48, 41, 0.16);
}

.cookbook-share-panel .help {
    margin: 0 0 10px;
    color: #5b6b63;
    font-size: 0.9rem;
}

.cookbook-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #e7ece9;
}

.cookbook-share-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.cookbook-share-row strong {
    display: block;
}

.cookbook-share-row span {
    color: #5b6b63;
    font-size: 0.85rem;
}

.cookbook-recipe {
    overflow: hidden;
    padding: 0 0 24px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(34, 48, 41, 0.08);
}

.cookbook-hero-photo {
    display: block;
    width: 100%;
    height: min(240px, 26vw);
    background:
        radial-gradient(circle at 30% 20%, hsla(var(--card-hue), 55%, 72%, 0.9), transparent 42%),
        linear-gradient(160deg, hsl(var(--card-hue), 42%, 42%), hsl(calc(var(--card-hue) + 28), 36%, 28%));
}

.cookbook-recipe > header,
.cookbook-columns,
.cookbook-edit-footer,
.cookbook-clear-photo {
    padding-left: 24px;
    padding-right: 24px;
}

.cookbook-recipe > header {
    padding-top: 20px;
}

.cookbook-recipe h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.cookbook-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-top: 10px;
    color: #6a746e;
    font-size: 13px;
    font-weight: 600;
}

.cookbook-portions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 2px 6px 2px 12px;
    border-radius: 999px;
    background: #eef3ef;
    color: #334039;
}

.cookbook-portions-label {
    font-size: 12px;
    font-weight: 700;
}

.cookbook-portions-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #1f5c45;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(34, 48, 41, 0.06);
}

.cookbook-portions-input {
    width: 3.2rem;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.cookbook-portions-input::-webkit-outer-spin-button,
.cookbook-portions-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cookbook-portions-input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.cookbook-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
}

.cookbook-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef3ef;
    color: #334039;
    font-size: 12px;
    font-weight: 700;
}

.cookbook-columns {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.25fr);
    gap: 14px;
    margin-top: 18px;
}

.cookbook-panel {
    padding: 16px;
    border-radius: 18px;
    background: #f7faf7;
}

.cookbook-notes { background: #fff6ef; }

.cookbook-panel h2 {
    margin: 0 0 10px;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1f5c45;
}

.cookbook-prose,
.cookbook-checkable {
    color: #24302a;
    font-size: 0.98rem;
    line-height: 1.55;
}

.cookbook-prose p,
.cookbook-checkable p { margin: 0 0 0.8em; }

.cookbook-prose ol,
.cookbook-prose ul,
.cookbook-checkable ol,
.cookbook-checkable ul {
    margin: 0 0 1em;
    padding-left: 1.15rem;
}

.cookbook-checkable ul {
    list-style: none;
    padding-left: 0;
}

.cookbook-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.cookbook-check input {
    margin-top: 0.3em;
    accent-color: #1f5c45;
}

.cookbook-checkable li.is-done .cookbook-check {
    color: #7a857e;
    text-decoration: line-through;
}

.cookbook-flash { margin: 0 0 14px; }

.cookbook-dialog {
    width: min(420px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: transparent;
}

.cookbook-dialog::backdrop {
    background: rgba(28, 36, 31, 0.45);
}

.cookbook-dialog-card {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(20, 28, 24, 0.25);
}

.cookbook-dialog-card h2 {
    margin: 0;
    font-size: 1.25rem;
}

.cookbook-dialog-card p {
    margin: 0;
    color: #6a746e;
    font-size: 0.95rem;
}

.cookbook-dialog-card input[type="url"] {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(28, 42, 36, 0.12);
    border-radius: 14px;
    font: inherit;
}

.cookbook-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.cookbook-hero-edit {
    position: relative;
    cursor: pointer;
}

.cookbook-hero-edit input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.cookbook-hero-photo-frame {
    display: block;
    width: 100%;
    height: 100%;
}

.cookbook-photo-hint {
    position: absolute;
    left: 16px;
    bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(20, 28, 24, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.cookbook-clear-photo {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0 0;
    color: #6a746e;
    font-size: 13px;
    font-weight: 600;
}

.cookbook-title-input {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    outline: none;
}

.cookbook-title-input::placeholder { color: #9aa49d; }

.cookbook-meta-edit {
    margin-top: 12px;
}

.cookbook-meta-edit label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef3ef;
}

.cookbook-meta-edit input {
    width: 7rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    outline: none;
}

.cookbook-servings-field input {
    width: 3rem;
    text-align: center;
}

.cookbook-servings-field span {
    color: #6a746e;
    font-size: 12px;
    font-weight: 600;
}

.cookbook-tag-editor {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
}

.cookbook-tag-editor .cookbook-tags { margin: 0; }

.cookbook-tag.is-chip {
    background: rgba(31, 92, 69, 0.1);
    color: #1f5c45;
}

.cookbook-chip-remove,
.cookbook-row-remove {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #7a857e;
    font: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.cookbook-tag-add input {
    min-height: 34px;
    min-width: 7rem;
    padding: 0 12px;
    border: 1px dashed rgba(28, 42, 36, 0.18);
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    outline: none;
}

.cookbook-edit-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cookbook-edit-list li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 28px;
    gap: 8px;
    align-items: start;
    margin: 0 0 8px;
}

.cookbook-edit-steps {
    counter-reset: cookbook-step;
}

.cookbook-edit-steps li {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 28px;
    padding-left: 1.7rem;
    counter-increment: cookbook-step;
}

.cookbook-edit-steps li::before {
    content: counter(cookbook-step) ".";
    position: absolute;
    left: 0;
    top: 0.55rem;
    color: #1f5c45;
    font-weight: 700;
}

.cookbook-edit-bullet {
    width: 8px;
    height: 8px;
    margin-top: 0.85rem;
    border-radius: 999px;
    background: #1f5c45;
    justify-self: center;
}

.cookbook-edit-list input,
.cookbook-edit-list textarea,
.cookbook-notes-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.45;
    resize: none;
    outline: none;
}

.cookbook-edit-list input:focus,
.cookbook-edit-list textarea:focus,
.cookbook-notes-input:focus,
.cookbook-title-input:focus {
    border-color: rgba(31, 92, 69, 0.35);
    box-shadow: 0 0 0 3px rgba(31, 92, 69, 0.12);
}

.cookbook-add-row {
    margin: 4px 0 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f5c45;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cookbook-edit-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

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

@media (max-width: 860px) {
    .cookbook-featured {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 760px) {
    .cookbook-shell {
        width: 90%;
    }

    .cookbook-columns {
        grid-template-columns: 1fr;
    }

    .cookbook-recipe > header,
    .cookbook-columns,
    .cookbook-edit-footer,
    .cookbook-clear-photo {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cookbook-nav {
        flex-wrap: wrap;
    }
}

/* ===== Social + Messenger (Facebook-inspired) ===== */
body:has(.fb-shell) {
    background: #f0f2f5;
}
body:has(.fb-shell) .bar {
    background: #fff;
    border-bottom: 1px solid #dddfe2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
body:has(.fb-shell) .bar .mark a { color: #0866ff; }
body:has(.fb-shell) .bar .lede { color: #65676b; }

.fb-shell {
    width: min(680px, 94%);
    margin: 18px auto 56px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #050505;
}

.fb-shell.messenger-wide {
    width: min(920px, 96%);
}

.fb-nav {
    display: flex;
    gap: 4px;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}
.fb-nav a {
    flex: 1 0 auto;
    text-align: center;
    text-decoration: none;
    color: #65676b;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 14px;
    border-radius: 8px;
    border-bottom: 3px solid transparent;
}
.fb-nav a:hover { background: #f0f2f5; color: #050505; }
.fb-nav a.is-active {
    color: #0866ff;
    border-bottom-color: #0866ff;
    background: transparent;
}

.fb-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    overflow: hidden;
}
.fb-card-pad { padding: 12px 16px 14px; }

.fb-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #0866ff, #4b92ff);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    text-decoration: none;
}
.fb-avatar.lg { width: 56px; height: 56px; font-size: 1.25rem; }
.fb-avatar.sm { width: 32px; height: 32px; font-size: 0.8rem; }
.fb-avatar.guardian {
    background: linear-gradient(145deg, #e41e3f, #f5533d);
}

.fb-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.fb-row.center { align-items: center; }

.fb-compose {
    padding: 12px 16px;
}
.fb-compose-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.fb-compose textarea,
.fb-compose input[type="text"],
.fb-compose input[type="search"] {
    width: 100%;
    border: none;
    background: #f0f2f5;
    border-radius: 24px;
    padding: 12px 16px;
    font: inherit;
    resize: vertical;
    min-height: 44px;
}
.fb-compose textarea:focus,
.fb-compose input:focus {
    outline: 2px solid #e7f3ff;
}
.fb-compose-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e4e6eb;
}
.fb-compose-tools label {
    color: #65676b;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}
.fb-btn {
    appearance: none;
    border: none;
    border-radius: 8px;
    background: #0866ff;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 18px;
    cursor: pointer;
}
.fb-btn:hover { background: #0756d6; }
.fb-btn.secondary {
    background: #e4e6eb;
    color: #050505;
}
.fb-btn.secondary:hover { background: #d8dadf; }
.fb-btn.ghost {
    background: transparent;
    color: #0866ff;
}
.fb-btn.danger {
    background: #e4e6eb;
    color: #e41e3f;
}
.fb-btn.block { width: 100%; }
.fb-btn.sm { padding: 8px 12px; font-size: 0.85rem; }

.fb-banner {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(120deg, #fff5f5, #fff);
    border-left: 4px solid #e41e3f;
}
.fb-banner strong { display: block; font-size: 1.05rem; }
.fb-banner p { margin: 4px 0 8px; color: #65676b; font-size: 0.92rem; }
.fb-banner a {
    color: #0866ff;
    font-weight: 700;
    text-decoration: none;
}

.fb-post-head {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.fb-post-head .name { font-weight: 700; color: #050505; text-decoration: none; }
.fb-post-head .name:hover { text-decoration: underline; }
.fb-post-head .meta { color: #65676b; font-size: 0.82rem; }
.fb-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ffe6ea;
    color: #e41e3f;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}
.fb-post-body {
    font-size: 1.02rem;
    line-height: 1.45;
    margin: 0 0 10px;
    white-space: pre-wrap;
}
.fb-post-photo {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    background: #000;
}
.fb-stats {
    display: flex;
    justify-content: space-between;
    color: #65676b;
    font-size: 0.9rem;
    padding: 10px 0 6px;
    border-bottom: 1px solid #e4e6eb;
}
.fb-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding-top: 4px;
}
.fb-actions form { margin: 0; }
.fb-actions button,
.fb-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    color: #65676b;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}
.fb-actions button:hover,
.fb-actions a:hover { background: #f0f2f5; }
.fb-actions .is-liked { color: #0866ff; }

.fb-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 8px 4px 12px;
}
.fb-subtle { color: #65676b; margin: 0 4px 14px; }

.fb-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #e4e6eb;
}
.fb-person:first-child { border-top: none; }
.fb-person .info { flex: 1; min-width: 0; }
.fb-person .info strong { display: block; }
.fb-person .info span { color: #65676b; font-size: 0.88rem; }
.fb-person-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-person select {
  min-height: 36px;
  border: 1px solid #ccd0d5;
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  font: inherit;
}

.fb-cover {
    height: 140px;
    background: linear-gradient(135deg, #0866ff 0%, #54c7ff 55%, #e7f3ff 100%);
}
.fb-cover.guardian {
    background: linear-gradient(135deg, #e41e3f 0%, #ff7a59 55%, #ffe6ea 100%);
}
.fb-profile-block {
    padding: 0 16px 16px;
    margin-top: -28px;
}
.fb-profile-block h1 {
    margin: 10px 0 4px;
    font-size: 1.6rem;
}
.fb-back {
    display: inline-block;
    margin: 0 0 12px;
    color: #0866ff;
    font-weight: 700;
    text-decoration: none;
}

.fb-comment {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}
.fb-comment-bubble {
    background: #f0f2f5;
    border-radius: 18px;
    padding: 8px 12px;
    flex: 1;
}
.fb-comment-bubble strong { display: block; font-size: 0.9rem; }
.fb-comment-bubble p { margin: 2px 0 0; font-size: 0.95rem; }

.fb-empty {
    text-align: center;
    color: #65676b;
    padding: 28px 16px;
}

/* Messenger layout */
.msg-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 860px) {
    .msg-layout { grid-template-columns: 1fr; }
}
.msg-sidebar,
.msg-pane {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.msg-sidebar-head,
.msg-pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #e4e6eb;
}
.msg-sidebar-head h1,
.msg-pane-head h1 {
    margin: 0;
    font-size: 1.35rem;
}
.msg-list a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f2f5;
}
.msg-list a:hover,
.msg-list a.is-active { background: #e7f3ff; }
.msg-list .preview {
    flex: 1;
    min-width: 0;
}
.msg-list .preview strong {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.98rem;
}
.msg-list .preview p {
    margin: 2px 0 0;
    color: #65676b;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-unread {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #0866ff;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.msg-thread {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    min-height: 420px;
    max-height: 62vh;
    overflow-y: auto;
    background: #f0f2f5;
}
.msg-bubble {
    max-width: min(72%, 420px);
    padding: 10px 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
    align-self: flex-start;
}
.msg-bubble.is-mine {
    align-self: flex-end;
    background: #0866ff;
    color: #fff;
    border-bottom-right-radius: 6px;
}
.msg-bubble:not(.is-mine) { border-bottom-left-radius: 6px; }
.msg-bubble .who {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.75;
}
.msg-bubble img {
    display: block;
    max-width: 100%;
    border-radius: 12px;
    margin-top: 6px;
}
.msg-composer {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 12px 14px;
    border-top: 1px solid #e4e6eb;
    background: #fff;
}
.msg-composer textarea {
    flex: 1;
    border: none;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 12px 14px;
    font: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
}
.msg-composer input[type="file"] { max-width: 140px; font-size: 0.75rem; }

.fb-flash {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 600;
}
.fb-flash.ok { background: #e7f3ff; color: #0866ff; }
.fb-flash.bad { background: #ffe6ea; color: #e41e3f; }

/* Social left rail (Facebook-style) */
.fb-shell.social-wide {
    width: min(1180px, 96%);
}
.fb-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
@media (max-width: 900px) {
    .fb-layout { grid-template-columns: 1fr; }
    .fb-rail { position: static !important; }
}
.fb-rail {
    position: sticky;
    top: 16px;
}
.fb-rail-card {
    background: transparent;
    padding: 4px 0;
}
.fb-rail-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 8px;
}
.fb-rail-profile:hover { background: #e4e6eb; }
.fb-rail-profile strong {
    display: block;
    font-size: 1.02rem;
}
.fb-rail-profile span {
    color: #65676b;
    font-size: 0.85rem;
}
.fb-rail-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #050505;
    font-weight: 600;
    font-size: 0.98rem;
}
.fb-rail-link:hover { background: #e4e6eb; }
.fb-rail-link.is-active {
    background: #e7f3ff;
    color: #0866ff;
}
.fb-rail-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e4e6eb;
    color: #0866ff;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.fb-rail-link.is-active .fb-rail-icon { background: #0866ff; color: #fff; }
.fb-rail-icon.msg { background: #e7f3ff; }
.fb-rail-icon.events { background: #fff0e6; color: #f68511; }
.fb-rail-section {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #ccd0d5;
}
.fb-rail-section h3 {
    margin: 0 12px 8px;
    font-size: 1.05rem;
    color: #65676b;
}
.fb-rail-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #050505;
    font-weight: 600;
    font-size: 0.92rem;
}
.fb-rail-group:hover { background: #e4e6eb; }
.fb-rail-group .fb-avatar { width: 28px; height: 28px; font-size: 0.7rem; }
.fb-main { min-width: 0; }
.fb-top-mini {
    display: none;
}
@media (max-width: 900px) {
    .fb-top-mini {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        margin-bottom: 12px;
    }
    .fb-top-mini a {
        flex: 0 0 auto;
        text-decoration: none;
        background: #fff;
        color: #65676b;
        font-weight: 600;
        padding: 10px 14px;
        border-radius: 999px;
        box-shadow: 0 1px 2px rgba(0,0,0,.08);
    }
    .fb-top-mini a.is-active { color: #0866ff; }
}

/* —— Guardian Music (Spotify-inspired shared library) —— */
body:has(.music-shell),
body:has(.ms-shell) {
  background: #0a0a0a;
  color: #f2f2f2;
  margin: 0;
}
body:has(.music-shell) {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}
body:has(.music-shell) > header,
body:has(.music-shell) > footer,
body:has(.music-shell) .lede,
body:has(.music-shell) .bar,
body:has(.ms-shell) > header,
body:has(.ms-shell) > footer,
body:has(.ms-shell) .lede,
body:has(.ms-shell) .bar { display: none; }
/* Site chrome caps <main> at 1120px — music must use the full shell column. */
body:has(.music-shell) main,
body:has(.music-shell) main.music-main {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
.music-shell {
  --music-green: #1DB954;
  --music-green-2: #1ed760;
  --music-surface: #181818;
  --music-elevated: #282828;
  --music-muted: #b3b3b3;
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  background: #121212;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow: hidden;
}
.music-nav {
  grid-row: 1 / 3;
  background: #000;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.music-brand {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 12px 20px;
  text-decoration: none;
}
.music-nav-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
}
.music-admin-btn {
  display: block;
  text-align: center;
  margin: 0 4px;
  padding: 12px 16px !important;
  border-radius: 999px !important;
  background: #1db954 !important;
  color: #000 !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(29, 185, 84, 0.35);
}
.music-admin-btn:hover,
.music-nav a.music-admin-btn:hover,
.music-nav a.music-admin-btn.is-active {
  background: #1ed760 !important;
  color: #000 !important;
  filter: brightness(1.05);
}
.music-powered {
  margin: 0 0 4px;
  padding: 0 12px;
  font-size: 0.72rem;
  color: #6a6a6a;
}
.music-powered a {
  color: #9a9a9a;
  text-decoration: none;
  padding: 0 !important;
  font-weight: 500;
  background: none !important;
  border-radius: 0 !important;
}
.music-powered a:hover {
  color: #fff;
  background: none !important;
}
footer a {
  color: inherit;
}

/* Guardian Music local user admin */
.mu-list-panel,
.mu-form-panel {
  padding: 0;
  overflow: hidden;
}
.mu-list-head,
.mu-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #ececec;
}
.mu-list-head h1,
.mu-form-head h1 {
  margin: 0;
  font-size: 1.2rem;
}
.mu-list-head .help,
.mu-form-head .help {
  margin: 4px 0 0;
}
.mu-form-head-edit {
  align-items: center;
}
.mu-form-head-edit > div h1 {
  margin: 0;
}
.mu-add {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  flex: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, background 0.12s ease;
}
.mu-add:hover,
.mu-add:focus-visible {
  background: #111;
  transform: scale(1.04);
  outline: none;
}
.mu-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mu-user-list li + li {
  border-top: 1px solid #f0f0f0;
}
.mu-user-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  color: inherit;
  text-decoration: none;
}
.mu-user-row:hover,
.mu-user-row:focus-visible {
  background: #fafafa;
  outline: none;
}
.mu-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(145deg, #1DB954, #0f7a36);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
}
.mu-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mu-user-meta strong {
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mu-user-meta span {
  color: var(--label);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mu-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f0f0f0;
  color: var(--label);
}
.mu-pill.is-admin {
  background: #e8f8ee;
  color: #0f7a36;
}
.mu-pill.is-ok {
  background: #eef3ff;
  color: #2550b0;
}
.mu-pill.is-wait {
  background: #fff4e5;
  color: #9a5b00;
}
.mu-chevron {
  color: #b0b0b0;
  font-size: 22px;
  line-height: 1;
}
.mu-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--label);
}
.mu-empty .primary {
  margin-top: 12px;
}
.mu-form {
  padding: 8px 20px 20px;
}
.mu-fields {
  display: grid;
  gap: 4px;
  max-width: 420px;
}
.mu-checks {
  margin-top: 8px;
  padding-top: 4px;
  max-width: 420px;
}
.mu-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.mu-actions .primary {
  margin: 12px 0 0;
}
.mu-ghost {
  color: var(--label);
  font-size: 14px;
  text-decoration: none;
  margin-top: 12px;
}
.mu-ghost:hover {
  color: var(--ink);
}
.mu-danger {
  margin: 0;
  padding: 14px 20px 18px;
  border-top: 1px solid #f0f0f0;
  background: #fcfcfc;
}
.mu-danger button {
  padding: 0;
  border: 0;
  background: none;
  color: #b3261e;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.mu-danger button:hover {
  text-decoration: underline;
}
@media (max-width: 700px) {
  .mu-user-row {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .mu-chevron { display: none; }
}
.music-nav a {
  color: var(--music-muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 650;
}
.music-nav a:hover,
.music-nav a.is-active { color: #fff; background: #121212; }
.music-nav-search {
  display: flex;
  align-items: center;
  gap: 10px;
}
.music-nav-icon {
  flex: 0 0 auto;
  opacity: .92;
}
.sp-search-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  margin: 0 0 8px;
  padding: 12px 16px;
  border-radius: 500px;
  background: #242424;
  box-shadow: 0 0 0 1px transparent;
  transition: box-shadow .15s ease, background .15s ease;
}
.sp-search-bar-home {
  margin: 0 0 22px;
  max-width: min(420px, 100%);
}
.music-home-search-results:not([hidden]) {
  margin-bottom: 8px;
}
.sp-search-bar:focus-within {
  background: #2a2a2a;
  box-shadow: 0 0 0 2px #fff;
}
.sp-search-icon {
  display: flex;
  color: #fff;
  flex: 0 0 auto;
}
.sp-search-bar input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 550;
}
.sp-search-bar input[type="search"]::placeholder {
  color: #b3b3b3;
  font-weight: 500;
}
.sp-search-bar input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  background: radial-gradient(circle, #b3b3b3 40%, transparent 42%);
  cursor: pointer;
}
.sp-search-empty {
  margin: 36px 0 0;
  color: #b3b3b3;
  font-size: 1.05rem;
}
.sp-shelf-title {
  margin: 0 0 14px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.music-main {
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 24px 32px;
  overflow: auto;
  background: #121212;
}
.music-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 12;
  /* Break out of .music-main padding so the bar is edge-to-edge. */
  margin: -16px -24px 8px;
  padding: 12px 24px;
  background: transparent;
}
.music-profile {
  position: relative;
}
.music-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}
.music-profile-btn:hover {
  background: #282828;
}
.music-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #535353;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.music-profile-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}
.music-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #282828;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.music-profile-menu[hidden] {
  display: none !important;
}
.music-profile-who {
  padding: 10px 12px 8px;
  color: #b3b3b3;
  font-size: 0.78rem;
  border-bottom: 1px solid #3e3e3e;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-profile-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #fff;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 4px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.music-profile-item:hover {
  background: #3e3e3e;
}
.music-profile form {
  margin: 0;
}
.music-android-prompt {
  position: fixed;
  left: 240px;
  right: 12px;
  bottom: 96px;
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #282828;
  color: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}
.music-android-prompt[hidden] {
  display: none !important;
}
.music-android-prompt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.music-android-prompt-text strong {
  font-size: 0.95rem;
}
.music-android-prompt-text span {
  color: #b3b3b3;
  font-size: 0.82rem;
}
.music-android-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.music-android-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--music-green);
  color: #000;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.86rem;
}
.music-android-install:hover {
  background: var(--music-green-2);
}
.music-android-later,
.music-android-never {
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.music-android-later:hover,
.music-android-never:hover {
  background: #3e3e3e;
}
.music-hero {
  display: flex;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}
.music-hero-art {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  background: var(--music-elevated);
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.music-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.music-hero p { margin: 0; color: var(--music-muted); }
.music-section { margin-bottom: 32px; }
.music-section h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.music-card {
  background: var(--music-surface);
  border: 0;
  border-radius: 10px;
  padding: 14px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background .15s ease;
  text-decoration: none;
  display: block;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}
.music-card:hover { background: var(--music-elevated); }
.music-card img,
.music-card strong,
.music-card span { pointer-events: none; }

/* Spotify-like Home */
.music-home {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 8px 0 40px;
  isolation: isolate;
}
.music-home-fade {
  position: absolute;
  left: -24px;
  right: -24px;
  /* Pull behind the sticky profile topbar so the wash is full-width. */
  top: -72px;
  height: 380px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #535353 0%, #121212 100%);
  opacity: .9;
}
.music-home > *:not(.music-home-fade) {
  position: relative;
  z-index: 1;
}
.music-home-greeting {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
}
.music-home-empty { color: var(--music-muted); margin: 0; }

/* Top mix / recently played shortcuts — Spotify 2x3/2x4 tiles */
.sp-topmix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
@media (min-width: 900px) {
  .sp-topmix { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .sp-topmix { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sp-topmix-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  height: 48px;
  background: hsla(0,0%,100%,.07);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  transition: background .2s ease;
}
@media (min-width: 720px) {
  .sp-topmix-item {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    height: 64px;
  }
}
.sp-topmix-item:hover { background: hsla(0,0%,100%,.14); }
.sp-topmix-art {
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: #333;
}
@media (min-width: 720px) {
  .sp-topmix-art { width: 64px; height: 64px; }
}
.sp-topmix-title {
  padding: 0 12px;
  font-size: .875rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-topmix-play {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
.sp-topmix-item:hover .sp-topmix-play {
  opacity: 1;
  transform: translateY(0);
}

/* Horizontal shelves */
.sp-shelf { min-width: 0; }
.sp-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}
.sp-shelf-head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sp-shelf-head a {
  color: #b3b3b3;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}
.sp-shelf-head a:hover {
  color: #fff;
  text-decoration: underline;
}
.sp-shelf-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 8px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sp-shelf-row::-webkit-scrollbar { display: none; }

/* Album / playlist / artist card — fixed width like Spotify */
.sp-card {
  flex: 0 0 182px;
  width: 182px;
  max-width: 182px;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 8px;
  background: transparent;
  text-decoration: none;
  color: #fff;
  scroll-snap-align: start;
  transition: background .25s ease;
}
.sp-card:hover { background: #1a1a1a; }
.sp-card-cover {
  position: relative;
  width: 158px;
  height: 158px;
  margin: 0 0 14px;
}
.sp-card-cover.is-round,
.sp-card-cover.is-round .sp-card-img {
  border-radius: 50%;
}
.sp-card-img {
  display: block;
  width: 158px;
  height: 158px;
  max-width: 158px;
  border-radius: 6px;
  object-fit: cover;
  background: #282828;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.sp-card-ph {
  display: grid;
  place-items: center;
  color: #7a7a7a;
  font-size: 2.5rem;
}
.sp-liked-art {
  display: grid;
  place-items: center;
  /* Android Text("♥") renders as a red system emoji on the purple tile */
  color: #ff2d55;
  font-size: 2rem;
  background: linear-gradient(135deg, #450af5, #8e8ee6);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.sp-card-play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 48px;
  height: 48px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: #1db954;
  color: #000;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, background .15s ease, scale .15s ease;
  pointer-events: none;
  z-index: 2;
}
.sp-card-play:hover { background: #1ed760; scale: 1.06; }
.sp-card:hover .sp-card-play,
.sp-topmix-item:hover .sp-topmix-play {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sp-topmix-play {
  position: relative;
  right: auto;
  bottom: auto;
}
.sp-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px;
}
.sp-card-sub {
  font-size: .875rem;
  line-height: 1.4;
  color: #b3b3b3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-home-queue { display: none !important; }
.music-liked-art {
  display: grid;
  place-items: center;
  color: #ff2d55;
  background: linear-gradient(135deg, #450af5, #8e8ee6);
}
.music-liked-card .music-liked-art,
.music-card .music-ph.music-liked-art {
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: #ff2d55;
  /* Beat .music-card .music-ph { background:#333 } so Library keeps the tile */
  background: linear-gradient(135deg, #450af5, #8e8ee6) !important;
}
.music-liked-art.music-album-cover {
  display: grid;
  place-items: center;
  font-size: 5rem;
  color: #ff2d55;
  background: linear-gradient(135deg, #450af5, #8e8ee6);
}
.music-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.music-create-playlist { margin: 0; }
.music-plus-btn {
  border: 0;
  background: rgba(255,255,255,.08);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.music-plus-btn:hover { background: rgba(255,255,255,.14); }
.music-playlist-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}
.music-playlist-kicker {
  margin: 0;
  color: #b3b3b3;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
}
.music-playlist-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 560px);
}
.music-playlist-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
}
.music-playlist-title-input {
  width: min(100%, 520px);
  flex: 1 1 auto;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font: inherit;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  padding: 0 0 4px;
  margin: 0;
  outline: none;
}
/* Beat global input[type=text]{display:block} so [hidden] actually hides. */
.music-playlist-title[hidden],
.music-playlist-title-input[hidden],
.music-icon-btn[hidden] {
  display: none !important;
}
.music-playlist-title-row:not(.is-editing) .music-playlist-title-input {
  display: none !important;
}
.music-playlist-title-row.is-editing .music-playlist-title,
.music-playlist-title-row.is-editing #playlist-rename-btn {
  display: none !important;
}
.music-icon-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b3b3b3;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}
.music-icon-btn:hover,
.music-icon-btn[aria-expanded="true"] {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.music-playlist-more {
  position: relative;
}
.music-playlist-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: #282828;
  border: 1px solid #3e3e3e;
  border-radius: 10px;
  padding: 6px;
  z-index: 40;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.music-playlist-more-menu[hidden] { display: none !important; }
.music-playlist-more-menu form { margin: 0; }
.music-playlist-more-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
}
.music-playlist-more-item:hover { background: rgba(255,255,255,.08); }
.music-playlist-more-item.is-danger { color: #f5a8a8; }
.music-playlist-more-item.is-danger:hover { background: rgba(255,80,80,.12); }
.music-playlist-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.music-playlist-cover-empty {
  display: grid;
  place-items: center;
  font-size: 4rem;
  color: #b3b3b3;
  background: #282828;
}
.music-album-header {
  display: flex;
  gap: 24px;
  align-items: end;
  flex-wrap: wrap;
}
.music-album-cover {
  width: min(220px, 42vw);
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: #333;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  flex: 0 0 auto;
}
.music-album-cover.is-round {
  border-radius: 50%;
}
.music-row-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 0;
  align-items: stretch;
  width: 100%;
  border-radius: 8px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.music-row-wrap.has-track-more {
  grid-template-columns: minmax(0, 1fr) 48px 40px;
}
.music-row-wrap.has-track-more:not(:has(.music-like-btn)) {
  grid-template-columns: minmax(0, 1fr) auto 40px;
}
.music-track-more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.music-track-more-btn {
  width: 40px;
  height: 100%;
  min-height: 64px;
  opacity: 0.55;
}
.music-row-wrap:hover .music-track-more-btn,
.music-track-more-btn[aria-expanded="true"] {
  opacity: 1;
}
.music-track-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% - 8px);
  min-width: 180px;
  background: #282828;
  border: 1px solid #3e3e3e;
  border-radius: 10px;
  padding: 6px;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.music-track-more-menu[hidden] { display: none !important; }
.music-row-wrap:hover,
.music-row-wrap.is-playing,
.music-row-wrap:has(.music-row.is-playing) {
  background: rgba(255,255,255,.08);
}
.music-like-btn {
  border: 0;
  background: transparent;
  color: var(--music-muted);
  width: 48px;
  height: 100%;
  min-height: 64px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  z-index: 2;
  position: relative;
}
.music-like-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.music-like-btn.is-liked { color: var(--music-green); }
.music-playlist-menu {
  position: absolute;
  right: 12px;
  bottom: calc(100% + 8px);
  min-width: 220px;
  background: #282828;
  border: 1px solid #3e3e3e;
  border-radius: 10px;
  padding: 8px;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.music-playlist-menu[hidden] { display: none !important; }
.music-playlist-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.music-playlist-menu button:hover { background: rgba(255,255,255,.08); }
.music-actions { position: relative; }
.music-card img,
.music-card .music-ph {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  background: #333;
}
.music-card strong { display: block; font-size: .95rem; }
.music-card span { color: var(--music-muted); font-size: .82rem; }
.music-rows { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.music-row {
  display: grid;
  grid-template-columns: 40px 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  min-height: 64px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.music-row-wrap .music-row { width: 100%; }
.music-row:focus-visible {
  outline: 2px solid var(--music-green);
  outline-offset: -2px;
}
.music-row img,
.music-row .music-ph {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #333;
  pointer-events: none;
}
.music-row .idx {
  color: var(--music-muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.music-row .dur {
  color: var(--music-muted);
  font-variant-numeric: tabular-nums;
  font-size: .85rem;
  pointer-events: none;
}
.music-row-meta {
  min-width: 0;
  display: block;
  pointer-events: none;
}
.music-row-title,
.music-row-sub {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.music-row-title {
  font-weight: 700;
  color: #fff;
}
.music-row-sub { color: var(--music-muted); font-size: .82rem; }
.music-player {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 42%) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: #181818;
  border-top: 1px solid #282828;
  padding: 10px 18px;
  min-height: 90px;
  z-index: 40;
  position: relative;
}
.music-player > .music-now { justify-self: start; min-width: 0; max-width: 100%; }
.music-player > .music-controls {
  justify-self: center;
  width: 100%;
  max-width: 560px;
}
.music-player > .music-actions { justify-self: end; }
.music-now {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}
.music-now:hover .music-now-text strong { text-decoration: underline; }
.music-now img,
.music-now .music-ph {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
  background: #333;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.music-now-text { min-width: 0; }
.music-now strong, .music-now span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-now span { color: var(--music-muted); font-size: .82rem; }
.music-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.music-buttons {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.music-buttons button {
  border: 0;
  background: transparent;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  opacity: .9;
}
.music-buttons button:hover { opacity: 1; transform: scale(1.06); }
.music-buttons .play {
  background: #fff;
  color: #000;
  width: 42px;
  height: 42px;
  font-size: 1rem;
  opacity: 1;
}
.music-seek {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--music-muted);
  font-size: .75rem;
}
.music-seek input[type=range] { flex: 1; accent-color: var(--music-green); }
.music-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; width: 100%; }
.music-expand-btn {
  border: 0;
  background: transparent;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  opacity: .85;
}
.music-expand-btn:hover { opacity: 1; background: rgba(255,255,255,.08); }
body.music-nowplaying-open { overflow: hidden; }
body.music-nowplaying-open .music-nav,
body.music-nowplaying-open .music-main {
  /* Visual only — never disable pointer events here or soft-nav can leave the page unclickable. */
  visibility: hidden;
}
body.music-nowplaying-open .music-player {
  z-index: 90;
}
body.music-nowplaying-open .music-expand-btn#btn-expand {
  transform: rotate(180deg);
}
.music-nowplaying {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 90px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  color: #fff;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  background: #0b0b0b;
  overflow: auto;
}
.music-nowplaying[hidden] {
  display: none !important;
}
.music-nowplaying.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.music-nowplaying-scrim {
  display: none;
}
.music-nowplaying-bg {
  position: absolute;
  inset: -60px;
  z-index: 0;
  background: #121212 center/cover no-repeat;
  filter: blur(70px) saturate(1.4);
  transform: scale(1.2);
  opacity: .55;
  pointer-events: none;
}
.music-nowplaying-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,11,.35), rgba(11,11,11,.82) 45%, #0b0b0b 100%);
  pointer-events: none;
}
.music-nowplaying-inner {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 20px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-height: 100%;
  box-sizing: border-box;
  /* Inherit pointer-events from .music-nowplaying — auto here while closed
     re-enables clicks on an invisible overlay and blocks albums/search. */
}
.music-nowplaying-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.music-nowplaying-top {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}
.music-nowplaying-chevron {
  border: 0;
  background: rgba(255,255,255,.06);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}
.music-nowplaying-chevron:hover { background: rgba(255,255,255,.14); }
.music-nowplaying-context {
  text-align: center;
  min-width: 0;
}
.music-nowplaying-context span {
  display: block;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--music-muted);
}
.music-nowplaying-context strong {
  display: block;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-nowplaying-spacer { width: 44px; height: 44px; }
.music-nowplaying-art-wrap {
  display: grid;
  place-items: center;
  padding: 8px 0 4px;
  flex: 1;
  min-height: 0;
}
.music-nowplaying-art {
  width: min(68vw, 380px);
  max-height: min(48vh, 380px);
  aspect-ratio: 1;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  background: #333;
  box-shadow: 0 28px 80px rgba(0,0,0,.55);
}
.music-nowplaying-meta {
  text-align: left;
  padding: 0 4px;
  width: 100%;
}
.music-nowplaying-meta strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.music-nowplaying-meta span {
  color: var(--music-muted);
  font-size: 1rem;
}
.music-nowplaying-seek {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.music-nowplaying-seek input[type=range] { width: 100%; }
.music-nowplaying-times {
  display: flex;
  justify-content: space-between;
  color: var(--music-muted);
  font-size: .75rem;
  width: 100%;
}
.music-nowplaying-buttons {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 4px 0 8px;
}
.music-nowplaying-buttons .play {
  width: 64px;
  height: 64px;
  font-size: 1.35rem;
}
.music-nowplaying-buttons button {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
}
.music-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  background: var(--music-green);
  color: #000;
}
.music-btn.secondary { background: transparent; color: #fff; border: 1px solid #444; }
.music-panel {
  background: var(--music-surface);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}
.music-panel h3 { margin: 0 0 12px; }
.music-panel input[type=search],
.music-panel input[type=text],
.music-panel input[type=file] {
  width: 100%;
  background: #121212;
  border: 1px solid #333;
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.music-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.music-search-bar input[type=search] {
  flex: 1;
  min-width: 200px;
  background: #121212;
  color: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 14px;
}
.music-search-hit {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #222;
  margin: 0;
}
.music-search-hit img,
.music-search-hit .music-ph {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
}
.music-search-hit .music-btn { white-space: nowrap; }
.music-search-hit .music-btn.is-requested {
  background: #535353;
  color: #fff;
  cursor: default;
}
.music-search-kind {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--music-muted);
  margin-bottom: 2px;
}
.music-catalog-hint {
  margin: -4px 0 12px;
  color: #b3b3b3;
  font-size: .9rem;
}
.music-catalog-list {
  display: flex;
  flex-direction: column;
}
.music-monitor-page > .music-monitor-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.music-monitor-page > .music-monitor-title h1 {
  margin: 0;
}
.music-monitor-refresh {
  color: var(--music-muted, #b3b3b3);
  font-size: .75rem;
  white-space: nowrap;
}
.music-monitor-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.music-monitor-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.music-monitor-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid hsla(0,0%,100%,.12);
  border-radius: 10px;
  background: hsla(0,0%,100%,.04);
  color: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: .95rem;
}
.music-monitor-search:focus {
  outline: none;
  border-color: hsla(141, 76%, 48%, .55);
  background: hsla(0,0%,100%,.06);
}
.music-monitor-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.music-monitor-filter {
  border: 1px solid hsla(0,0%,100%,.1);
  background: transparent;
  color: var(--music-muted, #b3b3b3);
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.music-monitor-filter:hover {
  color: #fff;
  border-color: hsla(0,0%,100%,.22);
}
.music-monitor-filter.is-active {
  color: #000;
  background: var(--music-green, #1db954);
  border-color: transparent;
  font-weight: 600;
}
.music-monitor-pager {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  color: var(--music-muted, #b3b3b3);
  font-size: .9rem;
}
.music-monitor-pager .music-btn[disabled] {
  opacity: .4;
  cursor: default;
}
.music-monitor-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: transparent;
  border: 1px solid hsla(0,0%,100%,.08);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--music-muted, #b3b3b3);
  font-size: .8rem;
}
.music-monitor-chip strong {
  color: #fff;
  font-size: .9rem;
  line-height: 1;
}
.music-monitor-block {
  margin: 0 0 28px;
}
.music-monitor-block-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  text-align: left;
}
.music-monitor-block-head span {
  color: var(--music-muted, #b3b3b3);
  font-size: .8rem;
  font-weight: 600;
}
.music-monitor-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border-top: 1px solid hsla(0,0%,100%,.06);
}
.music-monitor-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid hsla(0,0%,100%,.06);
  background: transparent;
  border-radius: 0;
}
.music-monitor-row:hover {
  background: transparent;
}
.music-monitor-badge {
  display: inline-block;
  margin-top: 2px;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: lowercase;
  text-align: center;
  background: hsla(0,0%,100%,.08);
  color: #cfcfcf;
  justify-self: start;
}
.music-monitor-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.music-monitor-name {
  overflow-wrap: anywhere;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}
.music-monitor-row.stage-downloading .music-monitor-badge,
.music-monitor-row.stage-converting .music-monitor-badge,
.music-monitor-row.stage-awaiting_import .music-monitor-badge {
  background: rgba(29, 185, 84, .16);
  color: #1ed760;
}
.music-monitor-row.stage-stalled .music-monitor-badge,
.music-monitor-row.stage-import_error .music-monitor-badge,
.music-monitor-row.stage-error .music-monitor-badge {
  background: rgba(233, 20, 41, .16);
  color: #ff8a8a;
}
.music-monitor-row.stage-queued .music-monitor-badge,
.music-monitor-row.stage-paused .music-monitor-badge,
.music-monitor-row.stage-preparing .music-monitor-badge,
.music-monitor-row.stage-waiting .music-monitor-badge,
.music-monitor-row.stage-pending .music-monitor-badge {
  background: hsla(0,0%,100%,.08);
  color: #ddd;
}
.music-monitor-row.stage-imported .music-monitor-badge,
.music-monitor-row.stage-cleaned .music-monitor-badge,
.music-monitor-row.stage-done .music-monitor-badge,
.music-monitor-row.stage-seeding .music-monitor-badge {
  background: hsla(0,0%,100%,.06);
  color: #aaa;
}
.music-monitor-bar {
  height: 3px;
  border-radius: 999px;
  background: hsla(0,0%,100%,.08);
  overflow: hidden;
  margin-top: 5px;
  max-width: 280px;
}
.music-monitor-bar > span {
  display: block;
  height: 100%;
  background: #1DB954;
  border-radius: inherit;
  transition: width .4s ease;
}
.music-monitor-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
  color: var(--music-muted, #b3b3b3);
  font-size: .75rem;
  line-height: 1.35;
}
.music-monitor-meta > span {
  white-space: nowrap;
}
.music-monitor-dot {
  margin: 0 5px;
  opacity: .55;
}
.music-monitor-detail {
  margin: 0;
  color: var(--music-muted, #b3b3b3);
  font-size: .78rem;
  line-height: 1.35;
}
.music-monitor-detail.is-error {
  color: #ff8a8a;
}
.music-monitor-empty {
  margin: 0;
  padding: 8px 0;
  color: var(--music-muted, #b3b3b3);
  font-size: .9rem;
}
.music-monitor-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid #e91429;
  background: rgba(233, 20, 41, .08);
  color: #ffb4b4;
  font-size: .85rem;
}
.music-now-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid hsla(0,0%,100%,.06);
}
.music-now-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid hsla(0,0%,100%,.06);
}
.music-now-cover {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: hsla(0,0%,100%,.06);
}
.music-now-cover-ph {
  display: block;
}
.music-now-body {
  min-width: 0;
}
.music-now-title {
  display: block;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-now-sub,
.music-now-meta {
  color: var(--music-muted, #b3b3b3);
  font-size: .8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-now-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 2px 0 6px;
}
.music-now-end {
  white-space: nowrap;
}
@media (max-width: 640px) {
  .music-monitor-row {
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 10px;
  }
  .music-now-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .music-now-end {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
@media (max-width: 900px) {
  .music-shell { grid-template-columns: 1fr; }
  .music-nav { grid-row: auto; flex-direction: row; overflow-x: auto; padding: 12px; }
  .music-brand { margin: 0 12px 0 0; }
  .music-profile-name { display: none; }
  .music-android-prompt {
    left: 12px;
    right: 12px;
    bottom: 124px;
  }
  .music-player {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "now expand"
      "controls controls";
    gap: 8px 12px;
    padding: 10px 12px 12px;
  }
  .music-now { grid-area: now; }
  .music-actions { grid-area: expand; }
  .music-controls { grid-area: controls; width: 100%; max-width: none; }
  .music-seek { width: 100%; }
  .music-hero { flex-direction: column; align-items: start; }
  .music-nowplaying { bottom: 118px; }
  .music-nowplaying-art { width: min(78vw, 320px); max-height: min(42vh, 320px); }
  .music-album-header { align-items: start; }
}

/* User settings (music mode) */
.ms-shell {
  --music-green: #1DB954;
  --music-green-2: #1ed760;
  min-height: 100vh;
  min-height: 100dvh;
  background: #121212;
  color: #f2f2f2;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding: 24px 20px 48px;
  box-sizing: border-box;
}
.ms-top {
  max-width: 560px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ms-back {
  color: #b3b3b3;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
}
.ms-back:hover { color: #fff; }
.ms-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
}
.ms-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #535353;
  font-size: 0.8rem;
  font-weight: 700;
}
.ms-main {
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.ms-main h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  letter-spacing: -0.03em;
}
.ms-lede {
  margin: 0 0 22px;
  color: #b3b3b3;
}
.ms-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #1f3d2a;
  color: #b6f3c8;
  font-weight: 600;
}
.ms-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #282828;
  color: #b3b3b3;
}
.ms-card {
  background: #181818;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.ms-card h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}
.ms-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ms-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 650;
  color: #b3b3b3;
}
.ms-form input {
  border: 0;
  border-radius: 8px;
  background: #121212;
  color: #fff;
  padding: 12px 14px;
  font: inherit;
  font-weight: 500;
}
.ms-form input:focus {
  outline: 2px solid #fff;
  outline-offset: 0;
}
.ms-form input:disabled,
.ms-form input[readonly] {
  color: #7a7a7a;
  cursor: not-allowed;
}
.ms-help {
  margin: 0;
  color: #7a7a7a;
  font-size: 0.82rem;
  font-weight: 500;
}
.ms-btn {
  align-self: flex-start;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--music-green);
  color: #000;
  font: inherit;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
}
.ms-btn:hover { background: var(--music-green-2); }
.ms-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 16px;
}
.ms-dl dt {
  color: #7a7a7a;
  font-size: 0.82rem;
  font-weight: 650;
}
.ms-dl dd {
  margin: 0;
  font-weight: 600;
}
.ms-foot {
  max-width: 560px;
  margin: 28px auto 0;
  color: #6a6a6a;
  font-size: 0.78rem;
}
.ms-foot a {
  color: #9a9a9a;
  text-decoration: none;
}
.ms-foot a:hover { color: #fff; }

/* Import page */
.music-import-page { max-width: 960px; }
.music-import-hero { margin-bottom: 26px; }
.music-import-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  letter-spacing: -0.03em;
}
.music-import-hero p {
  margin: 0;
  color: var(--music-muted, #b3b3b3);
  max-width: 40rem;
  line-height: 1.5;
  font-size: .98rem;
}
.music-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.music-import-card {
  background: linear-gradient(180deg, #1c1c1c 0%, #151515 100%);
  border: 1px solid hsla(0,0%,100%,.06);
  border-radius: 14px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}
.music-import-card-featured {
  grid-column: 1 / -1;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(29, 185, 84, .16), transparent 55%),
    linear-gradient(180deg, #1d1d1d 0%, #141414 100%);
  border-color: rgba(29, 185, 84, .22);
}
.music-import-card-muted {
  background: transparent;
  border: 1px solid hsla(0,0%,100%,.08);
}
.music-import-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #1ed760;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.music-import-card-top h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.music-import-card-top p {
  margin: 0;
  color: var(--music-muted, #b3b3b3);
  font-size: .9rem;
  line-height: 1.45;
  max-width: 46rem;
}
.music-import-steps {
  margin: 0;
  padding: 0 0 0 1.15rem;
  color: #d6d6d6;
  font-size: .86rem;
  line-height: 1.55;
}
.music-import-steps li + li { margin-top: 2px; }
.music-import-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.music-import-card-featured .music-import-form {
  max-width: 34rem;
}
.music-import-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .8rem;
  color: var(--music-muted, #b3b3b3);
}
.music-import-label input[type="url"],
.music-import-label input[type="file"],
.music-import-overrides input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid hsla(0,0%,100%,.08);
  border-radius: 10px;
  background: #0f0f0f;
  color: #fff;
  padding: 11px 12px;
  font: inherit;
}
.music-import-label input[type="url"]:focus,
.music-import-overrides input:focus {
  outline: none;
  border-color: rgba(29, 185, 84, .55);
  box-shadow: 0 0 0 3px rgba(29, 185, 84, .12);
}
.music-import-overrides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.music-import-advanced {
  color: var(--music-muted, #b3b3b3);
  font-size: .82rem;
}
.music-import-advanced summary {
  cursor: pointer;
  user-select: none;
}
.music-import-hint {
  margin: 0;
  color: var(--music-muted, #b3b3b3);
  font-size: .82rem;
  line-height: 1.45;
}
.music-import-hint code {
  font-size: .78rem;
  color: #ddd;
}
.music-row-wrap.is-unavailable {
  opacity: .58;
  filter: grayscale(.25);
}
.music-row-wrap.is-unavailable .music-row-title {
  color: #a7a7a7;
}
.music-row-wrap.is-unavailable .music-row-sub,
.music-row-wrap.is-unavailable .dur {
  color: #777;
}
.music-row.is-unavailable {
  cursor: default;
  pointer-events: none;
}
.music-pending-badge {
  align-self: center;
  margin-right: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #b3b3b3;
  background: rgba(255, 255, 255, .08);
}
.music-wanted-page > .music-wanted-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.music-wanted-page > .music-wanted-title h1 {
  margin: 0 0 6px;
}
.music-wanted-lead {
  margin: 0;
  color: var(--music-muted, #b3b3b3);
  font-size: .9rem;
  max-width: 46rem;
}
.music-wanted-count {
  color: var(--music-muted, #b3b3b3);
  font-size: .8rem;
  white-space: nowrap;
  padding-top: 6px;
}
.music-wanted-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.music-wanted-check-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--music-muted, #b3b3b3);
  font-size: .85rem;
  cursor: pointer;
}
.music-wanted-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.music-wanted-row {
  display: grid;
  grid-template-columns: auto 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
}
.music-wanted-row:hover {
  background: hsla(0, 0%, 100%, .04);
}
.music-wanted-check {
  display: flex;
  align-items: center;
}
.music-wanted-art {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: #282828;
}
.music-wanted-art-empty {
  display: grid;
  place-items: center;
  color: #777;
  font-size: 1.1rem;
}
.music-wanted-body {
  min-width: 0;
}
.music-wanted-name {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-wanted-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  color: var(--music-muted, #b3b3b3);
  font-size: .8rem;
  margin-top: 2px;
}
.music-wanted-detail {
  margin: 4px 0 0;
  color: #888;
  font-size: .75rem;
}
.music-wanted-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.music-wanted-row.stage-spotdl_failed .music-monitor-badge,
.music-wanted-row.stage-pending .music-monitor-badge {
  background: rgba(255, 100, 100, .15);
  color: #f5a8a8;
}
.music-wanted-row.stage-spotdl_running .music-monitor-badge,
.music-wanted-row.stage-spotdl_queued .music-monitor-badge,
.music-wanted-row.stage-spotdl .music-monitor-badge {
  background: rgba(30, 215, 96, .12);
  color: #1ed760;
}
@media (max-width: 800px) {
  .music-import-grid { grid-template-columns: 1fr; }
  .music-import-card-featured { grid-column: auto; }
  .music-wanted-row {
    grid-template-columns: auto 40px minmax(0, 1fr);
  }
  .music-wanted-actions {
    grid-column: 2 / -1;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }
}

.music-stats-title {
  margin-bottom: 12px;
}
.music-stats-title h1 { margin: 0; }
.music-stats-grid { margin-top: 8px; }

/* Admin Monitor / Wanted / Stats: follow Clock admin light theme */
.admin-main .music-monitor-page,
.admin-main .music-wanted-page,
.admin-main .music-stats-page {
  --music-muted: var(--label);
  --music-green: #1db954;
  max-width: 980px;
  color: var(--ink);
}
.admin-main .music-monitor-page h1,
.admin-main .music-wanted-page h1,
.admin-main .music-stats-page h1 {
  color: var(--ink);
}
.admin-main .music-btn {
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.admin-main .music-btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid #ddd;
}
.admin-main .music-btn.secondary:hover {
  background: var(--paper);
}
.admin-main .music-monitor-refresh,
.admin-main .music-wanted-lead,
.admin-main .music-wanted-count,
.admin-main .music-wanted-check-all,
.admin-main .music-wanted-meta,
.admin-main .music-wanted-detail,
.admin-main .music-monitor-empty,
.admin-main .music-monitor-meta,
.admin-main .music-monitor-detail,
.admin-main .music-monitor-pager,
.admin-main .music-now-sub,
.admin-main .music-now-meta {
  color: var(--label);
}
.admin-main .music-monitor-search {
  border: 1px solid #ddd;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
}
.admin-main .music-monitor-search:focus {
  border-color: #bbb;
  background: #fff;
  outline: 2px solid #e8e8e8;
}
.admin-main .music-monitor-filter {
  border: 1px solid #ddd;
  background: #fff;
  color: var(--label);
}
.admin-main .music-monitor-filter:hover {
  color: var(--ink);
  border-color: #bbb;
  background: var(--paper);
}
.admin-main .music-monitor-filter.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
.admin-main .music-monitor-chip {
  border: 1px solid #e4e4e4;
  background: #fff;
  color: var(--label);
}
.admin-main .music-monitor-chip strong {
  color: var(--ink);
}
.admin-main .music-monitor-block-head,
.admin-main .music-monitor-name,
.admin-main .music-now-title,
.admin-main .music-wanted-name {
  color: var(--ink);
}
.admin-main .music-monitor-list,
.admin-main .music-now-list {
  border-top: 1px solid #ececec;
}
.admin-main .music-monitor-row,
.admin-main .music-now-row {
  border-bottom: 1px solid #ececec;
}
.admin-main .music-monitor-badge {
  background: var(--paper);
  color: var(--label);
}
.admin-main .music-monitor-row.stage-downloading .music-monitor-badge,
.admin-main .music-monitor-row.stage-converting .music-monitor-badge,
.admin-main .music-monitor-row.stage-awaiting_import .music-monitor-badge,
.admin-main .music-wanted-row.stage-spotdl_running .music-monitor-badge,
.admin-main .music-wanted-row.stage-spotdl_queued .music-monitor-badge,
.admin-main .music-wanted-row.stage-spotdl .music-monitor-badge {
  background: rgba(29, 185, 84, .12);
  color: #128a3d;
}
.admin-main .music-monitor-row.stage-stalled .music-monitor-badge,
.admin-main .music-monitor-row.stage-import_error .music-monitor-badge,
.admin-main .music-monitor-row.stage-error .music-monitor-badge,
.admin-main .music-wanted-row.stage-spotdl_failed .music-monitor-badge,
.admin-main .music-wanted-row.stage-pending .music-monitor-badge {
  background: rgba(233, 20, 41, .1);
  color: #b00020;
}
.admin-main .music-monitor-row.stage-queued .music-monitor-badge,
.admin-main .music-monitor-row.stage-paused .music-monitor-badge,
.admin-main .music-monitor-row.stage-preparing .music-monitor-badge,
.admin-main .music-monitor-row.stage-waiting .music-monitor-badge,
.admin-main .music-monitor-row.stage-pending .music-monitor-badge,
.admin-main .music-monitor-row.stage-imported .music-monitor-badge,
.admin-main .music-monitor-row.stage-cleaned .music-monitor-badge,
.admin-main .music-monitor-row.stage-done .music-monitor-badge,
.admin-main .music-monitor-row.stage-seeding .music-monitor-badge {
  background: var(--paper);
  color: var(--label);
}
.admin-main .music-monitor-bar,
.admin-main .music-now-cover,
.admin-main .music-wanted-art {
  background: #e8e8e8;
}
.admin-main .music-monitor-detail.is-error {
  color: #b00020;
}
.admin-main .music-monitor-alert {
  border-left-color: #e91429;
  background: #fff5f5;
  color: #8a1f1f;
}
.admin-main .music-wanted-row:hover {
  background: #f0f0f0;
}
.admin-main .music-wanted-art-empty {
  color: var(--label);
  background: #e8e8e8;
}
