.hatzaga-body {
  background: linear-gradient(180deg, #fff7ee 0%, var(--kavana-bg) 55%);
}

.hatzaga-shell {
  width: min(1180px, calc(100% - 28px));
}

.hatzaga-panel-card {
  padding: 26px;
  border-top: 4px solid var(--kavana-orange);
}

.hatzaga-form {
  display: grid;
  gap: 10px;
}

.hatzaga-form label {
  font-weight: 700;
}

.hatzaga-hint {
  margin: 0;
  color: var(--kavana-muted);
  font-size: 0.9rem;
}

.assignment-context {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--kavana-border);
  border-radius: 10px;
  background: var(--kavana-soft-blue);
}

.assignment-context p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.hatzaga-form select {
  width: 100%;
  border: 1px solid #a9c6d4;
  border-radius: 12px;
  padding: 13px 14px;
  background: white;
}

.mic-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mic-button {
  border: 1px solid var(--kavana-blue);
  background: white;
  color: var(--kavana-blue-dark);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  cursor: pointer;
}

.mic-button.listening {
  background: #fde6e4;
  border-color: #c0392b;
  color: #a3241c;
  animation: mic-pulse 1.4s ease-in-out infinite;
}

.mic-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mic-clear-button {
  border: 1px solid var(--kavana-border);
  background: white;
  color: var(--kavana-muted);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.mic-status {
  font-size: 0.9rem;
  color: var(--kavana-muted);
}

.mic-status.mic-error {
  color: #a3241c;
}

.presentation-recording-panel {
  display: grid;
  gap: 8px;
}

.presentation-timer {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: fit-content;
  margin: 2px 0 4px;
  padding: 10px 16px;
  border: 1px solid #b8d5e1;
  border-radius: 14px;
  background: #f5fbfd;
}

.presentation-timer-label {
  color: var(--kavana-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.presentation-timer-value {
  min-width: 5.2ch;
  color: var(--kavana-blue-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(2rem, 7vw, 3rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  direction: ltr;
}

.presentation-timer-reset {
  border: 0;
  background: transparent;
  color: var(--kavana-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .presentation-recording-panel {
    position: sticky;
    top: 0;
    z-index: 3;
    margin-inline: -4px;
    padding: 8px 4px;
    border-bottom: 1px solid #d5e4e9;
    background: #fffaf5;
  }

  .presentation-recording-panel .mic-row {
    gap: 8px;
  }

  .presentation-recording-panel .mic-button {
    flex: 1 1 150px;
    min-height: 46px;
  }

  .presentation-recording-panel .mic-clear-button {
    flex: 0 1 auto;
    min-height: 46px;
    padding-inline: 12px;
  }

  .presentation-recording-panel .mic-status {
    flex: 1 0 100%;
  }

  .presentation-timer {
    width: 100%;
    min-height: 54px;
    justify-content: space-between;
    margin: 0;
  }

  #transcript-input {
    min-height: 170px;
    max-height: 38vh;
    overflow-y: auto;
  }
}

@keyframes mic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.35);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(192, 57, 43, 0);
  }
}

.hatzaga-result {
  display: grid;
  gap: 22px;
}

.feedback-sections {
  display: grid;
  gap: 16px;
}

.context-section {
  border: 1px solid var(--kavana-border);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--kavana-soft-blue);
}

@media (min-width: 861px) {
  .hatzaga-body .conversation-sidebar {
    gap: 10px;
    padding: 13px;
  }
}

@media (max-width: 600px) {
  .hatzaga-body .hatzaga-panel-card {
    margin-top: 12px;
    padding: 14px;
  }

  .presentation-recording-panel {
    gap: 6px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .presentation-recording-panel .mic-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .presentation-recording-panel .mic-row > * {
    width: auto;
    min-width: 0;
    min-height: 44px;
  }

  .presentation-recording-panel .mic-button {
    min-width: 0;
    padding-inline: 12px;
  }

  .presentation-recording-panel .mic-clear-button {
    padding-inline: 10px;
    white-space: nowrap;
  }

  .presentation-recording-panel .mic-status {
    grid-column: 1 / -1;
    min-height: 1.2em;
  }

  .presentation-timer {
    min-height: 48px;
    padding: 7px 10px;
    gap: 8px;
  }

  .presentation-timer-label,
  .presentation-timer-reset {
    white-space: nowrap;
  }

  .presentation-timer-value {
    font-size: 2rem;
  }

  #transcript-input {
    min-height: 220px;
    max-height: 45vh;
    overflow-y: auto;
  }

  .context-section {
    background: #f8fbfc;
    padding: 9px 11px;
  }
}

.context-section summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--kavana-blue-dark);
}

.context-section .hatzaga-hint {
  margin-top: 6px;
}

.context-section label {
  display: block;
  margin-top: 10px;
}

.context-section input,
.context-section textarea,
.context-section select {
  width: 100%;
  border: 1px solid #a9c6d4;
  border-radius: 10px;
  padding: 9px 11px;
  background: white;
  margin-top: 4px;
}

.frame-body {
  margin-top: 8px;
  font-size: 0.92rem;
}

.frame-body p {
  margin: 6px 0 0;
}

.frame-body ul {
  margin: 6px 0 0;
  padding-inline-start: 20px;
}

.frame-body .frame-note {
  font-weight: 700;
  margin-top: 8px;
}

.frame-body .frame-empty {
  color: var(--kavana-muted);
}

.feedback-section {
  background: var(--kavana-soft-blue);
  border: 1px solid var(--kavana-border);
  border-radius: 14px;
  padding: 18px;
}

.feedback-section h2 {
  margin: 0 0 10px;
  color: var(--kavana-blue-dark);
  font-size: 1.15rem;
}

.feedback-body strong {
  display: block;
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--kavana-muted);
}

.feedback-body strong:first-child {
  margin-top: 0;
}

.feedback-body p {
  margin: 4px 0 0;
}

.feedback-summary {
  font-weight: 600;
  margin: 0 0 4px;
}

.axes-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.axes-list li {
  background: white;
  border: 1px solid var(--kavana-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.axis-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.points-list {
  margin: 6px 0 0;
  padding-inline-start: 20px;
}

.axis-map-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.axis-map-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: white;
  border: 1px solid var(--kavana-border);
  border-radius: 10px;
  padding: 8px 12px;
}

.axis-map-axis {
  font-weight: 700;
}

.axis-map-status {
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
  background: var(--kavana-soft-blue);
  color: var(--kavana-blue-dark);
}

.axis-map-status-not_observed,
.axis-map-status-insufficient_information {
  background: #f1f1f1;
  color: var(--kavana-muted);
}

.next-step-options {
  background: var(--kavana-soft-blue);
  border: 1px solid var(--kavana-border);
  border-radius: 14px;
  padding: 16px 18px;
}

.next-step-options:empty {
  display: none;
}

.next-step-heading {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--kavana-blue-dark);
}

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

.next-step-item {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  background: white;
  border: 1px solid var(--kavana-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.next-step-item span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.axis-evidence {
  color: var(--kavana-muted);
  font-size: 0.9rem;
}

.confidence-tag {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

.confidence-high {
  background: #e3f6e3;
  color: #1e6b1e;
}

.confidence-medium {
  background: #fff1d6;
  color: #8a5a00;
}

.confidence-low {
  background: #fde6e4;
  color: #a3241c;
}

#retry-button {
  justify-self: start;
}

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

.profile-area {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--kavana-border);
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-link-button {
  width: 100%;
  font-size: 0.85rem;
  padding: 8px 12px;
}

/* .google-auth-area / .google-authenticated-row / .google-authenticated-status
   moved to the shared public/styles.css (round 3: this identity area is
   app-wide, not presentation-specific). */

.claim-session-area {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.profile-link-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--kavana-border);
  border-radius: 12px;
  background: var(--kavana-soft-blue);
  text-align: center;
}

.profile-link-title {
  margin: 0;
  font-weight: 700;
}

.profile-link-hint {
  margin: 0;
  color: var(--kavana-muted);
  font-size: 0.82rem;
}

.profile-link-qr {
  display: flex;
  justify-content: center;
  min-height: 40px;
}

.profile-link-code {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--kavana-blue-dark);
}

.profile-link-expiry {
  margin: 0;
  font-size: 0.78rem;
  color: var(--kavana-muted);
}

.profile-link-divider {
  border: none;
  border-top: 1px solid var(--kavana-border);
  margin: 4px 0;
}

.profile-redeem-form {
  display: flex;
  gap: 8px;
}

.profile-redeem-form input {
  flex: 1;
  min-width: 0;
  text-align: center;
  text-transform: uppercase;
}

.profile-link-close {
  justify-self: center;
}

.feedback-rating {
  border: 1px solid var(--kavana-border);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--kavana-soft-blue);
  display: grid;
  gap: 8px;
}

.feedback-rating-question {
  margin: 0;
  font-weight: 700;
  color: var(--kavana-blue-dark);
}

.rating-stars {
  display: flex;
  gap: 4px;
}

.rating-star {
  border: none;
  background: none;
  padding: 4px;
  font-size: 1.6rem;
  line-height: 1;
  color: #c7d7de;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, transform 0.1s ease;
}

.rating-star:hover {
  color: var(--kavana-orange);
  transform: scale(1.08);
}

.rating-star:focus-visible {
  outline: 2px solid var(--kavana-blue-dark);
  outline-offset: 2px;
}

.rating-star.selected {
  color: var(--kavana-orange-dark);
}

.feedback-rating-status {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--kavana-muted);
}

.feedback-rating-status-saving {
  font-weight: 400;
  color: var(--kavana-muted);
}

.feedback-rating-status-success {
  color: #1e6b1e;
}

.feedback-rating-status-error {
  color: #a3241c;
}

.feedback-rating-comment-area {
  display: grid;
  gap: 6px;
}

.feedback-rating-comment-area label {
  font-weight: 700;
  font-size: 0.9rem;
}

.feedback-rating-comment-area textarea {
  width: 100%;
  border: 1px solid #a9c6d4;
  border-radius: 10px;
  padding: 9px 11px;
  background: white;
  resize: vertical;
}

.feedback-rating-comment-area button {
  justify-self: start;
}
.assignment-code-controls { display: flex; align-items: center; gap: 8px; }
.assignment-code-controls input { flex: 1; min-width: 0; }
@media (max-width: 600px) {
  .assignment-code-controls { align-items: stretch; flex-direction: column; }
  .assignment-code-controls .small-action { width: 100%; }
}
