/* 프로그램 · 프로그램 상세 · 작가 모집 */

/* 프로그램 목록 · 다가오는 프로그램 캐러셀 + 지난 프로그램 (Figma 2462:6570 · 2462:7163, 카드 2823:14026) */
.pr-root { display: flex; flex-direction: column; gap: 0; }
/* 지난 프로그램 = its own Paper band under the sage upcoming band */
.pr-sec { overflow: hidden; }
.pr-up { padding-bottom: 104px; }
.pr-up:last-child { padding-bottom: 0; }
.pr-past { position: relative; isolation: isolate; padding-top: 80px; padding-bottom: 104px; margin-bottom: calc(var(--pb) * -1); }
.pr-past::before { content: ""; position: absolute; inset: 0 -100vw; background: var(--paper); z-index: -1; }
.pr-fallback { display: flex; flex-direction: column; gap: 8px; font: 400 16px/26px var(--sans); }
.pr-up, .pr-past { display: flex; flex-direction: column; gap: 24px; }
.pr-past { gap: 16px; }
.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pr-nav { display: flex; align-items: center; gap: 8px; }
.pr-nav[hidden] { display: none; }
.pr-count-m { display: none; font: 500 15px/22px var(--sans); color: #000; font-variant-numeric: tabular-nums; }
.pr-arrow { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--white); border: 1px solid rgba(0, 0, 0, .2); color: var(--deep); cursor: pointer; }
.pr-prev svg { transform: scaleX(-1); }
.pr-arrow[aria-disabled="true"] { background: rgba(255, 255, 255, .5); border-color: rgba(0, 0, 0, .1); color: rgba(106, 109, 107, .6); cursor: default; }
.pr-car { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth; border-radius: 16px; }
.pr-car::-webkit-scrollbar { display: none; }
.pr-car:focus-visible { outline-offset: 4px; }
.pr-track { display: flex; gap: 16px; }
.pr-slide { flex: 0 0 calc((100% - 48px) / 3.25); min-width: 0; scroll-snap-align: start; display: flex; }
.pc { position: relative; flex: 1; display: flex; flex-direction: column; background: var(--white); border-radius: 16px; overflow: hidden; color: #000; }
.pc-im { position: relative; aspect-ratio: 376 / 240; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 16px; background: var(--sage); }
.pc-im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-date, .pc-im .chips { position: relative; }
.pc-date { min-width: 56px; display: flex; flex-direction: column; align-items: center; padding: 8px 12px; background: var(--paper); border-radius: 8px; color: var(--deep); }
.pc-date .m { font: 500 13px/18px var(--sans); }
.pc-date .d { font: 600 30px/34px var(--sans); }
.pc-im .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-bd { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 24px; }
.pc-bd h3 { font: 600 21px/30px var(--sans); word-break: keep-all; text-wrap: balance; }
.pc-bd .meta { display: flex; flex-direction: column; gap: 6px; }
.pc-bd .meta p { display: flex; align-items: center; gap: 8px; font: 400 15px/22px var(--sans); }
.pc-bd .meta .i { --s: 18px; flex: none; }
.pc-cta { height: 56px; flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--deep); color: var(--paper); font: 600 16px/24px var(--sans); text-decoration: none; border: 0; }
.pc-cta .i { --s: 18px; }
a.pc-cta:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.pc-cta:focus-visible { outline-offset: -5px; outline-color: var(--paper); box-shadow: none; }
.pc-cta.closed { background: var(--off); color: var(--white); }
.pc-cta.closed:focus-visible { outline-color: var(--white); }
.pr-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 400 18px/28px var(--sans); }
.pr-plist { border-bottom: 1px solid var(--line); }
.pr-prow { border-top: 1px solid var(--line); }
.pr-prow .pr-plink { display: flex; align-items: center; gap: 24px; padding: 18px 0; color: inherit; text-decoration: none; }
.pr-prow .pr-plink:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.pr-prow .pr-plink > .i { flex: none; color: var(--deep); }
.pr-prow[hidden] { display: none; }
.pr-prow time { width: 200px; flex: none; font: 400 15px/22px var(--sans); color: var(--grey); }
.pr-prow .t { flex: 1; font: 500 17px/26px var(--sans); word-break: keep-all; }
.pr-prow .k { font: 400 15px/22px var(--sans); color: var(--grey); }
.pr-past .more-row { margin-top: 24px; }
.pr-past .more-row[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .pr-car { scroll-behavior: auto; } }

/* 프로그램 상세 */
.pr-back { display: inline-block; margin-bottom: 32px; font: 400 14px/20px var(--sans); color: #000; text-decoration: none; }
.pr-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.pr-agree { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pr-agree .check { align-items: center; }
.pr-agree .err { order: 3; flex-basis: 100%; }
.pr-view { font: 400 15px/22px var(--sans); color: #000; text-decoration: underline; text-underline-offset: 3px; min-height: 24px; }
.pr-view:hover { text-decoration-thickness: 2px; }
.pr-agree-text { display: flex; flex-direction: column; gap: 4px; margin-top: -6px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; font: 400 14px/22px var(--sans); }
.prog-done .summary dd { font: 400 16px/24px var(--sans); }

/* 작가 모집 */
.offers li { border-top-width: 1.5px; }
.steps li { border-top-width: 3px; }
.oc-who { display: flex; gap: 16px; padding: 24px 28px; background: var(--newsprint); border-radius: 16px; }
.oc-who h3 { width: 260px; flex: none; font: 600 18px/26px var(--sans); }
.oc-who p { font: 400 17px/28px var(--sans); }
.oc-apply { background: var(--paper) url(../img/patterns/opencall-form-d.svg) center top / 1440px 1610px repeat; }
.oc-apply .in { max-width: 812px; }
.oc-card { box-shadow: 0 8px 32px rgba(0, 0, 0, .07); border-radius: 16px; }
.oc-form-h { font: 600 36px/44px var(--sans); text-align: center; padding-bottom: 20px; margin-bottom: 18px; }
.oc-card .apply-done { padding-top: 8px; }

@media (max-width: 899px) {
  .pr-up { padding-bottom: 48px; }
  .pr-past { padding-top: 40px; padding-bottom: 48px; margin-bottom: calc(var(--mpb) * -1); }
  .pr-root { gap: 40px; }
  .pr-up { gap: 16px; }
  .pr-past { gap: 12px; }
  .pr-nav { display: none !important; }
  .pr-count-m { display: block; margin: 0; font-size: 14px; line-height: 20px; }
  .pr-count-m[hidden] { display: none; }
  .pr-car { margin-right: -20px; padding-right: 20px; scroll-padding-left: 0; border-radius: 16px 0 0 16px; }
  .pr-track { gap: 12px; }
  .pr-slide { flex-basis: calc(100% - 32px); }
  .pc-im { aspect-ratio: 318 / 204; }
  .pc-bd h3 { font-size: 20px; }
  .pr-prow .pr-plink { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 0; padding: 14px 0; }
  .pr-prow .pr-plink > .i { grid-column: 3; grid-row: 1 / 3; margin-left: 16px; }
  .pr-prow time { width: auto; font-size: 14px; line-height: 20px; }
  .pr-prow .k { font-size: 14px; line-height: 20px; }
  .pr-prow .k::before { content: "\00a0· "; }
  .pr-prow .t { grid-column: 1 / 3; grid-row: 2; font-size: 16px; line-height: 24px; }
  .pr-past .more-row { margin-top: 20px; justify-content: flex-start; }
  .pr-back { margin-bottom: 20px; font-size: 13px; line-height: 18px; }
  .pr-view { font-size: 14px; }
  .pr-agree .check { font-size: 14px; }
  .oc-who { flex-direction: column; gap: 12px; padding: 20px; }
  .oc-who h3 { width: auto; }
  .oc-who p { font: 500 16px/26px var(--sans); }
  .oc-apply { background: var(--paper) url(../img/patterns/opencall-form-m.svg) center top / 390px 1712px repeat; }
  .oc-card.fcard.white { padding: 28px 20px; }
  .oc-form-h { font: 600 36px/44px var(--sans); }
}

/* 프로그램 상세 · 내 캘린더에 추가 (Figma 2651:8209 · 메뉴 2807:10755) */
.pfacts dd.pf-when { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.cal-add { position: relative; }
.cal-btn .i { color: var(--deep); }
.cal-menu { position: absolute; z-index: 15; top: calc(100% + 8px); right: 0; width: 300px; padding: 8px; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.cal-menu a, .cal-menu button { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 8px; font: 500 15px/22px var(--sans); color: #000; text-decoration: none; text-align: left; width: 100%; }
.cal-menu a:hover, .cal-menu button:hover { background: var(--paper); }
.cal-menu .i { --s: 20px; color: var(--deep); flex: none; }
@media (max-width: 899px) {
  .pfacts dd.pf-when { flex-direction: column; align-items: flex-start; }
  .cal-btn { padding: 10px 18px 10px 20px; font-size: 15px; }
  .pfacts > div:has(.pf-when) { align-items: flex-start; }
  .cal-add { align-self: stretch; }
  .cal-menu { position: static; margin-top: 8px; width: 100%; }
}

/* 프로그램 상세 · 상태 블록 (폼 카드 자리 · Figma 2847:11854 · 2847:11951) */
.prog-state .ps-line { font: 400 17px/1.6 var(--sans); word-break: keep-all; }
.prog-state .cal-menu { left: 0; right: auto; }
@media (max-width: 899px) {
  .prog-state .ps-line { font-size: 16px; }
  .prog-state .cal-add { flex-basis: 100%; }
}
