/* The village-house and ornament designers (js/maker-ui.js). They sit in the same frame as the lettering designer
   and borrow its styles (.lt-*); only what differs is here. */
.est-maker { min-width: 0; }
.mk { min-width: 0; }
.mk .lt-controls, .mk .lt-side { min-width: 0; }

/* ideas to start from: a row of pills that wraps */
.mk-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-idea {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--panel); color: var(--ink); font: 400 .95rem/1.15 var(--body); cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.mk-idea:hover { border-color: var(--ink); }
.mk-idea[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #f1f4fd; }
.mk-idea:focus-visible, .mk-tile:focus-visible, .mk-font:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-idea-icon { display: grid; color: var(--accent); }
.mk-idea-icon svg { width: 18px; height: 18px; }

/* choices */
.mk-tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.mk-tiles-wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mk-tile small { font-size: .86rem; color: var(--ink); }
.mk-fonts { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.mk-font { min-height: 46px; font-size: 1.12rem; line-height: 1.1; }
.mk-field[hidden] { display: none; }
.mk-field > span:first-child { display: block; }
.mk-colour-name { color: var(--muted); font-weight: 400; }
.mk-colour-name::before { content: "· "; }
.mk .check small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; font-weight: 400; }
.mk .check b { font-weight: 500; }
.mk .hint { margin: 0; }
.mk textarea.input { resize: vertical; }

/* the preview (its frame is already pinned, so the "Building…" tag can sit on it) */
.mk-busy {
  position: absolute; left: 12px; top: 12px; z-index: 2; margin: 0; padding: 5px 11px; border-radius: 999px;
  background: rgba(20, 20, 22, .72); color: #fff; font-size: .8rem; letter-spacing: .02em; pointer-events: none;
}
.mk-busy[hidden] { display: none; }
@media (max-width: 480px) { .mk .lt-tools { flex-wrap: wrap; justify-content: flex-end; } }

/* what gets printed: every part, its colour and how it goes together */
.mk-parts-box { margin: 10px 0 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.mk-parts-box summary { padding: 11px 14px; cursor: pointer; font-weight: 500; }
.mk-parts { display: grid; gap: 9px; margin: 0; padding: 2px 14px 14px; list-style: none; }
.mk-parts li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; }
.mk-parts i { width: 16px; height: 16px; margin-top: 3px; border: 1px solid rgba(0, 0, 0, .18); border-radius: 50%; }
.mk-parts b { display: block; font-weight: 500; }
.mk-parts small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; }

/* the designers, one tap away from the home page: three across on computers, slim rows on phones */
.mk-promos { display: grid; gap: 10px; margin: 0 0 22px; }
.mk-promos .lt-promo { margin: 0; }
@media (min-width: 641px) and (max-width: 999px) { .mk-promos .lt-promo { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); } }
@media (min-width: 1000px) {
  .mk-promos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 30px; }
  .mk-promos .lt-promo { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; gap: 12px; padding: 12px 12px 16px; }
  .mk-promos .lt-promo-img { aspect-ratio: 16 / 9; }
  .mk-promos .lt-promo-text { padding: 0 6px; gap: 6px; }
  .mk-promos .lt-promo-text b { font-size: 1.55rem; }
  .mk-promos .lt-promo-go { padding: 9px 16px; }
}
@media (max-width: 640px) {
  .mk-promos .lt-promo { grid-template-columns: 84px minmax(0, 1fr); padding: 8px; }
  .mk-promos .lt-promo-text b { font-size: 1.12rem; }
  .mk-promos .lt-promo-text > span:not(.lt-promo-go) { font-size: .86rem; line-height: 1.3; }
  .mk-promos .lt-promo-go { margin-top: 2px; padding: 0; background: none; color: var(--accent); font-size: .9rem; }
}

/* phones: preview, choices, then size and price, the parts list and notes */
@media (max-width: 900px) { .mk-parts-box, .mk .lt-notes { order: 2; } }

@media (prefers-reduced-motion: reduce) { .mk-idea { transition: none; } }

/* Words with a formatting bar (bold, italic, size, font, colour for the selected letters), like the lettering designer's */
.mk-rich { position: relative; }
.mk-format { position: relative; }
.mk-rich > .input { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.mk-format .mk-format-wide { font-size: .88rem; }
.mk-format > button:last-of-type { margin-left: auto; color: var(--muted); }
.mk-pop {
  position: absolute; z-index: 40; top: calc(100% + 4px); right: 0; width: min(280px, 86vw); max-height: 260px; overflow: auto; padding: 8px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); box-shadow: 0 14px 34px -18px rgba(28, 26, 23, .45);
}
.mk-pop[hidden] { display: none; }
.mk-pop-fonts { display: grid; gap: 2px; }
.mk-pop-fonts button { min-height: 40px; padding: 4px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 1.05rem; text-align: left; cursor: pointer; }
.mk-pop-fonts button:first-child { font: 400 .9rem var(--body); color: var(--muted); }
.mk-pop-fonts button:hover { background: var(--bg-2); }
.mk-pop-fonts button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mk .lt-tools { flex-wrap: wrap; justify-content: flex-end; left: 10px; }
.mk .lt-tools button[hidden] { display: none; }

/* Tidier controls in every designer: colours tucked into a dropdown, long lists folded (js/ui.js) */
.cdrop-wrap[hidden] { display: none; }
.cdrop {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; padding: 6px 14px 6px 8px; border: 1px solid var(--line-2);
  border-radius: 999px; background: var(--panel); color: var(--ink); font: 400 .95rem/1.2 var(--body); cursor: pointer;
}
.cdrop:hover { border-color: var(--ink); }
.cdrop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cdrop-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); }
.cdrop-dot.metal { box-shadow: inset 0 1px 2px rgba(255, 255, 255, .7), inset 0 -2px 3px rgba(0, 0, 0, .35); }
.cdrop-dot.none { background: repeating-linear-gradient(45deg, var(--line) 0 4px, var(--panel) 4px 8px); }
.cdrop-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cdrop-chev { flex: none; width: 8px; height: 8px; margin: -4px 2px 0 2px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); }
.cdrop[aria-expanded="true"] .cdrop-chev { transform: rotate(-135deg); margin-top: 4px; }
.cdrop-panel { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cdrop-panel[hidden] { display: none; }
.fold.is-folded > .fold-more:not([aria-checked="true"]) { display: none; }
.fold-btn { margin-top: 8px; padding: 8px 2px; border: 0; background: none; color: var(--accent); font: 500 .9rem var(--body); cursor: pointer; }
.fold-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* a finish's explanation shows once it's ticked */
.mk .check input:not(:checked) + span small { display: none; }
.cdrop-name::first-letter { text-transform: uppercase; }
