.mk {
  --mk-soft: #f3f6ef;
  --mk-leaf: #556e3b;
  color: var(--ink);
  min-width: 0;
}
.mk [hidden] {
  display: none !important;
}
.mk .mk-create-layout,
.mk .mk-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(255px, 0.85fr);
  gap: 20px;
  align-items: start;
}
.mk .mk-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  overflow: hidden;
}
.mk h2 {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.035em;
  font-weight: 680;
}
.mk-fields {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 22px;
  display: grid;
  gap: 18px;
}
.mk input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.mk .field {
  min-width: 0;
  gap: 7px;
}
.mk .field > small,
.mk .field > span > small,
.mk .mk-voice small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}
.mk .field > span > small {
  margin-left: 4px;
}
.mk-formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mk-format,
.mk-theme {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.mk-format input,
.mk-theme input {
  position: absolute !important;
  opacity: 0;
  margin: 0;
  inset: 0;
  width: 100% !important;
  height: 100%;
  cursor: pointer;
}
.mk-format {
  padding: 12px 10px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.45;
}
.mk-format:has(input:checked) {
  border-color: #7f9e5f;
  background: #f2f7ec;
}
.mk-format:has(input:focus-visible),
.mk-theme:has(input:focus-visible),
.mk-drop:has(input:focus-visible) {
  outline: 3px solid #80a93e;
  outline-offset: 2px;
}
.mk-format-icon,
.mk-delivery-icon,
.mk-work-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #edf2e7;
  color: #4e663a;
}
.mk-format-icon {
  background: transparent;
  width: auto;
}
.mk-format strong,
.mk-format small,
.mk-delivery strong,
.mk-delivery small,
.mk-work strong,
.mk-work small,
.mk-voice strong,
.mk-voice small {
  display: block;
}
.mk-format small,
.mk-delivery small,
.mk-work small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 3px;
}
.mk-format i {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid #cbd2c4;
  border-radius: 50%;
  margin-left: auto;
  color: transparent;
}
.mk-format:has(input:checked) i {
  color: #fff;
  border-color: #57733b;
  background: #57733b;
}
.mk-drop {
  position: relative;
  min-height: 88px;
  display: flex;
  flex-flow: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  background: #f8faf5;
  border: 1px dashed #becbb4;
  border-radius: 8px;
  color: #5f754d;
}
.mk-drop strong {
  font-size: 13px;
  font-weight: 600;
}
.mk-drop small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.mk-drop:hover,
.mk-drop.is-over {
  background: #eef5e6;
  border-color: #8da277;
}
.mk-upload-status {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.mk-upload-status:empty {
  display: none;
}
.mk-photos,
.mk-editor-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.mk-photo {
  position: relative;
  width: 77px;
  height: 77px;
  border-radius: 7px;
  background: var(--mk-soft);
  overflow: hidden;
}
.mk-photo > img,
.mk-editor-photos img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mk-photo > span,
.mk-editor-photos button span {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 9px;
  background: #2c372bcc;
  border-radius: 4px;
  color: white;
  padding: 1px 4px;
}
.mk-photo-tools {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  background: #fcfdf9ed;
  justify-content: center;
}
.mk-photo-tools button {
  padding: 3px 4px;
  line-height: 1;
  color: #34502d;
}
.mk-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.mk-theme {
  border: 1px solid var(--line);
  gap: 6px;
  padding: 6px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #53604d;
  line-height: 16px;
}
.mk-theme:has(input:checked) {
  background: #eef3e8;
  border-color: #8ba37a;
  color: #354d2b;
}
.mk-theme i {
  width: 13px;
  height: 13px;
  display: block;
  flex: none;
  border: 1px solid #0001;
  border-radius: 50%;
  background: #a9bb9d;
}
.mk-theme-sand i {
  background: #d8b08a;
}
.mk-theme-ink i {
  background: #303738;
}
.mk-voice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: #495840;
}
.mk-voice input {
  margin: 2px 0 0;
  accent-color: #587a3a;
}
.mk-voice small {
  margin-top: 2px;
}
.mk-generate {
  justify-self: start;
  min-width: 150px;
}
.mk-reference,
.mk-editor-grid {
  min-width: 0;
}
.mk-template-art {
  position: relative;
  aspect-ratio: 1.66;
  background: #eff2e9;
}
.mk-template-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mk-template-art > span {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fffffff1;
  border-radius: 5px;
  font-size: 11px;
  padding: 4px 7px;
  color: #394b31;
}
.mk-template-body {
  padding: 19px 18px 15px;
}
.mk-template-body > small {
  font-size: 11px;
  color: #667c54;
}
.mk-template-body h2 {
  margin: 6px 0 15px;
  overflow-wrap: anywhere;
}
.mk-template-body details,
.mk-copy-settings {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.mk-template-body summary,
.mk-copy-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #53634a;
}
.mk-template-body summary::-webkit-details-marker,
.mk-copy-settings summary::-webkit-details-marker {
  display: none;
}
.mk-template-body details[open] summary svg,
.mk-copy-settings[open] summary svg {
  transform: rotate(180deg);
}
.mk-template-body details p {
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.mk-delivery {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 4px;
}
.mk-delivery strong {
  font-size: 12px;
  font-weight: 600;
}
.mk-reference-empty {
  padding: 24px;
}
.mk-reference-empty h3 {
  font-size: 16px;
  margin-top: 9px;
}
.mk-reference-empty p {
  font-size: 13px;
  color: var(--muted);
  margin: 7px 0 15px;
}
.mk .mk-library {
  margin-top: 22px;
  padding: 17px 21px;
  scroll-margin-top: 14px;
}
.mk-section-head,
.mk-actions,
.mk-player-controls,
.mk-arrange,
.mk-back,
.mk-work {
  display: flex;
  align-items: center;
}
.mk-section-head {
  justify-content: space-between;
  gap: 12px;
}
.mk-section-head > span {
  color: var(--muted);
  font-size: 11px;
}
.mk-zero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.mk-work {
  width: 100%;
  min-width: 0;
  padding: 13px 0;
  gap: 11px;
  text-align: left;
  border-top: 1px solid var(--line);
}
.mk-work:first-child {
  margin-top: 15px;
}
.mk-work > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.mk-work strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.mk-work small {
  margin-top: 3px;
}
.mk-work time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.mk-work:hover strong {
  color: #587235;
}
.mk-vid {
  background: #eeeaf4;
  color: #736188;
}
.mk-img {
  background: #efeedf;
  color: #8b774a;
}
.mk-error,
.mk-conflict {
  font-size: 12px;
  line-height: 1.65;
  border-radius: 7px;
  padding: 8px 11px;
  overflow-wrap: anywhere;
}
.mk-error {
  background: #faeee9;
  color: #984533;
}
.mk-editor-error {
  margin: 0 0 12px;
}
.mk-conflict {
  background: #fbf4df;
  color: #725e36;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mk-conflict > span {
  flex: 1 0 100%;
}
.mk .mk-editor-grid {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.02fr);
}
.mk-back {
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
  padding: 0;
  margin-bottom: 8px;
}
.mk-back:hover {
  color: var(--green);
}
.mk-actions {
  gap: 8px;
}
.mk-preview-panel > .mk-section-head {
  padding: 16px 19px;
}
.mk-preview-surface {
  display: grid;
  place-items: center;
  padding: 16px;
  background-color: #eef0e9;
  background-image: radial-gradient(#cdd2c7 0.75px, transparent 0.75px);
  background-size: 8px 8px;
}
.mk-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  width: min(100%, 310px);
  background: #f7f8f2;
  box-shadow: 0 3px 13px #46523c24;
  overflow: hidden;
}
.mk-frame.mk-tall {
  aspect-ratio: 9 / 16;
  width: min(100%, 245px);
}
.mk-frame > img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  display: block;
}
.mk-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: #f6f8f0e8;
  color: #68775c;
  font-size: 12px;
  line-height: 1.6;
}
.mk-player-controls {
  gap: 10px;
  padding: 13px 17px;
  justify-content: center;
}
.mk-player-controls .btn {
  min-width: 29px;
  padding: 5px 7px;
  font-size: 11px;
}
.mk-page-number {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mk-player-controls .mk-play {
  margin-left: 5px;
}
.mk-scene-list {
  display: flex;
  overflow: auto;
  gap: 7px;
  padding: 2px 15px 15px;
}
.mk-scene-list > button {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px;
  color: #535d4e;
  min-width: 92px;
  max-width: 138px;
  flex: 1 0 95px;
  text-align: left;
}
.mk-scene-list > button.is-selected {
  border-color: #88a767;
  background: #f0f5e9;
}
.mk-scene-list img {
  width: 28px;
  height: 33px;
  object-fit: contain;
  background: #ecf0e6;
  border-radius: 3px;
  flex: none;
}
.mk-scene-list > button > span {
  min-width: 0;
}
.mk-scene-list strong,
.mk-scene-list small {
  display: block;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-scene-list small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
.mk-edit-form .mk-fields {
  gap: 14px;
}
.mk-inline-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 10px;
}
.mk-editor-photos > button {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: var(--mk-soft);
  border: 1px solid var(--line);
  padding: 2px;
  overflow: hidden;
}
.mk-editor-photos > button.is-selected {
  border: 2px solid #71944e;
  background: #e7f0dd;
  padding: 1px;
}
.mk-editor-photos button span {
  top: 2px;
  left: 2px;
}
.mk-arrange {
  flex-wrap: wrap;
  gap: 6px;
}
.mk-arrange .btn {
  font-size: 11px;
  padding: 4px 8px;
}
.mk-divider {
  border-top: 1px solid var(--line);
}
.mk-copy-settings .field {
  margin-top: 12px;
}
.mk-loading {
  padding: 25px;
  font-size: 13px;
  color: var(--muted);
}
.mk-movie {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 61vh;
  min-height: 120px;
  background: #232722;
  margin: auto;
}
@media (min-width: 1180px) {
  .mk-reference,
  .mk-preview-panel {
    position: sticky;
    top: 14px;
  }
}
@media (max-width: 1010px) {
  .mk .mk-editor-grid {
    grid-template-columns: minmax(240px, 0.88fr) minmax(275px, 1fr);
  }
  .mk .mk-create-layout {
    grid-template-columns: minmax(300px, 1.3fr) minmax(210px, 0.8fr);
  }
  .mk-fields {
    padding: 17px;
  }
  .mk-format {
    gap: 6px;
  }
  .mk-format-icon .ic {
    width: 16px;
  }
  .mk-format {
    padding: 9px 7px;
  }
}
@media (max-width: 840px) {
  .mk .mk-editor-grid {
    grid-template-columns: minmax(200px, 0.85fr) minmax(238px, 1fr);
    gap: 12px;
  }
  .mk .mk-create-layout {
    grid-template-columns: minmax(260px, 1.2fr) minmax(186px, 0.8fr);
    gap: 12px;
  }
  .mk-format-icon {
    display: none;
  }
  .mk-format i {
    width: 13px;
    height: 13px;
  }
  .mk-format {
    font-size: 12px;
  }
  .mk-fields {
    padding: 14px;
  }
  .mk-template-body {
    padding: 14px;
  }
  .mk-template-body h2 {
    font-size: 16px;
  }
}
@media (max-width: 670px) {
  .mk .mk-create-layout,
  .mk .mk-editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mk .mk-create-layout {
    gap: 12px;
  }
  .mk-reference {
    order: -1;
  }
  .mk-template {
    display: flex;
  }
  .mk-template-art {
    width: 95px;
    min-height: 95px;
    aspect-ratio: auto;
    flex: none;
  }
  .mk-template-art > img {
    position: absolute;
    inset: 0;
  }
  .mk-template-art > span {
    left: 5px;
    top: 5px;
    font-size: 9px;
    padding: 2px 4px;
  }
  .mk-template-art > span svg {
    width: 11px;
  }
  .mk-template-body {
    padding: 10px 13px;
    flex: 1;
    min-width: 0;
  }
  .mk-template-body h2 {
    font-size: 14px;
    margin: 3px 0 7px;
  }
  .mk-template-body details {
    padding-top: 5px;
  }
  .mk-template-body summary {
    font-size: 10px;
  }
  .mk-template-body details[open] p {
    font-size: 11px;
  }
  .mk-delivery {
    display: none;
  }
  .mk-format-icon {
    display: grid;
  }
  .mk-fields {
    padding: 16px;
  }
  .mk .mk-library {
    padding: 14px;
  }
  .mk .page-intro .page-lead {
    max-width: none;
  }
  .mk-editor-intro {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .mk-editor-intro .mk-actions {
    margin-top: 1px;
  }
  .mk-frame {
    width: min(100%, 210px);
  }
  .mk-frame.mk-tall {
    width: min(100%, 158px);
  }
  .mk-preview-surface {
    padding: 10px;
  }
  .mk-preview-panel > .mk-section-head {
    padding: 12px 15px;
  }
  .mk-player-controls {
    padding: 9px 12px;
  }
  .mk-scene-list {
    padding: 0 12px 11px;
  }
  .mk-work time {
    display: none;
  }
  .mk-arrange .btn {
    min-height: 32px;
  }
  .mk-photo-tools button {
    min-height: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mk * {
    scroll-behavior: auto !important;
  }
}
.mk-photo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mk-photo-replace {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  position: relative;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.4;
  border-radius: 5px;
  color: #405c30;
  background: #edf4e5;
  cursor: pointer;
}
.mk-photo-replace:focus-within {
  outline: 2px solid #80a93e;
  outline-offset: 2px;
}
.mk-change-status:empty {
  display: none;
}
