/* Text Match Cut Generator only. The editor layout (.tt-*) comes from typing.css,
   and shared type, colors and components come from main.css. */
.mc-text { min-height: 0; height: 52px; resize: none; font-size: 18px; }
.mc-words { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; }
.mc-words.is-locked { opacity: .6; pointer-events: none; }
.mc-word {
  min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--card); color: var(--ink-2); font: 600 15px var(--body); cursor: pointer;
}
.mc-word:hover { border-color: var(--mat); }
.mc-word[aria-pressed="true"] { border-color: var(--ink); background: #ffe45c; color: var(--ink); }
.mc-word:focus-visible, .mc-tools button:focus-visible, .mc-example:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.mc-stage { min-height: 280px; cursor: default; }
.mc-stage canvas, .mc-stage img, .mc-stage video {
  display: block; max-width: 100%; max-height: min(58vh, 440px); width: auto; height: auto;
  object-fit: contain; border-radius: 4px; background: #f1ede2; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6);
}
.mc-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mc-tools button[aria-pressed="true"] { border-color: var(--mat); background: var(--mat-tint); color: var(--mat-deep); }
.mc-tools button:disabled { opacity: .5; cursor: not-allowed; }

.mc-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-swatches label { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.mc-swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mc-swatches span { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(22, 32, 28, .25); }
.mc-swatches .is-none { background: linear-gradient(135deg, var(--card) 45%, #c8553d 45% 55%, var(--card) 55%); }
.mc-swatches label:has(input:checked) { box-shadow: 0 0 0 2px var(--ink); }
.mc-swatches label:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; }
.tt-seg label.is-off { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.tt-body select:disabled { opacity: .5; }

/* Live example cards: small canvases, no video files. */
.mc-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mc-example {
  display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.mc-example:hover { border-color: var(--mat); }
.mc-example canvas { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 10px; background: #f1ede2; }
.mc-example b { display: block; font-size: 15px; }
.mc-example small { display: block; font-size: 13px; color: var(--muted); }
.mc-example .go { font-size: 13.5px; font-weight: 600; color: var(--mat-deep); }

@media (min-width: 640px) {
  /* Three cards spread across the full width: first one on the left edge, last one on the right. */
  .mc-examples { grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: space-between; gap: 24px; }
  .mc-example { padding: 14px; }
}
@media (min-width: 980px) {
  .mc-stage { min-height: 480px; }
  .mc-stage canvas, .mc-stage img, .mc-stage video { max-height: 480px; }
}
@media (max-width: 639px) {
  .mc-hero .lede { font-size: 16px; }
  .mc-hero .hero-head { margin-bottom: 12px; }
  .mc-example small { display: none; }
}

/* The preview starts paused; a play badge shows that the still frame can move. */
.mc-stage { position: relative; }
.mc-stage canvas { cursor: pointer; }
.mc-stage.is-paused::after {
  content: ""; position: absolute; left: 50%; bottom: 18px; width: 52px; height: 52px; margin-left: -26px; /* below the phrase, never over it */
  border-radius: 50%; pointer-events: none;
  background: rgba(22, 32, 28, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6v12l10-6z' fill='%23fff'/%3E%3C/svg%3E") center / 28px no-repeat;
}

/* Format choice sits beside the Export button so GIF is never hidden in a closed panel. */
.mc-format { margin: 0; padding: 0; border: 0; }
.mc-format[disabled] { opacity: .6; }
