/* Utaka Music Selection — public curation site.
   One continuous paper background, four time bands, seamless right-angle collage (no shadows, no tilted sleeves). */

:root {
  --gutter: 16px;
  --maxw: 1200px;
  --f-body: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --f-day: "Archivo", "Noto Sans TC", system-ui, sans-serif;
  --f-night: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  --f-head: var(--f-day);
  --head-style: italic;
  --head-weight: 900;
  --head-stretch: 100%;

  /* Tokyo Indie Radio (11:00–17:59) is the default */
  --paper: #f6f1e7;
  --paper-2: #efe7d6;
  --ink: #1d3a94;
  --ink-strong: #14296e;
  --ink-soft: #3d4f86;
  --a1: #2449ad;
  --a2: #f28f91;
  --a3: #f5c542;
  --a4: #a9cde7;
  --on-a1: #f6f1e7;
  --line: rgba(29, 58, 148, 0.28);
  --focus: #f28f91;
  --grain-opacity: 0.35;
  color-scheme: light;
}
:root:lang(ja) { --f-body: "Noto Sans JP", "Noto Sans TC", system-ui, -apple-system, "Hiragino Sans", sans-serif; }
@media (min-width: 760px) { :root { --gutter: 32px; } }

:root[data-band="morning"] {
  --paper: #f8f4e8; --paper-2: #edf3f6; --ink: #17306b; --ink-strong: #0f2357; --ink-soft: #3a4f86;
  --a1: #a9cde7; --a2: #f5c542; --a3: #2449ad; --a4: #f6d9a8; --on-a1: #17306b;
  --line: rgba(23, 48, 107, 0.25); --focus: #2449ad;
}
:root[data-band="evening"] {
  --paper: #252b62; --paper-2: #2d3470; --ink: #f6f1e7; --ink-strong: #ffffff; --ink-soft: #d9d3ee;
  --a1: #a59bc9; --a2: #f3a4ce; --a3: #3b4391; --a4: #6c6fb0; --on-a1: #1b1f4d;
  --line: rgba(246, 241, 231, 0.25); --focus: #f3a4ce; --grain-opacity: 0.22;
  --f-head: var(--f-night); --head-weight: 600; --head-stretch: 100%;
  color-scheme: dark;
}
:root[data-band="midnight"] {
  --paper: #171d35; --paper-2: #1e2542; --ink: #ece8f6; --ink-strong: #ffffff; --ink-soft: #c3c6e4;
  --a1: #969cc6; --a2: #e9a0c8; --a3: #2b335c; --a4: #4b5287; --on-a1: #141932;
  --line: rgba(236, 232, 246, 0.22); --focus: #e9a0c8; --grain-opacity: 0.18;
  --f-head: var(--f-night); --head-weight: 600;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  /* continuous paper: subtle grain + flat arcs riding the page edges, repeating all the way down */
  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='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .4  0 0 0 0 .3  0 0 0 .18 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"),
    radial-gradient(circle at -70px 420px, var(--a4) 0 110px, transparent 111px),
    radial-gradient(circle at -70px 420px, var(--a2) 0 150px, transparent 151px),
    radial-gradient(circle at calc(100% + 80px) 1050px, var(--a1) 0 120px, transparent 121px),
    radial-gradient(circle at calc(100% + 80px) 1050px, var(--a3) 0 160px, transparent 161px),
    radial-gradient(circle at -60px 1700px, var(--a3) 0 120px, transparent 121px);
  background-size: 160px 160px, 100% 2000px, 100% 2000px, 100% 2000px, 100% 2000px, 100% 2000px;
  background-repeat: repeat, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y;
  overflow-x: hidden;
}
@media (max-width: 759px) {
  body { background-size: 160px 160px, 100% 2400px, 100% 2400px, 100% 2400px, 100% 2400px, 100% 2400px; }
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 0.8em; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button { font: inherit; color: inherit; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.js-only { display: none !important; }
.js .js-only { display: revert !important; }
.js .modes.js-only { display: flex !important; }
.fine { font-size: 13px; line-height: 1.65; color: var(--ink-soft); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- header ---------- */
.top {
  max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { text-decoration: none; font-family: var(--f-head); font-style: var(--head-style); font-weight: var(--head-weight); letter-spacing: 0.01em; line-height: 1.05; font-size: 20px; color: var(--ink-strong); }
.brand-2 { font-size: 0.62em; letter-spacing: 0.08em; text-transform: uppercase; }
/* UMS logo (preview cleanup of 宴香's concept; swap the two files for the official logo later) */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-t { display: block; min-width: 0; }
.lang { flex: none; }
.lang a { white-space: nowrap; }
@media (max-width: 400px) { .brand { gap: 8px; } .ums { width: 40px; height: 38px; } .brand { font-size: 18px; } }
.ums { position: relative; display: block; flex: none; width: 46px; height: 44px; }
.ums img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ums-b { display: none; }
:root[data-band="evening"] .top .ums-a, :root[data-band="midnight"] .top .ums-a { display: none; }
:root[data-band="evening"] .top .ums-b, :root[data-band="midnight"] .top .ums-b { display: block; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .brand .ums { transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .brand:hover .ums { transform: rotate(-6deg) scale(1.06); }
}
.foot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 1.1em; }
.foot-head .foot-brand { margin: 0; }
/* same height as the two-line brand text, so tops and bottoms line up */
.ums-foot { width: 53px; height: 51px; }
:root[data-band="morning"] .ums-foot .ums-a, :root[data-band="evening"] .ums-foot .ums-a, :root[data-band="midnight"] .ums-foot .ums-a { display: none; }
:root[data-band="morning"] .ums-foot .ums-b, :root[data-band="evening"] .ums-foot .ums-b, :root[data-band="midnight"] .ums-foot .ums-b { display: block; }
.lang { display: flex; border: 2px solid var(--ink); }
.lang a { display: inline-flex; align-items: center; min-height: 40px; min-width: 44px; justify-content: center; padding: 0 12px; text-decoration: none; font-size: 14px; font-weight: 700; }
.lang a + a { border-left: 2px solid var(--ink); }
.lang a[aria-current="true"] { background: var(--ink); color: var(--paper); }

/* ---------- hero ---------- */
/* Full-bleed key visual: edge to edge, the approved image shown whole (no crop). */
.hero { margin: 0 auto; padding: 0; }
.hero-frame { background: var(--paper-2); overflow: hidden; }
.hero-img { display: block; width: 100%; height: auto; aspect-ratio: 1678 / 937; object-fit: contain; }
.hero-text { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; }
.hero-night { display: none; }
:root[data-band="evening"] .hero-day, :root[data-band="midnight"] .hero-day { display: none; }
:root[data-band="evening"] .hero-night, :root[data-band="midnight"] .hero-night { display: block; aspect-ratio: 1672 / 941; }
.hero-text {
  display: grid; gap: 4px 32px; padding: 22px 0 8px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-text { grid-template-columns: 7fr 5fr; align-items: start; padding-top: 30px; }
  .hero-text .band-name, .hero-text .greet, .hero-text .tagline { grid-column: 1; }
  .hero-text .modes, .hero-text .mode-desc { grid-column: 2; }
  .hero-text .modes { grid-row: 1 / span 2; align-self: end; }
}
.band-name { margin: 0 0 6px; }
.bn { display: none; background: var(--a2); color: var(--ink-strong); font-family: var(--f-head); font-style: var(--head-style); font-weight: var(--head-weight); text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; padding: 5px 12px; }
:root[data-band="evening"] .bn, :root[data-band="midnight"] .bn { color: var(--on-a1); letter-spacing: 0.1em; font-size: 15px; }
:root[data-band="morning"] .bn-morning, :root[data-band="day"] .bn-day, :root[data-band="evening"] .bn-evening, :root[data-band="midnight"] .bn-midnight { display: inline-block; }
.greet { font-size: clamp(24px, 3.6vw, 42px); font-weight: 700; color: var(--ink-strong); line-height: 1.45; margin: 4px 0 8px; }
.g { display: none; }
:root[data-band="morning"] .g-morning, :root[data-band="day"] .g-day, :root[data-band="evening"] .g-evening, :root[data-band="midnight"] .g-midnight { display: inline; }
.tagline { color: var(--ink-soft); font-size: 15px; }
.tagline .en { font-family: var(--f-head); font-style: var(--head-style); font-weight: var(--head-weight); color: var(--ink); }
:root[data-band="evening"] .tagline .en, :root[data-band="midnight"] .tagline .en { font-size: 1.2em; }

.modes { flex-wrap: wrap; border: 2px solid var(--ink); }
.modes button {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 6px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--f-day); font-style: italic; font-weight: 800; font-size: 13px; letter-spacing: 0.06em;
}
.modes button + button { border-left: 2px solid var(--ink); }
.modes button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.modes button:hover { background: var(--line); }
.modes button[aria-pressed="true"]:hover { background: var(--ink); }
.mode-desc { margin-top: 6px; }

/* ---------- ticker (decorative, radio feel) ---------- */
.ticker { overflow: hidden; background: var(--ink); color: var(--paper); border-block: 2px solid var(--ink); margin-top: 18px; }
.ticker-track { display: flex; width: max-content; gap: 18px; align-items: center; padding: 10px 0; white-space: nowrap; animation: utk-ticker 48s linear infinite; }
.ticker span { font-family: var(--f-day); font-style: italic; font-weight: 800; letter-spacing: 0.1em; font-size: 14px; text-transform: uppercase; }
.ticker .ticker-lead { color: var(--a2); }
.ticker i { font-style: normal; color: var(--a2); font-size: 12px; }
@keyframes utk-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (hover: hover) { .ticker:hover .ticker-track { animation-play-state: paused; } }

/* ---------- motion: first view and scroll reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-img { animation: utk-hero 1.4s cubic-bezier(0.23, 1, 0.32, 1) both; }
  @keyframes utk-hero { from { transform: scale(1.04); } to { transform: none; } }
  .hero-text > * { animation: utk-up 0.8s cubic-bezier(0.23, 1, 0.32, 1) both; }
  .hero-text > :nth-child(2) { animation-delay: 0.08s; } .hero-text > :nth-child(3) { animation-delay: 0.16s; }
  .hero-text > :nth-child(4) { animation-delay: 0.24s; } .hero-text > :nth-child(5) { animation-delay: 0.32s; }
  @keyframes utk-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  /* Records and the featured tile open like a sleeve when they scroll into view (clip-path keeps the layout still). */
  html.js .reveal { clip-path: inset(0 0 100% 0); opacity: 0.001; transition: clip-path 0.9s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.6s ease-out; transition-delay: var(--d, 0s); }
  html.js .reveal.in { clip-path: inset(0 0 0 0); opacity: 1; }
  /* SELECTED BY UTAKA: a small equalizer that keeps playing */
  .wave rect { transform-box: fill-box; transform-origin: center; animation: utk-eq 1.2s ease-in-out infinite alternate; }
  .wave rect:nth-child(3n) { animation-duration: 0.9s; } .wave rect:nth-child(3n+1) { animation-duration: 1.5s; animation-delay: -0.4s; }
  .wave rect:nth-child(4n) { animation-delay: -0.7s; }
  @keyframes utk-eq { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
  /* Concentric record tile turns slowly */
  .fx-k { background-size: 200% 200%; animation: utk-groove 18s linear infinite; }
  @keyframes utk-groove { from { background-position: 0 0; } to { background-position: 100% 100%; } }
}
@media (hover: hover) and (pointer: fine) {
  .tile.pl .tile-cta { transition: letter-spacing 0.25s ease; }
  .tile.pl:hover .tile-cta { letter-spacing: 0.06em; }
  .tile.pl .tile-cover { transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
  .tile.pl:hover .tile-cover { transform: scale(1.035); }
  .featured-link .featured-cta { transition: letter-spacing 0.25s ease; }
  .featured-link:hover .featured-cta { letter-spacing: 0.06em; }
}
.btn, .modes button { transition: transform 160ms ease-out, background-color 0.2s ease, color 0.2s ease; }
.btn:active, .modes button:active { transform: scale(0.97); }

/* ---------- featured (one large tile; not affected by the time bands) ---------- */
.featured { max-width: var(--maxw); margin: 18px auto 0; padding: 0 var(--gutter); }
.featured-link { display: grid; grid-template-columns: 1fr; text-decoration: none; background: #1d1712; color: #f6efe3; }
@media (min-width: 760px) { .featured-link { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: 420px; } }
.featured-art { display: block; overflow: hidden; }
.featured-cover { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .featured-link:hover .featured-cover { transform: scale(1.02); } }
.featured-link:focus-visible { outline: 3px solid #f3b27a; outline-offset: 3px; }
.featured-body { display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 4vw, 44px); justify-content: center; }
.featured-label { font-family: var(--f-day); font-style: italic; font-weight: 800; letter-spacing: 0.12em; font-size: 13px; color: #f3b27a; }
.featured-name { font-family: var(--f-night); font-style: italic; font-weight: 600; font-size: clamp(32px, 4.6vw, 60px); line-height: 1.02; overflow-wrap: anywhere; }
.featured-genre { font-size: 13px; letter-spacing: 0.04em; opacity: 0.8; }
.featured-curator { font-size: 14px; }
.featured-intro { font-size: 15px; line-height: 1.75; }
.featured-cta { font-weight: 700; margin-top: 8px; }
.detail .disclaimer { opacity: 0.75; }

/* ---------- collage ---------- */
.records { max-width: var(--maxw); margin: 28px auto 0; padding: 0 var(--gutter); outline: none; }
.records-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 0 10px; border-bottom: 2px solid var(--ink); margin-bottom: 0; }
.records-head h2 { font-family: var(--f-head); font-style: var(--head-style); font-weight: var(--head-weight); font-size: clamp(34px, 6vw, 64px); letter-spacing: 0.01em; color: var(--ink-strong); line-height: 1; }
.records-head .dot { color: var(--a2); }
.records-head p { margin: 0; font-weight: 700; color: var(--ink-soft); }

.collage {
  --cols: 4;
  --cell: calc((min(100vw, var(--maxw)) - 2 * var(--gutter)) / var(--cols));
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: var(--cell);
  gap: 0;
  grid-template-areas:
    "a a a a" "a a a a" "a a a a" "a a a a"
    "b b b v" "b b b v" "b b b k"
    "m m m m"
    "c c d d" "c c d d"
    "e e e s" "e e e s"
    "w w w w"
    "f f f g" "f f f g"
    "y y y y" "y y y y";
}
@media (min-width: 760px) {
  .collage {
    --cols: 12;
    grid-auto-rows: max(var(--cell), 64px);
    grid-template-areas:
      "a a a a a a b b b b b v"
      "a a a a a a b b b b b v"
      "a a a a a a b b b b b k"
      "a a a a a a b b b b b k"
      "a a a a a a m m m m m k"
      "c c c c d d d e e e e s"
      "c c c c d d d e e e e s"
      "c c c c d d d e e e e s"
      "w w w f f f g y y y y y"
      "w w w f f f g y y y y y"
      "w w w f f f g y y y y y";
  }
}
.tile { position: relative; overflow: hidden; min-width: 0; min-height: 0; }
.tile[data-rank="1"] { grid-area: a; }
.tile[data-rank="2"] { grid-area: b; }
.tile[data-rank="3"] { grid-area: c; }
.tile[data-rank="4"] { grid-area: d; }
.tile[data-rank="5"] { grid-area: e; }
.tile[data-rank="6"] { grid-area: f; }
.fx-v { grid-area: v; } .fx-k { grid-area: k; } .fx-m { grid-area: m; } .fx-s { grid-area: s; }
.fx-w { grid-area: w; } .fx-g { grid-area: g; } .fx-y { grid-area: y; }

/* playlist tiles */
.tile.pl {
  container-type: size;
  display: block; text-decoration: none;
  background: var(--t-bg); color: var(--t-fg);
}
.tile-in { display: grid; grid-template-columns: 1fr; grid-template-rows: 100%; width: 100%; height: 100%; }
.tile-art { position: relative; display: block; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
/* tap affordance: a play pill on every cover */
.tile-play { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: 999px; background: rgba(20, 16, 12, 0.82); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0.02em; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease, background 0.2s ease; pointer-events: none; }
.tile-play svg { flex: none; }
.tile.pl:hover .tile-play, .tile.pl:focus-visible .tile-play { background: var(--a3, #370000); transform: translateY(-2px); }
.tile.pl:active .tile-play { transform: scale(0.96); }
@container (max-width: 170px) { .tile-play span { display: none; } .tile-play { padding: 8px; } }
@container (min-aspect-ratio: 1.15) and (min-width: 340px) { .tile-play span { display: none; } .tile-play { padding: 8px; } }
.tile-cover { width: 100%; height: 100%; object-fit: contain; object-position: center top; background: var(--t-bg); transition: transform 0.4s ease; }
.tile-ph { display: grid; place-items: center; width: 100%; height: 100%; background: repeating-radial-gradient(circle at 70% 40%, var(--t-ac) 0 6px, transparent 6px 18px), var(--t-bg); }
.tile-ph b { font-family: var(--f-night); font-style: italic; font-size: 56px; color: var(--t-fg); }
.tile-ph.big { aspect-ratio: 1; }
.tile-meta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tile-no { font-family: var(--f-night); font-style: italic; font-weight: 600; font-size: 30px; line-height: 1; }
.tile-name { font-family: var(--f-head); font-style: var(--head-style); font-weight: var(--head-weight); font-size: 22px; line-height: 1.08; }
.tile-genre { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; line-height: 1.4; }
.tile-lead { font-size: 13px; line-height: 1.6; }
/* keep the text column inside the tile: clamp the long lines instead of cutting off the CTA */
.tile-lead { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.tile-genre { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; flex: none; }
.tile-no, .tile-name, .tile-cta { flex: none; }
.tile-cta { margin-top: auto; font-size: 13px; font-weight: 700; border-top: 1px solid currentColor; padding-top: 8px; }
/* wide tiles: square cover + a text column */
@container (min-aspect-ratio: 1.15) and (min-width: 340px) {
  .tile-in { grid-template-columns: min(100cqh, 64cqw) 1fr; }
  .tile-meta { position: static; width: auto; height: 100%; clip-path: none; display: flex; flex-direction: column; gap: 8px; padding: 18px 16px; overflow: hidden; }
}
@container (min-aspect-ratio: 1.15) and (max-width: 480px) {
  .tile-lead { display: none; }
  .tile-name { font-size: 18px; }
}
@container (max-height: 230px) { .tile-lead, .tile-genre { display: none; } }
@container (max-height: 300px) { .tile-lead { display: none; } }
.tile.pl:hover .tile-cover { transform: scale(1.02); }
.tile.pl:focus-visible { outline-offset: -4px; outline-width: 4px; z-index: 2; }

/* fixed tiles */
.fx { display: flex; }
.fx p { margin: 0; }
.fx-v { background: var(--a2); color: var(--ink-strong); align-items: center; justify-content: center; }
.fx-v span { writing-mode: vertical-rl; font-family: var(--f-day); font-style: italic; font-weight: 800; letter-spacing: 0.16em; font-size: 13px; white-space: nowrap; }
.fx-k { background: repeating-radial-gradient(circle at 100% 100%, var(--a1) 0 12px, var(--a4) 12px 24px); }
.fx-m { background: var(--paper-2); align-items: center; padding: 10px 18px; }
.fx-m p { font-family: var(--f-head); font-style: var(--head-style); font-weight: var(--head-weight); font-size: clamp(18px, 2.4vw, 32px); line-height: 1.05; color: var(--a3); }
:root[data-band="evening"] .fx-m p, :root[data-band="midnight"] .fx-m p { color: var(--a2); }
.fx-s { background: radial-gradient(circle, var(--ink) 0 2.2px, transparent 2.6px) 0 0 / 16px 16px, var(--a1); }
.fx-w { background: var(--paper); flex-direction: column; justify-content: center; gap: 12px; padding: 16px 18px; border-top: 2px solid var(--ink); }
.fx-w p { font-family: var(--f-day); font-style: italic; font-weight: 800; letter-spacing: 0.12em; font-size: 14px; }
.wave { width: 100%; max-width: 220px; height: 36px; fill: var(--ink); }
.fx-g { background: var(--a3); color: var(--paper); align-items: center; justify-content: center; padding: 12px 6px; }
:root[data-band="evening"] .fx-g, :root[data-band="midnight"] .fx-g { color: var(--ink); background: var(--a4); }
:root[data-band="morning"] .fx-g { color: #f8f4e8; }
:root[data-band="day"] .fx-g { color: var(--ink-strong); }
.fx-g p { writing-mode: vertical-rl; font-size: 14px; font-weight: 500; letter-spacing: 0.1em; line-height: 1.8; height: 100%; overflow: hidden; }
.fx-y { background: var(--ink); color: var(--paper); flex-direction: column; justify-content: center; padding: 16px 20px; }
.fx-y .y-title { font-family: var(--f-day); font-style: italic; font-weight: 900; font-size: clamp(22px, 3vw, 34px); letter-spacing: 0.02em; line-height: 1; }
.fx-y .y-sub { font-weight: 700; margin-top: 6px; color: var(--a2); }
.fx-y .y-body { font-size: 13px; line-height: 1.6; margin-top: 6px; max-width: 34em; opacity: 0.9; }
.fx-y.fx-plain { background: radial-gradient(circle at 0 100%, var(--a2) 0 40%, transparent 40.5%), var(--a4); }

/* ---------- detail dialog ---------- */
dialog.detail {
  border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  background: var(--paper); color: var(--ink);
}
dialog.detail:not([open]) { display: none; }
dialog.detail::backdrop { background: rgba(10, 14, 36, 0.66); }
@media (min-width: 900px) {
  dialog.detail { margin: auto; width: min(1040px, calc(100% - 64px)); height: auto; max-height: calc(100% - 64px); }
}
/* no-JS deep link: rendered open as a normal block */
html:not(.js) dialog.detail[open] { position: static; display: block; max-width: var(--maxw); margin: 24px auto; height: auto; }
.detail-inner { position: relative; display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .detail-inner { grid-template-columns: 420px 1fr; } }
.detail-art { background: var(--t-bg); padding: 0; }
@media (min-width: 900px) { .detail-art { position: sticky; top: 0; align-self: start; } }
.detail-cover { width: 100%; height: auto; aspect-ratio: 1; }
.detail-body { padding: 22px var(--gutter) 32px; }
@media (min-width: 900px) { .detail-body { padding: 34px 40px 40px; } }
.detail-close {
  position: absolute; right: 0; top: 0; z-index: 3; width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); text-decoration: none; font-size: 30px; line-height: 1;
}
.detail-no { font-family: var(--f-day); font-style: italic; font-weight: 800; letter-spacing: 0.14em; font-size: 12px; color: var(--ink-soft); margin: 0 0 6px; }
.detail-name { font-family: var(--f-head); font-style: var(--head-style); font-weight: var(--head-weight); font-size: clamp(32px, 5vw, 52px); line-height: 1.02; color: var(--ink-strong); padding-right: 40px; }
.detail-genre { margin: 10px 0 14px; font-size: 13px; color: var(--ink-soft); letter-spacing: 0.04em; }
.detail-lead { font-size: 17px; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; cursor: pointer;
  border: 2px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--line); }
.btn.primary:hover { background: var(--ink-strong); }
.share-out { min-height: 1.2em; margin: 4px 0 0; }
.save { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 10px 0 18px; }
.save h3, .note h3 { font-size: 15px; margin: 0 0 6px; }
.save p { margin: 0; }
.note h3 { font-size: 18px; margin-bottom: 10px; }
.note p { font-size: 16px; line-height: 1.9; }
.note .sig { font-family: var(--f-night); font-style: italic; font-size: 20px; margin-top: 8px; }
.back { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--a2); }
.notfound { max-width: var(--maxw); margin: 30px auto; padding: 24px var(--gutter); border-top: 2px solid var(--ink); }

/* ---------- player ---------- */
.embed { margin: 16px 0 14px; }
.embed iframe { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; }
@media (max-width: 600px) { .embed iframe { height: 152px; } }

/* ---------- footer ---------- */
.foot { margin-top: 44px; color: var(--ink); }
.skyline { display: block; width: 100%; height: 70px; fill: var(--a3); }
:root[data-band="evening"] .skyline, :root[data-band="midnight"] .skyline { fill: var(--a4); }
.foot-inner { background: var(--a3); color: #f6f1e7; padding: 18px var(--gutter) 36px; }
:root[data-band="evening"] .foot-inner, :root[data-band="midnight"] .foot-inner { background: var(--a4); color: var(--ink); }
:root[data-band="morning"] .foot-inner { color: #f8f4e8; }
/* day: the footer is yellow, so navy text (#14296e on #f5c542 ≈ 8.6:1) */
:root[data-band="day"] .foot-inner { color: var(--ink-strong); }
.foot-inner > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.foot .fine { color: inherit; opacity: 0.9; }
.foot-brand { font-family: var(--f-head); font-style: var(--head-style); font-weight: var(--head-weight); font-size: 22px; line-height: 1.15; }
.foot-brand span { font-size: 14px; font-weight: 500; }
.foot a { color: inherit; }
.foot .home-link { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; }

/* phone refinements */
@media (max-width: 759px) {
  body {
    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='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .4  0 0 0 0 .3  0 0 0 .18 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"),
      radial-gradient(circle at -96px 300px, var(--a4) 0 80px, transparent 81px),
      radial-gradient(circle at -96px 300px, var(--a2) 0 104px, transparent 105px),
      radial-gradient(circle at calc(100% + 96px) 1300px, var(--a1) 0 80px, transparent 81px),
      radial-gradient(circle at calc(100% + 96px) 1300px, var(--a3) 0 104px, transparent 105px),
      radial-gradient(circle at -90px 2000px, var(--a3) 0 100px, transparent 101px);
  }
  .modes button { font-size: 11px; letter-spacing: 0.01em; padding: 0 2px; }
}
.tile-cover { object-position: center; }

/* ---------- contrast fixes (WCAG AA 4.5:1 for small text) ---------- */
:root[data-band="day"] .ticker .ticker-lead, :root[data-band="day"] .ticker i, :root[data-band="day"] .fx-y .y-sub { color: var(--a3); }
:root[data-band="evening"] .ticker .ticker-lead, :root[data-band="evening"] .ticker i, :root[data-band="evening"] .fx-y .y-sub,
:root[data-band="midnight"] .ticker .ticker-lead, :root[data-band="midnight"] .ticker i, :root[data-band="midnight"] .fx-y .y-sub { color: var(--a3); }
:root[data-band="day"] .fx-m p { color: var(--a1); }
:root[data-band="evening"] .fx-v, :root[data-band="midnight"] .fx-v { color: var(--on-a1); }
:root[data-band="evening"] .foot-inner, :root[data-band="evening"] .fx-g { color: #fff; }
:root[data-band="evening"] .foot .fine { opacity: 1; }
