/* Paddock — List studio (create.html). Mockup: Create.dc.html. Legacy create.css is no longer loaded here,
   so this file also styles the site.js overlays used on this page (AI plan flow, confirm dialog, library cards). */

/* ---------- base ---------- */

.pd-create-main,
.pd-create-main button,
.pd-create-main input,
.pd-create-main textarea,
.ai-flow-modal,
.ai-flow-modal button,
.ai-flow-modal input,
.ai-flow-modal textarea,
.confirm-action-modal,
.confirm-action-modal button {
  font-family: var(--pd-display) !important;
}

.pd-create-main .pd-m,
.pd-create-main .pd-kicker,
.pd-create-main .pd-chip,
.pd-create-main .pd-cover-tag,
.pd-studio .pd-studio-seg button,
.pd-studio .pd-studio-tag,
.pd-studio .pd-studio-status,
.pd-studio .draft-item-card label,
.pd-create-counters span,
.pd-create-grid .card-meta,
.pd-create-grid .card-body p,
.ai-flow-modal label,
.ai-flow-modal small,
.ai-plan-estimate,
.ai-progress-estimate,
.ai-progress-top span,
.confirm-action-kicker {
  font-family: var(--pd-mono) !important;
}

.pd-create-main {
  color: var(--pd-ink);
}

.pd-create-main [hidden],
.pd-studio[hidden] {
  display: none !important;
}

body.ai-editor-open [data-create-home] {
  display: none !important;
}

/* ---------- studio header bar + steps ---------- */

.pd-studio {
  min-height: calc(100dvh - var(--pd-header-h));
  background: var(--pd-bg);
}

.pd-studio-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 64px;
  padding: 10px var(--pd-gutter);
  border-bottom: 1px solid var(--pd-line);
}

.pd-studio-bar-id,
.pd-studio-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.pd-studio-label {
  color: var(--pd-ink);
  letter-spacing: 0.4em;
}

.pd-studio-mode {
  padding: 4px 8px;
  border: 1px solid var(--pd-line);
}

.pd-studio-steps {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--pd-line);
}

.pd-studio-steps a {
  display: flex;
  flex: 1 1 200px;
  align-items: center;
  gap: 14px;
  padding: 16px var(--pd-gutter);
  color: var(--pd-ink);
  text-decoration: none;
  box-shadow: inset 0 -3px 0 transparent;
}

.pd-studio-steps a .pd-d {
  color: #4a4a4f;
  font-size: 28px;
}

.pd-studio-steps a:hover {
  background: #111112;
}

.pd-studio-steps a.is-done {
  box-shadow: inset 0 -3px 0 var(--pd-ink);
}

.pd-studio-steps a.is-done .pd-d {
  color: var(--pd-ink);
}

.pd-studio-steps a.is-done .pd-m,
.pd-studio-steps a.is-on .pd-m {
  color: var(--pd-ink);
}

.pd-studio-steps a.is-done .pd-m::after {
  content: " ✓";
}

.pd-studio-steps a.is-on {
  background: var(--pd-panel);
  box-shadow: inset 0 -3px 0 var(--pd-red);
}

.pd-studio-steps a.is-on .pd-d {
  color: var(--pd-red-hi);
}

/* ---------- three columns ---------- */

.pd-studio-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px var(--pd-gutter) 96px;
}

.pd-studio-setup,
.pd-studio-items,
.pd-studio-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  scroll-margin-top: calc(var(--pd-header-h) + 16px);
}

.pd-studio-setup {
  flex: 1 1 320px;
  gap: 20px;
}

.pd-studio-items {
  flex: 999 1 560px;
  gap: 16px;
}

.pd-studio-side {
  flex: 1 1 300px;
  gap: 20px;
}

#pd-studio-publish {
  scroll-margin-top: calc(var(--pd-header-h) + 16px);
}

.pd-studio .pd-studio-colhead {
  margin: 0;
  font-size: 24px;
}

.pd-studio-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pd-studio-hint {
  color: #a9a9af;
  font-size: 13px;
  line-height: 1.45;
}

/* inputs (.in in the mockup) */
.pd-studio .pd-studio-in {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--pd-line);
  background: var(--pd-panel);
  color: var(--pd-ink);
  font-size: 15px !important;
  font-stretch: 100%;
  font-style: normal;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
  text-transform: none;
}

.pd-studio .pd-studio-in:focus,
.pd-studio .pd-studio-in:focus-visible {
  border-color: var(--pd-ink) !important;
  outline: none !important;
}

.pd-studio .pd-studio-in::placeholder {
  color: var(--pd-mute);
}

.pd-studio .pd-studio-title,
.pd-studio .pd-studio-area {
  display: block;
  padding: 12px;
  overflow-wrap: anywhere;
  cursor: text;
}

.pd-studio .pd-studio-area {
  min-height: 88px;
  color: var(--pd-ink);
  white-space: pre-wrap;
}

.pd-studio [contenteditable]:empty::before {
  color: var(--pd-mute);
  content: attr(data-placeholder);
}

/* category dropdown (site.js [data-draft-select]) */
.pd-studio-select {
  position: relative;
}

.pd-studio .pd-studio-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.pd-studio-select.is-open {
  z-index: 40;
}

.pd-studio-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 40;
  display: none;
  max-height: min(320px, 52dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--pd-line);
  background: var(--pd-panel-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.pd-studio-select.is-open .pd-studio-menu {
  display: grid;
}

.pd-studio-menu button {
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--pd-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.pd-studio-menu button:hover {
  background: #26262a;
  color: #fff;
}

.pd-studio-menu button.is-selected {
  background: var(--pd-red);
  color: #fff !important;
}

/* visibility segmented control */
.pd-studio-seg {
  display: flex;
  gap: 2px;
}

.pd-studio-seg button {
  flex: 1;
  min-height: 44px;
  border: 0;
  background: var(--pd-panel);
  color: var(--pd-soft);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pd-studio-seg button:hover {
  background: #232326;
}

.pd-studio .pd-studio-seg button.is-selected {
  background: var(--pd-ink);
  color: var(--pd-bg) !important;
}

/* item field chips */
.pd-studio-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pd-studio-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--pd-line);
  background: transparent;
  color: var(--pd-ink);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pd-studio-tag button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pd-mute) !important;
  cursor: pointer;
}

.pd-studio-tag button:hover {
  color: var(--pd-red-hi) !important;
}

.pd-studio .pd-studio-tag--add {
  padding: 0 12px;
  border-style: dashed !important;
  cursor: pointer;
}

.pd-studio .pd-studio-tag--add:hover {
  border-color: var(--pd-ink) !important;
}

.pd-studio-addfield {
  display: flex;
  gap: 8px;
}

.pd-studio-addfield .pd-btn {
  flex: none;
  min-height: 46px;
}

/* cover styles */
.pd-studio-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-studio-swatch {
  width: 44px;
  height: 56px;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.pd-studio-swatch:hover {
  box-shadow: 0 0 0 2px #3a3a3e;
}

.pd-studio-swatch.is-on {
  box-shadow: 0 0 0 2px var(--pd-ink), 0 0 0 4px var(--pd-bg), 0 0 0 6px var(--pd-red);
}

.pd-studio-coverrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.pd-studio .pd-studio-warning {
  margin: 0;
  padding: 12px 14px 12px 18px;
  background: var(--pd-panel);
  box-shadow: inset 4px 0 0 var(--pd-red);
  color: var(--pd-soft);
  font-size: 13px;
  line-height: 1.5;
}

/* version history (inserted by site.js after .draft-warning) */
.pd-studio .draft-version-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--pd-line);
  background: var(--pd-panel);
  clip-path: none;
}

.pd-studio .draft-version-history::before {
  display: none !important;
}

.pd-studio .draft-version-history[hidden] {
  display: none !important;
}

.pd-studio .draft-version-head,
.pd-studio .draft-version-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pd-studio .draft-version-head {
  justify-content: space-between;
  color: var(--pd-red-hi);
  font-family: var(--pd-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pd-studio .draft-version-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.pd-studio .draft-version-row {
  padding: 8px 0;
  border-top: 1px solid var(--pd-line-2);
}

.pd-studio .draft-version-row > span {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 30px;
  background: var(--pd-ink);
  color: var(--pd-bg);
  font-stretch: 125%;
  font-style: italic;
  font-weight: 900;
  font-size: 13px;
  clip-path: var(--pd-slant-sm);
}

.pd-studio .draft-version-row strong,
.pd-studio .draft-version-row small {
  display: block;
}

.pd-studio .draft-version-row strong {
  font-size: 13px;
  font-weight: 800;
}

.pd-studio .draft-version-row small {
  margin-top: 2px;
  color: var(--pd-mute);
  font-size: 11px;
}

/* ---------- items column ---------- */

.pd-studio-items-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.pd-studio-items-head h2 {
  margin: 0;
  font-size: 40px;
}

.pd-studio-items-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-studio-items-tools .pd-btn {
  min-height: 44px;
  padding: 0 22px;
  font-size: 13px;
}

/* Lya panel: yellow is premium/Lya */
.pd-studio-lya {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 16px 20px;
  border: 1px solid var(--pd-line);
  background: var(--pd-panel);
  box-shadow: inset 4px 0 0 var(--pd-yellow);
}

.pd-studio-lya-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}

.pd-studio-lya-head .pd-d {
  font-size: 18px;
}

.pd-studio-lya-head .pd-m {
  margin: 0;
  max-width: 100%;
  letter-spacing: 0.08em;
}

.pd-studio-lya-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pd-studio-lya-row .pd-studio-in {
  flex: 1 1 260px;
  width: auto;
}

.pd-studio-lya-row .pd-btn {
  min-height: 46px;
}

.pd-studio .pd-btn[disabled],
.pd-studio .pd-studio-in:disabled {
  opacity: 1;
  background: #1f1f22;
  color: #6e6e74 !important;
  cursor: not-allowed;
}

/* items table */
.pd-studio-table {
  border: 1px solid var(--pd-line);
  background: var(--pd-panel);
}

.pd-studio-thead {
  display: grid;
  grid-template-columns: 28px 56px minmax(0, 1fr) 130px 44px;
  gap: 14px;
  padding: 12px 16px;
}

.pd-studio .draft-items-grid {
  display: block;
  margin: 0;
}

.pd-studio .draft-item-card {
  display: grid;
  grid-template-columns: 28px 56px minmax(0, 1fr) 130px 44px;
  grid-template-areas:
    "num media title status del"
    "num media sum status del";
  align-items: center;
  gap: 2px 14px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid var(--pd-line-2);
  background: transparent;
  color: var(--pd-ink);
}

.pd-studio .draft-item-card.is-open {
  background: #18181a;
}

.pd-studio-num {
  grid-area: num;
  color: var(--pd-mute);
  font-size: 18px;
}

.pd-studio .draft-item-media {
  position: relative;
  grid-area: media;
  width: 56px;
  height: 56px;
  overflow: hidden;
  background: #1c1c1e repeating-linear-gradient(135deg, transparent 0 6px, #26262a 6px 7px);
  cursor: pointer;
}

.pd-studio .draft-item-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-studio .draft-item-media span {
  display: none;
}

.pd-studio .draft-item-media:focus-visible {
  outline: 2px solid var(--pd-red) !important;
  outline-offset: 2px;
}

.pd-studio .draft-item-card.is-noimg .draft-item-media {
  border: 1px dashed var(--pd-red) !important;
  background: transparent;
}

.pd-studio .draft-item-card.is-noimg .draft-item-media img {
  opacity: 0.45;
}

.pd-studio .draft-item-card.is-noimg .draft-item-media::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  text-shadow: 0 0 6px #000;
  content: "+";
}

.pd-studio .draft-item-card label {
  display: none;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: var(--pd-mute);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pd-studio .draft-item-card .pd-studio-l-title {
  display: block;
  grid-area: title;
  font-size: 0 !important;
}

.pd-studio .draft-item-card .pd-studio-l-title input {
  width: 100%;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--pd-ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
}

.pd-studio .draft-item-card .pd-studio-l-title input:focus,
.pd-studio .draft-item-card .pd-studio-l-title input:focus-visible {
  border-bottom: 1px solid var(--pd-ink) !important;
  outline: none !important;
}

.pd-studio .draft-item-card .pd-studio-l-title input::placeholder {
  color: var(--pd-mute);
}

.pd-studio-sum {
  grid-area: sum;
  overflow: hidden;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.pd-studio .pd-studio-status {
  grid-area: status;
  justify-self: start;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--pd-red) !important;
  background: transparent;
  color: var(--pd-red-hi) !important;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pd-studio .pd-studio-status.is-ready {
  padding: 0;
  border: 0 !important;
  color: var(--pd-ink) !important;
}

.pd-studio .pd-studio-status:hover {
  background: rgba(225, 10, 23, 0.12);
}

.pd-studio .pd-studio-status.is-ready:hover {
  background: transparent;
  color: var(--pd-red-hi) !important;
}

.pd-studio .draft-item-card .remove-item {
  grid-area: del;
  justify-self: end;
  min-height: 0;
  border: 1px solid var(--pd-line);
  background: transparent;
  color: var(--pd-ink);
  clip-path: none;
}

.pd-studio .draft-item-card .remove-item:hover {
  border-color: var(--pd-red) !important;
  color: var(--pd-red-hi) !important;
}

.pd-studio .draft-item-card.is-open .pd-studio-l-image,
.pd-studio .draft-item-card.is-open .pd-studio-l-info,
.pd-studio .draft-item-card.is-open .pd-studio-l-field,
.pd-studio .draft-items-grid.is-list-view .pd-studio-l-image,
.pd-studio .draft-items-grid.is-list-view .pd-studio-l-info,
.pd-studio .draft-items-grid.is-list-view .pd-studio-l-field {
  display: grid;
  grid-column: 3 / 5;
  margin-top: 10px;
}

.pd-studio .draft-item-card label input,
.pd-studio .draft-item-card label textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--pd-line);
  background: var(--pd-bg);
  color: var(--pd-ink);
  font-family: var(--pd-display) !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.pd-studio .draft-item-card label textarea {
  min-height: 72px;
  resize: vertical;
}

.pd-studio .draft-item-card label input:focus,
.pd-studio .draft-item-card label textarea:focus {
  border-color: var(--pd-ink) !important;
  outline: none !important;
}

.pd-studio-rows-empty {
  margin: 0;
  padding: 28px 16px;
  border-top: 1px solid var(--pd-line-2);
  color: var(--pd-soft);
  font-size: 14px;
  text-align: center;
}

.pd-studio-rows-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--pd-line-2);
}

.pd-studio-view {
  display: flex;
  gap: 6px;
}

.pd-studio .pd-studio-view .pd-chip {
  min-height: 32px;
}

.pd-studio .pd-studio-view .pd-chip.is-active {
  border-color: var(--pd-ink) !important;
  background: var(--pd-ink);
  color: var(--pd-bg) !important;
}

/* ---------- right column: poster, checks, publish ---------- */

.pd-studio .pd-studio-poster {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  background: var(--pd-panel-2);
  cursor: pointer;
  text-align: left;
}

.pd-studio .pd-studio-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-studio .pd-studio-poster .pd-cover-title {
  font-size: 30px;
}

.pd-studio .pd-studio-poster .pd-tt {
  overflow-wrap: anywhere;
}

.pd-studio-poster-hint {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 5px 8px;
  background: var(--pd-red);
  color: #fff !important;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.pd-studio .pd-studio-poster:hover .pd-studio-poster-hint,
.pd-studio .pd-studio-poster:focus-visible .pd-studio-poster-hint {
  opacity: 1;
}

.pd-studio .pd-studio-poster:focus-visible {
  outline: 2px solid var(--pd-red) !important;
  outline-offset: -6px;
}

.pd-studio-focus {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.pd-studio-slider {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.pd-studio-slider input {
  width: 100%;
}

.pd-studio-checks-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.pd-studio-checks-head h2 {
  margin: 0;
  font-size: 20px;
}

.pd-studio-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--pd-line-2);
}

.pd-studio-check-mark {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #2a2a2d;
  color: #fff;
  font-size: 13px;
}

.pd-studio-check.is-pass .pd-studio-check-mark {
  background: var(--pd-ink);
  color: var(--pd-bg);
}

.pd-studio-check.is-fail .pd-studio-check-mark {
  background: var(--pd-red);
}

.pd-studio-check-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pd-studio-check-t {
  font-size: 14px;
  font-weight: 700;
}

.pd-studio-check-copy .pd-m {
  letter-spacing: 0.06em;
  text-transform: none;
}

.pd-studio-publish {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-studio .publish-button {
  width: 100%;
  min-height: 56px;
  font-size: 16px;
}

.pd-studio .publish-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}

.pd-studio .publish-button[disabled] {
  background: #1f1f22;
  color: #6e6e74 !important;
  cursor: not-allowed;
}

/* ---------- landing ---------- */

.pd-create-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 64px;
}

.pd-create-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  min-width: 0;
}

.pd-create-main .pd-create-headline {
  margin: 0;
  font-size: clamp(42px, 6vw, 100px);
  line-height: 0.9 !important;
}

.pd-create-lede {
  max-width: 560px;
  margin: 0;
  color: var(--pd-soft);
  font-size: 18px;
  line-height: 1.5;
}

.pd-create-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 620px;
  height: 58px;
  padding: 0 16px 0 20px;
  border: 1px solid var(--pd-line);
  background: var(--pd-panel);
  box-shadow: inset 4px 0 0 var(--pd-red);
  color: var(--pd-mute);
}

.pd-create-prompt:focus-within {
  border-color: var(--pd-ink) !important;
}

.pd-create-prompt input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--pd-ink);
  font-size: 16px;
  font-weight: 500;
  outline: none !important;
}

.pd-create-prompt input::placeholder {
  color: var(--pd-mute);
}

.pd-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pd-create-actions .pd-btn[disabled] {
  background: #1f1f22;
  color: #6e6e74 !important;
  cursor: progress;
}

.pd-create-note {
  margin: 0;
}

.pd-create-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.pd-create-main .pd-create-tile {
  display: block;
  aspect-ratio: 4 / 5;
  width: 100%;
  padding: 0;
  border: 0;
  background-color: var(--pd-panel-2);
  cursor: pointer;
  text-align: left;
  clip-path: var(--pd-cut-sm);
  transition: transform 0.15s ease;
}

.pd-create-tile-img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: grayscale(1) contrast(1.15) brightness(0.8);
  transition: filter 0.15s ease;
}

.pd-create-tile::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 4px;
  background: var(--pd-red);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.pd-create-tile:hover::after,
.pd-create-tile:focus-visible::after {
  transform: scaleX(1);
}

.pd-create-tile::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 11, 12, 0.85));
  content: "";
}

.pd-create-main .pd-create-tile:hover,
.pd-create-main .pd-create-tile:focus-visible {
  transform: translateY(-2px);
}

.pd-create-tile:hover .pd-create-tile-img,
.pd-create-tile:focus-visible .pd-create-tile-img {
  filter: grayscale(1) contrast(1.15) brightness(1.05);
}

.pd-create-tile .pd-cover-tag {
  top: 10px;
  left: 10px;
  padding: 4px 6px;
  font-size: 10px;
}

.pd-create-tile .pd-cover-title {
  right: 10px;
  bottom: 16px;
  left: 10px;
  font-size: 16px;
}

.pd-create-stripe {
  margin-bottom: 56px;
}

.pd-create-lib {
  padding-bottom: 64px;
}

.pd-create-lib .pd-section-head h2 {
  margin: 10px 0 14px;
}

.pd-create-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-create-counters span {
  padding: 6px 10px;
  border: 1px solid var(--pd-line);
  color: var(--pd-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pd-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.pd-create-grid .versus-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  cursor: pointer;
}

.pd-create-grid .versus-card .card-media {
  aspect-ratio: 16 / 10;
  min-height: 0;
  height: auto;
}

.pd-create-grid .versus-card .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 18px;
}

.pd-create-grid .versus-card h3 {
  margin: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.pd-create-grid .versus-card .card-body p {
  margin: 0;
  color: var(--pd-red-hi) !important;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pd-create-grid .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--pd-mute);
}

.pd-create-grid .draft-library-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.pd-create-grid .draft-library-actions button {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  background: #1f1f22;
  color: var(--pd-ink);
  cursor: pointer;
  font-stretch: 125%;
  font-style: italic;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  clip-path: var(--pd-slant-sm);
}

.pd-create-grid .draft-library-actions button:hover {
  background: var(--pd-red);
  color: #fff !important;
}

.pd-create-grid .empty-work {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 16px;
  padding: 28px;
  border: 1px dashed #3a3a3e !important;
  background: transparent;
  color: var(--pd-soft);
  clip-path: none;
}

.pd-create-grid .empty-work::before {
  display: none !important;
}

.pd-create-grid .empty-work svg {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--pd-mute);
}

.pd-create-grid .empty-work h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.pd-create-grid .empty-work p {
  margin: 0;
  font-size: 14px;
}

/* ---------- site.js overlays: AI plan flow ---------- */

body.ai-flow-open {
  overflow: hidden;
}

.ai-flow-modal[aria-hidden="true"] {
  display: none;
}

.ai-flow-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.ai-flow-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
}

.ai-flow-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(100%, 620px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid var(--pd-line);
  background: var(--pd-bg);
  box-shadow: inset 0 4px 0 var(--pd-red), 0 24px 60px rgba(0, 0, 0, 0.6);
  color: var(--pd-ink);
  clip-path: var(--pd-cut);
}

.ai-flow-panel [hidden] {
  display: none !important;
}

.ai-flow-panel .eyebrow {
  margin: 0;
}

.ai-flow-panel h2 {
  margin: 0;
  font-size: 28px;
}

.ai-flow-panel p {
  margin: 0;
  color: var(--pd-soft);
  font-size: 14px;
  line-height: 1.5;
}

.ai-flow-panel .ai-plan-estimate,
.ai-flow-panel .ai-progress-estimate {
  color: var(--pd-red-hi);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ai-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-mode-options label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 14px 18px;
  border: 1px solid var(--pd-line);
  background: var(--pd-panel);
  cursor: pointer;
}

.ai-mode-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ai-mode-options span {
  color: var(--pd-ink);
  font-family: var(--pd-display);
  font-stretch: 125%;
  font-style: italic;
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
}

.ai-mode-options small {
  color: var(--pd-mute);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-mode-options label:has(input:checked) {
  background: var(--pd-panel-2);
  box-shadow: inset 4px 0 0 var(--pd-red);
}

.ai-mode-options label:has(input:focus-visible) {
  outline: 2px solid var(--pd-red);
  outline-offset: 2px;
}

.ai-similar-warning {
  padding: 12px 14px 12px 18px;
  background: var(--pd-panel);
  box-shadow: inset 4px 0 0 var(--pd-red);
  color: var(--pd-soft);
  font-size: 13px;
  line-height: 1.5;
}

.ai-similar-warning a {
  color: var(--pd-red-hi);
}

.ai-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
}

.ai-plan-grid label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--pd-mute);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ai-plan-grid textarea,
.ai-plan-grid input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--pd-line);
  background: var(--pd-panel);
  color: var(--pd-ink);
  font-family: var(--pd-display) !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.ai-plan-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.ai-progress-shell {
  display: grid;
  gap: 10px;
}

.ai-progress-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}

.ai-progress-top strong {
  font-family: var(--pd-display);
  font-stretch: 125%;
  font-style: italic;
  font-weight: 900;
  font-size: 44px;
  line-height: 1;
}

.ai-progress-top span {
  color: var(--pd-mute);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ai-progress-track {
  position: relative;
  display: block;
  height: 14px;
  background: repeating-linear-gradient(110deg, #2a2a2d 0 5px, transparent 5px 9px);
}

.ai-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pd-ink) 55%, var(--pd-red-hi));
  -webkit-mask: repeating-linear-gradient(110deg, #000 0 5px, transparent 5px 9px);
  mask: repeating-linear-gradient(110deg, #000 0 5px, transparent 5px 9px);
  transition: width 0.22s ease;
}

.ai-flow-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--pd-line);
}

.ai-flow-actions .profile-action {
  min-height: 46px;
  padding: 0 26px;
  border: 0;
  background: #1f1f22;
  color: var(--pd-ink);
  cursor: pointer;
  font-stretch: 125%;
  font-style: italic;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  clip-path: var(--pd-slant);
}

.ai-flow-actions .profile-action.primary {
  background: var(--pd-red);
  color: #fff !important;
}

.ai-flow-actions .profile-action:disabled {
  color: #6e6e74 !important;
  cursor: not-allowed;
}

/* ---------- site.js overlays: confirm dialog ---------- */

.confirm-action-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 16px;
}

.confirm-action-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.confirm-action-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid var(--pd-line);
  background: var(--pd-bg);
  box-shadow: inset 0 4px 0 var(--pd-red);
  color: var(--pd-ink);
  clip-path: var(--pd-cut);
}

.confirm-action-panel::before {
  display: none !important;
}

.confirm-action-panel .confirm-action-kicker {
  margin: 0 0 10px;
  color: var(--pd-red-hi) !important;
  font-size: 11px !important;
  letter-spacing: 0.42em !important;
  text-transform: uppercase;
}

.confirm-action-panel h2 {
  margin: 0;
  font-size: 26px;
}

.confirm-action-panel p:not(.confirm-action-kicker) {
  margin: 12px 0 0;
  color: var(--pd-soft);
  font-size: 14px;
  line-height: 1.5;
}

.confirm-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.confirm-action-row button {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  cursor: pointer;
  font-stretch: 125%;
  font-style: italic;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  clip-path: var(--pd-slant);
}

.confirm-action-cancel {
  background: #1f1f22;
  color: var(--pd-ink);
}

.confirm-action-confirm {
  background: var(--pd-red);
  color: #fff !important;
}

/* ---------- legacy dark-mode overrides (home.css body.site-dark-mode … !important) ---------- */

.pd-studio .draft-items-grid .draft-item-card {
  background-color: transparent !important;
}

.pd-studio .draft-items-grid .draft-item-card.is-open {
  background-color: #18181a !important;
}

.pd-studio .draft-items-grid .draft-item-media {
  background-color: #1c1c1e !important;
}

.pd-studio .draft-items-grid .draft-item-card.is-noimg .draft-item-media {
  background-color: transparent !important;
}

.pd-studio .draft-item-card .pd-studio-l-title input {
  border-width: 0 0 1px !important;
  border-color: transparent !important;
  background-color: transparent !important;
}

.pd-studio .draft-item-card .pd-studio-l-title input:hover {
  border-bottom-color: #3a3a3e !important;
}

.pd-studio .draft-item-card .pd-studio-l-title input:focus {
  border-bottom-color: var(--pd-ink) !important;
}

.pd-studio .draft-item-card label:not(.pd-studio-l-title) input,
.pd-studio .draft-item-card label textarea {
  background-color: var(--pd-bg) !important;
}

.pd-create-home .pd-create-prompt.prompt-bar {
  background-color: var(--pd-panel) !important;
}

.ai-flow-modal .ai-flow-panel[role="dialog"] {
  background-color: var(--pd-bg) !important;
}

.ai-flow-modal .ai-flow-actions .profile-action {
  background-color: #1f1f22 !important;
}

.ai-flow-modal .ai-flow-actions .profile-action.primary {
  background-color: var(--pd-red) !important;
  color: #fff !important;
}

.ai-flow-modal .ai-flow-actions .profile-action.primary:hover {
  background-color: #ff2a33 !important;
}

.ai-flow-modal .ai-plan-grid textarea,
.ai-flow-modal .ai-plan-grid input {
  background-color: var(--pd-panel) !important;
}

/* ---------- responsive ---------- */

@media (max-width: 1300px) {
  .pd-studio-side {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 16px 28px;
  }

  .pd-studio-side > .pd-m,
  .pd-studio-side > .pd-studio-poster,
  .pd-studio-side > .pd-studio-focus {
    grid-column: 1;
  }

  .pd-studio-side > .pd-studio-checks,
  .pd-studio-side > .pd-studio-publish {
    grid-column: 2;
  }

  .pd-studio-side > .pd-studio-checks {
    grid-row: 1 / span 3;
  }
}

@media (max-width: 980px) {
  .pd-create-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-top: 36px;
  }
}

@media (max-width: 720px) {
  .pd-studio-side {
    display: flex;
  }

  .pd-studio .pd-studio-poster {
    max-width: none;
  }

  .pd-studio-steps a {
    flex: 1 1 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    padding: 12px 10px;
  }

  .pd-studio-steps a .pd-d {
    font-size: 22px;
  }

  .pd-studio-steps a .pd-m {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .pd-studio-grid {
    gap: 36px;
    padding-top: 24px;
  }

  .pd-studio-items-head h2 {
    font-size: 34px;
  }

  .pd-studio-thead {
    display: none;
  }

  .pd-studio .draft-item-card {
    grid-template-columns: 24px 48px minmax(0, 1fr) 40px;
    grid-template-areas:
      "num media title del"
      "num media sum del"
      "num media status del";
    gap: 2px 10px;
    padding: 12px;
  }

  .pd-studio .draft-item-media {
    width: 48px;
    height: 60px;
  }

  .pd-studio .draft-item-card .remove-item {
    width: 40px;
    height: 40px;
  }

  .pd-studio .pd-studio-status {
    min-height: 28px;
    margin-top: 4px;
  }

  .pd-studio .draft-item-card.is-open .pd-studio-l-image,
  .pd-studio .draft-item-card.is-open .pd-studio-l-info,
  .pd-studio .draft-item-card.is-open .pd-studio-l-field,
  .pd-studio .draft-items-grid.is-list-view .pd-studio-l-image,
  .pd-studio .draft-items-grid.is-list-view .pd-studio-l-info,
  .pd-studio .draft-items-grid.is-list-view .pd-studio-l-field {
    grid-column: 1 / -1;
  }

  .pd-create-tiles {
    grid-template-columns: none;
    grid-auto-columns: 40%;
    grid-auto-flow: column;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .pd-create-tile {
    scroll-snap-align: start;
  }

  .pd-create-actions .pd-btn {
    flex: 1 1 100%;
  }

  .pd-create-lede {
    font-size: 16px;
  }

  .ai-plan-grid,
  .ai-mode-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-flow-panel {
    padding: 22px 18px;
  }
}

/* =====================================================================
   List studio redesign: studio home "blank poster" + 3-step editor
   (markup: create.html, behaviour: pd/create.js)
   ===================================================================== */

/* ---------- editor bar ---------- */
.pd-studio-bar { background: var(--pd-panel); }
.pd-studio-bar-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pd-studio-bar-name .pd-d { max-width: 46vw; overflow: hidden; font-size: 20px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.pd-studio-bar-name .pd-m { color: var(--pd-mute); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.pd-studio-bar-name .pd-studio-mode { padding: 0; border: 0; }

html body .pd-studio .pd-studio-back {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--pd-line) !important;
  background: transparent !important;
  color: var(--pd-soft) !important;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

html body .pd-studio .pd-studio-back:hover { border-color: var(--pd-ink) !important; color: var(--pd-ink) !important; }

/* ---------- steps (buttons now) ---------- */
html body .pd-studio .pd-studio-steps > button {
  display: flex;
  flex: 1 1 200px;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 14px var(--pd-gutter);
  border: 0 !important;
  background: transparent !important;
  color: var(--pd-ink) !important;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 transparent;
}

.pd-studio-steps > button .pd-d { color: #4a4a4f; font-size: 28px; }
.pd-studio-steps > button .pd-m { color: var(--pd-soft); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
html body .pd-studio .pd-studio-steps > button:hover { background: #111112 !important; }
html body .pd-studio .pd-studio-steps > button.is-done { box-shadow: inset 0 -3px 0 var(--pd-yellow); }
.pd-studio-steps > button.is-done .pd-d { color: var(--pd-ink); }
.pd-studio-steps > button.is-done .pd-m::after { content: " ✓"; color: var(--pd-yellow); }
html body .pd-studio .pd-studio-steps > button.is-on { background: var(--pd-panel) !important; box-shadow: inset 0 -3px 0 var(--pd-red); }
.pd-studio-steps > button.is-on .pd-d { color: var(--pd-red-hi); }
.pd-studio-steps > button.is-on .pd-m { color: var(--pd-ink); }
html body .pd-studio .pd-studio-steps > button:focus-visible { outline: 2px solid var(--pd-ink) !important; outline-offset: -4px; }

/* ---------- what each step shows ---------- */
.pd-studio[data-pd-step="items"] .pd-studio-setup,
.pd-studio[data-pd-step="items"] .pd-studio-summary,
.pd-studio[data-pd-step="items"] .pd-studio-poster-label,
.pd-studio[data-pd-step="items"] .pd-studio-poster,
.pd-studio[data-pd-step="items"] .pd-studio-focus,
.pd-studio[data-pd-step="items"] .pd-studio-publish,
.pd-studio[data-pd-step="details"] .pd-studio-items,
.pd-studio[data-pd-step="details"] .pd-studio-duel,
.pd-studio[data-pd-step="details"] .pd-studio-summary,
.pd-studio[data-pd-step="details"] .pd-studio-checks,
.pd-studio[data-pd-step="details"] .pd-studio-publish,
.pd-studio[data-pd-step="publish"] .pd-studio-setup,
.pd-studio[data-pd-step="publish"] .pd-studio-items,
.pd-studio[data-pd-step="publish"] .pd-studio-duel,
.pd-studio[data-pd-step="publish"] .pd-studio-focus { display: none !important; }

.pd-studio[data-pd-step] .pd-studio-grid { gap: 36px; }
.pd-studio[data-pd-step="items"] .pd-studio-items { flex: 999 1 620px; }
.pd-studio[data-pd-step="details"] .pd-studio-setup { flex: 999 1 560px; max-width: 760px; }

.pd-studio[data-pd-step="items"] .pd-studio-side,
.pd-studio[data-pd-step="details"] .pd-studio-side {
  display: flex;
  flex: 1 1 340px;
  flex-direction: column;
  gap: 18px;
}

.pd-studio[data-pd-step="publish"] .pd-studio-side {
  display: grid;
  flex: 1 1 100%;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.85fr);
  grid-template-areas:
    "summary label"
    "summary poster"
    "checks poster"
    "publish poster";
  align-items: start;
  gap: 18px 44px;
  max-width: 1200px;
  margin: 0 auto;
}

.pd-studio[data-pd-step="publish"] .pd-studio-summary { grid-area: summary; }
.pd-studio[data-pd-step="publish"] .pd-studio-poster-label { grid-area: label; }
.pd-studio[data-pd-step="publish"] .pd-studio-poster { grid-area: poster; }
.pd-studio[data-pd-step="publish"] .pd-studio-checks { grid-area: checks; }
.pd-studio[data-pd-step="publish"] .pd-studio-publish { grid-area: publish; }
.pd-studio-poster-label { color: var(--pd-soft); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- step 1: contenders as poster cards ---------- */
.pd-studio[data-pd-step="items"] .pd-studio-thead { display: none; }
.pd-studio[data-pd-step="items"] .pd-studio-table { border: 0; background: transparent; }

html body .pd-studio[data-pd-step="items"] .draft-items-grid.pd-studio-rows:not(.is-list-view) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

html body .pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 4px;
  border: 1px solid var(--pd-line) !important;
  background-color: var(--pd-panel) !important;
}

html body .pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card:hover { border-color: #4a4a4f !important; }
html body .pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card.is-open { grid-column: 1 / -1; border-color: var(--pd-ink) !important; }

.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-media { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card.is-open .draft-item-media { max-width: 360px; }

.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .pd-studio-num {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 7px;
  background: #0b0b0c;
  color: var(--pd-ink);
  font-size: 13px;
}

.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .pd-studio-l-title { padding: 10px 12px 0; }
.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .pd-studio-l-title input { font-size: 17px; }
.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .pd-studio-sum { padding: 2px 12px 0; color: var(--pd-mute); font-size: 11px; }

.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card.is-open .pd-studio-l-image,
.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card.is-open .pd-studio-l-info,
.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card.is-open .pd-studio-l-field { padding: 0 12px; }

html body .pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .remove-item {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0 !important;
  background: #0b0b0c !important;
}

.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .pd-studio-status { order: 99; align-self: flex-start; margin: 10px 12px 6px; }

.pd-studio-paste {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--pd-line);
  background: var(--pd-panel);
}

.pd-studio-paste label { color: var(--pd-soft); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
html body .pd-studio .pd-studio-paste textarea { min-height: 110px; padding: 12px; border: 1px solid #3a3a3e !important; background-color: var(--pd-bg) !important; color: var(--pd-ink) !important; font: 500 15px/1.6 var(--pd-mono) !important; resize: vertical; }
.pd-studio-paste-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pd-studio-paste-foot .pd-m { color: var(--pd-soft); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

/* live duel */
.pd-studio-duel { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--pd-line); background: var(--pd-panel); }
.pd-studio-duel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pd-studio-duel-head h2 { margin: 0; color: var(--pd-soft); font-size: 11px !important; letter-spacing: 0.16em; text-transform: uppercase; }
html body .pd-studio .pd-studio-duel-head button { min-height: 36px; padding: 0 12px; border: 1px solid #3a3a3e !important; background: transparent !important; color: var(--pd-ink) !important; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }
.pd-studio-duel-stage { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pd-studio-duel-card { position: relative; margin: 0; aspect-ratio: 3 / 4; overflow: hidden; background: #1c1c1e; }
.pd-studio-duel-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pd-studio-duel-card figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: 8px 10px; overflow: hidden; background: #0b0b0c; font-size: 14px !important; text-overflow: ellipsis; white-space: nowrap; }
.pd-studio-duel-vs { position: absolute; top: 44%; left: 50%; z-index: 1; padding: 8px 12px; background: var(--pd-red); color: #fff; font-size: 20px !important; transform: translate(-50%, -50%); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.pd-studio-duel-empty { grid-column: 1 / -1; margin: 0; padding: 40px 12px; border: 2px dashed #3a3a3e; color: var(--pd-soft); text-align: center; }

/* ---------- step 3: publish summary ---------- */
.pd-studio-summary { display: flex; flex-direction: column; gap: 14px; }
.pd-studio-summary-kicker { color: var(--pd-yellow); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.pd-studio-summary-kicker.is-blocked { color: var(--pd-red-hi); }
.pd-studio-summary h2 { margin: 0; font-size: clamp(44px, 5vw, 64px) !important; line-height: 0.9 !important; }
.pd-studio-summary p { max-width: 520px; margin: 0; color: var(--pd-soft); font-size: 16px; line-height: 1.55; }
.pd-studio-summary-list { margin: 6px 0 0; border: 1px solid var(--pd-line); background: var(--pd-panel); }
.pd-studio-summary-list > div { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--pd-line); }
.pd-studio-summary-list > div:first-child { border-top: 0; }
.pd-studio-summary-list dt { color: var(--pd-soft); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.pd-studio-summary-list dd { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.pd-studio-summary-thumbs { display: flex; gap: 4px; }
.pd-studio-summary-thumbs img { display: block; width: 30px; height: 30px; object-fit: cover; }
html body .pd-studio .pd-studio-summary-list button { min-height: 36px; padding: 0 8px; border: 0 !important; background: transparent !important; color: var(--pd-soft) !important; font-size: 10px; letter-spacing: 0.16em; text-decoration: underline; text-transform: uppercase; cursor: pointer; }
html body .pd-studio .pd-studio-summary-list button:hover { color: var(--pd-ink) !important; }

/* =====================================================================
   Studio home
   ===================================================================== */
.pd-sh {
  display: flex;
  flex-direction: column;
  gap: 44px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 44px var(--pd-gutter) 88px;
}

.pd-sh-intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.pd-sh-intro-copy { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.pd-sh-title { margin: 0; font-size: clamp(48px, 6vw, 80px) !important; line-height: 0.9 !important; }
.pd-sh-lede { margin: 0; color: var(--pd-soft); font-size: 17px; line-height: 1.55; }

.pd-sh-progress { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pd-sh-progress li { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.pd-sh-bar { display: block; height: 6px; background: #2a2a2d; }
.pd-sh-bar i { display: block; width: calc(var(--fill, 0) * 100%); height: 100%; background: var(--pd-red); transition: width 0.3s ease; }
.pd-sh-progress li.is-done .pd-sh-bar i { background: var(--pd-yellow); }
.pd-sh-step { display: flex; align-items: baseline; gap: 8px; }
.pd-sh-step .pd-m { color: var(--pd-mute); font-size: 10px; letter-spacing: 0.14em; }
.pd-sh-step strong { color: var(--pd-soft); font-size: 15px; }
.pd-sh-progress li.is-done .pd-sh-step .pd-m { color: var(--pd-yellow); }
.pd-sh-progress li.is-on .pd-sh-step .pd-m { color: var(--pd-red-hi); }
.pd-sh-progress li.is-on .pd-sh-step strong,
.pd-sh-progress li.is-done .pd-sh-step strong { color: var(--pd-ink); }

.pd-sh-main { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }

/* the poster */
html body .pd-sh .pd-sh-poster.prompt-bar {
  position: relative;
  display: flex;
  flex: 1.7 1 620px;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 40px 40px 30px;
  border: 0 !important;
  background: #f4f4f1 !important;
  color: #0b0b0c;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
  transform: rotate(-0.8deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  clip-path: none;
}

html body .pd-sh .pd-sh-poster.prompt-bar:focus-within { transform: rotate(0deg); }

.pd-sh-pin { position: absolute; top: -18px; right: 32px; padding: 8px 14px; background: var(--pd-red); color: #fff !important; font-size: 18px !important; line-height: 1; }
.pd-sh-field { display: flex; flex-direction: column; gap: 8px; }
.pd-sh .pd-m { letter-spacing: 0.16em; text-transform: uppercase; }
.pd-sh-poster .pd-m,
.pd-sh-poster legend { color: #45454b !important; font-size: 11px; }

html body .pd-sh .pd-sh-poster .pd-sh-field input.pd-sh-name:not([type="checkbox"]) {
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  padding: 2px 0 12px !important;
  border: 0 !important;
  border-bottom: 4px solid #0b0b0c !important;
  border-radius: 0;
  background: transparent !important;
  color: #0b0b0c !important;
  font: italic 900 clamp(30px, 3.4vw, 50px) / 1.05 var(--pd-display) !important;
  font-stretch: 125% !important;
  text-transform: uppercase;
  outline: none !important;
  box-shadow: none !important;
}

html body .pd-sh .pd-sh-poster .pd-sh-field input.pd-sh-name::placeholder { color: #b4b4ae !important; }
html body .pd-sh .pd-sh-poster .pd-sh-field input.pd-sh-name:focus { border-bottom-color: var(--pd-red) !important; }

.pd-sh-cats { margin: 0; padding: 0; border: 0; }
.pd-sh-cats legend { padding: 0; margin-bottom: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.pd-sh-chips { display: flex; flex-wrap: wrap; gap: 8px; }

html body .pd-sh .pd-sh-chips > button {
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid #c9c9c4 !important;
  background: transparent !important;
  color: #0b0b0c !important;
  font: 700 14px var(--pd-display) !important;
  cursor: pointer;
  clip-path: none;
}

html body .pd-sh .pd-sh-chips > button:hover { border-color: #0b0b0c !important; }
html body .pd-sh .pd-sh-chips > button[aria-pressed="true"] { border-color: #0b0b0c !important; background: #0b0b0c !important; color: #f4f4f1 !important; }

html body .pd-sh .pd-sh-chips select {
  min-height: 42px;
  padding: 0 12px;
  border: 2px solid #c9c9c4 !important;
  background-color: transparent !important;
  color: #0b0b0c !important;
  font: 700 14px var(--pd-display) !important;
  cursor: pointer;
}

html body .pd-sh .pd-sh-chips select.is-on { border-color: #0b0b0c !important; background-color: #0b0b0c !important; color: #f4f4f1 !important; }

.pd-sh-contenders { display: flex; flex-direction: column; gap: 12px; }
.pd-sh-contenders-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.pd-sh-tools { display: flex; gap: 16px; }

html body .pd-sh .pd-sh-tools button,
html body .pd-sh .pd-sh-moreslots {
  min-height: 36px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: #0b0b0c !important;
  font-size: 10px;
  text-decoration: underline;
  text-decoration-color: var(--pd-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  cursor: pointer;
}

.pd-sh-paste { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #e8e8e3; }

html body .pd-sh .pd-sh-paste textarea {
  min-height: 110px;
  padding: 12px;
  border: 2px solid #0b0b0c !important;
  background-color: #fff !important;
  color: #0b0b0c !important;
  font: 500 15px/1.6 var(--pd-mono) !important;
  resize: vertical;
}

.pd-sh-paste .pd-btn { align-self: flex-start; }

.pd-sh-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }

.pd-sh-slot {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #e8e8e3;
  outline: 2px dashed #b4b4ae;
  outline-offset: -2px;
  transition: outline-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-sh-slot.is-filled { outline: 0; background: #1c1c1e; }
.pd-sh-slot:focus-within { outline: 0; box-shadow: inset 0 0 0 3px #0b0b0c; background: #fff; }
.pd-sh-slot.is-filled:focus-within { box-shadow: 0 0 0 3px var(--pd-red); }
.pd-sh-slot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-sh-slot-num { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 3px 6px; color: #45454b !important; font-size: 9px !important; }
.pd-sh-slot.is-filled .pd-sh-slot-num { background: #0b0b0c; color: #f4f4f1 !important; }

.pd-sh-slot-plus { position: absolute; inset: 0 0 40px; display: grid; place-items: center; pointer-events: none; }
.pd-sh-slot-plus::before,
.pd-sh-slot-plus::after { content: ""; position: absolute; width: 22px; height: 2px; background: #8a8a90; }
.pd-sh-slot-plus::after { transform: rotate(90deg); }
.pd-sh-slot.is-filled .pd-sh-slot-plus { display: none; }

.pd-sh-slot-field { position: absolute; right: 0; bottom: 0; left: 0; display: flex; }

html body .pd-sh .pd-sh-slot-field input:not([type="checkbox"]) {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #0b0b0c !important;
  font: 800 14px var(--pd-display) !important;
  outline: none !important;
  box-shadow: none !important;
}

html body .pd-sh .pd-sh-slot.is-filled .pd-sh-slot-field input:not([type="checkbox"]) { background: #0b0b0c !important; color: #f4f4f1 !important; }
html body .pd-sh .pd-sh-slot-field input::placeholder { color: #8a8a90 !important; }

.pd-sh-contenders-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.pd-sh-note { margin: 0; color: #45454b; font-size: 13px; line-height: 1.5; }

.pd-sh-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 20px; border-top: 2px solid #0b0b0c; }
.pd-sh-status { color: #45454b; font-size: 14px; }

/* live duel */
.pd-sh-preview { display: flex; flex: 1 1 340px; flex-direction: column; gap: 14px; min-width: 0; padding-top: 8px; }
.pd-sh-preview h2 { margin: 0; color: var(--pd-soft); font-size: 11px !important; }
.pd-sh-preview-copy { margin: 0; color: var(--pd-soft); font-size: 14px; line-height: 1.5; }
.pd-sh-preview .pd-btn { align-self: flex-start; }
.pd-sh-duel { position: relative; display: flex; flex-direction: column; gap: 8px; }
.pd-sh-duel-card { position: relative; margin: 0; aspect-ratio: 16 / 11; overflow: hidden; background: #1c1c1e; }
.pd-sh-duel-card:first-child { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), 0 100%); }
.pd-sh-duel-card:last-child { clip-path: polygon(0 18px, 100% 0, 100% 100%, 0 100%); }
.pd-sh-duel-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pd-sh-duel-card figcaption { position: absolute; left: 0; bottom: 18px; max-width: 90%; padding: 10px 14px; overflow: hidden; background: #0b0b0c; font-size: 22px !important; text-overflow: ellipsis; white-space: nowrap; }
.pd-sh-duel-card:last-child figcaption { right: 0; bottom: 0; left: auto; }
.pd-sh-duel-card.is-empty { background: #141415 repeating-linear-gradient(135deg, transparent 0 10px, #1c1c1e 10px 11px); }
.pd-sh-duel-card.is-empty figcaption { color: var(--pd-mute); }
.pd-sh-duel-vs { position: absolute; top: 50%; left: 50%; z-index: 1; padding: 10px 18px; background: var(--pd-red); color: #fff; font-size: 30px !important; transform: translate(-50%, -50%); clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }

/* shelf */
.pd-sh-shelf { display: flex; flex-direction: column; gap: 16px; }
.pd-sh-shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.pd-sh-shelf-head h2 { margin: 0; font-size: 30px !important; }
.pd-sh-shelf-head .create-counters { display: flex; gap: 12px; color: var(--pd-soft); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.pd-sh-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.pd-sh-grid .versus-card .card-media { aspect-ratio: 4 / 5; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .pd-studio[data-pd-step="publish"] .pd-studio-side {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "summary" "checks" "label" "poster" "publish";
  }
}

@media (max-width: 720px) {
  .pd-sh { gap: 32px; padding-top: 28px; }
  .pd-sh-progress { width: 100%; }
  .pd-sh-progress li { flex: 1 1 0; min-width: 0; }
  .pd-sh-step { flex-direction: column; gap: 2px; }
  html body .pd-sh .pd-sh-poster.prompt-bar,
  html body .pd-sh .pd-sh-poster.prompt-bar:focus-within { padding: 30px 18px 22px; transform: none; }
  .pd-sh-pin { right: 18px; }
  .pd-sh-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-sh-foot .pd-btn { flex: 1 1 100%; }
  .pd-sh-duel-card figcaption { font-size: 17px !important; }
  .pd-studio-bar-name .pd-d { max-width: 60vw; }
  .pd-studio-summary-list > div { grid-template-columns: minmax(0, 1fr) auto; }
  .pd-studio-summary-list dt { grid-column: 1 / -1; }
  html body .pd-studio[data-pd-step="items"] .draft-items-grid.pd-studio-rows:not(.is-list-view) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html body .pd-sh .pd-sh-poster.prompt-bar { transition: none; }
}

/* Card view: auto-found images get a small tag instead of a big "+" (click the image to set your own). */
html body .pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card.is-noimg .draft-item-media { border: 0 !important; }
.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card.is-noimg .draft-item-media img { opacity: 1; }
.pd-studio[data-pd-step="items"] .draft-items-grid:not(.is-list-view) .draft-item-card.is-noimg .draft-item-media::after {
  inset: auto auto 8px 8px;
  display: block;
  padding: 4px 7px;
  background: #0b0b0c;
  color: var(--pd-soft);
  font: 500 9px var(--pd-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: none;
  content: "Auto image · set yours";
}

@media (max-width: 720px) {
  html body .pd-sh .pd-sh-poster .pd-sh-field input.pd-sh-name:not([type="checkbox"]) { font-size: 24px !important; }
  .pd-sh-slot { aspect-ratio: 1 / 1; }
}
