/* Wavely — hub.css (density ≈ 6, designed for 1024px+, reflows to 320px) */
.hub-nav__row { min-height: 60px; }
.hub-tabs { display: flex; gap: var(--s-4); }
.hub-tab { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-12); border: 0; background: transparent; font-weight: 500; font-size: var(--fs-14); color: var(--text-muted); border-radius: var(--r-8); position: relative; transition: color var(--t-micro) var(--ease); }
.hub-tab[aria-selected="true"] { color: var(--text); }
.hub-tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--s-12); right: var(--s-12); bottom: 0; height: 2px; background: var(--ember); }
.hub-nav__right { display: flex; align-items: center; gap: var(--s-12); }
.avatar-btn { width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--surface-2); padding: 0; display: grid; place-items: center; overflow: hidden; }
.avatar-btn img { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; }
.avatar-btn__fallback { width: 36px; height: 36px; border-radius: 999px; background: var(--surface-2); display: grid; place-items: center; font-weight: 500; font-size: var(--fs-14); color: var(--text-muted); box-shadow: inset 0 0 0 1px rgb(154 154 165 / .5); }
.menu { position: absolute; right: var(--gutter); top: 60px; min-width: 180px; padding: var(--s-4); z-index: 60; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; min-height: 44px; padding: 0 var(--s-12); border: 0; background: transparent; border-radius: var(--r-8); font-size: var(--fs-14); font-weight: 500; text-align: left; color: var(--text); }
@media (hover: hover) and (pointer: fine) { .menu a:hover, .menu button:hover { background: var(--surface-2); } }
.menu-wrap { position: relative; }

.hub-main { padding-block: var(--s-24) var(--s-96); }
.hub-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-12); margin-bottom: var(--s-16); }
.hub-note { font-size: var(--fs-12); letter-spacing: 0.01em; color: var(--text-muted); border-top: 1px solid var(--hairline); padding-top: var(--s-12); margin-top: var(--s-12); max-width: 70ch; }
.hub-note a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* Sign-in */
.signin { max-width: 400px; margin: var(--s-48) auto; padding: var(--s-24); display: grid; gap: var(--s-16); }
.signin .display { margin-bottom: var(--s-4); }

/* Rows */
.rows { display: grid; }
.row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: var(--s-12); min-height: 72px; padding: var(--s-8) 0; border-bottom: 1px solid var(--hairline); }
.row:focus-within { background: linear-gradient(90deg, transparent, transparent); }
.row.is-active .row__title { color: var(--text); }
.row__thumb { width: 36px; height: 64px; border-radius: 6px; overflow: hidden; background: var(--surface-2); position: relative; }
.row__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.row__main { display: grid; gap: 2px; min-width: 0; }
.row__title { font-weight: 500; font-size: var(--fs-16); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__sub { display: flex; flex-wrap: wrap; gap: 0 var(--s-8); font-size: var(--fs-14); line-height: 1.4; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.row__sub .nowrap { white-space: nowrap; }
.row__player { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--s-8); margin-top: var(--s-4); }
.row__time { font-size: var(--fs-12); letter-spacing: 0.01em; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row__action { display: grid; gap: var(--s-4); justify-items: end; }
.row__hint { font-size: var(--fs-12); letter-spacing: 0.01em; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row--gone { opacity: .6; }
.row--gone .row__title { color: var(--text-muted); }
.lock { width: 16px; height: 16px; }
.play-btn { width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--text); display: grid; place-items: center; transition: background-color var(--t-micro) var(--ease), transform var(--t-micro) var(--ease); }
.play-btn:active { transform: scale(0.97); }
.play-btn svg { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) { .play-btn:hover { background: var(--hairline); } }

@media (max-width: 640px) {
  .row { grid-template-columns: 36px minmax(0, 1fr); }
  .row__action { grid-column: 1 / -1; justify-items: start; }
  .row__player { grid-template-columns: 44px minmax(0, 1fr); }
  .row__time { grid-column: 2; }
}

/* Folders */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s-16); }
.folder { display: grid; gap: var(--s-8); padding: var(--s-12); border: 1px solid var(--hairline); background: var(--surface); border-radius: var(--r-12); text-align: left; color: var(--text); transition: border-color var(--t-micro) var(--ease), transform var(--t-micro) var(--ease); }
.folder:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .folder:hover { border-color: rgb(154 154 165 / .5); } }
.folder__mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; aspect-ratio: 1; border-radius: var(--r-8); overflow: hidden; background: var(--surface-2); }
.folder__mosaic img, .folder__mosaic span { width: 100%; height: 100%; object-fit: cover; background: var(--surface-2); display: block; }
.folder__name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder__count { font-size: var(--fs-14); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.crumb { display: inline-flex; align-items: center; gap: var(--s-8); min-height: 44px; color: var(--text-muted); font-size: var(--fs-14); font-weight: 500; background: transparent; border: 0; padding: 0; }
@media (hover: hover) and (pointer: fine) { .crumb:hover { color: var(--text); } }

/* Empty */
.empty { padding: var(--s-48) var(--s-16); text-align: center; color: var(--text-muted); max-width: 44ch; margin-inline: auto; }
.empty .display { color: var(--text); margin-bottom: var(--s-8); }

/* Skeleton rows */
.row--skel { grid-template-columns: 36px minmax(0, 1fr) 140px; }
.row--skel .skel { height: 14px; }
.row--skel .skel.thumb { width: 36px; height: 64px; }
.row--skel .skel.btn { height: 44px; border-radius: var(--r-8); }
