/* ==========================================================================
   MusicalSlides — modern stylesheet
   ========================================================================== */

/* Wordmark font: Cormorant Garamond (SIL Open Font License, public/fonts/OFL.txt),
   self-hosted because the CSP only allows the site's own files. Latin subset. */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-600.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-600-italic.woff2") format("woff2");
}

:root {
  --accent: #ffb36b;
  --accent-soft: rgba(255, 179, 107, 0.16);
  --text: #f7f4ef;
  --text-dim: rgba(247, 244, 239, 0.72);
  --glass: rgba(16, 16, 24, 0.55);
  --glass-strong: rgba(18, 18, 27, 0.92);
  --glass-border: rgba(255, 255, 255, 0.14);
  --radius: 20px;
  --radius-pill: 999px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background-color: #12121a;
  overflow-x: hidden;
}

/* ---------- Background layers ---------- */

.bg-fallback,
.bg-layer {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.bg-fallback {
  z-index: 0;
  background: linear-gradient(160deg, #252c42 0%, #171a26 45%, #0e1017 100%);
}

.bg-layer {
  z-index: 1;
  opacity: 0;
  transition: opacity 2.4s ease;
  will-change: opacity;
}

.bg-layer.visible {
  opacity: 1;
}

.bg-layer.top {
  z-index: 2;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8, 8, 14, 0.42) 0%, rgba(8, 8, 14, 0.28) 40%, rgba(8, 8, 14, 0.62) 100%);
  pointer-events: none;
}

/* ---------- Page layout ---------- */

.page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Tight top and bottom so the slideshow photo gets most of the screen. */
  padding: 12px 20px 10px;
}

/* Homepage: keep the header at the top and push the controls down
   just above the footer so the photos stay visible. */
.home .page {
  justify-content: flex-end;
}

.home .site-header {
  margin-bottom: auto;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Logo and name share one row, centred on each other; the tagline is
   centred underneath both. */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  color: var(--accent);
  filter: drop-shadow(0 4px 14px rgba(255, 179, 107, 0.45));
}

/* Wordmark: "Musical" upright, "Slides" in orange italic. */
.brand-name {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.4vw, 54px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.5);
}

.brand-name em {
  font-style: italic;
  color: var(--accent);
}

.brand-home {
  color: inherit;
  text-decoration: none;
}

.brand-tagline {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.6vw, 18px);
  font-style: italic;
  font-weight: 600;
  color: var(--text-dim);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* ---------- Glass surfaces ---------- */

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow);
}

/* ---------- Player zone & bars ---------- */

.player-zone {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(1100px, 100%);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 26px;
}

.bar-btn {
  padding: 8px 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

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

.menu-btn {
  padding: 8px 12px;
}

.icon-btn {
  padding: 8px;
  border-radius: 50%;
}

.icon {
  flex: none;
}

.chevron {
  opacity: 0.65;
  transition: transform 0.2s ease;
}

.dropdown.open .chevron {
  transform: rotate(180deg);
}

/* On desktop, the dropdown occupies the first line of its bar and the
   remaining controls wrap onto the second line. */
.bar > .dropdown {
  flex: 1 0 100%;
  display: flex;
  justify-content: center;
}

/* ---------- Dropdown menus ---------- */

.dropdown {
  position: relative;
}

.menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.98);
  min-width: 200px;
  padding: 8px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 50;
}

.dropdown.open .menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 13px;
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.menu button:hover,
.menu button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.menu button.active {
  color: var(--accent);
}

.menu button.active::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- Sound controls ---------- */

.sound-name {
  min-width: 44px;
  font-size: 14px;
  color: var(--text-dim);
}

.volume {
  width: 96px;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

#music-toggle[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

#sound-toggle .wave {
  opacity: 0;
  transition: opacity 0.18s ease;
}

#sound-toggle.playing .wave {
  opacity: 1;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text-dim);
  font-weight: 400;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---------- Music panel ---------- */

.music-panel {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  padding: 14px;
  border-radius: var(--radius);
  z-index: 60;
}

.music-panel[hidden] {
  display: none !important;
}

.music-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}

.music-panel-head h2 {
  font-size: 16px;
  font-weight: 600;
}

.music-panel iframe {
  display: block;
  border: 0;
  border-radius: 14px;
  background: #000;
}

.music-track {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 6px 10px;
}

.music-track #sc-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-track #sc-artist {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-track #sc-artist:empty {
  display: none;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 4px;
}

.music-controls .btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.play-btn {
  background: var(--accent);
  color: #1a1209;
  border-radius: 50%;
}

.play-btn:hover {
  background: var(--accent);
  filter: brightness(1.08);
}

.play-btn .icon-pause {
  display: none;
}

.play-btn.playing .icon-play {
  display: none;
}

.play-btn.playing .icon-pause {
  display: block;
}

#sc-mute .icon-muted {
  display: none;
}

#sc-mute.muted .icon-vol {
  display: none;
}

#sc-mute.muted .icon-muted {
  display: block;
}

.music-controls .volume {
  width: 90px;
}

.music-progress {
  position: relative;
  height: 6px;
  margin: 6px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  overflow: hidden;
}

.music-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  pointer-events: none;
}

.music-time {
  display: flex;
  justify-content: space-between;
  padding: 0 6px 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 70;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

.toast[hidden] {
  display: none;
}

/* ---------- Focus & accessibility ---------- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .bg-layer {
    transition: none;
  }

  .btn,
  .menu,
  .chevron {
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .page {
    padding: 10px 14px 8px;
    gap: 12px;
  }

  .player-zone {
    grid-template-columns: 1fr;
    width: min(520px, 100%);
  }

  .bar {
    border-radius: 24px;
  }

  /* On stacked bars, return to the natural single-line flow. */
  .bar > .dropdown {
    flex: 0 1 auto;
  }

  .volume {
    flex: 1;
    max-width: 180px;
  }

  .menu {
    left: 0;
    transform: translateX(0) translateY(6px) scale(0.98);
    min-width: 190px;
  }

  .dropdown.open .menu {
    transform: translateX(0) translateY(0) scale(1);
  }
}

/* ---------- Privacy page ---------- */

.policy-page .page {
  justify-content: flex-start;
  gap: 22px;
}

.policy {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 34px 36px;
  border-radius: 24px;
}

.policy h1 {
  font-size: 26px;
  margin-bottom: 6px;
}

.policy .updated {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.policy h2 {
  font-size: 18px;
  margin: 26px 0 10px;
  color: var(--accent);
}

.policy p,
.policy li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
}

.policy ul {
  padding-left: 22px;
  margin: 8px 0;
}

.policy a {
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

.policy a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.back-link {
  display: inline-block;
  margin-top: 26px;
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
}

@media (max-width: 640px) {
  .policy {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   Panels: Share and Account (sign in, register, password reset, My shares)
   ========================================================================== */

.panel {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  padding: 18px;
  border-radius: var(--radius);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* The account panel (sign in, register, My shares) sits in the middle. */
.panel-center {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  max-height: calc(100dvh - 32px);
}

.panel[hidden],
.panel [hidden] {
  display: none !important;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.panel-head h2 {
  font-size: 17px;
  font-weight: 600;
}

.panel h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.panel-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Buttons ---------- */

.btn-accent {
  justify-content: center;
  padding: 11px 18px;
  background: var(--accent);
  color: #1a1209;
  font-weight: 600;
}

.btn-accent:hover {
  background: var(--accent);
  filter: brightness(1.08);
}

.btn-ghost {
  justify-content: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--glass-border);
  color: var(--text);
  text-decoration: none;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-danger {
  background: rgba(255, 107, 107, 0.16);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ffb4b4;
}

.link-btn {
  padding: 0;
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ---------- Form fields ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  color: var(--text-dim);
}

.field-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.input::placeholder {
  color: rgba(247, 244, 239, 0.45);
}

.input:read-only {
  color: var(--text-dim);
}

.input-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
}

.check input {
  accent-color: var(--accent);
}

.range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick button {
  flex: 1 1 0;
  min-width: 58px;
  padding: 7px 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.quick button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.quick button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
}

.quick button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

/* ---------- Scenes menu: My MusicalSlides ---------- */

.menu-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--glass-border);
}

.menu-label {
  padding: 6px 13px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.menu .menu-create {
  margin-top: 6px;
  border-top: 1px solid var(--glass-border);
  border-radius: 0 0 11px 11px;
  color: var(--accent);
}

/* ---------- Account: My MusicalSlides and the album editor ---------- */

.studio {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.albums {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.album-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}

.album-cover {
  flex: none;
  width: 56px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.album-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.album-info strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-info span {
  font-size: 12px;
  color: var(--text-dim);
}

.album-name {
  display: flex;
  flex-direction: row !important;
  align-items: flex-end;
  gap: 8px;
}

.album-name .field {
  flex: 1;
  min-width: 0;
}

.album-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meter {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.meter-bar {
  width: 0;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.meter-bar.full {
  background: #f5c451;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
}

.photo-tile {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  aspect-ratio: 4 / 3;
}

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

.photo-tools {
  position: absolute;
  inset: auto 4px 4px 4px;
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.photo-tools button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: rgba(10, 10, 16, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.photo-tools button:hover {
  background: rgba(10, 10, 16, 0.9);
}

.photo-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.file-btn {
  position: relative;
}

.file-btn:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  font-size: 13px;
  color: var(--text-dim);
}

.upload-list .error {
  color: #ffc2c2;
}

.album-actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-link {
  color: var(--accent);
}

select.input {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

select.input option,
select.input optgroup {
  background: #1b1b26;
  color: var(--text);
}

/* ---------- Account perks and "coming soon" ---------- */

.perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}

.perks-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.perks ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.45;
}

.soon {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.teaser {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 179, 107, 0.12), rgba(255, 179, 107, 0.03));
  border: 1px solid rgba(255, 179, 107, 0.3);
  font-size: 14px;
  line-height: 1.45;
}

/* ---------- Share panel ---------- */

.mix {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  font-size: 13px;
}

.chip-label {
  color: var(--text-dim);
}

.link-row {
  display: flex;
  gap: 8px;
}

.link-row .input {
  flex: 1;
  min-width: 0;
}

.share-limit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
}

.share-limit .link-btn {
  text-align: left;
}

.share-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ---------- Account panel ---------- */

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 244, 239, 0.5);
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

.g-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  color: #12121a;
  font-size: 12px;
  font-weight: 700;
}

.panel-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.form-message {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.form-message.error {
  background: rgba(255, 107, 107, 0.14);
  color: #ffc2c2;
}

.form-message.success {
  background: var(--accent-soft);
  color: var(--text);
}

.account-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.account-head .link-btn {
  flex: none;
  padding-top: 2px;
}

.account-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* Account tabs: MusicalSlides / Music / Shares */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}

.tabs [role="tab"] {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tabs [role="tab"]:hover {
  color: var(--text);
}

.tabs [role="tab"][aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Tabbed account view: fixed height; each tab scrolls inside it. */
.panel.panel-fixed {
  height: min(480px, calc(100dvh - 32px));
  overflow: hidden;
}

/* On computers, centred panels sit in the space between the logo (about
   100px) and the control bars (about 140px), so they never cover either. */
@media (min-width: 861px) {
  .panel-center {
    top: calc(50% - 20px);
    max-height: calc(100dvh - 260px);
  }

  .panel.panel-fixed {
    height: min(480px, calc(100dvh - 260px));
  }

  /* The SoundCloud player too, so its button and the bars stay clickable. */
  .music-panel {
    top: calc(50% - 20px);
    bottom: auto;
    transform: translate(-50%, -50%);
    max-height: calc(100dvh - 260px);
    overflow-y: auto;
  }
}

.panel-fixed .panel-view[data-view="account"] {
  flex: 1 1 auto;
  min-height: 0;
}

.panel-fixed .tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.account-who strong {
  font-size: 16px;
}

.account-who span {
  font-size: 14px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 196, 81, 0.12);
  border: 1px solid rgba(245, 196, 81, 0.3);
  font-size: 14px;
  line-height: 1.45;
}

.shares {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.share-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}

.share-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.share-name {
  font-size: 14px;
  font-weight: 600;
}

.share-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: rgba(247, 244, 239, 0.55);
}

.status {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.status.warn {
  background: rgba(245, 196, 81, 0.15);
  color: #f5c451;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .quick button,
  .link-btn {
    transition: none;
  }
}

.offscreen {
  position: fixed;
  left: -9999px;
  top: 0;
}

/* ==========================================================================
   Focus mode: only the slideshow, logo and name. body.focus hides the
   tagline and the controls; body.reveal
   (mouse move, tap or key) shows them for a few seconds.
   ========================================================================== */

.focus-btn {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 65;
  padding: 9px;
  color: var(--text);
}

.focus-btn .icon-exit,
.focus .focus-btn .icon-enter {
  display: none;
}

.focus .focus-btn .icon-exit {
  display: block;
}

.brand-tagline,
.player-zone,
.site-footer,
.focus-btn,
.panel,
.music-panel {
  transition: opacity 0.6s ease;
}

.focus:not(.reveal) .brand-tagline,
.focus:not(.reveal) .player-zone,
.focus:not(.reveal) .site-footer,
.focus:not(.reveal) .focus-btn,
.focus:not(.reveal) .panel,
.focus:not(.reveal) .music-panel {
  opacity: 0;
  pointer-events: none;
}

.focus:not(.reveal),
.focus:not(.reveal) * {
  cursor: none;
}

@media (max-width: 860px) {
  .focus-btn {
    top: 10px;
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-tagline,
  .player-zone,
  .site-footer,
  .focus-btn,
  .panel,
  .music-panel {
    transition: none;
  }
}

/* ==========================================================================
   Shared link welcome: one tap starts the sound
   ========================================================================== */

.welcome {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(ellipse at center, rgba(8, 8, 14, 0.35) 0%, rgba(8, 8, 14, 0.1) 70%);
}

.welcome[hidden] {
  display: none;
}

.welcome-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: min(420px, 100%);
  padding: 26px 30px 20px;
  border-radius: 28px;
  text-align: center;
}

.welcome-play {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1209;
  cursor: pointer;
  box-shadow: 0 0 0 10px rgba(255, 179, 107, 0.16), 0 14px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.welcome-play svg {
  margin-left: 4px;
}

.welcome-play:hover {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.1;
}

.welcome-mix {
  font-size: 15px;
  color: var(--text-dim);
}

@media (prefers-reduced-motion: reduce) {
  .welcome-play {
    transition: none;
  }
}
