:root {
  --bg-0: #000000;
  --bg-1: rgba(26, 26, 30, 0.76);
  --bg-2: rgba(40, 40, 44, 0.68);
  --bg-3: rgba(56, 56, 60, 0.78);
  --bg-inset: rgba(14, 14, 18, 0.68);
  --text-0: #f5f5f7;
  --text-1: rgba(235, 235, 245, 0.8);
  --text-2: rgba(235, 235, 245, 0.54);
  --accent: #fa2d48;
  --accent-hover: #ff3b56;
  --apple-blue: #0a84ff;
  --apple-cyan: #64d2ff;
  --emerald: #30d158;
  --amber: #ff9f0a;
  --purple: #bf5af2;
  --oled-bg: #03070b;
  --oled-fg: #64d2ff;
  --border: rgba(255, 255, 255, 0.08);
  --border-hairline: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.15);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --shadow-elevated: 0 -8px 32px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  background-color: var(--bg-0);
  color: var(--text-0);
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

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

.hidden {
  display: none !important;
}

/* Ambient Apple Music / visionOS Mesh Wallpaper */
.apple-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #14151e 0%, #050507 75%);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.16;
}

.orb-rose {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #fa2d48 0%, transparent 70%);
  top: -180px;
  left: 14%;
}

.orb-blue {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, #0a84ff 0%, transparent 70%);
  top: 12%;
  right: -140px;
}

.orb-indigo {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #5e5ce6 0%, transparent 70%);
  bottom: -140px;
  left: 34%;
}

/* macOS SplitView App Shell with Dedicated 76px Bottom Player Row */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  grid-template-rows: calc(100vh - 76px) 76px;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Left Translucent macOS Sidebar */
.apple-sidebar {
  grid-column: 1;
  grid-row: 1;
  height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  padding: 16px 14px 16px;
  background: rgba(20, 20, 24, 0.78);
  backdrop-filter: saturate(190%) blur(38px);
  -webkit-backdrop-filter: saturate(190%) blur(38px);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 20;
}

.sidebar-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  padding: 2px 6px 14px;
  border-bottom: 1px solid var(--border);
}

.traffic-lights {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.tl-close {
  background: #ff5f57;
}
.tl-min {
  background: #febc2e;
}
.tl-max {
  background: #28c840;
}

.brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-squircle-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(145deg, #ff375f 0%, #fa2d48 65%, #bf5af2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(250, 45, 72, 0.35);
  flex-shrink: 0;
}

.app-squircle-icon svg {
  width: 14px;
  height: 14px;
}

.brand-title {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-0);
  white-space: nowrap;
}

/* Sidebar Navigation */
.nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  padding: 12px 10px 5px;
}

.tab-btn {
  width: 100%;
  background: transparent;
  color: var(--text-1);
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
}

.tab-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.tab-icon svg {
  width: 17px;
  height: 17px;
}

.tab-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-0);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 600;
}

.tab-btn.active .tab-icon {
  color: var(--accent);
}

.badge {
  font-size: 11px;
}

/* Clean 2-Line Status Indicator in Sidebar Footer */
.sidebar-hardware-footer {
  margin-top: auto;
  padding: 12px 8px 2px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-status-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.sidebar-status-primary {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-status-sub {
  font-size: 11px;
  color: var(--text-2);
  padding-left: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Main Stage */
.apple-stage {
  grid-column: 2;
  grid-row: 1;
  height: calc(100vh - 76px);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.main-content {
  padding: 20px 28px 28px;
  max-width: 1360px;
  width: 100%;
}

.tab-panel {
  display: none;
  animation: appleFadeIn 0.18s ease-out;
}

.tab-panel.active {
  display: block;
}

@keyframes appleFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Single Compact Header Row per Tab */
.apple-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
}

.apple-tab-header h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-title-group {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.tab-inline-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.music-toolbar {
  margin-bottom: 20px;
}

/* Segmented Control (.subnav-pills) */
.subnav-pills {
  display: inline-flex;
  background: rgba(118, 118, 128, 0.22);
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
  flex-shrink: 0;
}

.subnav-btn {
  background: transparent;
  color: var(--text-1);
  border: none;
  border-radius: 7px;
  padding: 5px 15px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.subnav-btn:hover {
  color: #ffffff;
}

.subnav-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Filter & Search Bar */
.filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.apple-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.apple-search-wrap .search-icon {
  position: absolute;
  left: 10px;
  width: 13px;
  height: 13px;
  color: var(--text-2);
  pointer-events: none;
}

select,
input[type="search"],
input[type="text"] {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-0);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

select:focus,
input:focus {
  border-color: var(--apple-blue);
  background: rgba(0, 0, 0, 0.5);
}

.apple-search-wrap input[type="search"] {
  padding-left: 30px;
  border-radius: 8px;
  width: 260px;
}

/* Buttons & Semantic Pills */
.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-pill {
  border-radius: 999px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12.5px;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11.5px;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-0);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-outline {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-circle {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-0);
  border: none;
}

.btn-circle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-circle-play {
  background: #ffffff;
  color: #000000;
}

.btn-circle-play:hover {
  background: #e5e5ea;
}

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
  border: 1px solid var(--border);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.icon-play,
.icon-pause {
  display: block;
  flex-shrink: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-safe {
  background: rgba(48, 209, 88, 0.14);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.3);
}

.pill-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
  border: 1px solid var(--border);
}

.pill-accent {
  background: rgba(10, 132, 255, 0.16);
  color: var(--apple-cyan);
  border: 1px solid rgba(100, 210, 255, 0.28);
}

/* Music Subviews & True Apple Music Square Cover Grid */
.music-subview {
  display: none;
}

.music-subview.active {
  display: block;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 200px));
  gap: 24px;
  margin-bottom: 24px;
}

.album-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  min-width: 0;
}

.album-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.album-card.is-selected {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.apple-artwork-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.artwork-monogram {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
  user-select: none;
}

.artwork-play-overlay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(250, 45, 72, 0.95);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.15s ease;
  cursor: pointer;
}

.apple-artwork-tile:hover .artwork-play-overlay,
.album-card.is-selected .artwork-play-overlay {
  opacity: 1;
  transform: scale(1);
}

.artwork-play-overlay:hover {
  background: #ff3b56;
  transform: scale(1.06);
}

.album-meta-block {
  padding-top: 8px;
  min-width: 0;
}

.album-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.album-artist {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  line-height: 1.3;
}

/* Expandable Apple Music Album / Playlist / Artist Detail View */
.album-detail-panel {
  background: rgba(22, 22, 26, 0.72);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
}

.album-detail-panel:empty {
  display: none;
}

.detail-top-bar {
  margin-bottom: 12px;
}

.detail-back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.detail-back-btn:hover {
  text-decoration: underline;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
}

.detail-cover {
  width: 148px;
  height: 148px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.detail-cover .artwork-monogram {
  font-size: 40px;
}

.detail-meta {
  min-width: 0;
  flex: 1;
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1.15;
}

.detail-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.detail-info {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: 6px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: nowrap;
}

.inline-select {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  color: var(--text-0);
  cursor: pointer;
}

.album-pl-select {
  max-width: 170px;
}

/* Flat Hairline Tracklist inside Detail View */
.album-tracklist {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-hairline);
}

.album-track-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-hairline);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.album-track-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.track-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.track-num {
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.track-title-text {
  font-weight: 500;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row-titles {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.track-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.track-format-label {
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 500;
}

/* Playlists Creator Bar */
.playlist-CreatorBar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  flex-wrap: nowrap;
}

.playlist-CreatorBar input {
  flex: 1;
  min-width: 140px;
}

/* Move 3: Flat Hairline Songs Table */
.media-table-wrap {
  background: rgba(20, 20, 24, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.media-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.media-table th,
.media-table td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: middle;
}

.media-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  white-space: nowrap;
}

.media-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.table-song-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.mini-song-art {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.table-song-titles {
  min-width: 0;
  flex: 1;
}

.table-song-titles strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--text-0);
}

.table-artist-cell,
.table-album-cell,
.table-format-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  color: var(--text-2);
  font-size: 13px;
}

.table-row-nowrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.table-pl-select {
  width: 136px;
  max-width: 136px;
  padding: 4px 8px;
  font-size: 11.5px;
}

/* Movies & TV Cinema Layout */
.cinema-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cinema-player-card,
.cinema-list-card {
  background: var(--bg-1);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.cinema-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: nowrap;
}

.cinema-video-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.cinema-cast-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.external-player-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  flex-wrap: nowrap;
}

.ext-link {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 5px;
  transition: color 0.14s ease, background 0.14s ease;
  white-space: nowrap;
}

.ext-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.video-wrapper {
  background: #000000;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-0);
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
}

.video-item-card {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.video-item-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.video-item-card.active {
  border-color: var(--apple-blue);
  background: rgba(10, 132, 255, 0.1);
}

.video-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.video-poster-badge {
  width: 56px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.video-card-meta {
  min-width: 0;
  flex: 1;
}

.video-card-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Apple Photos Square Thumbnail Grid */
.photo-folders-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.photo-folders-bar:empty {
  display: none;
}

.pagination-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 999px;
  flex-shrink: 0;
}

.page-indicator {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-1);
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.photo-card {
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #0d0d11;
  position: relative;
}

.photo-thumb-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
}

.photo-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.24s ease;
}

.photo-card:hover .photo-thumb-wrap img {
  transform: scale(1.04);
}

.raw-corner-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 4px;
}

.photo-hover-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 8px 6px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 100%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.photo-card:hover .photo-hover-overlay {
  opacity: 1;
}

.photo-hover-name {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Storage & Wireless Backup */
.drives-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.drive-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
}

.drive-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.speaker-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.speaker-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-cyan);
  flex-shrink: 0;
}

.speaker-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-0);
}

.speaker-sub {
  font-size: 12px;
  color: var(--text-2);
}

.speaker-sub code {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-1);
}

.drive-stats-text {
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
}

.drive-stats-text strong {
  color: var(--text-0);
}

.progress-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--apple-blue), var(--apple-cyan), var(--emerald));
}

.backup-grid,
.oled-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.dropzone-card,
.history-card,
.oled-studio-card,
.hardware-info-card {
  background: var(--bg-1);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.card-header-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dropzone-card h3,
.history-card h3,
.oled-studio-card h3,
.hardware-info-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.subtitle {
  font-size: 12px;
  color: var(--text-2);
}

.form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--text-1);
  flex-wrap: nowrap;
}

.form-row select {
  flex: 1;
  min-width: 140px;
}

.dropzone {
  border: 1.5px dashed rgba(100, 210, 255, 0.35);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(10, 132, 255, 0.06);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--apple-cyan);
  background: rgba(10, 132, 255, 0.14);
}

.dropzone-rings {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: rgba(10, 132, 255, 0.18);
  color: var(--apple-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-svg {
  width: 22px;
  height: 22px;
}

.dropzone-title {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
}

.dropzone-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}

.backup-status-box {
  margin-top: 12px;
}

.smb-callout {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  margin: 10px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.smb-callout code {
  font-family: "SF Mono", ui-monospace, monospace;
  color: var(--apple-cyan);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Hardware & 0.96" OLED Display Card */
.oled-large-preview {
  background: var(--oled-bg);
  border: 1.5px solid rgba(100, 210, 255, 0.28);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0 14px;
  font-family: "SF Mono", ui-monospace, "Menlo", monospace;
  font-size: 15px;
  line-height: 1.5;
  color: var(--oled-fg);
  text-shadow: 0 0 8px rgba(100, 210, 255, 0.45);
  box-shadow: inset 0 0 22px rgba(100, 210, 255, 0.08);
}

.oled-large-line {
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oled-controls label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
}

.form-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.form-inline input {
  flex: 1;
  min-width: 0;
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
}

/* Move 1: Single Docked Bottom Player Bar */
.bottom-player {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 76px;
  background: rgba(20, 20, 24, 0.94);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  border-top: 1px solid var(--border-strong);
  padding: 0 22px;
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(280px, 1.4fr) minmax(260px, 1.1fr);
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-elevated);
  z-index: 40;
}

.bp-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bp-art-tile {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fa2d48, #5e5ce6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.bp-eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.bp-eq-bars span {
  width: 3px;
  height: 5px;
  background: #ffffff;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.bp-art-tile.is-playing .bp-eq-bars span:nth-child(1) {
  animation: appleEq 0.75s ease-in-out infinite alternate;
}
.bp-art-tile.is-playing .bp-eq-bars span:nth-child(2) {
  animation: appleEq 0.55s ease-in-out 0.15s infinite alternate;
}
.bp-art-tile.is-playing .bp-eq-bars span:nth-child(3) {
  animation: appleEq 0.85s ease-in-out 0.3s infinite alternate;
}

@keyframes appleEq {
  0% {
    height: 4px;
  }
  100% {
    height: 16px;
  }
}

.bp-text-wrap {
  min-width: 0;
  flex: 1;
}

.bp-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.bp-title {
  font-weight: 600;
  font-size: 13.5px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-1);
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  text-transform: uppercase;
}

.bp-artist {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.bp-center-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
  max-width: 440px;
  justify-self: center;
}

.bp-transport-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.bp-nav-btn {
  color: var(--text-1);
}

.bp-nav-btn:hover {
  color: #ffffff;
}

.bp-play-btn {
  width: 32px;
  height: 32px;
}

.bp-scrubber-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.bp-time {
  font-size: 10.5px;
  font-family: "SF Mono", ui-monospace, monospace;
  color: var(--text-2);
  min-width: 28px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.bp-seek-slider {
  flex: 1;
}

.bp-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  justify-self: end;
  flex-wrap: nowrap;
}

.volume-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vol-icon {
  color: var(--text-2);
  flex-shrink: 0;
}

#quickVolSlider {
  width: 80px;
}

.bp-device-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-0);
  max-width: 175px;
  cursor: pointer;
}

/* Apple Quick Look Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: saturate(180%) blur(32px);
  -webkit-backdrop-filter: saturate(180%) blur(32px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-content img {
  max-width: 86vw;
  max-height: 76vh;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(28, 28, 32, 0.85);
  color: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}

.lightbox-nav {
  position: absolute;
  top: 44%;
  background: rgba(28, 28, 32, 0.82);
  color: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-caption {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(28, 28, 32, 0.85);
  border: 1px solid var(--border-strong);
  padding: 10px 16px;
  border-radius: 12px;
}

.lightbox-meta-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-actions {
  display: flex;
  gap: 8px;
}

/* Apple Notification Toasts */
.toast-container {
  position: fixed;
  top: 20px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 95;
}

.toast {
  background: rgba(36, 36, 40, 0.92);
  backdrop-filter: blur(20px);
  color: #ffffff;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.empty-apple-state {
  padding: 24px;
  text-align: center;
  color: var(--text-2);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

.pill-warn {
  background: rgba(255, 159, 10, 0.16);
  color: var(--amber);
  border: 1px solid rgba(255, 159, 10, 0.34);
}

.guest-exit-link {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding-left: 14px;
  margin-top: 2px;
}

.guest-exit-link:hover {
  text-decoration: underline;
}

/* Selective Internet Sharing & Tailscale Funnel Tab */
.tailscale-callout-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(10, 132, 255, 0.1);
  border: 1px solid rgba(100, 210, 255, 0.28);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
}

.tailscale-callout-body {
  min-width: 0;
  flex: 1;
}

.tailscale-callout-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.tailscale-callout-sub {
  font-size: 12.5px;
  color: var(--text-1);
  margin-top: 3px;
}

.tailscale-callout-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sharing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.share-builder-card,
.share-list-card {
  background: var(--bg-1);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.share-builder-card h3,
.share-list-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.share-form-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.share-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.share-field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-1);
}

.share-field input,
input[type="password"] {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-0);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.share-toggle-row {
  margin-bottom: 12px;
  padding: 6px 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.share-check-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-0);
  cursor: pointer;
  user-select: none;
}

.share-check-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.share-section-block {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.share-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.share-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-1);
}

.share-checklist {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 120px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 6px 8px;
}

.share-checklist.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.share-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-1);
  cursor: pointer;
}

.share-check-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.share-check-item-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.share-check-item-left input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.share-check-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-0);
  font-weight: 500;
}

.share-check-item-meta {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
}

.share-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.active-shares-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-link-item {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-link-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.share-link-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-link-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.share-link-summary {
  font-size: 12px;
  color: var(--text-1);
}

.share-link-url {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--apple-cyan);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-link-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 2px;
}

/* Guest Passcode Modal */
.guest-pin-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.guest-pin-card {
  background: rgba(28, 28, 34, 0.94);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 28px 26px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.guest-pin-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 4px;
}

.guest-pin-icon svg {
  width: 20px;
  height: 20px;
}

.guest-pin-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
}

.guest-pin-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.guest-pin-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.guest-pin-error {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr 76px;
  }

  .apple-sidebar {
    grid-column: 1;
    grid-row: 1;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
  }

  .apple-stage {
    grid-column: 1;
    grid-row: 2;
    height: auto;
  }

  .bottom-player {
    grid-column: 1;
    grid-row: 3;
  }

  .nav-tabs {
    flex-direction: row;
    overflow-x: auto;
  }

  .sidebar-group-label,
  .sidebar-hardware-footer {
    display: none;
  }

  .tab-btn {
    width: auto;
    flex-shrink: 0;
  }

  .cinema-layout,
  .backup-grid,
  .oled-studio-grid,
  .sharing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .apple-tab-header {
    flex-wrap: wrap;
  }

  .detail-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .bottom-player {
    grid-template-columns: 1fr auto;
    padding: 0 12px;
  }

  .bp-center-controls {
    display: none;
  }
}
