/* إضافات السريرية فقط. الهوية والخطوط والأزرار من shared/lab.css. */
.clinical-main {
  max-width: 1160px;
  margin: auto;
  padding: 36px 24px 60px;
  min-height: 75vh;
}
.brand {
  text-decoration: none;
}
.clinical-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px var(--ink);
  background: var(--yellow);
  margin-bottom: 36px;
  overflow: hidden;
}
.clinical-hero > div {
  padding: 30px;
}
.clinical-hero h1 {
  font-size: clamp(30px, 5vw, 55px);
  line-height: 1.5;
  margin: 12px 0;
}
.comic-scene {
  position: relative;
  background: var(--blue);
  background-image: radial-gradient(#ffffff35 1px, transparent 1px);
  background-size: 8px 8px;
  min-height: 250px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.comic-scene svg {
  width: 100%;
  max-width: 350px;
  height: 230px;
}
.patient-figure {
  animation: patient-enter 0.6s ease-out both;
}
.speech-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  background: white;
  border: 2px solid var(--ink);
  padding: 8px 14px;
  transform: rotate(-4deg);
  box-shadow: 4px 4px var(--ink);
  font-weight: bold;
}
.topic-grid,
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 24px 0;
}
.topic-card,
.case-tile,
.panel {
  border: 2px solid var(--ink);
  background: #fffdf5;
  box-shadow: 5px 5px var(--ink);
  padding: 24px;
}
.topic-card:nth-child(2) {
  background: #dce7ff;
}
.topic-card h2 {
  font-size: 26px;
}
.case-tile {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform 0.15s;
}
.case-tile:hover {
  transform: translateY(-3px);
}
.case-tile strong {
  font-size: 22px;
}
.mode-bar,
.actions,
.session-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}
.mode-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mode-bar select {
  padding: 10px;
  border: 2px solid var(--ink);
  background: white;
  max-width: 100%;
}
.session-head {
  justify-content: space-between;
}
.session-head h1 {
  margin: 0;
  font-size: 28px;
}
.badge {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 5px 12px;
  font-weight: bold;
}
.session-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}
.patient-card .comic-scene {
  min-height: 170px;
}
.patient-card svg {
  height: 170px;
}
.patient-card h2 {
  margin: 15px 0 4px;
}
.conversation {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 430px;
  overflow: auto;
  padding: 16px 5px;
  margin: 15px 0;
}
.bubble {
  max-width: 90%;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px var(--ink);
  border-radius: 18px;
  line-height: 1.9;
}
.bubble.pharmacist {
  background: var(--blue);
  color: white;
  align-self: flex-start;
  border-bottom-right-radius: 0;
}
.bubble.patient {
  background: var(--yellow);
  align-self: flex-end;
  border-bottom-left-radius: 0;
}
.bubble.new {
  animation: bubble-in 0.3s ease-out;
}
.bubble b {
  display: block;
  font-size: 11px;
  opacity: 0.8;
}
.question-list {
  display: grid;
  gap: 10px;
}
.question-list button {
  padding: 12px;
  text-align: right;
  border: 2px solid var(--ink);
  background: white;
  line-height: 1.8;
}
.question-list button.asked {
  background: #e2ebde;
}
.hint,
.source-box {
  padding: 16px;
  border-right: 5px solid var(--blue);
  background: #e7edf9;
  line-height: 1.9;
  margin: 18px 0;
}
.source-box {
  background: #fff6cb;
  border-right-color: var(--ink);
}
.source-box p:last-child {
  margin-bottom: 0;
}
.source-box a {
  text-decoration: underline;
}
.decision-box {
  margin-top: 30px;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed #19212b55;
  line-height: 1.9;
}
.choice input {
  margin-top: 8px;
  accent-color: var(--blue);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.reason-list {
  margin-top: 20px;
}
.notice {
  line-height: 1.9;
  color: #47505b;
  font-size: 12px;
}
.error {
  color: #a5212b;
  font-weight: bold;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 25px 0;
}
.result-stat {
  border: 2px solid var(--ink);
  padding: 20px;
  text-align: center;
  background: white;
}
.result-stat b {
  display: block;
  font-size: 28px;
}
.result-score {
  font-size: 70px;
  font-weight: 900;
  line-height: 1.2;
}
.feedback {
  padding: 16px;
  border: 2px solid var(--ink);
  margin: 14px 0;
  background: #fff2ce;
  line-height: 2;
}
.feedback.good {
  background: #e0efdb;
}
.feedback.bad {
  background: #ffe2dd;
}
.review-dialogue {
  margin-top: 25px;
}
textarea {
  width: 100%;
  min-height: 90px;
  font: inherit;
  padding: 12px;
  border: 2px solid var(--ink);
  resize: vertical;
}
[hidden] {
  display: none !important;
}
@keyframes patient-enter {
  from {
    transform: translateX(-70px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes bubble-in {
  from {
    transform: translateY(10px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
@media (max-width: 760px) {
  .clinical-hero,
  .session-layout {
    grid-template-columns: 1fr;
  }
  .clinical-main {
    padding: 24px 18px 45px;
  }
  .clinical-hero > div {
    padding: 22px;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  .session-layout .patient-card {
    order: -1;
  }
  .result-stat {
    padding: 12px 5px;
  }
  .result-stat b {
    font-size: 21px;
  }
  .topbar nav {
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .bubble {
    max-width: 95%;
  }
  .mode-bar {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
