:root {
  --bg-0: #0a0a0f;
  --bg-1: #080914;
  --bg-2: #0f1322;
  --ink: #f5f7ff;
  --accent-1: #667eea;
  --accent-2: #764ba2;
  --accent-3: #f093fb;
  --accent-4: #4ade80;
  --accent-5: #38bdf8;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 900px at 50% -10%, rgba(102,126,234,.18), transparent 55%),
    radial-gradient(900px 700px at 15% 110%, rgba(240,147,251,.14), transparent 60%),
    radial-gradient(800px 700px at 85% 110%, rgba(56,189,248,.12), transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 40%, var(--bg-2));
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* Interactive hitbox (easter egg - full area clickable) */
#attractor-hitbox {
  position: fixed;
  inset: 0;
  z-index: 8;
  cursor: pointer;
}

/* Subtle pulse glow at butterfly saddle point */
.saddle-pulse {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102,126,234,0.25) 0%, rgba(118,75,162,0.15) 40%, transparent 70%);
  animation: saddlePulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes saddlePulse {
  0%, 100% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

#stars { opacity: 0.85; }
#attractor { opacity: 1; }
#fx { opacity: 1; }
#bloom {
  mix-blend-mode: screen;
  opacity: 0.80;
  filter: saturate(1.12) contrast(1.04);
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

/* Header bar with logo flanked by platform icons */
.header-bar {
  position: absolute;
  top: clamp(14px, 2.5vw, 28px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-start;
  gap: clamp(16px, 3vw, 80px);
  padding: 0 clamp(12px, 3vw, 60px);
  pointer-events: auto;
}

.header-platforms {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 20px);
  padding-top: 4px;
  pointer-events: auto;
}

.header-platforms:first-child {
  justify-self: end;
}

.header-platforms:last-child {
  justify-self: start;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.2vh, 14px);
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.55));
}

.logo {
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow:
    0 10px 30px rgba(0,0,0,0.65),
    0 0 24px rgba(102,126,234,0.35);
  line-height: 1.15;
  user-select: none;
  white-space: nowrap;
}

.logo span {
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-size: clamp(0.55rem, 1.1vw, 0.75rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.60);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  user-select: none;
}

.coming-soon-badge {
  margin-top: clamp(6px, 1vh, 10px);
  padding: 4px 12px;
  font-size: clamp(0.45rem, 0.8vw, 0.55rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  user-select: none;
}

/* Platform Icons */
.platform-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0.6;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
  cursor: default;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: auto;
}

.platform-icon:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.platform-icon:focus {
  opacity: 1;
  outline: 2px solid var(--accent-1);
  outline-offset: 4px;
  border-radius: 4px;
}

.platform-icon svg,
.platform-icon img {
  width: clamp(18px, 2.2vw, 26px);
  height: clamp(18px, 2.2vw, 26px);
  display: block;
  filter: grayscale(1) brightness(0.92) contrast(1.05);
  transition: filter 0.3s ease;
}

.platform-icon svg {
  fill: currentColor;
}

.platform-icon:hover svg,
.platform-icon:hover img {
  filter: none;
}

.platform-icon span {
  font-size: clamp(7px, 0.8vw, 9px);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.3s ease;
}

.platform-icon:hover span {
  color: rgba(255, 255, 255, 0.7);
}

.platform-google:hover { color: #34a853; }
.platform-teams:hover { color: #6264a7; }
.platform-slack:hover { color: #611f69; }
.platform-discord:hover { color: #5865f2; }

/* Chat Panels */
.chat-panel {
  position: absolute;
  width: clamp(180px, 22vw, 280px);
  height: clamp(160px, 28vh, 260px);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15, 19, 34, 0.75), rgba(10, 10, 15, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.40),
    0 0 40px rgba(102, 126, 234, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.chat-panel-plan {
  top: clamp(100px, 14vh, 170px);
  left: calc(50% - clamp(240px, 24vw, 380px));
  transform: translateX(-50%);
}

.chat-panel-edit {
  top: clamp(100px, 14vh, 170px);
  left: calc(50% + clamp(240px, 24vw, 380px));
  transform: translateX(-50%);
}

.chat-panel-review {
  bottom: clamp(40px, 12vh, 140px);
  left: calc(50% - clamp(200px, 20vw, 320px));
  transform: translateX(-50%);
}

.chat-panel-judge {
  bottom: clamp(40px, 12vh, 140px);
  left: calc(50% + clamp(200px, 20vw, 320px));
  transform: translateX(-50%);
}

.panel-header {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-header .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.panel-plan .dot { background: var(--accent-3); box-shadow: 0 0 8px var(--accent-3); }
.panel-edit .dot { background: var(--accent-1); box-shadow: 0 0 8px var(--accent-1); }
.panel-review .dot { background: var(--accent-4); box-shadow: 0 0 8px var(--accent-4); }
.panel-judge .dot { background: var(--accent-5); box-shadow: 0 0 8px var(--accent-5); }

.panel-messages {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  overflow: hidden;
}

.panel-msg {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.panel-msg-req {
  color: rgba(255, 255, 255, 0.70);
  font-style: italic;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.panel-msg-resp {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}

.panel-plan .panel-msg-resp {
  border-left: 2px solid var(--accent-3);
}

.panel-edit .panel-msg-resp {
  border-left: 2px solid var(--accent-1);
}

.panel-review .panel-msg-resp {
  border-left: 2px solid var(--accent-4);
}

.panel-judge .panel-msg-resp {
  border-left: 2px solid var(--accent-5);
}

.panel-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

.panel-msg.fading {
  opacity: 0;
  transform: translateY(-4px);
}

/* Overlays */
.grain {
  position: fixed;
  inset: -50px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  opacity: 0.10;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 20;
  animation: grain 9s steps(8) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -3%); }
  20% { transform: translate(3%, 1%); }
  30% { transform: translate(-1%, 4%); }
  40% { transform: translate(4%, -2%); }
  50% { transform: translate(-3%, 2%); }
  60% { transform: translate(2%, -4%); }
  70% { transform: translate(-4%, 3%); }
  80% { transform: translate(1%, -1%); }
  90% { transform: translate(3%, 4%); }
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  background:
    radial-gradient(1100px 800px at 50% 45%, transparent 50%, rgba(0, 0, 0, 0.45) 100%);
}

@media (max-width: 900px) {
  .chat-panel {
    width: clamp(150px, 44vw, 220px);
    height: clamp(120px, 22vh, 180px);
  }
  .chat-panel-plan {
    top: clamp(80px, 14vh, 130px);
    left: clamp(10px, 5vw, 32px);
    right: auto;
    transform: none;
  }
  .chat-panel-edit {
    top: clamp(80px, 14vh, 130px);
    right: clamp(10px, 5vw, 32px);
    left: auto;
    transform: none;
  }
  .chat-panel-review {
    bottom: clamp(56px, 14vh, 100px);
    left: clamp(10px, 5vw, 32px);
    right: auto;
    transform: none;
  }
  .chat-panel-judge {
    bottom: clamp(56px, 14vh, 100px);
    right: clamp(10px, 5vw, 32px);
    left: auto;
    transform: none;
  }
  .header-bar {
    gap: clamp(16px, 4vw, 40px);
    padding: 0 clamp(12px, 3vw, 40px);
  }
  .header-platforms {
    gap: clamp(8px, 1.5vw, 16px);
  }
  .platform-icon span {
    display: none;
  }
}

@media (max-width: 600px) {
  .chat-panel {
    width: clamp(120px, 44vw, 160px);
    height: clamp(90px, 20vh, 130px);
  }
  .chat-panel-plan,
  .chat-panel-edit {
    top: clamp(88px, 14vh, 110px);
  }
  .chat-panel-review,
  .chat-panel-judge {
    bottom: clamp(20px, 8vh, 60px);
  }
  .panel-header { font-size: 10px; padding: 6px 10px; }
  .panel-msg { font-size: 10px; padding: 5px 8px; }

  .header-bar {
    gap: 12px;
    padding: 0 10px;
  }
  .header-platforms {
    gap: 6px;
  }
  .tagline {
    font-size: 0.45rem;
    letter-spacing: 0.1em;
  }
  .coming-soon-badge {
    margin-top: 2px;
  }
  .platform-icon svg,
  .platform-icon img {
    width: 14px;
    height: 14px;
  }
}

/* CTA Modal */
#cta-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#cta-modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  position: relative;
  width: clamp(320px, 90vw, 520px);
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(15,19,34,0.98), rgba(10,10,15,0.95));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: clamp(28px, 5vw, 48px);
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 60px rgba(102,126,234,0.2);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cta-modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  transition: all 0.2s ease;
  z-index: 1;
}

.modal-close:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
}

.modal-close:focus {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
}

/* Chat-Style Modal */
.modal-chat {
  width: clamp(280px, 85vw, 380px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-chat-header {
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.modal-chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  box-shadow: 0 0 8px rgba(102,126,234,0.5);
}

.modal-chat-messages {
  flex: 1;
  padding: clamp(20px, 4vh, 32px) clamp(16px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100px;
}

.modal-chat-message {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: clamp(0.85rem, 1.4vw, 0.95rem);
  line-height: 1.5;
}

.modal-chat-message.from-bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
}

.modal-chat-message.from-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(102,126,234,0.3), rgba(118,75,162,0.25));
  border: 1px solid rgba(102,126,234,0.3);
  color: rgba(255,255,255,0.92);
}

.modal-chat-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Honeypot field - visually hidden but accessible to bots */
#hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.modal-chat-input input[type="email"] {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--ink);
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.modal-chat-input input::placeholder {
  color: rgba(255,255,255,0.35);
}

.modal-chat-input input:focus {
  border-color: rgba(102,126,234,0.5);
  background: rgba(255,255,255,0.08);
}

.modal-chat-input button {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border: none;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.modal-chat-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(102,126,234,0.45);
}

.modal-chat-input button:active {
  transform: scale(0.95);
}

.modal-chat-input.submitted input,
.modal-chat-input.submitted button {
  opacity: 0.5;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  #bloom { opacity: 0.50; }
  .panel-msg {
    transition: none;
    transform: none;
  }
  .panel-msg.visible {
    transform: none;
  }
  .panel-msg.fading {
    transform: none;
  }
  .platform-icon {
    transition: none;
  }
  .platform-icon:hover {
    transform: none;
  }
  .flow-footer {
    display: none;
  }
  .saddle-pulse {
    animation: none;
    opacity: 0.4;
  }
  .modal-content {
    transition: opacity 0.3s ease;
    transform: none !important;
  }
}

/* Flow Diagrams Footer */
.flow-footer {
  position: absolute;
  bottom: clamp(12px, 2vh, 28px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(320px, 75vw, 900px);
  height: 70px;
  pointer-events: none;
  z-index: 5;
}

.flow-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.flow-workflow {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.flow-workflow.active {
  opacity: 1;
}

.flow-node {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 clamp(10px, 1.5vw, 18px);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(20, 24, 40, 0.75), rgba(12, 14, 24, 0.65));
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  flex-shrink: 0;
  /* Step animation base state */
  opacity: 0.35;
  transform: scale(0.9);
  transition: all 0.4s ease-out;
}

.flow-node::before {
  content: "";
  position: absolute;
  left: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  opacity: 0.5;
  transition: all 0.4s ease-out;
}

.flow-node span {
  margin-left: 10px;
}

/* Completed nodes - dimmed and smaller */
.flow-node.completed {
  opacity: 0.35;
  transform: scale(0.85);
}
.flow-node.completed::before {
  opacity: 0.5;
}

/* Active node - highlighted and full size */
.flow-node.active-step {
  opacity: 1;
  transform: scale(1);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 24px currentColor;
}
.flow-node.active-step::before {
  opacity: 1;
  box-shadow: 0 0 10px currentColor;
}

/* Pending nodes - dimmed, waiting */
.flow-node.pending {
  opacity: 0.25;
  transform: scale(0.85);
}
.flow-node.pending::before {
  opacity: 0.3;
}

/* Node type colors */
.flow-node[data-type="request"] {
  color: rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, rgba(40, 44, 60, 0.7), rgba(25, 28, 40, 0.6));
}
.flow-node[data-type="request"]::before { background: rgba(255, 255, 255, 0.5); box-shadow: 0 0 6px rgba(255,255,255,0.3); }

.flow-node[data-type="edit"] { color: var(--accent-1); }
.flow-node[data-type="plan"] { color: var(--accent-3); }
.flow-node[data-type="review"] { color: var(--accent-4); }
.flow-node[data-type="judge"] { color: var(--accent-5); }
.flow-node[data-type="test"] { color: #a78bfa; }
.flow-node[data-type="audit"] { color: #fbbf24; }
.flow-node[data-type="lint"] { color: #fb7185; }

.flow-node[data-type="done"] {
  color: var(--accent-4);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.15), rgba(74, 222, 128, 0.08));
  border-color: rgba(74, 222, 128, 0.25);
}
.flow-node[data-type="done"]::before { display: none; }

/* Arrow connectors */
.flow-arrow {
  display: flex;
  align-items: center;
  padding: 0 clamp(4px, 0.8vw, 10px);
  color: rgba(255, 255, 255, 0.25);
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.2;
  transition: opacity 0.4s ease-out;
}

.flow-arrow svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Completed arrows stay visible */
.flow-arrow.completed {
  opacity: 0.45;
}

/* Arrow leading out of active node pulses */
.flow-arrow.active-arrow {
  opacity: 0.8;
  animation: arrowPulse 0.8s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.95; }
}

/* Loop indicator (curved arrow back) */
.flow-loop {
  position: absolute;
  top: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-loop svg {
  width: 24px;
  height: 14px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5;
}

@media (max-width: 700px) {
  .flow-footer {
    bottom: 4px;
    width: 100vw;
    height: 50px;
    left: 0;
    transform: none;
  }

  .flow-workflow {
    justify-content: center;
    gap: 0;
  }

  /* Compact mobile nodes */
  .flow-node {
    height: 20px;
    padding: 0 5px;
    font-size: 7px;
    border-radius: 10px;
  }
  .flow-node::before {
    width: 3px;
    height: 3px;
    left: 4px;
  }
  .flow-node span {
    margin-left: 4px;
  }

  /* Tighter mobile arrows */
  .flow-arrow {
    padding: 0 2px;
  }
  .flow-arrow svg {
    width: 10px;
    height: 10px;
  }
}

/* Landscape mobile - flow diagram at very bottom */
@media (max-height: 500px) and (orientation: landscape) {
  .flow-footer {
    bottom: 0;
    width: 100vw;
    height: 44px;
    left: 0;
    transform: none;
  }

  .flow-workflow {
    justify-content: center;
    gap: 0;
  }

  .flow-node {
    height: 18px;
    padding: 0 5px;
    font-size: 7px;
    border-radius: 9px;
  }
  .flow-node::before {
    width: 3px;
    height: 3px;
    left: 4px;
  }
  .flow-node span {
    margin-left: 4px;
  }

  .flow-arrow {
    padding: 0 2px;
  }
  .flow-arrow svg {
    width: 10px;
    height: 10px;
  }

  /* Panels to four corners on landscape phones */
  .chat-panel {
    width: clamp(140px, 22vw, 220px);
    height: clamp(100px, 28vh, 150px);
  }
  .chat-panel-plan {
    top: clamp(60px, 16vh, 100px);
    left: 10px;
    right: auto;
    transform: none;
  }
  .chat-panel-edit {
    top: clamp(60px, 16vh, 100px);
    right: 10px;
    left: auto;
    transform: none;
  }
  .chat-panel-review {
    bottom: clamp(50px, 12vh, 70px);
    left: 10px;
    right: auto;
    transform: none;
  }
  .chat-panel-judge {
    bottom: clamp(50px, 12vh, 70px);
    right: 10px;
    left: auto;
    transform: none;
  }
  .panel-header { font-size: 9px; padding: 5px 10px; }
  .panel-msg { font-size: 9px; padding: 4px 7px; }
}
