/* ============ Kalendář akcí Březina ============ */
/* Fonty hostované na vlastním serveru (OFL licence) – žádné spojení na Google Fonts (GDPR) */
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage-500.woff') format('woff'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage-800.woff') format('woff'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans-var.woff') format('woff'); font-weight: 100 1000; font-display: swap; }
:root {
  --bg: #f5f4f0;
  --bg2: #ffffff;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #ffffff;
  --ink: #12131a;
  --ink2: #3b3f4e;
  --muted: #6b7083;
  --line: rgba(18, 19, 26, .09);
  --line2: rgba(18, 19, 26, .15);
  --accent: #4f46e5;
  --accent2: #ec4899;
  --ok: #10b981;
  --danger: #e11d48;
  --shadow: 0 1px 2px rgba(18,19,26,.05), 0 8px 30px -12px rgba(18,19,26,.18);
  --shadow-lg: 0 30px 80px -20px rgba(18,19,26,.35);
  --radius: 22px;
  --fh: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --fb: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
html.dark {
  --bg: #0b0c11;
  --bg2: #12141b;
  --card: rgba(22, 24, 33, .72);
  --card-solid: #161821;
  --ink: #f2f3f7;
  --ink2: #c9ccd8;
  --muted: #8d92a6;
  --line: rgba(255,255,255,.08);
  --line2: rgba(255,255,255,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 80px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}
html.big { font-size: 118%; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--fb);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }

/* ---------- aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: -14vw; background: #a5b4fc; }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; right: -8vw; top: -6vw; background: #f9a8d4; animation-delay: -7s; }
.aurora span:nth-child(3) { width: 34vw; height: 34vw; left: 30vw; top: 22vw; background: #fde68a; opacity: .35; animation-delay: -13s; }
html.dark .aurora span { opacity: .22; }
html.dark .aurora span:nth-child(3) { opacity: .12; }
@keyframes drift {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(4vw, 3vw) scale(1.08); }
  100% { transform: translate(-3vw, 5vw) scale(.95); }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(14px, 3vw, 36px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--fh); font-size: 1.2rem; letter-spacing: -.02em; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.tabs { position: relative; display: flex; padding: 4px; margin-left: auto; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.tab { position: relative; z-index: 1; border: 0; background: none; padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: .92rem; color: var(--muted); transition: color .25s; }
.tab.on { color: var(--ink); }
.tab-ink { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; background: var(--card-solid); box-shadow: var(--shadow); transition: transform .4s cubic-bezier(.2,.9,.2,1.1), width .4s cubic-bezier(.2,.9,.2,1.1); }

.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; line-height: 1;
  border: 1px solid var(--line); background: var(--card); color: var(--ink2); font-weight: 800; font-size: .95rem;
  transition: transform .15s, background .2s, border-color .2s;
}
.icon-btn:hover { border-color: var(--line2); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }
.icon-btn sup { font-size: .6em; margin-left: 1px; }
.icon-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
#btnTheme .i-sun { display: none; }
html.dark #btnTheme .i-sun { display: block; }
html.dark #btnTheme .i-moon { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: .93rem; white-space: nowrap; text-decoration: none;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent2))); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn.primary:hover { box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent) 90%, transparent); transform: translateY(-1px); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--ink2); }
.btn.ghost:hover { border-color: var(--line2); }
.btn.danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 20%, transparent); }
.btn.sm { height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.user-chip {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 5px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: .9rem;
}
.user-chip .av { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; background: color-mix(in srgb, var(--c, var(--accent)) 18%, transparent); }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: pop .18s ease-out; z-index: 40;
}
.menu .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .who b { display: block; }
.menu .who small { color: var(--muted); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px; text-align: left; font-weight: 600; }
.menu button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

main { width: min(1320px, 100%); margin: 0 auto; padding: 0 clamp(14px, 3vw, 36px); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; padding: clamp(28px, 6vw, 72px) 0 clamp(22px, 4vw, 40px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 6px 14px 6px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: .82rem; color: var(--ink2); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
h1 { font-family: var(--fh); font-weight: 800; font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .95; letter-spacing: -.045em; margin: 0 0 18px; }
.grad {
  background: linear-gradient(100deg, var(--accent) 0%, #a855f7 35%, var(--accent2) 65%, #f59e0b 100%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 8s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--ink2); max-width: 54ch; margin: 0 0 24px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { flex: 1 1 140px; max-width: 220px; padding: 12px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.stat b { font-family: var(--fh); font-size: 1.6rem; display: block; line-height: 1.1; letter-spacing: -.02em; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }

.next-card {
  --c: var(--accent);
  position: relative; overflow: hidden; border-radius: 28px; padding: 26px; min-height: 290px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform .4s cubic-bezier(.2,.9,.2,1);
  transform-style: preserve-3d;
}
.next-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--c) 32%, transparent), transparent 60%),
              radial-gradient(80% 60% at 0% 100%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%);
}
.next-card .tag { align-self: flex-start; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 99px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.next-card h3 { font-family: var(--fh); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.05; letter-spacing: -.03em; margin: 16px 0 6px; }
.next-card .when { color: var(--ink2); font-weight: 600; margin: 0 0 4px; }
.next-card .where { color: var(--muted); font-size: .92rem; margin: 0; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; padding-top: 22px; }
.countdown div { text-align: center; padding: 12px 4px; border-radius: 14px; background: color-mix(in srgb, var(--card-solid) 70%, transparent); border: 1px solid var(--line); }
.countdown b { display: block; font-family: var(--fh); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.countdown span { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.next-card .live { margin-top: auto; padding-top: 20px; font-family: var(--fh); font-size: 1.4rem; font-weight: 700; color: var(--c); display: flex; align-items: center; gap: 10px; }
.next-card .live i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); animation: pulse 1.6s infinite; box-shadow: 0 0 0 0 var(--c); }
.next-card.empty { align-items: flex-start; justify-content: center; cursor: default; }
.next-card .big-emoji { font-size: 3rem; position: absolute; right: 22px; top: 18px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.15)); transform: translateZ(30px); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; padding: 6px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 99px;
  border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: .88rem; color: var(--ink2);
  transition: all .2s;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.chip:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); transform: translateY(-1px); }
.chip.on { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 8px 20px -8px var(--c); }
.chip.on .dot { background: #fff; box-shadow: none; }
.chip.all.on { background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: none; }
.chip .n { font-size: .75rem; opacity: .7; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.search input { border: 0; outline: 0; background: none; width: 170px; color: var(--ink); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.select { height: 42px; padding: 0 34px 0 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 600; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7083' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }

/* ---------- board ---------- */
.board { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); padding: clamp(12px, 2vw, 22px); margin-bottom: 40px; }
.month-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 4px 4px 16px; }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav h2 { font-family: var(--fh); font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.03em; margin: 0; min-width: 9.5ch; text-align: center; }
.month-nav h2 .y { color: var(--muted); font-weight: 500; }
.month-actions { display: flex; gap: 8px; }
.view { animation: viewIn .45s cubic-bezier(.2,.9,.2,1); }
.view.slide-l { animation: slideL .4s cubic-bezier(.2,.9,.2,1); }
.view.slide-r { animation: slideR .4s cubic-bezier(.2,.9,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes slideL { from { opacity: 0; transform: translateX(30px); } }
@keyframes slideR { from { opacity: 0; transform: translateX(-30px); } }

/* calendar */
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head div { padding: 4px 10px 8px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cal-head .we { color: color-mix(in srgb, var(--accent2) 70%, var(--muted)); }
.day {
  position: relative; min-height: 128px; padding: 8px; border-radius: 16px;
  background: var(--card-solid); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  animation: cellIn .5s backwards cubic-bezier(.2,.9,.2,1); animation-delay: calc(var(--i) * 8ms);
}
@keyframes cellIn { from { opacity: 0; transform: scale(.96); } }
.day:hover { border-color: var(--line2); box-shadow: var(--shadow); }
.day.we { background: color-mix(in srgb, var(--card-solid) 96%, var(--accent2)); }
.day.out { opacity: .42; }
.day.past:not(.today) .pill { opacity: .6; }
.day-num { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: .92rem; padding: 2px 4px; }
.day-num span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; }
.day.today { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.day.today .day-num span { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 6px 14px -6px var(--accent); }
.day-add { width: 26px; height: 26px; border-radius: 8px; border: 0; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 800; font-size: 1rem; line-height: 1; opacity: 0; transition: opacity .2s, transform .2s; }
.day:hover .day-add { opacity: 1; }
.day-add:hover { transform: scale(1.12); }
.day-evs { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pill {
  --c: var(--accent);
  display: block; width: 100%; text-align: left; border: 0; padding: 5px 8px; border-radius: 8px;
  background: color-mix(in srgb, var(--c) 15%, transparent); color: color-mix(in srgb, var(--c) 62%, var(--ink));
  box-shadow: inset 3px 0 0 var(--c);
  font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: transform .15s, background .2s;
}
html.dark .pill { color: color-mix(in srgb, var(--c) 45%, #fff); }
.pill:hover { background: color-mix(in srgb, var(--c) 26%, transparent); transform: translateX(2px); }
.pill b { font-weight: 800; opacity: .75; margin-right: 3px; font-variant-numeric: tabular-nums; }
.pill.multi { background: var(--c); color: #fff; box-shadow: none; }
.more { border: 0; background: none; text-align: left; padding: 2px 8px; font-size: .78rem; font-weight: 800; color: var(--muted); }
.more:hover { color: var(--ink); }
.dots { display: none; gap: 3px; justify-content: center; flex-wrap: wrap; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* list */
.list { display: flex; flex-direction: column; gap: 10px; }
.lcard {
  --c: var(--accent);
  display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center;
  padding: 14px 18px 14px 14px; border-radius: 20px; text-align: left; width: 100%;
  background: var(--card-solid); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  animation: viewIn .5s backwards cubic-bezier(.2,.9,.2,1); animation-delay: calc(var(--i) * 35ms);
  position: relative; overflow: hidden;
}
.lcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.lcard.past { opacity: .55; }
.date-block { text-align: center; padding: 10px 6px; border-radius: 16px; background: color-mix(in srgb, var(--c) 12%, transparent); color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
html.dark .date-block { color: color-mix(in srgb, var(--c) 40%, #fff); }
.date-block .wd { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.date-block .d { font-family: var(--fh); font-size: 2.3rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.date-block .m { font-size: .78rem; font-weight: 700; }
.lcard h3 { font-family: var(--fh); font-size: 1.3rem; letter-spacing: -.02em; margin: 6px 0 4px; line-height: 1.15; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink2); font-size: .92rem; font-weight: 600; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { color: var(--muted); }
.lcard .desc { color: var(--muted); font-size: .9rem; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: .76rem; font-weight: 800; background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
html.dark .badge { color: color-mix(in srgb, var(--c) 45%, #fff); }
.lcard .go { color: var(--muted); }
.list-day-sep { margin: 14px 4px 2px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .e { font-size: 3rem; margin-bottom: 8px; }
.empty-state h3 { font-family: var(--fh); color: var(--ink); font-size: 1.4rem; margin: 0 0 6px; }

/* ---------- modal ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10, 11, 18, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease-out; }
.backdrop.closing { animation: fade .18s reverse forwards; }
.backdrop.closing .modal { animation: pop .18s reverse forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--card-solid); border-radius: 26px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  animation: pop .3s cubic-bezier(.2,.9,.2,1.1);
}
.modal.wide { width: min(860px, 100%); }
.modal-x { position: absolute; right: 14px; top: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.modal-x:hover { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.modal-body { padding: 28px; }
.modal h2 { font-family: var(--fh); font-size: 1.7rem; letter-spacing: -.03em; margin: 0 0 6px; line-height: 1.1; }
.modal .sub { color: var(--muted); margin: 0 0 20px; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 0 28px 24px; }
.modal-foot .left { margin-right: auto; }

.ev-hero { --c: var(--accent); position: relative; padding: 30px 28px 24px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #1e1b4b)); }
.ev-hero::after { content: ''; position: absolute; width: 260px; height: 260px; right: -60px; top: -90px; border-radius: 50%; background: rgba(255,255,255,.14); }
.ev-hero .emoji { position: absolute; right: 26px; bottom: 16px; font-size: 3.4rem; z-index: 1; filter: drop-shadow(0 8px 16px rgba(0,0,0,.25)); }
.ev-hero .badge { background: rgba(255,255,255,.22); color: #fff; }
.ev-hero h2 { color: #fff; font-size: 2rem; margin: 12px 0 0; max-width: 85%; position: relative; z-index: 1; }
.ev-hero + .modal-body { padding-top: 22px; }
.ev-hero ~ .modal-x { background: rgba(255,255,255,.22); color: #fff; }
.info-row { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.info-row:last-of-type { border-bottom: 0; }
.info-row .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink2); flex: none; }
.info-row b { display: block; }
.info-row small { color: var(--muted); }
.ev-desc { white-space: pre-wrap; margin: 14px 0 0; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); color: var(--ink2); }

/* forms */
.form { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .82rem; font-weight: 800; color: var(--ink2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line2); background: var(--bg2); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.field input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.subject-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.subject-pick label { cursor: pointer; }
.subject-pick input { position: absolute; opacity: 0; pointer-events: none; }
.subject-pick input:checked + .chip { background: var(--c); border-color: var(--c); color: #fff; }
.subject-pick input:checked + .chip .dot { background: #fff; box-shadow: none; }
.subject-pick input:focus-visible + .chip { outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent); }
.form-err { display: none; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-weight: 700; font-size: .9rem; }
.form-err.show { display: block; animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.hint { font-size: .82rem; color: var(--muted); }
.no-time .time-fields { display: none; }
.copy-box { display: flex; gap: 8px; }
.copy-box input { flex: 1; font-size: .85rem; }

/* admin */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.admin-tabs button { white-space: nowrap; flex: none; border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.admin-tabs button.on { background: var(--card-solid); color: var(--ink); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td.act { text-align: right; white-space: nowrap; }
.tbl input[type="text"] { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line2); background: var(--bg2); }
.tbl input.emoji { width: 56px; text-align: center; }
.tbl input[type="color"] { width: 48px; height: 36px; border: 0; padding: 0; background: none; cursor: pointer; }
.panel { padding: 18px; border-radius: 18px; border: 1px dashed var(--line2); margin-top: 18px; }
.panel h3 { font-family: var(--fh); margin: 0 0 12px; font-size: 1.15rem; }
.role { font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.role.admin { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }

/* day list in modal */
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-list .pill { white-space: normal; padding: 10px 12px; font-size: .92rem; border-radius: 12px; }

/* toasts */
#toasts { position: fixed; z-index: 60; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: var(--shadow-lg); animation: toastIn .35s cubic-bezier(.2,.9,.2,1.2); }
.toast.err { background: var(--danger); color: #fff; }
.toast.out { animation: toastIn .25s reverse forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }

/* confetti */
.confetti { position: fixed; z-index: 70; top: 0; left: 0; width: 10px; height: 14px; border-radius: 2px; pointer-events: none; }

.foot { text-align: center; padding: 10px 20px 40px; font-size: .88rem; }
.foot p { margin: 2px 0; }
.credit { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 7px 16px 7px 7px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink2); text-decoration: none; font-weight: 600; font-size: .86rem;
  transition: transform .2s, border-color .2s, box-shadow .2s; }
.credit:hover { transform: translateY(-2px); border-color: var(--line2); box-shadow: var(--shadow); }
.credit-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.credit-ic svg { width: 16px; height: 16px; }
.credit b { background: linear-gradient(100deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .next-card { min-height: 0; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .tab { flex: 1; }
  .top-actions { margin-left: auto; }
  .user-chip .nm, #btnNew span, .btn.ghost span { display: none; }
  .tools { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .cal-head, .cal-grid { gap: 3px; }
  .cal-head div { padding: 4px 0; text-align: center; font-size: .7rem; }
  .day { min-height: 62px; padding: 4px; border-radius: 10px; align-items: center; cursor: pointer; }
  .day-num { justify-content: center; padding: 0; }
  .day-num span { width: 26px; height: 26px; font-size: .85rem; }
  .day-add, .day-evs { display: none; }
  .dots { display: flex; }
  .lcard { grid-template-columns: 70px 1fr; gap: 12px; padding: 12px; }
  .lcard .go { display: none; }
  .date-block .d { font-size: 1.8rem; }
  .row { grid-template-columns: 1fr; }
  .modal-body { padding: 22px; }
  .modal-foot { padding: 0 22px 20px; }
  .tbl .hide-m { display: none; }
}

/* ---------- print (nástěnka) ---------- */
@media print {
  @page { margin: 14mm; }
  html, html.dark { --bg: #fff; --card: #fff; --card-solid: #fff; --ink: #000; --ink2: #222; --muted: #555; --line: #ccc; color-scheme: light; }
  body { background: #fff; font-size: 12pt; }
  .credit,
  .aurora, .topbar, .hero, .toolbar, .month-actions, .month-nav .icon-btn, .foot, #toasts, #modalRoot, .lcard .go { display: none !important; }
  .board { border: 0; box-shadow: none; padding: 0; backdrop-filter: none; }
  .month-nav h2::before { content: 'Březina u Křtin – akce: '; }
  .lcard { break-inside: avoid; border: 1px solid #bbb; animation: none; opacity: 1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .day { animation: none; min-height: 90px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- historie změn ---------- */
.role.moderator { background: color-mix(in srgb, #0ea5e9 16%, transparent); color: #0284c7; }
html.dark .role.moderator { color: #7dd3fc; }
.ad-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ad-stat { text-align: left; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg2); transition: border-color .2s, transform .15s; }
.ad-stat:hover { border-color: var(--line2); transform: translateY(-1px); }
.ad-stat.on { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.ad-stat b { display: block; }
.ad-stat small { color: var(--muted); font-size: .76rem; }
.ad-nums { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ad-nums span { font-size: .8rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.ad-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ad-filter .select, .ad-filter .search { background: var(--bg2); }
.ad-filter .search input { width: 100%; }
.ad-list { display: flex; flex-direction: column; max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
.ad-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ad-item:last-child { border-bottom: 0; }
.ad-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.ad-line { font-size: .92rem; }
.ad-title { margin-top: 3px; font-weight: 700; }
.ad-item time { font-size: .8rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad-det { margin-top: 6px; font-size: .86rem; }
.ad-det summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.ad-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; padding: 4px 0; border-top: 1px dashed var(--line); }
.ad-row:first-of-type { margin-top: 6px; }
.ad-row > span { color: var(--muted); font-weight: 700; }
.ad-row s { color: var(--muted); }
.ad-row pre { margin: 0; white-space: pre-wrap; font: inherit; max-height: 160px; overflow: auto; }
@media (max-width: 760px) { .ad-item { grid-template-columns: 34px 1fr; } .ad-item time { grid-column: 2; } .ad-row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- přidat do kalendáře / upozornění ---------- */
.cal-add { position: relative; }
.cal-menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5; min-width: 270px; padding: 6px; border-radius: 16px;
  background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.cal-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.cal-menu a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.cal-menu a span { width: 24px; text-align: center; }
.done-box { text-align: center; }
.done-box .sub { max-width: 42ch; margin: 0 auto 18px; }
.done-ic { font-size: 3rem; line-height: 1; margin-bottom: 10px; animation: pop .5s cubic-bezier(.2,.9,.2,1.4); }
.watch-row { --c: var(--accent); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--c) 10%, transparent); box-shadow: inset 3px 0 0 var(--c); }
.watch-row b { display: block; }
.watch-row small { color: var(--muted); }
.watch-row .check { font-size: .85rem; white-space: nowrap; }
@media (max-width: 760px) { .cal-menu { position: fixed; left: 12px; right: 12px; bottom: 12px; min-width: 0; } #btnNotify span { display: none; } }

.linkish { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--accent); }
.privacy h3 { font-family: var(--fh); font-size: 1.05rem; margin: 18px 0 6px; }
.privacy p, .privacy li { color: var(--ink2); font-size: .94rem; }
.privacy ul { padding-left: 20px; margin: 6px 0; }
.privacy .ctrl { white-space: pre-wrap; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.warn-box { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, #f59e0b 16%, transparent); color: color-mix(in srgb, #b45309 85%, var(--ink)); font-weight: 600; font-size: .9rem; }

/* atribut hidden má přednost před display u komponent */
[hidden] { display: none !important; }
