:root,
[data-theme="light"],
.light {
  --tp-bar-bg: #ffffff;
  --tp-bar-border: #e2e8f0;
  --tp-bar-text: #0f172a;
  --tp-bar-muted: #64748b;
  --tp-bar-surface: #f1f5f9;
  --tp-stage-bg: #e2e8f0;
  --tp-accent: #f26513;
  --pf-scrollbar-size: 6px;
  --pf-scrollbar-radius: 9999px;
  --pf-scrollbar-track: transparent;
  --pf-scrollbar-thumb: rgba(15, 23, 42, 0.22);
  --pf-scrollbar-thumb-hover: rgba(15, 23, 42, 0.38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not(.light) {
    --tp-bar-bg: #0f172a;
    --tp-bar-border: #26324a;
    --tp-bar-text: #f8fafc;
    --tp-bar-muted: #94a3b8;
    --tp-bar-surface: #1e293b;
    --tp-stage-bg: #020617;
    --pf-scrollbar-thumb: rgba(226, 232, 240, 0.24);
    --pf-scrollbar-thumb-hover: rgba(226, 232, 240, 0.42);
  }
}

[data-theme="dark"],
.dark {
  --tp-bar-bg: #0f172a;
  --tp-bar-border: #26324a;
  --tp-bar-text: #f8fafc;
  --tp-bar-muted: #94a3b8;
  --tp-bar-surface: #1e293b;
  --tp-stage-bg: #020617;
  --pf-scrollbar-thumb: rgba(226, 232, 240, 0.24);
  --pf-scrollbar-thumb-hover: rgba(226, 232, 240, 0.42);
}

.pf-macos-scroll,
.pf-macos-scroll-root,
.pf-macos-scroll-root * {
  scrollbar-width: thin;
  scrollbar-color: var(--pf-scrollbar-thumb) var(--pf-scrollbar-track);
}

.pf-macos-scroll::-webkit-scrollbar,
.pf-macos-scroll-root::-webkit-scrollbar,
.pf-macos-scroll-root *::-webkit-scrollbar {
  width: var(--pf-scrollbar-size);
  height: var(--pf-scrollbar-size);
}

.pf-macos-scroll::-webkit-scrollbar-track,
.pf-macos-scroll-root::-webkit-scrollbar-track {
  background: transparent;
}

.pf-macos-scroll::-webkit-scrollbar-thumb,
.pf-macos-scroll-root::-webkit-scrollbar-thumb {
  background-color: var(--pf-scrollbar-thumb);
  border-radius: 9999px;
}

* {
  box-sizing: border-box;
}

html,
body.tp-preview-shell {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--tp-stage-bg);
  color: var(--tp-bar-text);
}

.tp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tp-preview-bar {
  height: 56px;
  padding: 0 16px;
  background: var(--tp-bar-bg);
  border-bottom: 1px solid var(--tp-bar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tp-bar-left,
.tp-bar-center,
.tp-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-bar-back,
.tp-bar-btn,
.tp-bar-icon-btn,
.tp-device-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--tp-bar-border);
  background: var(--tp-bar-surface);
  color: var(--tp-bar-text);
  text-decoration: none;
  cursor: pointer;
}

.tp-bar-icon-btn {
  padding: 7px;
}

.tp-bar-btn--primary,
.tp-device-btn.is-active {
  background: var(--tp-accent);
  border-color: var(--tp-accent);
  color: #ffffff;
}

.tp-bar-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--tp-bar-border);
  background: var(--tp-bar-surface);
  color: var(--tp-bar-text);
  font-size: 13px;
  max-width: 240px;
}

.tp-preview-stage {
  height: calc(100vh - 56px);
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 0;
  background: var(--tp-stage-bg);
}

.tp-frame-wrap {
  height: 100%;
  width: 100%;
  transition: width 0.25s ease, margin 0.25s ease;
  background: #ffffff;
}

.tp-frame-wrap--tablet {
  width: 768px;
  max-width: 100%;
  margin: 12px auto;
  height: calc(100% - 24px);
  border-radius: 14px;
  overflow: hidden;
  border: 6px solid #1e293b;
}

.tp-frame-wrap--mobile {
  width: 390px;
  max-width: 100%;
  margin: 12px auto;
  height: calc(100% - 24px);
  border-radius: 22px;
  overflow: hidden;
  border: 8px solid #1e293b;
}

.tp-demo-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 820px) {
  .tp-bar-center,
  .tp-bar-select {
    display: none;
  }
}
