/* Το Δωμάτιο του Μίμη — site palette (Manrope / navy / cyan / lime) */
:root {
  --navy: #101743;
  --deep: #07152f;
  --cyan: #17bfd1;
  --cyan2: #7be7ee;
  --lime: #c6ef26;
  --ink: #11183f;
  --muted: #626a83;
  --line: #dbe4eb;
  --mist: #effbfc;
  --white: #fff;
  --wa: #e8f7d8;
  --danger: #c23b2e;
  --panel: #f7fafb;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 12% -10%, #dffbfc 0%, transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(198, 239, 38, 0.18) 0%, transparent 28%),
    #fff;
  color: var(--ink);
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── shell ── */
.room-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.room-top {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e9eef2;
}

.room-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(98, 106, 131, 0.12);
}

.presence-dot.open {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(23, 191, 209, 0.16);
  animation: pulse 2s ease-in-out infinite;
}

.presence-dot.full {
  background: #e8a317;
  box-shadow: 0 0 0 4px rgba(232, 163, 23, 0.16);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.75; }
}

/* ── K11 label ── */
.k11 {
  background: var(--deep);
  color: #d7e0ec;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 10px 0;
  border-bottom: 1px solid rgba(123, 231, 238, 0.18);
}

.k11 .wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.k11 b {
  color: var(--lime);
  font-weight: 800;
  white-space: nowrap;
}

/* ── stages ── */
.stage {
  flex: 1;
  display: none;
  padding: 28px 0 24px;
}

.stage.active { display: flex; flex-direction: column; }

.gate-card {
  margin: auto;
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 18px 40px rgba(16, 23, 67, 0.08);
  text-align: center;
}

.gate-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8fafb;
  color: #167c8b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gate-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(23, 191, 209, 0.13);
}

.gate-card h1 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.gate-card h1 em {
  font-style: italic;
  color: var(--cyan);
  font-weight: 700;
}

.gate-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.gate-card .hint {
  font-size: 12px;
  color: #7a8296;
}

.opens-at {
  display: inline-block;
  margin: 4px 0 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--mist);
  border: 1px solid #cfe9ec;
  font-weight: 800;
  font-size: 14px;
  color: var(--navy);
}

.nick-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.nick-form label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a7288;
}

.nick-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: #fbfcfe;
}

.nick-form input:focus {
  outline: 3px solid rgba(23, 191, 209, 0.35);
  border-color: var(--cyan);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn span.arrow {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--navy);
}

.btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn.cta-lime {
  background: var(--lime);
  color: var(--deep);
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.wait-pulse {
  width: 54px;
  height: 54px;
  margin: 8px auto 18px;
  border-radius: 50%;
  border: 3px solid rgba(23, 191, 209, 0.25);
  border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* «Τι κάνει στο σπίτι» — απαντάει στο «τι είναι αυτό» για όποιον φτάνει πριν
   ανοίξει η πόρτα και βλέπει μόνο «ξεκουράζεται». */
.home-list {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  text-align: left;
  display: grid;
  gap: 8px;
}

.home-list li {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

.home-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--cyan);
}

.home-list strong { color: var(--ink); font-weight: 800; }

.cta-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cta-block p {
  margin-bottom: 12px;
  font-size: 13px;
}

/* ── chat ──
   Στην κουβέντα η σελίδα δεν κουνιέται: κλειδώνει στο ύψος της οθόνης και το
   μόνο που κυλάει είναι η ροή των μηνυμάτων. Πριν, το ύψος ήταν υπολογισμένο
   με το χέρι (100dvh μείον header μείον banner) και το footer περίσσευε από
   κάτω, οπότε όσο μιλούσες η σελίδα σκαμπανέβαζε. Τώρα το ύψος το μοιράζει
   το flex — καμία μαγική τιμή, τίποτα να ξεσυγχρονιστεί. */
body:has(.chat-stage.active) {
  height: 100dvh;
  overflow: hidden;
}

body:has(.chat-stage.active) .room-shell {
  height: 100dvh;
  min-height: 0;
}

body:has(.chat-stage.active) .room-footer {
  display: none;
}

.chat-stage.active {
  padding: 0;
  min-height: 0;
  flex: 1;
}

.chat-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  margin: 0 auto;
  background: linear-gradient(180deg, #f4f8f9 0%, #eef4f6 100%);
  border-left: 1px solid #e4ebef;
  border-right: 1px solid #e4ebef;
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.chat-meta .you {
  color: var(--navy);
}

.feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;   /* το scroll της ροής δεν «βγαίνει» στη σελίδα */
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 23, 67, 0.22) transparent;
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-image: radial-gradient(rgba(42, 72, 59, 0.07) 0.7px, transparent 0.7px);
  background-size: 12px 12px;
}

.row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 92%;
}

.row.self {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.row.system {
  align-self: center;
  max-width: 100%;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  background: #e6f8fb;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.mimis {
  background: #d8f1e7;
}

.bubble {
  background: #fff;
  border-radius: 14px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
}

.bubble .who {
  display: block;
  margin-bottom: 2px;
  color: #118b98;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.row.self .bubble {
  background: var(--wa);
}

.row.self .who {
  color: #527641;
  text-align: right;
}

.row.mimis .bubble {
  border-left: 3px solid var(--cyan);
}

.row.system .bubble {
  background: transparent;
  box-shadow: none;
  color: #6d758a;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 4px 8px;
}

.bubble time {
  display: block;
  margin-top: 4px;
  color: #7f877e;
  font-size: 10px;
  text-align: right;
}

.composer {
  padding: 10px 12px 14px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
}

.slow-banner {
  display: none;
  margin-bottom: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #fff6e8;
  border: 1px solid #f0d7a8;
  color: #8a5a12;
  font-size: 12px;
  font-weight: 700;
}

.slow-banner.show { display: block; }

.composer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.composer textarea {
  width: 100%;
  min-height: 46px;
  max-height: 120px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  background: #fbfcfe;
  color: var(--ink);
}

.composer textarea:focus {
  outline: 3px solid rgba(23, 191, 209, 0.3);
  border-color: var(--cyan);
  background: #fff;
}

.composer textarea:disabled {
  opacity: 0.6;
}

.send-btn {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.composer-hint {
  margin: 6px 2px 0;
  font-size: 11px;
  color: #7a8296;
  font-weight: 600;
}

.room-footer {
  padding: 10px 0 16px;
  text-align: center;
  font-size: 11px;
  color: #7a8296;
}

.room-footer a {
  font-weight: 700;
  text-underline-offset: 3px;
}

.hidden { display: none !important; }

@media (max-width: 640px) {
  .wrap { width: calc(100% - 24px); }
  .gate-card { padding: 24px 18px; border-radius: 18px; }
  .chat-layout { border-left: 0; border-right: 0; }
  .k11 { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .presence-dot.open,
  .wait-pulse { animation: none; }
}

/* Διακριτική μπάρα — φαίνεται όσο κυλάς, σχεδόν αόρατη όταν στέκεσαι. */
.feed::-webkit-scrollbar { width: 8px; }
.feed::-webkit-scrollbar-track { background: transparent; }
.feed::-webkit-scrollbar-thumb {
  background: rgba(16, 23, 67, 0.18);
  border: 2px solid transparent;
  border-radius: 99px;
  background-clip: content-box;
}
.feed:hover::-webkit-scrollbar-thumb { background: rgba(16, 23, 67, 0.3); background-clip: content-box; }
