.tech-page {
  overflow: hidden;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: #2a2a31;
  color: var(--text);
  border: 1px solid #3a3a44;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.nav-btn:hover {
  background: #363641;
}

.tech-note {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  background: #0c0c0f;
}

.tech-statusbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #101015;
}

.audio-status {
  font-size: 12px;
  color: var(--muted);
}

.tech-layout {
  height: calc(100vh - 152px);
  overflow: auto;
  padding: 10px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px;
}

.tech-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tech-card.severity-warning {
  border-color: #8a6422;
  box-shadow: inset 0 0 0 1px rgba(210, 150, 50, 0.2);
}

.tech-card.severity-urgent {
  border-color: #b43a3a;
  box-shadow: inset 0 0 0 1px rgba(224, 86, 86, 0.35), 0 0 0 1px rgba(180, 58, 58, 0.35);
  animation: tech-urgent-pulse 1.4s ease-in-out infinite;
}

.tech-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: #14141a;
}

.tech-card-title {
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tech-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-btn {
  padding: 6px 10px;
  border: 1px solid #3b3b47;
  border-radius: 6px;
  background: #23232c;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.audio-btn:hover {
  background: #2f2f3b;
}

.audio-btn.active {
  background: #1f4f2c;
  border-color: #2a7e41;
}

.chat-btn.active {
  background: #8a6422;
}

.audio-pill {
  font-size: 11px;
  color: #9aa0aa;
  border: 1px solid #353543;
  border-radius: 999px;
  padding: 3px 8px;
}

.audio-pill.live {
  color: #8fe0a3;
  border-color: #346c45;
  background: rgba(52, 108, 69, 0.2);
}

.alert-pill {
  font-size: 11px;
  color: #cad0db;
  border: 1px solid #404553;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(40, 44, 56, 0.55);
}

.alert-pill.warning {
  color: #ffd9a1;
  border-color: #7a5a2f;
  background: rgba(130, 93, 37, 0.28);
}

.alert-pill.urgent {
  color: #ffc9c9;
  border-color: #8a2f2f;
  background: rgba(131, 41, 41, 0.32);
}

.player-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--border);
  background: #000;
}

.player-host {
  width: 100%;
  height: 100%;
}

.tech-cc-title {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #c6ccd5;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: #121218;
}

.tech-cc-box {
  flex: 1;
  min-height: 190px;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #0f0f14;
}

.tech-cc-placeholder {
  font-size: 12px;
  color: #8f95a3;
}

.tech-line {
  font-size: 12px;
  line-height: 1.35;
  color: #d7dbe2;
  padding: 6px 8px;
  border-radius: 8px;
  background: #1b1b24;
  border: 1px solid #252531;
  word-break: break-word;
}

.tech-line.alert {
  border-color: #7a3838;
  background: #2a1a1a;
}

.alert-word {
  color: #ff6f6f;
  font-weight: 700;
}

.tech-line-caption {
  border-color: #43598f;
  background: #1a2238;
}

.tech-line-chat {
  border-color: #534473;
  background: #201b2f;
}

.tech-line-time {
  color: #97a1b3;
}

.tech-line-user {
  color: #8fb0ff;
  font-weight: 700;
}

@keyframes tech-urgent-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(224, 86, 86, 0.3), 0 0 0 1px rgba(180, 58, 58, 0.25);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 120, 120, 0.65), 0 0 0 2px rgba(180, 58, 58, 0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tech-card.severity-urgent {
    animation: none;
  }
}

@media (max-width: 900px) {
  .tech-layout {
    height: calc(100vh - 180px);
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }
}
