@font-face {
  font-family: "PodiumSharp18Italic";
  src: url("./assets/fonts/PODIUMSharp-1.8italic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

.ptw-page .app-shell {
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  align-items: start;
}
.ptw-sidebar {
  max-height: calc(100vh - 24px);
  overflow: auto;
}
.ptw-sidebar .template-switcher {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.player-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.player-tab {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
}
.player-tab.active {
  background: linear-gradient(135deg, rgba(29,212,255,0.26), rgba(61,187,255,0.12));
  border-color: rgba(29,212,255,0.45);
  color: #fff;
}
.ptw-two-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.copy-ptw-btn { margin-top: 10px; }
.ptw-main-stage { padding: 20px; }
.ptw-canvas-stage #posterCanvas { cursor: grab; touch-action: none; }
.ptw-canvas-stage #posterCanvas.dragging { cursor: grabbing; }
.ptw-sidebar-right .panel:first-child { margin-top: 0; }
.ptw-sidebar-right .footer { display: none; }
@media (max-width: 1440px) {
  .ptw-page .app-shell { grid-template-columns: 300px minmax(0, 1fr) 340px; }
}
@media (max-width: 1180px) {
  .ptw-page .app-shell { grid-template-columns: 1fr; }
  .ptw-sidebar { max-height: none; overflow: visible; }
}
@media (max-width: 720px) {
  .ptw-sidebar .template-switcher,
  .ptw-two-buttons,
  .player-tabs { grid-template-columns: 1fr; }
}


/* v16 responsive polish */
.ptw-page {
  overflow-x: hidden;
}
.ptw-page .app-shell {
  gap: 16px;
  padding: 12px;
}
.ptw-sidebar .panel,
.ptw-sidebar-right .panel {
  margin-bottom: 12px;
}
.ptw-main-stage {
  min-width: 0;
}
.ptw-canvas-stage {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 14px;
}
.ptw-canvas-stage #posterCanvas {
  width: min(100%, 540px);
  height: auto;
  max-height: calc(100vh - 120px);
  object-fit: contain;
}
@media (min-width: 1181px) {
  .ptw-sidebar,
  .ptw-sidebar-right {
    position: sticky;
    top: 12px;
  }
}
@media (max-width: 1500px) and (min-width: 1181px) {
  .ptw-page .app-shell {
    grid-template-columns: 300px minmax(0, 1fr) 330px;
  }
  .ptw-canvas-stage #posterCanvas {
    width: min(100%, 500px);
  }
}
@media (max-width: 1180px) {
  .ptw-page .app-shell {
    padding: 10px;
  }
  .ptw-main-stage {
    order: 2;
  }
  .ptw-sidebar-right {
    order: 3;
  }
}
@media (max-width: 720px) {
  .ptw-canvas-stage {
    padding: 8px;
  }
  .ptw-canvas-stage #posterCanvas {
    width: 100%;
    max-height: none;
  }
}


/* v20 plain-background auto remover */
.auto-bg-toggle {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  margin: 10px 0 12px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  color: var(--text);
  cursor: pointer;
}
.auto-bg-toggle input {
  margin-top: 2px;
  accent-color: #1dd4ff;
}
.auto-bg-toggle strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}
.auto-bg-toggle small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.clear-ptw-btn {
  margin-top: 8px;
}
