/* Jingle Bhag — night market window, tight palette */
:root {
  --bg: #071322;
  --bg-2: #12304c;
  --paper: #f3f8fc;
  --text-on-dark: #d7eef8;
  --text-on-paper: #142338;
  --muted: #4d6173;
  --brand: #e8c35a;
  --brand-deep: #b8862a;
  --line: #c5d6e2;
  --display: Georgia, "Iowan Old Style", ui-serif, serif;
  --sans: system-ui, "Segoe UI", "Avenir Next", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--sans);
  color: var(--text-on-dark);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-2) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 55%);
  min-height: 100vh;
  line-height: 1.55;
}
a { color: var(--brand); }
img { max-width: 100%; height: auto; }

.snowfall { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.snowfall span {
  position: absolute; top: -8px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--paper); opacity: .75; animation: fall 16s linear infinite;
}
.snowfall span:nth-child(1) { left: 8%; animation-duration: 18s; animation-delay: -2s; }
.snowfall span:nth-child(2) { left: 22%; width: 3px; height: 3px; animation-duration: 14s; animation-delay: -7s; }
.snowfall span:nth-child(3) { left: 37%; animation-duration: 20s; animation-delay: -4s; }
.snowfall span:nth-child(4) { left: 51%; width: 4px; height: 4px; animation-duration: 15s; animation-delay: -11s; }
.snowfall span:nth-child(5) { left: 64%; animation-duration: 17s; animation-delay: -1s; }
.snowfall span:nth-child(6) { left: 73%; width: 3px; height: 3px; animation-duration: 13s; animation-delay: -9s; }
.snowfall span:nth-child(7) { left: 85%; animation-duration: 19s; animation-delay: -5s; }
.snowfall span:nth-child(8) { left: 94%; width: 2px; height: 2px; animation-duration: 12s; animation-delay: -8s; }
@keyframes fall { to { transform: translateY(110vh); opacity: .2; } }
@media (prefers-reduced-motion: reduce) {
  .snowfall span, .lamps i { animation: none; }
}

.mast, .lane, .colophon { position: relative; z-index: 1; }
.mast { text-align: center; padding: 18px 20px 4px; }
.sigil { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--paper); }
.sigil-bauble {
  width: 28px; height: 36px; position: relative;
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent), 0 8px 18px color-mix(in srgb, var(--bg) 70%, transparent);
}
.sigil-bauble::before {
  content: ""; position: absolute; top: -7px; left: 50%; width: 8px; height: 8px;
  margin-left: -4px; background: var(--line); border-radius: 2px;
}
.sigil-name { font-family: var(--display); font-size: 1.9rem; letter-spacing: .04em; }
.mast-line { margin: 6px 0 12px; color: var(--text-on-dark); font-size: 1.15rem; opacity: 1; }
.mast-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.mast-nav a {
  color: var(--text-on-dark); text-decoration: none; font-size: 1.125rem;
  padding: 8px 4px; min-height: 44px; display: inline-flex; align-items: center;
  border-bottom: 1px solid transparent;
}
.mast-nav a:hover, .mast-nav a:focus { border-bottom-color: var(--brand); color: var(--paper); }

.lane { width: min(840px, calc(100% - 32px)); margin: 0 auto 64px; }

.opening { text-align: center; margin: 6px 0 12px; }
.lantern {
  display: inline-block; margin: 0 0 8px;
  padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--brand) 50%, transparent);
  border-radius: 999px; color: var(--brand); font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase;
}
.opening h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  margin: 0;
  color: var(--paper);
}
.opening-note {
  margin: 10px auto 0;
  max-width: 40rem;
  color: var(--text-on-dark);
  font-size: 1.02rem;
  line-height: 1.5;
}

.window-wrap { display: flex; justify-content: center; }
.window {
  width: min(50rem, 100%);
  background: var(--bg-2);
  border: 6px solid var(--brand);
  border-bottom-width: 14px;
  border-radius: 18px 18px 10px 10px;
  box-shadow: 0 20px 40px color-mix(in srgb, var(--bg) 80%, transparent);
  position: relative;
}
.window-eave {
  height: 18px; margin: -6px -6px 0;
  background: var(--paper);
  border-radius: 16px 16px 4px 4px;
}
.stage { position: relative; width: 100%; aspect-ratio: 4 / 3; background: var(--bg); overflow: hidden; }
.stage.is-waiting { container-type: inline-size; }
.cover, .loader { position: absolute; inset: 0; }
.cover-art, .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.go {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 12px 22px 10px; min-width: 70%;
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
  color: var(--text-on-paper); text-decoration: none; border: 0; border-radius: 999px;
  font-family: var(--display); font-size: 1.15rem; cursor: pointer;
  box-shadow: 0 8px 0 var(--brand-deep);
}
.go small { display: block; font-family: var(--sans); font-size: .72rem; font-weight: 400; opacity: .85; }
.go:hover, .go:focus { filter: brightness(1.06); }
.go.is-closed,
.go:disabled {
  cursor: not-allowed;
  filter: none;
  background: var(--bg-2);
  color: var(--text-on-dark);
  box-shadow: 0 6px 0 var(--bg);
  border: 1px solid color-mix(in srgb, var(--text-on-dark) 35%, transparent);
}
.go.is-closed:hover,
.go.is-closed:focus,
.go:disabled:hover,
.go:disabled:focus { filter: none; }
.soon {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  width: min(88%, 280px);
  padding: 14px 16px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid var(--brand);
  border-radius: 12px;
  text-align: center;
  color: var(--paper);
  z-index: 1;
}
.soon-en { margin: 0; font-family: var(--display); font-size: clamp(1.35rem, 5.5vw, 1.85rem); line-height: 1.2; }
.soon-zh { margin: 8px 0 0; font-size: 1.08rem; }

.loader {
  display: none; align-items: center; justify-content: center; flex-direction: column;
  background: var(--bg); color: var(--text-on-dark); gap: 16px;
}
.lamps { display: flex; gap: 10px; }
.lamps i {
  width: 14px; height: 22px; border-radius: 50% 50% 40% 40%;
  background: var(--bg-2); box-shadow: 0 -3px 0 var(--line);
  animation: glow 1.6s ease-in-out infinite;
}
.lamps i:nth-child(2) { animation-delay: .2s; }
.lamps i:nth-child(3) { animation-delay: .4s; }
.lamps i:nth-child(4) { animation-delay: .6s; }
.lamps i:nth-child(5) { animation-delay: .8s; }
@keyframes glow {
  0%, 100% { background: var(--bg-2); }
  40% { background: var(--brand); box-shadow: 0 -3px 0 var(--paper), 0 0 16px var(--brand); }
}

.tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 8px; }
.chip {
  appearance: none; border: 1px solid color-mix(in srgb, var(--text-on-dark) 30%, transparent);
  background: color-mix(in srgb, var(--bg-2) 85%, transparent); color: var(--text-on-dark);
  border-radius: 999px; padding: 8px 12px; font: inherit; font-size: .86rem;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.chip svg { width: 16px; height: 16px; }
.chip-link { gap: 6px; }
.chip-link .ext { font-size: .72rem; opacity: .85; }
.chip[data-gf-liked], .chip[aria-pressed="true"] {
  background: var(--brand); color: var(--text-on-paper); border-color: var(--brand);
}
.share-msg { text-align: center; min-height: 1.2em; font-size: .85rem; color: var(--text-on-dark); opacity: .85; }
.play-alert {
  width: min(50rem, 100%);
  margin: 12px auto 8px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--brand);
  border-radius: 10px;
  color: var(--paper);
  font-size: 1.05rem;
  line-height: 1.45;
  text-align: center;
}

.prose, .asks, .porch {
  background: var(--paper);
  color: var(--text-on-paper);
  padding: 28px 24px;
}
.prose { border-radius: 18px 18px 0 0; }
.asks { border-radius: 0; padding-top: 8px; }
.porch { border-radius: 0 0 18px 18px; }
.prose.inner, .legal { border-radius: 18px; margin-top: 12px; }
.prose h2, .asks h2, .porch h2, .prose h1 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--bg-2);
  line-height: 1.25;
}
.prose h1 { font-size: 2rem; margin-top: 0; }
.prose p, .prose li { font-size: 1.05rem; }
.prose a { color: var(--brand-deep); }
.legal-meta { color: var(--muted); font-size: .9rem; margin-top: -8px; }

.asks h2 { margin-top: 0; }
.ask {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px; padding: 12px 16px; margin: 12px 0;
  box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--paper) 100%, transparent);
  filter: brightness(1.04);
}
.ask h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--bg-2); }
.ask p { margin: 0; }

.porch-lead, .cmt-empty, .cmt-time, .cmt-msg { color: var(--muted); }
.porch-form label { display: block; margin: 10px 0; font-size: .9rem; }
.porch-form input, .porch-form textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
  background: var(--paper); color: var(--text-on-paper);
}
.porch-form textarea { min-height: 110px; resize: vertical; }
.porch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.porch-actions button, .porch-form [type="submit"] {
  background: var(--bg-2); color: var(--paper); border: 0; border-radius: 999px;
  padding: 10px 18px; font: inherit; cursor: pointer;
}
.reply-to { display: none; margin: 8px 0; }
.porch-form[data-gf-replying] .reply-to { display: flex; gap: 10px; align-items: center; }
.cmt { margin: 16px 0; padding: 12px 0; border-top: 1px solid var(--line); }
.cmt-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.cmt-name { font-weight: 700; }
.cmt-owner { display: none; font-size: .75rem; background: var(--brand); color: var(--text-on-paper); border-radius: 999px; padding: 1px 8px; }
.cmt[data-gf-owner] .cmt-owner { display: inline-block; }
.cmt-time { font-size: .85rem; }
.cmt-text { margin: 6px 0; }
.cmt-to { color: var(--brand-deep); font-weight: 700; }
.cmt-reply-btn { background: none; border: 0; color: var(--brand-deep); padding: 0; cursor: pointer; font: inherit; font-size: .9rem; }
.cmt-replies { margin-left: 16px; }
.porch,
.porch-form,
[data-gf-comment-form],
.porch-list {
  display: block;
  visibility: visible;
  height: auto;
  overflow: visible;
  opacity: 1;
}
.porch { border-top: 1px solid var(--line); }
.porch-form { margin: 8px 0 16px; }
.cmt-empty { display: block; }
[data-gf-comments]:not([data-gf-empty]) .cmt-empty { display: none; }
.cmt-msg { margin: 0; font-size: .9rem; }

.colophon {
  text-align: center;
  padding: 32px 20px 48px;
  color: var(--text-on-dark);
  border-top: 1px solid color-mix(in srgb, var(--text-on-dark) 15%, transparent);
}
.colo-brand { font-family: var(--display); font-size: 1.3rem; color: var(--paper); margin: 0 0 4px; }
.colo-tag { margin: 0 0 16px; }
.colo-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 16px; }
.colo-nav a { color: var(--text-on-dark); }
.colo-credit { max-width: 640px; margin: 0 auto; font-size: .9rem; }

@media (max-width: 600px) {
  .lane { width: calc(100% - 16px); }
  .window, .play-alert { width: 100%; }
  .window { border-width: 5px; border-bottom-width: 12px; }
  .prose, .asks, .porch { padding: 20px 16px; }
  .go { min-width: 80%; font-size: 1.05rem; }
  .chip { min-height: 44px; }
}
@media (min-width: 900px) {
  .window, .play-alert { width: min(50rem, 100%); }
}
