:root {
  color-scheme: dark;
  --background: #111214;
  --surface: #191a1d;
  --surface-raised: #202226;
  --surface-muted: #27292e;
  --surface-hover: #303238;
  --text: #f1f2f4;
  --text-muted: #9b9ea7;
  --text-faint: #9b9ea7;
  --border: #303238;
  --border-strong: #41444b;
  --accent: #df6938;
  --accent-hover: #ee7744;
  --accent-soft: #3a261e;
  --accent-contrast: #16110f;
  --danger: #ff938a;
  --danger-soft: #39201f;
  --focus: #f08a5d;
  --panel-radius: 10px;
  --control-radius: 7px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: var(--background);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 56px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 94%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--control-radius);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 850;
}

.header-note {
  color: var(--text-muted);
  font-size: 11px;
}

.header-note {
  justify-self: end;
}

.workspace-tabs {
  width: 220px;
}

.page-shell {
  width: 100%;
  padding: 12px;
}

.link-intake {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
}

.link-copy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.link-copy h1,
.link-copy p {
  margin: 0;
}

.link-copy h1 {
  font-size: 13px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.link-copy p {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-link-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 10px;
  margin: 0;
}

.url-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(360px, 1fr) minmax(290px, 340px);
  grid-template-areas:
    "assets player inspector"
    "timeline timeline timeline";
  grid-template-rows: minmax(600px, calc(100dvh - 150px)) 224px;
  gap: 1px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--border);
}

.editor-panel,
.preview-panel,
.inspector-panel,
.timeline-panel {
  min-width: 0;
  background: var(--surface);
}

.editor-panel,
.inspector-panel {
  overflow: auto;
  scrollbar-color: var(--surface-hover) transparent;
  scrollbar-width: thin;
}

.editor-panel {
  grid-area: assets;
  padding: 18px;
}

.preview-panel {
  grid-area: player;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 14px;
  background: #151619;
}

.inspector-panel {
  grid-area: inspector;
  padding: 18px;
}

.timeline-panel {
  grid-area: timeline;
  min-height: 0;
  padding: 12px 14px 14px;
}

.panel-heading,
.preview-heading,
.result-heading,
.timeline-heading,
.copy-heading,
.field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading,
.preview-heading,
.result-heading,
.timeline-heading {
  min-height: 34px;
}

.panel-heading h2,
.preview-heading h2,
.result-heading h2,
.timeline-heading h2,
.inspector-placeholder h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.025em;
}

fieldset {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

legend {
  padding: 0 10px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

label,
.label-text {
  color: #d8dae0;
  font-size: 11px;
  font-weight: 650;
}

.optional,
.helper,
.field-meta,
.clip-duration,
.timeline-hint {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 450;
}

input,
textarea,
select,
.publish-copy {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  outline: none;
  background: var(--surface-raised);
  color: var(--text);
}

input,
select {
  min-height: 36px;
  padding: 0 10px;
}

textarea {
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
.text-button:focus-visible,
summary:focus-visible,
.upload-zone:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 28%, transparent);
}

.upload-zone {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--control-radius);
  background: var(--surface-raised);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--surface-muted);
}

.upload-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--control-radius);
  background: var(--surface-hover);
  color: var(--text);
  font-size: 9px;
  font-weight: 750;
}

.upload-title,
.upload-detail {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-title {
  color: var(--text);
  font-size: 12px;
}

.upload-detail {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 450;
}

.media-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.media-list:empty {
  display: none;
}

.media-item {
  overflow: hidden;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--surface-raised);
  color: var(--text-muted);
  font: inherit;
  font-size: 10px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-item[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--surface-hover);
  color: var(--text);
}

.segment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--surface-raised);
}

.segment label {
  cursor: pointer;
}

.segment input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segment span {
  display: grid;
  min-height: 29px;
  place-items: center;
  border-radius: 5px;
  color: var(--text-muted);
}

.segment input:checked + span {
  background: var(--surface-hover);
  color: var(--text);
}

.segment input:focus-visible + span {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 28%, transparent);
}

.rights-check {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 8px;
  align-items: start;
  margin: 18px 0;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}

.rights-check input {
  width: 15px;
  min-height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.primary-button,
.text-button,
.hook-button,
.caption-clip {
  border-radius: var(--control-radius);
  cursor: pointer;
}

.primary-button {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.primary-button:hover {
  background: var(--accent-hover);
}

.primary-button:active,
.text-button:active,
.hook-button:active,
.caption-clip:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.compact-button {
  width: auto;
  min-height: 36px;
  padding: 0 14px;
}

.text-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.text-button:hover {
  background: var(--surface-hover);
}

.link-status,
.error-message {
  padding: 9px 10px;
  border-radius: var(--control-radius);
  font-size: 10px;
  line-height: 1.45;
}

.link-status.is-success {
  background: var(--accent-soft);
  color: #ffb28f;
}

.link-status.is-error,
.error-message {
  background: var(--danger-soft);
  color: var(--danger);
}

.preview-heading span {
  color: var(--text-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.stage {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 18px;
}

.phone-preview {
  position: relative;
  overflow: hidden;
  width: min(100%, 284px);
  max-height: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border-strong);
  border-radius: var(--panel-radius);
  background: #222327;
  box-shadow: 0 18px 44px rgb(2 3 4 / 34%);
}

.phone-preview video,
.phone-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #222327;
}

.preview-empty {
  display: grid;
  height: 100%;
  place-content: center;
  gap: 9px;
  padding: 26px;
  color: var(--text);
  text-align: center;
  background: linear-gradient(145deg, #25262a, #1a1b1e);
}

.preview-empty strong {
  font-size: 13px;
}

.preview-empty > span:last-child {
  max-width: 22ch;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.5;
}

.empty-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  justify-self: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--panel-radius);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
}

.caption-preview,
.cta-preview {
  position: absolute;
  left: 7%;
  right: 7%;
  z-index: 1;
  color: #f7f7f8;
  text-align: center;
  pointer-events: none;
}

.caption-preview {
  bottom: 18%;
  padding: 8px 10px;
  border-radius: var(--control-radius);
  background: rgb(16 17 19 / 78%);
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgb(0 0 0 / 55%);
}

.caption-preview[data-position="top"] {
  top: 12%;
  bottom: auto;
}

.caption-preview[data-position="center"] {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.caption-preview[data-position="bottom"] {
  top: auto;
  bottom: 18%;
  transform: none;
}

.cta-preview {
  bottom: 5%;
  font-size: 9px;
  font-weight: 700;
}

.preview-note {
  margin: 0;
  color: var(--text-faint);
  font-size: 9px;
  text-align: center;
}

.inspector-placeholder {
  max-width: 26ch;
}

.inspector-placeholder p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.inspector-panel:has(.result-panel:not([hidden])) .inspector-placeholder {
  display: none;
}

.result-panel {
  display: grid;
  gap: 20px;
}

.result-panel-content {
  display: grid;
  gap: 20px;
}

.result-group {
  display: grid;
  gap: 9px;
}

.result-group h3 {
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
}

.platform-list {
  border-top: 1px solid var(--border);
}

.platform-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.platform-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.platform-row strong {
  color: var(--text);
  font-size: 11px;
}

.platform-row span {
  color: var(--text-muted);
  font-size: 9px;
}

.platform-row .text-button {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.compact-check {
  margin: 0;
}

.publish-blocked {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--surface-raised);
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.45;
}

.publish-workspace {
  min-height: calc(100dvh - 80px);
}

.publish-shell {
  display: grid;
  width: min(100%, 960px);
  gap: 20px;
  padding: 24px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
}

.publish-heading h1,
.publish-heading p,
.publish-section h2 {
  margin: 0;
}

.publish-heading h1 {
  font-size: 18px;
}

.publish-heading p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
}

.publish-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.publish-section {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--surface-raised);
}

.publish-section h2 {
  font-size: 12px;
}

.publish-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.publish-actions .primary-button {
  min-width: 190px;
}

.caption-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.caption-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.caption-template {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--surface-raised);
  cursor: pointer;
}

.caption-template:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.caption-template:active {
  transform: translateY(1px);
}

.caption-template:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.caption-template:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.caption-template-sample {
  display: grid;
  min-height: 34px;
  place-items: center;
  padding: 5px;
  border-radius: 4px;
  background: var(--background);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.caption-template-hook .caption-template-sample {
  font-size: 13px;
}

.caption-template-review .caption-template-sample {
  font-family: "Noto Serif KR", "AppleMyungjo", serif;
}

.caption-template-info .caption-template-sample {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
}

.caption-template strong {
  color: var(--text);
  font-size: 10px;
}

.caption-template small {
  color: var(--text-muted);
  font-size: 9px;
}

.caption-advanced {
  padding-top: 2px;
}

.caption-advanced summary {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.caption-advanced[open] {
  display: grid;
  gap: 9px;
}

input[type="range"] {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
}

.hook-options,
.caption-list {
  display: grid;
  gap: 6px;
}

.hook-button {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-muted);
  font-size: 10px;
  text-align: left;
  line-height: 1.4;
}

.hook-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #ffb28f;
}

.caption-row {
  display: grid;
  gap: 5px;
}

.caption-time {
  color: var(--text-faint);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.caption-row input {
  min-width: 0;
  min-height: 34px;
  font-size: 10px;
}

.result-details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.result-details summary {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.result-details[open] summary {
  margin-bottom: 10px;
  color: var(--text);
}

.publish-copy {
  min-height: 150px;
  font-size: 10px;
}

.copy-heading {
  margin-bottom: 7px;
}

.render-status {
  display: grid;
  gap: 7px;
  color: var(--text-muted);
  font-size: 10px;
}

progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: var(--surface-muted);
  accent-color: var(--accent);
}

progress::-webkit-progress-bar {
  background: var(--surface-muted);
}

progress::-webkit-progress-value {
  background: var(--accent);
}

.timeline-heading {
  min-height: 30px;
  margin-bottom: 8px;
}

.clip-editor {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 2.25fr);
  gap: 14px;
  min-height: 152px;
}

.clip-editor[data-media-kind="image"] {
  grid-template-columns: minmax(0, 1fr);
}

.clip-editor[data-media-kind="image"] .clip-controls,
.clip-editor[data-media-kind="image"] .trim-handle,
.clip-editor[data-media-kind="image"] .timeline-playhead {
  display: none;
}

.clip-editor[data-media-kind="image"] .timeline-surface {
  cursor: default;
}

.clip-editor:not([hidden]) + .timeline-empty {
  display: none;
}

.clip-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(70px, 1fr));
  gap: 7px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: var(--surface-raised);
}

.compact-field {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.compact-field input {
  min-height: 30px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.clip-controls > .text-button {
  grid-column: 1 / -1;
}

.clip-duration {
  grid-column: 1 / -1;
  min-height: 28px;
  padding-top: 3px;
  line-height: 1.45;
}

.timeline-body {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: #17181b;
}

.track-labels {
  display: grid;
  grid-template-rows: 24px 54px 54px;
  gap: 4px;
  padding: 7px 0;
}

.track-labels {
  padding-right: 7px;
  padding-left: 7px;
  border-right: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 9px;
  text-align: right;
}

.track-labels span {
  display: grid;
  align-items: center;
}

.timeline-lanes {
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  padding-top: 7px;
  padding-right: 8px;
  padding-bottom: 7px;
  padding-left: 8px;
  background-image: linear-gradient(to right, transparent 33.2%, var(--border) 33.33%, transparent 33.46%, transparent 66.54%, var(--border) 66.67%, transparent 66.8%);
}

.timeline-ruler {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.timeline-surface {
  position: relative;
  display: grid;
  grid-template-rows: 54px 54px;
  gap: 4px;
  min-width: 0;
  cursor: pointer;
}

.timeline-surface:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.track-lane {
  display: flex;
  min-width: 0;
  overflow: hidden;
  border-radius: 5px;
  background: #202125;
}

.video-track {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 62%, var(--border));
  border-radius: 5px;
  background: var(--accent-soft);
  color: #ffc0a3;
  font-size: 9px;
  font-weight: 700;
}

.trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}

.trim-handle::before,
.trim-handle::after {
  position: absolute;
  top: 50%;
  content: "";
  transform: translateY(-50%);
}

.trim-handle::before {
  top: 0;
  bottom: 0;
  width: 12px;
  border-radius: 4px;
  background: var(--accent);
  transform: none;
}

.trim-handle::after {
  width: 2px;
  height: 18px;
  border-radius: 1px;
  background: var(--accent-contrast);
  opacity: 0.68;
}

.trim-handle:focus-visible {
  outline: 2px solid #f1f2f4;
  outline-offset: -3px;
}

.trim-start {
  left: 0;
}

.trim-end {
  right: 0;
}

.trim-start::before {
  left: 0;
}

.trim-start::after {
  left: 6px;
  transform: translate(-50%, -50%);
}

.trim-end::before {
  right: 0;
}

.trim-end::after {
  right: 6px;
  transform: translate(50%, -50%);
}

.caption-timeline {
  gap: 3px;
  background: transparent;
}

.caption-clip {
  flex-basis: 0;
  overflow: hidden;
  min-width: 18px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  background: #292b30;
  color: #c7c9cf;
  font-size: 8px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caption-clip:hover,
.caption-clip:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}

.timeline-playhead {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  z-index: 2;
  width: 1px;
  background: #f3f3f4;
  pointer-events: none;
}

.timeline-playhead::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #f3f3f4;
  content: "";
  transform: translateX(-50%);
}

.timeline-empty {
  display: grid;
  min-height: 152px;
  place-content: center;
  gap: 5px;
  color: var(--text-muted);
  text-align: center;
}

.timeline-empty strong {
  font-size: 11px;
}

.timeline-empty span {
  color: var(--text-faint);
  font-size: 9px;
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .studio-shell {
    grid-template-columns: minmax(250px, 300px) minmax(340px, 1fr);
    grid-template-areas:
      "assets player"
      "inspector inspector"
      "timeline timeline";
    grid-template-rows: minmax(580px, auto) auto 224px;
  }

  .inspector-panel {
    overflow: visible;
  }

  .result-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-heading,
  .result-panel-content,
  .result-panel > .primary-button,
  .render-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: auto minmax(150px, 220px) auto;
    gap: 8px;
  }

  .link-intake {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .link-copy p {
    display: none;
  }

  .product-link-form {
    grid-template-columns: 1fr;
  }

  .studio-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "player"
      "assets"
      "inspector"
      "timeline";
    grid-template-rows: minmax(540px, auto) auto auto auto;
  }

  .preview-panel {
    min-height: 540px;
  }

  .editor-panel,
  .inspector-panel {
    overflow: visible;
  }

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

  .publish-grid,
  .publish-actions {
    grid-template-columns: 1fr;
  }

  .publish-actions .primary-button {
    width: 100%;
  }

  .clip-editor {
    grid-template-columns: 1fr;
  }

  .timeline-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .brand > span:last-child {
    display: none;
  }

  .workspace-tabs {
    width: 100%;
  }

  .page-shell {
    padding: 8px;
  }

  .header-note {
    display: none;
  }

  .publish-shell {
    padding: 14px;
  }

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

  .compact-button {
    width: 100%;
  }

  .stage {
    padding: 12px 0;
  }

  .phone-preview {
    width: min(100%, 260px);
  }

  .timeline-panel {
    padding: 12px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
