:root {
  --bg: #070707;
  --surface: #111111;
  --surface-2: #171717;
  --line: #262626;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --red: #e50914;
  --red-2: #ff2a36;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(229, 9, 20, .28), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(229, 9, 20, .14), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.wrap { position: relative; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--red); display: grid; place-items: center; font-weight: 900; font-size: .9rem; color: #fff; box-shadow: 0 6px 20px rgba(229, 9, 20, .5); }
.logo-text span { color: var(--red); }
.hero { padding: 72px 0 48px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; background: rgba(255,255,255,.02); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
h1 { margin: 20px 0 12px; font-size: clamp(2.6rem, 8vw, 4.8rem); line-height: 1; font-weight: 900; letter-spacing: -.045em; }
h1 em { font-style: normal; color: var(--red); }
.lead { margin: 0; max-width: 520px; color: var(--muted); font-size: 1.1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding-bottom: 72px; }
a.site {
  position: relative; display: flex; flex-direction: column; gap: 18px; padding: 22px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 18px; color: inherit; text-decoration: none; overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
a.site::after { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--red), transparent); opacity: .7; }
a.site:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: 0 20px 50px rgba(229, 9, 20, .18); }
a.site:focus-visible { outline: 2px solid var(--red-2); outline-offset: 3px; }
.site-top { display: flex; align-items: center; justify-content: space-between; }
.mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: #fff; font-weight: 800; }
.arrow { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); transition: .2s; }
a.site:hover .arrow { background: var(--red); border-color: var(--red); color: #fff; transform: rotate(-45deg); }
.site strong { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
.site p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; }
.host { font-size: .8rem; font-weight: 600; color: var(--red-2); letter-spacing: .02em; }
footer { border-top: 1px solid var(--line); padding: 22px 0 32px; color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--red-2); }
.admin-link { display: inline-flex; align-items: center; gap: 6px; }
.admin-link::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

/* ===== administrace ===== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 1.1rem; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
input, textarea { font: inherit; font-size: .95rem; padding: 10px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; width: 100%; }
input:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(229, 9, 20, .2); }
input[type="color"] { padding: 3px; height: 44px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border: 1px solid var(--red); border-radius: 10px; background: var(--red); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--red-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--red); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-danger { background: transparent; border-color: transparent; color: var(--red-2); }
.btn-danger:hover { background: rgba(229, 9, 20, .12); }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.flash-ok { background: rgba(34, 176, 125, .14); color: #3ccf8e; }
.flash-error { background: rgba(229, 9, 20, .14); color: #ff6b72; }
.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.item.is-hidden { opacity: .5; }
.item strong { display: block; }
.item small { color: var(--muted); }
.item-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.item-actions form { display: inline; }
.item details { grid-column: 1 / -1; }
.item summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.item details .form { margin-top: 12px; }
.check { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; }
.check input { width: auto; }
.auth-box { max-width: 380px; margin: 40px auto; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.topline h1 { margin: 0; font-size: 2rem; }

/* logo v kartě */
.mark { overflow: hidden; }
.mark-logo { padding: 7px; }
.mark-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-field { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.logo-field > label:not(.check) { flex: 1; min-width: 220px; }
input[type="file"] { padding: 8px; cursor: pointer; }
.item .mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-weight: 800; }
