/* rewind (되감기) — 초파리 렌더가 만들기 전으로 거슬러 내려가는 어두운 판 + 작업 카드 줄 + 타임라인 */
.mode-rewind { min-height: 0; }
.mode-rewind .rw-root {
  --ink: #ece6d9; --ink2: rgba(236, 230, 217, .8); --ink3: rgba(236, 230, 217, .52); --acc: #e8512f;
  position: relative; width: 100%; container-type: inline-size; background: #0b0b0c; color: var(--ink); border-radius: 20px; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; user-select: none; -webkit-user-select: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px -24px rgba(0, 0, 0, .5);
}
.mode-rewind .rw-scene { position: relative; width: 100%; height: min(43.62cqw, max(300px, calc(100vh - 372px))); overflow: hidden; flex: none; -webkit-mask-image: linear-gradient(#000 66%, transparent 100%); mask-image: linear-gradient(#000 66%, transparent 100%); background: #1b1b1d; }
.mode-rewind .rw-cv { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 3072 / 1610; display: block; opacity: 0; transition: opacity .6s; }
.mode-rewind .rw-root.ready .rw-cv { opacity: 1; }

.mode-rewind .rw-cap { position: absolute; left: 3cqw; top: 2.4cqw; max-width: 40cqw; padding: max(12px, .95cqw) max(16px, 1.3cqw) max(13px, 1.05cqw); border-radius: 14px; pointer-events: none; text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
  background: linear-gradient(100deg, rgba(8, 8, 9, .8), rgba(8, 8, 9, .58)); backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1); box-shadow: 0 0 0 1px rgba(236, 230, 217, .1); }
.mode-rewind .rw-tag { display: block; font-size: max(11px, .8cqw); font-weight: 650; letter-spacing: .16em; color: var(--acc); margin-bottom: .7cqw; line-height: 1; }
.mode-rewind .rw-tx { display: block; text-wrap: balance; word-break: keep-all; font-size: max(16px, 1.6cqw); font-weight: 520; line-height: 1.4; letter-spacing: -.01em; }
.mode-rewind .rw-sub { display: block; margin-top: .4cqw; font-size: max(12px, .9cqw); color: rgba(236, 230, 217, .82); text-wrap: balance; word-break: keep-all; font-variant-numeric: tabular-nums; }
.mode-rewind .rw-sub:empty { display: none; }
.mode-rewind .rw-root.flip .rw-cap { animation: rwf .45s cubic-bezier(.3, .7, .2, 1); }
@keyframes rwf { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mode-rewind .rw-help { position: absolute; right: 3cqw; top: 2.4cqw; padding: 9px 14px; border-radius: 999px; font-size: max(13px, .9cqw); color: rgba(236, 230, 217, .88); transition: opacity .6s; pointer-events: none; background: rgba(8, 8, 9, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(236, 230, 217, .1); word-break: keep-all; white-space: nowrap; }
.mode-rewind .rw-help.gone { opacity: 0; }

/* 카드 줄 */
.mode-rewind .rw-strip { position: relative; width: 100%; height: calc(var(--cw, 18cqw) * .64 + 8px); margin-top: -14cqw; z-index: 3; touch-action: pan-y; cursor: grab; flex: none; --cw: 18cqw; }
.mode-rewind .rw-strip.drag { cursor: grabbing; }
.mode-rewind .rw-card { position: absolute; left: 50%; top: 0; width: var(--cw); transform: translateX(-50%); transform-origin: 50% 40%; will-change: transform, opacity; outline: none; }
.mode-rewind .rw-img { display: block; width: 100%; aspect-ratio: 1.56; border-radius: .9cqw; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 1.6cqw 3.2cqw -1cqw rgba(0, 0, 0, .7); background: #222; }
.mode-rewind .rw-img img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.mode-rewind .rw-card.cur .rw-img { box-shadow: 0 0 0 1.5px rgba(236, 230, 217, .75), 0 2cqw 4cqw -1.2cqw rgba(0, 0, 0, .8); }
.mode-rewind .rw-card:focus-visible .rw-img { box-shadow: 0 0 0 2px var(--acc); }

.mode-rewind .rw-info { position: relative; z-index: 3; margin-top: 1cqw; text-align: center; min-height: 5.2cqw; padding: 0 4cqw; flex: none; }
.mode-rewind .rw-open { display: inline-flex; flex-direction: column; align-items: center; gap: .3cqw; padding: .3cqw 1cqw; border-radius: 10px; color: var(--ink); opacity: 0; transform: translateY(6px); transition: background .2s; }
.mode-rewind .rw-info.on .rw-open { animation: rwi .5s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes rwi { to { opacity: 1; transform: none; } }
.mode-rewind .rw-open:hover { background: rgba(236, 230, 217, .06); }
.mode-rewind .rw-open:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.mode-rewind .rw-open b { font-size: max(17px, 1.6cqw); font-weight: 630; letter-spacing: -.015em; }
.mode-rewind .rw-open span { font-size: max(13px, .95cqw); color: var(--ink2); max-width: 60cqw; line-height: 1.5; text-wrap: balance; }
.mode-rewind .rw-open em { font-style: normal; font-size: max(12.5px, .8cqw); color: rgba(236, 230, 217, .62); letter-spacing: .03em; }

/* 타임라인 */
.mode-rewind .rw-tl { position: relative; flex: none; margin: 1.6cqw 3cqw 0; height: 76px; touch-action: none; cursor: pointer; }
.mode-rewind .rw-base { position: absolute; left: 0; right: 0; top: 36px; height: 1px; background: var(--ink3); }
.mode-rewind .rw-fill { position: absolute; left: 0; top: 36px; height: 1px; width: 100%; background: var(--acc); transform-origin: left; pointer-events: none; }
.mode-rewind .rw-ticks, .mode-rewind .rw-labels { position: absolute; inset: 0; pointer-events: none; }
.mode-rewind .rw-ticks i { position: absolute; top: 31px; width: 1px; height: 5px; background: rgba(236, 230, 217, .4); }
.mode-rewind .rw-ticks i.m { top: 28px; height: 8px; background: rgba(236, 230, 217, .5); }
.mode-rewind .rw-ticks b { position: absolute; top: 22px; width: 1px; height: 14px; margin-left: -.5px; background: rgba(236, 230, 217, .95); transition: background .2s, height .2s, top .2s; }
.mode-rewind .rw-ticks b.on { background: var(--acc); top: 18px; height: 18px; }
.mode-rewind .rw-labels .l { position: absolute; top: 52px; transform: translateX(-50%); font-size: 13px; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; transition: color .25s; }
.mode-rewind .rw-labels .l:first-child { transform: none; }
.mode-rewind .rw-labels .l.end { transform: translateX(-100%); }
.mode-rewind .rw-labels .l.on { color: var(--acc); }
.mode-rewind .rw-hd { position: absolute; top: 19px; width: 20px; height: 34px; margin-left: -10px; cursor: grab; outline: none; }
.mode-rewind .rw-tl.drag .rw-hd { cursor: grabbing; }
.mode-rewind .rw-grip { position: absolute; inset: 0; border-radius: 5px; background: var(--acc); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.mode-rewind .rw-grip::before, .mode-rewind .rw-grip::after { content: ""; position: absolute; top: 9px; bottom: 9px; width: 1px; background: rgba(5, 5, 5, .55); }
.mode-rewind .rw-grip::before { left: 7px; } .mode-rewind .rw-grip::after { left: 12px; }
.mode-rewind .rw-hd:focus-visible .rw-grip { box-shadow: 0 0 0 2px #0b0b0c, 0 0 0 3px var(--ink); }

.mode-rewind .rw-credit { flex: none; padding: 0 3cqw 14px; text-align: right; font-size: 12px; color: rgba(236, 230, 217, .68); letter-spacing: .01em; margin-top: -2px; }
.mode-rewind .rw-credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(236, 230, 217, .3); }
.mode-rewind .rw-credit a:hover { color: var(--ink); }

@container (max-width: 760px) {
  .mode-rewind .rw-strip { --cw: 62cqw; margin-top: 2cqw; }
  .mode-rewind .rw-cap { position: relative; left: auto; top: auto; max-width: none; margin: 0; padding: 4cqw 5cqw 0; order: 2; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border-radius: 0; }
  .mode-rewind .rw-help { position: static; margin: 2cqw 5cqw 0; padding: 0; order: 3; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; white-space: normal; }
  .mode-rewind .rw-scene { order: 1; -webkit-mask-image: none; mask-image: none; height: auto; aspect-ratio: 3072 / 1610; }
  .mode-rewind .rw-strip { order: 4; } .mode-rewind .rw-info { order: 5; margin-top: 4cqw; min-height: 24cqw; }
  .mode-rewind .rw-tl { order: 6; margin: 3cqw 5cqw 0; } .mode-rewind .rw-credit { order: 7; padding: 0 5cqw 14px; }
  .mode-rewind .rw-tx { font-size: 16px; } .mode-rewind .rw-tag { font-size: 11px; margin-bottom: 8px; }
  .mode-rewind .rw-open b { font-size: 18px; } .mode-rewind .rw-open span { font-size: 14px; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .mode-rewind .rw-root.flip .rw-cap, .mode-rewind .rw-info.on .rw-open { animation: none; opacity: 1; transform: none; }
  .mode-rewind .rw-open { opacity: 1; transform: none; }
}
