/* Making a brand kit by chat (#/kit-new, #/kit-chat/<key>): the files and the talk on the left, the kit as
   a card on the right; one column on a narrow screen. */
.page.kc > .kc-inner { max-width: 1240px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.kc-left > h1 { margin-bottom: 6px; }
.kc-left > p { margin: 0 0 16px; }
.kc-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 18px; }
.kc-box h2, .kc-card h2 { font-size: 17px; margin-bottom: 6px; }
.kc-ask { margin: 0 0 12px; }
.kc-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.kc-drop { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 20px 14px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; background: var(--bg); }
.kc-drop:hover, .kc-drop.over, .kc-drop:focus-within { border-color: var(--brand); background: var(--soft); }
.kc-drop.off { opacity: .6; pointer-events: none; }
.kc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 14px 0; }
.kc-file { position: relative; display: grid; gap: 6px; align-content: start; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.kc-file-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Thumbnails sit on a chequered backing so a see-through logo shows; a light logo gets a dark one. */
.kc-thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: repeating-conic-gradient(#e6e6ec 0% 25%, #ffffff 0% 50%) 50% / 16px 16px; }
.kc-thumb.dark { background: repeating-conic-gradient(#2c2c34 0% 25%, #3a3a44 0% 50%) 50% / 16px 16px; }
.kc-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; min-width: 0; min-height: 0; }
.kc-roles { display: flex; gap: 0; }
.kc-roles .btn { flex: 1; padding: 3px 6px; font-size: 13px; border-radius: 0; color: var(--muted); }
.kc-roles .btn:first-child { border-radius: 8px 0 0 8px; }
.kc-roles .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.kc-roles .btn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; opacity: 1; }
.kc-x { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; line-height: 1; font-size: 17px; }
.kc-x:hover { border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }

.kc-talk .msg { margin-bottom: 14px; }
.kc-ohdeo { display: grid; gap: 6px; justify-items: start; max-width: 92%; }
.kc-said { background: var(--panel); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.kc-ohdeo.failed .kc-said { border-color: var(--danger); }
.kc-changed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kc-examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.kc-examples .chip { cursor: pointer; font: inherit; font-size: 13px; }
.kc-examples .chip:hover { border-color: var(--brand); }
.kc-composer { display: flex; gap: 8px; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.kc-composer textarea { border: 0; resize: vertical; min-height: 44px; max-height: 200px; background: transparent; padding: 6px 8px; }
.kc-composer textarea:focus { outline: none; }
.kc-composer:focus-within { border-color: var(--brand); }

.kc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); position: sticky; top: 0;
  max-height: calc(100vh - 110px); overflow-y: auto; }
.kc-sec { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.kc-card > h2 + .kc-sec { border-top: 0; padding-top: 4px; }
.kc-sec h3 { font-size: 15px; }
.kc-field h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 2px; }
.kc-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.kc-field .chips { margin: 2px 0 0; }
.kc-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.kc-color { display: flex; gap: 10px; align-items: center; min-width: 0; }
.kc-swatch { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); }
.kc-color code { font-size: 12.5px; background: var(--soft); padding: 1px 5px; border-radius: 5px; }
.kc-fonts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.kc-font-sample { font-size: 22px; line-height: 1.25; margin: 2px 0 4px; overflow-wrap: anywhere; }
.kc-font-sample.headline { font-size: 28px; font-weight: 700; }
.kc-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.kc-thumbs figure { margin: 0; width: 104px; display: grid; gap: 4px; text-align: center; }
.kc-save { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.kc-saved { margin-top: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--ok); display: grid; gap: 10px; }
.kc-saved a.btn { text-decoration: none; color: var(--ink); }
/* What the last answer changed lights up once. */
@keyframes kc-lit { from { background: color-mix(in srgb, var(--accent) 22%, transparent); } to { background: transparent; } }
.kc-card .lit { animation: kc-lit 2.4s ease-out; border-radius: 8px; }

@media (max-width: 1000px) {
  .page.kc > .kc-inner { grid-template-columns: minmax(0, 1fr); }
  .kc-card { position: static; max-height: none; }
}
