:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #657083;
  --line: #dbe2ea;
  --panel: #ffffff;
  --canvas: #f4f7fb;
  --host: #0f766e;
  --guest: #2563eb;
  --warm: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  height: 100%;
}

body,
#app {
  min-height: 100%;
}

body {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(245, 158, 11, 0.12), transparent 42%),
    var(--canvas);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

.shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: 20px;
}

.join-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: auto;
}

.join-frame {
  width: min(100%, 520px);
  margin: auto;
}

.join-panel {
  padding: clamp(24px, 6vw, 46px);
}

.join-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.join-home-toolbar {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.join-home-toolbar .join-brand {
  min-width: 0;
  flex: 1 1 auto;
}

.join-language-picker {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  padding: 0 8px;
}

.join-language-picker > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.join-language-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.join-language-select {
  width: 128px;
  min-width: 0;
  min-height: 36px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  padding: 0 2px;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.join-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: white;
}

.join-mark svg {
  width: 27px;
  height: 27px;
  stroke-width: 2;
}

.join-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.join-brand h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.15;
}

.join-intro {
  margin-top: 42px;
}

.join-intro h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
}

.join-intro p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.join-form {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.join-code-field {
  display: grid;
  gap: 8px;
}

.join-code-field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.join-code-input {
  width: 100%;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  padding: 0 18px;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.24em;
  outline: none;
  text-align: center;
}

.join-code-input::placeholder {
  color: #a5afbd;
  font-size: 16px;
  letter-spacing: 0;
}

.join-code-input:focus {
  border-color: var(--host);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.join-submit {
  width: 100%;
  min-height: 52px;
  font-size: 15px;
}

.join-submit svg {
  width: 18px;
  height: 18px;
}

.join-submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

.join-hint,
.join-error {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.join-error {
  margin-top: 8px;
  color: var(--danger);
}

.join-home-footer {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.join-about-button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.join-about-button svg {
  width: 16px;
  height: 16px;
}

.guest-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
}

.guest-shell .app-frame {
  height: 100%;
  width: min(760px, 100%);
}

.guest-shell .solo-chat {
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  box-shadow: none;
}

.guest-shell .panel {
  background: rgba(255, 255, 255, 0.96);
}

.guest-shell .chat {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.guest-shell .messages {
  min-height: 0;
}

.app-frame {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, 100%);
  min-width: 0;
  margin: 0 auto;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 18px;
}

.top-actions,
.host-action-row {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.host-brand-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.host-brand-row .brand {
  flex: 1 1 0;
}

.host-name-button {
  width: 112px;
  min-width: 96px;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.host-profile-controls {
  display: flex;
  min-width: 0;
  align-items: end;
  gap: 8px;
}

.host-profile-controls .language-field {
  width: 138px;
  flex: 0 0 138px;
}

.host-profile-controls .language-field > span {
  display: none;
}

.host-profile-controls .language-field .select {
  min-height: 40px;
  padding: 0 28px 0 9px;
  font-size: 14px;
}

.name-field {
  width: min(220px, 44%);
  flex: 1 1 180px;
}

.name-input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-button {
  display: inline-flex;
  max-width: 170px;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 11px;
}

.profile-button:hover {
  border-color: #9aa8ba;
}

.profile-button svg {
  width: 17px;
  flex: 0 0 auto;
}

.profile-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-header-actions {
  display: flex;
  width: min(100%, 560px);
  min-width: 0;
  align-items: end;
  gap: 8px;
}

.guest-header-actions .guest-language-field {
  display: flex;
  height: 42px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex: 2 1 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding-left: 10px;
}

.guest-header-actions .guest-language-field span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.guest-header-actions .guest-language-field .select {
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 30px 0 0;
}

.guest-action-button {
  display: inline-flex;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  overflow: hidden;
  padding: 0 8px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
}

.guest-action-button span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.guest-action-button:hover {
  border-color: #9aa8ba;
  color: var(--host);
}

.guest-action-button svg {
  width: 17px;
  height: 17px;
}

.host-action-row {
  width: 100%;
  display: grid;
  min-width: 0;
  align-items: stretch;
  justify-content: stretch;
  gap: 8px;
}

.host-primary-actions,
.host-secondary-actions {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-auto-rows: 52px;
  gap: 8px;
}

.host-primary-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.host-secondary-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.host-primary-actions .btn,
.host-secondary-actions .btn,
.host-name-input,
.host-language-select {
  width: 100%;
  min-width: 0;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  overflow: hidden;
}

.host-primary-actions .btn,
.host-secondary-actions .btn {
  padding: 5px 8px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.host-name-input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
  text-align: center;
  text-overflow: ellipsis;
}

.host-language-select {
  text-align: center;
  text-overflow: ellipsis;
}

.language-field {
  width: min(260px, 48%);
  flex: 0 1 260px;
}

.compact {
  min-width: 170px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  font-size: 18px;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.brand-subtitle {
  max-width: 100%;
  overflow-wrap: anywhere;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 18px;
  align-items: stretch;
}

.guest-grid {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 226, 234, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.invite {
  display: flex;
  min-height: 650px;
  flex-direction: column;
  padding: 22px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.5);
}

.modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  min-height: 0;
  overflow-y: auto;
}

.history-modal {
  width: min(620px, 100%);
  padding: 24px;
}

.history-modal h2 {
  margin: 0;
  padding-right: 46px;
  font-size: 24px;
}

.name-modal {
  padding: 24px;
}

.name-modal h2 {
  margin: 0 0 16px;
  padding-right: 44px;
  font-size: 24px;
}

.name-modal form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.name-modal .btn {
  min-height: 46px;
}

.history-note {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-open {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 12px 14px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.history-open:hover {
  background: #f8fafc;
}

.history-open strong,
.history-open span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-open span {
  color: var(--muted);
  font-size: 12px;
}

.history-delete {
  border-left: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-size: 22px;
}

.history-delete:hover {
  background: #fef2f2;
  color: var(--danger);
}

.history-empty {
  margin: 24px 0;
  color: var(--muted);
  text-align: center;
}

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid var(--line);
}

.invite-copy {
  margin-bottom: 18px;
}

.foreign-copy {
  padding-right: 42px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--host);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.headline {
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1;
}

.body-copy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.qr-zone {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 18px 0;
}

.qr-card {
  width: min(330px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: center;
}

#qr {
  display: grid;
  min-height: 244px;
  place-items: center;
}

#qr img,
#qr canvas {
  width: min(244px, 100%) !important;
  height: min(244px, 100%) !important;
}

.qr-fallback {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.local-prompt {
  margin: 16px 0 0;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
}

.room-link {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.controls {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.select,
.input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.composer .btn {
  min-height: 46px;
  align-self: start;
}

.btn.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.btn.warning {
  background: var(--warm);
  color: #1f2937;
}

.chat {
  display: grid;
  min-height: 650px;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.host-chat {
  grid-template-rows: minmax(0, 1fr) auto;
}

.solo-chat {
  height: 100%;
  min-height: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.room-meta {
  min-width: 0;
}

.room-meta h2 {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-meta p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chat-tools .select {
  width: 145px;
}

.guest-language-field {
  width: min(100%, 230px);
  flex: 0 0 230px;
}

.guest-language-field .select {
  min-width: 0;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding: 20px 22px;
}

.empty {
  margin: auto;
  max-width: 370px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.msg {
  display: grid;
  width: max-content;
  max-width: min(72%, 680px);
  gap: 4px;
}

.msg.mine {
  align-self: flex-end;
}

.msg.theirs {
  align-self: flex-start;
}

.msg-content-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-end;
  gap: 3px;
}

.msg.theirs .msg-content-row {
  justify-content: flex-start;
}

.msg.mine .msg-content-row {
  justify-content: flex-end;
}

.bubble {
  border-radius: 8px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--line);
  line-height: 1.45;
  white-space: normal;
  width: auto;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  font-size: 17px;
}

.bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.image-message {
  display: block;
  margin-bottom: 8px;
}

.image-message img {
  display: block;
  width: min(280px, 100%);
  max-height: 320px;
  border-radius: 6px;
  object-fit: cover;
}

.typing-dots {
  display: inline-flex;
  min-width: 36px;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.35;
  animation: dotPulse 1.1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes dotPulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  40% {
    transform: translateY(-3px);
    opacity: 0.9;
  }
}

.bubble .original {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(101, 112, 131, 0.24);
  color: var(--muted);
  font-size: 15px;
}

.bubble .outbound {
  margin-top: 8px;
  margin-bottom: 0;
  padding-top: 8px;
  padding-bottom: 0;
  border-top: 1px solid rgba(101, 112, 131, 0.24);
  border-bottom: 0;
}

.mine .bubble .original {
  border-bottom-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.82);
}

.mine .bubble .outbound {
  border-top-color: rgba(255, 255, 255, 0.35);
}

.mine .bubble {
  justify-self: end;
  background: var(--host);
  border-color: var(--host);
  color: white;
}

.msg.guest-mine .bubble {
  background: var(--guest);
  border-color: var(--guest);
}

.msg-meta {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.mine .msg-meta {
  justify-content: flex-end;
  text-align: right;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  align-items: stretch;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.telegram-composer {
  --composer-control-size: 48px;
  grid-template-columns: var(--composer-control-size) minmax(0, 1fr) var(--composer-control-size);
  align-content: center;
  align-items: center;
  gap: 8px;
}

.file-input {
  display: none;
}

.composer-icon {
  display: grid;
  width: var(--composer-control-size, 46px);
  min-width: var(--composer-control-size, 46px);
  max-width: var(--composer-control-size, 46px);
  height: var(--composer-control-size, 46px);
  min-height: var(--composer-control-size, 46px);
  max-height: var(--composer-control-size, 46px);
  place-items: center;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  padding: 0;
}

.composer-icon:hover {
  border-color: #9aa8ba;
  color: var(--ink);
}

.composer-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.25;
}

.attachment-button,
.composer-action.is-voice {
  border-radius: 50%;
}

.composer-action.is-send {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.composer-action.is-send:hover {
  border-color: var(--host);
  background: var(--host);
  color: white;
}

.composer-action.is-voice {
  border-color: var(--line);
  background: white;
  color: var(--muted);
}

.composer-action.is-voice:hover {
  border-color: #9aa8ba;
  background: white;
  color: var(--ink);
}

.composer-action.is-voice.is-recording {
  border-color: var(--danger);
  background: var(--danger);
  color: white;
  animation: recordingPulse 1.2s infinite ease-in-out;
}

.attachment-preview {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 48px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px;
}

.attachment-preview img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}

.attachment-preview span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-remove {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
}

.preview-remove svg {
  width: 17px;
}

@keyframes recordingPulse {
  50% {
    opacity: 0.68;
  }
}

.text-input {
  min-height: 46px;
  max-height: 110px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow-y: auto;
  line-height: 1.35;
}

.telegram-composer .text-input {
  height: var(--composer-control-size);
  min-height: var(--composer-control-size);
  max-height: var(--composer-control-size);
  align-self: center;
  border-radius: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.host-only {
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 10;
  transform: translateX(-50%);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

@media (max-width: 880px) {
  html,
  body,
  #app {
    height: 100%;
  }

  .shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
  }

  .guest-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    padding: max(6px, env(safe-area-inset-top)) 6px max(6px, env(safe-area-inset-bottom));
  }

  .app-frame {
    display: grid;
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .guest-shell .app-frame {
    display: block;
    height: 100%;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .brand-title {
    font-size: 17px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .top-actions,
  .host-action-row {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .top-actions .btn,
  .top-actions .field {
    flex: 1;
  }

  .top-actions .btn {
    min-height: 40px;
    min-width: 0;
    flex: 1 1 0;
    padding: 0 8px;
    font-size: 13px;
    white-space: nowrap;
    -webkit-text-size-adjust: 100%;
  }

  .host-brand-row {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .host-profile-controls {
    width: 118px;
    flex: 0 0 118px;
    justify-content: flex-end;
    gap: 5px;
  }

  .host-name-button {
    width: 106px;
    min-width: 96px;
    min-height: 40px;
    font-size: 12px;
  }

  .host-profile-controls .language-field {
    width: 118px;
    flex: 0 0 118px;
  }

  .language-field {
    width: 118px;
    flex: 0 0 118px;
    min-width: 0;
  }

  .language-field .select {
    min-width: 0;
    min-height: 40px;
    padding: 0 25px 0 8px;
    font-size: 13px;
  }

  .compact {
    min-width: min(100%, 160px);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .invite,
  .chat {
    min-height: auto;
  }

  .chat {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .host-chat {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .guest-shell .chat {
    height: 100%;
  }

  .solo-chat {
    min-height: auto;
  }

  .chat-header {
    padding: 12px;
  }

  .room-meta h2 {
    font-size: 17px;
  }

  .room-meta p {
    font-size: 12px;
  }

  .control-row,
  .composer {
    grid-template-columns: 1fr;
  }

  .msg {
    max-width: 88%;
  }

  .chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .guest-shell .chat-header {
    gap: 8px;
    padding: 10px 12px;
  }

  .guest-shell .room-meta h2 {
    font-size: 20px;
  }

  .guest-shell .room-meta p {
    font-size: 13px;
    line-height: 1.35;
  }

  .guest-shell .chat-tools .select {
    min-height: 40px;
    width: 100%;
  }

  .guest-language-field {
    width: auto;
    max-width: none;
  }

  .guest-language-field .select {
    min-height: 0;
  }

  .guest-header-actions {
    display: flex;
    width: 100%;
    align-items: end;
    gap: 6px;
  }

  .guest-header-actions .guest-language-field {
    height: 40px;
    flex: 2 1 0;
  }

  .guest-action-button {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 0 6px;
    font-size: 12px;
  }

  .guest-shell .messages {
    padding: 14px 12px;
  }

  .guest-shell .composer {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    padding: 10px 12px;
  }

  .guest-shell .telegram-composer,
  .telegram-composer {
    --composer-control-size: 42px;
    grid-template-columns: var(--composer-control-size) minmax(0, 1fr) var(--composer-control-size);
  }

  .composer-icon {
    width: var(--composer-control-size, 42px);
    min-width: var(--composer-control-size, 42px);
    max-width: var(--composer-control-size, 42px);
    height: var(--composer-control-size, 42px);
    min-height: var(--composer-control-size, 42px);
    max-height: var(--composer-control-size, 42px);
  }

  .guest-shell .text-input {
    height: var(--composer-control-size);
    min-height: var(--composer-control-size);
    max-height: 82px;
  }

  .guest-shell .composer .btn {
    min-height: 42px;
  }

  .chat-tools {
    justify-content: flex-start;
    width: 100%;
  }

  .chat-tools .btn {
    min-height: 38px;
  }

  .chat-tools .select {
    flex: 1;
    min-width: 150px;
  }
}

@media (max-width: 520px) {
  .join-home-toolbar {
    gap: 8px;
  }

  .join-language-label {
    display: none;
  }

  .join-language-picker {
    padding: 0 6px;
  }

  .join-language-select {
    width: 118px;
  }

  .host-action-row,
  .host-primary-actions,
  .host-secondary-actions {
    gap: 6px;
  }

  .host-primary-actions .btn,
  .host-secondary-actions .btn,
  .host-name-input,
  .host-language-select {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .host-primary-actions,
  .host-secondary-actions {
    grid-auto-rows: 48px;
  }

  .headline {
    font-size: 34px;
  }

  .local-prompt {
    font-size: 20px;
  }
}

/* Guest chat header stays compact while keeping the room name readable. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.guest-chat-header {
  position: relative;
  display: block;
  padding: 8px 12px;
}

.guest-brand-tagline {
  display: block;
  width: 100%;
  max-width: none;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-header-row {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.guest-room-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.guest-room-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  color: var(--guest);
}

.guest-room-icon svg {
  width: 18px;
  height: 18px;
}

.guest-room-title h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-header-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.guest-language-control {
  display: block;
  width: clamp(132px, 20vw, 180px);
  min-width: 0;
}

.guest-language-control .select {
  width: 100%;
  min-height: 34px;
  height: 34px;
  overflow: hidden;
  padding: 0 28px 0 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.guest-name-chip,
.guest-about-button {
  display: inline-flex;
  width: auto;
  max-width: 122px;
  height: 34px;
  min-height: 34px;
  min-width: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.guest-name-chip {
  flex: 0 1 auto;
}

.guest-name-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-about-button {
  flex: 0 0 auto;
  background: #f8fafc;
}

.guest-name-chip:hover,
.guest-about-button:hover {
  border-color: #9aa8ba;
}

.about-modal {
  width: min(500px, 100%);
  padding: 24px;
}

.about-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 42px;
}

.about-icon,
.about-download-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--guest);
}

.about-icon {
  width: 42px;
  height: 42px;
}

.about-icon svg {
  width: 21px;
  height: 21px;
}

.about-kicker {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.about-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.about-lead {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.about-body {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.about-download {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 14px;
}

.about-download-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: white;
}

.about-download-icon svg {
  width: 17px;
  height: 17px;
}

.about-download h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.about-download p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.about-download-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.about-store-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 700;
}

.about-store-link > svg {
  grid-row: span 2;
  width: 16px;
  height: 16px;
  color: var(--guest);
}

.about-store-link > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.about-store-link small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.attachment-preview {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px;
}

.attachment-tile {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.attachment-tile img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.attachment-tile .preview-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
}

.attachment-tile .preview-remove svg {
  width: 13px;
  height: 13px;
}

.attachment-menu,
.emoji-picker {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.attachment-menu button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
}

.attachment-menu button:hover {
  background: #eef2f7;
}

.attachment-menu svg {
  width: 17px;
  height: 17px;
  color: var(--guest);
}

.emoji-picker {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.emoji-picker button,
.reaction-menu button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  font-size: 21px;
}

.emoji-picker button:hover,
.reaction-menu button:hover {
  background: #eef2f7;
}

.composer-input-wrap {
  position: relative;
  min-width: 0;
}

.composer-input-wrap .text-input {
  width: 100%;
  padding-right: 42px;
}

.emoji-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.emoji-toggle:hover {
  background: #eef2f7;
  color: var(--ink);
}

.emoji-toggle svg {
  width: 18px;
  height: 18px;
}

.draft-location {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 9px;
}

.draft-location-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--guest);
}

.draft-location-icon svg {
  width: 17px;
}

.draft-location-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-location > button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
}

.draft-location > button svg {
  width: 16px;
}

.location-modal {
  width: min(680px, 100%);
  padding: 20px;
}

.location-modal-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  margin: 0 42px 14px 0;
}

.location-modal-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--guest);
}

.location-modal-icon svg {
  width: 20px;
  height: 20px;
}

.location-modal-heading h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.location-modal-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.location-hint {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.location-current-button {
  min-height: 44px;
}

.location-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0 42px 12px 0;
}

.location-search-input {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.location-search-input > svg {
  position: absolute;
  left: 13px;
  z-index: 1;
  width: 17px;
  color: var(--muted);
  pointer-events: none;
}

.location-search-form .text-input,
.location-search-input .text-input {
  min-width: 0;
  width: 100%;
  padding-left: 40px;
}

.location-search-form .btn {
  min-height: 46px;
}

.location-map-shell {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e7eef2;
}

.location-map {
  width: 100%;
  height: min(38vh, 340px);
  min-height: 250px;
}

.location-map .leaflet-control-attribution {
  font-size: 9px;
}

.location-map-tip {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 500;
  display: inline-flex;
  max-width: calc(100% - 28px);
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.15);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 11px;
  transform: translateX(-50%);
  pointer-events: none;
}

.location-map-tip svg {
  width: 14px;
  flex: 0 0 auto;
}

.location-map-unavailable {
  position: absolute;
  inset: 0;
  z-index: 600;
  display: none;
  place-items: center;
  background: rgba(244, 247, 251, 0.94);
  color: var(--muted);
  padding: 24px;
  text-align: center;
  font-size: 13px;
}

.location-map-unavailable.is-visible {
  display: grid;
}

.location-selection-pin {
  border: 0;
  background: transparent;
}

.location-selection-pin span {
  display: block;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--guest);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.3);
  transform: rotate(-45deg);
}

.location-selection-pin span::after {
  display: block;
  width: 7px;
  height: 7px;
  margin: 6px auto 0;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.location-result-marker-label {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--guest);
  font-size: 11px;
  font-weight: 800;
}

.location-result-marker-label::before {
  display: none;
}

.location-selection-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
  padding: 9px 11px;
}

.location-selection-summary > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.location-selection-summary small {
  color: var(--muted);
  font-size: 11px;
}

.location-selection-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-selection-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--guest);
}

.location-selection-icon svg {
  width: 17px;
}

.location-search-status,
.location-results-title {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.location-search-status.is-error {
  color: var(--danger);
}

.location-search-status.is-busy {
  display: flex;
  align-items: center;
  gap: 7px;
}

.location-search-fallback {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--guest);
  padding: 7px 9px;
  font-size: 12px;
  text-align: left;
}

.location-search-fallback:hover {
  background: rgba(37, 99, 235, 0.14);
}

.location-search-fallback svg {
  width: 14px;
  flex: 0 0 auto;
}

.location-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--guest);
  border-radius: 50%;
  animation: locationSpin 0.8s linear infinite;
}

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

.location-results {
  display: grid;
  max-height: 150px;
  gap: 5px;
  margin-top: 7px;
  overflow-y: auto;
}

.location-result {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  padding: 7px 9px;
  text-align: left;
}

.location-result:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}

.location-result-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  color: var(--guest);
}

.location-result-icon svg {
  width: 15px;
}

.location-result-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.location-result-copy strong,
.location-result-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-result-copy strong {
  font-size: 12px;
}

.location-result-copy small {
  color: var(--muted);
  font-size: 11px;
}

.location-result-arrow {
  width: 15px;
  color: var(--muted);
}

.location-modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.location-modal-actions .btn {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.location-modal-actions .btn svg {
  width: 16px;
}

.location-card {
  display: grid;
  min-width: 220px;
  gap: 10px;
  padding: 2px 0;
}

.location-card-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

.location-card-heading > div {
  min-width: 0;
}

.location-card-heading strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
}

.location-pin {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
}

.location-pin svg {
  width: 15px;
  height: 15px;
}

.location-accuracy {
  display: block;
  margin-top: 2px;
  opacity: 0.74;
  font-size: 11px;
}

.location-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid rgba(128, 128, 128, 0.24);
  padding-top: 8px;
}

.location-card-actions a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(128, 128, 128, 0.24);
  border-radius: 7px;
  color: inherit;
  padding: 0 8px;
  font-size: 11px;
  text-decoration: none;
}

.location-card-actions a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.location-card-actions svg {
  width: 13px;
  height: 13px;
}

.image-message-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.image-message-grid .image-message {
  margin: 0;
}

.image-message-grid .image-message img {
  width: 100%;
  max-width: 240px;
  max-height: 240px;
}

.message-reactions {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  align-items: center;
  gap: 5px;
  padding-bottom: 2px;
}

.reaction-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.reaction-pill,
.reaction-trigger {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 0 7px;
  font-size: 12px;
}

.reaction-trigger {
  width: 22px;
  height: 22px;
  min-height: 22px;
  justify-content: center;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.reaction-trigger svg {
  width: 15px;
  height: 15px;
}

.reaction-tools {
  position: relative;
}

.reaction-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 5px);
  z-index: 4;
  display: flex;
  max-width: min(260px, calc(100vw - 32px));
  gap: 2px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 4px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.mine .message-reactions {
  justify-content: flex-end;
}

.mine .reaction-pill,
.mine .reaction-trigger {
  border-color: rgba(15, 118, 110, 0.26);
}

.mine .reaction-trigger {
  border-color: transparent;
}

.guest-shell .messages {
  overscroll-behavior: contain;
}

@media (max-width: 600px) {
  .location-modal {
    padding: 16px;
  }

  .location-search-form {
    margin-right: 0;
  }

  .location-map {
    height: 34vh;
    min-height: 220px;
  }

  .location-map-tip {
    max-width: calc(100% - 20px);
    font-size: 10px;
  }

  .location-modal-actions .btn {
    min-height: 42px;
    padding: 0 8px;
    font-size: 12px;
  }

  .guest-chat-header {
    padding: 8px 10px;
  }

  .guest-header-row {
    gap: 6px;
  }

  .guest-brand-tagline {
    width: 100%;
    max-width: none;
    margin: 4px 0 0;
    font-size: 9px;
  }

  .guest-room-title {
    gap: 5px;
  }

  .guest-room-icon {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
  }

  .guest-language-control {
    width: clamp(112px, 34vw, 150px);
  }

  .guest-name-chip {
    width: auto;
    max-width: 64px;
    padding: 0 8px;
  }

  .guest-about-button {
    width: auto;
    max-width: 72px;
    padding: 0 8px;
  }

  .guest-room-title h2 {
    font-size: 13px;
  }

  .about-modal {
    padding: 20px;
  }

  .about-heading h2 {
    font-size: 21px;
  }

  .about-lead {
    margin-top: 20px;
    font-size: 16px;
  }

  .guest-shell .telegram-composer {
    grid-template-columns: var(--composer-control-size) minmax(0, 1fr) var(--composer-control-size);
  }

  .location-search-form {
    grid-template-columns: 1fr;
  }

  .location-search-form .btn {
    width: 100%;
  }
}
