:root {
  scrollbar-gutter: stable;
  --bg: #f6f5f0;
  --paper: #fffefa;
  --ink: #252722;
  --muted: #6d7067;
  --line: #dedfd5;
  --orange: #ff7549;
  --lime: #e2ed9b;
  --purple: #e5d6fa;
  --radius: 22px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button,
a,
input {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: none;
  background: var(--lime);
  color: var(--ink);
}
button {
  transition:
    background 0.18s,
    box-shadow 0.18s,
    opacity 0.18s;
}
button:active {
  opacity: 0.7;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
}
svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
button svg,
.primary svg,
.upload-icon svg,
.avatar svg,
.floating-label svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[hidden] {
  display: none !important;
}
.app-shell {
  max-width: 1280px;
  margin: auto;
  padding: 0 56px;
}
.topbar {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1.3px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--orange);
  border-radius: 11px;
}
.brand-mark svg {
  width: 23px;
}
.beta {
  font-size: 9px;
  letter-spacing: 1px;
  margin-left: 10px;
  font-weight: 600;
  background: #e8e8df;
  border-radius: 4px;
  padding: 5px 7px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 21px;
}
.quiet {
  border: 0;
  background: transparent;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
}
.quiet:hover {
  color: #8e391d;
}
.quiet span {
  font-size: 11px;
  border: 1px solid #c9cbbf;
  border-radius: 20px;
  padding: 3px 6px;
  margin-left: 6px;
}
.avatar {
  border: 1px solid var(--line);
  background: var(--paper);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.avatar svg {
  width: 19px;
  height: 19px;
}
.intro {
  position: relative;
  padding: 47px 0 34px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.eyebrow > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #738450;
}
h1 {
  font-size: clamp(48px, 5.4vw, 70px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -4px;
  margin: 17px 0 0;
}
.serif {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-style: italic;
  position: relative;
}
.serif:after {
  content: "";
  position: absolute;
  left: 1%;
  right: 0;
  bottom: -6px;
  height: 6px;
  border-top: 2px solid var(--orange);
  border-radius: 50%;
  transform: rotate(-5deg);
}
.intro h1 > svg {
  width: 48px;
  height: 48px;
  fill: var(--orange);
  margin-left: 20px;
  vertical-align: middle;
}
.intro > p {
  position: absolute;
  right: 15px;
  bottom: 39px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 340px;
}
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 0.94fr;
  gap: 28px;
  align-items: stretch;
}
.compose-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.step {
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
  font-weight: 600;
}
.upload-zone {
  border: 1px dashed #c9ccbd;
  background: #f8f8f1;
  border-radius: 14px;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  margin-top: 17px;
  padding: 18px 12px 15px;
  gap: 6px;
  min-height: 200px;
  overflow: hidden;
}
.upload-zone:hover,
.upload-zone.drag {
  background: #edf1d9;
  border-color: #626c3a;
}
.upload-icon {
  height: 40px;
  width: 40px;
  border: 1px solid #e1e3d6;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  background: var(--paper);
}
.upload-zone strong {
  font-size: 15px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-zone > span:not(.upload-icon) {
  font-size: 12px;
  color: var(--muted);
}
.upload-zone .file-limits {
  font-size: 10px !important;
  margin-top: 3px;
}
.upload-zone .pick-label {
  color: var(--ink) !important;
  margin-top: 6px;
}
.pick-label span {
  margin-left: 8px;
}
.style-label {
  margin-top: 28px;
}
.style-label > .muted {
  margin-left: auto;
  font-size: 10px;
}
.muted {
  color: var(--muted);
}
.styles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}
.style-card {
  padding: 5px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.style-card.selected {
  border: 2px solid var(--ink);
  padding: 4px;
  background: var(--paper);
  box-shadow: 0 3px 0 #252722;
}
.style-art {
  height: 85px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.style-art.pop {
  background: var(--purple);
}
.pop mark {
  background: var(--lime);
  padding: 1px 5px;
  color: #262822;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.style-art.clean {
  background: #e8eade;
  font-weight: 400;
  font-size: 14px;
}
.style-art.clean b {
  font-weight: 500;
}
.style-art.bold {
  background: #ffd3b8;
  font-size: 16px;
  font-weight: 900;
}
.bold mark {
  background: #262822;
  color: #fffefa;
  padding: 2px 6px;
}
.style-name {
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  padding: 10px 5px 6px;
}
.style-name > span {
  font-size: 12px;
}
.options {
  margin: 24px 0 18px;
}
.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 61px;
  cursor: pointer;
  border-bottom: 1px solid #eeeee7;
}
.switch-row b {
  font-size: 12px;
  font-weight: 600;
}
.switch-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.switch-row input {
  position: absolute;
  right: 0;
  opacity: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.switch {
  width: 35px;
  height: 21px;
  border-radius: 20px;
  background: #d4d7cc;
  pointer-events: none;
  padding: 3px;
  flex-shrink: 0;
}
.switch:after {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  transition: transform 0.18s;
}
.switch-row input:checked + .switch {
  background: var(--ink);
}
.switch-row input:checked + .switch:after {
  transform: translateX(14px);
}
.switch-row input:focus-visible + .switch {
  outline: none;
  background: var(--lime);
  color: var(--ink);
  outline-offset: 0;
}
.title-label {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-weight: 600;
}
.title-label span {
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
}
input[type="text"] {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  padding: 0 13px;
  font-size: 13px;
  color: var(--ink);
}
input::placeholder {
  color: #85877d;
}
.primary-wrap {
  margin-top: 21px;
}
.primary {
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  background: var(--orange);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.primary:hover {
  background: #ff895f;
}
.footnote {
  font-size: 10px;
  text-align: center;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0 0;
}
.preview-panel {
  border-radius: var(--radius);
  background: #e9ebdf;
  padding: 24px 25px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.preview-top {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.live-dot {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #68814b;
}
.preview-scene {
  position: relative;
  display: flex;
  justify-content: center;
  flex: 1;
  align-items: center;
  padding: 35px 20px 50px;
  min-height: 590px;
}
.poster {
  width: 244px;
  aspect-ratio: 9/16;
  border-radius: 16px;
  box-shadow: 9px 13px 0 #d5d9c8;
  position: relative;
  overflow: hidden;
  transform: rotate(3deg);
  border: 5px solid var(--paper);
  background: #dabaff;
}
.poster-art {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.poster-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.13;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.6' filter='url(%23n)'/%3E%3C/svg%3E");
}
.poster-tag {
  position: absolute;
  top: 17px;
  left: 15px;
  z-index: 3;
  font-size: 7px;
  letter-spacing: 1.4px;
  font-weight: 700;
}
.sample-caption {
  position: absolute;
  bottom: 110px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 3;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.8px;
}
.sample-caption.clean {
  font-size: 21px;
  font-weight: 500;
  color: white;
  text-shadow: 0 2px 6px #000;
  background: #252722a8;
  padding: 8px 0;
}
.sample-caption.clean mark {
  background: none;
  color: inherit;
}
.sample-caption.bold {
  font-size: 26px;
  text-transform: uppercase;
  line-height: 1.4;
}
.sample-caption.bold mark {
  background: #252722;
  color: #fffefa;
}
.poster-bottom {
  position: absolute;
  bottom: 15px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 6px;
  letter-spacing: 0.8px;
  font-weight: bold;
  z-index: 3;
}
.poster-title {
  position: absolute;
  top: 50px;
  left: 12px;
  right: 12px;
  background: var(--paper);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  padding: 9px;
  z-index: 3;
  overflow-wrap: anywhere;
  line-height: 1.15;
}
.scribble {
  position: absolute;
  top: 25px;
  left: 0;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.1;
  z-index: 4;
  transform: rotate(-10deg);
}
.scribble svg {
  display: block;
  width: 65px;
  height: 42px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.6;
  margin-left: 18px;
}
.floating-label {
  position: absolute;
  bottom: 95px;
  right: -12px;
  background: var(--paper);
  padding: 13px 17px;
  border-radius: 9px;
  box-shadow: 0 4px 10px #2527220a;
  font-size: 10px;
  font-weight: 600;
  transform: rotate(-5deg);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 5;
}
.floating-label svg {
  height: 14px;
  width: 14px;
}
.timeline-art {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  gap: 5px;
  align-items: center;
  height: 20px;
}
.timeline-art > span {
  font-size: 8px;
  color: #63685a;
  margin: 0 5px;
}
.timeline-art i {
  flex: 1;
  background: #a6af91;
  height: 7px;
  border-radius: 2px;
}
.timeline-art i:nth-child(3n) {
  height: 19px;
}
.timeline-art i:nth-child(2n) {
  height: 13px;
}
.preview-footer {
  display: flex;
  gap: 13px;
  align-items: center;
  border-top: 1px solid #d5d9c9;
  padding-top: 18px;
}
.small-star {
  font-size: 35px;
  font-weight: 400;
  color: #5a6749;
}
.preview-footer p {
  font-size: 11px;
  line-height: 1.6;
  color: #67705a;
  margin: 0;
}
.preview-footer b {
  color: var(--ink);
  font-weight: 600;
}
.recent {
  margin: 50px 0;
}
.recent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.recent-heading h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
}
.recent-heading h2 > span {
  color: #939889;
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 400;
}
.recent-heading > span {
  font-size: 10px;
  color: var(--muted);
}
.empty-state {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.empty-icon {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  font-size: 23px;
  flex-shrink: 0;
}
.empty-state h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
}
.empty-state p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
footer > span:first-child {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.inline-error {
  background: #fce5dc;
  border: 1px solid #e8b6a2;
  border-radius: 10px;
  padding: 14px;
  color: #87391b;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
}
.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  padding: 15px 20px;
  z-index: 50;
  max-width: calc(100vw - 32px);
  width: max-content;
  font-size: 13px;
  box-shadow: 0 5px 30px #0003;
}
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  background: white;
  padding: 15px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
dialog {
  border: 0;
  border-radius: 24px;
  padding: 35px;
  max-width: 410px;
  width: calc(100% - 32px);
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop {
  background: #25272280;
  backdrop-filter: blur(4px);
}
dialog .close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 27px;
  width: 44px;
}
.login-symbol {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  background: var(--lime);
  font-size: 30px;
  border-radius: 16px;
  margin-bottom: 25px;
}
dialog h2 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -1px;
}
dialog p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 20px 0;
}
.back {
  margin-top: 20px;
}
.project-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0 30px;
  gap: 15px;
}
.project-heading h1 {
  font-size: 36px;
  letter-spacing: -1px;
  overflow-wrap: anywhere;
}
.status-pill {
  background: var(--lime);
  padding: 9px 12px;
  border-radius: 30px;
  font-size: 12px;
  white-space: nowrap;
}
.editor-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.player-wrap {
  min-width: 0;
}
video {
  display: block;
  background: #252722;
  width: 100%;
  max-height: 640px;
  border-radius: 18px;
}
.player-wrap > .primary {
  margin-top: 20px;
}
.edit-panel {
  padding: 25px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 20px;
}
.edit-panel h2 {
  font-size: 24px;
  margin-bottom: 25px;
}
.edit-styles {
  display: flex;
  gap: 8px;
  margin: 20px 0;
}
.edit-styles button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--bg);
  flex: 1;
}
.edit-styles button.selected {
  background: var(--purple);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.edit-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  min-height: 44px;
  margin-right: 12px;
}
.edit-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}
.words-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.words-header h3 {
  font-size: 15px;
  margin: 0;
}
.words-header button {
  font-size: 11px;
}
.words-help {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 3px;
}
.words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}
.word {
  border: 1px solid #e1e4d7;
  background: #f0f3e7;
  padding: 8px 9px;
  border-radius: 7px;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.3;
}
.word.removed {
  color: #8b4c39;
  background: #f9e4dc;
  border-style: dashed;
}
.word:hover {
  border-color: var(--ink);
}
#edit-summary {
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
}
.progress-panel {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 50px 24px;
  margin: 30px 0;
  background: var(--paper);
}
.loading-ring {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid var(--er-line);
  border-top-color: var(--er-ice-ink);
  border-radius: 50%;
  animation: loading-turn 0.9s linear infinite;
}
.progress-panel h2 {
  font-size: 24px;
  margin: 20px 0 10px;
}
.progress-panel p {
  font-size: 13px;
  color: var(--muted);
}
.progress-panel p:empty {
  display: none;
}
#progress-description {
  font-variant-numeric: tabular-nums;
}
progress {
  width: 100%;
  max-width: 400px;
  height: 10px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  accent-color: var(--orange);
  margin: 10px 0;
}
progress::-webkit-progress-bar {
  background: #e9ebdf;
}
progress::-webkit-progress-value {
  background: var(--orange);
}
#render-progress {
  appearance: none;
  -webkit-appearance: none;
  height: 5px;
  width: min(100%, 300px);
  background: var(--er-line);
  accent-color: var(--er-ice-ink);
}
#render-progress::-webkit-progress-bar {
  background: var(--er-line);
}
#render-progress::-webkit-progress-value {
  background: var(--er-ice-ink);
  border-radius: inherit;
}
#render-progress::-moz-progress-bar {
  background: var(--er-ice-ink);
  border-radius: inherit;
}
.project-card {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 18px;
  width: 100%;
  text-align: left;
  margin-bottom: 10px;
}
.project-card:hover {
  background: #efefdf;
}
.project-card > span:first-child {
  display: grid;
  place-items: center;
  background: var(--purple);
  border-radius: 10px;
  width: 45px;
  height: 55px;
  font-size: 23px;
  flex-shrink: 0;
}
.project-card strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.project-card small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.project-card > .status-pill {
  margin-left: auto;
  font-size: 10px;
}
.project-card .project-info {
  min-width: 0;
}
#project-view {
  min-height: 70vh;
}
@keyframes loading-turn {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1350px) {
  .app-shell {
    max-width: 1280px;
  }
  .intro {
    padding-top: 55px;
  }
  .studio-grid {
    gap: 36px;
  }
  .preview-scene {
    min-height: 600px;
  }
  .poster {
    width: 265px;
  }
}
@media (max-width: 850px) {
  .app-shell {
    padding: 0 24px;
  }
  .intro > p {
    right: 0;
    font-size: 14px;
  }
  .intro h1 {
    font-size: 58px;
  }
  .studio-grid {
    gap: 18px;
    grid-template-columns: 1fr 0.85fr;
  }
  .compose-panel {
    padding: 20px;
  }
  .preview-panel {
    padding: 22px 15px;
  }
  .poster {
    width: 215px;
  }
  .scribble {
    font-size: 14px;
    left: 0;
    top: 35px;
  }
  .preview-scene {
    padding-left: 0;
    padding-right: 0;
  }
  .floating-label {
    right: -10px;
    padding: 10px;
    font-size: 9px;
  }
  .preview-top {
    font-size: 7px;
  }
  .preview-footer p {
    font-size: 10px;
  }
  .styles {
    gap: 6px;
  }
  .style-art {
    font-size: 13px;
  }
  .editor-grid {
    gap: 20px;
  }
}
@media (max-width: 640px) {
  .app-shell {
    padding: 0 20px;
    padding-top: max(
      env(safe-area-inset-top),
      var(--tg-safe-area-inset-top, 0px)
    );
    padding-bottom: env(safe-area-inset-bottom);
  }
  .topbar {
    height: 78px;
  }
  .brand {
    font-size: 23px;
    gap: 8px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .beta {
    display: none;
  }
  .top-actions {
    gap: 10px;
  }
  .quiet {
    font-size: 11px;
  }
  .avatar {
    width: 36px;
    height: 36px;
  }
  .intro {
    padding: 30px 0 25px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.4px;
  }
  .intro h1 {
    font-size: 53px;
    letter-spacing: -2.8px;
    margin-top: 16px;
  }
  .intro h1 > svg {
    width: 37px;
    height: 37px;
    margin-left: 16px;
  }
  .intro > p {
    position: static;
    font-size: 13px;
    margin: 18px 0 0;
    line-height: 1.55;
  }
  .intro > p br {
    display: none;
  }
  .studio-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .compose-panel {
    padding: 20px;
    border-radius: 18px;
  }
  .section-label h2 {
    font-size: 15px;
  }
  .upload-zone {
    margin-top: 15px;
    min-height: 185px;
  }
  .style-label {
    margin-top: 25px;
  }
  .style-art {
    height: 83px;
    font-size: 15px;
  }
  .style-art.bold {
    font-size: 16px;
  }
  .style-art.clean {
    font-size: 14px;
  }
  .style-name {
    font-size: 11px;
  }
  .styles {
    gap: 9px;
  }
  .switch-row b {
    font-size: 13px;
  }
  .switch-row small {
    font-size: 11px;
  }
  .switch-row {
    min-height: 66px;
  }
  .title-label {
    font-size: 13px;
  }
  .title-label span {
    font-size: 11px;
  }
  input[type="text"] {
    font-size: 16px;
    min-height: 48px;
  }
  .primary {
    font-size: 14px;
    min-height: 54px;
  }
  .footnote {
    font-size: 10px;
  }
  .preview-panel {
    padding: 20px;
    border-radius: 18px;
  }
  .preview-top {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
  .preview-scene {
    min-height: 440px;
    padding: 32px 0 40px;
  }
  .poster {
    width: 195px;
    border-width: 4px;
    box-shadow: 7px 9px 0 #d5d9c8;
  }
  .sample-caption {
    font-size: 20px;
    bottom: 82px;
  }
  .sample-caption.clean {
    font-size: 17px;
  }
  .sample-caption.bold {
    font-size: 21px;
  }
  .scribble {
    left: 0;
    top: 30px;
    font-size: 16px;
  }
  .floating-label {
    bottom: 72px;
    right: -6px;
    font-size: 9px;
    padding: 10px 11px;
  }
  .preview-footer {
    padding-top: 15px;
    gap: 12px;
  }
  .preview-footer p {
    font-size: 10px;
  }
  .preview-footer .small-star {
    font-size: 29px;
  }
  .preview-scene .timeline-art {
    left: 0;
    right: 0;
    bottom: 5px;
  }
  .recent {
    margin: 35px 0;
  }
  .recent-heading {
    align-items: flex-start;
    margin-bottom: 15px;
  }
  .recent-heading h2 {
    font-size: 21px;
  }
  .recent-heading > span {
    display: none;
  }
  .empty-state {
    padding: 20px 15px;
    gap: 13px;
  }
  .empty-state p {
    line-height: 1.5;
  }
  .empty-state h3 {
    font-size: 13px;
  }
  .empty-icon {
    width: 36px;
    height: 36px;
  }
  footer {
    padding: 23px 0;
    align-items: center;
    gap: 15px;
  }
  footer > span:last-child {
    font-size: 8px;
  }
  .editor-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .player-wrap video {
    max-height: 540px;
  }
  .project-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 15px;
  }
  .project-heading h1 {
    font-size: 30px;
    line-height: 1.15;
  }
  .edit-panel {
    padding: 20px;
  }
  .edit-panel h2 {
    font-size: 22px;
  }
  .word {
    font-size: 15px;
  }
  .project-card {
    padding: 14px;
    gap: 10px;
  }
  .project-card .status-pill {
    max-width: 90px;
    white-space: normal;
  }
  .project-card strong {
    font-size: 12px;
  }
  .project-card small {
    font-size: 10px;
  }
  .preview-panel {
    order: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Final readability and touch pass. */
.avatar {
  min-width: 44px;
  min-height: 44px;
}
input::placeholder {
  color: #6d7067;
}
.preview-footer p {
  color: #62675b;
}
.file-limits,
.footnote {
  font-size: 12px !important;
}
.upload-zone .file-limits {
  font-size: 11px !important;
}
.switch-row small {
  font-size: 12px;
}
.preview-footer p {
  font-size: 12px;
}
.recent-heading > span {
  font-size: 12px;
}
.empty-state p {
  font-size: 12px;
}
.preview-top {
  font-size: 9px;
}
.title-label span {
  font-size: 12px;
}
@media (max-width: 640px) {
  .intro h1 {
    position: relative;
  }
  .intro h1 > svg {
    position: absolute;
    left: 267px;
    bottom: 7px;
    margin: 0;
    width: 31px;
    height: 31px;
  }
  .avatar {
    min-width: 44px;
    min-height: 44px;
  }
  .preview-footer p {
    font-size: 12px;
  }
  .footnote {
    font-size: 11px !important;
  }
  .upload-zone .file-limits {
    font-size: 11px !important;
  }
}
@media (max-width: 370px) {
  .intro h1 {
    font-size: 48px;
  }
  .intro h1 > svg {
    left: 242px;
    width: 28px;
    height: 28px;
  }
}
@media (max-width: 640px) {
  .intro h1 > svg {
    display: none;
  }
}
@media (max-width: 640px) {
  .app-shell {
    padding-top: max(
      env(safe-area-inset-top),
      var(--tg-safe-area-inset-top, 0px),
      var(--tg-content-safe-area-inset-top, 0px)
    );
    padding-bottom: max(
      env(safe-area-inset-bottom),
      var(--tg-safe-area-inset-bottom, 0px)
    );
  }
}
.presenter-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster-bottom {
  color: #fffefa;
  text-shadow: 0 1px 5px #000;
}
.sample-caption.pop {
  color: #fffefa;
  text-shadow: 0 2px 6px #0008;
}
.sample-caption.pop mark {
  color: var(--ink);
  text-shadow: none;
}
.login-status {
  font-size: 13px !important;
  min-height: 42px;
}
.fallback-login {
  display: block;
  font-size: 12px;
  text-align: center;
  line-height: 1.6;
  margin-top: 18px;
  padding: 8px;
}
.primary[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}
.storage-note {
  margin-top: 5px;
}
.intro {
  padding-top: 38px;
}
.intro h1 {
  margin-top: 0;
}
@media (max-width: 640px) {
  .styles {
    position: relative;
  }
  .style-art {
    height: 90px;
  }
  .preview-panel {
    position: relative;
  }
  .intro {
    padding-top: 29px;
  }
}
.app-shell {
  position: relative;
}
.profile-menu {
  position: absolute;
  right: 56px;
  top: 88px;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 12px 30px #25272215;
  min-width: 210px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-menu b {
  font-size: 14px;
}
.profile-menu > span {
  font-size: 12px;
  color: var(--muted);
}
.profile-menu a {
  min-height: 44px;
  display: flex;
  align-items: center;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
}
.mobile-demo {
  display: none;
}
@media (max-width: 640px) {
  .profile-menu {
    right: 20px;
    top: 70px;
  }
  .mobile-demo {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-top: 18px;
    background: #eeefe6;
    border-radius: 12px;
    padding: 10px;
  }
  .mobile-demo-image {
    position: relative;
    flex: 0 0 124px;
    height: 176px;
    border-radius: 8px;
    overflow: hidden;
  }
  .mobile-demo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .mobile-demo .sample-caption {
    bottom: 36px;
    font-size: 13px;
    letter-spacing: -0.3px;
  }
  .mobile-demo .sample-caption.bold {
    font-size: 12px;
  }
  .mobile-demo .sample-caption.clean {
    font-size: 12px;
    padding: 4px 0;
  }
  .mobile-demo-note b {
    font-size: 13px;
    line-height: 1.3;
  }
  .mobile-demo-note p {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
  }
  .mobile-demo-note small {
    font-size: 9px;
    color: var(--muted);
  }
}
.sample-caption.bold {
  color: #fffefa;
  text-shadow: 0 2px 6px #0008;
}
.brand-mark {
  background: transparent;
  overflow: hidden;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project-warnings {
  background: #edf0df;
  border: 1px solid #d5dcc0;
  border-radius: 12px;
  padding: 12px 17px;
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.55;
}
.project-warnings ul {
  margin: 0;
  padding-left: 17px;
}
.project-warnings li + li {
  margin-top: 5px;
}
.retry-project,
.draft-apply {
  min-height: 44px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 9px;
  padding: 11px 16px;
  font-weight: 600;
  font-size: 13px;
}
.retry-project {
  margin: 0 0 24px;
}
.editorial-draft {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f5f0;
  padding: 14px;
  margin-bottom: 24px;
}
.editorial-draft summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 22px;
  line-height: 1.6;
}
.editorial-draft p {
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.editorial-draft .draft-title-label {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 4px;
}
#draft-title {
  font-weight: 600;
  margin: 0;
}
.draft-apply {
  width: 100%;
  margin-top: 4px;
}

/* Forms use surfaces and text marks, never external outlines */
.compose-panel,
.edit-panel,
.upload-zone,
.upload-icon,
.style-card,
input[type="text"],
.edit-styles button,
.word,
.retry-project,
.draft-apply,
.editorial-draft,
.avatar {
  border: 0;
  box-shadow: none;
}
input[type="text"] {
  background: #eeefe7;
}
.upload-zone {
  background: #f0f2e7;
}
.upload-zone:hover,
.upload-zone.drag {
  background: #e2edb6;
}
.style-card {
  padding: 5px;
  background: #f0f1e9;
}
.style-card.selected {
  padding: 5px;
  border: 0;
  box-shadow: none;
  background: var(--lime);
}
.style-card.selected .style-name > span {
  font-size: 0;
}
.style-card.selected .style-name > span::after {
  content: "✓";
  font-size: 14px;
}
.edit-styles button.selected {
  background: var(--lime);
  box-shadow: none;
}
.edit-styles button.selected::after {
  content: " ✓";
}
.word.removed {
  border: 0;
}
.editorial-draft {
  background: #f0f2e7;
}
.switch-row input:focus-visible {
  background: transparent;
}
.switch-row:has(input:focus-visible) {
  background: var(--lime);
  border-radius: 8px;
}
.switch-row:has(input:focus-visible) b {
}
.switch-row input:focus-visible + .switch {
  outline: none;
  box-shadow: none;
  background: var(--orange);
}
.switch-row input:focus-visible + .switch::after {
  background: var(--ink);
}
input[type="checkbox"]:not([role="switch"]) {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  background: #e1e6d3;
  border: 0;
  border-radius: 4px;
  flex-shrink: 0;
}
input[type="checkbox"]:not([role="switch"]):checked {
  background: var(--ink);
  color: var(--paper);
}
input[type="checkbox"]:not([role="switch"]):checked::after {
  content: "✓";
  font-size: 14px;
  line-height: 1;
}
input[type="checkbox"]:not([role="switch"]):focus-visible {
  background: var(--orange);
  color: var(--ink);
}
:is(button, a, input, summary):focus-visible {
  outline: none;
  box-shadow: none;
  background-color: var(--lime);
  color: var(--ink);
}
.style-card:focus-visible {
  background: var(--orange);
}
.word.removed:focus-visible {
}
.upload-feedback {
  margin-top: 16px;
}
.source-order {
  margin: 8px 0 16px;
}
.source-order ol {
  list-style: decimal inside;
  margin: 0 0 6px;
  padding: 0;
}
.source-order li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 44px);
  align-items: center;
  margin-bottom: 5px;
  border-radius: 14px;
  padding-inline: 12px 4px;
  background: var(--surface-2, #1d1b25);
}
.source-order li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-order button {
  min-height: 44px;
  color: var(--er-ice, currentColor);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font: inherit;
}
.source-order li button {
  font-size: 1.15rem;
}
.source-order button:focus-visible {
  background: var(--surface-2);
  text-decoration: underline;
}
.source-order button:disabled {
  opacity: 0.35;
}
.upload-feedback progress {
  display: block;
  width: 100%;
  height: 8px;
  margin: 0;
  max-width: none;
}
.upload-feedback p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 0;
}
/* One workspace at a time */
.workspace-tabs {
  display: flex;
  gap: 6px;
  max-width: 420px;
  padding: 6px;
  background: #e9ecdf;
  border-radius: 15px;
  margin: 22px 0 0;
}
.workspace-tabs button {
  border: 0;
  background: transparent;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 11px 17px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.workspace-tabs button.active {
  background: var(--ink);
  color: var(--paper);
}
.workspace-tabs svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.workspace-tabs button:focus-visible {
  background: var(--orange);
  color: var(--ink);
}
.editor-empty {
  max-width: 480px;
  padding: 65px 0 90px;
}
.editor-empty h1 {
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -2px;
  margin: 20px 0;
}
.editor-empty p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin: 22px 0;
}
.editor-empty .primary {
  max-width: 350px;
}
.empty-editor-mark {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--lime);
  font-size: 35px;
  display: grid;
  place-items: center;
}
#library-view {
  min-height: 65vh;
}
.editor-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}
.editor-panel-heading h2 {
  margin: 0;
  font-size: 22px;
}
.editor-panel-heading > span {
  font-size: 11px;
}
.editor-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #eeefe7;
  border-radius: 12px;
  margin-bottom: 18px;
}
.editor-tabs button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  min-height: 44px;
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  padding: 8px;
}
.editor-tabs button[aria-selected="true"] {
  background: var(--lime);
}
.editor-tabs button:focus-visible {
  background: var(--orange);
}
.editor-control-panel {
  min-height: 240px;
}
.editor-control-panel .title-label {
  margin-top: 0;
}
.control-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 18px 0 10px;
}
.edit-styles {
  margin: 10px 0 18px;
}
.edit-styles button {
  font-size: 12px;
}
.editor-control-panel select {
  display: block;
  width: 100%;
  height: 46px;
  appearance: auto;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: #eeefe7;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.editor-control-panel select:focus-visible {
  outline: none;
  background: var(--lime);
}
.accent-options {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}
.accent-options button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--swatch);
  color: var(--ink);
  font-size: 20px;
}
.accent-options button[aria-pressed="true"]::after {
  content: "✓";
}
.accent-options button:focus-visible {
  border-radius: 8px;
}
.word-modes {
  display: flex;
  gap: 5px;
  background: #eeefe7;
  padding: 4px;
  border-radius: 10px;
}
.word-modes button {
  border: 0;
  min-height: 44px;
  background: transparent;
  padding: 9px;
  font-size: 12px;
  border-radius: 7px;
  flex: 1;
}
.word-modes button[aria-pressed="true"] {
  background: var(--lime);
  font-weight: 600;
}
.word-modes button:focus-visible {
  background: var(--orange);
}
.words-header {
  margin-top: 15px;
}
.words {
  max-height: 220px;
}
.word.edited:not(.removed) {
  background: #e2edb6;
}
.word-dialog-actions {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  align-items: center;
}
.word-dialog-actions .primary {
  flex: 1;
}
.word-dialog-actions .quiet {
  min-width: 70px;
}
#word-original {
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin: 18px 0 9px;
  overflow-wrap: anywhere;
}
.editor-look-preview {
  position: relative;
  overflow: hidden;
  height: 116px;
  border-radius: 12px;
  background: #38382e;
  margin: 20px 0;
  --caption-accent: #e2ed9b;
}
.editor-look-preview img {
  position: absolute;
  height: 100%;
  width: 112px;
  object-fit: cover;
  object-position: center 25%;
  inset: 0 auto 0 0;
  transition:
    filter 0.2s,
    transform 0.2s;
}
.look-label {
  position: absolute;
  z-index: 3;
  top: 11px;
  right: 13px;
  font-size: 9px;
  letter-spacing: 0.8px;
  color: #ddd;
}
.look-caption,
#look-caption {
  position: absolute;
  left: 124px;
  right: 12px;
  bottom: 22px;
  color: var(--paper);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}
.look-caption mark,
#look-caption mark {
  background: var(--caption-accent);
  color: var(--ink);
  padding: 1px 5px;
}
.look-caption.clean {
  font-weight: 400;
  font-size: 18px;
}
.look-caption.clean mark {
  background: transparent;
  color: var(--paper);
}
.look-caption.bold {
  text-transform: uppercase;
  font-weight: 900;
}
.editor-look-preview[data-zoom="gentle"] img {
  transform: scale(1.05);
}
.editor-look-preview[data-zoom="punch"] img {
  transform: scale(1.15);
}
.editor-look-preview[data-effect="vignette"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 45px 12px #0008;
}
.editor-look-preview[data-effect="grain"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.6' filter='url(%23n)'/%3E%3C/svg%3E");
}
.editor-save {
  margin-top: 18px;
}
.editorial-draft {
  margin-bottom: 18px;
}
.editorial-draft .footnote {
  font-size: 10px !important;
}
.project-heading h1 {
  font-size: 30px;
}
.project-heading {
  margin: 10px 0 22px;
}
.player-wrap {
  align-self: start;
  position: sticky;
  top: 24px;
}
.player-wrap video {
  height: min(68vh, 620px);
  object-fit: contain;
  background: #252722;
}
.player-wrap #download {
  min-height: 46px;
  background: #e9ecdf;
  font-size: 12px;
}
.player-wrap #download:hover {
  background: var(--lime);
}
.project-warnings {
  font-size: 12px;
  padding: 10px 14px;
  border: 0;
}
.project-warnings ul {
  padding-left: 12px;
}
.project-warnings li {
  line-height: 1.45;
}
#project-error {
  border: 0;
}
.progress-panel {
  border: 0;
}
.upload-zone.drag {
  background: #e2edb6;
}
.upload-zone.drag .pick-label {
  font-weight: 700;
}
.admin-page .app-shell {
  padding-bottom: 0;
}
@media (max-width: 640px) {
  .app-shell:not(.admin-shell) {
    padding-bottom: calc(95px + env(safe-area-inset-bottom));
  }
  .workspace-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    max-width: none;
    margin: 0;
    padding: 7px 16px
      calc(
        7px +
          max(
            env(safe-area-inset-bottom),
            var(--tg-safe-area-inset-bottom, 0px)
          )
      );
    border-radius: 20px 20px 0 0;
    background: #f4f4ecef;
    backdrop-filter: blur(16px);
    box-shadow: 0 -6px 25px #25272208;
    gap: 12px;
  }
  .workspace-tabs button {
    flex-direction: column;
    gap: 4px;
    min-height: 54px;
    font-size: 10px;
    padding: 7px 6px;
    border-radius: 13px;
  }
  .workspace-tabs svg {
    height: 20px;
    width: 20px;
  }
  .workspace-tabs button.active {
    background: #e2edb6;
    color: var(--ink);
  }
  .workspace-tabs button:focus-visible {
    background: var(--orange);
  }
  .intro {
    padding-top: 27px;
  }
  .intro h1 {
    font-size: 49px;
  }
  .intro > p {
    font-size: 13px;
    margin-top: 17px;
  }
  .compose-panel {
    padding: 18px;
  }
  .preview-panel {
    display: none;
  }
  .mobile-demo {
    margin-top: 15px;
  }
  .topbar {
    height: 72px;
  }
  body[data-workspace="editor"] .back {
    display: none;
  }
  .project-heading {
    padding-top: 21px;
    gap: 10px;
    flex-direction: row;
    align-items: flex-start;
    margin: 0 0 18px;
  }
  .project-heading h1 {
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.7px;
    margin-top: 8px;
    max-width: 240px;
  }
  .project-heading .eyebrow {
    font-size: 8px;
  }
  .project-heading .status-pill {
    font-size: 10px;
    padding: 7px 10px;
    max-width: 95px;
    white-space: normal;
    margin-top: 15px;
  }
  .editor-grid {
    gap: 17px;
    margin-bottom: 15px;
  }
  .player-wrap {
    position: static;
  }
  .player-wrap video {
    height: 32svh;
    min-height: 220px;
    max-height: 340px;
    border-radius: 15px;
  }
  .player-wrap .footnote {
    font-size: 10px !important;
    margin-top: 7px;
  }
  .player-wrap #download {
    min-height: 40px;
    padding: 10px 14px;
    margin-top: 10px;
  }
  .edit-panel {
    padding: 18px;
    border-radius: 18px;
  }
  .editor-panel-heading {
    margin-bottom: 14px;
  }
  .editor-panel-heading h2 {
    font-size: 18px;
  }
  .editor-panel-heading > span {
    font-size: 10px;
  }
  .editor-tabs {
    margin-bottom: 17px;
  }
  .editor-tabs button {
    font-size: 11px;
  }
  .editor-control-panel {
    min-height: 220px;
  }
  .control-label {
    font-size: 12px;
    margin-top: 16px;
  }
  .editor-control-panel select {
    font-size: 16px;
  }
  .editor-control-panel .edit-check {
    font-size: 12px;
  }
  .editor-look-preview {
    height: 102px;
    margin: 16px 0;
  }
  .look-caption,
  #look-caption {
    font-size: 20px;
    left: 112px;
    bottom: 20px;
  }
  .editor-look-preview img {
    width: 100px;
  }
  .editor-save {
    position: sticky;
    bottom: calc(79px + env(safe-area-inset-bottom));
    z-index: 4;
    padding: 9px 0 4px;
    background: var(--paper);
    margin-top: 12px;
  }
  .editor-save .primary {
    min-height: 49px;
  }
  .editor-save .footnote {
    font-size: 10px !important;
    margin-top: 6px;
  }
  .words {
    max-height: 235px;
  }
  .words-header h3 {
    font-size: 13px;
  }
  .word-modes button {
    font-size: 11px;
  }
  .word-dialog-actions {
    gap: 8px;
  }
  .project-warnings {
    margin-bottom: 14px;
  }
  .retry-project {
    margin-bottom: 16px;
  }
  .editor-empty {
    padding: 52px 0;
  }
  .editor-empty h1 {
    font-size: 42px;
  }
  .editor-empty p {
    font-size: 14px;
  }
  .recent {
    margin-top: 27px;
  }
  .recent-heading h2 {
    font-size: 27px;
  }
  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
  footer {
    margin-top: 25px;
  }
  body[data-workspace="editor"] footer {
    display: none;
  }
}
@media (max-width: 640px) {
  .editor-save {
    position: static;
    padding: 8px 0 0;
  }
  .editor-control-panel {
    min-height: 0;
  }
  .words {
    max-height: 210px;
  }
  .editor-look-preview {
    height: 92px;
  }
  .editor-control-panel .words-header {
    margin-top: 10px;
  }
}
input[type="text"]:focus-visible {
  background: var(--lime);
  outline: none;
  border: 0;
  box-shadow: none;
}
/* The editor uses only the project's protected frame, never the studio model */
.editor-look-preview {
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 9/16;
  margin: 18px auto;
  background: #35392f;
  isolation: isolate;
}
.editor-look-preview img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.editor-look-preview .look-label {
  top: 9px;
  left: 8px;
  right: 8px;
  text-align: center;
  font-size: 8px;
  text-shadow: 0 1px 5px #000;
  background: #25272280;
  padding: 5px;
  border-radius: 4px;
}
.editor-look-preview #look-caption {
  left: 10px;
  right: 10px;
  bottom: 22%;
  text-align: center;
  font-size: 20px;
  line-height: 1.35;
  text-shadow: 0 1px 5px #0009;
}
.editor-look-preview #look-caption mark {
  text-shadow: none;
  background: var(--caption-accent);
  color: var(--ink);
}
.editor-look-preview #look-caption.clean {
  font-weight: 400;
  font-size: 18px;
  background: #25272299;
  border-radius: 5px;
  padding: 5px;
}
.editor-look-preview #look-caption.clean mark {
  background: transparent;
  color: inherit;
}
.editor-look-preview #look-caption.bold {
  font-weight: 900;
  text-transform: uppercase;
}
.editor-look-preview #look-title {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 16%;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: 8px;
  overflow-wrap: anywhere;
  z-index: 2;
}
.editor-look-preview:not(.has-poster) {
  aspect-ratio: 16/10 !important;
  width: 100% !important;
}
.editor-look-preview:not(.has-poster) #look-title {
  top: 25%;
  font-size: 13px;
}
.editor-look-preview:not(.has-poster) #look-caption {
  bottom: 15%;
  font-size: 17px;
}

.player-wrap video {
  display: block;
  width: auto;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  margin-inline: auto;
}

@media (max-width: 760px) {
  .player-wrap video {
    height: clamp(270px, 40svh, 390px);
    max-height: 390px;
  }
}
.color-tuning {
  margin-top: 19px;
}
.color-tuning summary {
  min-height: 44px;
  display: list-item;
  line-height: 44px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.range-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 12px 0 0;
  gap: 12px;
}
.range-label output {
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
  color: var(--muted);
}
.color-tuning input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 34px;
  background: transparent;
  outline: none;
  border: 0;
  cursor: pointer;
  margin: 0;
}
.color-tuning input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border: 0;
  border-radius: 4px;
  background: #dce1cd;
}
.color-tuning input[type="range"]::-moz-range-track {
  height: 5px;
  border: 0;
  border-radius: 4px;
  background: #dce1cd;
}
.color-tuning input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  margin-top: -7px;
}
.color-tuning input[type="range"]::-moz-range-thumb {
  width: 19px;
  height: 19px;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
}
.color-tuning input[type="range"]:focus-visible {
  background: var(--lime);
  border-radius: 8px;
  outline: none;
  box-shadow: none;
}
.color-tuning input[type="range"]:focus-visible::-webkit-slider-thumb {
  background: var(--orange);
}
.color-tuning input[type="range"]:focus-visible::-moz-range-thumb {
  background: var(--orange);
}
.color-tuning .quiet {
  display: block;
  margin-left: auto;
  font-size: 12px;
}
.preview-filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
