/* Vlaďuška inbox – mobil first, velká písmena a cíle doteku (uživatelka 60+) */
:root {
  --brand: #b35561;
  --brand-dark: #96414d;
  --bg: #faf6f4;
  --bubble-in: #ffffff;
  --bubble-out: #f9e7e4;
  --text: #1c1c1c;
  --muted: #6b6b6b;
  --danger: #b3261e;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 17px/1.45 -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  padding-top: env(safe-area-inset-top);
}
.hidden { display: none !important; }
.screen { min-height: 100dvh; display: flex; flex-direction: column; }

/* login */
#login { justify-content: center; align-items: center; }
.login-box { text-align: center; width: min(340px, 90vw); }
.login-box img { border-radius: 18px; }
.login-box h1 { font-size: 22px; margin: 12px 0 20px; }
.login-box input {
  width: 100%; padding: 14px; margin-bottom: 10px;
  font-size: 17px; border: 1px solid #ccc; border-radius: 12px; background: #fff;
}
.error { color: var(--danger); min-height: 1.4em; font-size: 15px; }

/* horní lišta */
.bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff;
  padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); margin-top: calc(-1 * env(safe-area-inset-top));
  position: sticky; top: 0; z-index: 5;
}
.bar h1 { font-size: 19px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-btn {
  background: none; border: none; color: #fff; font-size: 17px; padding: 8px; cursor: pointer;
}

/* bannery */
.banner {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: #fff8e1; border-bottom: 1px solid #eadfa9;
  padding: 10px 14px; font-size: 15px;
}
.btn-small {
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  padding: 10px 14px; font-size: 15px; cursor: pointer; white-space: nowrap;
}

/* seznam konverzací */
.list { flex: 1; overflow-y: auto; }
.conv {
  display: block; width: 100%; text-align: left; background: #fff; border: none;
  border-bottom: 1px solid #e7e7e5; padding: 14px; cursor: pointer;
}
.conv:active { background: #f7ecea; }
.conv .name { font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 8px; }
.conv .name time { font-weight: 400; color: var(--muted); font-size: 14px; }
.conv .preview { color: var(--muted); font-size: 15px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hint { text-align: center; color: var(--muted); padding: 32px 20px; }

/* vlákno */
.messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 82%; padding: 10px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.msg.in  { background: var(--bubble-in); align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.msg.out { background: var(--bubble-out); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; text-align: right; }
.msg img { max-width: 100%; border-radius: 10px; display: block; margin-bottom: 4px; }

/* composer */
.composer {
  display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #e2e2e0; position: sticky; bottom: 0;
}
.composer textarea {
  flex: 1; resize: none; font: inherit; padding: 12px; border: 1px solid #ccc; border-radius: 14px;
  max-height: 120px;
}
.btn-primary {
  background: var(--brand); color: #fff; border: none; border-radius: 14px;
  padding: 12px 18px; font-size: 17px; font-weight: 600; cursor: pointer;
}
.btn-primary:active { background: var(--brand-dark); }
.btn-primary:disabled { opacity: .5; }
