/* The phone layout of Solam. */
html, body { height: 100dvh; overscroll-behavior: none; -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body { --top: calc(env(safe-area-inset-top, 0px) + 40px); --tabs: calc(env(safe-area-inset-bottom, 0px) + 64px); }
/* A darker sky behind everything keeps text readable on the brightest themes. */
body::before { content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(4, 6, 16, 0.3), rgba(4, 6, 16, 0.14) 45%, rgba(4, 6, 16, 0.42)); }
.glass { background: linear-gradient(145deg, rgba(var(--tint-rgb), calc(var(--tint-a) * 0.82 + 0.12)), rgba(var(--tint-rgb), calc(var(--tint-a) * 1.12 + 0.14))); }

#titlebar { position: fixed; top: env(safe-area-inset-top, 0px); height: 40px; -webkit-app-region: none; }
.brand { width: 100%; padding: 0 12px 0 18px; }
.brand-logo { width: 19px; height: 19px; }
#inbox-button { margin-left: auto; width: 36px; height: 36px; }
#inbox-button svg { width: 20px; height: 20px; }
.win-buttons, #np-mini, #np-viz, #np-badge, #np-full { display: none !important; }

#stage { top: var(--top); left: 8px; right: 8px; bottom: calc(var(--tabs) + 70px); }
.scroll { padding: 18px 16px 28px; -webkit-overflow-scrolling: touch; }
.page-title, .home-hero .page-title { font-size: 28px; }
.page-sub { font-size: 14px; margin-bottom: 14px; }
.section-title { font-size: 18px; margin: 22px 0 10px; }
.search { max-width: 100%; font-size: 16px; }
.field { font-size: 16px; max-width: 100%; }
.button, .chip { min-height: 38px; }
.button.small { min-height: 34px; }

/* Five buttons that always fit, with no sideways scrolling. */
#dock {
  top: auto; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
  width: auto; height: 58px; flex-direction: row; justify-content: space-between; gap: 0;
  padding: 0 5px; overflow: hidden; border-radius: 29px;
}
.dock-spacer { display: none; }
.dock-item { flex: 1 1 0; width: auto; min-width: 0; font-size: 10px; border-radius: 24px; }
.dock-item span { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

#player {
  left: 8px; right: 8px; bottom: calc(var(--tabs) + 2px); height: 60px; gap: 9px;
  padding: 0 8px 0 7px; border-radius: 30px;
}
#np-art { width: 46px; height: 46px; }
.np-text { flex: 1 1 auto; min-width: 0; }
.np-text strong { font-size: 14px; }
.np-center { flex: none; min-width: 0; }
.np-time, #np-prev, #np-shuffle, #np-repeat, .np-tools { display: none; }
#np-heart { width: 34px; height: 34px; flex: none; }
.np-controls { gap: 2px; }
.icon-button.big { width: 40px; height: 40px; }

.track { grid-template-columns: 48px minmax(0, 1fr) 34px 34px; gap: 9px; padding: 7px 2px; content-visibility: visible; }
.track img, .track .blank { width: 48px; height: 48px; border-radius: 10px; }
.track-text strong { font-size: 15px; }
.track-text span { font-size: 13px; }
.artist-link { font-size: 13px; }
.track .plays, .track .badge, .track time { display: none; }
.track .add, .track .heart:not(.on) { opacity: 0.8; }

.song-tile, .skeleton-tile { flex-basis: 138px; }
#dock-glider { border-radius: 24px; }
.tile-play { opacity: 1; transform: none; width: 34px; height: 34px; }
.tile-play svg { width: 19px; height: 19px; }
.quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.quick-tile img, .quick-tile .blank { width: 46px; height: 46px; }
.quick-tile { font-size: 12.5px; }

.artist-card { flex-basis: 112px; }
.artist-card img, .blank.round { width: 84px; height: 84px; }
.artist-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.album-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.top-artist img, .top-artist .blank.round { width: 68px; height: 68px; }
.top-artist strong { font-size: 19px; }

.artist-banner { min-height: 0; }
.banner-content { flex-direction: column; align-items: flex-start; gap: 12px; padding: 54px 16px 16px; }
.banner-pic, .banner-content .blank.round { width: 96px; height: 96px; }
.banner-text h1 { font-size: 27px; }
.stats { gap: 18px; }

.setting { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px 0; }
.setting output { display: none; }
.setting-group { padding: 14px; }
.theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.source-row, .review-row { flex-wrap: wrap; }
.review-row .track-text { flex: 1 1 100%; }
.group-head { flex-wrap: wrap; }
.group-head h3 { flex: 1 1 100%; }
.connector-card .actions { flex-wrap: wrap; }
.perks { grid-template-columns: minmax(0, 1fr); }
.pop-menu { max-width: calc(100vw - 24px); max-height: min(420px, 70dvh); }
.pop-menu > button { padding: 10px; }
.glass.sheet-panel { background: linear-gradient(145deg, rgb(var(--tint-rgb)), rgb(var(--tint-rgb))), #0a0c1c; }
#ai-orb { right: 14px; bottom: calc(var(--tabs) + 72px); width: 44px; height: 44px; }
.ai-panel.sheet-panel { height: 84dvh; }
.ai-input { font-size: 16px; }
#toast { width: calc(100% - 32px); max-width: none; bottom: calc(var(--tabs) + 72px); }

/* Sheets rise from the bottom of the screen. */
.sheet { place-items: end stretch; padding: 0; }
.sheet-panel { width: 100%; max-height: 82dvh; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); border-radius: 26px 26px 0 0; }

/* Now Playing fills the whole screen, like other music apps. */
body.big #dock, body.big #titlebar { display: none; }
body.big::before { background: rgba(4, 6, 16, 0.4); }
#bigcover { inset: env(safe-area-inset-top, 0px) 0 calc(env(safe-area-inset-bottom, 0px) + 154px); display: flex; flex-direction: column; overflow: hidden; gap: 0; padding: 4px 18px 8px; z-index: 35; }
#bigcover-close { top: 2px; left: 8px; width: 42px; height: 42px; }
.bc-art { flex: none; height: auto; padding-top: 38px; }
#bc-viz { display: none; }
#bc-img { width: min(70vw, 34dvh); }
.bc-side { flex: 1 1 auto; height: auto; min-height: 0; padding-top: 12px; }
#bc-title { font-size: 21px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: none; }
#bc-artist { margin: 2px 0 8px; font-size: 14px; flex: none; }
#bc-full { margin: 0 0 8px; flex: none; }
.bc-tools { margin: 0 0 8px; flex-wrap: nowrap; flex: none; overflow-x: auto; scrollbar-width: none; }
.bc-tools .chip { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13px; }
.bc-lyrics { flex: 1 1 auto; min-height: 80px; height: auto; padding: 14px 16px; border-radius: 20px; }
.bc-lyrics p { font-size: 18px; }
body.big #player { left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 6px); height: 142px; flex-wrap: wrap; align-content: center; padding: 8px 12px; border-radius: 28px; z-index: 36; }
body.big .np-text { flex-basis: calc(100% - 110px); }
body.big #np-art { display: none; }
body.big .np-center { order: 3; width: 100%; flex-basis: 100%; }
body.big .np-time { display: flex; max-width: none; }
body.big #np-prev, body.big #np-shuffle, body.big #np-repeat { display: grid; }
body.big.idle #player { opacity: 1; transform: none; }

/* A phone on its side has little height, so the glass shrinks to fit. */
@media (orientation: landscape) and (max-height: 500px) {
  body { --top: 36px; --tabs: calc(env(safe-area-inset-bottom, 0px) + 50px); }
  #titlebar { height: 36px; }
  #stage { left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(var(--tabs) + 58px); }
  #dock { height: 46px; left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); }
  .dock-item { padding: 2px 0; }
  .dock-item span { display: none; }
  #player { height: 52px; bottom: calc(var(--tabs) + 2px); left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); }
  #np-art { width: 40px; height: 40px; }
  .icon-button.big { width: 36px; height: 36px; }
  #bigcover { inset: 0 0 calc(env(safe-area-inset-bottom, 0px) + 60px); flex-direction: row; gap: 16px; }
  .bc-art { padding-top: 0; }
  #bc-img { width: 42dvh; }
  body.big #player { height: 52px; flex-wrap: nowrap; }
  body.big #np-art { display: block; }
  body.big .np-center { order: 0; width: auto; flex-basis: auto; }
  body.big .np-time { display: none; }
}

.stat-card { padding: 11px; }
.stat-card strong { font-size: 21px; }
.stat-card span { font-size: 11.5px; }
.track video { width: 48px; height: 48px; border-radius: 10px; }
.quick-tile video { width: 46px; height: 46px; }
