/* PSippr Store / PSippr Store theme.
   Brand colors come from /theme.css (config brandColor / brandColor2); everything else is derived.
   18 Oct 2026 (owner: "our colors there"): the PSippr palette of the other sites (sites/admin.psippr.cz/public/style.css,
   certd/coming-soon.html) - black, #141414 surfaces, green accent - in light and dark mode alike. Until then pink
   #FF3D7F / teal #00C2A8 on a light page with its own dark variant. */
:root {
  --brand: #00E676;
  --brand-2: #B388FF;
  --ink: #000000;
  --bg: #000000;
  --surface: #141414;
  --surface-2: #1C1C1C;
  --text: #FFFFFF;
  --muted: #8A8A8A;
  --line: #262626;
  --on-brand: #000000;
  --ok: #4CAF50;
  --warn: #F5C518;
  --danger: #E53935;
  --radius: 18px;
  --shadow: none;
  --brand-soft: color-mix(in srgb, var(--brand) 14%, var(--surface));
  --brand-ink: var(--brand);
  --brand2-soft: color-mix(in srgb, var(--brand-2) 16%, var(--surface));
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
code, pre { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.brand img { border-radius: 10px; }
.search {
  flex: 1; max-width: 620px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 999px; padding: 0 16px;
  transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--brand); background: var(--surface); }
.search svg { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: 11px 0; min-width: 0; }
.net { font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.net.on::before { background: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 25%, transparent); }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 2px; padding: 0 22px; overflow-x: auto;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.tabs a { padding: 13px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 12px; text-align: center; }

main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 26px 28px 48px; flex: 1; }
h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -.02em; }
h2 { font-size: 19px; margin: 34px 0 12px; display: flex; justify-content: space-between; align-items: baseline; letter-spacing: -.01em; }
h2 a { font-size: 14px; color: var(--brand-ink); font-weight: 600; }
.muted { color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 22px; border-top: 1px solid var(--line); }
.foot a { color: var(--brand-ink); }
code.inline { background: var(--surface-2); padding: 2px 7px; border-radius: 7px; word-break: break-all; }

/* ---------- hero ---------- */
.hero-banner {
  position: relative; overflow: hidden;
  border-radius: 26px; padding: 34px 36px; margin-bottom: 8px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 22%, transparent) 0%, transparent 55%),
    linear-gradient(120deg, var(--surface-2) 0%, var(--ink) 100%);
  border: 1px solid var(--line);
}
.hero-banner h1 { font-size: 32px; max-width: 640px; }
.hero-banner p { max-width: 620px; opacity: .92; margin: 6px 0 18px; }
.hero-banner .actions .btn.primary { background: #fff; color: var(--ink); }
.hero-banner .actions .btn.ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.hero-banner .stats { display: flex; gap: 26px; margin-top: 22px; flex-wrap: wrap; }
.hero-banner .stats b { font-size: 22px; display: block; }
.hero-banner .stats span { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- app grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.card .meta { min-width: 0; flex: 1; }
.card .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips-row { margin-top: 7px; display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
}
.chip svg { width: 12px; height: 12px; fill: currentColor; }
.chip.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.chip.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.chip.brand { background: var(--brand-soft); color: var(--brand-ink); }

.icon {
  width: 64px; height: 64px; border-radius: 18px; flex: none; object-fit: cover;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand2-soft));
  display: grid; place-items: center; font-weight: 800; font-size: 26px; color: var(--brand-ink);
  border: 1px solid var(--line);
}
.icon.lg { width: 120px; height: 120px; border-radius: 30px; font-size: 48px; }
.icon.sm { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-weight: 700; display: flex; justify-content: space-between; }
.cat:hover { border-color: var(--brand); color: var(--brand-ink); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 20px; }
.pills a, .pills button {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: inherit; font-size: 14px; color: inherit; cursor: pointer;
}
.pills .active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }

/* ---------- app detail ---------- */
.hero { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.hero .info { flex: 1; min-width: 260px; }
.hero .dev { color: var(--brand-ink); font-weight: 600; }
.facts { display: flex; gap: 30px; margin: 18px 0; flex-wrap: wrap; }
.facts div { display: flex; flex-direction: column; }
.facts b { font-size: 16px; }
.facts span { font-size: 12px; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shots img { height: 320px; border-radius: 14px; border: 1px solid var(--line); scroll-snap-align: start; background: var(--surface-2); }
.desc { white-space: pre-wrap; max-width: 820px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; }
.row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 200px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; padding: 14px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.dl-row .kind { display: flex; align-items: center; gap: 12px; }
.dl-row .plat { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.dl-row .plat svg { width: 20px; height: 20px; fill: currentColor; }
.dl-row .hash { font: 11px ui-monospace, monospace; color: var(--muted); word-break: break-all; }
.recommended { border: 1px solid var(--brand); background: var(--brand-soft); border-radius: 14px; padding: 12px 14px; margin: -4px -6px; }

/* ---------- setup / code ---------- */
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.setup-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.setup-card h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.setup-card h3 .plat { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
.setup-card h3 .plat svg { width: 18px; height: 18px; fill: currentColor; }
.code { position: relative; margin-top: 12px; }
.code pre { background: var(--ink); color: #E9E9F2; padding: 14px 16px; border-radius: 12px; overflow-x: auto; margin: 0; white-space: pre; }
.code button { position: absolute; top: 8px; right: 8px; }

/* ---------- upload ---------- */
.drop {
  border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 22px; padding: 38px 20px; text-align: center;
  background: var(--brand-soft); cursor: pointer; transition: background .15s;
}
.drop.over { background: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.drop b { color: var(--brand-ink); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }

/* ---------- buttons & inputs ---------- */
.btn {
  border: 1px solid transparent; border-radius: 999px; padding: 10px 22px;
  font: inherit; font-weight: 700; cursor: pointer; background: var(--surface-2); color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn.primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.alt { background: var(--brand-2); color: #04211c; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.sm { padding: 5px 13px; font-size: 13px; }
input.text, textarea.text, select.text {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
input.text:focus, textarea.text:focus, select.text:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
textarea.text { min-height: 90px; font-family: ui-monospace, monospace; font-size: 13px; }
label { display: block; font-weight: 600; margin: 10px 0 6px; font-size: 14px; }
pre.log { background: var(--surface-2); padding: 12px; border-radius: 12px; max-height: 260px; overflow: auto; font-size: 12px; white-space: pre-wrap; margin: 12px 0 0; }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- toast & dialog ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: min(560px, 92vw); z-index: 40;
}
.toast.err { background: var(--danger); }
dialog { border: 0; border-radius: 22px; padding: 0; width: min(580px, 94vw); background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(10, 10, 20, .5); }
.dialog-body { padding: 24px; }
.dialog-body h3 { margin: 0 0 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.skeleton { height: 96px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

@media (max-width: 680px) {
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand span, .net { display: none; }
  .tabs { padding: 0 8px; }
  main { padding: 16px 16px 40px; }
  .hero-banner { padding: 24px 20px; border-radius: 20px; }
  .hero-banner h1 { font-size: 25px; }
  .icon.lg { width: 88px; height: 88px; border-radius: 22px; }
  .shots img { height: 230px; }
  .setup-grid { grid-template-columns: 1fr; }
}
