[hidden] {
  display: none !important;
}
header h1 {
  margin-bottom: 0.2rem;
}
#who {
  margin: 0.2rem 0 0.8rem;
  color: #5c564c;
}
.login-card {
  display: grid;
  gap: 0.35rem;
}
.login-card h2,
.chat-panel h2 {
  margin: 0 0 0.35rem;
}
label {
  margin-top: 0.45rem;
}
input, textarea, button {
  font: inherit;
}
.login-card input,
.composer textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d5cec2;
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  background: #fff;
}
.login-card button {
  justify-self: start;
  margin-top: 0.55rem;
}
.login-note {
  margin: 0.35rem 0 0;
  color: #8a3d2f;
}
#practice summary {
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 650;
}
#practice .note {
  margin: 0.75rem 0 0.4rem;
  color: #5c564c;
}
.choice-group {
  margin: 0.85rem 0 0.2rem;
}
.choice-group h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 0.65rem;
}
.choice-card,
.item-card {
  background: #fbfaf6;
  border: 1px solid #e4ddd0;
  border-radius: 8px;
  padding: 0.75rem 0.8rem;
}
.choice-card {
  display: flex;
  flex-direction: column;
}
.choice-card button {
  margin-top: auto;
  align-self: flex-start;
}
.item-name,
.choice-card p,
.item-meta {
  margin: 0;
}
.item-name {
  display: block;
  line-height: 1.35;
}
.item-meta {
  margin-top: 0.3rem;
  color: #5c564c;
}
.choice-card p {
  margin-bottom: 0.7rem;
}
.item-card {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 0.6rem;
}
.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: min(72vh, 38rem);
}
#transcript {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.msg {
  margin: 0;
  max-width: min(36rem, 88%);
  white-space: pre-wrap;
  line-height: 1.5;
}
.msg-me,
.msg-assistant {
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
}
.msg-me {
  align-self: flex-end;
  background: #0d5c4d;
  color: #fff;
}
.msg-assistant {
  align-self: flex-start;
  background: #f3f1ea;
  border: 1px solid #e4ddd0;
}
.msg-note {
  align-self: center;
  color: #5c564c;
  font-size: 0.92rem;
}
#empty-chat {
  margin: 0.2rem 0 0;
  color: #5c564c;
}
.composer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.55rem;
  align-items: flex-end;
  margin: 0.9rem -1.1rem -1rem;
  padding: 0.75rem 1.1rem 1rem;
  background: #fff;
  border-top: 1px solid #e4ddd0;
  border-radius: 0 0 8px 8px;
}
.composer textarea {
  flex: 1;
  min-height: 2.8rem;
  max-height: 8rem;
  resize: vertical;
}
@media (max-width: 480px) {
  .item-card,
  .composer {
    flex-direction: column;
    align-items: stretch;
  }
  .msg {
    max-width: 100%;
  }
}
