/* The topic's recap in pictures (views/includes/iq-recap.ejs, public/js/recap-player.js).
 * Loaded only when hub.recap is set. The entry card uses the hub's --iq-* tokens
 * so it reads as the same page; the player is a full-screen modal whose stage
 * takes the loop's own ground colour, so the picture's edge disappears. */

/* ---- entry card ---- */
.rc-entry { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 24px; align-items: center; background: var(--iq-card); border: 1px solid var(--iq-rule); border-radius: 16px; padding: 22px 26px; margin: 0 0 26px; }
.rc-entry-art { position: relative; display: block; width: 148px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; border: 1px solid var(--iq-rule); background: #F3F1EA; padding: 0; cursor: pointer; }
.rc-entry-art img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.rc-entry-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: var(--iq-ink); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.rc-entry-play svg { margin-left: 2px; }
.rc-entry-art:hover .rc-entry-play { background: var(--iq-accent, #E8530E); }
.rc-entry-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rc-kicker { font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 11.5px; letter-spacing: 1.15px; text-transform: uppercase; color: var(--iq-ink3); }
.rc-draft { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 6px; background: #FBE7DA; color: #A8400A; letter-spacing: .6px; }
.rc-entry-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.4px; line-height: 1.15; color: var(--iq-ink); }
.rc-entry-sub { margin: 0; font-size: 16px; line-height: 1.5; color: var(--iq-ink2); max-width: 640px; }
.rc-entry-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.rc-entry-meta { font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 12.5px; color: var(--iq-ink3); }
.rc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 12px; font-size: 15.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--iq-rule, #d9d6cc); background: var(--iq-card, #fff); color: var(--iq-ink, #141412); font-family: inherit; }
.rc-btn--dark { background: var(--iq-ink, #141412); color: #fff; border-color: transparent; }
.rc-btn:disabled { opacity: .4; cursor: default; }
@media (max-width: 640px) {
   .rc-entry { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 18px; }
   .rc-entry-art { width: 96px; }
   .rc-entry-play { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
   .rc-entry-title { font-size: 20px; }
   .rc-entry-sub { font-size: 15px; }
}

/* ---- the Recap tab ---- */
.rc-tab { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 8px; }
.rc-tab-art { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.rc-entry-art--tab { width: 220px; }
.rc-entry-art--tab .rc-entry-play { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
.rc-tab-play { width: 220px; }
.rc-contents { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rc-contents-item { border-top: 1px solid var(--iq-rule); padding: 14px 0 16px; }
.rc-contents-item:last-child { border-bottom: 1px solid var(--iq-rule); }
.rc-contents-chapter { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; width: 100%; padding: 4px 6px; border: 0; border-radius: 10px; background: transparent; text-align: left; font: inherit; color: var(--iq-ink); cursor: pointer; }
.rc-contents-chapter:hover { background: var(--iq-card); }
.rc-contents-n { font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 12.5px; color: var(--iq-ink3); }
.rc-contents-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-contents-name { font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.rc-contents-purpose { font-size: 14.5px; color: var(--iq-ink3); }
.rc-contents-count { font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 12.5px; color: var(--iq-ink3); }
.rc-contents-pictures { list-style: none; margin: 8px 0 0 52px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rc-contents-picture { padding: 6px 12px; border: 1px solid var(--iq-rule); border-radius: 999px; background: var(--iq-card); font: inherit; font-size: 14px; font-weight: 600; color: var(--iq-ink2); cursor: pointer; }
.rc-contents-picture:hover { border-color: var(--iq-ink); color: var(--iq-ink); }
@media (max-width: 760px) {
   .rc-tab { grid-template-columns: minmax(0, 1fr); gap: 22px; }
   .rc-tab-art { flex-direction: row; flex-wrap: wrap; align-items: center; }
   .rc-entry-art--tab { width: 120px; }
   .rc-entry-art--tab .rc-entry-play { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
   .rc-tab-play { width: auto; }
   .rc-contents-pictures { margin-left: 0; }
   .rc-contents-name { font-size: 17px; }
}

/* ---- Pro (the first chapter is free) ---- */
.rc-btn--accent { background: var(--iq-accent, #E8530E); color: #fff; border-color: transparent; text-decoration: none; }
.rc-btn--accent:hover { filter: brightness(.95); }
.rc-pro-tag, .rc-free-tag { display: inline-block; vertical-align: middle; padding: 1px 7px; border-radius: 6px; font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 11px; font-weight: 400; letter-spacing: .6px; text-transform: uppercase; }
.rc-pro-tag { background: #141412; color: #fff; }
.rc-free-tag { background: #E3EDE4; color: #2F5D3A; }
.rc-gate-line { margin: 10px 0 0; font-size: 15.5px; color: var(--iq-ink2); }
.rc-signin { font-size: 14px; font-weight: 600; color: var(--iq-ink2, #3E3D37); text-decoration: underline; text-underline-offset: 3px; }
.rc-contents-item.is-locked .rc-contents-picture { color: var(--iq-ink3); background: transparent; border-style: dashed; }
.rc-locked { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; cursor: default; }
.rc-locked-icon { width: 52px; height: 52px; border-radius: 50%; background: #141412; color: #fff; display: flex; align-items: center; justify-content: center; }
.rc-locked-title { margin: 6px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; color: #141412; max-width: 520px; }
.rc-locked-sub { margin: 0 0 6px; font-size: 16px; line-height: 1.5; color: #55544D; max-width: 440px; }
.rc-locked .rc-signin { color: #55544D; }

/* ---- the player ---- */
body.rc-lock { overflow: hidden; }
.rc-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: stretch; justify-content: stretch; }
.rc-backdrop { position: absolute; inset: 0; background: rgba(20, 20, 18, .72); }
.rc-shell { position: relative; display: grid; grid-template-columns: 272px minmax(0, 1fr); width: 100%; height: 100%; background: #FBFAF6; color: #141412; }
.rc-rail { display: flex; flex-direction: column; gap: 14px; padding: 26px 18px 22px 24px; border-right: 1px solid #E4E1D6; overflow: auto; background: #F6F4EE; }
.rc-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 4px; }
.rc-brand img { display: block; width: 46px; height: auto; }
.rc-brand-word { font-size: 18px; font-weight: 700; letter-spacing: -.4px; color: #141412; }
.rc-brand-word span { color: #E8530E; }
.rc-brand-mark { display: none; }
.rc-rail-head { display: flex; flex-direction: column; gap: 6px; padding: 0 6px 12px; border-bottom: 1px solid #E4E1D6; }
.rc-rail-title { font-size: 18px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
.rc-chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-chapter { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding: 9px 8px; border: 0; border-radius: 9px; background: transparent; text-align: left; font: inherit; font-size: 14.5px; color: #3E3D37; cursor: pointer; }
.rc-chapter:hover { background: #ECE9DF; }
.rc-chapter.is-on { background: #141412; color: #fff; }
.rc-chapter-n { font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 12px; opacity: .75; }
.rc-chapter-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-chapter-count { font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 12px; opacity: .7; }
.rc-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; min-height: 0; }
.rc-top { display: flex; align-items: center; gap: 16px; padding: 14px 20px 12px 24px; border-bottom: 1px solid #E4E1D6; }
.rc-top-chapter { font-size: 16px; font-weight: 700; letter-spacing: -.2px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-top-n { font-family: 'Fragment Mono', ui-monospace, monospace; font-weight: 400; color: #8A887F; margin-right: 2px; }
.rc-top-pos { margin-left: auto; font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 13px; color: #55544D; white-space: nowrap; }
.rc-chapter-pick { display: none; }
.rc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rc-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 999px; border: 1px solid #D9D6CC; background: #fff; font: inherit; font-size: 13.5px; font-weight: 600; color: #3E3D37; cursor: pointer; white-space: nowrap; }
.rc-toggle-dot { width: 10px; height: 10px; border-radius: 50%; background: #CFCDC4; }
.rc-toggle.is-on { border-color: #141412; color: #141412; }
.rc-toggle.is-on .rc-toggle-dot { background: #E8530E; }
.rc-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #D9D6CC; background: #fff; color: #141412; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rc-close:hover { background: #141412; color: #fff; }
.rc-stage { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; min-height: 0; background: var(--rc-stage, #E9E6DC); }
.rc-frame { position: relative; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px 0; cursor: pointer; }
.rc-video { display: block; height: 100%; max-height: 100%; width: auto; max-width: 100%; aspect-ratio: 4 / 5; background: var(--rc-ground, #F3F1EA); object-fit: contain; border-radius: 6px; box-shadow: 0 1px 0 rgba(20,20,18,.06), 0 14px 40px rgba(20,20,18,.14); }
.rc-shield { position: absolute; inset: 0; }
.rc-frame.is-paused .rc-video { filter: brightness(.97); }
.rc-paused { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(20, 20, 18, .82); color: #fff; display: flex; align-items: center; justify-content: center; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.rc-paused svg { margin-left: 3px; }
.rc-stage-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 14px; border-radius: 10px; background: #141412; color: #fff; font-size: 14px; }
.rc-arrow { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; border: 1px solid #D9D6CC; background: #fff; color: #141412; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rc-arrow:hover:not(:disabled) { background: #141412; color: #fff; }
.rc-arrow:disabled { opacity: .3; cursor: default; }
/* ---- within a picture: steps, pause, speed ---- */
.rc-controls { display: flex; align-items: center; gap: 18px; padding: 10px 24px; border-top: 1px solid #E4E1D6; background: #FBFAF6; flex-wrap: wrap; }
.rc-steps { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rc-step-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #D9D6CC; background: #fff; color: #141412; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.rc-step-btn:hover:not(:disabled) { background: #141412; color: #fff; }
.rc-step-btn:disabled { opacity: .3; cursor: default; }
.rc-dots { display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.rc-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: #CFCDC4; cursor: pointer; transition: transform .15s, background .15s; }
.rc-dot:first-child { width: 14px; border-radius: 4px; }
.rc-dot:hover { background: #8A887F; }
.rc-dot.is-on { background: #E8530E; transform: scale(1.25); }
.rc-step-label { font-family: 'Fragment Mono', ui-monospace, monospace; font-size: 12.5px; color: #55544D; white-space: nowrap; margin-left: 4px; }
.rc-pause { display: inline-flex; align-items: center; gap: 8px; min-width: 96px; padding: 7px 14px 7px 12px; border-radius: 999px; border: 1px solid #D9D6CC; background: #fff; font: inherit; font-size: 13.5px; font-weight: 600; color: #141412; cursor: pointer; }
.rc-pause:hover { background: #141412; color: #fff; }
.rc-speed { display: inline-flex; align-items: center; margin-left: auto; border: 1px solid #D9D6CC; border-radius: 999px; background: #fff; padding: 2px; }
.rc-speed-btn { padding: 5px 11px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: #55544D; cursor: pointer; }
.rc-speed-btn.is-on { background: #141412; color: #fff; }
.rc-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 24px; padding: 14px 24px 16px; border-top: 1px solid #E4E1D6; }
.rc-line { margin: 0; font-size: 16px; line-height: 1.5; color: #141412; }
.rc-line code { font-family: 'Fragment Mono', ui-monospace, monospace; font-size: .92em; background: #ECE9DF; padding: 1px 5px; border-radius: 5px; }
.rc-line--none { color: #55544D; }
.rc-links { display: flex; gap: 18px; white-space: nowrap; }
.rc-links a { font-size: 14.5px; font-weight: 600; color: #141412; text-decoration: none; border-bottom: 1px solid #CFCDC4; }
.rc-links a:hover { border-color: #141412; }
.rc-mobile-nav { display: none; }

@media (max-width: 900px) {
   .rc-shell { grid-template-columns: minmax(0, 1fr); }
   .rc-rail { display: none; }
   .rc-top { gap: 10px; padding: 10px 12px 10px 14px; }
   .rc-top-chapter { display: none; }
   .rc-brand-mark { display: block; width: 40px; height: auto; flex: none; }
   .rc-chapter-pick { display: block; min-width: 0; flex: 1; }
   .rc-chapter-pick select { width: 100%; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 10px; border: 1px solid #D9D6CC; background: #fff; color: #141412; }
   .rc-toggle { padding: 6px 10px 6px 8px; font-size: 13px; }
   .rc-stage { grid-template-columns: minmax(0, 1fr); }
   .rc-arrow { display: none; }
   .rc-frame { padding: 8px 0; }
   .rc-video { width: 100%; height: auto; max-height: 100%; border-radius: 0; box-shadow: none; }
   .rc-controls { gap: 10px; padding: 8px 12px; }
   .rc-step-label { display: none; }
   .rc-pause { min-width: 0; padding: 6px 12px 6px 10px; }
   .rc-speed-btn { padding: 5px 9px; font-size: 12.5px; }
   .rc-foot { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 14px 14px; }
   .rc-line { font-size: 15px; }
   .rc-links { gap: 14px; }
   .rc-mobile-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}
