/* Make a look (make.html): the form on the left, the app's previews on the right. Uses app.css's
   colors and controls. */
.mk-kind { margin: 0 0 20px; }
.mk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
  gap: 24px;
  align-items: start;
  padding-bottom: 48px;
}
.mk-form { display: grid; gap: 16px; min-width: 0; }
.mk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mk-card[hidden] { display: none; }
.mk-card h2 { margin: 0 0 12px; font-size: 21px; }
.mk-card h3 { margin: 4px 0 8px; font: 600 14px/1.3 var(--font); color: var(--muted); text-transform: none; }
.mk-sub { margin-top: 18px !important; }
.mk-hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.mk-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 12px; min-width: 0; }
.mk-field[hidden] { display: none; }
.mk-field output { font-weight: 400; color: var(--muted); }
.mk-field input:not([type="range"]):not([type="checkbox"]),
.mk-field select {
  font: 400 15px/1.3 var(--font);
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  height: 40px;
  padding: 0 12px;
  width: 100%;
  min-width: 0;
}
.mk-field input:focus, .mk-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.mk-field input[type="range"] { accent-color: var(--accent); width: 100%; }
.mk-check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 15px; margin-bottom: 12px; cursor: pointer; }
.mk-check input { accent-color: var(--accent); width: 18px; height: 18px; }
.mk-seg { margin-bottom: 14px; flex-wrap: wrap; }

.mk-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mk-mode { display: grid; gap: 8px; align-content: start; }
.mk-color {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 84px auto;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.mk-color input[type="color"], .mk-grid9 input[type="color"] {
  width: 34px; height: 34px; padding: 0; border: 1px solid var(--border-strong); border-radius: 10px;
  background: none; cursor: pointer;
}
.mk-color input[type="color"]::-webkit-color-swatch-wrapper, .mk-grid9 input::-webkit-color-swatch-wrapper { padding: 3px; }
.mk-color input[type="color"]::-webkit-color-swatch, .mk-grid9 input::-webkit-color-swatch { border: 0; border-radius: 7px; }
.mk-color-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-hex {
  font: 13px var(--mono); color: var(--text); background: var(--surface-solid);
  border: 1px solid var(--border); border-radius: 10px; height: 32px; padding: 0 8px; width: 100%;
}
.mk-badge { font: 600 12px var(--mono); padding: 2px 6px; border-radius: 999px; min-width: 0; }
.mk-badge.is-ok { background: color-mix(in srgb, #1e8e5a 18%, transparent); color: color-mix(in srgb, #1e8e5a 80%, var(--text)); }
.mk-badge.is-bad { background: color-mix(in srgb, #d93b3b 18%, transparent); color: color-mix(in srgb, #d93b3b 85%, var(--text)); }

.mk-meshes { margin-bottom: 12px; }
.mk-grid9 { display: grid; grid-template-columns: repeat(3, 44px); gap: 8px; }
.mk-grid9 input[type="color"] { width: 44px; height: 44px; }
.mk-grid9 input.is-bad { outline: 2px solid #d93b3b; outline-offset: 2px; }

.mk-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
  max-height: 212px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.mk-icon {
  height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-solid);
  color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.mk-icon:hover { border-color: var(--border-strong); }
.mk-icon[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.mk-ico { display: inline-flex; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mk-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--accent-soft); color: var(--text);
  font: 13px var(--font); cursor: pointer;
}
.mk-x { color: var(--muted); font-size: 16px; line-height: 1; }

.mk-errors { margin: 0 0 12px; padding-left: 20px; color: color-mix(in srgb, #d93b3b 80%, var(--text)); font-size: 14px; }
.mk-errors:empty { display: none; }
.mk-file { margin-bottom: 14px; }
.mk-file-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mk-file-head > code { font-weight: 600; word-break: break-all; }
.mk-file-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-file-actions .btn { height: 34px; font-size: 14px; }
.mk-file-actions .btn:disabled, .mk-file-actions .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.mk-code { max-height: 280px; overflow: auto; }
#files.is-disabled .mk-code { opacity: 0.6; }

.mk-preview { position: sticky; top: 80px; }
.mk-preview-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.mk-preview-head h2 { margin: 0 0 12px; font-size: 21px; }
.mk-previews { display: grid; gap: 14px; }
.mk-phones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-fig { margin: 0; }
.mk-fig figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }
.mk-phone, .mk-chat { position: relative; }
.mk-points { position: absolute; inset: 0; pointer-events: none; }
.mk-dot {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45); cursor: grab; pointer-events: auto;
  touch-action: none;
}
.mk-dot:active { cursor: grabbing; }

@media (max-width: 900px) {
  .mk-layout { grid-template-columns: 1fr; }
  .mk-preview { position: static; order: -1; }
  .mk-preview .mk-previews { grid-template-columns: 1fr 1fr; }
  .mk-preview .mk-phones { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  :root { --side: 16px; }
  .mk-row2, .mk-modes { grid-template-columns: 1fr; }
  .mk-preview .mk-previews { grid-template-columns: 1fr; }
  .bar-nav a:not(.btn) { display: none; }
  .mk-here { display: none; }
}
