:root {
  --bg: #f5f4fa;
  --bg-soft: #eceaf5;
  --surface: #ffffff;
  --surface-2: #f8f7fc;
  --line: #e6e3f0;
  --text: #1d1a2e;
  --muted: #6e6a85;
  --primary: #ff4d5a;
  --primary-ink: #ffffff;
  --primary-soft: #ffe8ea;
  --violet: #7c5cff;
  --mint: #18b89a;
  --sun: #ffc93c;
  --sky: #3aa0ff;
  --shadow: 0 1px 2px rgba(29,26,46,.05), 0 6px 24px -8px rgba(29,26,46,.12);
  --shadow-lg: 0 30px 80px -20px rgba(29,26,46,.35);
  --r: 18px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #13111c;
  --bg-soft: #1c1a28;
  --surface: #1b1926;
  --surface-2: #221f30;
  --line: #2e2a40;
  --text: #f1effa;
  --muted: #a39fbb;
  --primary-soft: #3a1d26;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 30px -10px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  background-image: radial-gradient(1200px 500px at 10% -10%, rgba(255,77,90,.08), transparent 60%),
                    radial-gradient(900px 500px at 100% 0%, rgba(124,92,255,.08), transparent 60%);
  background-attachment: fixed; line-height: 1.5; font-size: 15px;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.15)); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }
.brand-text { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.brand-text small { display: block; font-family: var(--font); font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: 3px; text-transform: uppercase; }
.search { flex: 1; max-width: 520px; position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; fill: var(--muted); }
.search input { width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 16px 0 42px; outline: none; transition: .2s; }
.search input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent); background: var(--surface); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: .15s; font-weight: 700; }
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn svg { width: 18px; fill: currentColor; }
#avatarMini { font-size: 14px; }
.btn { height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; transform: none; cursor: progress; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #ff7a59); border-color: transparent; color: var(--primary-ink); box-shadow: 0 8px 20px -8px rgba(255,77,90,.7); }
.btn-primary span { font-size: 20px; line-height: 0; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--violet); font-weight: 600; }

.chips { max-width: 1240px; margin: 0 auto; padding: 0 20px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 781px) { .chips .chip { padding: 0 11px; font-size: 12.5px; } }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); transition: .15s; white-space: nowrap; }
.chip:hover { color: var(--text); }
.chips-arrow { display: none; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- layout ---------- */
.layout { max-width: 1240px; margin: 0 auto; padding: 22px 20px 100px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.side { position: sticky; top: calc(var(--head-h, 116px) + 16px); max-height: calc(100vh - var(--head-h, 116px) - 24px); overflow-y: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.side-group { margin-bottom: 22px; }
.side-group h4, .widget h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 12px; border: 0; background: none; font-weight: 600; text-align: left; transition: .15s; color: var(--text); }
.nav-item i { font-style: normal; width: 22px; text-align: center; }
.nav-item:hover { background: var(--bg-soft); }
.nav-item.active { background: var(--surface); box-shadow: var(--shadow); color: var(--primary); }

.feed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.feed-head h1 { font-family: var(--display); font-size: 28px; margin: 0; letter-spacing: -.02em; }
.feed { display: flex; flex-direction: column; gap: 18px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

.composer-teaser { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0; font-size: 14px; background: var(--violet); }
.teaser-input { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.teaser-types { display: flex; gap: 4px; }
.teaser-types button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: none; font-size: 18px; transition: .15s; }
.teaser-types button:hover { background: var(--bg-soft); transform: scale(1.1); }

/* ---------- post ---------- */
.post { overflow: hidden; animation: pop .35s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.post-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; font-size: 13px; }
.post-head .avatar { width: 30px; height: 30px; font-size: 12px; }
.post-meta { min-width: 0; flex: 1; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.post-meta b { color: var(--text); }
.cat-pill { margin-left: auto; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; border: 0; white-space: nowrap; }
.post-title { font-family: var(--display); font-size: 21px; line-height: 1.2; letter-spacing: -.015em; margin: 8px 16px 12px; cursor: pointer; }
.post-title:hover { color: var(--primary); }
.post-body { padding: 0 16px 12px; }
.post-text { margin: 0; white-space: pre-wrap; }
.post-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.media { background: var(--bg-soft); position: relative; cursor: pointer; }
.media img { width: 100%; max-height: 640px; object-fit: contain; margin: 0 auto; }
.nsfw .media img, .nsfw .meme-css { filter: blur(26px); }
.nsfw-cover { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; }
.nsfw-cover button { background: rgba(0,0,0,.65); color: #fff; border: 0; padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.satira { background: var(--sun); color: #2a2100; font-weight: 800; font-size: 9.5px; letter-spacing: .1em; padding: 2px 6px; border-radius: 5px; transform: rotate(-3deg); display: inline-block; }

.meme-css { aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 22px; text-align: center; color: #fff; font-family: "Anton", Impact, sans-serif; font-size: clamp(26px, 6vw, 44px); line-height: 1.05; text-transform: uppercase; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 0 3px 0 #000; background-size: cover; background-position: center; }

.news-card { margin: 0 16px 12px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); }
.news-card .news-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.news-card .news-bar .live { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.news-card .news-content { padding: 12px 14px; }
.news-card .news-content p { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.news-card img { width: 100%; max-height: 420px; object-fit: cover; }

.quote-card { margin: 0 16px 12px; border-radius: 16px; padding: 30px 26px 22px; background: linear-gradient(135deg, #7c5cff, #3aa0ff); color: #fff; position: relative; overflow: hidden; }
.quote-card::before { content: "“"; position: absolute; top: -40px; left: 10px; font-family: Georgia, serif; font-size: 180px; opacity: .2; line-height: 1; }
.quote-card blockquote { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.3; position: relative; }
.quote-card cite { display: block; margin-top: 12px; opacity: .85; font-style: normal; font-weight: 600; }

.poll { margin: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.poll-opt { position: relative; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 11px 14px; font-weight: 600; overflow: hidden; display: flex; justify-content: space-between; gap: 10px; transition: border-color .15s; }
.poll-opt:hover { border-color: var(--violet); }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--violet) 16%, transparent); transition: width .6s cubic-bezier(.2,.8,.2,1); width: 0; }
.poll-opt.mine { border-color: var(--violet); }
.poll-opt.mine .bar { background: color-mix(in srgb, var(--violet) 28%, transparent); }
.poll-opt span { position: relative; }
.poll-total { font-size: 12px; color: var(--muted); }

.video { aspect-ratio: 16/9; background: #000; }
.video iframe, .video .yt-thumb { width: 100%; height: 100%; border: 0; display: block; }
.yt-thumb { position: relative; object-fit: cover; }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt-play span { width: 70px; height: 48px; background: var(--primary); border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.tag { font-size: 12px; font-weight: 600; color: var(--violet); background: color-mix(in srgb, var(--violet) 10%, transparent); padding: 3px 9px; border-radius: 999px; border: 0; }

.post-actions { display: flex; align-items: center; gap: 6px; padding: 8px 12px 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.vote { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.vote button { border: 0; background: none; height: 38px; width: 40px; display: grid; place-items: center; transition: .15s; }
.vote button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.vote .up:hover, .vote .up.on { color: var(--mint); }
.vote .down:hover, .vote .down.on { color: var(--primary); }
.vote .on svg { fill: currentColor; }
.vote .score { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.act { height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid transparent; background: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); transition: .15s; }
.act:hover { background: var(--bg-soft); color: var(--text); }
.act svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.act.right { margin-left: auto; }
.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- widgets ---------- */
.widget { padding: 16px; margin-bottom: 16px; }
.welcome { text-align: center; background: linear-gradient(160deg, var(--primary-soft), var(--surface) 60%); }
.welcome-logo { width: 110px; margin: -4px auto 4px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.18)); }
.welcome h3 { font-family: var(--display); margin: 6px 0 4px; font-size: 19px; }
.welcome p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud .tag { cursor: pointer; }
.tag-cloud .tag em { font-style: normal; opacity: .6; margin-left: 3px; }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.rules li { margin-bottom: 6px; }
.foot { font-size: 12px; color: var(--muted); text-align: center; }

.loader { display: flex; justify-content: center; gap: 6px; padding: 26px; }
.loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); animation: dot 1s infinite; }
.loader span:nth-child(2) { animation-delay: .15s; background: var(--violet); }
.loader span:nth-child(3) { animation-delay: .3s; background: var(--sun); }
@keyframes dot { 50% { transform: translateY(-8px); opacity: .5; } }
.feed-end, .empty { text-align: center; color: var(--muted); padding: 20px; }
.empty .big { font-size: 46px; }

/* ---------- modals ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(720px, calc(100vw - 24px)); width: 100%; color: var(--text); }
.modal.small { max-width: 420px; }
.modal::backdrop { background: rgba(19,17,28,.55); backdrop-filter: blur(4px); }
.modal[open] .modal-box { animation: rise .3s cubic-bezier(.2,1,.3,1); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.modal-box { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: var(--display); font-size: 21px; }
.modal-body { flex: 1 1 auto; min-height: 0; padding: 18px 20px; overflow-y: auto; }
.modal-foot { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.as-who { font-size: 13px; color: var(--muted); }

.type-tabs { flex-shrink: 0; display: flex; gap: 8px; padding: 14px 20px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background: var(--surface); }
.type-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 781px) { .type-tabs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); } .type-tab { min-width: 0; padding: 10px 2px; font-size: 11.5px; } }
.type-tab { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 82px; min-height: 68px; padding: 10px 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; color: var(--text); transition: .15s; }
.type-tab:hover { border-color: var(--violet); transform: translateY(-1px); }
.type-tab i { font-style: normal; font-size: 22px; line-height: 1; }
.type-tab.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 6px 16px -8px rgba(255,77,90,.6); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 700; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 11px 13px; outline: none; transition: .15s; width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 15%, transparent); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.form-error { color: var(--primary); font-weight: 600; font-size: 13px; min-height: 1em; margin: 10px 0 0; }

.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 20px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; position: relative; margin-bottom: 14px; }
.drop:hover, .drop.over { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 6%, transparent); color: var(--text); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { max-height: 220px; margin: 0 auto 8px; border-radius: 10px; }
.drop b { color: var(--violet); }

.meme-studio { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meme-preview canvas { width: 100%; border-radius: 14px; box-shadow: var(--shadow); background: #222; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.swatch { width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; }
.swatch.active { border-color: var(--text); transform: scale(1.08); }
.swatch.upload { display: grid; place-items: center; background: var(--surface-2); border: 1px dashed var(--muted); font-size: 16px; position: relative; overflow: hidden; }
.swatch.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mini-row { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; font-size: 13px; font-weight: 600; }
.mini-row input[type=range] { flex: 1; accent-color: var(--primary); }
.mini-row input[type=color] { width: 40px; height: 30px; border: 0; background: none; padding: 0; }

.poll-builder .opt-row { display: flex; gap: 8px; margin-bottom: 8px; }
.poll-builder .opt-row input { flex: 1; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; outline: none; }
.poll-builder .opt-row button { width: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }

.nick-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.nick-ideas button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 5px 11px; font-size: 13px; }

/* detail */
.detail-box { max-height: calc(100dvh - 30px); }
.detail-box .post { border: 0; box-shadow: none; animation: none; }
.detail-box .modal-body { padding: 0; }
.comments { padding: 4px 16px 18px; }
.comments h3 { font-family: var(--display); font-size: 17px; margin: 14px 0 10px; }
.comment-form { display: flex; gap: 8px; margin-bottom: 14px; }
.comment-form textarea { flex: 1; min-height: 44px; height: 44px; resize: vertical; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; outline: none; }
.comment-form textarea:focus { border-color: var(--violet); }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.comment .avatar { width: 30px; height: 30px; font-size: 12px; }
.comment p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.comment small { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 90px; translate: -50% 20px; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- račun ---------- */
.btn-ghost { background: transparent; border-color: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.account-area { display: flex; align-items: center; gap: 6px; }
img.avatar { object-fit: cover; background: var(--bg-soft); }
.avatar.tiny { width: 24px; height: 24px; font-size: 10px; }
.avatar.big { width: 96px; height: 96px; font-size: 32px; }
.avatar.huge { width: 112px; height: 112px; font-size: 38px; border: 5px solid var(--surface); box-shadow: var(--shadow); }
.acct { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; max-width: 220px; }
.acct-btn:hover { background: var(--surface-2); }
.acct-btn .avatar { width: 34px; height: 34px; font-size: 13px; }
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: var(--muted); font-size: 12px; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 50; animation: rise .2s ease; }
.acct-menu > a, .acct-menu > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none; text-decoration: none; color: var(--text); font-weight: 600; text-align: left; }
.acct-menu > a:hover, .acct-menu > button:hover { background: var(--bg-soft); }
.acct-menu .logout { color: var(--primary); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.acct-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-head small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.author-link { display: contents; }
.author-name { font-weight: 700; color: var(--text); text-decoration: none; }
.author-name:hover { color: var(--primary); text-decoration: underline; }
.danger-act:hover { color: var(--primary); background: var(--primary-soft); }
.comment-form { align-items: flex-start; }
.comment-form .avatar { width: 36px; height: 36px; font-size: 13px; margin-top: 4px; }
.comment-login { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px; border: 1px dashed var(--line); border-radius: 14px; margin-bottom: 14px; }
.comment-login span { flex: 1; color: var(--muted); font-weight: 600; min-width: 140px; }

/* prozor za prijavu */
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand img { width: 40px; height: 40px; object-fit: contain; }
.auth-note { background: color-mix(in srgb, var(--violet) 10%, transparent); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.auth-note.warn { background: color-mix(in srgb, var(--sun) 25%, transparent); }
.auth-row { display: flex; justify-content: flex-end; margin: -6px 0 6px; font-size: 13px; }
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.auth-done { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.auth-done .big { font-size: 52px; line-height: 1; }
.auth-done p { margin: 0; }
.small { font-size: 13px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; translate: 0 -50%; border: 0; background: none; width: 34px; height: 34px; border-radius: 8px; }
.pw-toggle:hover { background: var(--bg-soft); }
#authBody .check { margin: 4px 0 6px; }
#authBody .btn.block { margin-top: 6px; }

/* postavke */
.settings-sec { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.settings-sec h3 { font-family: var(--display); font-size: 16px; margin: 0 0 12px; }
.settings-sec p { margin: 0 0 12px; }
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar-edit > div:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.small-btn { height: 36px; padding: 0 14px; font-size: 14px; border: 1px solid var(--line); cursor: pointer; }

/* profil */
.profile-card { overflow: hidden; margin-bottom: 18px; }
.profile-cover { height: 110px; background: linear-gradient(120deg, #ff4d5a, #ff7a59 40%, #ffc93c 70%, #7c5cff); }
.profile-main { display: flex; align-items: flex-end; gap: 16px; padding: 0 20px; margin-top: -48px; flex-wrap: wrap; }
.profile-info { flex: 1; min-width: 180px; padding-top: 52px; }
.profile-info h1 { font-family: var(--display); font-size: 26px; margin: 0; letter-spacing: -.02em; word-break: break-word; }
.profile-bio { margin: 4px 0; white-space: pre-wrap; word-break: break-word; }
.profile-info .small { margin: 0; }
.profile-main > .btn { margin-bottom: 4px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 20px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.profile-stats > div { text-align: center; padding: 12px 6px; background: var(--surface-2); }
.profile-stats > div + div { border-left: 1px solid var(--line); }
.profile-stats b { display: block; font-family: var(--display); font-size: 22px; }
.profile-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.profile-tabs { display: flex; gap: 8px; padding: 14px 20px 18px; }

/* ---------- administracija ---------- */
.admin-view { display: none; }
body.admin-mode .layout { display: none; }
body.admin-mode .chips { display: none; }
body.admin-mode .admin-view { display: block; }
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 110px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-head h1 { font-family: var(--display); font-size: 28px; margin: 0; letter-spacing: -.02em; }
.admin-head p { margin: 2px 0 0; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { flex: 1; min-width: max-content; display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: none; font-weight: 700; color: var(--muted); }
.admin-tab:hover { color: var(--text); background: var(--bg-soft); }
.admin-tab.active { background: var(--text); color: var(--bg); }
.admin-tab em { font-style: normal; font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--violet); color: #fff; }
.admin-tab em:empty { display: none; }
.admin-tab em.warn { background: var(--primary); }
.admin-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.admin-tools p { margin: 0; }
.admin-tools input { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; outline: none; max-width: 420px; }
.admin-tools input:focus { border-color: var(--violet); }
.admin-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-count { font-size: 13px; margin: 4px 2px 8px; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-more { text-align: center; padding: 16px; }
.arow { display: flex; gap: 14px; padding: 12px; align-items: flex-start; }
.athumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: var(--bg-soft); display: grid; place-items: center; font-size: 26px; }
.athumb img { width: 100%; height: 100%; object-fit: cover; }
.athumb.round { width: 44px; height: 44px; border-radius: 50%; background: none; }
.athumb.round .avatar { width: 44px; height: 44px; }
.ainfo { flex: 1; min-width: 0; }
.atitle { font-weight: 700; color: var(--text); text-decoration: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; word-break: break-word; }
a.atitle:hover, .atitle a:hover, .ameta a:hover { color: var(--primary); }
.atitle a, .ameta a { color: inherit; text-decoration: none; }
.ameta { font-size: 12.5px; color: var(--muted); margin-top: 3px; word-break: break-word; }
.ameta a { color: var(--text); font-weight: 600; }
.atext { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; }
.areports { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--primary-soft); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.areports small { color: var(--muted); }
.aacts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 330px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 10px; }
.btn.danger { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.btn.danger:hover { background: var(--primary); color: #fff; }
.pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill.admin { background: color-mix(in srgb, var(--violet) 15%, transparent); color: var(--violet); }
.pill.pending { background: color-mix(in srgb, var(--sun) 30%, transparent); color: #7a5a00; }
.pill.banned { background: var(--primary-soft); color: var(--primary); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.stat-card b { display: block; font-family: var(--display); font-size: 32px; line-height: 1.1; }
.stat-card span { font-weight: 700; }
.stat-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.stat-card.warn { border-color: var(--primary); background: linear-gradient(160deg, var(--primary-soft), var(--surface)); }
.stat-card.ok b { color: var(--mint); }
.admin-chart, .admin-sys { padding: 16px 18px; margin-bottom: 14px; }
.admin-chart h3, .admin-sys h3 { font-family: var(--display); margin: 0; font-size: 17px; }
.admin-sys h3 { margin-bottom: 8px; }
.admin-sys p { margin: 6px 0; }
.ok-t { color: var(--mint); } .warn-t { color: var(--primary); }
.chart-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.legend { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.lg.posts, .b.posts { background: var(--primary); }
.lg.users, .b.users { background: var(--violet); }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 160px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.b { width: 40%; max-width: 14px; min-height: 2px; border-radius: 4px 4px 0 0; }
.bar-col span { font-size: 10px; color: var(--muted); }
.pin-badge { font-size: 11px; font-weight: 700; color: var(--violet); }
.admin-link { color: var(--violet) !important; }
.cmt-del { border: 0; background: none; color: var(--muted); font-size: 12px; margin-left: 6px; padding: 2px 6px; border-radius: 6px; }
.cmt-del:hover { background: var(--primary-soft); color: var(--primary); }
@media (max-width: 780px) {
  .admin-wrap { padding: 16px 12px 110px; }
  .admin-head h1 { font-size: 23px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .arow { flex-wrap: wrap; }
  .aacts { max-width: none; width: 100%; justify-content: flex-start; }
  .bar-col span { font-size: 0; }
}

/* ---------- komentari u nitima ---------- */
.cmt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.cmt-head h3 { margin: 0; }
.cmt-sort { display: flex; gap: 6px; }
.cmt-sort .chip { height: 28px; font-size: 12px; padding: 0 10px; }
.thread { border-top: 1px solid var(--line); }
.thread > .comment { border-top: 0; }
.replies { margin-left: 40px; border-left: 2px solid var(--line); padding-left: 12px; margin-bottom: 8px; }
.replies .comment { border-top: 0; padding: 6px 0; }
.replies .comment .avatar { width: 26px; height: 26px; font-size: 10px; }
.cbody { flex: 1; min-width: 0; }
.chead small { color: var(--muted); }
.mention { color: var(--violet); font-weight: 700; text-decoration: none; }
.cacts { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.cacts button { border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 700; padding: 4px 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; }
.cacts button:hover { background: var(--bg-soft); color: var(--text); }
.clike svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.clike.on { color: var(--primary); }
.clike.on svg { fill: currentColor; }
.cmt-del { margin-left: auto; }
.reply-form { margin: 8px 0 4px; }
.reply-form .avatar { width: 28px; height: 28px; font-size: 11px; }
.reply-form textarea { min-height: 38px; height: 38px; }
.comment.flash { animation: flash 2s ease; border-radius: 10px; }
@keyframes flash { 0%, 40% { background: color-mix(in srgb, var(--sun) 35%, transparent); } }

/* ---------- obavijesti ---------- */
.bell-wrap { position: relative; }
.bell { position: relative; font-size: 17px; }
.bell em { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.bell em:empty { display: none; }
.bell.has { animation: ring 1.2s ease 1; }
@keyframes ring { 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: none; } }
.notif-panel { position: absolute; right: -60px; top: calc(100% + 8px); width: 370px; max-width: calc(100vw - 20px); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 60; animation: rise .2s ease; }
.np-head { position: sticky; top: 0; background: var(--surface); display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.np-head .link-btn { font-size: 12.5px; }
.np-item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border: 0; background: none; border-bottom: 1px solid var(--line); align-items: flex-start; }
.np-item:hover { background: var(--surface-2); }
.np-item.unread { background: color-mix(in srgb, var(--violet) 8%, transparent); }
.np-item.unread::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }
.np-item .avatar { width: 34px; height: 34px; font-size: 12px; }
.nicon { background: var(--bg-soft) !important; font-size: 17px !important; }
.np-text { flex: 1; font-size: 13.5px; line-height: 1.4; word-break: break-word; }
.np-text i { font-style: normal; font-weight: 600; }
.np-text small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.np-empty, .np { text-align: center; padding: 26px 14px; color: var(--muted); }
.np-empty .big { font-size: 38px; }

/* ---------- stranice ---------- */
.page-view { display: none; }
body.page-mode .page-view { display: block; }
body.page-mode .feed-head, body.page-mode #teaser, body.page-mode #feed, body.page-mode #loader, body.page-mode #feedEnd, body.page-mode #profileView { display: none !important; }
.chip-lb { text-decoration: none; display: inline-flex; align-items: center; background: linear-gradient(135deg, #fff4cc, #ffe2b8); color: #6b4a00; border-color: #f5d27a; }
:root[data-theme="dark"] .chip-lb { background: #3a2f12; color: #ffd76a; border-color: #5a4a1a; }
a.nav-item { text-decoration: none; }

/* rang lista */
.lb { overflow: hidden; margin-bottom: 18px; }
.lb-hero { display: flex; gap: 16px; align-items: center; padding: 22px 22px 8px; background: linear-gradient(160deg, #fff4cc, var(--surface) 70%); }
:root[data-theme="dark"] .lb-hero { background: linear-gradient(160deg, #3a2f12, var(--surface) 70%); }
.lb-trophy { font-size: 52px; filter: drop-shadow(0 6px 10px rgba(232,164,0,.4)); }
.lb-hero h1 { font-family: var(--display); margin: 0; font-size: 26px; letter-spacing: -.02em; }
.lb-hero p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.lb-tabs { display: flex; gap: 6px; padding: 12px 22px; flex-wrap: wrap; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; padding: 10px 22px 6px; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; text-decoration: none; color: var(--text); min-width: 0; }
.pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pod .avatar.big { width: 64px; height: 64px; font-size: 22px; border: 3px solid var(--surface); box-shadow: var(--shadow); }
.pod-1 .avatar.big { width: 80px; height: 80px; border-color: #ffc93c; }
.pod-step { width: 100%; border-radius: 12px 12px 0 0; display: grid; place-items: center; font-size: 26px; margin-top: 6px; background: var(--bg-soft); }
.pod-1 .pod-step { height: 90px; background: linear-gradient(180deg, #ffe58a, #ffc93c); }
.pod-2 .pod-step { height: 66px; background: linear-gradient(180deg, #eef0f5, #cfd4df); }
.pod-3 .pod-step { height: 50px; background: linear-gradient(180deg, #ffd9b8, #e8a57a); }
.lb-list { border-top: 1px solid var(--line); }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 22px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.lb-row:hover { background: var(--surface-2); }
.lb-row.mine { background: color-mix(in srgb, var(--violet) 9%, transparent); }
.lb-rank { width: 30px; text-align: center; font-size: 20px; }
.lb-num { font-size: 14px; font-weight: 800; color: var(--muted); }
.lb-name { flex: 1; min-width: 0; }
.lb-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small { color: var(--muted); font-size: 12px; }
.lb-badge-icons { display: flex; gap: 2px; font-size: 16px; }
.lb-pts { font-family: var(--display); font-weight: 800; font-size: 20px; min-width: 48px; text-align: right; }
.lb-note { text-align: center; padding: 14px; margin: 0; }
.lb-badges { padding: 18px 22px; margin-bottom: 18px; }
.lb-badges h3 { font-family: var(--display); margin: 0 0 12px; font-size: 17px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.badge-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.badge-card > span { font-size: 26px; }
.badge-card small { display: block; color: var(--muted); font-size: 12px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 20px 0; }
.badge-chip { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: linear-gradient(135deg, #fff4cc, #ffe7c2); color: #6b4a00; border: 1px solid #f5d27a; }
:root[data-theme="dark"] .badge-chip { background: #3a2f12; color: #ffd76a; border-color: #5a4a1a; }
.top-widget { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.tw-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 10px; text-decoration: none; color: var(--text); }
.tw-row:hover { background: var(--bg-soft); }
.tw-row .avatar { width: 28px; height: 28px; font-size: 11px; }
.tw-row b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.tw-rank { width: 22px; text-align: center; font-weight: 800; color: var(--muted); }
.tw-pts { font-weight: 800; color: var(--primary); font-size: 14px; }
.widget-link { font-size: 13px; text-decoration: none; }
.top-widget .loader { padding: 10px; }

/* naslovnica */
#composer { max-width: min(800px, calc(100vw - 24px)); }
.label-pill { border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 5px 9px; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; }
.label-pill.active { background: #c8102e; color: #fff; border-color: #c8102e; }
.cover-photo { margin-bottom: 14px; display: inline-flex; }
.cover-photo em { font-style: normal; color: var(--muted); font-weight: 500; }
.cover-photo.done { border-color: var(--mint); color: var(--mint); }
.cover-studio .meme-preview canvas { background: #f7f2e7; }
.media img.cover-img { max-height: 760px; }

/* statične stranice */
.static-page { padding: 26px 30px 30px; margin-bottom: 18px; }
.static-page h1 { font-family: var(--display); font-size: 30px; margin: 0 0 14px; letter-spacing: -.02em; }
.prose { line-height: 1.7; }
.prose h2 { font-family: var(--display); font-size: 19px; margin: 24px 0 6px; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose a { color: var(--violet); font-weight: 600; }
mark.ph { background: color-mix(in srgb, var(--sun) 40%, transparent); color: inherit; padding: 0 3px; border-radius: 4px; }
.page-upd { margin: 18px 0 0; }
.contact-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-done { padding: 24px 0 6px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 12.5px; margin: 6px 0 8px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--primary); text-decoration: underline; }
.mobile-foot { display: none; }
.ssr-list { padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.ssr-list h2 { font-family: var(--display); font-size: 18px; margin: 0 0 8px; }
.ssr-list a { color: var(--text); }
.post.ssr .post-title a { color: inherit; text-decoration: none; }
.admin-intro { margin: 0 0 12px; }
.page-editor { padding: 16px 18px; }
.pe-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.pe-head a.btn { text-decoration: none; color: var(--text); }
.pe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pe-grid textarea { min-height: 460px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.pe-preview { border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; max-height: 470px; overflow: auto; background: var(--surface-2); font-size: 14px; }
.pe-foot { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-top: 4px; }
.msg.unread { border-left: 4px solid var(--primary); }
.aacts a.btn { text-decoration: none; color: var(--text); }

/* ---------- dijeljenje ---------- */
.share-dlg { max-width: min(500px, calc(100vw - 24px)); }
.sp-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.sp-tabs .chip { height: 30px; font-size: 12.5px; }
.sp-preview { margin-bottom: 12px; }
.fb-card { border: 1px solid #dadde1; border-radius: 10px; overflow: hidden; background: #f0f2f5; color: #050505; font-family: Helvetica, Arial, sans-serif; }
.fb-img { aspect-ratio: 1.91 / 1; background: #ddd center / cover no-repeat; }
.fb-meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.fb-meta small { color: #65676b; font-size: 12px; letter-spacing: .02em; }
.fb-meta b { font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fb-meta span { color: #65676b; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.wa-chat { background: #e5ddd5 linear-gradient(0deg, rgba(229,221,213,.9), rgba(229,221,213,.9)); border-radius: 12px; padding: 14px; display: flex; justify-content: flex-end; }
.wa-bubble { background: #d9fdd3; color: #111b21; border-radius: 10px 0 10px 10px; padding: 4px; max-width: 330px; width: 100%; box-shadow: 0 1px .5px rgba(0,0,0,.13); font-family: Helvetica, Arial, sans-serif; }
.wa-link { background: #cff0c8; border-radius: 7px; overflow: hidden; }
.wa-img { aspect-ratio: 1.91 / 1; background: #ccc center / cover no-repeat; }
.wa-meta { padding: 7px 9px; display: flex; flex-direction: column; gap: 2px; }
.wa-meta b { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-meta span { font-size: 12.5px; color: #54656f; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-meta small { font-size: 11.5px; color: #8696a0; }
.wa-text { font-size: 14px; padding: 6px 6px 0; word-break: break-all; }
.wa-text a { color: #027eb5; }
.wa-time { text-align: right; font-size: 11px; color: #667781; padding: 0 6px 2px; }
.sp-note { font-size: 12.5px; color: var(--muted); margin: -4px 0 12px; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.sh-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 12px; font-weight: 700; text-align: center; transition: .15s; }
.sh-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sh-btn svg { width: 38px; height: 38px; padding: 8px; border-radius: 50%; color: #fff; background: var(--muted); }
.sh-btn.fb svg { background: #1877f2; }
.sh-btn.wa svg { background: #25d366; }
.sh-btn.vb svg { background: #7360f2; }
.sh-btn.tg svg { background: #27a7e7; }
.sh-btn.xx svg { background: #000; }
.sh-btn.rd svg { background: #ff4500; }
.sh-btn.ml svg { background: var(--violet); }
.sh-btn.dl svg { background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); }
.sh-btn.more svg { background: var(--text); color: var(--bg); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 0 12px; height: 42px; color: var(--muted); }
.copy-row .btn svg { width: 18px; height: 18px; }

/* način prikaza pri dijeljenju */
.sp-mode { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.seg { display: inline-flex; background: var(--bg-soft); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg label span { border: 0; background: none; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; display: inline-block; }
.seg button.on, .seg label input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.share-mode-field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 700; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.mode-card { text-align: left; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.mode-card span { font-size: 13px; color: var(--muted); }
.mode-card.on { border-color: var(--primary); background: var(--primary-soft); }
@media (max-width: 780px) { .mode-cards { grid-template-columns: 1fr; } }

/* uređivanje */
.edited { color: var(--muted); font-style: italic; }
.edit-note { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.edit-note.admin { background: color-mix(in srgb, var(--violet) 10%, transparent); border-style: solid; color: var(--text); }
.edit-img { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.edit-img img { max-height: 140px; max-width: 220px; border-radius: 10px; object-fit: contain; background: var(--bg-soft); }
.edit-img-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.poll-builder .opt-row small { align-self: center; min-width: 38px; text-align: center; }

/* bottom nav */
.bottom-nav { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 200px minmax(0, 1fr); }
  .side-right { display: none; }
}
@media (max-width: 780px) {
  body { font-size: 15px; }
  .topbar-inner { padding: 8px 14px; gap: 10px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand-text { font-size: 19px; }
  .brand-text small { display: none; }
  .search { display: none; }
  .search.open { display: block; position: absolute; left: 14px; right: 14px; top: 62px; max-width: none; z-index: 5; }
  #newPostBtn { display: none; }
  .chips { padding: 0 14px 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 14px; }
  .chips .chip { scroll-snap-align: start; }
  .chips.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .chips.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%); mask-image: linear-gradient(90deg, transparent, #000 15%); }
  .chips.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
  .chips-wrap { position: relative; }
  .chips-arrow { display: grid; position: absolute; top: 0; height: 32px; width: 32px; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: 15px; z-index: 2; color: var(--text); }
  .chips-arrow.l { left: 4px; } .chips-arrow.r { right: 4px; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 14px 0 110px; }
  .cat-pill .cat-lbl { display: none; }
  html, body { overflow-x: hidden; }
  .side-left { display: none; }
  .feed-head { padding: 0 14px; }
  .feed-head h1 { font-size: 23px; }
  .composer-teaser { margin: 0 10px 14px; }
  .teaser-types button { width: 34px; }
  .feed { gap: 12px; }
  .feed .card { border-radius: 0; border-left: 0; border-right: 0; }
  .meme-studio, .row-2 { grid-template-columns: 1fr; }
  .modal { max-width: 100vw; margin: auto 0 0; }
  .modal-box { border-radius: 22px 22px 0 0; max-height: 94dvh; }
  .act .lbl { display: none; }
  .account-area .btn-dark { display: none; }
  .acct-name, .caret { display: none; }
  .acct-btn { padding: 0 4px; }
  .account-area .btn-ghost { padding: 0 12px; background: var(--bg-soft); }
  .profile-card { border-radius: 0; border-left: 0; border-right: 0; }
  .profile-main { padding: 0 14px; }
  .profile-main > .btn { width: 100%; }
  .profile-stats { margin: 14px 14px 0; }
  .profile-tabs { padding: 12px 14px 14px; }
  .bottom-nav .avatar.tiny { width: 22px; height: 22px; }
  .replies { margin-left: 18px; padding-left: 10px; }
  .notif-panel { position: fixed; left: 10px; right: 10px; top: 64px; width: auto; }
  .lb-hero, .lb-tabs, .podium, .lb-row, .lb-badges { padding-left: 14px; padding-right: 14px; }
  .lb-trophy { font-size: 40px; }
  .lb-hero h1 { font-size: 22px; }
  .lb-badge-icons { display: none; }
  .lb { border-radius: 0; border-left: 0; border-right: 0; }
  .profile-badges { padding: 12px 14px 0; }
  .mobile-foot { display: flex; padding: 10px 14px 0; }
  body.page-mode .mobile-foot { display: none; }
  .static-page { padding: 20px 16px 24px; border-radius: 0; border-left: 0; border-right: 0; }
  .static-page h1 { font-size: 24px; }
  .pe-grid { grid-template-columns: 1fr; }
  .pe-grid textarea { min-height: 300px; }
  .share-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .sh-btn { font-size: 11px; padding: 8px 2px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .bottom-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; font-size: 18px; gap: 1px; color: var(--muted); padding: 4px; }
  .bottom-nav button span { font-size: 10.5px; font-weight: 700; }
  .bottom-nav button.active { color: var(--primary); }
  .bottom-nav .fab { width: 54px; height: 54px; margin: -26px auto 0; border-radius: 18px; background: linear-gradient(135deg, var(--primary), #ff7a59); color: #fff; font-size: 30px; justify-content: center; box-shadow: 0 10px 24px -6px rgba(255,77,90,.7); }
  .toast { bottom: 100px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
