* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef8f6;
  color: #10201d;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.join-card {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid #b9ddd6;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(10, 95, 84, .12);
}

/* Fixed small logo area */
.logo-wrap {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  overflow: hidden;
}

.logo-wrap .brand-logo {
  width: auto !important;
  height: 26px !important;
  max-width: 20px !important;
  max-height: 6px !important;
  object-fit: contain !important;
  display: block !important;
}

.join-card h1 {
  margin: 0 0 6px;
  font-size: 36px;
  line-height: 1;
  color: #0b4f46;
  text-align: center;
}

.join-card p {
  margin: 0 0 22px;
  color: #5b726d;
  text-align: center;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #335f58;
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #b9ddd6;
  border-radius: 14px;
  background: #ffffff;
  color: #10201d;
  outline: none;
}

input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .14);
}

button {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  background: #0b5f58;
}

.join-card button {
  width: 100%;
  margin-top: 6px;
}

.hint {
  display: block;
  margin-top: 14px;
  color: #6d837e;
  text-align: center;
}

.hidden {
  display: none !important;
}

.call-shell {
  width: min(1180px, 100%);
  min-height: calc(100dvh - 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
}

.call-header,
.call-controls,
.chat-panel,
.video-tile {
  border: 1px solid #b9ddd6;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(10, 95, 84, .08);
}

.call-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 22px;
}

.call-header h2,
.call-header p {
  margin: 0;
}

.call-header h2 {
  color: #0b4f46;
}

.call-header p {
  margin-top: 4px;
  color: #5b726d;
  font-size: 13px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
}

.video-tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  background: #0f172a;
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0f172a;
}

.video-tile .name-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, .85);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.call-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
}

.danger {
  background: #b42318;
}

.danger:hover {
  background: #941b12;
}

.chat-panel {
  grid-column: 2;
  grid-row: 2 / 4;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-radius: 22px;
  overflow: hidden;
}

.chat-messages {
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-message {
  padding: 10px 12px;
  border-radius: 14px;
  background: #eef8f6;
  color: #10201d;
  font-size: 13px;
}

.chat-message strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  color: #0f766e;
}

#chatForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #d4ebe6;
}

@media (max-width: 900px) {
  .call-shell {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    grid-column: auto;
    grid-row: auto;
    min-height: 280px;
  }
}
.hand-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #0b4f46;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
  z-index: 2;
}

.hand-active {
  background: #d97706;
}

.hand-active:hover {
  background: #b45309;
}