/* ================================================================
   u-show FILM PRODUCTION SYSTEM — Main Stylesheet
   Dark cinematic theme: Deep navy/black + gold + subtle blue
================================================================ */

:root {
  --gold: #c9a84c;
  --gold-light: #e8cc80;
  --gold-dark: #8b6914;
  --bg-deep: #04060a;
  --bg-dark: #080c12;
  --bg-panel: rgba(8,12,20,0.85);
  --bg-card: rgba(12,16,26,0.92);
  --border-gold: rgba(201,168,76,0.35);
  --border-dim: rgba(255,255,255,0.08);
  --text-primary: #e8dfc8;
  --text-secondary: rgba(232,223,200,0.65);
  --text-dim: rgba(232,223,200,0.35);
  --green: #4caf84;
  --blue: #4488dd;
  --orange: #e8a030;
  --red: #dd4444;
  --cyan: #44c8c8;
  --font-title: 'Cinzel', serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-gold: 0 0 20px rgba(201,168,76,0.2), 0 0 40px rgba(201,168,76,0.08);
  --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  font-family: var(--font-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ================================================================
   SCREENS
================================================================ */
.screen {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  overflow: hidden;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
}
.screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ================================================================
   SCREEN 0: MOVING (VIDEO)
================================================================ */
#screen-moving {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#intro-video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
  pointer-events: none;
}
.skip-hint {
  position: absolute;
  bottom: 32px;
  right: 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(201,168,76,0.7);
  letter-spacing: 0.1em;
  animation: pulse-opacity 2s ease-in-out infinite;
}
@keyframes pulse-opacity {
  0%,100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ================================================================
   SCREEN 1: CHAT
================================================================ */
#screen-chat {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-bg {
  position: absolute;
  inset: 0;
  background:
    url('https://images.unsplash.com/photo-1518020382113-a7e8fc38eac9?w=1920&q=80') center/cover no-repeat;
  filter: brightness(0.35) saturate(0.6);
}
.chat-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(4,6,10,0.7) 0%,
    rgba(12,20,36,0.5) 50%,
    rgba(4,6,10,0.8) 100%
  );
}

/* System init bar */
.system-bar {
  position: absolute;
  top: 20px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}
.system-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  opacity: 0.8;
}
.system-progress-bar {
  width: 160px;
  height: 3px;
  background: rgba(201,168,76,0.2);
  border-radius: 2px;
}
.system-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(to right, var(--gold-dark), var(--gold));
  border-radius: 2px;
  animation: init-progress 2s ease forwards 0.5s;
}
@keyframes init-progress {
  to { width: 80%; }
}

/* Headline top-left */
.headline-top {
  position: absolute;
  top: 60px;
  left: 24px;
  z-index: 10;
}
.headline-main {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}
.headline-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 0.08em;
}

/* Side panels */
.side-panels {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}
.left-panels { left: 20px; }
.right-panels { right: 20px; }

.info-panel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-width: 180px;
  max-width: 200px;
  backdrop-filter: blur(12px);
  transition: transform var(--transition), border-color var(--transition);
}
.info-panel:hover {
  border-color: var(--gold);
  transform: translateX(3px);
}
.right-panels .info-panel:hover {
  transform: translateX(-3px);
}
.panel-icon { font-size: 18px; opacity: 0.8; }
.panel-content { flex: 1; }
.panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.panel-sub {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}
.panel-value {
  font-size: 13px;
  color: var(--text-primary);
  margin-top: 3px;
}
.panel-value.gold { color: var(--gold); }
.panel-value.large { font-size: 22px; font-weight: 700; }
.panel-trend {
  font-size: 10px;
  color: var(--green);
  margin-top: 3px;
}

/* Center chat area */
.chat-center {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 440px;
}

.logo-area { text-align: center; }
.logo-main {
  font-family: 'Cinzel', serif;
  font-size: 52px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-shadow: 0 0 30px rgba(201,168,76,0.5), 0 0 60px rgba(201,168,76,0.2);
  line-height: 1;
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.4em;
  margin-top: 6px;
}

.chat-window {
  width: 100%;
  background: rgba(8,12,20,0.88);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-gold), 0 20px 60px rgba(0,0,0,0.5);
}

.chat-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-gold) transparent;
}
.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chat-msg.user { flex-direction: row-reverse; }
.agent-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid var(--border-gold);
  background: rgba(201,168,76,0.1);
}
.msg-body { max-width: 78%; }
.agent-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 3px;
}
.phoenix-name { color: var(--gold); }
.user-name { color: var(--text-secondary); text-align: right; display: block; }
.msg-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dim);
}
.chat-msg.agent .msg-text { border-left: 2px solid var(--gold); }
.chat-msg.user .msg-text { border-right: 2px solid var(--blue); text-align: right; }
.msg-time {
  font-size: 10px;
  color: var(--text-dim);
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
}

.chat-input-area {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border-gold);
  padding: 10px 14px;
  gap: 8px;
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  placeholder-color: var(--text-dim);
}
.chat-input::placeholder { color: var(--text-dim); }
.chat-send-btn {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  color: var(--bg-deep);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(201,168,76,0.5);
}

.dot-nav {
  display: flex; gap: 8px; align-items: center;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(201,168,76,0.3);
  transition: background var(--transition), transform var(--transition);
}
.dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

.welcome-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--text-dim);
}

.proceed-btn {
  background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.05));
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: 10px 28px;
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
}
.proceed-btn:hover {
  background: linear-gradient(135deg, rgba(201,168,76,0.3), rgba(201,168,76,0.1));
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

/* ================================================================
   SCREEN 2: FILM DOCK
================================================================ */
#screen-dock {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dock-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1504701954957-2010ec3bcec1?w=1920&q=80') center/cover no-repeat;
  filter: brightness(0.15) saturate(0.4);
}
.dock-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(4,6,10,0.95) 0%,
    rgba(8,12,20,0.8) 50%,
    rgba(4,6,10,0.95) 100%
  );
}

/* Header */
.dock-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-gold);
  background: rgba(4,6,10,0.9);
  flex-shrink: 0;
}
.dock-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.dock-logo-icon { font-size: 24px; }
.dock-logo-text { font-family: var(--font-title); font-size: 20px; color: var(--gold); }
.dock-logo-sub { font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); letter-spacing: 0.3em; }

.dock-title-center { text-align: center; }
.dock-title {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-shadow: var(--shadow-gold);
}
.dock-title-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.dock-title-en { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); letter-spacing: 0.2em; }

.dock-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dock-datetime { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.dock-user { display: flex; align-items: center; gap: 8px; }
.dock-user-icon { font-size: 20px; }
.dock-user-role { font-size: 10px; color: var(--text-dim); }
.dock-user-name { font-size: 13px; color: var(--gold); font-weight: 500; }

/* Summary bar */
.dock-summary {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(4,6,10,0.85);
  flex-shrink: 0;
}
.summary-item { display: flex; align-items: center; gap: 8px; }
.summary-icon { font-size: 14px; color: var(--gold); }
.summary-val { font-size: 22px; font-weight: 700; color: var(--gold); font-family: var(--font-title); }
.summary-lbl { font-size: 9px; color: var(--text-dim); line-height: 1.4; }

/* Nav row */
.dock-nav-row {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 24px 8px 200px;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(8,12,20,0.8);
  flex-shrink: 0;
}
.dock-tabs { display: flex; gap: 4px; }
.dock-tab {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  transition: all var(--transition);
}
.dock-tab small { color: var(--text-dim); font-size: 9px; letter-spacing: 0.1em; }
.dock-tab.active, .dock-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.1);
}

.dock-search-area { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dock-search {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 6px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  outline: none;
  width: 200px;
  transition: border-color var(--transition);
}
.dock-search:focus { border-color: var(--gold); }
.dock-search::placeholder { color: var(--text-dim); }
.view-toggle {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}
.view-toggle.active, .view-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.dock-sort {
  background: rgba(8,12,20,0.9);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
}

/* Quick access sidebar */
.dock-quick-access {
  position: absolute;
  left: 0;
  top: 110px;
  bottom: 80px;
  width: 180px;
  background: rgba(4,6,10,0.92);
  border-right: 1px solid var(--border-gold);
  padding: 16px 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qa-title {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.3em;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-dim);
}
.qa-btn {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.qa-btn small { font-size: 9px; color: var(--text-dim); display: block; }
.qa-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.05); }
.qa-btn.danger:hover { border-color: var(--red); color: var(--red); background: rgba(221,68,68,0.05); }

/* Main content */
.dock-main {
  position: relative;
  z-index: 10;
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 16px 196px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-gold) transparent;
}

.project-section { margin-bottom: 24px; }
.section-title {
  font-family: var(--font-title);
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-en {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  font-weight: normal;
}

.projects-grid {
  display: grid;
  gap: 12px;
}
.active-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
.dev-grid { grid-template-columns: repeat(4, 1fr); }
.archive-grid { grid-template-columns: repeat(4, 1fr); }

/* Project cards */
.project-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-dim);
  transition: all var(--transition);
  min-height: 140px;
}
.project-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px rgba(201,168,76,0.1);
}
.featured { min-height: 160px; }
.card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.project-card:hover .card-bg { transform: scale(1.05); }
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,6,10,0.95) 0%, rgba(4,6,10,0.5) 60%, rgba(4,6,10,0.2) 100%);
}
.dark-overlay {
  background: linear-gradient(to top, rgba(4,6,10,0.98) 0%, rgba(4,6,10,0.8) 100%);
}
.card-content {
  position: relative;
  z-index: 2;
  padding: 10px 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--gold);
  color: var(--bg-deep);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 2px;
  z-index: 3;
}
.card-star {
  margin-left: auto;
  color: var(--gold);
  font-size: 14px;
}
.card-header { display: flex; align-items: flex-start; }
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.card-title-en {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.card-meta { font-size: 10px; color: var(--text-dim); margin-top: 3px; }
.card-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.card-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.card-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold-dark), var(--gold));
  border-radius: 2px;
}
.card-progress-pct {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 20px;
}
.dev-tag { border-color: rgba(68,136,221,0.4); color: var(--blue); }
.dev-phase {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}
.dev-phase span { color: var(--cyan); }
.archive-badge {
  display: inline-block;
  background: rgba(100,100,100,0.2);
  border: 1px solid rgba(100,100,100,0.4);
  color: rgba(200,200,200,0.5);
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 6px;
}

/* Production River */
.production-river {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px 8px 196px;
  background: rgba(4,6,10,0.92);
  border-top: 1px solid var(--border-gold);
  flex-shrink: 0;
  height: 70px;
}
.cockpit-river { padding-left: 16px; }
.river-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  white-space: nowrap;
  min-width: 120px;
}
.river-stages {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0;
}
.river-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  flex-shrink: 0;
}
.stage-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.2);
}
.stage-dot.completed { background: var(--gold); border-color: var(--gold-light); }
.stage-dot.active {
  background: var(--gold);
  border-color: var(--gold-light);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse-dot 1.5s ease infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 4px var(--gold); }
  50% { box-shadow: 0 0 12px var(--gold), 0 0 20px rgba(201,168,76,0.3); }
}
.stage-name {
  font-size: 9px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}
.stage-pct { font-family: var(--font-mono); font-size: 9px; color: var(--gold); }
.river-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 0 4px;
  margin-bottom: 16px;
}
.river-line.completed { background: var(--gold); }
.river-line.active { background: linear-gradient(to right, var(--gold), rgba(201,168,76,0.3)); }
.river-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: 16px;
}

/* ================================================================
   SCREEN 3: PRODUCER COCKPIT
================================================================ */
#screen-cockpit {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cockpit-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1504701954957-2010ec3bcec1?w=1920&q=80') center/cover no-repeat;
  filter: brightness(0.08) saturate(0.3);
}
.cockpit-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(4,6,10,0.97) 0%,
    rgba(8,12,20,0.85) 100%
  );
}

/* Cockpit header */
.cockpit-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-gold);
  background: rgba(4,6,10,0.95);
  flex-shrink: 0;
}
.cockpit-logo { display: flex; align-items: center; gap: 8px; }
.cockpit-logo-icon { font-size: 20px; }
.cockpit-logo-text { font-family: var(--font-title); font-size: 16px; color: var(--gold); }
.cockpit-logo-sub { font-family: var(--font-mono); font-size: 7px; color: var(--text-dim); letter-spacing: 0.2em; }
.cockpit-meta-items {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}
.cockpit-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  border-left: 1px solid var(--border-dim);
}
.cockpit-meta:first-child { border-left: none; }
.cm-label { font-size: 9px; color: var(--text-dim); letter-spacing: 0.05em; }
.cm-value { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.cm-value.gold { color: var(--gold); }
.cm-arrow { font-size: 10px; color: var(--text-dim); }
.risk-mid { color: var(--orange); }
.cockpit-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cockpit-datetime { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.cockpit-user { display: flex; align-items: center; gap: 6px; }
.cockpit-user-role { font-size: 9px; color: var(--text-dim); }
.cockpit-user-name { font-size: 12px; color: var(--gold); }

/* Cockpit body: 3 columns */
.cockpit-body {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 300px 1fr 320px;
  flex: 1;
  overflow: hidden;
  gap: 0;
}

/* LEFT column */
.cockpit-left {
  border-right: 1px solid var(--border-gold);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-gold) transparent;
  background: rgba(4,6,10,0.6);
}
.producer-cockpit-label {
  font-family: var(--font-title);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-align: center;
  padding: 6px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  background: rgba(201,168,76,0.05);
}
.cockpit-circle-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.cockpit-circle {
  position: relative;
  width: 160px; height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.circle-ring {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.circle-art {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, rgba(4,6,10,0.9) 70%);
  border: 2px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.circle-inner-img { font-size: 48px; filter: sepia(1) brightness(0.8); }

.cockpit-stats { display: flex; gap: 12px; justify-content: center; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-label { font-size: 9px; color: var(--text-dim); text-align: center; line-height: 1.3; }
.stat-ring-wrap {
  position: relative;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.stat-ring {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.stat-val {
  font-family: var(--font-title);
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  position: relative;
  z-index: 2;
}
.stat-val.green { color: var(--green); }

.ai-risk-label {
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  padding: 8px;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}
.ai-risk-val {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--orange);
  font-weight: 700;
  margin-top: 4px;
}

/* Gauges */
.cockpit-gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gauge-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.gauge-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.05em;
}
.gauge-circle {
  position: relative;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.gauge-circle svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-135deg);
}
.gauge-val {
  font-family: var(--font-title);
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  position: relative;
  z-index: 2;
}
.gauge-val.orange { color: var(--orange); }
.gauge-val.blue { color: var(--blue); }
.gauge-val.green { color: var(--green); }
.gauge-val.dim { color: var(--text-dim); }
.gauge-sub { font-size: 8px; color: var(--text-dim); text-align: center; line-height: 1.4; }
.link-text { color: var(--gold); cursor: pointer; text-decoration: underline; }

/* CENTER column */
.cockpit-center {
  border-right: 1px solid var(--border-dim);
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-gold) transparent;
}
.dept-list { display: flex; flex-direction: column; gap: 8px; }
.dept-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}
.dept-item:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.05);
}
.dept-fish { font-size: 20px; filter: sepia(1) hue-rotate(5deg) brightness(0.9); }
.dept-info { flex: 1; }
.dept-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.dept-name small { font-size: 10px; color: var(--text-dim); margin-left: 6px; }
.dept-bar-wrap { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.dept-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.dept-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold-dark), var(--gold));
  border-radius: 2px;
}
.dept-bar-fill.warning {
  background: linear-gradient(to right, #a03020, var(--red));
}
.dept-pct { font-size: 10px; color: var(--text-secondary); white-space: nowrap; }
.dept-pct.warning-text { color: var(--red); }
.dept-arrow {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--gold);
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.dept-item:hover .dept-arrow {
  background: var(--gold);
  color: var(--bg-deep);
}

/* RIGHT column */
.cockpit-right {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-gold) transparent;
  background: rgba(4,6,10,0.6);
}
.agent-dock-title {
  font-family: var(--font-title);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.2em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-gold);
}
.agent-list { display: flex; flex-direction: column; gap: 6px; }
.agent-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}
.agent-card:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.05);
}
.agent-card.thinking {
  border-color: rgba(68,136,221,0.4);
  background: rgba(68,136,221,0.03);
}
.agent-bird-icon {
  font-size: 22px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border-gold);
  flex-shrink: 0;
}
.agent-info { flex: 1; min-width: 0; }
.agent-name-row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.agent-jp-name { font-size: 12px; font-weight: 700; color: var(--gold); }
.agent-status {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: var(--font-mono);
}
.agent-status.waiting {
  background: rgba(76,175,132,0.15);
  color: var(--green);
  border: 1px solid rgba(76,175,132,0.3);
}
.agent-status.thinking {
  background: rgba(68,136,221,0.15);
  color: var(--blue);
  border: 1px solid rgba(68,136,221,0.3);
  animation: thinking-pulse 1s ease infinite;
}
@keyframes thinking-pulse {
  0%,100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.agent-role { font-size: 9px; color: var(--text-dim); margin-top: 2px; line-height: 1.4; }
.agent-bar-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.agent-bar {
  flex: 1; height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden;
}
.agent-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold-dark), var(--gold));
}
.agent-pct { font-size: 10px; color: var(--text-secondary); white-space: nowrap; }

/* Producer log */
.producer-log {
  margin-top: auto;
  background: rgba(8,12,20,0.8);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 10px;
}
.log-header {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.log-more { color: var(--text-dim); cursor: pointer; font-size: 9px; }
.log-more:hover { color: var(--gold); }
.log-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-dim);
  font-size: 10px;
  line-height: 1.4;
}
.log-item:last-child { border-bottom: none; }
.log-time { color: var(--text-dim); font-family: var(--font-mono); white-space: nowrap; flex-shrink: 0; }
.log-icon { flex-shrink: 0; }
.log-item.risk .log-icon { color: var(--orange); }
.log-item.info .log-icon { color: var(--blue); }
.log-item.success .log-icon { color: var(--green); }
.log-text { color: var(--text-secondary); }

/* ================================================================
   MODALS
================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,6,10,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { border-color: var(--gold); color: var(--gold); }

/* Department modal */
.dept-modal {
  position: relative;
  background: rgba(8,12,20,0.98);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-gold), 0 30px 80px rgba(0,0,0,0.7);
}
.dept-modal-title {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-gold);
}
.dept-modal-content { color: var(--text-secondary); font-size: 14px; line-height: 1.8; }
.dept-data-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.dept-data-table th, .dept-data-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-dim);
  text-align: left;
  font-size: 13px;
}
.dept-data-table th { background: rgba(201,168,76,0.08); color: var(--gold); }
.dept-data-table td { color: var(--text-secondary); }
.dept-textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 12px;
  resize: vertical;
  min-height: 120px;
  margin-top: 12px;
  outline: none;
}
.dept-textarea:focus { border-color: var(--gold); }
.dept-save-btn {
  margin-top: 12px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  color: var(--bg-deep);
  padding: 8px 24px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.dept-save-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }

/* Agent modal */
.agent-modal {
  position: relative;
  background: rgba(8,12,20,0.98);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-gold), 0 30px 80px rgba(0,0,0,0.7);
  overflow: hidden;
}
.agent-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-gold);
  background: rgba(201,168,76,0.05);
}
.agent-modal-icon { font-size: 36px; }
.agent-modal-name { font-family: var(--font-title); font-size: 20px; color: var(--gold); }
.agent-modal-role { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
.agent-modal-status { margin-left: auto; }
.agent-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-gold) transparent;
  min-height: 200px;
  max-height: 350px;
}
.agent-chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-gold);
}

/* ================================================================
   SCROLLBARS
================================================================ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.6); }

/* ================================================================
   UTILITY
================================================================ */
.gold { color: var(--gold); }
.green { color: var(--green); }
.orange { color: var(--orange); }
.blue { color: var(--blue); }

/* Screen transition overlay */
#transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
#transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Animated scan line */
.gold-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0;
  animation: scan-line 3s ease-in-out infinite;
}
@keyframes scan-line {
  0% { opacity: 0; top: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { opacity: 0; top: 100%; }
}

/* Cockpit dept fish bounce anim */
.dept-fish {
  animation: fish-bob 3s ease-in-out infinite;
}
.dept-item:nth-child(2) .dept-fish { animation-delay: 0.3s; }
.dept-item:nth-child(3) .dept-fish { animation-delay: 0.6s; }
.dept-item:nth-child(4) .dept-fish { animation-delay: 0.9s; }
.dept-item:nth-child(5) .dept-fish { animation-delay: 1.2s; }
.dept-item:nth-child(6) .dept-fish { animation-delay: 1.5s; }
.dept-item:nth-child(7) .dept-fish { animation-delay: 1.8s; }
.dept-item:nth-child(8) .dept-fish { animation-delay: 2.1s; }
@keyframes fish-bob {
  0%, 100% { transform: translateY(0) scaleX(1); }
  50% { transform: translateY(-3px) scaleX(1.05); }
}

/* Agent bird hover glow */
.agent-bird-icon.phoenix { background: rgba(201,168,76,0.15); border-color: rgba(201,168,76,0.5); }
.agent-bird-icon.falcon { background: rgba(68,200,200,0.1); border-color: rgba(68,200,200,0.4); }
.agent-bird-icon.raven { background: rgba(100,80,180,0.1); border-color: rgba(100,80,180,0.4); }
.agent-bird-icon.hawkeye { background: rgba(68,136,221,0.1); border-color: rgba(68,136,221,0.5); }
.agent-bird-icon.condor { background: rgba(201,168,76,0.12); border-color: rgba(201,168,76,0.4); }
.agent-bird-icon.mockingbird { background: rgba(76,175,132,0.1); border-color: rgba(76,175,132,0.4); }
.agent-bird-icon.owl { background: rgba(150,120,200,0.1); border-color: rgba(150,120,200,0.4); }
.agent-bird-icon.osprey { background: rgba(232,160,48,0.1); border-color: rgba(232,160,48,0.4); }

/* Gold shimmer on logo */
@keyframes gold-shimmer {
  0% { text-shadow: 0 0 20px rgba(201,168,76,0.4); }
  50% { text-shadow: 0 0 40px rgba(201,168,76,0.7), 0 0 80px rgba(201,168,76,0.2); }
  100% { text-shadow: 0 0 20px rgba(201,168,76,0.4); }
}
.logo-main { animation: gold-shimmer 4s ease-in-out infinite; }

/* Featured card larger image */
.project-card.featured .card-bg {
  background-size: cover;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
  .cockpit-body { grid-template-columns: 260px 1fr 280px; }
  .active-grid { grid-template-columns: 1.8fr 1fr 1fr 1fr; }
}
@media (max-width: 1200px) {
  .cockpit-body { grid-template-columns: 240px 1fr 260px; }
  .dock-nav-row { padding-left: 190px; }
}

/* Glowing border on hover for project cards */
.project-card.featured:hover {
  box-shadow: 0 0 30px rgba(201,168,76,0.2), 0 12px 40px rgba(0,0,0,0.6);
}

/* DEV and archive cards minimal height */
.dev-card, .archive-card { min-height: 120px; }

/* Toast */
#toast {
  font-family: var(--font-body);
  letter-spacing: 0.05em;
  pointer-events: none;
}

/* Cockpit production river override */
.cockpit-river {
  height: 60px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Screen 1 animation entrance */
.screen#screen-chat.active .info-panel {
  animation: slide-in-panel 0.5s ease forwards;
}
.left-panels .info-panel:nth-child(1) { animation-delay: 0.1s; }
.left-panels .info-panel:nth-child(2) { animation-delay: 0.2s; }
.left-panels .info-panel:nth-child(3) { animation-delay: 0.3s; }
.right-panels .info-panel:nth-child(1) { animation-delay: 0.15s; }
.right-panels .info-panel:nth-child(2) { animation-delay: 0.25s; }
.right-panels .info-panel:nth-child(3) { animation-delay: 0.35s; }
@keyframes slide-in-panel {
  from { opacity: 0; transform: translateX(var(--slide-dir, -20px)); }
  to { opacity: 1; transform: translateX(0); }
}
.right-panels .info-panel {
  --slide-dir: 20px;
}

/* Screen enter animation for main elements */
.screen.active .chat-center {
  animation: fade-up 0.6s ease forwards;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

