@import url("./full-reading-fonts.css");

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body.reading-recording-page { margin: 0; background: #f3f5f7; color: #1a3046; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.recording-page-shell { width: min(1040px, calc(100% - 40px)); margin: 36px auto 80px; }
.recording-page-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.recording-page-nav a { color: #49647d; text-decoration: none; font-size: 14px; }
.recording-work-heading { margin: 0 0 22px; }
.recording-eyebrow { margin: 0 0 10px; color: #547eac; font-size: 11px; font-weight: 750; letter-spacing: .13em; }
.recording-work-heading h1 { margin: 0; max-width: 850px; font-size: clamp(26px,4vw,40px); line-height: 1.2; letter-spacing: -.02em; }
.recording-meta, .recording-subtle { color: #758697; font-size: 13px; line-height: 1.6; }
.recording-work-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 22px; background: linear-gradient(145deg,#153648,#4b6f83); box-shadow: 0 12px 40px rgba(26,46,63,.12); }
.recording-work-stage > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recording-work-caption { position: absolute; left: 4%; right: 4%; bottom: 6%; padding: clamp(16px,3vw,28px); border-radius: 18px; background: rgba(255,255,255,.94); color: #1c3349; box-shadow: 0 6px 32px rgba(10,24,35,.13); }
#recordingCaption { margin: 0; font-size: clamp(23px,3.3vw,37px); font-weight: 650; line-height: 1.3; text-wrap: balance; }
#recordingTranslation { margin: 12px 0 0; color: #60778a; font-size: clamp(14px,1.6vw,18px); line-height: 1.6; }
.recording-player { margin: 18px 0; padding: 12px 16px; border-radius: 16px; background: #fff; border: 1px solid #e4e9ef; }
.recording-player audio { display: block; width: 100%; }
.recording-work-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 10px; }
.recording-work-actions button, .recording-work-actions a { min-height: 44px; border: 1px solid #d9e2ec; border-radius: 12px; background: #fff; padding: 11px 18px; color: #304f6e; font-size: 14px; font-weight: 650; text-decoration: none; cursor: pointer; }
.recording-work-actions .recording-primary { background: #315f9f; border-color: #315f9f; color: #fff; }
.recording-work-actions button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #90b7e8; outline-offset: 3px; }
.recording-export-status { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 12px 0; color: #657b8f; font-size: 13px; }
.recording-export-status progress { width: 180px; accent-color: #315f9f; }
.recording-transcript { margin-top: 32px; border-top: 1px solid #dce4eb; padding-top: 26px; }
.recording-transcript h2 { margin: 0 0 8px; font-size: 20px; }
.recording-chapter { display: flex; text-align: left; gap: 18px; width: 100%; border: 1px solid transparent; border-bottom-color: #e4e9ef; border-radius: 12px; background: transparent; color: inherit; padding: 18px 14px; cursor: pointer; }
.recording-chapter > span { color: #8394a5; font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 3px; flex: 0 0 42px; }
.recording-chapter small { color: #91a0ad; font-size: 11px; }
.recording-chapter p { margin: 7px 0 0; font-size: 17px; line-height: 1.5; }
.recording-chapter p[lang] { color: #8292a1; font-size: 13px; }
.recording-chapter.is-current { border-color: #d9e5f4; background: #eaf1f9; }
.recording-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.recording-list-card { display: block; padding: 22px; border: 1px solid #e0e6ee; border-radius: 18px; background: #fff; color: inherit; text-decoration: none; }
.recording-list-card h2 { margin: 0 0 14px; font-size: 21px; line-height: 1.3; }
.recording-list-card p { margin: 6px 0; color: #71859a; font-size: 13px; }
.recording-empty { border: 1px dashed #cbd8e6; border-radius: 20px; padding: 38px; background: #fff; color: #71859a; }
#recordingVideoPreview { width: 100%; border-radius: 18px; margin-top: 20px; }
@media (max-width: 640px) {
  .recording-page-shell { width: calc(100% - 28px); margin-top: 22px; }
  .recording-page-nav { margin-bottom: 26px; }
  .recording-work-stage { aspect-ratio: 4 / 5; border-radius: 18px; }
  .recording-work-caption { bottom: 5%; border-radius: 14px; }
  #recordingCaption { font-size: 25px; }
  .recording-work-actions > * { flex: 1 1 140px; text-align: center; }
  .recording-list { grid-template-columns: 1fr; }
  .recording-chapter { gap: 10px; padding: 16px 10px; }
  .recording-chapter p { font-size: 16px; }
}

.recording-camera-replay {
  position: absolute;
  right: 2.2%;
  bottom: 5%;
  width: 16%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.9);
  border-radius: 50%;
  background: #193547;
  box-shadow: 0 6px 24px #0004;
  pointer-events: none;
}
.recording-camera-replay video { width: 100%; height: 100%; display: block; object-fit: cover; transform: scaleX(-1); }
.recording-work-stage.has-recording-camera .recording-work-caption { right: 21%; }
@media (max-width: 640px) {
  .recording-camera-replay { width: 27%; right: 3%; bottom: 4%; border-width: 2px; }
  .recording-work-stage.has-recording-camera .recording-work-caption { right: 4%; bottom: calc(24.25% + 16px); }
}

/* Author-owned presentation. The same tokens are used on public share pages. */
.recording-work-stage { --caption-opacity: .94; --caption-font: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; --caption-weight: 600; }
.recording-work-caption { background: rgba(255,255,255,var(--caption-opacity)); }
#recordingCaption { font-family: var(--caption-font); font-weight: var(--caption-weight); line-height: 1.35; }
.recording-work-stage[data-preset="glass"] .recording-work-caption { border: 1px solid rgba(255,255,255,.45); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 8px 32px #0e24351a; }
.recording-work-stage[data-preset="paper"] .recording-work-caption { background: rgba(251,242,223,var(--caption-opacity)); color: #3d3025; border-radius: 8px; }
.recording-work-stage[data-preset="cinema"] .recording-work-caption { background: rgba(12,23,34,var(--caption-opacity)); border-radius: 8px; box-shadow: none; }
.recording-work-stage.is-text-on-image .recording-work-caption { color: white; text-shadow: 0 2px 8px #000,0 0 24px #0009; }
.recording-work-stage.is-text-on-image #recordingTranslation { color: #f0f1f2; }
.hide-chinese #recordingTranslation, .hide-chinese .recording-chapter p[lang] { display: none; }
.recording-style-card { margin: 22px 0; padding: 26px; border: 1px solid #dce4eb; border-radius: 20px; background: linear-gradient(125deg,#fff 55%,#f4f7f6); color: #20384b; }
.recording-style-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.recording-style-eyebrow { margin: 0 0 8px; color: #648177; letter-spacing: .16em; font-size: 10px; font-weight: 700; }
.recording-style-head h2 { font-size: 20px; margin: 0 0 8px; }
.recording-style-head p:not(.recording-style-eyebrow) { margin: 0; color: #657b89; font-size: 13px; line-height: 1.6; }
.recording-style-preview-badge { flex: 0 0 auto; background: #e9f1ed; color: #527463; font-size: 11px; border-radius: 999px; padding: 6px 10px; }
.recording-style-presets { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; border: 0; padding: 0; margin: 0 0 26px; }
.recording-style-presets legend { margin-bottom: 12px; color: #657b89; font-size: 12px; }
.recording-style-presets button { border: 1px solid #dce5e4; background: #fff; color: #536875; border-radius: 12px; padding: 6px 6px 10px; font-size: 12px; cursor: pointer; }
.recording-style-presets button[aria-pressed="true"] { border-color: #526e60; background: #f0f5f2; color: #304d40; box-shadow: 0 0 0 1px #526e60; }
.recording-style-swatch { display: grid; place-items: end center; height: 64px; margin-bottom: 8px; border-radius: 7px; padding: 9px; background: linear-gradient(145deg,#bec8ac,#7d968d 48%,#c3b08f); }
.recording-style-swatch > span { width: 88%; padding: 3px; border-radius: 4px; font: 23px "Full Reading Comfortaa",sans-serif; color: #263e43; background: #ffffffa8; }
.recording-style-swatch[data-look="cinema"] > span { background: #0c17224a; color: white; font-family: "Full Reading Nunito",sans-serif; text-shadow: 0 1px 4px #000; }
.recording-style-swatch[data-look="paper"] > span { background: #fbf2dfd6; color: #3d3025; font-family: Georgia,serif; }
.recording-style-swatch[data-look="classic"] > span { background: #fffffff0; font-family: "Full Reading Nunito",sans-serif; font-weight: 600; }
.recording-style-controls { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 24px; align-items: start; }
.recording-style-controls > label { display: block; color: #566e7b; font-size: 13px; line-height: 1.6; }
.recording-style-controls select { margin-top: 9px; min-height: 44px; width: 100%; padding: 0 12px; border: 1px solid #d3dfdc; background: #fff; color: #2d463c; border-radius: 9px; font-size: 14px; }
.recording-style-controls input[type="range"] { display: block; width: 100%; height: 32px; margin: 10px 0 0; accent-color: #597568; }
.recording-style-controls output { float: right; color: #587667; font-variant-numeric: tabular-nums; }
.recording-style-range-hints { display: flex; justify-content: space-between; font-size: 11px; color: #7c8c91; }
.recording-style-chinese > span { display: block; }
.recording-style-chinese > span + span { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 9px; color: #2d463c; }
.recording-style-chinese input { width: 20px; height: 20px; accent-color: #597568; }
.recording-style-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 20px; margin-top: 22px; border-top: 1px solid #e3eae6; }
.recording-style-footer p { margin: 0; max-width: 470px; font-size: 12px; color: #6c7e85; line-height: 1.6; }
.recording-style-footer > div { display: flex; gap: 8px; flex-shrink: 0; }
.recording-style-footer button { border: 1px solid #d8e2dc; border-radius: 9px; background: #fff; color: #526b5d; padding: 10px 14px; min-height: 44px; cursor: pointer; }
.recording-style-footer .recording-primary { background: #526e60; border-color: #526e60; color: #fff; }
.recording-style-footer button:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) {
  .recording-style-card { padding: 20px 16px; }
  .recording-style-presets { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .recording-style-controls { grid-template-columns: 1fr; gap: 18px; }
  .recording-style-footer { align-items: stretch; flex-direction: column; }
  .recording-style-footer > div { justify-content: flex-end; }
}

.recording-work-stage { container-type: inline-size; --logo-size: 17; --logo-space: 0px; }
.recording-work-logo { position: absolute; top: 3.5%; right: 3.5%; width: calc(var(--logo-size) * 1%); padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; pointer-events: none; filter: drop-shadow(0 0 2px rgba(255,255,255,.5)); }
.recording-work-stage[data-logo-position="top-left"] .recording-work-logo { left: 3.5%; right: auto; }
.recording-work-stage[data-logo-position="bottom-left"] .recording-work-logo { top: auto; bottom: 3.5%; left: 3.5%; right: auto; }
.recording-work-stage[data-logo-position="bottom-right"] .recording-work-logo { top: auto; bottom: 3.5%; }
.recording-work-stage.has-bottom-logo { --logo-space: calc(var(--logo-size) * .333333cqw + 12px); }
.recording-work-caption { bottom: calc(6% + var(--logo-space)); }
.recording-camera-replay { bottom: calc(5% + var(--logo-space)); }
.recording-work-logo img { display: block; width: 100%; height: auto; }
.recording-work-stage.hide-logo .recording-work-logo,
.recording-work-stage.hide-camera .recording-camera-replay { display: none; }
.recording-work-stage.has-recording-camera.hide-camera .recording-work-caption { right: 4%; }
.recording-style-controls small { display: block; color: #7b8d91; font-size: 11px; line-height: 1.6; }
@media (max-width: 640px) {
  .recording-work-stage.has-recording-camera .recording-work-caption { bottom: calc(24.25% + 16px + var(--logo-space)); }
  .recording-work-stage.has-recording-camera.hide-camera .recording-work-caption { bottom: calc(5% + var(--logo-space)); }
  .recording-camera-replay { bottom: calc(4% + var(--logo-space)); }
}

.recording-work-stage[data-logo-tone="white"] .recording-work-logo { filter: drop-shadow(0 0 2px rgba(0,0,0,.35)); }
