/* Demo-only additions on top of kaptin-app.css: the Flowery preview
 * page inside the browser panel, the typing caret, and the tour extras
 * (try line, resume button, toast). App classes stay untouched. */

html, body { height: 100%; overflow: hidden; }
[hidden] { display: none !important; }
.app { height: 100%; }
.thread .msg .tag.avatar.mini { vertical-align: -3px; margin-right: 4px; }

.tour-try { color: var(--text) !important; }
.tour-tip h2:focus { outline: none; }
@media (max-width: 760px) { .sidebar { width: 210px !important; } }
.tour-actions .primary:disabled { opacity: 0.55; }
.tour-wait { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.tour-wait::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--accent); border-top-color: transparent;
  animation: kd-spin 0.9s linear infinite;
}
@keyframes kd-spin { to { transform: rotate(360deg); } }
.tour-highlight { transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease; }
.tour-tip { transition: top 0.25s ease, left 0.25s ease; }
.tour-tip .cta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tour-tip a.primary {
  display: inline-block; padding: 5px 12px; text-decoration: none;
  background: var(--accent); border: 1px solid var(--accent); color: #fff;
  border-radius: 999px; font-weight: 600;
}

.kd-resume {
  position: fixed; left: 14px; bottom: 14px; z-index: 202;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); border-color: var(--accent); color: #fff;
  border-radius: 999px; font-weight: 600; padding: 8px 16px; box-shadow: var(--shadow-lg);
}
.kd-resume:hover:not(:disabled) { background: var(--accent); filter: brightness(0.94); }
.kd-toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 210;
  background: var(--text); color: var(--panel); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; box-shadow: var(--shadow-lg); white-space: nowrap;
}

.kd-caret { display: inline-block; width: 2px; height: 1em; background: currentColor; vertical-align: -2px; animation: kd-blink 0.9s steps(1) infinite; }
@keyframes kd-blink { 50% { opacity: 0; } }

.msg { white-space: pre-wrap; }
.wf-step-head span { white-space: nowrap; }
/* Layout slot for the composer's attach/file/mic buttons or ☰ menu:
 * its children sit in the prompt row as if they were direct items. */
.kd-tools { display: contents; }
/* The desktop app enforces a minimum window size; a browser tab or the
 * home-page embed can be narrower, so the preview lane gives way first. */
#kd-browser { flex-shrink: 1; min-width: 280px; }
#kd-sidebar { flex-shrink: 1; min-width: 200px; }

/* ---- Flowery: the page the agents build (browser preview) ---- */
.fl { height: 100%; overflow-y: auto; background: #fffaf3; color: #2c2620; font-family: Georgia, "Times New Roman", serif; font-size: 13px; }
.fl * { box-sizing: border-box; }
.fl-nav { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid #f0e2d2; font-family: system-ui, sans-serif; font-size: 11px; }
.fl-logo { font-family: Georgia, serif; font-size: 17px; font-weight: 700; color: #1d4038; margin-right: auto; letter-spacing: -0.01em; }
.fl-logo span { color: #d6648f; }
.fl-nav a { color: #6b6257; text-decoration: none; }
.fl-hero { text-align: center; padding: 26px 18px 22px; background: radial-gradient(circle at 15% 20%, #fde3ec 0, transparent 40%), radial-gradient(circle at 85% 70%, #e6f0e4 0, transparent 45%), #fdf3e7; }
.fl-kick { font-family: system-ui, sans-serif; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; color: #b3547c; }
.fl-hero h1 { font-size: 25px; line-height: 1.15; margin: 8px 0 6px; color: #2c2620; font-weight: 700; }
.fl-hero p { margin: 0 0 14px; color: #6b6257; font-size: 12px; }
.fl-btn { display: inline-block; background: #1d4038; color: #fff; font-family: system-ui, sans-serif; font-weight: 700; font-size: 11px; padding: 8px 18px; border-radius: 999px; border: 0; }
.fl-sec { padding: 16px; }
.fl-sec h2 { font-size: 16px; margin: 0 0 10px; color: #1d4038; }
.fl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fl-card { position: relative; border: 1px solid #f0e2d2; border-radius: 10px; padding: 8px; background: #fff; font-family: system-ui, sans-serif; font-size: 11px; }
.fl-card b { display: block; font-family: Georgia, serif; font-size: 12.5px; margin-top: 6px; }
.fl-card .price { color: #6b6257; }
.fl-art { height: 66px; border-radius: 7px; position: relative; overflow: hidden; }
.fl-art::before, .fl-art::after { content: ''; position: absolute; border-radius: 50%; }
.fl-art.peony { background: #fbe4ec; }
.fl-art.peony::before { width: 38px; height: 38px; left: 30%; top: 16%; background: radial-gradient(circle, #f6b6cb 30%, #e98aab 70%); box-shadow: 18px 10px 0 -6px #f2a7c3, -14px 14px 0 -8px #f7c6d6; }
.fl-art.rose { background: #fbf1e4; }
.fl-art.rose::before { width: 34px; height: 34px; left: 36%; top: 18%; background: radial-gradient(circle, #fff6ec 25%, #f3dcc4 75%); box-shadow: -16px 12px 0 -6px #f5e3cf, 16px 14px 0 -8px #efd2b6; }
.fl-art.mix { background: #e8f1e6; }
.fl-art.mix::before { width: 22px; height: 22px; left: 22%; top: 22%; background: #f2c979; box-shadow: 22px 6px 0 0 #ed8aa9, 44px -2px 0 -2px #b9a3e3, 12px 22px 0 -4px #f6b6cb; }
.fl-art::after { width: 60%; height: 8px; left: 20%; bottom: 8px; border-radius: 4px; background: #9dc3a5; opacity: 0.7; }
.fl-v2 .fl-card { border-color: #e7d3bf; box-shadow: 0 6px 16px rgba(29, 64, 56, 0.12); padding: 9px 9px 10px; }
.fl-v2 .fl-art { height: 74px; }
.fl-badge { position: absolute; top: 12px; left: 12px; z-index: 1; background: #1d4038; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; border-radius: 999px; padding: 2px 7px; }
.fl-badge.new { background: #d6648f; }
.fl-badge.ltd { background: #b98a2f; }
.fl-add { display: block; text-align: center; width: 100%; margin-top: 7px; border: 1px solid #1d4038; background: transparent; color: #1d4038; border-radius: 999px; font-size: 10px; font-weight: 700; padding: 4px 0; }
.fl-order { margin: 0 16px 16px; border: 1px solid #f0e2d2; border-radius: 12px; background: #fff; padding: 14px; font-family: system-ui, sans-serif; }
.fl-order h2 { font-family: Georgia, serif; font-size: 16px; margin: 0 0 8px; color: #1d4038; }
.fl-order .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.fl-order label { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: #6b6257; font-weight: 600; }
.fl-order .fake { border: 1px solid #e7d3bf; border-radius: 7px; padding: 6px 8px; font-size: 11px; color: #2c2620; background: #fffaf3; }
.fl-api { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 10px; color: #1d7a3d; }
.fl-api::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22a355; }
.fl-foot { padding: 12px 16px 16px; font-family: system-ui, sans-serif; font-size: 10px; color: #8a8478; border-top: 1px solid #f0e2d2; }
.kd-skel { padding: 18px; display: grid; gap: 12px; }
.kd-skel i { display: block; border-radius: 8px; background: var(--panel-soft); animation: kd-pulse 1.4s ease-in-out infinite; }
@keyframes kd-pulse { 50% { opacity: 0.5; } }
.kd-flash { animation: kd-flash 0.9s ease-out; }
@keyframes kd-flash { from { box-shadow: inset 0 0 0 3px var(--accent); } to { box-shadow: inset 0 0 0 0 transparent; } }

@media (prefers-reduced-motion: reduce) {
  .kd-caret, .kd-skel i, .tour-wait::before { animation: none; }
  .tour-highlight, .tour-tip { transition: none; }
  .kd-flash { animation: none; }
}
