.poster-studio {
  --ps-ink: #e4eaf0;
  --ps-line: #303640;
  --ps-muted: #9ba6b3;
  color: var(--ps-ink);
  background: #14171c;
  font:
    13px/1.45 Arial,
    sans-serif;
  min-height: 100dvh;
}
.poster-studio * {
  box-sizing: border-box;
}
.poster-studio button,
.poster-studio input,
.poster-studio select {
  font: inherit;
}
.poster-studio button {
  color: inherit;
  background: #222831;
  border: 1px solid #3a4654;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  min-height: 34px;
}
.poster-studio button:hover {
  border-color: #a9cde5;
}
.poster-studio button:disabled {
  opacity: 0.4;
  cursor: default;
}
.poster-studio button:focus-visible,
.poster-studio input:focus-visible,
.poster-studio select:focus-visible {
  outline: 2px solid #a7dcff;
  outline-offset: 3px;
}
.poster-studio button[aria-pressed="true"] {
  background: #344959;
  border-color: #93c5e4;
  color: #fff;
}
.ps-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--ps-line);
  gap: 20px;
}
.ps-header > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.ps-header a {
  color: #a7c8de;
  text-decoration: none;
  letter-spacing: 0.15em;
  font-size: 15px;
}
.ps-header h1 {
  font-size: 21px;
  font-weight: 300;
  letter-spacing: 0.025em;
}
.ps-brand {
  color: var(--ps-muted);
  font-size: 11px;
}
.ps-save {
  display: flex;
  gap: 8px;
}
.ps-save button:first-child {
  background: #d1e4ef;
  color: #122130;
  border-color: #d1e4ef;
  font-weight: 600;
}
.ps-layout {
  display: grid;
  grid-template-columns: 290px minmax(300px, 1fr) 340px;
  height: calc(100dvh - 78px);
}
.ps-tools,
.ps-library {
  overflow: auto;
  padding: 20px;
  border-right: 1px solid var(--ps-line);
  scrollbar-width: thin;
}
.ps-library {
  border-left: 1px solid var(--ps-line);
  border-right: 0;
  background: #101318;
}
.poster-studio fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  min-width: 0;
}
.poster-studio fieldset:disabled {
  opacity: 0.6;
}
.poster-studio legend {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ps-muted);
  margin-bottom: 9px;
}
.ps-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ps-choices button {
  font-size: 11px;
  flex: 1 1 auto;
}
.ps-title,
.ps-tools > fieldset > label:not(.ps-range):not(.ps-check) {
  display: block;
  margin-bottom: 18px;
  color: #b7c2cc;
}
.poster-studio
  input:not([type="range"]):not([type="checkbox"]):not([type="color"]),
.poster-studio select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  background: #1c222a;
  color: var(--ps-ink);
  border: 1px solid #3a4654;
  border-radius: 4px;
}
.ps-range {
  display: grid;
  grid-template-columns: 85px minmax(30px, 1fr) 48px;
  gap: 6px;
  align-items: center;
  margin: 11px 0;
  font-size: 11px;
}
.ps-range input {
  width: 100%;
  accent-color: #a1cee8;
}
.ps-range output {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #adc4d2;
}
.ps-workspace {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  min-height: 0;
  padding: 14px 24px 10px;
  background: radial-gradient(ellipse at 50% 35%, #30353d, #1c2026 70%);
}
.ps-crop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin-bottom: 12px;
}
.ps-crop fieldset {
  margin: 0;
}
.ps-crop legend {
  display: none;
}
.ps-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #abbac6;
}
.ps-check input {
  accent-color: #addaff;
}
.ps-poster {
  position: relative;
  width: min(100%, calc((100dvh - 255px) * 0.7));
  flex-shrink: 0;
  background: #181b20;
  box-shadow: 0 14px 45px #0008;
  overflow: hidden;
}
.ps-poster canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.ps-safe {
  position: absolute;
  inset: 5%;
  border: 1px dashed #eaf7ff90;
  pointer-events: none;
}
.ps-gesture {
  font-size: 10px;
  color: #a2adb7;
  margin: 14px 0 0;
}
.ps-status {
  font-size: 12px;
  max-width: 100%;
  text-align: center;
  margin: 8px 0;
  color: #d8e4ed;
}
.ps-library h2 {
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 10px;
}
.ps-library h2 small {
  color: #81919f;
  margin-left: 6px;
}
.ps-library-heading {
  margin-bottom: 20px;
}
.ps-library-heading button {
  font-size: 11px;
  width: 100%;
}
.ps-library > p {
  color: #7f8c9a;
  font-size: 12px;
}
.ps-library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 10px;
}
.ps-library article {
  min-width: 0;
}
.ps-library .ps-thumb {
  display: block;
  padding: 0;
  border-radius: 0;
  width: 100%;
  background: none;
  border: 1px solid #ffffff18;
  overflow: hidden;
}
.ps-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 7/10;
  object-fit: cover;
}
.ps-library h3 {
  font-size: 11px;
  font-weight: 400;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.ps-library article > span {
  font-size: 9px;
  color: #8897a5;
}
.ps-library-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 3px;
  margin-top: 8px;
}
.ps-library-actions button {
  font-size: 9px;
  min-height: 25px;
  padding: 3px 5px;
}
.is-open .ps-thumb {
  outline: 2px solid #a7d8f5;
}
.poster-studio input[type="color"] {
  width: 40px;
  height: 25px;
  padding: 0;
  border: 0;
  vertical-align: middle;
  margin-left: 12px;
}
@media (max-width: 1100px) {
  .ps-layout {
    grid-template-columns: 260px 1fr;
    height: auto;
    min-height: calc(100dvh - 78px);
  }
  .ps-tools {
    max-height: calc(100dvh - 78px);
  }
  .ps-workspace {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: calc(100dvh - 78px);
  }
  .ps-library {
    grid-column: 1/-1;
    border-top: 1px solid var(--ps-line);
  }
  .ps-library-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .ps-brand {
    display: none;
  }
  .ps-poster {
    width: min(100%, calc((100dvh - 255px) * 0.7));
  }
}
@media (max-width: 640px) {
  .ps-header {
    height: auto;
    min-height: 100px;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 8px;
  }
  .ps-header h1 {
    margin: 0;
    font-size: 20px;
  }
  .ps-save {
    width: 100%;
  }
  .ps-save button {
    flex: 1;
    font-size: 11px;
  }
  .ps-layout {
    display: flex;
    flex-direction: column;
  }
  .ps-workspace {
    order: 0;
    position: static;
    min-height: 0;
    padding: 15px 20px;
    width: 100%;
  }
  .ps-poster {
    width: min(100%, 340px);
  }
  .ps-tools {
    order: 1;
    max-height: none;
    width: 100%;
    padding: 22px;
  }
  .ps-tools > fieldset {
    display: block;
  }
  .ps-library {
    order: 2;
    width: 100%;
  }
  .ps-range {
    grid-template-columns: 115px 1fr 45px;
  }
  .ps-choices button {
    min-height: 39px;
  }
  .ps-library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* One stable rhythm for all art-direction choices; no native selects. */
.ps-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.ps-choices button{width:100%;height:42px;min-height:42px;padding:5px 7px;line-height:1.2;white-space:normal;overflow-wrap:anywhere;border-radius:8px}
.ps-picker{margin-bottom:22px}.ps-picker-search{display:block;font-size:11px;color:var(--ps-muted)}
.ps-picker-scroll{max-height:242px;overflow:auto;margin-top:9px;padding-right:3px;scrollbar-width:thin}
.ps-picker>fieldset>legend{display:none}.ps-picker>fieldset{margin:9px 0 0}
.ps-crop .ps-choices{grid-template-columns:repeat(2,95px)}
.ps-poster{border-radius:10px}.ps-safe{border-radius:0}
.ps-library-guide{font-size:11px;color:#b9c6d1;line-height:1.6;margin:12px 0 20px}
.ps-library-guide summary{cursor:pointer;color:#dce8ee}.ps-library-guide ol{padding-left:18px}
.ps-print-progress{width:100%;accent-color:#b6dfff;height:8px}.ps-print-links{display:grid;gap:5px;margin-top:8px}.ps-print-links a{color:#b7dff4;font-size:10px}
.ps-color-field{height:136px;border-radius:10px;position:relative;touch-action:none;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent);cursor:crosshair;border:1px solid #ffffff25;margin:4px 0 12px}.ps-color-field>span{position:absolute;width:13px;height:13px;border:2px solid white;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 1px 4px #000a;pointer-events:none}.ps-hue{appearance:none;-webkit-appearance:none;display:block;width:100%;height:11px;border-radius:8px;background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red);margin:8px 0 16px}.ps-hue::-webkit-slider-thumb{appearance:none;width:16px;height:16px;border:2px solid white;border-radius:50%;background:transparent;box-shadow:0 1px 4px #0008}.ps-swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.poster-studio .ps-swatches button{height:27px;min-height:27px;padding:0;border-radius:6px;border:1px solid #ffffff35}.poster-studio .ps-swatches button[aria-pressed=true]{outline:2px solid white;outline-offset:2px}.ps-hex{display:flex;gap:10px;align-items:center;margin-top:12px}.ps-hex>span{width:27px;height:27px;flex:none;border:1px solid #ffffff35;border-radius:50%}.poster-studio .ps-hex input{margin:0!important;letter-spacing:.12em;font-size:11px!important}
.ps-stepper{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:8px}.poster-studio .ps-stepper button{min-height:34px;font-size:11px;color:#bbd9ec;background:#18232e;border-radius:8px}.ps-workspace>.ps-status{overflow-wrap:anywhere}
.ps-scene-note{font-size:10px;color:#adbdca;margin:6px 0 0;text-align:center}
.poster-studio .ps-open-folder{font-size:11px;line-height:1.2;min-height:30px;padding:6px 8px}

.ps-choices.ps-choices-compact{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.ps-choices.ps-choices-compact button{height:30px;min-height:30px;padding:3px 6px;font-size:11px}

.ps-twist{display:flex;align-items:center;gap:10px;width:min(100%,420px);margin-top:10px;flex-shrink:0}.ps-twist .ps-range{flex:1;margin:0;grid-template-columns:88px 1fr 35px}.poster-studio .ps-twist button{padding:5px 10px;min-height:28px;font-size:11px}.ps-twist+.ps-gesture{margin-top:6px}
@media(min-width:761px){.ps-workspace:has(.ps-twist) .ps-poster{width:min(100%,calc((100dvh - 285px) * .7))}}

.ps-store-status{margin:16px 0}.ps-store-status a{color:#b5dcf5;font-size:12px}.ps-order-list{padding:0;list-style:none;max-height:200px;overflow:auto}.ps-order-list li{display:grid;gap:3px;padding:9px 0;border-bottom:1px solid #ffffff15}.ps-order-list strong{font-size:11px;font-weight:500}.ps-order-list span{font-size:10px;color:#a6b9c8}.ps-store-status h3{font-size:12px;font-weight:500}

.poster-studio .ps-toggle{padding:8px 10px;font-size:11px;min-height:32px;border-radius:8px}.poster-studio .ps-auto-title{font-size:10px;padding:5px 9px;margin:6px 0 14px;min-height:25px;color:#bbd9ec}

.poster-studio .ps-card-controls{margin-block:12px;padding:0}.ps-card-controls>.ps-toggle{width:100%;margin:0}.ps-precise{margin:12px 0}.ps-precise>span{display:block;font-size:12px;margin-bottom:6px;color:#b9c9d7}.ps-precise>div{display:grid;grid-template-columns:34px minmax(0,1fr) 34px;gap:6px}.ps-precise input{width:100%;min-width:0;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.ps-precise button{padding:5px;min-height:32px}
.ps-precise>div{align-items:stretch}.ps-precise>div>button,.ps-precise>div>input{box-sizing:border-box;height:36px;min-height:36px;margin:0;padding-block:0;line-height:normal}.ps-precise>div>button{display:flex;align-items:center;justify-content:center}
.poster-studio .ps-precise>div>input{margin:0!important;padding:0 9px!important}

/* One connected-store action; selection is separate from edit/delete controls. */
.ps-library-heading{margin-bottom:10px}
.poster-studio .ps-publish-selected{width:100%;font-size:11px;min-height:34px;margin:0}
.poster-studio .ps-store-select{display:block;width:100%;margin-top:10px;font-size:10px;line-height:1.3;min-height:28px;padding:5px 6px}
.ps-library .ps-help{margin:8px 0 12px;font-size:11px;line-height:1.5}

.ps-library-counts{font-size:12px;color:#c2d1dd;margin:0 0 12px}
.ps-selection-tools{display:flex;gap:8px;margin-bottom:8px}.poster-studio .ps-selection-tools button{flex:1;font-size:11px;min-height:32px;padding:6px}
.poster-studio .ps-publication-badge{display:block;width:fit-content;font-size:11px;font-weight:600;color:#e8cfab;background:#56422855;padding:5px 7px;border-radius:5px;margin:8px 0 5px}
.poster-studio .ps-publication-badge.is-live{color:#b5eed0;background:#23583f66}
.poster-studio label.ps-store-select{display:flex;align-items:center;gap:7px;box-sizing:border-box;text-align:left;cursor:pointer;font-size:11px;padding:8px 6px;border:1px solid #ffffff26;border-radius:6px}
.poster-studio .ps-store-select input[type=checkbox]{appearance:auto;width:16px;height:16px;min-height:0;flex:none;margin:0!important;accent-color:#a8dbfb}
.ps-library-grid article.is-selected{border-color:#93cbee;box-shadow:0 0 0 1px #93cbee}.is-selected .ps-store-select{background:#284d6944}

/* Action controls share the existing choice-button geometry and panel rhythm. */
.poster-studio .ps-action{display:block;width:100%;min-height:42px;height:auto;padding:10px 12px;margin:10px 0;font-size:11px;line-height:1.35;border-radius:8px;white-space:normal}
.ps-focus-controls{margin:12px 0 18px;padding:12px;border:1px solid var(--ps-line);border-radius:8px}
.ps-focus-controls .ps-range{grid-template-columns:75px minmax(20px,1fr) 38px}
.ps-focus-controls .ps-range:first-child{margin-top:0}
.ps-focus-controls .ps-action{margin-bottom:0}
.ps-tools .ps-help{font-size:11px;line-height:1.5;color:var(--ps-muted);margin:10px 0 14px}
.ps-gesture{text-align:center;max-width:100%}

.poster-studio .ps-twist button{border-radius:8px;min-height:34px;padding:8px 10px}
