:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --line: #e2e2dd;
  --accent: #2f6f5e;
  --accent-soft: #9cc7bb;
  --accent-text: #ffffff;
  --me: #2f6f5e;
  --me-text: #ffffff;
  --peer: #ebebe6;
  --peer-text: #1c1c1a;
  --danger: #b3261e;
  --danger-text: #ffffff;
  --shadow: 0 10px 40px rgb(0 0 0 / 0.18);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --surface: #1f1f1d;
    --text: #ececea;
    --muted: #9a9a94;
    --line: #2e2e2b;
    --accent: #5fb39c;
    --accent-soft: #2f6f5e;
    --accent-text: #0d1a16;
    --me: #3b8a75;
    --me-text: #ffffff;
    --peer: #2b2b28;
    --peer-text: #ececea;
    --danger: #e5675f;
    --danger-text: #1a0505;
    --shadow: 0 10px 40px rgb(0 0 0 / 0.5);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  /* Χωρίς pull-to-refresh: ένα τράβηγμα προς τα κάτω δεν πρέπει να χάνει τη συζήτηση. */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

main {
  overflow-y: auto;
  /* --app-height: το ορατό ύψος όταν ανοίγει το πληκτρολόγιο (βλ. app.ts). */
  height: var(--app-height, 100dvh);
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0.6rem;
  padding: 0.6rem 1rem;
  min-height: 2.75rem;
  cursor: pointer;
  touch-action: manipulation;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--danger-text);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

button.icon {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  flex: none;
}

button.icon svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button.icon svg .fill {
  fill: currentColor;
  stroke: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Αρχική ── */

.start {
  margin: auto 0;
  padding: max(2rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right))
    max(2rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.logo {
  width: 5.5rem;
  height: 5.5rem;
}

.logo-back {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linejoin: round;
}

.logo-front {
  fill: var(--accent);
}

.logo-dot {
  fill: var(--bg);
}

.start h1 {
  margin: 0.25rem 0 0;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  line-height: 1.5;
  max-width: 26rem;
}

.promise {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 26rem;
}

.form {
  width: 100%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}

.form label {
  font-size: 0.9rem;
  color: var(--muted);
}

.form input {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
}

.consent {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.legal-links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Συνομιλία ── */

.chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: max(0.6rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.6rem
    max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
}

.status {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.msg {
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg.me {
  align-self: flex-end;
  background: var(--me);
  color: var(--me-text);
  border-bottom-right-radius: 0.3rem;
}

.msg.peer {
  align-self: flex-start;
  background: var(--peer);
  color: var(--peer-text);
  border-bottom-left-radius: 0.3rem;
}

/* ── Αντιδράσεις ── */

.msg[data-seq] {
  position: relative;
  cursor: pointer;
}

.msg.has-reactions {
  margin-bottom: 0.85rem;
}

.reactions {
  position: absolute;
  bottom: -0.95rem;
  display: flex;
  gap: 0.2rem;
  white-space: nowrap;
}

.msg.me .reactions {
  right: 0.4rem;
}

.msg.peer .reactions {
  left: 0.4rem;
}

.reaction {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.05rem 0.35rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.3;
}

.reaction.mine {
  border-color: var(--accent);
}

.reaction .count {
  font-size: 0.7rem;
  color: var(--muted);
}

.react-bar {
  position: absolute;
  z-index: 6;
  display: flex;
  gap: 0.1rem;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2rem;
  box-shadow: var(--shadow);
}

.react-bar button {
  border: none;
  background: transparent;
  border-radius: 50%;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  font-size: 1.45rem;
  line-height: 1;
}

.react-bar button[aria-pressed="true"] {
  background: var(--peer);
  box-shadow: inset 0 0 0 2px var(--accent);
}

@media (hover: hover) {
  .react-bar button:hover {
    background: var(--peer);
  }
}

.sys {
  align-self: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.25rem 0;
  max-width: 90%;
}

/* Κάρτα YouTube: τίτλος χωρίς thumbnail· ο player φορτώνει μόνο με κλικ. */
.msg.video {
  width: min(80%, 22rem);
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.video-title {
  font-weight: 600;
}

.video-meta {
  font-size: 0.8rem;
  opacity: 0.8;
}

.video-play {
  margin-top: 0.25rem;
  align-self: flex-start;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  border: none;
  background: rgb(0 0 0 / 0.18);
  color: inherit;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0.5rem;
  margin-top: 0.25rem;
}

.typing {
  padding: 0 1rem 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.6rem max(1rem, env(safe-area-inset-right)) max(0.6rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
}

.composer textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
  /* 16px: κάτω από αυτό το iPhone κάνει zoom όταν πατάς το πεδίο. */
  font-size: 1rem;
  line-height: 1.4;
  height: 2.75rem;
  max-height: 8rem;
  overflow-y: auto;
}

.send {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.send svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 480px) {
  .send {
    width: 2.75rem;
    padding: 0;
    justify-content: center;
    flex: none;
  }

  .send-label {
    display: none;
  }

  .bar #next {
    padding: 0.5rem 0.75rem;
  }
}

/* ── Emoji ── */

.emoji-panel {
  position: absolute;
  left: max(0.5rem, env(safe-area-inset-left));
  right: max(0.5rem, env(safe-area-inset-right));
  bottom: calc(4.25rem + env(safe-area-inset-bottom));
  max-width: 22rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 5;
}

.emoji-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.emoji-tabs button {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 0.5rem 0;
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
}

.emoji-tabs button[aria-selected="true"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr));
  padding: 0.4rem;
  /* Σε κινητό οριζόντια δεν πρέπει να καλύπτει όλη την οθόνη. */
  height: min(13rem, 40dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.emoji-tabs button {
  min-height: 2.5rem;
}

.emoji-grid button {
  border: none;
  background: transparent;
  padding: 0;
  min-height: 2.6rem;
  font-size: 1.45rem;
  line-height: 1;
  border-radius: 0.4rem;
}

.emoji-grid button:hover {
  background: var(--peer);
}

/* ── Modals ── */

.modal {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0;
  width: min(42rem, calc(100vw - 2rem));
}

.modal::backdrop {
  background: rgb(0 0 0 / 0.45);
}

.modal h2 {
  margin: 0;
  font-size: 1.2rem;
}

.legal-modal {
  height: min(80dvh, 46rem);
}

.legal-modal[open] {
  display: flex;
  flex-direction: column;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.75rem 0.75rem 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem 1.25rem 1.25rem;
}

/* Σε κινητό τα κείμενα ανοίγουν σε όλη την οθόνη, για να διαβάζονται άνετα. */
@media (max-width: 480px) {
  .legal-modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
  }

  .legal-modal .modal-head {
    padding-top: max(0.75rem, env(safe-area-inset-top));
  }

  .legal-modal .modal-body {
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  /* Ο πίνακας γίνεται κάρτες: μία ανά είδος δεδομένων. */
  .legal table,
  .legal tbody,
  .legal tr,
  .legal td {
    display: block;
    width: 100%;
  }

  .legal thead {
    display: none;
  }

  .legal tr {
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    padding: 0.4rem 0.6rem;
    margin: 0.5rem 0;
  }

  .legal td {
    border: none;
    padding: 0.2rem 0;
  }

  .legal td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
  }
}

.confirm-modal {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1.25rem;
}

.confirm-modal p {
  color: var(--muted);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ── Νομικά κείμενα (και ως αυτόνομες σελίδες) ── */

.legal {
  line-height: 1.6;
}

.legal h2 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.4rem;
}

.legal p,
.legal li {
  margin: 0.4rem 0;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.legal th,
.legal td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.legal .meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.legal .todo {
  background: rgb(255 200 0 / 0.25);
  padding: 0 0.2rem;
  border-radius: 0.2rem;
}

.page {
  height: auto;
  min-height: 100dvh;
  padding: 1.5rem 1.25rem 3rem;
}

.page .back {
  font-size: 0.9rem;
}

.page h1 {
  margin: 1rem 0 0.25rem;
  font-size: 1.6rem;
}

/* Κινητό οριζόντια: λιγότερο ύψος για το λογότυπο και τα κενά. */
@media (max-height: 520px) {
  .start {
    gap: 0.35rem;
    padding-top: max(1rem, env(safe-area-inset-top));
  }

  .logo {
    width: 3.25rem;
    height: 3.25rem;
  }

  .start h1 {
    font-size: 1.9rem;
  }

  .promise {
    margin-bottom: 0.6rem;
  }

  .legal-links {
    margin-top: 0.75rem;
  }
}

/* ── Είσοδος, προφίλ, αρχική, ρυθμίσεις ── */

.start h2 {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
}

.lead.small {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}

.form label.check {
  color: var(--text);
}

.check input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.1rem 0 0;
  accent-color: var(--accent);
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
  line-height: 1.45;
}

.note {
  margin: 0 0 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  background: var(--peer);
  font-size: 0.9rem;
  line-height: 1.45;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

button.link {
  border: none;
  background: none;
  padding: 0.4rem 0;
  min-height: 2.5rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

button.link:disabled {
  color: var(--muted);
  text-decoration: none;
}

.code-input {
  font-size: 1.6rem;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.screen-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Η στήλη κυλά ολόκληρη· τα στοιχεία της (π.χ. η επιλογή avatar) δεν μαζεύουν. */
.screen-body > * {
  flex-shrink: 0;
}

.bar-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.muted {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.small {
  font-size: 0.85rem;
}

button.wide {
  width: 100%;
}

.avatar {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--peer);
  object-fit: contain;
}

.avatar.lg {
  width: 3.2rem;
  height: 3.2rem;
}

.avatar.xl {
  width: 6rem;
  height: 6rem;
}

.profile-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  padding: 0.5rem 0;
}

.field-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.field {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
  /* 16px: κάτω από αυτό το iPhone κάνει zoom όταν πατάς το πεδίο. */
  font-size: 1rem;
}

/* Επιλογή avatar */

.picker {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  overflow: hidden;
}

.picker-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.picker-tabs button {
  flex: 1;
  border: none;
  border-radius: 0;
  background: transparent;
}

.picker-tabs button[aria-selected="true"] {
  box-shadow: inset 0 -2px 0 var(--accent);
  font-weight: 600;
}

.picker-tones {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.picker-tones button {
  width: 2rem;
  height: 2rem;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid var(--line);
}

.picker-tones button[aria-checked="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  gap: 0.25rem;
  padding: 0.5rem;
  max-height: min(22rem, 45dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.picker-option {
  border: 2px solid transparent;
  background: transparent;
  border-radius: 0.8rem;
  padding: 0.2rem;
  min-height: 0;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.picker-option img {
  width: 100%;
  height: 100%;
  max-width: 4rem;
  max-height: 4rem;
}

.picker-option[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--peer);
}

@media (hover: hover) {
  .picker-option:hover {
    background: var(--peer);
  }
}

/* Αρχική */

.find-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
  text-align: center;
}

button.big {
  font-size: 1.1rem;
  min-height: 3.25rem;
  font-weight: 600;
}

.hint-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  background: var(--peer);
}

.hint-card p {
  margin: 0;
  flex: 1 1 14rem;
  line-height: 1.45;
}

.section-title {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.list:empty {
  display: none;
}

.list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  text-align: left;
}

.list-item.static {
  flex-wrap: wrap;
}

.list-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.list-text strong,
.list-text .muted {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-text .muted {
  font-size: 0.85rem;
}

.list-actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.unread {
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Ρυθμίσεις */

.setting {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
}

.setting-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow-wrap: anywhere;
}

.setting-text .muted {
  font-size: 0.85rem;
}

.setting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Συζήτηση: φιλία, αναφορά, avatar */

.bar .avatar {
  width: 2.25rem;
  height: 2.25rem;
}

button.icon[aria-disabled="true"] {
  opacity: 0.45;
}

#friend[data-state="received"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

#friend[data-state="sent"] {
  border-color: var(--accent);
}

.request-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  color: var(--text);
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

@media (max-width: 420px) {
  .bar {
    gap: 0.35rem;
  }

  .bar button.icon {
    width: 2.5rem;
  }
}

/* Διαχείριση αναφορών (/admin) */

.admin .report {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin .transcript {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  max-height: 60dvh;
  overflow-y: auto;
}

.admin .line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.admin .line .role {
  font-weight: 600;
  margin-right: 0.4rem;
}

.admin .line.reported .role {
  color: var(--danger);
}

.legal pre.license {
  white-space: pre-wrap;
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
  overflow-wrap: anywhere;
}

/* ── Εγκατάσταση σαν εφαρμογή (κινητό) ── */

.install-banner {
  position: fixed;
  z-index: 20;
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  max-width: 30rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.5rem 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.install-icon {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.7rem;
}

.install-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.85rem;
  line-height: 1.35;
}

.install-text strong {
  font-size: 0.95rem;
}

.install-text span {
  color: var(--muted);
}

.install-banner .primary {
  flex: none;
  padding: 0.5rem 0.8rem;
}

/* Χώρος στο κάτω μέρος, ώστε το banner να μην κρύβει περιεχόμενο. */
.install-open .start,
.install-open .screen-body {
  padding-bottom: 7.5rem;
}
