/* TADIO — sdílený styl "Zlaté odpoledne". Vanilla CSS, žádný build krok. */
:root {
  --amber: #f7a862;
  --terracotta: #e8794a;
  --honey: #c97a45;
  --brown: #5c2f18;
  --brown-2: #7a3f21;
  --window-light: #ffe6a8;

  --bg-top: #ffc98a;
  --bg-bottom: #e8794a;
  --surface: #fff6e9;
  --surface-2: #fff0d9;
  --raise: #ffffff;
  --line: rgba(92, 47, 24, 0.16);
  --line-strong: rgba(92, 47, 24, 0.32);
  --ink: #4a2712;
  --muted: #93613c;
  --accent: #e8794a;
  --accent-ink: #fff6e9;
  --accent-soft: #ffe0c2;
  --gold: #d9962f;
  --danger: #b6462c;
  --danger-soft: #fbe3da;
  --ok: #4c7a3f;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 26px -12px rgba(92, 47, 24, 0.45);
  --shadow-sm: 0 4px 12px -6px rgba(92, 47, 24, 0.35);
  --body: "Nunito", system-ui, sans-serif;
  --head: "Fredoka", var(--body);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-top: #4a2712; --bg-bottom: #2c1509;
    --surface: #2f1a0f; --surface-2: #3a2213; --raise: #3a2213;
    --line: rgba(255, 230, 168, 0.14); --line-strong: rgba(255, 230, 168, 0.28);
    --ink: #ffe6c9; --muted: #d9a876;
    --accent: #f0935e; --accent-ink: #2c1509; --accent-soft: #5a331a;
    --gold: #e8b95a; --danger: #e88a6c; --danger-soft: #4a2416; --ok: #8fc47a;
  }
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 65%);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brown); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }

/* --- Hlavička --- */
.tadio-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 8px; max-width: 1080px; margin: 0 auto; }
.tadio-logo { font-family: var(--head); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; color: var(--brown); text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px; }
.tadio-logo .dot { color: var(--gold); }
.tadio-back { font-weight: 700; font-size: 14px; color: var(--brown); text-decoration: none; background: rgba(255,255,255,.55); border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; white-space: nowrap; }
.tadio-back:hover { background: rgba(255,255,255,.8); }

/* --- Karty budov na indexu --- */
.city-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 18px; }
.venue-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.venue-card:hover, .venue-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); }
.venue-card .art { aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 42%, var(--window-light) 0%, var(--amber) 45%, var(--terracotta) 100%); display: flex; align-items: center; justify-content: center; padding: 10px; }
.venue-card .art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(92,47,24,.35)); }
.venue-card .info { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.venue-card .name { font-family: var(--head); font-weight: 600; font-size: 18px; }
.venue-card .tag { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.venue-card .flag { position: absolute; margin: 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--gold); color: #3a2205; border-radius: 999px; padding: 3px 9px; }
.venue-card { position: relative; }

.hero { text-align: center; padding: 28px 16px 8px; }
.hero h1 { font-family: var(--head); font-size: clamp(28px, 6vw, 42px); margin: 0 0 6px; color: var(--brown); }
.hero p { margin: 0 auto; max-width: 60ch; color: var(--brown-2); font-size: 15.5px; }

.moment-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 18px 20px; margin: 28px 0 4px; }
.moment-cta h2 { font-family: var(--head); margin: 0 0 4px; font-size: 19px; }
.moment-cta p { margin: 0; color: var(--muted); font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 14.5px; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); white-space: nowrap; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: none; color: var(--brown); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.gold { background: var(--gold); color: #3a2205; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

footer.tadio-foot { text-align: center; color: var(--brown-2); opacity: .8; font-size: 12.5px; padding: 30px 16px 10px; }

/* --- Venue stránka (art + feed) --- */
.venue-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0 6px; text-align: center; }
.venue-hero .art-frame { width: min(420px, 86vw); aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; background: radial-gradient(circle at 50% 40%, var(--window-light), var(--amber) 55%, var(--terracotta) 100%); box-shadow: var(--shadow); padding: 8px; }
.venue-hero .art-frame img { width: 100%; height: 100%; object-fit: contain; }
.venue-hero h1 { font-family: var(--head); font-size: 26px; margin: 4px 0 0; color: var(--brown); }
.venue-hero p.sub { margin: 0; color: var(--brown-2); font-size: 14px; max-width: 50ch; }

.section-title { font-family: var(--head); font-size: 19px; margin: 26px 0 10px; color: var(--brown); display: flex; align-items: baseline; gap: 8px; }
.section-title .count { font-weight: 500; font-size: 13px; color: var(--muted); }

.feed { display: flex; flex-direction: column; gap: 12px; }
.event-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, border-color .15s ease; }
.event-card.boosted { border: 2px solid var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent), var(--shadow); }
.event-thumb { width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.event-body { min-width: 0; }
.event-title { font-weight: 800; font-size: 15px; line-height: 1.3; }
.event-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.event-source { font-size: 12px; margin-top: 4px; }
.event-source a { color: var(--brown); font-weight: 700; text-decoration: none; border-bottom: 1px dashed var(--line-strong); }
.event-source a:hover { border-bottom-style: solid; }
.event-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.boost-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); }
.btn.boost { padding: 9px 16px; font-size: 13px; }

@media (max-width: 560px) {
  .event-card { grid-template-columns: 48px 1fr; }
  .event-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .event-thumb { width: 48px; height: 48px; font-size: 20px; border-radius: 10px; }
}

/* --- Stadium / sedačky --- */
.stadium-arena { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.stand { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.stand.side { flex-direction: row; }
.arena-layout { display: grid; grid-template-areas: "north north north" "west pitch east" "south south south"; grid-template-columns: minmax(90px, 1fr) minmax(160px, 2.4fr) minmax(90px, 1fr); gap: 10px; align-items: center; }
.arena-layout .north { grid-area: north; }
.arena-layout .south { grid-area: south; }
.arena-layout .west { grid-area: west; flex-direction: column; }
.arena-layout .east { grid-area: east; flex-direction: column; }
.pitch { grid-area: pitch; align-self: stretch; border-radius: var(--radius-sm); background: repeating-linear-gradient(90deg, #4f8a3f 0 22px, #588f47 22px 44px); border: 3px solid #3c6b2f; position: relative; min-height: 140px; display: flex; align-items: center; justify-content: center; }
.pitch::before { content: ""; position: absolute; inset: 10px; border: 2px solid rgba(255,255,255,.55); border-radius: 6px; }
.pitch::after { content: ""; position: absolute; width: 44px; height: 44px; border: 2px solid rgba(255,255,255,.55); border-radius: 50%; }
@media (max-width: 720px) {
  .arena-layout { grid-template-areas: "north" "west" "pitch" "east" "south"; grid-template-columns: 1fr; }
  .arena-layout .west, .arena-layout .east { flex-direction: row; }
}

.sector { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.sector-label { text-align: center; font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.sector-price { text-align: center; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.seat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.seat { width: 13px; height: 13px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--raise); padding: 0; }
.seat:hover { transform: scale(1.25); }
.seat[data-taken="1"] { border-color: transparent; }
.seat:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; z-index: 1; position: relative; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 0; font-size: 12.5px; color: var(--muted); align-items: center; justify-content: center; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -1px; margin-right: 4px; border: 1px solid var(--line-strong); }

/* --- Modální panel sedačky --- */
.overlay { position: fixed; inset: 0; background: rgba(74, 39, 18, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 20; padding: 0; }
.overlay[hidden] { display: none; }
.seat-panel { background: var(--raise); width: 100%; max-width: 420px; border-radius: 22px 22px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0)); box-shadow: 0 -12px 40px rgba(0,0,0,.3); max-height: 88vh; overflow-y: auto; }
@media (min-width: 640px) {
  .overlay { align-items: center; }
  .seat-panel { border-radius: 22px; }
}
.seat-panel h2 { font-family: var(--head); margin: 0 0 4px; font-size: 19px; }
.seat-panel .seat-id { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.seat-panel .close { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 20px; color: var(--muted); }
.seat-panel-inner { position: relative; }
.field-row { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 14px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 130px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field input[type="text"] { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.field input[type="color"] { width: 56px; height: 40px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.char-count { font-size: 11.5px; color: var(--muted); text-align: right; }
.char-count.over { color: var(--danger); font-weight: 700; }
.warn-box { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.warn-box[hidden] { display: none; }
.price-row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 14px; }
.price-row .price { font-family: var(--head); font-size: 22px; color: var(--accent); }
.seat-preview { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 14px; }
.seat-preview .chip { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); flex: none; }
.seat-preview .txt { font-weight: 800; font-size: 13px; word-break: break-word; }
.taken-info { display: flex; align-items: center; gap: 12px; }
.taken-info .chip { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); flex: none; }
.taken-info .txt { font-weight: 800; font-size: 16px; }
.taken-info small { display: block; color: var(--muted); font-weight: 500; }

/* --- Moment --- */
.moment-form { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-top: 18px; }
.moment-form .field input, .moment-form .field select, .moment-form .field textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.moment-form .field textarea { resize: vertical; min-height: 60px; }
.moment-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .moment-form .grid2 { grid-template-columns: 1fr; } }

.billboard-preview { margin-top: 22px; }
.billboard-card { background: linear-gradient(160deg, var(--amber), var(--terracotta)); border-radius: var(--radius); padding: 34px 22px; text-align: center; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.billboard-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, var(--window-light) 0%, transparent 60%); opacity: .5; }
.billboard-card .kind { position: relative; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #fff8ea; opacity: .85; }
.billboard-card .msg { position: relative; font-family: var(--head); font-size: clamp(22px, 5vw, 32px); color: #fff8ea; margin: 8px 0; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.billboard-card .date { position: relative; color: #fff8ea; opacity: .85; font-size: 13px; font-weight: 700; }
.url-preview { margin-top: 14px; text-align: center; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px; font-family: monospace; font-size: 14px; color: var(--brown); }
.moment-note { color: var(--muted); font-size: 12.5px; margin-top: 10px; text-align: center; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
