.poster-page {
  min-height: 100%;
  height: 100vh;
  background: var(--t2t-stage-bg);
  color: #fff;
  overflow: hidden
}

.poster-stage {
  width: min(1540px, calc(100% - 32px));
  height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 8px 0 10px;
  box-sizing: border-box
}

.poster-workspace {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(360px, .95fr);
  gap: 14px
}

.poster-left-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 148px;
  gap: 12px
}

.poster-preview-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 24px;
  background: #241542;
  display: grid;
  place-items: center;
  overflow: hidden
}

.poster-canvas {
  position: relative;
  width: min(800px, 100%);
  height: auto;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  outline: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
  display: flex;
  align-items: center;
  justify-content: center
}

.poster-canvas.is-active {
  animation: poster-pop 180ms ease-out
}

.preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff
}

.poster-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  border: 2px solid #241640;
  border-radius: 14px;
  background: var(--t2t-sun);
  color: #241640;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(36, 22, 64, .75);
  z-index: 3
}

.poster-fullscreen-btn:hover {
  transform: translate(-1px, -1px)
}

.poster-canvas:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none
}

.poster-canvas:fullscreen .poster-fullscreen-btn {
  display: none
}

.creator-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px
}

.creator-card {
  min-height: 0;
  padding: 15px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, .14);
  background: #241542;
  overflow: hidden;
  box-sizing: border-box
}

.creator-heading,
.input-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px
}

.creator-kicker {
  display: block;
  color: var(--t2t-teal);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 4px
}

.creator-heading h2 {
  margin: 0;
  font-size: 1.05rem
}

.creator-state {
  font-size: .7rem;
  font-weight: 900;
  color: #b7a9de
}

.media-thumb {
  height: 150px;
  margin: 10px 0;
  border: 2px dashed rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: #171022;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #a99bc9;
  font-size: .82rem
}

.media-thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent
}

.creator-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.creator-btn {
  min-height: 42px;
  border: 2px solid #746888;
  border-radius: 999px;
  background: #30234a;
  color: #fff;
  font: inherit;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 10px;
  box-sizing: border-box
}

.creator-btn:hover {
  border-color: #a895c7
}

.creator-btn--wide {
  width: 100%;
  margin-top: 8px
}

.audio-card {
  display: flex;
  flex-direction: column
}

.audio-editor {
  position: relative;
  height: 112px;
  margin: 10px 0 3px;
  border-radius: 14px;
  overflow: hidden;
  background: #151022;
  touch-action: none;
  user-select: none
}

.audio-waveform {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.audio-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(47, 230, 201, .16);
  border-left: 2px solid var(--t2t-teal);
  border-right: 2px solid var(--t2t-teal);
  pointer-events: none
}

.trim-handle {
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 16px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--t2t-sun);
  box-shadow: 0 0 0 2px #241640;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 3;
  touch-action: none
}

.trim-handle::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 38%;
  width: 4px;
  height: 24%;
  border-radius: 3px;
  background: #241640
}

.audio-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8f82ad;
  font-size: .78rem;
  pointer-events: none
}

.audio-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: .68rem;
  color: #b7a9de;
  margin-bottom: 7px
}

.audio-time-row span:nth-child(2) {
  text-align: center;
  color: #fff;
  font-weight: 900
}

.audio-time-row span:last-child {
  text-align: right
}

.record-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px
}

.record-btn {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #ff5d73;
  color: #241640;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  touch-action: none;
  user-select: none
}

.record-btn.is-recording {
  background: #ff3654;
  box-shadow: 0 0 0 3px rgba(255, 93, 115, .2)
}

.trim-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 7px
}

.mini-btn {
  min-height: 38px;
  border: 2px solid #746888;
  border-radius: 999px;
  background: #30234a;
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  padding: 0 10px
}

.mini-btn:disabled {
  opacity: .35;
  cursor: not-allowed
}

.record-status {
  margin: 6px 0 0;
  color: #a99bc9;
  font-size: .68rem;
  line-height: 1.2
}

.input-panel {
  min-height: 0;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  background: #241542;
  box-sizing: border-box;
  overflow: hidden
}

.input-panel-heading {
  align-items: center;
  margin-bottom: 7px
}

.input-panel-heading h2 {
  margin: 0;
  font-size: 1rem
}

.input-panel-heading p {
  margin: 0;
  color: #b7a9de;
  font-size: .72rem;
  text-align: right;
  white-space: nowrap
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 7px;
  height: 72px
}

.input-key {
  position: relative;
  min-width: 0;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  background: #171022;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px
}

.input-key>span,
.input-key>small {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35)
}

.input-key>span {
  font-size: 1rem;
  font-weight: 900
}

.input-key>small {
  font-size: .56rem;
  color: #b7a9de;
  font-weight: 800
}

.input-key.is-selected {
  border-color: #ffd15c;
  background: var(--t2t-sun);
  color: #241640
}

.input-key.is-selected small {
  color: #241640
}

.input-key.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--key-image);
  background-size: cover;
  background-position: center;
  opacity: .34
}

.input-key.has-image.is-selected::before {
  opacity: .46
}

.input-key.has-audio::after {
  content: "•";
  position: absolute;
  top: 4px;
  right: 7px;
  color: var(--t2t-teal);
  font-size: 13px;
  z-index: 3
}

.poster-controls,
.camera-panel {
  position: fixed;
  inset: 0;
  z-index: 50
}

.controls-backdrop,
.camera-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 20, .72);
  backdrop-filter: blur(4px)
}

.controls-dialog {
  position: relative;
  width: min(720px, calc(100% - 30px));
  max-height: min(720px, calc(100vh - 40px));
  margin: 20px auto;
  background: #241542;
  border: 2px solid #746888;
  border-radius: 24px;
  padding: 22px;
  box-sizing: border-box;
  overflow: auto;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .4)
}

.controls-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px
}

.controls-heading h2 {
  margin: 0
}

.controls-heading p {
  color: #b7a9de
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px
}

.control-grid>div {
  padding: 16px;
  border-radius: 16px;
  background: #1b1030;
  border: 1px solid rgba(255, 255, 255, .1)
}

.control-grid h3 {
  margin-top: 0
}

.control-grid li {
  margin: 7px 0;
  color: #c9bde3
}

.pack-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px
}

.pack-actions .btn {
  min-height: 58px;
  padding: 8px 18px;
  font-size: 1rem;
  line-height: 1.1
}

.controls-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px
}

.text-button {
  border: 0;
  background: none;
  color: #c8b9e3;
  font: inherit;
  font-weight: 800;
  cursor: pointer
}

.text-button--danger {
  color: #ff8a9b
}

.controls-message {
  min-height: 20px;
  color: #b7a9de
}

.camera-dialog {
  position: relative;
  width: min(760px, calc(100% - 30px));
  margin: 5vh auto;
  background: #241542;
  border: 2px solid #746888;
  border-radius: 24px;
  padding: 20px
}

.camera-heading {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.camera-heading h2 {
  margin: 0
}

.camera-view {
  height: min(55vh, 480px);
  margin: 15px 0;
  border-radius: 16px;
  background: #151022;
  overflow: hidden;
  display: grid;
  place-items: center
}

.camera-view video {
  width: 100%;
  height: 100%;
  object-fit: contain
}

.camera-placeholder {
  color: #a99bc9
}

.camera-actions {
  display: flex;
  gap: 10px
}

.camera-actions .btn {
  flex: 1
}

.camera-status {
  color: #b7a9de
}

@keyframes poster-pop {
  0% {
    transform: scale(.99)
  }

  100% {
    transform: scale(1)
  }
}

@media (max-width:1100px) {
  .poster-workspace {
    grid-template-columns: minmax(0, 1.45fr) 340px
  }

  .poster-stage {
    grid-template-rows: minmax(0, 1fr) 104px
  }

  .input-grid {
    gap: 5px
  }

  .input-key>small {
    font-size: .5rem
  }
}

@media (max-width:850px) {
  .poster-page {
    overflow: auto;
    height: auto;
    min-height: 100vh
  }

  .poster-stage {
    height: auto;
    min-height: calc(100vh - 76px);
    grid-template-rows: auto auto
  }

  .poster-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 55vh) auto
  }

  .creator-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    min-height: 410px
  }

  .input-grid {
    grid-template-columns: repeat(6, 1fr);
    height: auto
  }

  .input-key {
    min-height: 58px
  }

  .input-panel {
    overflow: visible
  }

  .input-panel-heading p {
    white-space: normal
  }

  .poster-preview-wrap {
    min-height: 0
  }

  .poster-canvas {
    width: min(800px, 100%)
  }
}

@media (max-width:600px) {
  .poster-stage {
    width: calc(100% - 18px)
  }

  .creator-panel {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr
  }

  .control-grid {
    grid-template-columns: 1fr
  }

  .pack-actions {
    grid-template-columns: 1fr
  }

  .creator-buttons,
  .trim-actions {
    grid-template-columns: 1fr
  }

  .input-grid {
    grid-template-columns: repeat(4, 1fr)
  }
}

@media (max-height:760px) and (min-width:851px) {
  .poster-left-column {
    grid-template-rows: minmax(0, 1fr) 132px
  }

  .input-grid {
    height: 60px;
    gap: 5px
  }

  .input-key>span {
    font-size: .9rem
  }

  .input-key>small {
    font-size: .5rem
  }

  .poster-preview-wrap {
    padding: 8px
  }

  .creator-card {
    padding: 12px
  }

  .media-thumb {
    height: 150px;
    margin: 7px 0
  }

  .audio-editor {
    height: 82px;
    margin: 7px 0 2px
  }
}

@media (max-width:1100px) and (min-width:851px) {
  .poster-workspace {
    grid-template-columns: minmax(0, 1.8fr) minmax(330px, .9fr)
  }

  .input-grid {
    gap: 5px
  }

  .input-key>small {
    font-size: .5rem
  }
}

@media (max-width:850px) {
  .poster-page {
    overflow: auto;
    height: auto;
    min-height: 100vh
  }

  .poster-stage {
    width: calc(100% - 18px);
    height: auto;
    min-height: calc(100vh - 76px);
    padding-bottom: 14px
  }

  .poster-workspace {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 12px
  }

  .poster-left-column {
    grid-template-rows: minmax(360px, 55vh) auto;
    gap: 10px
  }

  .creator-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    min-height: 400px
  }

  .poster-preview-wrap {
    min-height: 0
  }

  .poster-canvas {
    width: min(800px, 100%);
    height: auto;
    aspect-ratio: 4/3
  }

  .input-grid {
    grid-template-columns: repeat(6, 1fr);
    height: auto
  }

  .input-key {
    min-height: 62px
  }

  .input-panel {
    overflow: visible
  }

  .input-panel-heading p {
    white-space: normal
  }
}

@media (max-height:700px) and (min-width:851px) {
  .poster-canvas {
    width: auto;
    height: 100%;
    max-height: 100%;
    aspect-ratio: 4/3;
  }
}

@media (max-width:600px) {
  .creator-panel {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    min-height: 760px
  }

  .creator-buttons,
  .trim-actions {
    grid-template-columns: 1fr
  }

  .input-grid {
    grid-template-columns: repeat(4, 1fr)
  }
}