@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-base: #050914;
  --bg-mid: #08111f;
  --bg-soft: #0b1730;
  --panel: rgba(15, 31, 60, 0.62);
  --panel-strong: rgba(11, 22, 44, 0.88);
  --line: rgba(140, 176, 221, 0.22);
  --line-soft: rgba(140, 176, 221, 0.12);
  --text-main: #e9f3ff;
  --text-soft: #9cb5d2;
  --text-mute: #718aa9;
  --accent-blue: #71a3ff;
  --accent-cyan: #49d7f7;
  --accent-ice: #b4eeff;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --blur-main: 20px;
  --glass-blur: 16px;
  --glass-border: rgba(170, 220, 255, 0.24);
  --glass-surface: linear-gradient(165deg, rgba(16, 34, 64, 0.82), rgba(10, 24, 48, 0.9));
  --glow-soft: 0 0 42px rgba(84, 202, 238, 0.22);
  --tr-fast: 220ms ease;
  --tr-slow: 620ms cubic-bezier(0.21, 0.9, 0.22, 1);
  --shadow-panel: 0 20px 52px rgba(2, 7, 20, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

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

body.living-gallery-page {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1020px 540px at 10% -6%, rgba(36, 73, 138, 0.2), transparent 66%),
    radial-gradient(920px 500px at 88% 6%, rgba(21, 53, 104, 0.18), transparent 70%),
    radial-gradient(1080px 620px at 72% 106%, rgba(31, 57, 107, 0.16), transparent 74%),
    linear-gradient(170deg, #050914 0%, #08111f 46%, #0b1730 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.lg-glass-panel {
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-panel);
}

.living-gallery-page::before,
.living-gallery-page::after {
  content: '';
  position: fixed;
  inset: -24vmax;
  pointer-events: none;
  z-index: -1;
}

.living-gallery-page::before {
  background:
    radial-gradient(circle at 26% 18%, rgba(90, 126, 192, 0.15), transparent 32%),
    radial-gradient(circle at 69% 24%, rgba(77, 117, 188, 0.12), transparent 34%),
    radial-gradient(circle at 40% 78%, rgba(52, 87, 152, 0.12), transparent 36%);
  animation: ambientPulse 14s ease-in-out infinite;
}

.living-gallery-page::after {
  background: linear-gradient(130deg, rgba(9, 24, 50, 0.2), rgba(6, 16, 35, 0.05));
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

.lg-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 40px;
}

.lg-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(120, 162, 210, 0.12);
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(6, 13, 24, 0.38);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.lg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.lg-brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.lg-brand-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.lg-brand-sub {
  margin: 1px 0 0;
  font-size: 0.74rem;
  color: var(--text-mute);
}

.lg-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lg-nav-link {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  padding: var(--space-1) calc(var(--space-2) + 2px);
  font-size: 0.83rem;
  color: rgba(187, 206, 230, 0.82);
  text-decoration: none;
  transition: border-color var(--tr-fast), background-color var(--tr-fast), transform var(--tr-fast);
}

.lg-nav-link:hover,
.lg-nav-link:focus-visible {
  border-color: rgba(121, 194, 255, 0.5);
  background: rgba(56, 93, 148, 0.26);
  transform: translateY(-1px);
  outline: none;
}

.lg-nav-link.is-active {
  border-color: rgba(136, 213, 255, 0.84);
  color: #e9f9ff;
  background: rgba(56, 115, 186, 0.36);
  box-shadow: 0 0 18px rgba(70, 169, 237, 0.22);
}

.lg-main {
  display: grid;
  gap: 20px;
}

.lg-hero {
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(9, 19, 37, 0.9), rgba(7, 16, 33, 0.82));
  padding: calc(var(--space-3) + var(--space-2));
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 22px;
}

.lg-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 250px at 52% 116%, rgba(43, 131, 208, 0.24), transparent 74%),
    radial-gradient(320px 120px at 11% 7%, rgba(156, 209, 255, 0.08), transparent 74%);
}

.lg-hero-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.lg-hero-head-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.lg-hero-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.78fr);
  gap: 20px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.lg-eyebrow {
  margin: 0;
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(119, 229, 255, 0.44);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #c4f6ff;
  background: rgba(61, 186, 226, 0.14);
}

.lg-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 4.2vw, 3.45rem);
  letter-spacing: 0.02em;
  line-height: 1.04;
  font-weight: 800;
  white-space: nowrap;
}

.lg-subtitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.84);
  max-width: 76ch;
}

.lg-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.68;
  font-size: 0.92rem;
  font-weight: 400;
  max-width: 52ch;
}

.lg-carousel-wrap {
  position: relative;
  touch-action: pan-y;
  height: clamp(470px, 56vw, 610px);
  perspective: 1800px;
}

.lg-pagination-status {
  min-height: 32px;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.78rem;
  color: #b6c6dd;
}

.lg-pagination-retry {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.lg-carousel-core {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  border: 1px solid rgba(124, 165, 214, 0.2);
  background: linear-gradient(180deg, rgba(11, 24, 48, 0.76), rgba(8, 17, 33, 0.48));
  /* Transformed slides must clip without a scroll container. Focusing carousel
     controls otherwise scrolls the whole track sideways out of the viewport. */
  overflow: clip;
}

.lg-carousel-core::before {
  content: '';
  position: absolute;
  inset: auto 8% 7% 8%;
  height: 72px;
  background: radial-gradient(circle, rgba(81, 182, 247, 0.26), transparent 74%);
  filter: blur(28px);
  pointer-events: none;
}

.lg-carousel-track {
  position: absolute;
  inset: 0 56px;
}

.lg-slide {
  --offset: 0;
  --abs: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(210px, 34vw, 374px);
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  transform-style: preserve-3d;
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--offset) * 48%))
    translateY(calc(var(--abs) * 20px))
    translateZ(calc(var(--abs) * -110px))
    rotateY(calc(var(--offset) * -23deg))
    scale(calc(1 - (var(--abs) * 0.2)));
  opacity: calc(1 - (var(--abs) * 0.34));
  filter: blur(calc(var(--abs) * 2.7px));
  transition:
    transform var(--tr-slow),
    opacity 520ms ease,
    filter 520ms ease,
    box-shadow 420ms ease,
    border-color 420ms ease;
  border: 1px solid rgba(139, 183, 228, 0.22);
  box-shadow: 0 30px 48px rgba(1, 7, 19, 0.52);
  background: rgba(11, 24, 47, 0.56);
  overflow: hidden;
  z-index: calc(80 - var(--abs));
}

.lg-slide[aria-hidden='true'] {
  pointer-events: none;
}

.lg-slide.is-active {
  border-color: rgba(137, 220, 255, 0.82);
  box-shadow: 0 34px 52px rgba(1, 9, 24, 0.62), 0 0 30px rgba(77, 181, 240, 0.26);
  filter: blur(0);
}

.lg-slide.is-active .lg-slide-glow {
  animation: glowBreath 3.2s ease-in-out infinite;
}

.lg-slide-art {
  position: absolute;
  inset: 0;
}

.lg-slide-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(160px 180px at 18% 18%, rgba(255, 255, 255, 0.22), transparent 72%),
    radial-gradient(280px 230px at 82% 72%, rgba(14, 34, 58, 0.35), transparent 78%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.lg-slide-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.lg-art-0 {
  background:
    radial-gradient(circle at 30% 24%, rgba(244, 174, 115, 0.86), transparent 34%),
    radial-gradient(circle at 76% 66%, rgba(52, 120, 200, 0.7), transparent 42%),
    linear-gradient(155deg, #4f3d2f 5%, #253c63 48%, #192b47 100%);
}

.lg-art-1 {
  background:
    radial-gradient(circle at 24% 30%, rgba(122, 211, 245, 0.84), transparent 33%),
    radial-gradient(circle at 70% 72%, rgba(245, 155, 115, 0.76), transparent 44%),
    linear-gradient(150deg, #1f395f 7%, #0d243f 44%, #472f2b 100%);
}

.lg-art-2 {
  background:
    radial-gradient(circle at 42% 22%, rgba(255, 190, 126, 0.78), transparent 31%),
    radial-gradient(circle at 74% 68%, rgba(56, 162, 255, 0.62), transparent 39%),
    linear-gradient(148deg, #2e405f 8%, #1b2a47 50%, #23324f 100%);
}

.lg-art-3 {
  background:
    radial-gradient(circle at 34% 20%, rgba(209, 159, 255, 0.62), transparent 30%),
    radial-gradient(circle at 70% 70%, rgba(72, 198, 255, 0.66), transparent 40%),
    linear-gradient(150deg, #1f2b4f 5%, #26335c 42%, #2f364d 100%);
}

.lg-art-4 {
  background:
    radial-gradient(circle at 26% 26%, rgba(255, 216, 145, 0.7), transparent 31%),
    radial-gradient(circle at 76% 64%, rgba(66, 185, 247, 0.68), transparent 41%),
    linear-gradient(146deg, #2e3b54 10%, #1b2b4f 52%, #172845 100%);
}

.lg-slide-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-2) var(--space-2) 10px;
  background: linear-gradient(180deg, rgba(5, 15, 32, 0), rgba(5, 12, 27, 0.88) 56%, rgba(5, 12, 27, 0.98));
}

.lg-slide-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lg-slide-identity,
.lg-detail-identity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.lg-artist-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(172, 237, 255, 0.72);
  background: rgba(90, 172, 229, 0.34);
  font-size: 0.65rem;
  font-weight: 700;
  color: #e9f8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lg-artist-avatar--image {
  padding: 0;
}

.lg-artist-avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lg-artist-name {
  font-size: 0.72rem;
  color: rgba(208, 226, 245, 0.94);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lg-artist-link {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--tr-fast), border-color var(--tr-fast), filter var(--tr-fast);
}

.lg-artist-link:hover,
.lg-artist-link:focus-visible {
  color: #edf8ff;
  border-bottom-color: rgba(143, 223, 255, 0.72);
  filter: brightness(1.06);
  outline: none;
}

.lg-country-flag-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lg-country-flag-btn {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lg-country-flag-btn:focus-visible {
  outline: 2px solid rgba(126, 221, 255, 0.7);
  outline-offset: 2px;
}

.lg-country-flag {
  font-size: 1rem;
  line-height: 1;
}

.lg-country-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid rgba(133, 208, 255, 0.45);
  background: rgba(7, 20, 39, 0.88);
  color: #dff3ff;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(1, 9, 21, 0.44);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 15;
  max-width: min(200px, calc(100vw - 18px));
  text-overflow: ellipsis;
  overflow: hidden;
}

.lg-country-flag-wrap:hover .lg-country-tooltip,
.lg-country-flag-wrap:focus-within .lg-country-tooltip,
.lg-country-flag-wrap.is-open .lg-country-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.lg-slide-likes {
  margin-left: auto;
  font-size: 0.68rem;
  color: #bceaff;
}

.lg-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lg-slide-title {
  margin: 7px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.lg-slide-author {
  margin: 0;
}

.lg-carousel-empty {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--text-soft);
  text-align: center;
  padding: var(--space-3);
  font-size: 0.9rem;
}

.lg-slide-glow {
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 56%;
  height: 62px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(80, 192, 242, 0.52), rgba(80, 192, 242, 0));
  filter: blur(17px);
  opacity: 0;
}

.lg-carousel-action {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(170, 219, 255, 0.52);
  background: rgba(10, 26, 49, 0.72);
  color: #ddf4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--tr-fast), border-color var(--tr-fast), background-color var(--tr-fast);
  z-index: 120;
}

.lg-carousel-action:hover,
.lg-carousel-action:focus-visible {
  transform: translateY(-50%) scale(1.06);
  border-color: rgba(144, 232, 255, 0.9);
  background: rgba(33, 82, 127, 0.62);
  outline: none;
}

.lg-carousel-action.prev {
  left: 14px;
}

.lg-carousel-action.next {
  right: 14px;
}

.lg-analysis {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10, 22, 43, 0.94), rgba(8, 16, 33, 0.9));
  padding: 24px 20px;
  height: clamp(470px, 56vw, 610px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.lg-analysis > * {
  min-height: 0;
}

.lg-analysis-body {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.lg-analysis-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.14rem;
}

.lg-info-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.lg-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.35;
}

.lg-info-label {
  color: var(--text-mute);
  flex: 0 0 54px;
}

.lg-info-value {
  color: #e7f4ff;
  text-align: right;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

#lg-work-author {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

#lg-work-author .lg-artist-name {
  max-width: 110px;
}

#lg-work-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

#lg-work-material {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.lg-metric-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid rgba(124, 174, 223, 0.22);
  border-radius: 10px;
  padding: 7px 8px;
  background: rgba(10, 29, 52, 0.36);
}

.lg-metric-grade-label {
  font-size: 0.7rem;
  color: var(--text-soft);
}

.lg-metric-grade-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.lg-metric-grade-value--missing {
  color: var(--text-mute);
  font-weight: 500;
}

.lg-metric-grade-value--s {
  background: linear-gradient(135deg, #fdf6d8 0%, #e8c766 28%, #b8862f 55%, #f4dd93 78%, #caa346 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
}

.lg-metric-grade-value--s::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.85) 48%, transparent 66%);
  background-size: 220% 100%;
  background-position: 140% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lgMetricGoldSweep 0.85s ease-out 1;
}

@keyframes lgMetricGoldSweep {
  0% {
    background-position: 140% 0;
  }
  100% {
    background-position: -40% 0;
  }
}

.lg-text-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  flex: 1 1 auto;
}

.lg-section-title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(214, 238, 255, 0.86);
}

.lg-scroll-note {
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 10px 11px;
  font-size: 0.78rem;
  line-height: 1.68;
  color: #d6e8fb;
  background: rgba(12, 30, 54, 0.42);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  overscroll-behavior: contain;
  min-height: 0;
  resize: none;
  white-space: pre-wrap;
}

.lg-scroll-note::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.lg-scroll-note:focus-visible {
  outline: 2px solid rgba(121, 218, 255, 0.6);
  outline-offset: 1px;
}

.lg-artist-statement {
  flex: 1 1 auto;
  min-height: clamp(118px, 18vh, 180px);
  max-height: none;
}

.lg-analysis-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

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

.lg-action-row .watobe-bright-action {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 10px 8px;
  font-size: 0.77rem;
  line-height: 1.2;
  cursor: pointer;
}

.lg-action-row .watobe-bright-action:focus-visible {
  outline: 2px solid #9ED1DD;
  outline-offset: 3px;
}

.lg-action-row .watobe-bright-action[aria-pressed='true'] {
  box-shadow: inset 0 0 0 2px #002535, 0 8px 20px rgba(26, 83, 162, 0.4);
}

.lg-action-row .watobe-bright-action:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
  filter: grayscale(0.3);
}

.lg-challenge-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lg-btn,
.lg-btn-ghost {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--tr-fast), box-shadow var(--tr-fast), background-color var(--tr-fast), border-color var(--tr-fast);
}

.lg-btn {
  padding: 10px 12px;
  color: #061325;
  background: linear-gradient(95deg, #a8e9ff, #80bcff);
  box-shadow: 0 10px 20px rgba(63, 155, 215, 0.34);
}

.lg-btn:hover,
.lg-btn:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(95deg, #c3f4ff, #9ecbff);
  box-shadow: 0 12px 22px rgba(64, 170, 233, 0.4);
  outline: none;
}

.lg-btn-ghost {
  flex: 1;
  padding: 8px 12px;
  color: var(--text-soft);
  border-color: rgba(153, 215, 255, 0.3);
  background: rgba(16, 35, 59, 0.5);
}

.lg-btn-ghost:hover,
.lg-btn-ghost:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(149, 227, 255, 0.74);
  background: rgba(36, 72, 112, 0.48);
  outline: none;
}

.lg-member-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  padding: 20px;
}

.lg-member-modal[hidden] {
  display: none;
}

.lg-member-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.lg-member-modal-card {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid rgba(155, 214, 255, 0.26);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(165deg, rgba(10, 24, 49, 0.96), rgba(7, 17, 35, 0.98));
  box-shadow: 0 28px 70px rgba(1, 6, 16, 0.58);
}

.lg-member-modal-eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  border: 1px solid rgba(139, 221, 255, 0.28);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #c5f4ff;
  background: rgba(56, 157, 207, 0.14);
}

.lg-member-modal-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.18;
}

.lg-member-modal-body {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.lg-member-modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.lg-member-modal-primary,
.lg-member-modal-secondary,
.lg-member-modal-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--tr-fast), border-color var(--tr-fast), background-color var(--tr-fast), color var(--tr-fast);
}

.lg-member-modal-primary {
  color: #061325;
  background: linear-gradient(95deg, #a8e9ff, #80bcff);
  box-shadow: 0 10px 20px rgba(63, 155, 215, 0.28);
}

.lg-member-modal-secondary {
  color: #dff7ff;
  border: 1px solid rgba(149, 227, 255, 0.38);
  background: rgba(16, 35, 59, 0.58);
}

.lg-member-modal-tertiary {
  border: 1px solid transparent;
  color: var(--text-mute);
  background: transparent;
  cursor: pointer;
}

.lg-member-modal-primary:hover,
.lg-member-modal-primary:focus-visible,
.lg-member-modal-secondary:hover,
.lg-member-modal-secondary:focus-visible,
.lg-member-modal-tertiary:hover,
.lg-member-modal-tertiary:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.lg-filter {
  border-radius: 20px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  overflow: hidden;
}

.lg-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lg-filter-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.lg-filter-row-single {
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  min-width: 100%;
}

.lg-filter-pills {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  flex-shrink: 0;
}

.lg-pill {
  border: 1px solid rgba(157, 214, 255, 0.26);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-2);
  font-size: 0.78rem;
  color: var(--text-soft);
  background: rgba(13, 27, 51, 0.56);
  transition: border-color var(--tr-fast), transform var(--tr-fast), background-color var(--tr-fast);
  flex-shrink: 0;
}

.lg-pill.active {
  border-color: rgba(136, 224, 255, 0.9);
  color: #e7f8ff;
  background: rgba(52, 113, 174, 0.36);
}

.lg-pill:hover,
.lg-pill:focus-visible {
  border-color: rgba(149, 237, 255, 0.76);
  transform: translateY(-1px);
  outline: none;
}

.lg-filter-search {
  width: min(100%, 360px);
  margin-left: auto;
  flex: 1;
  min-width: 180px;
}

.lg-filter-search input {
  width: 100%;
  border: 1px solid rgba(157, 214, 255, 0.28);
  border-radius: 12px;
  background: rgba(9, 20, 38, 0.74);
  color: #e3f0ff;
  font-size: 0.82rem;
  padding: 10px 12px;
}

.lg-filter-search input::placeholder {
  color: rgba(173, 200, 230, 0.72);
}

.lg-filter-search input:focus-visible {
  outline: 2px solid rgba(121, 218, 255, 0.68);
  outline-offset: 1px;
}

.lg-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lg-showcase-card {
  color: inherit;
  text-decoration: none;
  min-width: 0;
  position: relative;
  border-radius: 18px;
  padding: 0;
  min-height: 228px;
  background: linear-gradient(165deg, rgba(10, 22, 43, 0.92), rgba(8, 17, 32, 0.94));
  box-shadow: 0 16px 32px rgba(2, 8, 20, 0.36);
  display: grid;
  align-content: space-between;
  gap: 10px;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
  overflow: hidden;
}

.lg-showcase-card:hover,
.lg-showcase-card:focus-within {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(128, 208, 255, 0.44);
  box-shadow: 0 20px 38px rgba(2, 8, 22, 0.5), 0 0 18px rgba(77, 178, 235, 0.18);
}

.lg-showcase-card:focus-visible {
  outline: 2px solid rgba(147, 232, 255, 0.82);
  outline-offset: 2px;
}

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

  .lg-slide,
  .lg-carousel-action,
  .lg-showcase-card {
    transition: none !important;
  }

  .lg-metric-grade-value--s::after {
    animation: none !important;
    background-position: -40% 0;
  }
}

.lg-showcase-tag {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  color: #91bde7;
}

.lg-showcase-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.lg-showcase-desc {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.6;
}

.lg-zone-media {
  height: 56%;
  min-height: 118px;
  border-bottom: 1px solid rgba(108, 151, 201, 0.2);
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: transform 320ms ease;
}

.lg-zone-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 10, 20, 0) 20%, rgba(5, 12, 24, 0.78) 64%, rgba(5, 12, 24, 0.94) 100%),
    radial-gradient(circle at 80% 20%, rgba(112, 196, 255, 0.16), transparent 44%);
}

.lg-zone-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
}

.zone-theme-exam .lg-zone-media {
  background-image:
    radial-gradient(circle at 26% 26%, rgba(251, 190, 126, 0.42), transparent 34%),
    linear-gradient(145deg, #1e2f4a, #121f36 58%, #0f1a2d);
}

.zone-theme-beginner .lg-zone-media {
  background-image:
    radial-gradient(circle at 70% 22%, rgba(147, 228, 255, 0.34), transparent 36%),
    linear-gradient(145deg, #1f3356, #122645 58%, #0f1d33);
}

.zone-theme-kids .lg-zone-media {
  background-image:
    radial-gradient(circle at 30% 30%, rgba(169, 165, 255, 0.36), transparent 34%),
    linear-gradient(145deg, #272f56, #1a2445 58%, #131d35);
}

.zone-theme-weekly .lg-zone-media {
  background-image:
    radial-gradient(circle at 72% 34%, rgba(255, 176, 124, 0.38), transparent 34%),
    linear-gradient(145deg, #2a3046, #1b253b 58%, #151d2f);
}

.zone-theme-ai .lg-zone-media {
  background-image:
    radial-gradient(circle at 62% 24%, rgba(118, 209, 255, 0.38), transparent 34%),
    linear-gradient(145deg, #1d3553, #122540 58%, #0e1c31);
}

.lg-showcase-card:hover .lg-zone-media,
.lg-showcase-card:focus-within .lg-zone-media {
  transform: scale(1.08);
}

@keyframes glowBreath {
  0% {
    opacity: 0.2;
    transform: translateX(-50%) scale(0.9);
  }
  50% {
    opacity: 0.8;
    transform: translateX(-50%) scale(1.04);
  }
  100% {
    opacity: 0.24;
    transform: translateX(-50%) scale(0.92);
  }
}

@keyframes ambientPulse {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translate3d(1.5%, 1.2%, 0) scale(1.03);
    opacity: 1;
  }
  100% {
    transform: translate3d(-1.2%, -0.8%, 0) scale(1);
    opacity: 0.9;
  }
}

@keyframes ambientDrift {
  from {
    transform: translate3d(-1.5%, 0, 0);
  }
  to {
    transform: translate3d(1.5%, 1.2%, 0);
  }
}

@media (max-width: 1200px) {
  .lg-shell {
    width: min(1120px, calc(100% - 28px));
  }

  .lg-hero-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lg-hero-showcase {
    grid-template-columns: minmax(0, 1.62fr) minmax(280px, 0.86fr);
    gap: 16px;
  }

  .lg-carousel-wrap {
    height: clamp(430px, 58vw, 560px);
  }

  .lg-analysis {
    height: clamp(430px, 58vw, 560px);
  }

  .lg-showcase {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .lg-shell {
    width: min(100%, calc(100% - 24px));
  }

  .lg-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .lg-hero-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .lg-hero-showcase {
    grid-template-columns: minmax(0, 1.42fr) minmax(260px, 0.9fr);
    gap: 14px;
  }

  .lg-carousel-wrap {
    height: clamp(360px, 64vw, 520px);
  }

  .lg-analysis {
    padding: 20px 16px;
    height: clamp(360px, 64vw, 520px);
    gap: 10px;
  }

  .lg-metric-list {
    gap: 7px;
  }

  .lg-metric-item {
    padding: 6px 7px;
  }

  .lg-filter-search {
    min-width: 180px;
  }

  .lg-showcase {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lg-shell {
    width: calc(100% - 16px);
    padding-top: 14px;
  }

  .lg-hero {
    border-radius: 22px;
    padding: 16px;
  }

  .lg-title {
    font-size: clamp(1.8rem, 10vw, 2.3rem);
    white-space: nowrap;
  }

  .lg-subtitle {
    font-size: 0.95rem;
  }

  .lg-hero-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lg-desc {
    max-width: none;
  }

  .lg-hero-showcase {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lg-filter-search {
    min-width: 160px;
  }

  .lg-carousel-wrap {
    min-height: 320px;
    height: min(94vw, 450px);
  }

  .lg-analysis {
    height: auto;
    min-height: 0;
  }

  .lg-slide {
    width: clamp(156px, 58vw, 254px);
    border-radius: 17px;
  }

  .lg-carousel-action {
    width: 38px;
    height: 38px;
  }

  .lg-showcase {
    grid-template-columns: 1fr;
  }

  .lg-country-flag {
    font-size: 0.95rem;
  }

  .lg-country-tooltip {
    max-width: calc(100vw - 28px);
  }

  .lg-metric-list {
    grid-template-columns: 1fr;
  }

  .lg-artist-statement {
    min-height: clamp(104px, 16vh, 148px);
  }
}

.lg-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(8, 17, 33, 0.92);
  border: 1px solid rgba(125, 211, 252, 0.4);
  color: #e0f2fe;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.lg-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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