.template-demo[data-variant="smart-home"] .template-phone-header,
.template-demo[data-variant="smart-home"] .template-phone-tabbar,
.template-demo[data-variant="music"] .template-phone-header,
.template-demo[data-variant="music"] .template-phone-tabbar {
  border-color: var(--template-border);
  background: var(--template-card-bg);
}

.template-demo[data-variant="smart-home"] .template-phone-title strong,
.template-demo[data-variant="music"] .template-phone-title strong {
  color: var(--template-active-accent);
}

.template-preview-page {
  min-height: 0;
}

.template-preview-page-toolbar,
.template-preview-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-preview-page-toolbar {
  min-height: 38px;
}

.template-preview-page-toolbar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-preview-page-stage {
  display: grid;
  min-height: 820px;
  place-items: center;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #f4f7fb;
}

.template-preview-page-stage .template-demo {
  width: 100%;
  height: 800px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.template-preview-page-stage .template-phone {
  width: min(300px, calc(100% - 32px));
  zoom: 1.25;
}

.template-preview-page-actions {
  justify-content: flex-end;
  min-height: 38px;
}

.template-preview-page-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 620px) {
  .template-preview-page-toolbar,
  .template-preview-page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .template-preview-page-toolbar .button,
  .template-preview-page-actions .button {
    width: 100%;
  }

  .template-preview-page-stage {
    min-height: 620px;
  }

  .template-preview-page-stage .template-demo {
    height: 600px;
  }

  .template-preview-page-stage .template-phone {
    width: min(230px, calc(100% - 32px));
    zoom: 1.2;
  }

  .template-preview-page-actions span {
    margin-right: 0;
  }
}

.effect-card-foot {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.effect-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.effect-actions .button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.effect-actions .button:disabled {
  border-color: #c9d5e2;
  background: #f1f5f9;
  color: #7b8998;
  cursor: default;
  opacity: 1;
}

@media (max-width: 1180px) {
  .effects-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 720px) {
  .effect-filter-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .effect-filter-status {
    margin-left: 0;
  }

  .effects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .effect-filter-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .effect-filter {
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  .effect-card-foot {
    justify-content: flex-start;
  }
}
