:root {
  color-scheme: light dark;
  --accent: #ff2d55;
  --accent-strong: #e31645;
  --accent-2: #af52de;
  --motion-button: #5856d6;
  --motion-button-strong: #bf5af2;
  --motion-square: #0a84ff;
  --motion-tall: #bf5af2;

  --logo-pink: #ff5b8a;
  --logo-coral: #ff6a6a;
  --logo-blue: #7bd3ff;
  --logo-lilac: #b78cff;

  --bg: #eef3fb;
  --bg-deep: #dce7f7;
  --text: #121318;
  --muted: #68707e;
  --line: rgba(255, 255, 255, .68);
  --line-soft: rgba(82, 95, 122, .14);

  --glass: rgba(255, 255, 255, .47);
  --glass-strong: rgba(255, 255, 255, .66);
  --glass-soft: rgba(255, 255, 255, .30);
  --glass-input: rgba(255, 255, 255, .45);
  --glass-hover: rgba(255, 255, 255, .72);
  --glass-shadow: 0 18px 48px rgba(50, 70, 108, .14), 0 2px 8px rgba(36, 54, 86, .07);
  --glass-shadow-soft: 0 10px 30px rgba(50, 70, 108, .11), 0 1px 3px rgba(36, 54, 86, .06);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, .82), inset 0 -1px 0 rgba(255, 255, 255, .20);
  --focus-ring: rgba(255, 45, 85, .23);
  --accent-soft: rgba(255, 45, 85, .12);

  --motion-panel-bg: rgba(255, 255, 255, .42);
  --motion-panel-border: rgba(255, 255, 255, .62);
  --motion-panel-text: #121318;
  --motion-panel-muted: #68707e;
  --motion-open-bg: rgba(255, 255, 255, .40);
  --motion-open-border: rgba(255, 255, 255, .68);
  --motion-open-text: #222630;

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 17px;
  --radius-sm: 13px;
  --blur: 31px;
  --saturate: 175%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --accent: #ff375f;
    --accent-strong: #ff6484;
    --accent-2: #bf5af2;
    --bg: #090a0f;
    --bg-deep: #10131d;
    --text: #f7f8fb;
    --muted: #a8afbd;
    --line: rgba(255, 255, 255, .18);
    --line-soft: rgba(255, 255, 255, .09);
    --glass: rgba(28, 31, 41, .47);
    --glass-strong: rgba(38, 42, 54, .66);
    --glass-soft: rgba(26, 29, 38, .32);
    --glass-input: rgba(32, 35, 46, .48);
    --glass-hover: rgba(54, 59, 74, .70);
    --glass-shadow: 0 22px 58px rgba(0, 0, 0, .35), 0 2px 10px rgba(0, 0, 0, .26);
    --glass-shadow-soft: 0 12px 34px rgba(0, 0, 0, .25), 0 1px 4px rgba(0, 0, 0, .20);
    --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -1px 0 rgba(255, 255, 255, .04);
    --focus-ring: rgba(255, 55, 95, .32);
    --accent-soft: rgba(255, 55, 95, .18);
    --motion-panel-bg: rgba(24, 27, 36, .54);
    --motion-panel-border: rgba(255, 255, 255, .13);
    --motion-panel-text: #f7f8fb;
    --motion-panel-muted: #a8afbd;
    --motion-open-bg: rgba(32, 35, 46, .52);
    --motion-open-border: rgba(255, 255, 255, .17);
    --motion-open-text: #f7f8fb;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #ff375f;
  --accent-strong: #ff6484;
  --accent-2: #bf5af2;
  --bg: #090a0f;
  --bg-deep: #10131d;
  --text: #f7f8fb;
  --muted: #a8afbd;
  --line: rgba(255, 255, 255, .18);
  --line-soft: rgba(255, 255, 255, .09);
  --glass: rgba(28, 31, 41, .47);
  --glass-strong: rgba(38, 42, 54, .66);
  --glass-soft: rgba(26, 29, 38, .32);
  --glass-input: rgba(32, 35, 46, .48);
  --glass-hover: rgba(54, 59, 74, .70);
  --glass-shadow: 0 22px 58px rgba(0, 0, 0, .35), 0 2px 10px rgba(0, 0, 0, .26);
  --glass-shadow-soft: 0 12px 34px rgba(0, 0, 0, .25), 0 1px 4px rgba(0, 0, 0, .20);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -1px 0 rgba(255, 255, 255, .04);
  --focus-ring: rgba(255, 55, 95, .32);
  --accent-soft: rgba(255, 55, 95, .18);
  --motion-panel-bg: rgba(24, 27, 36, .54);
  --motion-panel-border: rgba(255, 255, 255, .13);
  --motion-panel-text: #f7f8fb;
  --motion-panel-muted: #a8afbd;
  --motion-open-bg: rgba(32, 35, 46, .52);
  --motion-open-border: rgba(255, 255, 255, .17);
  --motion-open-text: #f7f8fb;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background:
    radial-gradient(1200px 380px at 12% -2%, color-mix(in srgb, var(--logo-pink) 24%, transparent), transparent 70%),
    radial-gradient(920px 300px at 34% -10%, color-mix(in srgb, var(--logo-coral) 18%, transparent), transparent 72%),
    radial-gradient(980px 340px at 80% -6%, color-mix(in srgb, var(--logo-blue) 22%, transparent), transparent 74%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 96%, white 4%), var(--bg-deep));
}

body {
  position: relative;
  isolation: isolate;
  min-width: 300px;
  min-height: 100vh;
  margin: 0;
  padding-top: 12px;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 380px at 12% -2%, color-mix(in srgb, var(--logo-pink) 24%, transparent), transparent 70%),
    radial-gradient(920px 300px at 34% -10%, color-mix(in srgb, var(--logo-coral) 18%, transparent), transparent 72%),
    radial-gradient(980px 340px at 80% -6%, color-mix(in srgb, var(--logo-blue) 22%, transparent), transparent 74%),
    radial-gradient(760px 560px at -15% 26%, color-mix(in srgb, var(--logo-lilac) 18%, transparent), transparent 72%),
    radial-gradient(860px 620px at 66% 108%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 96%, white 4%), var(--bg-deep));
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}

body::before {
  top: -104px;
  left: 50%;
  width: min(88vw, 980px);
  height: 260px;
  background:
    url("icons/icon48.png") center 12px / 180px 180px no-repeat,
    radial-gradient(circle at 18% 50%, color-mix(in srgb, var(--logo-pink) 55%, transparent), transparent 28%),
    radial-gradient(circle at 38% 28%, color-mix(in srgb, var(--logo-coral) 34%, transparent), transparent 26%),
    radial-gradient(circle at 72% 32%, color-mix(in srgb, var(--logo-blue) 38%, transparent), transparent 28%),
    radial-gradient(circle at 48% 16%, color-mix(in srgb, var(--logo-lilac) 20%, transparent), transparent 25%);
  opacity: .58;
  filter: blur(54px) saturate(175%);
  transform: translateX(-50%);
}

body::after {
  top: -8px;
  left: -6%;
  width: 112%;
  height: 200px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0), color-mix(in srgb, white 9%, transparent) 48%, rgba(0,0,0,0)),
    radial-gradient(circle at 10% 38%, color-mix(in srgb, var(--logo-pink) 16%, transparent), transparent 22%),
    radial-gradient(circle at 28% 18%, color-mix(in srgb, var(--logo-coral) 12%, transparent), transparent 20%),
    radial-gradient(circle at 76% 22%, color-mix(in srgb, var(--logo-blue) 14%, transparent), transparent 24%);
  opacity: .95;
  filter: blur(22px) saturate(135%);
}

button, input, select, textarea {
  -webkit-appearance: none;
  appearance: none;
}
select::-ms-expand { display: none; }

input, select, textarea { font: inherit; }
button { color: inherit; }
button, select, input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
[hidden] { display: none !important; }

.inline-apple-icon { display: inline-block; width: .82em; height: 1em; margin: 0; object-fit: contain; vertical-align: -.12em; }
.inline-apple-lockup { display: inline; white-space: nowrap; }
:root[data-theme="dark"] .inline-apple-icon { filter: invert(1); }
.official-apple-music-logo { display: inline-block; width: auto; height: .82em; object-fit: contain; vertical-align: -.08em; }
:root[data-theme="dark"] .official-apple-music-logo { filter: invert(1); }

.app-header {
  position: sticky;
  z-index: 20;
  top: 12px;
  display: grid;
  width: min(calc(100% - 28px), 1152px);
  max-width: 1152px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, color-mix(in srgb, white 14%, transparent), transparent 42%),
    color-mix(in srgb, var(--glass) 92%, transparent);
  box-shadow: var(--glass-shadow), var(--inner-highlight);
  -webkit-backdrop-filter: blur(calc(var(--blur) + 4px)) saturate(calc(var(--saturate) + 10%));
  backdrop-filter: blur(calc(var(--blur) + 4px)) saturate(calc(var(--saturate) + 10%));
}

.app-header::before {
  position: absolute;
  inset: -30% auto -34% -3%;
  width: 320px;
  background:
    url("icons/icon48.png") 24px center / 92px 92px no-repeat,
    radial-gradient(circle at 22% 50%, color-mix(in srgb, var(--logo-pink) 44%, transparent), transparent 25%),
    radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--logo-coral) 26%, transparent), transparent 24%),
    radial-gradient(circle at 82% 32%, color-mix(in srgb, var(--logo-blue) 22%, transparent), transparent 26%);
  opacity: .50;
  filter: blur(22px) saturate(170%);
  content: "";
  pointer-events: none;
}

.app-header::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.22), transparent 24%, transparent 72%, rgba(255,255,255,.08));
  content: "";
  pointer-events: none;
}

.brand-lockup { position: relative; z-index: 1; display: flex; width: auto; min-width: 0; align-items: center; gap: 11px; }
.brand-lockup > div { min-width: 0; }
.brand-button { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.brand-button h1 { transition: color 180ms ease, transform 180ms ease, background 180ms ease; }

:root[data-theme="light"] .brand-button:hover h1 { color: var(--accent); }
:root[data-theme="dark"] .brand-button:hover h1,
:root[data-theme="dark"] .brand-button:hover .eyebrow {
  color: transparent;
  background: linear-gradient(90deg, #62efff 0%, var(--logo-blue) 48%, #8ec5ff 72%, #a7b7ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:root[data-theme="dark"] .brand-button:hover .brand-icon {
  border-color: color-mix(in srgb, #62efff 58%, rgba(255,255,255,.28));
  box-shadow: 0 8px 25px rgba(98, 239, 255, .22), 0 0 18px rgba(123, 211, 255, .16), inset 0 1px 0 rgba(255,255,255,.38);
}
.brand-button:active h1 { transform: scale(.985); }
.brand-button:focus-visible { border-radius: 12px; box-shadow: 0 0 0 3px var(--focus-ring); }
.brand-icon {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(241, 56, 105, .22), inset 0 1px 0 rgba(255,255,255,.45);
}
.eyebrow { margin: 0; color: var(--accent); font-size: 10px; font-weight: 820; letter-spacing: .12em; }
h1 { margin: 1px 0 0; overflow: hidden; font-size: clamp(15px, 3.9vw, 18px); line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.header-actions { position: relative; z-index: 1; display: flex; width: 100%; min-width: 0; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 7px; }

.language-picker { display: flex; min-width: 0; height: 38px; flex: 1 1 auto; align-items: center; }
.language-picker select,
.language-select {
  width: 100%;
  min-width: 0;
  height: 38px;
  flex: 1 1 auto;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--glass-input);
  box-shadow: var(--inner-highlight);
  color: var(--text);
  font-size: 12px;
  font-weight: 740;
  cursor: pointer;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}
.language-picker select:hover { background: var(--glass-hover); }
.language-picker select:focus { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); box-shadow: 0 0 0 3px var(--focus-ring), var(--inner-highlight); }
.language-picker select option { background: var(--bg); color: var(--text); }

.icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 8px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-input);
  box-shadow: var(--inner-highlight);
  cursor: pointer;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: transform 160ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.icon-button:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: var(--glass-hover); color: var(--accent); transform: translateY(-1px); }
.icon-button:active { transform: scale(.95); }
.icon-button:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring), var(--inner-highlight); }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
body.is-tab #openInTab, body:not(.is-tab) #openInPanel { display: none; }

main { width: min(100%, 1180px); margin: 0 auto; padding: 20px 14px 38px; }
.intro { padding: 8px 0 2px; }
.intro h2 { margin: 0; width: 100%; font-size: clamp(23px, 6vw, 36px); font-weight: 760; letter-spacing: -.045em; line-height: 1.08; text-wrap: balance; }
.intro p { width: 100%; max-width: 100%; margin: 9px 0 0; color: var(--muted); font-size: 13px; text-wrap: pretty; }
body:not(.is-tab) .intro h2 {
  text-align: left;
  text-align-last: auto;
}
body:not(.is-tab) .intro p {
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
}


.search-shell {
  position: relative;
  margin-top: 20px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, color-mix(in srgb, white 13%, transparent), transparent 40%),
    var(--glass);
  box-shadow: var(--glass-shadow), var(--inner-highlight);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}
.search-shell::after {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 55%;
  height: 110%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.23), transparent 67%);
  content: "";
  pointer-events: none;
}
.search-shell > * { position: relative; z-index: 1; }

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.01)),
    color-mix(in srgb, var(--glass-soft) 92%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.03);
}
.mode-tab {
  position: relative;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-weight: 760;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}
.mode-tab:hover { color: var(--text); }
.mode-tab:active { transform: scale(.985); }
.mode-tab.is-active {
  border-color: color-mix(in srgb, #8fb2ff 46%, var(--line));
  background:
    linear-gradient(180deg, rgba(255,255,255,.17), rgba(255,255,255,.02) 58%),
    linear-gradient(135deg, color-mix(in srgb, #5f8fff 74%, white 12%), color-mix(in srgb, #415cb8 90%, #29314a));
  color: white;
  box-shadow: 0 8px 18px rgba(61, 94, 184, .23), inset 0 1px 0 rgba(255,255,255,.24), inset 0 -1px 0 rgba(13, 18, 44, .18);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
}
.mode-tab:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }

.search-form { margin-top: 15px; }
.field-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 730; }
.field-label.compact { margin-top: 12px; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  background: var(--glass-input);
  box-shadow: var(--inner-highlight);
  color: var(--text);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(92, 101, 117, .46);
  border-radius: 5px;
  background: color-mix(in srgb, var(--glass-input) 90%, white 4%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 1px 2px rgba(14, 18, 28, .06);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}
input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  background: white;
  clip-path: polygon(14% 52%, 0 66%, 39% 100%, 100% 18%, 85% 3%, 36% 69%);
  transform: scale(0);
  transform-origin: center;
  transition: transform 140ms ease;
}
input[type="checkbox"]:checked {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 56%), linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent), inset 0 1px 0 rgba(255,255,255,.24);
}
input[type="checkbox"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring), inset 0 1px 0 rgba(255,255,255,.24);
}
:root[data-theme="dark"] input[type="checkbox"] {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 1px 2px rgba(0,0,0,.12);
}
input, select { height: 44px; padding: 0 12px; }

#country {
  padding-inline: 12px 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23AEB7C9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: right 14px center;
}
:root[data-theme="dark"] #country {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23D7DEEB' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#query { text-transform: uppercase; }
#query::placeholder { text-transform: none; }
textarea { min-height: 84px; padding: 11px 12px; resize: vertical; }
input:hover, select:hover, textarea:hover { background: var(--glass-hover); }
input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); background: var(--glass-hover); box-shadow: 0 0 0 3px var(--focus-ring), var(--inner-highlight); }

.primary-button, .secondary-button, .link-button {
  border-radius: 14px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}
.primary-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.30);
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), transparent 46%),
    linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(73,0,16,.13);
  color: white;
}
.primary-button:hover { transform: translateY(-1px); filter: saturate(1.04) brightness(1.025); box-shadow: 0 11px 26px color-mix(in srgb, var(--accent) 28%, transparent), inset 0 1px 0 rgba(255,255,255,.38); }
.primary-button:active { transform: scale(.975); }
.primary-button:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring), 0 8px 22px color-mix(in srgb, var(--accent) 22%, transparent); }
.primary-button:disabled { cursor: wait; opacity: .64; transform: none; }
button[data-i18n="searchButton"] { text-transform: uppercase; }
.full-width { width: 100%; margin-top: 10px; }

#textForm .input-row .primary-button {
  min-width: 82px;
  padding-inline: 11px;
  white-space: nowrap;
  text-wrap: nowrap;
}

.motion-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 11px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: color-mix(in srgb, var(--glass-soft) 82%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}
.motion-option:hover { border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); background: color-mix(in srgb, var(--glass-hover) 72%, transparent); }
.motion-option span { display: grid; gap: 2px; font-size: 12px; }
.motion-option small { color: var(--muted); font-size: 10px; line-height: 1.4; }

.status { min-height: 24px; margin: 14px 3px 0; color: var(--muted); font-size: 13px; }
.status.is-error { color: #ff375f; }
.status.is-loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--line-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 700ms linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.results-section { margin-top: 20px; }
.results-heading { display: block; margin-bottom: 10px; padding: 0 2px; }
.results-heading > div { min-width: 0; text-align: left; }
.results-heading .eyebrow { margin-bottom: 3px; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.results-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; line-height: 1.15; text-align: left; text-align-last: auto; }
.result-group-count {
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  background: color-mix(in srgb, var(--accent) 11%, var(--glass));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
  color: var(--accent-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.results-grid { display: grid; grid-template-columns: 1fr; align-items: start; gap: 13px; }
.results-groups { display: grid; gap: 12px; }

.result-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-shadow-soft), var(--inner-highlight);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
}
.result-group > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 9px; padding: 13px 14px; cursor: pointer; list-style: none; user-select: none; transition: background 180ms ease; }
.result-group > summary::-webkit-details-marker { display: none; }
.result-group > summary:hover { background: color-mix(in srgb, var(--glass-hover) 58%, transparent); }
.result-group-title { color: var(--text); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.result-group-count { display: grid; min-width: 24px; height: 24px; padding: 0 6px; place-items: center; border-radius: 999px; font-size: 10px; font-weight: 850; }
.result-group-chevron { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform 180ms ease; }
.result-group[open] .result-group-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.result-group-note { margin: 0; padding: 4px 14px 13px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.group-grid { padding: 11px; border-top: 1px solid var(--line-soft); }

.artist-profile-card,
.artwork-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(145deg, color-mix(in srgb, white 9%, transparent), transparent 34%),
    var(--glass-strong);
  box-shadow: var(--glass-shadow-soft), var(--inner-highlight);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.artwork-card:hover, .artist-profile-card:hover { border-color: color-mix(in srgb, white 28%, var(--line)); box-shadow: 0 16px 40px rgba(40, 55, 84, .15), var(--inner-highlight); }
.artist-profile-primary {
  margin: 14px 14px 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, white 7%, transparent), transparent 40%),
    color-mix(in srgb, var(--glass-soft) 92%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 22px rgba(19,28,45,.06);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}
.artist-profile-identity {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 14px 10px;
}
.artist-avatar-button { width: 112px; height: 112px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: var(--glass-soft); box-shadow: 0 9px 26px rgba(31,45,73,.14), inset 0 1px 0 rgba(255,255,255,.28); cursor: pointer; }
.artist-avatar-button img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.artist-avatar-button:hover img { transform: scale(1.025); }
.artist-profile-info { min-width: 0; }
.artist-profile-info h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.artist-profile-info .creator { margin: 6px 0 0; }
.artist-profile-meta { min-height: 18px; line-height: 1.35; text-wrap: pretty; }
.artist-profile-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.artist-profile-actions {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}
.artist-profile-size-actions,
.artist-profile-main-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.artist-profile-main-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.artist-profile-actions .primary-button,
.artist-profile-actions .secondary-button { width: 100%; min-height: 38px; font-size: 11px; }
.artist-profile-size-actions .secondary-button {
  padding-inline: 6px;
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
  text-wrap: nowrap;
  overflow-wrap: normal;
  letter-spacing: -.01em;
}
.artist-profile-main-actions .primary-button { min-height: 40px; }
.apple-music-button {
  border: 1px solid rgba(255,255,255,.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,.20), transparent 46%),
    linear-gradient(135deg, #4f7dff, #7b5cff 58%, #9b5cff);
  box-shadow: 0 8px 22px rgba(86, 98, 255, .28), inset 0 1px 0 rgba(255,255,255,.34), inset 0 -1px 0 rgba(18, 10, 94, .18);
  color: white;
}
.apple-music-button:hover { box-shadow: 0 11px 26px rgba(86, 98, 255, .34), inset 0 1px 0 rgba(255,255,255,.38); }
.apple-music-button:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, #7b5cff 28%, transparent), 0 8px 22px rgba(86, 98, 255, .28); }
.artist-banner { margin: 0 14px 14px; }

.artwork-preview { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: color-mix(in srgb, var(--glass-soft) 90%, #cfd5df); cursor: pointer; aspect-ratio: 1; }
.artwork-preview::after { position: absolute; inset: 0; background: linear-gradient(145deg, rgba(255,255,255,.16), transparent 30%, transparent 72%, rgba(255,255,255,.04)); content: ""; pointer-events: none; }
.artwork-preview img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 260ms cubic-bezier(.2,.8,.2,1), filter 220ms ease; }
.artwork-preview:hover img { transform: scale(1.022); filter: saturate(1.02); }
.preview-chips {
  position: absolute;
  z-index: 2;
  right: 9px;
  bottom: 9px;
  display: flex;
  max-width: calc(100% - 18px);
  min-height: 27px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.type-chip,
.content-rating-badge {
  display: inline-flex;
  width: auto;
  height: 27px;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 5px 14px rgba(0,0,0,.16);
  color: white;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.type-chip { background: rgba(18, 18, 24, .48); }
.type-chip.is-editorial-playlist {
  gap: 0;
  padding-inline: 7px 8px;
  border-color: rgba(255,255,255,.36);
  background: linear-gradient(135deg, var(--logo-pink) 0%, var(--logo-coral) 34%, var(--logo-blue) 70%, var(--logo-lilac) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 7px 18px rgba(73, 32, 74, .28);
  color: #fff;
}
.type-chip.is-editorial-playlist .type-chip-prefix,
.type-chip.is-editorial-playlist .type-chip-suffix {
  display: inline-block;
  line-height: 1;
}
.type-chip.is-editorial-playlist .type-chip-prefix { opacity: .98; }
.type-chip.is-editorial-playlist .type-chip-suffix { opacity: 1; }
:root[data-language="vi"] .type-chip.is-editorial-playlist,
:root[data-language="th"] .type-chip.is-editorial-playlist,
:root[data-language="el"] .type-chip.is-editorial-playlist,
:root[data-language="fr"] .type-chip.is-editorial-playlist,
:root[data-language="ru"] .type-chip.is-editorial-playlist {
  font-size: 8.4px;
  padding-inline: 7px;
}
@media (max-width: 520px) {
  .type-chip.is-editorial-playlist {
    font-size: 8.35px;
    gap: 2px;
    padding-inline: 6px 7px;
  }
}
.content-rating-badge.is-explicit {
  border-color: rgba(255,255,255,.34);
  background: rgba(225, 25, 71, .88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 5px 14px rgba(106,0,29,.22);
}
.content-rating-badge.is-clean {
  border-color: rgba(255,255,255,.34);
  background: rgba(34, 164, 87, .88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 5px 14px rgba(4,74,33,.20);
}
.content-rating-badge[hidden] { display: none !important; }
:root[data-language="vi"] .content-rating-badge,
:root[data-language="th"] .content-rating-badge,
:root[data-language="el"] .content-rating-badge,
:root[data-language="fr"] .content-rating-badge,
:root[data-language="ru"] .content-rating-badge {
  padding-inline: 9px;
  font-size: 8.75px;
}
.card-body { padding: 13px; }
.card-body h3 { margin: 0; font-size: 16px; line-height: 1.28; letter-spacing: -.015em; }
.creator { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.metadata { min-height: 18px; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.size-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.secondary-button {
  min-height: 35px;
  padding: 0 7px;
  border: 1px solid var(--line);
  background: var(--glass-input);
  box-shadow: var(--inner-highlight);
  color: var(--text);
  font-size: 11px;
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
}
.secondary-button:hover { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); background: var(--glass-hover); color: var(--accent); transform: translateY(-1px); }
.secondary-button:active { transform: scale(.975); }
.secondary-button:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring), var(--inner-highlight); }
.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px 10px;
  margin-top: 8px;
}
.card-actions .primary-button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  font-size: 12px;
}
.card-actions .link-button {
  grid-column: 1 / -1;
  justify-self: center;
  width: fit-content;
  margin-top: 1px;
  padding-top: 2px;
  line-height: 1.25;
  text-align: center;
}
.motion-toggle-button { background: linear-gradient(180deg, rgba(255,255,255,.22), transparent 46%), linear-gradient(135deg, var(--motion-button), var(--motion-button-strong)); }
.motion-toggle-button[aria-expanded="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--motion-button-strong) 23%, transparent), 0 9px 24px color-mix(in srgb, var(--motion-button-strong) 26%, transparent), inset 0 1px 0 rgba(255,255,255,.32); }
.motion-toggle-button.has-motion::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(255,255,255,.11); vertical-align: 1px; }
.link-button { padding: 7px 1px; border: 0; background: transparent; color: var(--accent); font-size: 11px; }
.link-button:hover { color: var(--accent-strong); transform: translateY(-1px); }
.link-button[hidden] { display: none; }

.details { margin-top: 14px; }
.detail-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--glass);
  box-shadow: var(--glass-shadow-soft), var(--inner-highlight);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
}
.detail-card h3 { margin: 0; font-size: 15px; }
.detail-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.track-list { margin: 11px 0 0; padding: 0; list-style: none; counter-reset: tracks; }
.track-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 12px; }
.track-list li::before { counter-increment: tracks; content: counter(tracks); color: var(--muted); }
.track-title { display: flex; min-width: 0; align-items: center; gap: 7px; }
.track-title > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.track-rating-badge { min-height: 19px; flex: 0 0 auto; padding: 4px 6px; border-radius: 7px; font-size: 8px; }
.track-duration { color: var(--muted); font-variant-numeric: tabular-nums; }

.motion-result {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--motion-panel-border);
  border-radius: 17px;
  background:
    linear-gradient(145deg, color-mix(in srgb, white 8%, transparent), transparent 42%),
    var(--motion-panel-bg);
  box-shadow: 0 8px 24px rgba(24, 34, 54, .09), var(--inner-highlight);
  color: var(--motion-panel-text);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  backdrop-filter: blur(20px) saturate(165%);
}
/* Flatten release/detail Apple Motion: remove the redundant outer glass box. */
.artwork-card .motion-result,
.detail-card > .motion-result {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.artwork-card .motion-result > .motion-result-head,
.detail-card > .motion-result > .motion-result-head {
  padding: 0 1px;
}
.artwork-card .motion-result > .motion-shape-group,
.detail-card > .motion-result > .motion-shape-group {
  width: 100%;
  margin-inline: 0;
}

.motion-result-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.motion-result h4 { margin: 0; font-size: 13px; }
.motion-result p { margin: 5px 0 0; color: var(--motion-panel-muted); font-size: 11px; }
.motion-badge { padding: 4px 8px; border: 1px solid rgba(255,255,255,.26); border-radius: 999px; background: color-mix(in srgb, var(--accent) 78%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.28); color: white; font-size: 9px; font-weight: 850; letter-spacing: .06em; }
.motion-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.motion-actions .primary-button, .motion-actions .secondary-button { width: 100%; min-width: 0; min-height: 36px; height: 36px; padding: 0 8px; font-size: 11px; line-height: 1.1; font-weight: 750; white-space: nowrap; }
.motion-actions .secondary-button { background: var(--motion-open-bg); border-color: var(--motion-open-border); color: var(--motion-open-text); }
.motion-actions .secondary-button:hover { background: color-mix(in srgb, var(--motion-open-bg) 76%, var(--motion-shape-color)); border-color: color-mix(in srgb, var(--motion-shape-color) 55%, var(--motion-open-border)); color: var(--motion-shape-color); }
.motion-shape-group {
  --motion-shape-color: var(--accent);
  margin-top: 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--motion-shape-color) 32%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--motion-shape-color) 8%, var(--glass-soft));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.motion-shape-square { --motion-shape-color: var(--motion-square); }
.motion-shape-tall { --motion-shape-color: var(--motion-tall); }
.motion-shape-title { display: block; color: var(--motion-shape-color); font-size: 12px; }
.motion-variant-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--motion-shape-color) 22%, var(--line-soft)); }
.motion-shape-group > .motion-variant-row:first-of-type { border-top-style: dashed; }
.motion-variant-row > strong { font-size: 12px; }
.motion-shape-group .motion-actions .primary-button { background: linear-gradient(180deg, rgba(255,255,255,.20), transparent 46%), linear-gradient(135deg, var(--motion-shape-color), color-mix(in srgb, var(--motion-shape-color) 72%, #17171b)); }
.motion-shape-group .motion-actions .secondary-button:hover { border-color: var(--motion-shape-color); color: var(--motion-shape-color); }
.motion-download-error { width: 100%; margin: 2px 0 0; color: #ff6689 !important; font-size: 10px !important; }

footer { width: min(100%, 1180px); margin: 0 auto; padding: 0 16px 24px; color: var(--muted); font-size: 10px; text-align: center; }
footer p { margin: 3px 0; }

@media (hover: none) {
  .primary-button:hover, .secondary-button:hover, .icon-button:hover, .link-button:hover { transform: none; }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 280ms;
  animation-timing-function: cubic-bezier(.22,.72,.18,1);
}
::view-transition-old(root) { animation-name: theme-fade-out; }
::view-transition-new(root) { animation-name: theme-fade-in; }
@keyframes theme-fade-out { to { opacity: 0; filter: blur(1.5px); } }
@keyframes theme-fade-in { from { opacity: 0; filter: blur(1.5px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (min-width: 700px) {
  body.is-tab main { padding: 30px 24px 50px; }
  body.is-tab .app-header { grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 12px 14px; }
  body.is-tab .brand-lockup { grid-column: 1; grid-row: 1; }
  body.is-tab .header-actions { grid-column: 2; grid-row: 1; width: auto; }
  body.is-tab .language-picker { width: 142px; max-width: 142px; flex: 0 0 142px; }
  body.is-tab .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.is-tab .search-shell { padding: 18px; }

  /* Artist profile uses the full row in tab view, with banner video on the right. */
  body.is-tab .result-group[data-group="profile"] .group-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.is-tab .result-group[data-group="profile"] .artist-profile-card {
    display: grid;
    grid-template-columns: minmax(310px, .82fr) minmax(360px, 1.18fr);
    grid-template-areas: "primary banner";
    align-items: stretch;
  }
  body.is-tab .result-group[data-group="profile"] .artist-profile-primary {
    grid-area: primary;
    margin: 14px 0 14px 14px;
    align-self: stretch;
  }
  body.is-tab .result-group[data-group="profile"] .artist-profile-identity {
    align-self: start;
    padding: 16px 16px 10px;
  }
  body.is-tab .result-group[data-group="profile"] .artist-profile-actions {
    align-self: end;
    padding: 0 16px 16px;
  }
  body.is-tab .result-group[data-group="profile"] .artist-banner {
    grid-area: banner;
    min-width: 0;
    margin: 14px;
    align-self: stretch;
  }
}


@media (min-width: 700px) and (max-width: 900px) {
  body.is-tab .result-group[data-group="profile"] .artist-profile-card {
    grid-template-columns: minmax(260px, .9fr) minmax(300px, 1.1fr);
  }
  body.is-tab .result-group[data-group="profile"] .artist-profile-identity {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  body.is-tab .result-group[data-group="profile"] .artist-avatar-button {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 430px) {
  .app-header { border-radius: 21px; }
  .search-shell { border-radius: 24px; }
  .artist-profile-identity { grid-template-columns: 82px minmax(0, 1fr); gap: 11px; }
  .artist-avatar-button { width: 82px; height: 82px; }
  .card-actions { gap: 8px 9px; }
  .card-actions .link-button { justify-self: center; text-align: center; }
}

@media (min-width: 1020px) {
  body.is-tab .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== Cumulative UI refinements ===== */

/* Header edges follow the exact content column in both panel and tab views. */
@media (min-width: 700px) {
  body.is-tab .app-header {
    width: min(calc(100% - 48px), 1132px);
    max-width: 1132px;
  }
}

/* Keep the creator accent red in Light Mode, cyan in Dark Mode only. */
:root[data-theme="light"] .brand-button .eyebrow { color: var(--accent); }
:root[data-theme="dark"] .brand-button .eyebrow { color: #64d2ff; }

/* Dark Mode is intentionally flatter: less reflection, blur and glass bloom. */
:root[data-theme="dark"] {
  --line: rgba(255, 255, 255, .13);
  --line-soft: rgba(255, 255, 255, .075);
  --glass: rgba(22, 25, 33, .36);
  --glass-strong: rgba(29, 33, 42, .43);
  --glass-soft: rgba(24, 27, 35, .24);
  --glass-input: rgba(29, 33, 42, .34);
  --glass-hover: rgba(42, 47, 58, .49);
  --glass-shadow: 0 14px 34px rgba(0, 0, 0, .24), 0 1px 4px rgba(0, 0, 0, .18);
  --glass-shadow-soft: 0 8px 22px rgba(0, 0, 0, .20), 0 1px 3px rgba(0, 0, 0, .15);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, .075), inset 0 -1px 0 rgba(255, 255, 255, .018);
  --motion-panel-bg: rgba(27, 30, 38, .39);
  --motion-panel-border: rgba(255, 255, 255, .12);
  --motion-open-bg: rgba(31, 35, 44, .37);
  --motion-open-border: rgba(255, 255, 255, .14);
  --blur: 28px;
  --saturate: 126%;
}
:root[data-theme="dark"] body::before { opacity: .25; filter: blur(68px) saturate(128%); }
:root[data-theme="dark"] body::after { opacity: .42; filter: blur(34px) saturate(112%); }
:root[data-theme="dark"] .app-header,
:root[data-theme="dark"] .search-shell,
:root[data-theme="dark"] .result-group,
:root[data-theme="dark"] .detail-card,
:root[data-theme="dark"] .artwork-card,
:root[data-theme="dark"] .artist-profile-card {
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
}
:root[data-theme="dark"] .app-header::after,
:root[data-theme="dark"] .search-shell::after { opacity: .24; }
:root[data-theme="dark"] .artist-profile-primary {
  border-color: rgba(255,255,255,.10);
  background: rgba(24, 27, 35, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 22px rgba(0,0,0,.12);
  -webkit-backdrop-filter: blur(20px) saturate(122%);
  backdrop-filter: blur(20px) saturate(122%);
}
:root[data-theme="dark"] .primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 18%, transparent), inset 0 1px 0 rgba(255,255,255,.12);
}
:root[data-theme="dark"] .apple-music-button {
  border: 1px solid rgba(255,255,255,.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), transparent 46%),
    linear-gradient(135deg, #4f7dff, #7b5cff 58%, #9b5cff);
  box-shadow: 0 8px 20px rgba(86, 98, 255, .24), inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(18, 10, 94, .24);
  color: white;
}
:root[data-theme="dark"] .apple-music-button:hover {
  box-shadow: 0 10px 24px rgba(86, 98, 255, .30), inset 0 1px 0 rgba(255,255,255,.18);
}
:root[data-theme="dark"] .motion-toggle-button {
  background: linear-gradient(135deg, var(--motion-button), var(--motion-button-strong));
}
:root[data-theme="dark"] .mode-tabs {
  border-color: rgba(255,255,255,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015)),
    rgba(22, 25, 33, .24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), inset 0 0 0 1px rgba(255,255,255,.02);
}
:root[data-theme="dark"] .mode-tab {
  background: rgba(255,255,255,.025);
}
:root[data-theme="dark"] .mode-tab.is-active {
  border-color: rgba(137, 170, 255, .42);
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.02) 56%),
    linear-gradient(135deg, rgba(77, 113, 205, .82), rgba(53, 78, 142, .86));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(48, 74, 146, .26), inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.18);
}
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}

/* Vertically center both checkboxes inside their option rows. */
.motion-option { align-items: center; }
.motion-option input[type="checkbox"] { align-self: center; margin: 0; }

/* Custom Liquid Glass language chooser. The native select remains as a hidden state bridge. */
.language-picker {
  position: relative;
  display: flex;
  min-width: 0;
  height: 38px;
  flex: 1 1 auto;
  align-items: center;
}
.language-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.language-button {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding-inline: 36px;
  padding-inline: 14px 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: var(--glass-input);
  box-shadow: var(--inner-highlight);
  color: var(--text);
  font-size: 12px;
  font-weight: 740;
  line-height: 1.2;
  direction: ltr;
  cursor: pointer;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}
.language-button:hover { background: var(--glass-hover); }
.language-button:focus-visible,
.language-button[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: 0 0 0 3px var(--focus-ring), var(--inner-highlight);
}
.language-button-label {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-inline: 2px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.language-chevron {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 15px;
  height: 15px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transform: translateY(-50%);
  transition: transform 170ms ease;
  pointer-events: none;
}
.language-button[aria-expanded="true"] .language-chevron { transform: translateY(-50%) rotate(180deg); }

.language-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  gap: 4px;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--line) 88%, white 12%);
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.16), transparent 34%),
    color-mix(in srgb, var(--glass-strong) 92%, transparent);
  box-shadow: 0 20px 52px rgba(13, 20, 34, .22), var(--inner-highlight);
  -webkit-backdrop-filter: blur(30px) saturate(178%);
  backdrop-filter: blur(30px) saturate(178%);
  direction: ltr;
  overscroll-behavior: contain;
}
.language-menu[hidden] { display: none !important; }
.language-option {
  width: 100%;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 690;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 130ms ease;
}
.language-option:hover,
.language-option:focus-visible {
  outline: 0;
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: color-mix(in srgb, var(--glass-hover) 74%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, rgba(255,255,255,.28) 88%, transparent);
}
.language-option:active { transform: scale(.985); }
.language-option.is-selected {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: color-mix(in srgb, var(--accent) 13%, var(--glass-hover));
  color: var(--text);
}
:root[data-theme="dark"] .language-button {
  -webkit-backdrop-filter: blur(9px) saturate(115%);
  backdrop-filter: blur(9px) saturate(115%);
}
:root[data-theme="dark"] .language-menu {
  border-color: rgba(255,255,255,.11);
  background: rgba(24, 27, 35, .76);
  box-shadow: 0 16px 38px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.055);
  -webkit-backdrop-filter: blur(20px) saturate(118%);
  backdrop-filter: blur(20px) saturate(118%);
}
:root[data-theme="dark"] .language-option:hover,
:root[data-theme="dark"] .language-option:focus-visible {
  border-color: rgba(255,255,255,.18);
  background: rgba(58, 63, 76, .78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}
:root[data-theme="dark"] .language-option.is-selected { background: rgba(255, 55, 95, .15); }

/* Translation-safe buttons: long labels can breathe without breaking the grid. */
.primary-button,
.secondary-button,
.mode-tab,
.link-button {
  min-width: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.primary-button,
.secondary-button { line-height: 1.18; }
.motion-actions .primary-button,
.motion-actions .secondary-button {
  height: auto;
  min-height: 36px;
  padding-block: 6px;
  white-space: normal;
}

:root[data-language="fr"] .primary-button,
:root[data-language="es"] .primary-button,
:root[data-language="ru"] .primary-button,
:root[data-language="el"] .primary-button,
:root[data-language="ms"] .primary-button,
:root[data-language="id"] .primary-button {
  padding-inline: 12px;
  font-size: 11.5px;
}
:root[data-language="ar-SA"] .primary-button,
:root[data-language="ar-AE"] .primary-button,
:root[data-language="ar-SA"] .secondary-button,
:root[data-language="ar-AE"] .secondary-button,
:root[data-language="ar-SA"] .mode-tab,
:root[data-language="ar-AE"] .mode-tab {
  padding-inline: 10px;
  font-size: 11.5px;
  line-height: 1.28;
}
:root[data-language="ar-SA"] .language-button-label,
:root[data-language="ar-AE"] .language-button-label { font-size: 11px; }
:root[data-language="ms"] .language-button-label,
:root[data-language="id"] .language-button-label { font-size: 11.5px; }

:root[data-language="en"] .card-actions .primary-button,
:root[data-language="th"] .card-actions .primary-button,
:root[data-language="ja"] .card-actions .primary-button,
:root[data-language="el"] .card-actions .primary-button,
:root[data-language="fr"] .card-actions .primary-button,
:root[data-language="ru"] .card-actions .primary-button,
:root[data-language="id"] .card-actions .primary-button,
:root[data-language="ms"] .card-actions .primary-button {
  padding-inline: 10px;
  font-size: 11px;
  line-height: 1.12;
}
:root[data-language="en"] .card-actions .link-button,
:root[data-language="th"] .card-actions .link-button,
:root[data-language="ja"] .card-actions .link-button,
:root[data-language="el"] .card-actions .link-button,
:root[data-language="fr"] .card-actions .link-button,
:root[data-language="ru"] .card-actions .link-button,
:root[data-language="id"] .card-actions .link-button,
:root[data-language="ms"] .card-actions .link-button {
  margin-top: 2px;
  justify-self: center;
}

/* RTL language variants keep natural reading order while the language arrow remains on the right. */
html[dir="rtl"] .brand-button { text-align: right; }
html[dir="rtl"] .field-label,
html[dir="rtl"] .intro,
html[dir="rtl"] .status,
html[dir="rtl"] .card-body,
html[dir="rtl"] .detail-card { text-align: right; }
html[dir="rtl"] .motion-option span { text-align: right; }
html[dir="rtl"] .artist-profile-info { text-align: right; }
html[dir="rtl"] .results-heading > div,
html[dir="rtl"] .results-heading h2 { text-align: right; text-align-last: auto; }
html[dir="rtl"] .language-button { direction: ltr; }

@media (max-width: 430px) {
  .language-button { padding-inline: 12px 34px; }
  .language-chevron { right: 11px; }
  .artist-profile-size-actions,
  .artist-profile-main-actions { grid-template-columns: 1fr; }
  .artist-profile-identity { grid-template-columns: 82px minmax(0, 1fr); gap: 11px; }
  .artist-avatar-button { width: 82px; height: 82px; }
}


/* URL lookup in tab view: keep the release artwork card visible while details scroll. */
@media (min-width: 700px) {
  body.is-tab .results-section.url-detail-layout {
    display: grid;
    grid-template-columns: minmax(300px, 368px) minmax(0, 1fr);
    align-items: start;
    column-gap: 14px;
  }
  body.is-tab .results-section.url-detail-layout .results-heading {
    grid-column: 1 / -1;
  }
  body.is-tab .results-section.url-detail-layout #results {
    position: sticky;
    z-index: 6;
    top: 92px;
    display: grid;
    grid-column: 1;
    grid-template-columns: 1fr;
    align-self: start;
  }
  body.is-tab .results-section.url-detail-layout #details {
    grid-column: 2;
    min-width: 0;
    margin-top: 0;
  }
  body.is-tab .results-section.url-detail-layout #details .detail-card {
    margin: 0;
  }
}


/* ===== Independent card heights + flattened artist profile shell ===== */
/* A Motion panel can grow only its own release card. Sibling cards keep intrinsic height. */
.results-grid > .artwork-card {
  align-self: start;
  height: auto;
}

/* Remove the redundant outer profile-card glass layer. The two inner boxes become the visible surfaces. */
.artist-profile-card {
  display: grid;
  gap: 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.artist-profile-card:hover {
  border-color: transparent;
  box-shadow: none;
}
.artist-profile-primary,
.artist-profile-card > .artist-banner {
  margin: 0;
}

@media (min-width: 700px) {
  body.is-tab .result-group[data-group="profile"] .artist-profile-card {
    gap: 12px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.is-tab .result-group[data-group="profile"] .artist-profile-primary,
  body.is-tab .result-group[data-group="profile"] .artist-banner {
    margin: 0;
  }
}


.artwork-preview {
  cursor: default;
}
.artwork-preview:hover img {
  transform: none;
  filter: none;
}
.artwork-preview[aria-hidden="true"] {
  pointer-events: none;
}
.image-viewer[hidden] {
  display: none !important;
}
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 10, 18, .72);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}
.image-viewer img {
  display: block;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  box-shadow: 0 22px 80px rgba(0,0,0,.42);
  background: rgba(255,255,255,.04);
}
.image-viewer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(18, 22, 31, .52);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.14);
}
.has-image-viewer {
  overflow: hidden;
}


/* Liquid Glass storefront chooser. Native <select> popups are OS/browser UI and
   cannot be themed consistently, so the select stays as a hidden value bridge. */
.country-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}
.country-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.country-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 44px;
  min-width: 0;
  align-items: center;
  padding: 0 42px 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: var(--glass-input);
  box-shadow: var(--inner-highlight);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.country-button:hover { background: var(--glass-hover); }
.country-button:focus-visible,
.country-button[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--glass-hover);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--inner-highlight);
}
.country-button-label {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.country-chevron {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
  transition: transform 170ms ease;
  pointer-events: none;
}
.country-button[aria-expanded="true"] .country-chevron {
  transform: translateY(-50%) rotate(180deg);
}
.country-menu {
  position: fixed;
  z-index: 1250;
  pointer-events: auto;
  display: grid;
  gap: 4px;
  padding: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--line) 88%, white 12%);
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.17), transparent 34%),
    color-mix(in srgb, var(--glass-strong) 92%, transparent);
  box-shadow: 0 20px 52px rgba(13, 20, 34, .22), var(--inner-highlight);
  -webkit-backdrop-filter: blur(30px) saturate(178%);
  backdrop-filter: blur(30px) saturate(178%);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.country-menu[hidden] { display: none !important; }
.country-option {
  width: 100%;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 130ms ease;
}
.country-option:hover,
.country-option:focus-visible {
  outline: 0;
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: color-mix(in srgb, var(--glass-hover) 78%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, rgba(255,255,255,.28) 88%, transparent);
}
.country-option:active { transform: scale(.992); }
.country-option.is-selected {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, var(--glass-hover));
  color: var(--text);
}
:root[data-theme="dark"] .country-button {
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}
:root[data-theme="dark"] .country-menu {
  border-color: rgba(255,255,255,.11);
  background:
    linear-gradient(145deg, rgba(255,255,255,.055), transparent 34%),
    rgba(24, 27, 35, .78);
  box-shadow: 0 18px 44px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.055);
  -webkit-backdrop-filter: blur(22px) saturate(122%);
  backdrop-filter: blur(22px) saturate(122%);
}
:root[data-theme="dark"] .country-option:hover,
:root[data-theme="dark"] .country-option:focus-visible {
  border-color: rgba(255,255,255,.18);
  background: rgba(58, 63, 76, .78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}
:root[data-theme="dark"] .country-option.is-selected { background: rgba(255, 55, 95, .16); }
html[dir="rtl"] .country-button { padding: 0 42px 0 12px; direction: ltr; }
html[dir="rtl"] .country-button-label,
html[dir="rtl"] .country-option { text-align: right; direction: rtl; }

/* Web build: full-page layout only. */
.view-button { display: none !important; }


/* Floating back-to-top control */
.back-to-top {
  position: fixed;
  z-index: 1200;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 18px));
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.20), transparent 48%),
    linear-gradient(135deg, color-mix(in srgb, var(--logo-blue) 84%, #3f7fff), color-mix(in srgb, var(--logo-lilac) 76%, #657cff));
  box-shadow: 0 12px 30px rgba(45, 70, 120, .24), inset 0 1px 0 rgba(255,255,255,.38);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(.88);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
}
.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  filter: brightness(1.08) saturate(1.08);
  box-shadow: 0 15px 34px rgba(48, 93, 160, .32), inset 0 1px 0 rgba(255,255,255,.44);
  transform: translateY(-2px) scale(1.035);
}
.back-to-top:active { transform: translateY(0) scale(.96); }
.back-to-top:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--logo-blue) 32%, transparent), 0 15px 34px rgba(48, 93, 160, .30);
}
:root[data-theme="dark"] .back-to-top {
  border-color: rgba(128,235,255,.34);
  box-shadow: 0 12px 32px rgba(43, 177, 220, .24), inset 0 1px 0 rgba(255,255,255,.28);
}
@media (max-width: 520px) {
  .back-to-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
    width: 45px;
    height: 45px;
  }
  .back-to-top svg { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}
