body[data-page="practice"] .practice-top {
  padding-top: 0;
  padding-bottom: 14px;
}

body[data-page="practice"] .practice-top__line {
  gap: 12px;
}

.engine-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.engine-status::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--ochre);
  content: "";
}

.engine-status[data-connected="true"]::before {
  background: var(--sage);
}

.practice-goal {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 3px 0 12px;
  line-height: 1.5;
}

.practice-goal > span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.practice-goal strong {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.has-custom-scene .practice-goal strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.practice-custom-context {
  margin-bottom: 15px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}
.practice-custom-context summary {
  display: list-item;
  min-height: 44px;
  padding-block: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  cursor: pointer;
}
.practice-custom-context p {
  padding-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body[data-page="practice"] .practice-context {
  display: block;
  margin: 0 0 21px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

body[data-page="practice"] .messages {
  gap: 16px;
}

.practice-opening {
  padding: 17px 16px;
  border-left: 2px solid var(--primary);
  border-radius: 4px 12px 12px 4px;
  background: var(--paper);
}

.practice-opening h2 {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.practice-opening p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.short-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

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

.short-avatar {
  width: 33px;
  height: 33px;
  margin-top: 1px;
  font-size: 13px;
}

.short-message__card {
  width: max-content;
  max-width: calc(100% - 43px);
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px;
  background: var(--paper);
}

.short-message--mine .short-message__card {
  border-color: transparent;
  border-radius: 14px 4px 14px 14px;
  background: var(--primary-soft);
}

.short-message__card h2 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.short-message__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1px 6px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.short-message__actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.short-message__actions button:hover,
.short-message__actions button:focus-visible {
  background: var(--bg);
}

.short-message__actions .short-message__play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  user-select: none;
}

.short-message__play::before {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  content: "";
}

.short-message__actions button[aria-pressed="true"] {
  background: var(--primary-soft);
}

.short-message__play[aria-pressed="true"]::before {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 1px;
  background: currentColor;
}

.short-message__text {
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

body[data-page="practice"] .practice-footer {
  padding: 12px 24px !important;
}

.composer-voice,
.composer-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.composer-voice .btn-primary {
  flex: 1 1 auto;
}

.composer-voice .btn-primary[aria-pressed="true"] {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--paper);
}

.composer-switch {
  padding: 0 6px;
  white-space: nowrap;
}

.composer-input-row > .composer-switch {
  align-self: center;
  flex: 0 0 auto;
  padding-inline: 4px;
}

.composer-input-row textarea {
  min-width: 0;
  flex: 1;
  min-height: 52px;
  max-height: 100px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
}

.composer-input-row .composer-send {
  width: auto;
  max-width: 90px;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 8px 12px;
}

.composer-input-row .composer-send:disabled {
  color: var(--muted);
  background: var(--line);
}

.composer-privacy {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.advice-link.btn-secondary {
  min-height: 44px;
  margin-top: 8px;
  color: var(--primary);
  font-size: 14px;
}

body[data-page="practice"] .composer-status:not(:empty) {
  margin: 6px 0;
}

@media (max-width: 350px) {
  body[data-page="practice"] .practice-footer {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }
}
