/* + New — the media-first composer. Show, say, share. */
.pk-stage > main.pk-composer-page { display: block; width: min(100%, 720px); padding: 28px clamp(16px, 3vw, 32px) 110px; margin: 0 auto; }
.pk-composer { display: grid; gap: 18px; width: 100%; padding: 0; margin: 0; background: transparent; border: 0; }
.pk-composer-title { margin: 0; color: var(--pk-muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pk-composer--report .pk-composer-title { color: var(--pk-ink); font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.03em; text-transform: none; }
.pk-composer-lede { margin: -8px 0 0; color: var(--pk-muted); font-size: 14px; line-height: 1.55; }

/* The drop zone is the page until media lands. */
.pk-drop { display: grid; gap: 8px; }
.pk-drop-target { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 260px; padding: 28px; border: 1.5px dashed #3f4446; border-radius: 16px; background: linear-gradient(160deg, #141718, #0e1112); color: var(--pk-ink); text-align: center; cursor: pointer; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.pk-drop-target:hover, .pk-drop-target:focus-within { border-color: #f0442e; background: linear-gradient(160deg, #1a1516, #0f1112); }
.pk-drop.is-over .pk-drop-target { border-color: #ff8a7a; background: #221614; transform: scale(1.01); }
.pk-drop.is-compact .pk-drop-target { min-height: 88px; padding: 14px; grid-auto-flow: column; justify-content: start; gap: 14px; text-align: left; }
.pk-drop.is-compact .pk-drop-art { width: 48px; }
.pk-drop.is-compact .pk-drop-sub, .pk-drop.is-compact + .pk-composer-text-link { display: none; }
.pk-drop-art { display: block; width: 92px; color: #8f9596; }
.pk-drop-art svg { width: 100%; height: auto; }
.pk-drop-art-clip { color: #ff6a52; }
.pk-drop-target:hover .pk-drop-art { color: #c9cece; }
.pk-drop-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.pk-drop-sub { color: var(--pk-muted); font-size: 14px; }
.pk-drop-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.pk-drop-hint { margin: 0; color: #7e8586; font-size: 12px; text-align: center; }
.pk-drop.is-compact .pk-drop-hint { text-align: left; }
.pk-composer-text-link { margin: -6px 0 0; text-align: center; }
.pk-composer-text-link[hidden] { display: none; }
.pk-linklike { padding: 8px 10px; border: 0; background: transparent; color: var(--pk-muted); font: 500 14px/1.2 var(--fs-font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pk-linklike:hover { color: #fff; }

/* Tray: thumbnails in order, with reorder, remove and pairing. */
.pk-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pk-tray[hidden] { display: none; }
.pk-tray-item { position: relative; display: grid; gap: 6px; padding: 6px; border: 1px solid var(--pk-border); border-radius: 12px; background: var(--pk-surface); }
.pk-tray-item.is-dragging { opacity: .5; }
.pk-tray-item.is-over { border-color: #ff8a7a; }
.pk-tray-item.is-error { border-color: #7a3a2e; }
.pk-tray-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #050607; }
.pk-tray-thumb img, .pk-tray-thumb video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pk-tray-thumb .pk-tray-kind { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pk-tray-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .15); }
.pk-tray-progress > span { display: block; height: 100%; width: var(--pk-progress, 0%); background: var(--pk-accent); transition: width .2s linear; }
.pk-tray-item.is-ready .pk-tray-progress { display: none; }
.pk-tray-name { margin: 0; overflow: hidden; color: var(--pk-muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.pk-tray-error { margin: 0; color: #ffb4a6; font-size: 11px; line-height: 1.3; }
.pk-tray-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.pk-tray-tools button { min-width: 30px; min-height: 30px; padding: 4px 7px; border: 1px solid #383d3e; border-radius: 7px; background: #181c1d; color: #d8dbdb; font: 600 11px/1 var(--fs-font); cursor: pointer; }
.pk-tray-tools button:hover:not(:disabled) { border-color: #6a4b44; color: #fff; }
.pk-tray-tools button:disabled { opacity: .35; cursor: default; }
.pk-tray-tools button[aria-pressed="true"] { border-color: #f0442e; color: #ff8a7a; }
.pk-tray-item.is-pair-before { border-color: #6a4b44; border-right-style: dashed; }
.pk-tray-item.is-pair-after { border-color: #6a4b44; border-left-style: dashed; }
.pk-tray-pair-mark { position: absolute; right: 10px; top: 10px; padding: 2px 6px; border-radius: 5px; background: rgba(240, 68, 46, .85); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

/* After media: caption, chips, credits, more, share. */
.pk-composer-after { display: grid; gap: 16px; }
.pk-composer-after[hidden] { display: none; }
.pk-composer-caption, .pk-stage .pk-composer-caption { width: 100%; min-height: 96px; padding: 14px 16px; border: 1px solid var(--pk-border); border-radius: 12px; background: var(--pk-surface); color: var(--pk-ink); font: 17px/1.5 var(--fs-font); resize: vertical; }
.pk-composer-caption::placeholder { color: #7e8586; }
.pk-composer fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.pk-composer fieldset legend { padding: 0; color: var(--pk-muted); font-size: 12px; font-weight: 650; }
.pk-crafts[hidden] { display: none; }
.pk-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-chip-toggle { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid #3a3f40; border-radius: 999px; background: #141718; color: #d6d9d9; font: 600 13px/1 var(--fs-font); cursor: pointer; transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease; }
.pk-chip-toggle:hover { border-color: #8d5a4d; color: #fff; }
.pk-chip-toggle[aria-pressed="true"] { border-color: #f0442e; background: rgba(240, 68, 46, .16); color: #fff; }
.pk-chip-toggle--craft { min-height: 32px; padding-inline: 12px; font-size: 12px; }
.pk-chip-toggle:focus-visible { outline: 2px solid #e95c48; outline-offset: 2px; }

.pk-composer-section { border: 1px solid var(--pk-border); border-radius: 12px; background: #0f1213; }
.pk-composer-section > summary { display: flex; align-items: center; min-height: 46px; padding: 8px 16px; list-style: none; color: #e4e6e5; font-size: 14px; font-weight: 650; cursor: pointer; }
.pk-composer-section > summary::-webkit-details-marker { display: none; }
.pk-composer-section > summary::after { content: '+'; margin-left: auto; color: var(--pk-muted); font-size: 18px; }
.pk-composer-section[open] > summary::after { content: '–'; }
.pk-composer-section[open] > summary { border-bottom: 1px solid var(--pk-border); }
.pk-composer-section > :not(summary) { margin: 12px 16px; }
.pk-composer-section .pk-hint { margin-top: 0; }
.pk-credit-rows { display: grid; gap: 6px; padding: 0; list-style: none; }
.pk-credit-rows:empty { display: none; }
.pk-credit-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--pk-border); border-radius: 9px; font-size: 14px; }
.pk-credit-row strong { font-weight: 650; }
.pk-credit-row span { color: var(--pk-muted); }
.pk-credit-row button { margin-left: auto; min-height: 30px; padding: 4px 9px; border: 1px solid #383d3e; border-radius: 7px; background: transparent; color: #d8dbdb; font: 600 11px/1 var(--fs-font); cursor: pointer; }
.pk-credit-add { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.pk-credit-add-name { position: relative; }
.pk-credit-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; display: grid; gap: 2px; padding: 6px; border: 1px solid #3b4142; border-radius: 9px; background: #1a1e1f; box-shadow: 0 16px 36px #000a; }
.pk-credit-suggest[hidden] { display: none; }
.pk-credit-suggest button { display: grid; gap: 2px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: #f3f1ee; font: 13px/1.2 var(--fs-font); text-align: left; cursor: pointer; }
.pk-credit-suggest button:hover, .pk-credit-suggest button:focus-visible { background: #2b3131; outline: none; }
.pk-credit-suggest button small { color: var(--pk-muted); font-size: 11px; }
.pk-composer-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pk-composer-foot .pk-composer-section { flex: 1 1 auto; max-width: 420px; }
.pk-composer-foot .pk-composer-section > summary::after { content: '▾'; font-size: 13px; }
.pk-composer-foot .pk-composer-section[open] > summary::after { content: '▴'; }
.pk-composer-foot .pk-field { display: grid; gap: 6px; color: var(--pk-muted); font-size: 12px; }
.pk-composer-share, .pk-composer .fs-button--primary.pk-composer-share { justify-self: end; min-height: 46px; min-width: 120px; padding: 10px 26px; border-radius: 999px; font-size: 15px; }
.pk-composer-switch { align-self: center; color: var(--pk-muted); font-size: 13px; }
.pk-composer-status { min-height: 1.3em; margin: 0; color: #f2a595; font-size: 13px; }
.pk-composer-status.is-ok { color: #9cf2c4; }
.pk-composer-report { margin: 6px 0 0; text-align: center; }
.pk-composer-report a { color: #7e8586; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.pk-composer-report a:hover { color: var(--pk-ink); }
.pk-composer--report .pk-drop-target { min-height: 120px; }

@media (max-width: 759px) {
  .pk-stage > main.pk-composer-page { padding: 18px 14px 120px; }
  .pk-drop-target { min-height: 220px; }
  .pk-tray { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .pk-credit-add { grid-template-columns: 1fr; }
  .pk-composer-foot { flex-direction: column; align-items: stretch; }
  .pk-composer-foot .pk-composer-section { max-width: none; }
  .pk-composer-share, .pk-composer .fs-button--primary.pk-composer-share { width: 100%; justify-self: stretch; }
}

/* From cinemaOS (Task B2): the draft's context chips, the private-diagnostics mark, the expired-draft note. */
.pk-composer-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.pk-composer-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 10px; border: 1px solid var(--pk-border); border-radius: 999px; background: var(--pk-surface-raised); color: var(--pk-ink); font-size: 12px; }
.pk-composer-chip--private { padding-right: 10px; color: var(--pk-muted); }
.pk-composer-chip-remove { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--pk-muted); cursor: pointer; }
.pk-composer-chip-remove:hover, .pk-composer-chip-remove:focus-visible { background: var(--pk-border); color: var(--pk-ink); }
.pk-composer-chip-remove .pk-icon { width: 12px; height: 12px; }
.pk-composer-note { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--pk-border); border-radius: 9px; color: var(--pk-muted); font-size: 13px; }
