html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
body { min-width: 280px; }
img, svg { max-width: 100%; }
img { height: auto; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.panel, .panel-grid, .project-shell, .project-body, .music-layout, .release-stack, .project-copy, .detail-shell { min-width: 0; }
h1, h2, h3, .lead, .description, .button-label, .visual-title, .detail-description { overflow-wrap: anywhere; }
.rail-dots a[aria-current="page"] { color: #fff; transform: scale(1.08); }
.rail-dots a[aria-current="page"]::before { opacity: 0; }
.rail-dots a[aria-current="page"] span { opacity: 1; transform: translateX(0); }
.button, .profile-link, .text-link, .language-option, .rail-dots a { min-height: 44px; }
.button { max-width: 100%; }
.panel-intro .button[href="https://t.me/f_contact_bot"]::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 3 3.8 9.7c-1.2.5-1.2 1.2-.2 1.5l4.4 1.4 1.7 5.2c.2.7.1 1 .8 1 .5 0 .8-.2 1-.4l2.2-2.1 4.6 3.4c.9.5 1.5.2 1.7-.8L23 4.5C23.3 3.3 22.5 2.7 21 3ZM9.1 12.3l9.8-6.2c.5-.3.9-.1.5.2l-8.1 7.3-.3 3.4-1.9-4.7Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 3 3.8 9.7c-1.2.5-1.2 1.2-.2 1.5l4.4 1.4 1.7 5.2c.2.7.1 1 .8 1 .5 0 .8-.2 1-.4l2.2-2.1 4.6 3.4c.9.5 1.5.2 1.7-.8L23 4.5C23.3 3.3 22.5 2.7 21 3ZM9.1 12.3l9.8-6.2c.5-.3.9-.1.5.2l-8.1 7.3-.3 3.4-1.9-4.7Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
.release-card { contain: layout; }
.release-cover { aspect-ratio: 1; }
.error-page { overflow: auto; }
.error-shell { width: min(760px, calc(100% - 40px)); min-height: 100svh; margin: auto; display: grid; align-content: center; gap: 22px; padding: max(32px, env(safe-area-inset-top)) 0 max(32px, env(safe-area-inset-bottom)); }
.error-shell h1, .error-shell p { margin: 0; }
.error-code { color: var(--muted); font: 14px/1 ui-monospace, monospace; letter-spacing: .14em; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* Optical left edge shared by every non-intro slide title. */
.project-copy > h2,
.collection-heading > h2 {
  transform: translateX(-0.055em);
}

/* El Feducho: primary action first, platform actions second, release titles only. */
.music-title-only {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.music-title-only > h2 { order: 0; }
.music-title-only > .lead { order: 1; }
.music-title-only > .actions { order: 2; margin-top: 24px; }
.music-title-only > .profile-links { order: 3; margin-top: 12px; }
.music-panel .release-copy p { display: none; }
.music-panel .release-copy h3 { margin: 0; }
.music-panel .release-card[href$="/eremalche"] .release-copy h3 { text-transform: lowercase; }

.music-title-only .profile-links {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}
.music-title-only .profile-link {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
}
.music-title-only .profile-link::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: currentColor;
  -webkit-mask: var(--profile-icon) center / contain no-repeat;
  mask: var(--profile-icon) center / contain no-repeat;
}
.music-title-only .profile-link[href*="instagram.com"] {
  --profile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='5' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='4' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='17.4' cy='6.6' r='1.25' fill='black'/%3E%3C/svg%3E");
}
.music-title-only .profile-link[href*="youtube.com"] {
  --profile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2.5' y='5.5' width='19' height='13' rx='4' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m10 9 6 3-6 3z' fill='black'/%3E%3C/svg%3E");
}
.music-title-only .profile-link[href*="t.me"] {
  --profile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 3 3.8 9.7c-1.2.5-1.2 1.2-.2 1.5l4.4 1.4 1.7 5.2c.2.7.1 1 .8 1 .5 0 .8-.2 1-.4l2.2-2.1 4.6 3.4c.9.5 1.5.2 1.7-.8L23 4.5C23.3 3.3 22.5 2.7 21 3ZM9.1 12.3l9.8-6.2c.5-.3.9-.1.5.2l-8.1 7.3-.3 3.4-1.9-4.7Z' fill='black'/%3E%3C/svg%3E");
}
.music-title-only .profile-link[href*="soundcloud.com"] {
  --profile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.5 14.5h1v4h-1zm2-2h1v6h-1zm2-1.5h1v7.5h-1zm2-1h1v8.5h-1zm2.2-1.7c.8-.5 1.8-.8 2.8-.8 2.7 0 4.9 2 5.2 4.6.4-.2.9-.3 1.4-.3a3.4 3.4 0 1 1 0 6.8H9.7V8.3Z' fill='black'/%3E%3C/svg%3E");
}
.music-title-only .profile-link[href*="music.apple.com"] {
  --profile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M10 16.5V8l7-1.5v7.8M10 10l7-1.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='16.5' r='2.2' fill='black'/%3E%3Ccircle cx='15' cy='14.3' r='2.2' fill='black'/%3E%3C/svg%3E");
}
.music-title-only .profile-link[href*="music.yandex"] {
  --profile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 7.5 12 13l4-5.5M12 13v4' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.music-title-only .profile-link[href*="vk.com"] {
  --profile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.2 7h3.2c.2 0 .4.2.5.5.7 2.2 1.8 4.1 3.1 5.4V7.8c0-.5.3-.8.8-.8h2.5v7.1c1.3-1.4 2.5-3.5 3.2-5.7.2-.8.5-1.4 1.3-1.4h3c-.4 2.5-2.2 5.2-3.8 7 1.1 1.2 2.5 2.7 3.5 4h-3.7c-.5 0-.8-.3-1.1-.7-.8-1-1.6-1.9-2.4-2.6V18h-1.5C6.9 18 4.3 14.5 3.2 7Z' fill='black'/%3E%3C/svg%3E");
}
.music-title-only .profile-link[href*="spotify.com"] {
  --profile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M6.8 9.2c3.5-1 7.5-.7 10.8.9M7.5 12.4c3-.8 6.4-.5 9.2.8M8.2 15.4c2.5-.6 5.2-.4 7.7.7' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Language target flag follows the same interaction language as the page controls. */
.language-option {
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
  will-change: transform;
}
.language-option::before {
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.language-option:hover,
.language-option:focus-visible {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(255, 255, 255, .32) !important;
  background: rgba(255, 255, 255, .08) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}
.language-option:hover::before,
.language-option:focus-visible::before {
  transform: scale(1.07);
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .38);
}
.language-option:active { transform: translateY(0) scale(.94); }

@media (max-width: 1280px) and (min-width: 901px) {
  .music-title-only .profile-links {
    width: min(100%, 480px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root { --rail: 0px; }
  body { overflow: hidden; }
  .snap-container {
    height: 100svh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
    scroll-behavior: auto;
    overscroll-behavior-y: contain;
    scroll-padding-top: max(18px, env(safe-area-inset-top));
    scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .rail { inset: auto 0 0 0; width: 100%; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left)); flex-direction: row; justify-content: center; border-right: 0; border-top: 1px solid var(--line); background: rgba(13, 13, 13, .94); }
  .rail-dots { width: min(100%, 420px); max-width: calc(100% - 52px); flex-direction: row; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .rail-dots::-webkit-scrollbar { display: none; }
  .rail-dots a { flex: 1 0 34px; width: 34px; height: 48px; }
  .language-switcher { right: max(6px, env(safe-area-inset-right)); left: auto; bottom: calc(15px + env(safe-area-inset-bottom)); transform: none; }
  .panel {
    min-height: calc(100svh - 64px - env(safe-area-inset-bottom));
    min-height: calc(100dvh - 64px - env(safe-area-inset-bottom));
    height: auto;
    max-height: none;
    overflow: visible;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    align-items: flex-start;
    padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
  }
  .panel:last-child { border-bottom: 0; }
  .panel-intro { align-items: center; }
  .panel-grid, .project-shell { width: 100%; margin: 0 auto; }
  .panel-grid, .project-body, .music-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .panel-grid { gap: clamp(24px, 5vh, 40px); }
  .project-shell { gap: clamp(18px, 3vh, 30px); }
  .project-header { padding-bottom: 12px; }
  .project-body, .music-layout { gap: clamp(22px, 4vh, 36px); }
  .collection-heading .lead { margin-top: 14px; }
  .portrait-wrap { order: 1; gap: 14px; }
  .hero-copy { order: 2; }
  .portrait-ring { width: min(54vw, 230px); }
  h1 { font-size: clamp(52px, 18vw, 82px); }
  h2 { font-size: clamp(38px, 12.5vw, 64px); }
  .panel-intro .lead { font-size: clamp(20px, 6.5vw, 30px); }
  .lead { margin-top: 18px; font-size: clamp(18px, 5.6vw, 26px); }
  .description { margin-top: 16px; font-size: 15px; line-height: 1.55; }
  .actions { width: 100%; margin-top: 20px; }
  .button { min-height: 46px; padding-inline: 16px; }
  .visual-card { min-height: clamp(170px, 48vw, 260px); border-radius: 20px; }
  .visual-title { font-size: clamp(26px, 8vw, 42px); }
  .card-grid, .card-grid-trio, .card-grid-standard { grid-template-columns: minmax(0, 1fr) !important; gap: 12px; }
  .mini-card { min-height: auto; padding: 18px; }
  .release-stack { gap: 12px; }
  .release-card { grid-template-columns: clamp(68px, 21vw, 96px) minmax(0, 1fr); gap: 14px; }
  .profile-links { gap: 8px; }
  .profile-link { display: inline-flex; align-items: center; }
  .music-title-only > .actions { margin-top: 18px; }
  .music-title-only > .profile-links { margin-top: 10px; }
  .music-title-only .profile-links { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .scroll-cue { display: none; }
  .detail-page { overflow: auto; }
  .detail-shell { padding-inline: max(18px, env(safe-area-inset-left)); padding-bottom: max(48px, env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .panel { padding-inline: max(16px, env(safe-area-inset-left)); }
  .panel-intro .actions, .project-copy .actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .button { width: 100%; white-space: normal; text-align: center; }
  .availability { max-width: 100%; text-align: center; line-height: 1.4; }
  .release-card { grid-template-columns: 64px minmax(0, 1fr); padding: 11px; }
  .release-card h3 { font-size: clamp(18px, 6.5vw, 25px); }
  .music-title-only .profile-link { padding-inline: 8px; font-size: 10px; }
}

@media (max-width: 340px) {
  .music-title-only .profile-links { grid-template-columns: minmax(0, 1fr); }
}

@media (max-height: 720px) and (min-width: 901px) {
  .panel { align-items: flex-start; overflow-y: auto; padding-top: 32px; padding-bottom: 32px; }
  .panel-grid, .project-shell { margin-top: auto; margin-bottom: auto; }
  .portrait-ring { width: min(24vw, 280px); }
  h1 { font-size: clamp(64px, 9vw, 120px); }
  h2 { font-size: clamp(50px, 6.7vw, 92px); }
  .project-shell { gap: 30px; }
  .visual-card { min-height: 300px; }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 900px) {
  .panel { min-height: calc(100dvh - 64px - env(safe-area-inset-bottom)); padding-top: max(18px, env(safe-area-inset-top)); }
  .panel-grid { grid-template-columns: minmax(150px, .65fr) minmax(0, 1.35fr) !important; align-items: center; gap: 24px; }
  .project-body { grid-template-columns: minmax(0, 1.12fr) minmax(190px, .88fr) !important; gap: 24px; }
  .music-layout { grid-template-columns: minmax(0, .9fr) minmax(270px, 1.1fr) !important; gap: 24px; }
  .portrait-ring { width: min(38vh, 190px); }
  .portrait-wrap, .hero-copy { order: initial; }
  h1 { font-size: clamp(48px, 11vw, 76px); }
  h2 { font-size: clamp(36px, 7.5vw, 58px); }
  .panel-intro .lead { font-size: clamp(20px, 4.5vw, 30px); }
  .visual-card { min-height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .language-option { will-change: auto; }
}

@media (forced-colors: active) {
  .button, .profile-link, .visual-card, .release-card, .rail { border: 1px solid CanvasText; }
  .space-particles, .music-noise { display: none; }
  .music-title-only .profile-link::before { background: CanvasText; }
  .language-option { border: 1px solid ButtonText !important; }
}
