.detail-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 16px;
  min-height: var(--tap-min);
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: none;
}

.dose-display {
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 12px 0;
  text-align: center;
}

.dose-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--blue);
}

.dose-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.score-result {
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}

.score-result-value {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
}

.score-result-label { font-size: 16px; font-weight: 600; margin-top: 6px; }
.score-result-interp { font-size: 14px; margin-top: 8px; opacity: 0.8; }

.score-result.low    { background: rgba(48,192,96,0.1);  border: 1px solid var(--green);  color: var(--green); }
.score-result.medium { background: rgba(240,160,48,0.1); border: 1px solid var(--yellow); color: var(--yellow); }
.score-result.high   { background: rgba(232,64,64,0.1);  border: 1px solid var(--red);    color: var(--red); }

.expandable-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 0;
  cursor: pointer;
  border-top: 1px solid var(--border);
}

.expandable-content { display: none; padding-bottom: 12px; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.expandable-content.open { display: block; }

.disclaimer {
  background: rgba(240,160,48,0.08);
  border: 1px solid rgba(240,160,48,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--yellow);
  margin: 12px 0;
  line-height: 1.5;
}

.protocol-step {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-dim);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content { flex: 1; }
.step-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.step-detail { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.patient-bar {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.patient-bar input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  min-height: 40px;
}

.recent-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.recent-strip::-webkit-scrollbar { display: none; }

.recent-chip {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.recent-chip:active {
  background: var(--bg-elevated);
  border-color: var(--blue-dim);
}

.placeholder-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}

.placeholder-icon {
  font-size: 48px;
  opacity: 0.5;
}

.placeholder-title {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.placeholder-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 280px;
}

.filter-pill {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-body);
}

.filter-pill:active { opacity: 0.7; }

.filter-pill-active {
  background: rgba(48,144,232,0.15);
  border-color: rgba(48,144,232,0.4);
  color: var(--blue);
}

.category-filters {
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar { display: none; }

.patient-bar select {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  min-height: 40px;
}

.score-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap-min);
  padding: 10px 14px;
  margin-bottom: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}

.score-option:active { opacity: 0.7; }

.score-option-selected {
  background: rgba(48,144,232,0.12);
  border-color: rgba(48,144,232,0.4);
  color: var(--blue);
}

.score-option-dot {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.score-option-selected .score-option-dot { color: var(--blue); }

.score-option-pts {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.score-option-selected .score-option-pts { color: var(--blue); }

.yesno-btn {
  min-height: var(--tap-min);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.yesno-btn:active { opacity: 0.7; }

.yesno-yes-active {
  background: rgba(232,64,64,0.12);
  border-color: rgba(232,64,64,0.4);
  color: var(--red);
}

.yesno-no-active {
  background: rgba(48,192,96,0.12);
  border-color: rgba(48,192,96,0.4);
  color: var(--green);
}

.resus-launch-btn {
  background: none;
  border: 1px solid rgba(232,64,64,0.3);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--red);
  cursor: pointer;
  letter-spacing: 0.05em;
  white-space: nowrap;
  min-height: 28px;
  -webkit-tap-highlight-color: transparent;
}

.resus-launch-btn:active { opacity: 0.7; }

.proto-reset-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  cursor: pointer;
  min-height: 32px;
  -webkit-tap-highlight-color: transparent;
}

.proto-reset-btn:active { opacity: 0.7; }

.proto-detail-step {
  border-left: 3px solid transparent;
  padding-left: 0;
  transition: border-color 0.2s, opacity 0.2s;
}

.proto-step-done {
  border-left-color: var(--green);
  opacity: 0.6;
}

.step-number-check {
  flex-shrink: 0;
}

.proto-check-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}

.proto-check-btn:active { opacity: 0.7; }

.proto-check-done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.proto-enter-resus-wrap {
  position: sticky;
  bottom: 0;
  padding: 16px 0;
  background: linear-gradient(transparent, var(--bg-primary) 30%);
  z-index: 5;
}

.code-picker-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  padding: 20px;
}

.code-picker-title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.code-picker-option {
  width: 100%;
  max-width: 320px;
  min-height: 64px;
  background: rgba(232,64,64,0.15);
  border: 1px solid rgba(232,64,64,0.4);
  border-radius: var(--radius-md);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.code-picker-option:active { opacity: 0.7; }

.code-picker-sepsis {
  background: rgba(240,160,48,0.15);
  border-color: rgba(240,160,48,0.4);
  color: var(--yellow);
}

.code-picker-stroke {
  background: rgba(232,64,64,0.15);
  border-color: rgba(232,64,64,0.4);
  color: var(--red);
}

.code-picker-trauma {
  background: rgba(232,64,64,0.15);
  border-color: rgba(232,64,64,0.4);
  color: var(--red);
}

.code-config-card {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  text-align: left;
  transition: all 0.2s;
  font-family: inherit;
}

.code-config-card.code-config-on {
  background: rgba(48,192,96,0.1);
  border-color: rgba(48,192,96,0.4);
  color: #fff;
}

.code-config-indicator {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  min-width: 32px;
  text-align: center;
}

.code-config-card.code-config-on .code-config-indicator {
  color: var(--green);
}

.trauma-tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  margin: 8px 0;
}

.trauma-tab {
  padding: 8px 4px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.trauma-tab-active {
  background: rgba(232,64,64,0.15);
  border-color: rgba(232,64,64,0.5);
  color: var(--red);
}

.trauma-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 40px;
}

.trauma-check-item.trauma-checked {
  border-left: 3px solid var(--green);
  padding-left: 8px;
}

.trauma-check-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.3);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.trauma-check-btn.trauma-check-done {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

.trauma-section-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--red);
  padding: 12px 0 6px;
  border-bottom: 1px solid rgba(232,64,64,0.2);
  margin-bottom: 4px;
}

.trauma-fast-option {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  margin: 2px;
  background: transparent;
  color: rgba(255,255,255,0.5);
}

.trauma-fast-option.fast-neg { background: rgba(48,192,96,0.15); border-color: rgba(48,192,96,0.3); color: var(--green); }
.trauma-fast-option.fast-pos { background: rgba(232,64,64,0.15); border-color: rgba(232,64,64,0.3); color: var(--red); }
.trauma-fast-option.fast-ind { background: rgba(240,160,48,0.15); border-color: rgba(240,160,48,0.3); color: var(--yellow); }

.mtp-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.mtp-counter-label {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}

.mtp-counter-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}

.mtp-counter-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.lethal-triad-box {
  border: 2px solid;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-top: 12px;
}

.lethal-triad-ok { border-color: var(--green); color: var(--green); }
.lethal-triad-warn { border-color: var(--red); color: var(--red); }

.code-picker-cancel {
  width: 100%;
  max-width: 320px;
  min-height: 64px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
}

.cd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.cd-header-left { flex: 1; min-width: 0; }

.cd-proto-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cd-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cd-total-time {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--yellow);
}

.cd-time-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  padding: 12px 20px;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

.cd-time-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.cd-end-code-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.cd-end-confirm {
  background: var(--yellow) !important;
  color: #000 !important;
  border-color: var(--yellow) !important;
}

.cd-exit-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
  min-width: 64px;
  -webkit-tap-highlight-color: transparent;
}

.cd-exit-confirm {
  background: var(--red) !important;
  color: #fff;
}

.cd-summary-overlay {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cd-summary-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.cd-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.cd-summary-label {
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
}

.cd-summary-val {
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
}

.cd-summary-divider {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 10px 0;
}

.cd-summary-log-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.cd-summary-log {
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.cd-summary-log-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.cd-summary-actions {
  flex-shrink: 0;
  padding-top: 8px;
}

.cd-timers-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.cd-timer-panel {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}

.cd-cpr-panel { border-color: rgba(232,64,64,0.3); }
.cd-epi-panel { border-color: rgba(48,144,232,0.3); }

.cd-timer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.cd-epi-label { color: rgba(48,144,232,0.7); }

.cd-timer-value {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.cd-epi-value { color: var(--blue); }

.cd-timer-alert { color: var(--red); }
.cd-timer-alert-blue { color: var(--blue); }

.cd-timer-alert-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  margin-top: 2px;
}

.cd-timer-controls {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  justify-content: center;
}

.cd-timer-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

.cd-btn {
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.1s;
  color: #fff;
}

.cd-btn:active { opacity: 0.7; }

.cd-btn-sm {
  font-size: 12px;
  padding: 8px 14px;
  min-height: 44px;
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.cd-btn-dim {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
}

.cd-btn-blue {
  background: rgba(48,144,232,0.2);
  color: var(--blue);
}

.cd-btn-full {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 12px;
  padding: 8px;
  min-height: 44px;
}

.cd-btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
}

.cd-btn-blue-fill {
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  min-height: 44px;
}

.cd-btn-danger { background: var(--red); color: #fff; }
.cd-btn-yellow { background: var(--yellow); color: #000; }
.cd-btn-gray { background: rgba(255,255,255,0.2); color: #fff; }

.cd-btn-rhythm {
  flex: 1;
  min-height: 64px;
  font-size: 11px;
  padding: 8px 4px;
  border-radius: var(--radius-md);
}

.cd-btn-rhythm-manual {
  display: block;
  width: 100%;
  min-height: 44px;
  background: rgba(232,64,64,0.1);
  border: 1px solid rgba(232,64,64,0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 6px;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.cd-rhythm-panel {
  background: rgba(232,64,64,0.08);
  border: 2px solid var(--red);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  text-align: center;
  flex-shrink: 0;
}

.cd-rhythm-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 10px;
}

.cd-rhythm-options {
  display: flex;
  gap: 8px;
}

.cd-step-panel {
  background: rgba(232,64,64,0.06);
  border: 1px solid rgba(232,64,64,0.2);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.cd-step-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.cd-step-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.cd-step-detail {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}

.cd-drug-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  margin-top: 4px;
}

.cd-drug-interval {
  color: rgba(255,255,255,0.4);
}

.cd-step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

.cd-collapsible {
  margin-bottom: 4px;
  flex-shrink: 0;
}

.cd-collapse-toggle {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}

.cd-ht-content {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 10px;
}

.cd-ht-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}

.cd-ht-columns {
  display: flex;
  gap: 8px;
}

.cd-ht-col { flex: 1; }

.cd-ht-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}

.cd-ht-item {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 3px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}

.cd-ht-active {
  background: rgba(240,160,48,0.15);
  border-color: rgba(240,160,48,0.4);
  color: var(--yellow);
}

.cd-log-content {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 10px;
}

.cd-log-entries {
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.cd-log-entry {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.cd-log-time {
  color: var(--yellow);
}

.cd-log-actions {
  display: flex;
  gap: 8px;
}

.cd-flash {
  animation: cdFlashRed 0.6s ease infinite alternate;
}

.cd-flash-blue {
  animation: cdFlashBlue 0.6s ease infinite alternate;
}

@keyframes cdFlashRed {
  from { opacity: 1; }
  to { opacity: 0.3; }
}

@keyframes cdFlashBlue {
  from { opacity: 1; }
  to { opacity: 0.3; }
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.onboarding-overlay.hidden { display: none; }

.onboarding-content {
  max-width: 400px;
  text-align: center;
}

.onboarding-icon {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
}

.onboarding-title {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.onboarding-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.onboarding-disclaimer {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.diff-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.diff-chip:active { opacity: 0.7; }

.diff-chip-active {
  background: rgba(48,144,232,0.15);
  border-color: var(--blue);
  color: var(--blue);
}

.diff-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.diff-type-active {
  background: rgba(48,144,232,0.15);
  border-color: var(--blue);
  color: var(--blue);
}

.diff-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: diffSpin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes diffSpin {
  to { transform: rotate(360deg); }
}

.tox-poison-btn {
  display: block;
  text-align: center;
  background: rgba(232,64,64,0.12);
  border: 2px solid var(--red);
  border-radius: var(--radius-md);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  padding: 14px;
  text-decoration: none;
  margin-bottom: 16px;
  min-height: 48px;
}

.tox-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 44px;
}

.tox-tab-active {
  background: rgba(48,144,232,0.15);
  border-color: var(--blue);
  color: var(--blue);
}

.flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.flag-btn:active { opacity: 0.7; }

.disclaimer {
  background: rgba(240,160,48,0.08);
  border: 1px solid rgba(240,160,48,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--yellow);
  line-height: 1.5;
}

.recent-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.recent-chip {
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.settings-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: badgePulse 1.5s ease infinite;
}

.settings-badge.hidden { display: none; }

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.install-instructions {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
}

.install-instructions-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.install-instructions-step {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.abx-playground-btn {
  display: block;
  width: 100%;
  min-height: 48px;
  background: rgba(48,144,232,0.12);
  border: 2px solid var(--blue);
  border-radius: var(--radius-md);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  margin-bottom: 16px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.abx-playground-btn:active { opacity: 0.7; }

.abx-card {
  transition: border-color 0.2s;
}

.abx-card-expanded {
  border-color: var(--blue-dim);
}

.abx-line-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 8px;
}

.abx-line-section {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 10px;
}

.abx-line-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.abx-expand-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 0 2px;
  margin-top: 10px;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.abx-expand-btn:active { opacity: 0.7; }

.abx-notes {
  background: rgba(240,160,48,0.06);
  border: 1px solid rgba(240,160,48,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--yellow);
  line-height: 1.5;
}

.bug-overlay {
  position: fixed;
  inset: 0;
  background: #0a0e14;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bug-overlay.hidden { display: none; }

.bug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.bug-progress {
  display: flex;
  gap: 6px;
  align-items: center;
}

.bug-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.bug-progress-dot.active {
  background: var(--blue);
}

.bug-progress-dot.completed {
  background: var(--green);
}

.bug-exit-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
}

.bug-back-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bug-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  -webkit-overflow-scrolling: touch;
}

.bug-question {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.3;
}

.bug-big-btn {
  display: block;
  width: 100%;
  min-height: 64px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 16px;
  -webkit-tap-highlight-color: transparent;
}

.bug-big-btn:active { opacity: 0.7; }

.bug-btn-green {
  background: rgba(48,192,96,0.15);
  border: 1px solid rgba(48,192,96,0.4);
  color: var(--green);
}

.bug-btn-yellow {
  background: rgba(240,160,48,0.15);
  border: 1px solid rgba(240,160,48,0.4);
  color: var(--yellow);
}

.bug-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bug-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
}

.bug-card:active {
  background: rgba(48,144,232,0.1);
  border-color: var(--blue);
}

.bug-organism-btn {
  display: block;
  width: 100%;
  min-height: 56px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 8px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

.bug-organism-btn:active {
  background: rgba(48,144,232,0.1);
  border-color: var(--blue);
}

.bug-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}

.bug-chip.selected {
  background: rgba(48,144,232,0.15);
  border-color: var(--blue);
  color: var(--blue);
}

.bug-chip:active { opacity: 0.7; }

.bug-result-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.bug-result-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.bug-result-drug {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--blue);
  line-height: 1.5;
}

.bug-coverage-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.bug-coverage-yes { color: var(--green); }
.bug-coverage-no { color: rgba(255,255,255,0.3); }

.bug-pearl {
  background: rgba(240,160,48,0.08);
  border: 1px solid rgba(240,160,48,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--yellow);
  line-height: 1.5;
  margin-top: 8px;
}

.bug-continue-btn {
  display: block;
  width: 100%;
  min-height: 56px;
  background: var(--blue);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  -webkit-tap-highlight-color: transparent;
}

.bug-continue-btn:active { opacity: 0.7; }

.bug-continue-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nihss-opt-btn {
  padding: 6px 10px;
  font-size: 11px;
  font-family: var(--font-body);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.nihss-opt-btn:active { opacity: 0.7; }
.nihss-opt-active {
  background: rgba(48,144,232,0.2);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}
.nihss-opt-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--blue);
  margin-right: 2px;
}

.quiz-answer-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.quiz-answer-btn:active { opacity: 0.7; }
.quiz-answer-correct {
  background: rgba(80,200,120,0.15);
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
.quiz-answer-wrong {
  background: rgba(232,64,64,0.15);
  border-color: var(--red);
  color: var(--red);
}
.quiz-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.quiz-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-family: var(--font-mono);
}
.quiz-score-num {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}
.quiz-score-denom {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}
