/* Audience page: ink / ivory / champagne layout. Every colour derives from the --cl-* variables the settings write. */
.cl-audience {
  --cl-bg: #051515; --cl-text: #efebe2; --cl-current: #ddbd78; --cl-past: #93a29e;
  --cl-banner: #1f7a7a; --cl-banner-text: #ffffff; --cl-mask: 0.55;
  --cl-line: rgba(255, 255, 255, .15);
  --cl-current-soft: rgba(221, 189, 120, .09);
  --cl-glass: rgba(5, 21, 21, .72);
  --cl-scroll: rgba(147, 162, 158, .4);
  --cl-scroll-hover: rgba(221, 189, 120, .8);
  --cl-backdrop: rgba(5, 21, 21, .8);
  --cl-serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
  position: relative;
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  color: var(--cl-text);
  background: var(--cl-bg);
  font-family: var(--cl-font, "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif);
  line-height: 1.5;
  isolation: isolate;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .cl-audience {
    --cl-line: color-mix(in srgb, var(--cl-text) 15%, transparent);
    --cl-current-soft: color-mix(in srgb, var(--cl-current) 9%, transparent);
    --cl-glass: color-mix(in srgb, var(--cl-bg) 72%, transparent);
    --cl-scroll: color-mix(in srgb, var(--cl-past) 40%, transparent);
    --cl-scroll-hover: color-mix(in srgb, var(--cl-current) 80%, transparent);
    --cl-backdrop: color-mix(in srgb, var(--cl-bg) 80%, transparent);
  }
}
.cl-audience.cl-has-bg { background: var(--cl-bg) var(--cl-bg-image) var(--cl-bg-pos, center) / cover no-repeat; }
.cl-audience.cl-has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cl-bg);
  opacity: var(--cl-mask);
  pointer-events: none;
  z-index: -1;
}
.cl-audience * { box-sizing: border-box; }
.cl-audience button { font: inherit; color: inherit; cursor: pointer; }
.cl-audience [hidden] { display: none !important; }

.cl-wrap {
  position: relative;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: calc(39px + var(--cl-box-top, 0vh)) 44px calc(39px + var(--cl-box-bottom, 0px));
  z-index: 0;  /* own stacking context: the panel below sits above the page mask, under the text */
}
/* Optional translucent panel behind the content (settings: 文字底板). */
.cl-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cl-bg);
  opacity: var(--cl-panel, 0);
  pointer-events: none;
}
/* Content to one side on screens wider than the layout (settings: 文字位置). */
.cl-box-left .cl-wrap { margin-left: clamp(0px, 100% - 1160px, 4vw); margin-right: auto; }
.cl-box-right .cl-wrap { margin-right: clamp(0px, 100% - 1160px, 4vw); margin-left: auto; }

/* ---- countdown banner ---- */
.cl-banner {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 24px;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--cl-banner);
  color: var(--cl-banner-text);
  font-size: 20px;
  font-weight: 700;
  min-width: 0;
}
.cl-banner-label { overflow-wrap: anywhere; min-width: 0; }
.cl-banner-clock { font-size: 32px; font-variant-numeric: tabular-nums; }

/* ---- title ---- */
.cl-title {
  margin: 0 0 38px;
  text-align: center;
  font-family: var(--cl-font, var(--cl-serif));
  font-size: 38px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--cl-text);
  overflow-wrap: anywhere;
}
.cl-t-main { display: block; }
.cl-t-sep { display: none; }
.cl-t-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 6px;
  font-family: var(--cl-font, "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}
.cl-t-sub::before, .cl-t-sub::after { content: ""; flex: 0 0 25px; height: 1px; background: var(--cl-line); }

/* ---- two columns: now playing | program ---- */
.cl-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr);
  gap: 64px;
  align-items: start;
}
.cl-now { min-width: 0; padding-top: 15px; }
.cl-status { margin: 0 0 24px; font-size: 11px; color: var(--cl-past); overflow-wrap: anywhere; }
.cl-idle .cl-status {
  margin: 0;
  font-family: var(--cl-font, var(--cl-serif));
  font-size: 24px;
  line-height: 1.6;
  color: var(--cl-current);
}

.cl-live { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--cl-current); }
.cl-dot { width: 6px; height: 6px; flex-shrink: 0; background: var(--cl-current); border-radius: 50%; display: inline-block; }
.cl-live-en { font-size: 9px; letter-spacing: 1.8px; margin-left: 5px; opacity: .65; }
.cl-cur-index { margin-top: 31px; font-size: 11px; color: var(--cl-past); }
.cl-cur-name {
  margin: 12px 0 7px;
  font-family: var(--cl-font, var(--cl-serif));
  font-size: 52px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--cl-current);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-cur-composer { margin: 0; font-size: 15px; color: var(--cl-text); overflow-wrap: anywhere; }
.cl-cur-perf { display: flex; align-items: center; gap: 12px; margin-top: 27px; font-size: 15px; }
.cl-cur-icon {
  flex: 0 0 38px; height: 38px; width: 38px; display: grid; place-items: center;
  border: 1px solid var(--cl-line); border-radius: 50%; color: var(--cl-current);
}
.cl-cur-who { min-width: 0; overflow-wrap: anywhere; }
.cl-cur-desc { display: block; margin-top: 4px; font-size: 10px; color: var(--cl-past); }
.cl-eq { display: flex; align-items: center; gap: 3px; margin-left: auto; height: 24px; }
.cl-eq i { display: block; width: 2px; height: 10px; background: var(--cl-current); animation: cl-wave 1.2s ease-in-out infinite alternate; }
.cl-eq i:nth-child(2) { height: 19px; animation-delay: -.3s; }
.cl-eq i:nth-child(3) { height: 24px; animation-delay: -.7s; }
.cl-eq i:nth-child(4) { height: 16px; animation-delay: -.2s; }
.cl-eq i:nth-child(5) { height: 8px; animation-delay: -.5s; }
@keyframes cl-wave { to { transform: scaleY(.35); } }
/* A group heading is current between two groups: no performer, no equaliser. */
.cl-cur.cl-is-group .cl-eq { display: none; }

.cl-next { margin-top: 54px; padding-top: 23px; border-top: 1px solid var(--cl-line); }
.cl-cur[hidden] + .cl-next, .cl-idle .cl-next { margin-top: 0; }
.cl-next-label { display: flex; align-items: center; gap: 9px; font-size: 10px; color: var(--cl-past); }
.cl-next-name { margin: 12px 0 4px; font-size: 17px; font-weight: 400; line-height: 1.7; overflow-wrap: anywhere; }
.cl-next-meta { margin: 0; font-size: 11px; color: var(--cl-past); overflow-wrap: anywhere; }

/* ---- program ---- */
.cl-program { min-width: 0; }
.cl-ph { display: flex; align-items: center; gap: 13px; margin: 0; font-size: 17px; font-weight: 500; }
.cl-ph-en { font-size: 8px; letter-spacing: 2px; color: var(--cl-past); font-weight: 400; }
.cl-ph { padding-bottom: 14px; border-bottom: 1px solid var(--cl-line); }
.cl-detail-x:focus-visible { outline: 1px solid var(--cl-current); outline-offset: 2px; }

/* The scroll region: a fixed-height box of its own with a slim, quiet scrollbar. */
.cl-list {
  position: relative;  /* rows' offsetTop is measured from the list when centring the current one */
  height: 404px;
  margin: 0;
  padding: 0 10px 0 0;
  list-style: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--cl-scroll) transparent;
  scrollbar-gutter: stable;
  outline: none;
}
.cl-list:focus-visible { outline: 1px solid var(--cl-current); outline-offset: 4px; }
.cl-list::-webkit-scrollbar { width: 5px; }
.cl-list::-webkit-scrollbar-track { background: transparent; }
.cl-list::-webkit-scrollbar-thumb { background: var(--cl-scroll); border-radius: 8px; }
.cl-list::-webkit-scrollbar-thumb:hover { background: var(--cl-scroll-hover); }
.cl-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

/* Item types the concert's settings leave off the audience list (by default everything except groups, pieces and the interval),
   and rows outside the group chosen in the tabs. */
.cl-item.cl-off { display: none; }

.cl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid transparent;
  border-bottom-color: var(--cl-line);
  border-radius: 4px;
  color: var(--cl-text);
  cursor: pointer;
}
.cl-item:hover { background: var(--cl-glass); }
.cl-item:focus-visible { outline: 1px solid var(--cl-current); outline-offset: -1px; }
.cl-idx { position: relative; flex: 0 0 21px; width: 21px; height: 14px; display: flex; justify-content: center; align-items: center; font-size: 10px; color: var(--cl-past); }
.cl-idx i { display: none; }
.cl-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.cl-line { display: block; }
.cl-name { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.cl-composer { display: inline-block; margin-left: 8px; font-size: 9px; color: var(--cl-past); }
.cl-performers { font-size: 10px; color: var(--cl-past); overflow-wrap: anywhere; }
.cl-desc { font-size: 10px; color: var(--cl-past); overflow-wrap: anywhere; }
.cl-state { display: flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 9px; color: var(--cl-past); }

.cl-item.cl-past { color: var(--cl-past); }
.cl-item.cl-past .cl-idx-n { display: none; }
.cl-item.cl-past .cl-idx::before { content: "✓"; opacity: .7; }

.cl-item.cl-current {
  background: var(--cl-current-soft);
  border-color: var(--cl-line);
  border-left: 2px solid var(--cl-current);
  color: var(--cl-current);
}
.cl-item.cl-current .cl-idx, .cl-item.cl-current .cl-state { color: var(--cl-current); }
.cl-item.cl-current .cl-performers, .cl-item.cl-current .cl-desc { color: var(--cl-text); }
.cl-item.cl-current .cl-idx-n { display: none; }
.cl-item.cl-current .cl-idx { gap: 2px; align-items: flex-end; }
.cl-item.cl-current .cl-idx i { display: block; width: 2px; height: 12px; background: var(--cl-current); animation: cl-wave 1.2s ease-in-out infinite alternate; }
.cl-item.cl-current .cl-idx i:nth-of-type(2) { height: 8px; animation-delay: -.4s; }
.cl-item.cl-current .cl-idx i:nth-of-type(3) { height: 10px; animation-delay: -.8s; }
.cl-item.cl-current .cl-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cl-current); }

/* A group ("A 組") heads the performances that follow it. */
.cl-item[data-type="GROUP"] {
  justify-content: space-between;
  min-height: 0;
  padding: 18px 13px 9px;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  font-size: 11px;
  cursor: default;
}
.cl-item[data-type="GROUP"]:hover { background: transparent; }
.cl-item[data-type="GROUP"] .cl-name { font-size: 11px; }
.cl-item[data-type="GROUP"] .cl-gmeta { display: flex; align-items: baseline; gap: 12px; font-size: 9px; color: var(--cl-past); }
.cl-item[data-type="GROUP"] .cl-desc { font-size: 9px; }
.cl-item[data-type="GROUP"].cl-current { background: transparent; border-left-width: 1px; border-left-color: transparent; color: var(--cl-current); }
.cl-item[data-type="GROUP"].cl-past { color: var(--cl-past); }

.cl-pfoot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 0; padding-top: 15px; border-top: 1px solid var(--cl-line);
  font-size: 9px; color: var(--cl-past);
}
.cl-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cl-legend > span { display: flex; align-items: center; gap: 6px; }
.cl-legend > span::before { content: ""; display: inline-block; width: 4px; height: 4px; border: 1px solid var(--cl-past); border-radius: 50%; }
.cl-legend .cl-lg-done::before { background: var(--cl-past); }
.cl-legend .cl-lg-cur::before { background: var(--cl-current); border-color: var(--cl-current); }

/* ---- song details ---- */
.cl-detail-back {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
  background: var(--cl-backdrop);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cl-detail {
  position: relative; width: 100%; max-width: 480px; padding: 40px;
  background: var(--cl-bg); border: 1px solid var(--cl-line); border-radius: 6px;
}
.cl-detail-x { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; padding: 0; border: 1px solid var(--cl-line); border-radius: 4px; background: transparent; color: var(--cl-past); font-size: 16px; line-height: 1; }
.cl-detail-x:hover { color: var(--cl-current); border-color: var(--cl-current); }
.cl-detail-eyebrow { display: block; font-size: 9px; letter-spacing: 2.8px; color: var(--cl-current); }
.cl-detail-name { margin: 20px 0 10px; font-family: var(--cl-font, var(--cl-serif)); font-weight: 400; font-size: 30px; line-height: 1.4; color: var(--cl-current); overflow-wrap: anywhere; }
.cl-detail p { margin: 0 0 6px; font-size: 13px; color: var(--cl-past); overflow-wrap: anywhere; }
.cl-detail-state { display: block; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--cl-line); font-size: 12px; color: var(--cl-current); }

/* ---- text alignment (settings: 文字對齊). The default keeps the centred title with the left-aligned columns. ---- */
.cl-align-center .cl-now { text-align: center; }
.cl-align-center .cl-live, .cl-align-center .cl-cur-perf, .cl-align-center .cl-next-label { justify-content: center; }
.cl-align-right .cl-title { text-align: right; }
.cl-align-right .cl-t-sub { justify-content: flex-end; }
.cl-align-right .cl-t-sub::before { display: none; }
.cl-align-right .cl-now { text-align: right; }
.cl-align-right .cl-live, .cl-align-right .cl-next-label { justify-content: flex-end; }
.cl-align-right .cl-cur-perf { flex-direction: row-reverse; }
.cl-align-right .cl-eq { margin-left: 0; margin-right: auto; }

@media (min-width: 1500px) {
  .cl-wrap { padding-top: calc(52px + var(--cl-box-top, 0vh)); }
  .cl-title { margin-bottom: 48px; }
  .cl-list { height: 448px; }
}
@media (max-width: 1000px) {
  .cl-wrap { padding-left: 32px; padding-right: 32px; }
  .cl-grid { gap: 38px; }
  .cl-cur-name { font-size: 44px; }
  .cl-composer { display: block; margin-left: 0; }
  .cl-item { min-height: 73px; }
  .cl-item[data-type="GROUP"] { min-height: 0; }
  .cl-list { height: 435px; }
}
@media (max-width: 700px) {
  .cl-wrap { padding-left: 22px; padding-right: 22px; padding-top: calc(29px + var(--cl-box-top, 0vh)); }
  .cl-title { font-size: 29px; margin-bottom: 28px; }
  .cl-grid { display: block; }
  .cl-now { padding-top: 0; text-align: center; }
  .cl-live, .cl-next-label { justify-content: center; }
  .cl-cur-index { margin-top: 24px; }
  .cl-cur-name { font-size: 44px; }
  .cl-cur-composer { font-size: 13px; }
  .cl-cur-perf { margin-top: 20px; text-align: left; }
  .cl-next { margin-top: 24px; padding-top: 18px; }
  .cl-next-name { font-size: 15px; }
  .cl-program { margin-top: 34px; }
  .cl-ph { font-size: 16px; }
  .cl-ph-en { font-size: 7px; }
  .cl-list { height: 410px; }
  .cl-composer { display: inline-block; margin-left: 6px; }
  .cl-state { font-size: 8px; }
  .cl-item { gap: 10px; padding: 11px 9px; min-height: 69px; }
  .cl-item[data-type="GROUP"] { padding: 18px 9px 9px; min-height: 0; }
  .cl-detail { padding: 32px 25px; }
  .cl-align-right .cl-now { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-eq i, .cl-item.cl-current .cl-idx i { animation: none; }
}
