/* blu mush — 起霧的玻璃 */

:root {
  --ink: #18201c;          /* 主要文字：近黑的墨綠 */
  --ink-soft: #46524b;
  --glass: rgba(238, 243, 239, 0.58);
  --glass-strong: rgba(244, 247, 244, 0.78);
  --edge: rgba(255, 255, 255, 0.7);
  --mist: #dfe6e0;
  --night: #2b3530;
  --acid: #e3ea5c;         /* 2025 Drawn into Ripples 海報的螢光黃綠 */
  --mint: #b9dcc6;         /* 毛毛蟲的薄荷綠 */
  --radius: 18px;
  --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--ink);
  font-family: var(--mono), var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: inherit; }

/* ---------- 三層背景 ---------- */
.photo, #fog, .grain {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;          /* 手機網址列收起時也蓋滿，不會露出底色 */
  pointer-events: none;
}
.photo {
  z-index: 0;
  background: var(--night) center / cover no-repeat;
}
#fog {
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s ease;
  background: var(--mist);   /* 霧還沒畫好前，先用一片霧色擋著 */
}
body.fog-ready #fog { opacity: 1; background: none; }
body.fog-failed #fog { opacity: 0.9; }

/* 顆粒：演出海報的雜訊質感 */
.grain {
  z-index: 2;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* 提示字 */
.hint {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: max(48px, calc(env(safe-area-inset-bottom) + 36px));
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(24, 32, 28, 0.55);
  color: var(--mist);
  font: 12px/1.4 var(--sans);
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.hint.gone { opacity: 0; }

/* ---------- 內容 ---------- */
main {
  position: relative;
  z-index: 3;
  max-width: 520px;
  margin: 0 auto;
  padding: max(56px, env(safe-area-inset-top)) 16px 72px;
}

.hero { text-align: center; margin-bottom: 40px; }
.hero h1 { margin: 0; }
.logo {
  display: block;
  width: min(280px, 78%);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 10px rgba(238, 243, 239, 0.65));
}
.tagline {
  margin: 14px 0 18px;
  font-family: var(--sans);
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px rgba(238, 243, 239, 0.9);
}

.socials { display: flex; justify-content: center; gap: 10px; }
.socials a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
}
.socials svg { width: 20px; height: 20px; fill: var(--ink); }

/* 區塊標題：小寫等寬＋海報的虛線 */
.section { margin-top: 36px; }
.section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--ink);
  text-shadow: 0 0 8px rgba(238, 243, 239, 0.95);
}
.section h2::after {
  content: '';
  flex: 1;
  border-top: 1px dashed rgba(24, 32, 28, 0.45);
}

/* 毛玻璃卡片 */
.card {
  display: block;
  margin-bottom: 10px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 6px 24px rgba(24, 32, 28, 0.12);
  text-decoration: none;
  overflow: hidden;
}

summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

.release > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
}
.cover {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--mist);
}
.meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.title { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.sub { font-size: 12px; color: var(--ink-soft); }
.chev {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px dashed rgba(24, 32, 28, 0.5);
  font-size: 16px;
  transition: transform 0.3s ease, background 0.3s ease;
}
details[open] > summary .chev { transform: rotate(45deg); background: var(--acid); border-style: solid; }

.release-body { padding: 4px 12px 14px; }

.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.platform {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--glass-strong);
  border: 1px solid var(--edge);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}
.platform svg { flex: none; width: 18px; height: 18px; fill: var(--ink); }
.dot { flex: none; width: 8px; height: 8px; margin: 0 5px; border-radius: 50%; background: var(--ink); }

details.more, details.lyrics-toggle { margin-top: 10px; }
details.more > summary,
details.lyrics-toggle > summary {
  display: inline-block;
  padding: 4px 2px;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  border-bottom: 1px dashed currentColor;
}
details.more[open] > summary,
details.lyrics-toggle[open] > summary { color: var(--ink); }
.platforms.small { margin-top: 8px; }

.lyrics {
  margin-top: 10px;
  padding: 14px 14px 4px;
  border-radius: 12px;
  background: rgba(244, 247, 244, 0.6);
  font-size: 13px;
  line-height: 1.85;
}
.lyrics p { margin: 0 0 14px; }

/* 現場影片 */
.live-grid { display: grid; gap: 10px; }
.live {
  display: grid;
  grid-template-columns: 120px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 8px;
}
.live img {
  grid-row: span 2;
  width: 120px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
}
.live .title { align-self: end; font-size: 15px; }
.live .sub { align-self: start; }

/* 只有歌詞的歌 */
.lyric-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.lyric-card .title { font-size: 15px; }
.lyric-card .lyrics { margin: 0 12px 12px; }
.credit {
  margin: 8px 4px 0;
  font-size: 12px;
  text-align: right;
  color: var(--ink);
  text-shadow: 0 0 8px rgba(238, 243, 239, 0.95);
}

/* 頁尾 */
.footer { margin-top: 48px; text-align: center; font-size: 12px; }
.everywhere {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.everywhere a {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-decoration: none;
}
.footer .mail { display: inline-block; text-shadow: 0 0 8px rgba(238, 243, 239, 0.95); }
.copy { margin: 8px 0 0; color: var(--ink-soft); text-shadow: 0 0 8px rgba(238, 243, 239, 0.95); }

/* 互動回饋：只在有滑鼠的裝置上做 hover */
@media (hover: hover) {
  .socials a:hover { transform: translateY(-2px); background: var(--acid); }
  .platform:hover, .everywhere a:hover { background: var(--acid); }
  .live:hover .title, .release > summary:hover .title { text-decoration: underline dashed; text-underline-offset: 4px; }
}
.platform:active, .socials a:active, .everywhere a:active { background: var(--acid); }

a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 12px;
}

/* 不支援毛玻璃的瀏覽器：卡片改成較不透明，確保字看得清楚 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .socials a, .everywhere a { background: var(--glass-strong); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (min-width: 720px) {
  main { padding-top: 80px; }
  .logo { width: 320px; }
}

/* ======================================================
   第二版新增
   ====================================================== */

/* 凝視時透出的暖光
   像陽光從起霧的玻璃後面透進來：
   最裡面是近白的光心，往外是琥珀色、再外面是淡淡的玫瑰金，
   邊緣的形狀會慢慢變動，旁邊有幾顆被照亮的小水珠。 */
.glow {
  --g: 0;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  will-change: transform;
}
.glow > span {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* 整片空氣被染暖 */
.glow-wash {
  width: 200vmax;
  height: 200vmax;
  background: radial-gradient(circle, rgba(255, 200, 150, 0.22) 0%, rgba(255, 190, 150, 0.08) 25%, rgba(255, 190, 150, 0) 55%);
  opacity: var(--g);
  mix-blend-mode: soft-light;
}
/* 外圈：玫瑰金，形狀慢慢變 */
.glow-halo {
  width: calc(260px + var(--g) * 380px);
  height: calc(240px + var(--g) * 360px);
  background: radial-gradient(closest-side, rgba(255, 196, 160, 0.55), rgba(255, 176, 150, 0.22) 55%, rgba(255, 170, 150, 0) 100%);
  filter: blur(18px);
  opacity: calc(var(--g) * 0.9);
  mix-blend-mode: screen;
  animation: drift 9s ease-in-out infinite;
}
/* 中圈：琥珀色，會呼吸 */
.glow-bloom {
  width: calc(120px + var(--g) * 200px);
  height: calc(120px + var(--g) * 200px);
  background: radial-gradient(closest-side, rgba(255, 214, 150, 0.95), rgba(255, 184, 110, 0.45) 50%, rgba(255, 170, 100, 0) 100%);
  filter: blur(8px);
  opacity: var(--g);
  mix-blend-mode: screen;
  animation: breathe 4.2s ease-in-out infinite;
}
/* 光心：近白 */
.glow-core {
  width: calc(30px + var(--g) * 60px);
  height: calc(30px + var(--g) * 60px);
  background: radial-gradient(closest-side, rgba(255, 252, 240, 1), rgba(255, 236, 200, 0.6) 60%, rgba(255, 230, 190, 0) 100%);
  filter: blur(4px);
  opacity: calc(var(--g) * 0.95);
  mix-blend-mode: screen;
}
/* 被照亮的小水珠 */
.fleck {
  width: 7px;
  height: 7px;
  background: radial-gradient(circle, rgba(255, 246, 225, 0.95), rgba(255, 220, 170, 0) 70%);
  opacity: 0;
  mix-blend-mode: screen;
  animation: fleck 5s ease-in-out infinite;
}
.f1 { --dx: -120px; --dy: -60px; animation-delay: 0s; }
.f2 { --dx: 90px; --dy: -110px; width: 5px; height: 5px; animation-delay: -1.2s; }
.f3 { --dx: 150px; --dy: 40px; width: 9px; height: 9px; animation-delay: -2.1s; }
.f4 { --dx: -70px; --dy: 120px; animation-delay: -3s; }
.f5 { --dx: 30px; --dy: 160px; width: 4px; height: 4px; animation-delay: -3.7s; }
.f6 { --dx: -170px; --dy: 20px; width: 6px; height: 6px; animation-delay: -4.4s; }
@keyframes drift {
  0%, 100% { border-radius: 52% 48% 46% 54% / 50% 56% 44% 50%; transform: translate(-50%, -50%) rotate(0deg); }
  33% { border-radius: 44% 56% 54% 46% / 56% 44% 56% 44%; transform: translate(-49%, -51%) rotate(8deg); }
  66% { border-radius: 56% 44% 50% 50% / 46% 54% 46% 54%; transform: translate(-51%, -49%) rotate(-6deg); }
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(0.96); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}
@keyframes fleck {
  0%, 100% { opacity: 0; transform: translate(calc(-50% + var(--dx) * (0.6 + var(--g) * 0.5)), calc(-50% + var(--dy) * (0.6 + var(--g) * 0.5))) scale(0.6); }
  50% { opacity: calc(var(--g) * 0.9); transform: translate(calc(-50% + var(--dx) * (0.6 + var(--g) * 0.5)), calc(-50% + var(--dy) * (0.6 + var(--g) * 0.5) - 10px)) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .glow-halo, .glow-bloom, .fleck { animation: none; }
}

/* now playing */
.listen { padding: 0; min-height: 152px; background: rgba(24, 32, 28, 0.25); }
.listen iframe { display: block; border: 0; border-radius: var(--radius); }
.listen-placeholder { margin: 0; padding: 64px 16px; text-align: center; font-size: 12px; color: var(--ink-soft); }

/* shows */
.next-show {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  text-decoration: none;
}
.next-show.empty .title { font-family: var(--sans); font-weight: 500; }

.poster-wall, .roll {
  display: flex;
  gap: 12px;
  margin: 4px -16px 0;
  padding: 6px 16px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.poster-wall::-webkit-scrollbar, .roll::-webkit-scrollbar { display: none; }

.poster {
  flex: none;
  width: 62%;
  max-width: 240px;
  scroll-snap-align: center;
  text-decoration: none;
}
.poster img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(24, 32, 28, 0.3);
  transform: rotate(-1.2deg);
  transition: transform 0.3s ease;
}
.poster:nth-child(even) img { transform: rotate(1.4deg); }
.poster-meta {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  line-height: 1.5;
}
.poster-meta .date { font-weight: 700; font-size: 13px; }

/* 毛片：底片條 */
.roll {
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.frame {
  position: relative;
  flex: none;
  width: 58%;
  max-width: 230px;
  margin: 0;
  padding: 22px 6px;
  background:
    radial-gradient(circle, transparent 3.2px, #121714 3.6px) 0 4px / 14px 14px repeat-x,
    radial-gradient(circle, transparent 3.2px, #121714 3.6px) 0 calc(100% - 4px) / 14px 14px repeat-x,
    #121714;
  scroll-snap-align: center;
}
.frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: blur(7px) saturate(0.7) brightness(1.05);
  transform: scale(1.04);
  transition: filter 0.9s ease, transform 0.9s ease;
}
.frame.focus img, .frame:hover img { filter: none; transform: none; }
.frame figcaption {
  position: absolute;
  right: 10px;
  bottom: 4px;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #e9a55a;   /* 底片邊緣的橘色編號 */
}

/* about */
.about { padding: 16px 18px; }
.lang-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.lang-tabs button {
  min-width: 44px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(24, 32, 28, 0.5);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lang-tabs button[aria-pressed="true"] { background: var(--acid); border-style: solid; }
.about-text { font-family: var(--sans); font-size: 14px; line-height: 1.9; }
.about-text p { margin: 0 0 12px; }
.about-text p[lang="en"] { font-family: var(--mono); font-size: 13px; }
.members {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed rgba(24, 32, 28, 0.4);
  list-style: none;
}
.members li { display: flex; flex-direction: column; }
.members .title { font-size: 14px; }

/* merch */
.merch { padding: 16px 18px; }
.merch ul { margin: 0 0 6px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.merch li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--edge);
  font-family: var(--sans);
  font-size: 13px;
}
.merch .sub { margin: 0; font-family: var(--sans); }

/* 毛毛蟲：捲動進度 */
.caterpillar {
  --p: 0;
  position: fixed;
  z-index: 4;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: calc(8px + var(--p) * (100vw - 64px));
  width: 22px;
  height: auto;
  transform: scaleX(-1) rotate(-90deg);
  transform-origin: center;
  pointer-events: none;
  opacity: 0.85;
  animation: wiggle 1.4s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: scaleX(-1) rotate(-90deg) scaleY(1); }
  50% { transform: scaleX(-1) rotate(-90deg) scaleY(0.88); }
}
@media (prefers-reduced-motion: reduce) {
  .caterpillar { animation: none; }
  .frame img { filter: none; transform: none; }
}

/* 偶爾出現的歌詞：一個字一個字手寫出來 */
.chatter { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.say {
  position: absolute;
  max-width: min(78vw, 520px);
  transform: rotate(var(--tilt, 0deg));
  transform-origin: left center;
  font-family: 'Reenie Beanie', cursive;
  font-size: var(--size, 26px);
  line-height: 1.05;
  color: rgba(24, 32, 28, 0.85);
  text-shadow: 0 0 6px rgba(238, 243, 239, 0.95), 0 0 14px rgba(238, 243, 239, 0.75);
  /* 寫完之後整句暈開消失 */
  animation: say-out 1.6s ease var(--fade-at, 4000ms) forwards;
}
.say .word { display: inline-block; white-space: nowrap; }
.say .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(calc(var(--dy, 0px) + 3px)) rotate(var(--rot, 0deg)) scale(0.85);
  filter: blur(2.5px);
  /* 每個字：像筆尖剛碰到起霧的玻璃，先糊糊的，再變清楚 */
  animation: ink 0.42s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes ink {
  0%   { opacity: 0; filter: blur(2.5px); transform: translateY(calc(var(--dy, 0px) + 3px)) rotate(var(--rot, 0deg)) scale(0.85); }
  60%  { opacity: 1; filter: blur(0.4px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(var(--dy, 0px)) rotate(var(--rot, 0deg)) scale(1); }
}
@keyframes say-out {
  to { opacity: 0; filter: blur(6px); }
}

/* 頁尾：聆聽、追蹤 */
.foot-group { margin-bottom: 22px; }
.foot-group h2 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-shadow: 0 0 8px rgba(238, 243, 239, 0.95);
}
.everywhere a { display: inline-flex; align-items: center; gap: 6px; }
.everywhere svg { width: 14px; height: 14px; fill: var(--ink); }

/* 左右滑動區塊的箭頭：只在有滑鼠的裝置顯示 */
.scroller { position: relative; }
.navs { display: none; }
.roll, .poster-wall { cursor: grab; }
.dragging { cursor: grabbing; scroll-snap-type: none; }
.dragging img { pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .navs { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
  .nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--edge);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .nav:hover:not(:disabled) { background: var(--acid); }
  .nav:disabled { opacity: 0.35; cursor: default; }
}
