@font-face { font-family: 'Mansalva'; font-weight: 400; font-display: swap; src: url(/fonts/mansalva-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Mansalva'; font-weight: 400; font-display: swap; src: url(/fonts/mansalva-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #1a1a1a; --bg2: #1d1d1d; --card: #1c1c1c; --card2: #222; --line: #343434; --line2: #4a4a4a;
  --red: #c81e1e; --red2: #8c1414; --ember: #e23a3a; --gold: #f2f2f2; --bone: #ececec; --muted: #9c9c9c;
  --ok: #4f9a5a; --no: #c23b3b;
  --goth: 'Mansalva', 'Caveat Brush', 'Segoe Print', cursive;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --chain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='10'%3E%3Cg fill='none' stroke='%23777' stroke-width='1.6'%3E%3Crect x='1.5' y='2' width='14' height='6' rx='3'/%3E%3Cpath d='M13 5h5'/%3E%3Crect x='17' y='3.2' width='10' height='3.6' rx='1.8' stroke='%23555'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--bone); font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
body { background: var(--noise), radial-gradient(120% 80% at 50% 0%, #1f1f1f 0%, #1d1d1d 40%, var(--bg) 85%) fixed; overscroll-behavior-y: none; }
#embers { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#embers i { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px 2px #ff5a00; opacity: 0; animation: rise linear infinite; }
@keyframes rise { 0% { transform: translateY(0) translateX(0); opacity: 0 } 10% { opacity: .9 } 100% { transform: translateY(-105vh) translateX(30px); opacity: 0 } }
@media (prefers-reduced-motion: reduce) { #embers { display: none } }
#app { position: relative; z-index: 1; min-height: 100%; }
h1, h2, h3, .goth { font-family: var(--goth); font-weight: 700; letter-spacing: .5px; }
a { color: var(--gold); }
button, input, textarea, select { font: inherit; color: inherit; }
.splash { display: grid; place-items: center; height: 100vh; text-align: center; }
.splash img { width: 120px; border-radius: 28px; box-shadow: 0 0 40px #ff3a0066; }
.splash h1 { font-size: 40px; color: var(--ember); margin: 12px 0 0; text-shadow: 0 0 18px #ff3a0088; }

/* top bar */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 14px 10px;
  background: linear-gradient(#0b0303f2, #0b0303d9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 12px #ff3a0055; }
.top .t { flex: 1; min-width: 0; }
.top .t b { display: block; font-family: var(--goth); font-size: 25px; line-height: 1; color: var(--ember); text-shadow: 0 0 10px #ff3a0066; }
.top .t small { color: var(--muted); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.iconbtn { background: none; border: 1px solid var(--line); border-radius: 12px; width: 42px; height: 42px; font-size: 20px; display: grid; place-items: center; cursor: pointer; }

main { padding: 14px 14px calc(96px + var(--safe-b)); max-width: 720px; margin: 0 auto; }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.section-h h2 { margin: 0; font-size: 30px; color: var(--bone); }
.section-h h2::before { content: '⸸ '; color: var(--red); }

/* bottom nav */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(var(--safe-b) + 6px); background: linear-gradient(#160606ee, #0b0303); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
nav.tabs button { background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; position: relative; cursor: pointer; }
nav.tabs button .ic { font-size: 22px; filter: grayscale(.6); }
nav.tabs button.on { color: var(--ember); }
nav.tabs button.on .ic { filter: none; text-shadow: 0 0 12px #ff5a00; }
nav.tabs .badge { position: absolute; top: 2px; right: calc(50% - 22px); background: var(--red); color: #fff; font-size: 10px; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; box-shadow: 0 0 8px var(--red); }

/* cards */
.card { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 14px; box-shadow: 0 6px 20px #0008, inset 0 1px 0 #ffffff08; position: relative; }
.card.past { opacity: .75; }
.ev-date { display: flex; gap: 12px; align-items: flex-start; }
.cal { flex: none; width: 58px; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--red2); background: #0d0303; }
.cal .m { background: var(--red); color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 2px 0; }
.cal .d { font-family: var(--goth); font-size: 30px; line-height: 1.1; color: var(--bone); }
.cal .w { font-size: 11px; color: var(--muted); padding-bottom: 3px; }
.ev-title { font-family: var(--goth); font-size: 24px; line-height: 1.1; margin: 0 0 4px; color: var(--gold); word-break: break-word; }
.meta { color: var(--muted); font-size: 14px; }
.meta span { display: inline-block; margin-right: 10px; }
.note { white-space: pre-wrap; margin: 10px 0 0; font-size: 15px; color: #e8d7c0; background: #0006; padding: 8px 10px; border-radius: 10px; border-left: 3px solid var(--red); }
.vote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.vote button { border-radius: 14px; padding: 12px 6px; font-weight: 700; font-size: 17px; border: 2px solid var(--line); background: #0f0404; cursor: pointer; letter-spacing: .5px; }
.vote .y.on { background: linear-gradient(#2f8a38, #1d5a24); border-color: #5fd36a; box-shadow: 0 0 14px #3fae4a66; }
.vote .n.on { background: linear-gradient(#b3261e, #6e110c); border-color: #ff6a5a; box-shadow: 0 0 14px #d6332b66; }
.counts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: #0007; border: 1px solid var(--line); cursor: pointer; }
.pill.y { border-color: #3fae4a88; color: #9be4a1; } .pill.n { border-color: #d6332b88; color: #ff9a92; } .pill.q { color: var(--muted); }
.names { margin-top: 8px; font-size: 14px; color: #e3cfb7; display: none; }
.names.open { display: block; }
.names b { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; display: block; margin-top: 6px; }
.adminrow { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.adminrow button { background: #0008; border: 1px solid var(--line); border-radius: 10px; width: 34px; height: 34px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #ff6a1a88; background: linear-gradient(#c3300f, #7a0f08); color: #fff; padding: 11px 16px; border-radius: 14px; font-weight: 700; cursor: pointer; text-decoration: none; box-shadow: 0 0 16px #ff3a0033; }
.btn.ghost { background: #0007; border-color: var(--line); box-shadow: none; color: var(--bone); }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty .big { font-size: 46px; display: block; margin-bottom: 8px; }
.seg { display: inline-flex; background: #0008; border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { background: none; border: 0; padding: 6px 12px; border-radius: 9px; color: var(--muted); cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--red2); color: #fff; }

/* forms */
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; letter-spacing: .5px; }
input, textarea, select { width: 100%; background: #0c0303; border: 1px solid var(--line); border-radius: 12px; padding: 12px; outline: none; font-size: 16px; }
input:focus, textarea:focus, select:focus { border-color: var(--ember); box-shadow: 0 0 0 3px #ff6a1a22; }
textarea { min-height: 80px; resize: vertical; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; color: var(--bone); font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--ember); }

/* auth */
.auth { max-width: 420px; margin: 0 auto; padding: calc(var(--safe-t) + 30px) 18px 40px; }
.auth .logo { text-align: center; }
.auth .logo img { width: 128px; border-radius: 30px; box-shadow: 0 0 50px #ff3a0066; }
.auth h1 { text-align: center; font-size: 44px; margin: 10px 0 0; color: var(--ember); text-shadow: 0 0 20px #ff3a0088; }
.auth .sub { text-align: center; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; font-size: 12px; margin-bottom: 18px; }
.err { color: #ff8a7a; font-size: 14px; margin-top: 10px; min-height: 1em; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 6px; padding-bottom: 70px; }
.msg { max-width: 82%; align-self: flex-start; background: var(--card2); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px; word-wrap: break-word; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: linear-gradient(#8c1a0c, #5c0d07); border-color: #ff6a1a55; border-radius: 16px 16px 4px 16px; }
.msg .who { font-size: 12px; color: var(--gold); font-weight: 700; display: block; }
.msg .tm { font-size: 11px; color: #ffffff77; display: block; text-align: right; margin-top: 2px; }
.daysep { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(64px + var(--safe-b)); z-index: 5; display: flex; gap: 8px; padding: 8px 12px; background: #0b0303ee; border-top: 1px solid var(--line); max-width: 720px; margin: 0 auto; }
.composer textarea { min-height: 44px; max-height: 120px; padding: 10px 12px; border-radius: 22px; }
.composer button { flex: none; width: 48px; height: 44px; border-radius: 22px; padding: 0; font-size: 20px; }

/* gallery */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #1a0605; cursor: pointer; display: block; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: #000e; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 75vh; border-radius: 8px; }
.lightbox .cap { margin-top: 10px; text-align: center; color: var(--bone); }
.lightbox .x { position: absolute; top: calc(var(--safe-t) + 10px); right: 12px; }

/* polls */
.opt { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; overflow: hidden; cursor: pointer; background: #0c0303; }
.opt .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #7a0f08, #b3200e88); z-index: 0; transition: width .3s; }
.opt .txt { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; }
.opt.mine { border-color: var(--ember); box-shadow: 0 0 10px #ff6a1a44; }
.opt .nm { position: relative; z-index: 1; font-size: 12px; color: #f0d9c0bb; margin-top: 2px; }

/* members */
.mem { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--goth); font-size: 22px; color: #fff; flex: none; box-shadow: 0 0 0 2px #0008, 0 0 10px #0008; }
.mem .info { flex: 1; min-width: 0; }
.mem .info b { display: block; }
.tag { font-size: 11px; background: var(--red); color: #fff; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.on-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fae4a; box-shadow: 0 0 6px #3fae4a; margin-right: 4px; }

/* sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: #000a; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; background: linear-gradient(#200807, #110404); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 18px 16px calc(var(--safe-b) + 20px); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } }
.sheet h3 { margin: 0 0 6px; font-size: 28px; color: var(--ember); }
.steps { counter-reset: s; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: 8px 0 8px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-weight: 700; }
.hr { height: 1px; background: var(--line); margin: 16px 0; }
#toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 60; background: #2a0b08; border: 1px solid var(--ember); padding: 10px 16px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; }
.banner { background: linear-gradient(90deg, #4a0b05, #2a0705); border: 1px solid #ff6a1a55; border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.banner span { flex: 1; }
[hidden] { display: none !important; }
.composer textarea { resize: none; }

/* ===== v3: styl podle loga (monochrom + krvavě rudá) ===== */
#embers i { background: #bdbdbd; box-shadow: 0 0 4px 1px #ffffff33; width: 3px; height: 3px; }
@keyframes rise { 0% { transform: translateY(0) translateX(0); opacity: 0 } 15% { opacity: .35 } 100% { transform: translateY(-105vh) translateX(-40px); opacity: 0 } }
h1, h2, h3, .goth { font-family: var(--goth); font-weight: 400; letter-spacing: 1px; }
.splash img { border-radius: 0; box-shadow: none; width: 220px; }
.splash h1 { color: #fff; text-shadow: none; }
.top { background: linear-gradient(#141414f5, #141414e6); border-bottom: 0; }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 10px; background: var(--chain) repeat-x center / 28px 10px; opacity: .55; pointer-events: none; }
.top img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1px #3a3a3a, 0 0 14px #c81e1e33; object-fit: cover; }
.top .t b { font-family: var(--goth); font-size: 26px; color: #fff; text-shadow: none; text-transform: uppercase; letter-spacing: 1.5px; }
.top .t small { color: var(--muted); }
.iconbtn { border-color: var(--line); background: #1a1a1a; }
.section-h h2 { font-size: 32px; color: #fff; text-transform: uppercase; letter-spacing: 1.5px; }
.section-h h2::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--red); border-radius: 50%; margin: 0 10px 6px 0; box-shadow: 0 0 10px var(--red); }
.section-h { padding-bottom: 10px; background: var(--chain) repeat-x bottom / 28px 10px; background-size: 28px 10px; }
nav.tabs { background: linear-gradient(#1a1a1aee, #121212); border-top: 1px solid var(--line); }
nav.tabs button .ic { filter: grayscale(1) brightness(.85); }
nav.tabs button.on { color: #fff; }
nav.tabs button.on .ic { filter: grayscale(.2); text-shadow: 0 0 12px #c81e1e; }
nav.tabs button.on::after { content: ''; position: absolute; top: -6px; left: 30%; right: 30%; height: 2px; background: var(--red); box-shadow: 0 0 8px var(--red); border-radius: 2px; }
nav.tabs .badge { background: var(--red); box-shadow: 0 0 8px #c81e1e88; }
.card { background: var(--noise), linear-gradient(180deg, #232323, #1b1b1b); border-color: var(--line); box-shadow: 0 6px 18px #000a, inset 0 1px 0 #ffffff0a; }
.cal { border-color: #3d3d3d; background: #111; }
.cal .m { background: var(--red); }
.cal .d { font-family: var(--goth); color: #fff; }
.ev-title { font-family: var(--goth); color: #fff; font-size: 25px; letter-spacing: .5px; }
.note { color: #ddd; background: #0000004d; border-left-color: var(--red); }
.vote button { background: #151515; border-color: #3a3a3a; color: #e6e6e6; }
.vote .y.on { background: linear-gradient(#2e5e35, #1f4126); border-color: #5aa565; box-shadow: 0 0 12px #4f9a5a44; }
.vote .n.on { background: linear-gradient(#7a1a1a, #4f1010); border-color: #d04545; box-shadow: 0 0 12px #c81e1e44; }
.pill { background: #0006; border-color: #3a3a3a; }
.pill.y { border-color: #4f9a5a88; color: #9fd3a6; } .pill.n { border-color: #c23b3b88; color: #f0a0a0; }
.names { color: #d8d8d8; }
.adminrow button { background: #111a; border-color: #3a3a3a; }
.btn { border: 1px solid #e04a4a66; background: linear-gradient(#c81e1e, #8c1414); box-shadow: 0 2px 10px #c81e1e33; letter-spacing: .3px; }
.btn.ghost { background: #181818; border-color: #3d3d3d; color: #ececec; box-shadow: none; }
.seg { background: #111; border-color: var(--line); } .seg button.on { background: #2c2c2c; color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
input, textarea, select { background: #111; border-color: #383838; }
input:focus, textarea:focus, select:focus { border-color: #8a8a8a; box-shadow: 0 0 0 3px #c81e1e22; }
.check input { accent-color: var(--red); }
.auth .logo img { width: min(78vw, 330px); height: auto; border-radius: 0; box-shadow: none; filter: drop-shadow(0 8px 30px #000); }
.auth h1 { display: none; }
.auth .sub { margin-top: 2px; }
.err { color: #ff7b7b; }
.msg { background: #232323; border-color: #333; }
.msg.me { background: linear-gradient(#5a1616, #3e0f0f); border-color: #c81e1e55; }
.msg .who { color: #e8e8e8; }
.daysep { color: #8a8a8a; }
.composer { background: #141414f0; }
.grid img { background: #1f1f1f; }
.opt { background: #121212; border-color: #353535; }
.opt .bar { background: linear-gradient(90deg, #5a1414, #8c141466); }
.opt.mine { border-color: #d04545; box-shadow: 0 0 10px #c81e1e33; }
.av { font-family: var(--goth); font-size: 20px; box-shadow: 0 0 0 1px #4a4a4a; }
.tag { background: var(--red); }
.sheet { background: var(--noise), linear-gradient(#202020, #161616); border-color: #3a3a3a; }
.sheet h3 { color: #fff; font-size: 30px; }
.steps li::before { background: var(--red); }
.hr { height: 10px; background: var(--chain) repeat-x center / 28px 10px; opacity: .6; }
#toast { background: #1e1e1e; border-color: #c81e1e; }
.banner { background: linear-gradient(90deg, #2a1515, #1d1d1d); border-color: #c81e1e44; }
a { color: #ff8a8a; }
.about { text-align: center; margin-top: 14px; }
.about img { width: 150px; height: auto; opacity: .95; }
.install-logo { display: block; width: 140px; margin: 0 auto 6px; }

.auth .logo img { -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent); mask-composite: intersect; filter: none; }
.about img, .install-logo, .splash img { -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent); mask-image: radial-gradient(closest-side, #000 82%, transparent); }
