:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --soft: #f1f0eb;
  --line: #e6e4dd;
  --text: #14131a;
  --muted: #6b6a72;
  --accent: #ff5a36;
  --warn: #c2321a;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f12;
    --surface: #18181d;
    --soft: #212127;
    --line: #2c2c34;
    --text: #f4f4f1;
    --muted: #9c9ba6;
    --warn: #ff8a70;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.center { text-align: center; }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 18px; height: 18px; }
.logo-text { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }

.pill {
  display: inline-block; align-self: flex-start;
  background: var(--soft); color: var(--muted);
  font-weight: 500; font-size: 13px; padding: 5px 11px; border-radius: 999px;
}
h1 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
h1.xl { font-size: clamp(34px, 10vw, 42px); }
h1.lg { font-size: 30px; }
h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; line-height: 1.15; }
.lead { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted); }
.note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.label { font-weight: 500; font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.error { min-height: 20px; font-size: 14px; font-weight: 500; color: var(--warn); }

.field {
  height: 54px; padding: 0 16px; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 17px;
}
.field:focus-within { border-color: var(--text); }
.field .prefix { color: var(--muted); white-space: nowrap; }
.field input {
  flex: 1; min-width: 0; padding: 0; border: 0; outline: none; background: transparent;
  color: var(--text); font: inherit; font-weight: 500;
}

.btn {
  min-height: 52px; padding: 0 20px; border: 1px solid transparent; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.86; }
.btn-primary, .btn-dark { background: var(--text); color: var(--bg); }
.btn-ghost, .btn-outline-ink { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-yellow { background: var(--soft); color: var(--text); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.soon {
  background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 500;
  padding: 2px 8px; border-radius: 999px;
}
.icon-btn {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--text); }
.link {
  background: none; border: 0; padding: 8px; color: var(--muted); font: inherit; font-size: 14px;
  font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: center;
}
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.linkbox {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 16px;
}
.linkbox .url { flex: 1; min-width: 0; font-weight: 500; font-size: 16px; overflow-wrap: anywhere; }

.msg {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.msg-meta strong { color: var(--text); font-weight: 500; }
.msg-body { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-actions { display: flex; align-items: center; gap: 8px; }
.msg-actions .grow { flex: 1; }
.msg-actions .btn-primary { background: var(--soft); color: var(--text); }
.badge-new { background: var(--accent); color: #fff; font-weight: 500; padding: 1px 8px; border-radius: 999px; font-size: 12px; }
.empty { border: 1px dashed var(--line); border-radius: 16px; padding: 20px; color: var(--muted); font-size: 15px; }

.code {
  background: var(--soft); border-radius: 12px; padding: 14px;
  font-family: ui-monospace, Menlo, monospace; font-size: 14px; overflow-wrap: anywhere; color: var(--text);
}
.section { display: flex; flex-direction: column; gap: 12px; }
.danger { color: var(--warn); }

.chip { display: inline-block; align-self: flex-start; background: var(--soft); color: var(--text); font-weight: 500; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.stat { background: var(--soft); border-radius: 12px; padding: 8px 12px; font-weight: 500; font-size: 14px; }
.stat strong { font-family: var(--display); font-weight: 700; font-size: 20px; margin-right: 6px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; font-size: 14px; }
.bar-row .pct { text-align: right; font-weight: 500; color: var(--muted); }
.bar { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--text); border-radius: 999px; }
.gamebox { background: var(--soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }
.gamebox strong { color: var(--text); font-weight: 500; }
.gamebox select {
  min-height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: 16px; padding: 0 10px;
}
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.question {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere;
}
.msg-q { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* ekrani i ndarjes */
.preview {
  align-self: center; width: 168px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.preview img { width: 100%; height: 100%; display: block; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.step-n {
  width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center;
}
.step-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step h2 { font-size: 17px; line-height: 28px; }
.apps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.apps strong { color: var(--text); font-weight: 500; }

/* faqja e dërgimit */
.who { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: 8px; color: var(--muted); font-size: 14px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 6px;
  font-family: var(--display); font-weight: 700; font-size: 28px; text-transform: uppercase;
}
.who .name { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--text); }
.send-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.send-card label.q { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
.send-card textarea {
  width: 100%; height: 132px; resize: none; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; background: var(--bg); color: var(--text); font: inherit; font-size: 17px; line-height: 1.4;
}
.send-card textarea::placeholder { color: var(--muted); }
.send-card textarea:focus { border-color: var(--text); outline: none; }
.send-card .hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.send-card .hint span { display: flex; align-items: center; gap: 6px; }
.send-card .hint > span:last-child { flex-shrink: 0; white-space: nowrap; }
.send-card .error:empty { margin-top: -14px; min-height: 0; }
.reactions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.react {
  min-height: 54px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
}
.react .emo { font-size: 20px; line-height: 1; }
.react[aria-pressed='true'] { border-color: var(--text); color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.poll { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.send-card .btn-outline-ink { min-height: 46px; font-size: 15px; }
.game {
  display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4;
  background: var(--soft); border-radius: 12px; padding: 12px; color: var(--muted); cursor: pointer;
}
.game strong { color: var(--text); font-weight: 500; }
.game input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--text); flex-shrink: 0; }
.sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cta { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-top: auto; color: var(--muted); font-size: 14px; }
.cta strong { font-weight: 500; }
.cta .btn { min-height: 46px; font-size: 15px; }
.done { text-align: center; }

/* butoni i Google, i vizatuar nga Google */
.gsi { display: flex; flex-direction: column; }
.gsi-btn { display: flex; justify-content: center; min-height: 52px; align-items: center; color-scheme: light; }
.stack > .stack > .error:empty { display: none; }

/* paneli: menyja poshtë */
.wrap.home { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.nav-in { max-width: 440px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 12px; }
.nav-item {
  min-height: 52px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; border-radius: 12px;
}
.nav-item[aria-current='page'] { color: var(--text); }
.nav-ic { position: relative; display: flex; }
.nav-dot {
  position: absolute; top: -6px; left: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 500; line-height: 18px; text-align: center;
}

/* lista e bisedave */
.threads { display: flex; flex-direction: column; margin: -8px -8px 0; }
.thread {
  display: flex; align-items: center; gap: 12px; padding: 12px 8px; border: 0; border-radius: 14px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.thread:hover { background: var(--soft); }
.thread-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-top { display: flex; align-items: baseline; gap: 8px; }
.thread-top strong { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-time { margin-left: auto; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.thread-last { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread.unread .thread-last { color: var(--text); font-weight: 500; }
.tag { flex-shrink: 0; font-size: 11px; font-weight: 500; color: var(--muted); background: var(--soft); padding: 1px 7px; border-radius: 999px; }
.ava {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase;
}
.ava-anon { background: var(--text); color: var(--bg); }
.ava-sm { width: 36px; height: 36px; font-size: 16px; }
.ava-lg { width: 72px; height: 72px; font-size: 32px; }
.me { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }

/* biseda */
.wrap.chat { padding: 0; gap: 0; height: 100vh; height: 100dvh; min-height: 0; }
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.chat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.chat-who strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-who span { font-size: 12px; color: var(--muted); }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty, .chat-closed { text-align: center; color: var(--muted); font-size: 14px; padding: 16px; }
.chat .error { padding: 0 14px; }
.chat .error:empty { display: none; }
.msg-row { display: flex; flex-direction: column; gap: 3px; max-width: 86%; }
.msg-row.mine { align-self: flex-end; align-items: flex-end; }
.msg-row.theirs { align-self: flex-start; align-items: flex-start; }
.bubble-line { display: flex; align-items: center; gap: 4px; }
.bubble {
  padding: 10px 14px; border-radius: 20px; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap;
  display: flex; flex-direction: column; gap: 4px;
}
.theirs .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.mine .bubble { background: var(--text); color: var(--bg); border-bottom-right-radius: 6px; }
.bubble-q { font-size: 12px; opacity: 0.7; }
.bubble-r { font-size: 14px; font-weight: 500; }
.msg-time { font-size: 11px; color: var(--muted); padding: 0 6px; }
.more { width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.more:hover { background: var(--soft); color: var(--text); }
.acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.acts[hidden] { display: none; }
.msg-row .gamebox { max-width: 100%; }
.composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}
.composer textarea {
  flex: 1; min-width: 0; max-height: 120px; resize: none; border: 1px solid var(--line); border-radius: 22px;
  padding: 11px 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; line-height: 1.35;
}
.composer textarea:focus { outline: none; border-color: var(--text); }
.send-btn {
  width: 46px; height: 46px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.send-btn[disabled] { opacity: 0.5; }

/* faqet me tekst (privatësia, kushtet) */
.doc { gap: 14px; max-width: 560px; }
.doc .link { align-self: flex-start; padding-left: 0; }
.doc h2 { margin-top: 14px; }
.doc p, .doc ul { margin: 0; line-height: 1.6; }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.doc a, .legal a { color: inherit; text-underline-offset: 3px; }
.legal { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
