/* 1click showcase kit — shared styles for the standalone demo apps (390px mobile). */
:root {
  --brand: #7c3aed;
  --brand-2: #2563eb;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, white);
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f7fb;
  --card: #ffffff;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  max-width: 430px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

/* Status bar */
.status { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 0 26px; font-size: 14px; font-weight: 600; background: var(--bg); }
.status .icons { display: flex; gap: 6px; align-items: center; font-size: 11px; }
.battery { width: 24px; height: 11px; border: 1.5px solid currentColor; border-radius: 3px; padding: 1px; }
.battery i { display: block; height: 100%; width: 75%; background: currentColor; border-radius: 1px; }

/* Screens */
.screen { display: none; padding: 4px 18px 110px; animation: in .25s ease; }
.screen.active { display: block; }
@keyframes in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 14px; }
.topbar h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.eyebrow { font-size: 12px; color: var(--muted); }
.title { font-size: 17px; font-weight: 700; margin: 22px 0 12px; display: flex; justify-content: space-between; align-items: baseline; }
.title a, .link { font-size: 13px; color: var(--brand); font-weight: 600; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Controls */
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 14px; background: var(--card); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(15,23,42,.06); font-size: 18px; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.badge[data-count="0"] { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 16px; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; width: 100%; }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.sm { height: 36px; width: auto; padding: 0 14px; border-radius: 12px; font-size: 13px; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 16px; background: var(--card); box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.search input { border: 0; outline: 0; background: none; flex: 1; font-size: 15px; }
.input { width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); outline: 0; font-size: 15px; }
.input:focus { border-color: var(--brand); }
textarea.input { height: 96px; padding: 12px 14px; resize: none; }
label.field { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 12px; background: var(--card); font-size: 13px; font-weight: 600; border: 1px solid var(--line); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg { display: flex; background: #e9ecf3; border-radius: 14px; padding: 4px; }
.seg button { flex: 1; height: 36px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.1); }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 6px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex-shrink: 0; }
.tile { display: grid; place-items: center; border-radius: 14px; font-size: 34px; background: var(--brand-soft); }
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 10px; box-shadow: 0 1px 2px rgba(15,23,42,.05); width: 100%; text-align: left; }
.item .tile { width: 64px; height: 64px; flex-shrink: 0; font-size: 28px; }
.item h3 { font-size: 15px; font-weight: 700; }
.price { font-weight: 800; }
.stars { color: #f59e0b; font-size: 12px; font-weight: 700; }
.add { width: 34px; height: 34px; border-radius: 11px; background: var(--brand); color: #fff; font-size: 20px; font-weight: 600; flex-shrink: 0; }
.fav { font-size: 20px; filter: grayscale(1); opacity: .5; }
.fav.on { filter: none; opacity: 1; }
.banner { border-radius: 22px; padding: 20px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); position: relative; overflow: hidden; }
.banner h2 { font-size: 22px; line-height: 1.15; font-weight: 800; max-width: 70%; }
.banner p { font-size: 13px; opacity: .9; margin-top: 6px; max-width: 70%; }
.banner .art { position: absolute; right: 14px; bottom: 8px; font-size: 70px; }
.banner .btn { margin-top: 14px; width: auto; height: 38px; background: #fff; color: var(--ink); font-size: 13px; }
.pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick button { height: 42px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.pick button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pill { display: inline-block; padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }

/* Bottom tab bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; display: flex; justify-content: space-around; padding: 8px 8px 26px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 30; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: #94a3b8; min-width: 60px; position: relative; }
.tabbar button .ico { font-size: 21px; filter: grayscale(1); opacity: .6; }
.tabbar button.active { color: var(--brand); }
.tabbar button.active .ico { filter: none; opacity: 1; }
.tabbar .badge { top: -2px; right: 12px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; white-space: nowrap; max-width: 90%; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
