* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #17202a;
  background: #f5f7fa;
}

.audience-page {
  min-height: 100vh;
}

.audience-container {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
}

.comment-form {
  width: 100%;
}

.comment-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 700;
}

.comment-form textarea {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  border: 2px solid #b7c2cc;
  border-radius: 8px;
  font: inherit;
  font-size: 1.2rem;
  resize: vertical;
}

.comment-form button {
  width: 100%;
  margin-top: 16px;
  padding: 18px 24px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #145c9e;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.confirmation {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-size: 1.05rem;
  color: #1f6f43;
}

.screen-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #eef2f5;
}

.screen-layout {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.gallery-panel,
.messages-panel {
  min-width: 0;
  height: 100vh;
  padding: 32px;
}

.gallery-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.gallery {
  width: 100%;
  max-width: 760px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #d4dce3;
  background: #f8fafc;
}

.gallery-placeholder {
  font-size: 3rem;
  font-weight: 700;
  color: #5d6d7e;
}

.gallery-image,
.gallery-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-code {
  width: min(28vh, 220px);
  height: min(28vh, 220px);
  background: #ffffff;
}

.messages-panel {
  display: flex;
  align-items: stretch;
  background: #eef2f5;
}

.messages {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-card {
  padding: 14px 18px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(23, 32, 42, 0.12);
  display: flex;
  align-items: flex-start;
  font-size: 1.55rem;
  line-height: 1.2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 800px) {
  .screen-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .gallery-panel,
  .messages-panel {
    height: 50vh;
    padding: 18px;
  }

  .gallery-panel {
    gap: 16px;
  }

  .gallery {
    max-height: 32vh;
  }

  .gallery-placeholder {
    font-size: 2rem;
  }

  .qr-code {
    width: 120px;
    height: 120px;
  }

  .message-card {
    font-size: 1rem;
    padding: 8px 10px;
  }
}
