/* Final cascade: quiet identity, native language labels, and compact BGM controls. */

/* The editorial portrait uses the same restrained 1px framing grammar as the
   rest of the story; the luminous reveal belongs to the ritual alone. */
.angel-frame {
  isolation: isolate;
  overflow: hidden;
  border-radius: 12px;
  background: #15120f;
  box-shadow: 0 0 0 1px rgb(255 250 239 / 12%);
}

.angel-frame::before {
  position: absolute;
  z-index: 1;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse 48% 72% at 72% 48%,
    rgb(255 255 250 / 18%) 0,
    rgb(255 244 215 / 8%) 43%,
    transparent 72%
  );
  content: "";
  pointer-events: none;
  mix-blend-mode: screen;
}

.angel-frame::after {
  z-index: 1;
  background:
    linear-gradient(to right, rgb(18 15 12 / 10%) 54%, transparent 76%),
    linear-gradient(to bottom, transparent 76%, var(--bg) 102%);
  box-shadow: inset 0 0 38px 8px rgb(16 13 11 / 42%);
}

.angel-frame > img {
  filter: saturate(0.88) contrast(1.04) brightness(0.98);
  -webkit-mask-image: radial-gradient(ellipse 103% 100% at 50% 50%, #000 74%, rgb(0 0 0 / 92%) 88%, transparent 100%);
  mask-image: radial-gradient(ellipse 103% 100% at 50% 50%, #000 74%, rgb(0 0 0 / 92%) 88%, transparent 100%);
}

.angel-overlay {
  z-index: 2;
  filter: drop-shadow(0 2px 14px rgb(244 231 204 / 36%));
}

/* The event-summary artwork is intentionally nocturnal and documentary,
   unlike the luminous ritual. Keep its short overlay readable without
   turning the image into another heaven scene. */
.angel-story {
  color: #f2eadb;
  text-shadow: 0 2px 18px rgb(0 0 0 / 82%);
}

.angel-action {
  border-color: rgb(211 83 83 / 78%);
  color: #e58a86;
  text-shadow: 0 2px 12px rgb(0 0 0 / 72%);
}

.angel-action:hover,
.angel-action:focus-visible {
  border-color: #f1aca5;
  color: #f1aca5;
}
.brand {
  gap: 10px;
}

.brand-mark {
  position: relative;
  display: block;
  width: 17px;
  height: 29px;
  flex: 0 0 17px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.brand-mark::before {
  position: absolute;
  top: 0;
  left: 3px;
  width: 11px;
  height: 18px;
  border-radius: 76% 24% 68% 32% / 72% 64% 36% 28%;
  background: linear-gradient(155deg, #f5d585 4%, #dca541 50%, #8b5b1b 100%);
  box-shadow: 0 0 12px rgb(225 176 74 / 22%);
  content: "";
  transform: rotate(9deg);
}

.brand-mark::after {
  position: absolute;
  bottom: 1px;
  left: 8px;
  width: 1px;
  height: 11px;
  background: linear-gradient(#c88e31, transparent);
  content: "";
}

.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  align-items: center;
  gap: 9px;
}

.language-switch-label {
  color: rgb(241 236 225 / 58%);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.25;
  white-space: nowrap;
}

.language-menu summary {
  min-width: 0;
  height: 34px;
  padding: 0 9px 0 11px;
  border: 1px solid rgb(241 236 225 / 16%);
  border-radius: 7px;
  gap: 7px;
  color: rgb(241 236 225 / 90%);
  background: rgb(15 13 11 / 40%);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.language-menu summary:hover,
.language-menu[open] summary {
  border-color: rgb(229 185 95 / 46%);
  background: rgb(27 23 19 / 94%);
}

.language-glyph {
  display: none !important;
}

.language-chevron {
  color: rgb(229 185 95 / 72%);
  font-size: 10px;
}

.language-options {
  width: 248px;
  padding: 8px;
  border: 1px solid rgb(229 185 95 / 20%);
  border-radius: 10px;
  background: rgb(18 15 12 / 98%);
  box-shadow: 0 20px 52px rgb(0 0 0 / 55%);
  gap: 2px 7px;
}

.language-options button {
  min-height: 38px;
  border-radius: 5px;
  font-size: 11.5px;
  letter-spacing: 0.025em;
}

.ritual-meta .sound-module {
  display: grid;
  width: min(100%, 520px);
  min-width: 0;
  margin: 0 0 0 auto;
  padding: 8px 0 8px 18px;
  border: 0;
  border-left: 1px solid rgb(225 176 74 / 18%);
  align-items: center;
  grid-template-columns: 34px minmax(94px, 0.72fr) minmax(150px, 1fr);
  gap: 5px 12px;
  background: transparent;
}

.ritual-meta .sound-toggle {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgb(225 176 74 / 34%);
  border-radius: 50%;
  place-items: center;
  color: #e5b95f;
  background: rgb(225 176 74 / 5%);
  box-shadow: none;
}

.ritual-meta .sound-toggle:hover,
.ritual-meta .sound-toggle:focus-visible,
.ritual-meta .sound-toggle.playing {
  border-color: rgb(229 185 95 / 70%);
  color: #fff0bf;
  background: rgb(225 176 74 / 11%);
}

.ritual-meta .sound-toggle-glyph {
  width: auto;
  height: auto;
  font-size: 11px;
  line-height: 1;
  transform: translateX(1px);
}

.ritual-meta .sound-head {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ritual-meta .sound-head b {
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgb(241 236 225 / 46%);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.25;
  transform: none;
}

.ritual-meta [data-sound-toggle-label] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.ritual-meta .sound-track-name {
  overflow: hidden;
  color: rgb(241 236 225 / 90%);
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ritual-meta .sound-picker {
  position: relative;
  display: block;
  min-width: 0;
}

.ritual-meta .sound-picker::after {
  position: absolute;
  top: 50%;
  right: 3px;
  color: rgb(229 185 95 / 68%);
  content: "⌄";
  font-size: 11px;
  pointer-events: none;
  transform: translateY(-56%);
}

.ritual-meta .sound-picker select {
  width: 100%;
  height: 30px;
  padding: 0 20px 0 2px;
  border: 0;
  border-bottom: 1px solid rgb(241 236 225 / 17%);
  border-radius: 0;
  outline: 0;
  color: rgb(241 236 225 / 72%);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  appearance: none;
}

.ritual-meta .sound-picker select:hover,
.ritual-meta .sound-picker select:focus-visible {
  border-bottom-color: rgb(229 185 95 / 62%);
  color: #f1ece1;
}

.ritual-meta .sound-picker select option {
  color: #efe9dc;
  background: #17130f;
}

.ritual-meta .sound-controls {
  display: flex;
  min-width: 0;
  grid-column: 2 / 4;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
}

.ritual-meta .sound-volume {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: rgb(241 236 225 / 42%);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.ritual-meta .sound-volume input {
  width: clamp(64px, 8vw, 96px);
  height: 16px;
  accent-color: #dca541;
}

.ritual-meta .sound-status {
  display: inline;
  color: rgb(241 236 225 / 34%);
  font-size: 8.5px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .brand-mark {
    width: 15px;
    height: 26px;
    flex-basis: 15px;
  }

  .brand-mark::before {
    left: 3px;
    width: 9px;
    height: 15px;
  }

  .brand-mark::after {
    left: 7px;
    height: 10px;
  }

  .language-switch {
    gap: 6px;
  }

  .language-switch-label {
    max-width: 76px;
    font-size: 8.5px;
    letter-spacing: 0.045em;
    text-align: right;
    white-space: normal;
  }

  .language-menu summary {
    height: 32px;
    padding-inline: 9px 7px;
    font-size: 10px;
  }

  .language-options {
    width: min(82vw, 238px);
  }

  .ritual-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ritual-meta .sound-module {
    width: 100%;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid rgb(225 176 74 / 15%);
    border-left: 0;
    grid-template-columns: 34px minmax(0, 1fr) minmax(112px, 0.9fr);
    gap: 6px 9px;
  }

  .ritual-meta .sound-track-name {
    font-size: 12px;
  }

  .ritual-meta .sound-picker select {
    font-size: 9.5px;
  }

  .ritual-meta .sound-controls {
    grid-column: 2 / 4;
  }

  .ritual-meta .sound-status {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark::before,
  .ritual-meta .sound-toggle {
    transition: none;
  }
}

/* 68 — Quiet soundtrack capsule.
   One composed object instead of a full-width engineering toolbar. */
.site-bgm-bar {
  padding-block: 5px;
  border-top-color: rgb(241 236 225 / 5%);
  background: rgb(11 9 7 / 97%);
}

.site-bgm-inner {
  display: flex;
  width: min(calc(100% - var(--gutter) * 2), var(--w-frame));
  min-height: 0;
  margin-inline: auto;
  justify-content: center;
}

.site-bgm-capsule {
  width: min(100%, 610px);
  padding: 5px 10px 4px;
  border: 1px solid rgb(229 185 95 / 14%);
  border-radius: 13px;
  background:
    linear-gradient(110deg, rgb(229 185 95 / 3%), transparent 34%),
    rgb(20 16 12 / 86%);
  box-shadow: 0 8px 20px rgb(0 0 0 / 14%);
}

.site-bgm-main {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.site-bgm-label {
  position: relative;
  padding-right: 11px;
  color: rgb(229 185 95 / 78%);
  font-size: 8.5px;
  letter-spacing: 0.2em;
}

.site-bgm-label::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 15px;
  background: rgb(241 236 225 / 12%);
  content: "";
  transform: translateY(-50%);
}

.site-bgm-transport,
.site-bgm-modes {
  gap: 1px;
}

.site-bgm-transport button,
.site-bgm-modes button {
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border-color: transparent;
  border-radius: 50%;
  color: rgb(241 236 225 / 58%);
}

.site-bgm-transport button:hover,
.site-bgm-transport button:focus-visible,
.site-bgm-modes button:hover,
.site-bgm-modes button:focus-visible {
  border-color: transparent;
  background: rgb(241 236 225 / 6%);
}

.site-bgm-transport .sound-toggle {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-color: rgb(229 185 95 / 42%);
  background: rgb(229 185 95 / 5%);
}

.site-bgm-transport .sound-toggle:hover,
.site-bgm-transport .sound-toggle:focus-visible,
.site-bgm-transport .sound-toggle.playing {
  border-color: rgb(229 185 95 / 72%);
  background: rgb(229 185 95 / 11%);
}

.site-bgm-picker {
  width: clamp(138px, 15vw, 186px);
  margin-inline: 3px 5px;
}

.site-bgm-picker select {
  height: 29px;
  padding-inline: 9px 23px;
  border: 0;
  border-left: 1px solid rgb(241 236 225 / 11%);
  border-radius: 0;
  color: rgb(241 236 225 / 82%);
  font-size: 10.5px;
}

.site-bgm-picker select:hover,
.site-bgm-picker select:focus-visible {
  border-left-color: rgb(229 185 95 / 48%);
}

.site-bgm-modes {
  padding-left: 5px;
  border-left: 1px solid rgb(241 236 225 / 11%);
}

.site-bgm-modes button {
  position: relative;
  display: inline-grid;
  width: 27px;
  min-width: 27px;
  padding: 0;
  place-items: center;
}

.site-bgm-modes button span:first-child {
  font-size: 10px;
}

.site-bgm-modes button span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-bgm-modes button.active::after {
  position: absolute;
  right: 1px;
  bottom: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e4b453;
  content: "";
}

.site-bgm-volume {
  width: 62px;
  margin-left: 2px;
}

.site-bgm-volume input::-webkit-slider-runnable-track {
  height: 2px;
}

.site-bgm-volume input::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -4px;
}

.site-bgm-meta {
  display: flex;
  min-height: 13px;
  margin-top: 1px;
  padding-left: 72px;
  align-items: center;
}

.site-bgm-note {
  max-width: none;
  color: rgb(241 236 225 / 42%);
  font-size: 8.5px;
  line-height: 1.3;
  letter-spacing: 0.035em;
  text-align: left;
}

@media (max-width: 720px) {
  .site-bgm-bar {
    padding-block: 4px;
  }

  .site-bgm-inner {
    width: min(calc(100% - 20px), 390px);
    padding: 0;
  }

  .site-bgm-capsule {
    width: 100%;
    padding: 5px 7px 4px;
    border-radius: 11px;
  }

  .site-bgm-main {
    width: 100%;
    gap: 2px;
  }

  .site-bgm-label {
    flex: 0 0 auto;
    padding-right: 7px;
    font-size: 7.5px;
  }

  .site-bgm-label::after {
    height: 13px;
  }

  .site-bgm-transport {
    gap: 0;
  }

  .site-bgm-transport button,
  .site-bgm-modes button {
    min-width: 25px;
    height: 25px;
    padding: 0 4px;
  }

  .site-bgm-transport .sound-toggle {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }

  .site-bgm-picker {
    flex: 1 1 auto;
    width: auto;
    min-width: 58px;
    margin-inline: 1px 2px;
  }

  .site-bgm-picker select {
    width: 100%;
    height: 27px;
    padding-inline: 6px 15px;
    font-size: 9px;
  }

  .site-bgm-picker::after {
    right: 2px;
    font-size: 8px;
  }

  .site-bgm-modes {
    gap: 0;
    padding-left: 2px;
  }

  .site-bgm-modes button {
    width: 24px;
    min-width: 24px;
  }

  .site-bgm-volume {
    width: clamp(36px, 11vw, 48px);
    margin-left: 1px;
  }

  .site-bgm-meta {
    min-height: 11px;
    margin-top: 0;
    padding-left: 58px;
  }

  .site-bgm-note {
    order: initial;
    flex: initial;
    max-width: none;
    font-size: 7.5px;
    line-height: 1.25;
    text-align: left;
  }
}

@media (max-width: 350px) {
  .site-bgm-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .site-bgm-meta {
    padding-left: 46px;
  }

  .site-bgm-transport button {
    min-width: 23px;
  }

  .site-bgm-transport .sound-toggle {
    width: 28px;
    min-width: 28px;
    height: 28px;
  }

  .site-bgm-modes button {
    width: 22px;
    min-width: 22px;
  }

  .site-bgm-volume {
    width: 34px;
  }
}

/* ── 47 · 全站 BGM：一條安靜的頁首音軌，不再佔用祈福段落 ── */
.site-bgm-bar {
  border-top: 1px solid rgb(241 236 225 / 7%);
  background:
    linear-gradient(90deg, transparent, rgb(229 185 95 / 4%) 48%, transparent),
    rgb(12 10 8 / 96%);
}

.site-bgm-inner {
  display: flex;
  width: min(calc(100% - var(--gutter) * 2), var(--w-frame));
  min-height: 40px;
  margin: auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: rgb(241 236 225 / 72%);
}

.site-bgm-label {
  color: #e4b453;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.site-bgm-transport,
.site-bgm-modes {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.site-bgm-transport button,
.site-bgm-modes button {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid rgb(229 185 95 / 18%);
  border-radius: 999px;
  place-items: center;
  color: rgb(241 236 225 / 62%);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  line-height: 1;
  flex: 0 0 auto;
  margin: 0;
  transform: none;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.site-bgm-transport button:hover,
.site-bgm-transport button:focus-visible,
.site-bgm-modes button:hover,
.site-bgm-modes button:focus-visible,
.site-bgm-modes button.active {
  border-color: rgb(229 185 95 / 52%);
  color: #f8df9e;
  background: rgb(229 185 95 / 9%);
}

.site-bgm-transport .sound-toggle {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-color: rgb(229 185 95 / 38%);
  color: #e9bd62;
  transform: none;
}

.site-bgm-transport .sound-toggle-glyph {
  transform: none;
}

.site-bgm-transport .sound-toggle.playing {
  border-color: rgb(229 185 95 / 70%);
  color: #fff0bd;
  background: rgb(229 185 95 / 12%);
}

.site-bgm-skip span {
  font-size: 8px;
}

.site-bgm-picker {
  position: relative;
  flex: 0 1 auto;
  width: clamp(118px, 14vw, 168px);
  min-width: 0;
}

.site-bgm-picker::after {
  position: absolute;
  top: 50%;
  right: 7px;
  color: rgb(229 185 95 / 62%);
  content: "⌄";
  font-size: 9px;
  pointer-events: none;
  transform: translateY(-58%);
}

.site-bgm-picker select {
  width: 100%;
  height: 28px;
  padding: 0 24px 0 9px;
  border: 0;
  border-bottom: 1px solid rgb(241 236 225 / 17%);
  border-radius: 0;
  color: rgb(241 236 225 / 82%);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  text-overflow: ellipsis;
  appearance: none;
}

.site-bgm-picker select:hover,
.site-bgm-picker select:focus-visible {
  border-bottom-color: rgb(229 185 95 / 60%);
  color: #f4eee3;
}

.site-bgm-picker option {
  color: #efe9dc;
  background: #17130f;
}

.site-bgm-modes button {
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}

.site-bgm-modes button span:last-child {
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.site-bgm-volume {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: 72px;
}

.site-bgm-volume input {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.site-bgm-volume input::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(225 173 69 / 78%), rgb(225 173 69 / 22%));
}

.site-bgm-volume input::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 1px solid rgb(255 231 172 / 72%);
  border-radius: 50%;
  appearance: none;
  background: #dfa93d;
  box-shadow: 0 1px 5px rgb(0 0 0 / 38%);
}

.site-bgm-volume input::-moz-range-track {
  height: 3px;
  border: 0;
  border-radius: 999px;
  background: rgb(225 173 69 / 28%);
}

.site-bgm-volume input::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: rgb(225 173 69 / 78%);
}

.site-bgm-volume input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 1px solid rgb(255 231 172 / 72%);
  border-radius: 50%;
  background: #dfa93d;
  box-shadow: 0 1px 5px rgb(0 0 0 / 38%);
}

.site-bgm-enable {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgb(229 185 95 / 42%);
  border-radius: 999px;
  align-items: center;
  gap: 5px;
  color: #f2d58f;
  background: rgb(229 185 95 / 8%);
  cursor: pointer;
  font: inherit;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-bgm-enable[hidden] {
  display: none;
}

.site-bgm-enable:hover,
.site-bgm-enable:focus-visible {
  border-color: rgb(229 185 95 / 72%);
  color: #fff0bd;
  background: rgb(229 185 95 / 14%);
}

.site-bgm-note {
  max-width: 25ch;
  color: rgb(241 236 225 / 54%);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.025em;
}

@media (max-width: 980px) {
  html {
    scroll-padding-top: 170px;
  }

  .section-nav {
    top: 104px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 158px;
  }

  .site-bgm-inner {
    min-height: 44px;
    padding-block: 4px;
    flex-wrap: wrap;
    gap: 5px;
  }

  .site-bgm-note {
    order: 10;
    flex: 1 0 100%;
    max-width: none;
    font-size: 8.5px;
    line-height: 1.35;
    text-align: right;
  }

  .site-bgm-label {
    font-size: 8.5px;
    letter-spacing: 0.12em;
  }

  .site-bgm-transport {
    gap: 2px;
  }

  .site-bgm-transport button,
  .site-bgm-modes button {
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
  }

  .site-bgm-transport .sound-toggle {
    width: 28px;
    min-width: 28px;
    height: 28px;
  }

  .site-bgm-picker {
    flex: 0 1 auto;
    width: clamp(82px, 25vw, 102px);
    min-width: 0;
  }

  .site-bgm-picker select {
    height: 27px;
    padding-inline: 6px 18px;
    font-size: 9.5px;
  }

  .site-bgm-picker::after {
    right: 3px;
  }

  .site-bgm-modes {
    gap: 2px;
  }

  .site-bgm-bar.needs-gesture .site-bgm-modes {
    display: none;
  }

  .site-bgm-enable {
    min-height: 25px;
    padding-inline: 8px;
    font-size: 8.5px;
  }

  .site-bgm-modes button span:last-child {
    display: none;
  }

  .site-bgm-volume {
    display: inline-flex;
    width: 44px;
  }

  .section-nav {
    top: 104px;
  }
}

@media (max-width: 360px) {
  .site-bgm-inner {
    gap: 3px;
  }

  .site-bgm-label {
    font-size: 8px;
  }

  .site-bgm-picker {
    width: 74px;
  }

  .site-bgm-transport button,
  .site-bgm-modes button {
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
  }

  .site-bgm-transport .sound-toggle {
    width: 26px;
    min-width: 26px;
    height: 26px;
  }

  .site-bgm-volume {
    width: 38px;
  }
}

/* 48 · 手機事實帶：三列共用同一數字欄，日期不再把說明推向右側。 */
@media (max-width: 720px) {
  .fact-rail article {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
  }

  .fact-rail strong {
    width: auto;
    min-width: 0;
    padding-top: 1px;
    font-size: 31px;
    line-height: 1.15;
  }

  .fact-rail article > div {
    min-width: 0;
    padding-left: 13px;
  }

  .fact-rail b {
    padding-top: 3px;
    line-height: 1.35;
  }
}

@media (max-width: 360px) {
  .fact-rail article {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .fact-rail strong {
    font-size: 29px;
  }

  .fact-rail article > div {
    padding-left: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-bgm-transport button,
  .site-bgm-modes button,
  .site-bgm-enable {
    transition: none;
  }
}

/* 68-final — cascade lock for the composed BGM capsule. */
.site-bgm-bar {
  padding-block: 5px;
  border-top-color: rgb(241 236 225 / 5%);
  background: rgb(11 9 7 / 97%);
}

.site-bgm-inner {
  display: flex;
  width: min(calc(100% - var(--gutter) * 2), var(--w-frame));
  min-height: 0;
  margin-inline: auto;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.site-bgm-label {
  padding-right: 11px;
  color: rgb(229 185 95 / 78%);
  font-size: 8.5px;
  letter-spacing: 0.2em;
}

.site-bgm-transport,
.site-bgm-modes {
  gap: 1px;
}

.site-bgm-transport button,
.site-bgm-modes button {
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border-color: transparent;
  border-radius: 50%;
  color: rgb(241 236 225 / 58%);
}

.site-bgm-transport button:hover,
.site-bgm-transport button:focus-visible,
.site-bgm-modes button:hover,
.site-bgm-modes button:focus-visible {
  border-color: transparent;
  background: rgb(241 236 225 / 6%);
}

.site-bgm-transport .sound-toggle {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-color: rgb(229 185 95 / 42%);
  background: rgb(229 185 95 / 5%);
}

.site-bgm-transport .sound-toggle:hover,
.site-bgm-transport .sound-toggle:focus-visible,
.site-bgm-transport .sound-toggle.playing {
  border-color: rgb(229 185 95 / 72%);
  background: rgb(229 185 95 / 11%);
}

.site-bgm-picker {
  flex: 0 1 auto;
  width: clamp(138px, 15vw, 186px);
  min-width: 0;
  margin-inline: 3px 5px;
}

.site-bgm-picker select {
  width: 100%;
  height: 29px;
  padding-inline: 9px 23px;
  border: 0;
  border-left: 1px solid rgb(241 236 225 / 11%);
  border-radius: 0;
  color: rgb(241 236 225 / 82%);
  font-size: 10.5px;
}

.site-bgm-picker select:hover,
.site-bgm-picker select:focus-visible {
  border-bottom-color: transparent;
  border-left-color: rgb(229 185 95 / 48%);
}

.site-bgm-modes {
  padding-left: 5px;
  border-left: 1px solid rgb(241 236 225 / 11%);
}

.site-bgm-modes button {
  display: inline-grid;
  width: 27px;
  min-width: 27px;
  padding: 0;
  place-items: center;
}

.site-bgm-modes button span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-bgm-volume {
  display: inline-flex;
  width: 62px;
  margin-left: 2px;
}

.site-bgm-volume input::-webkit-slider-runnable-track {
  height: 2px;
}

.site-bgm-volume input::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -4px;
}

.site-bgm-note {
  order: initial;
  flex: initial;
  max-width: none;
  color: rgb(241 236 225 / 42%);
  font-size: 8.5px;
  line-height: 1.3;
  letter-spacing: 0.035em;
  text-align: left;
}

@media (max-width: 720px) {
  .site-bgm-bar {
    padding-block: 4px;
  }

  .site-bgm-inner {
    width: min(calc(100% - 20px), 390px);
    min-height: 0;
    padding: 0;
    flex-wrap: nowrap;
  }

  .site-bgm-label {
    padding-right: 7px;
    font-size: 7.5px;
  }

  .site-bgm-transport {
    gap: 0;
  }

  .site-bgm-transport button,
  .site-bgm-modes button {
    min-width: 25px;
    height: 25px;
    padding: 0 4px;
  }

  .site-bgm-transport .sound-toggle {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }

  .site-bgm-picker {
    flex: 1 1 auto;
    width: auto;
    min-width: 58px;
    margin-inline: 1px 2px;
  }

  .site-bgm-picker select {
    height: 27px;
    padding-inline: 6px 15px;
    font-size: 9px;
  }

  .site-bgm-modes {
    display: inline-flex;
    gap: 0;
    padding-left: 2px;
  }

  .site-bgm-bar.needs-gesture .site-bgm-modes {
    display: inline-flex;
  }

  .site-bgm-modes button {
    width: 24px;
    min-width: 24px;
  }

  .site-bgm-volume {
    width: clamp(36px, 11vw, 48px);
    margin-left: 1px;
  }

  .site-bgm-note {
    font-size: 7.5px;
    line-height: 1.25;
    text-align: left;
  }
}

@media (max-width: 350px) {
  .site-bgm-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .site-bgm-transport button {
    min-width: 23px;
  }

  .site-bgm-transport .sound-toggle {
    width: 28px;
    min-width: 28px;
    height: 28px;
  }

  .site-bgm-modes button {
    width: 22px;
    min-width: 22px;
  }

  .site-bgm-volume {
    width: 34px;
  }
}
