:root {
  --bg-primary: #fffaf5;
  --bg-card: #ffffff;
  --bg-accent: #fdf2f8;
  --bg-subtle: #fff5eb;
  --text-main: #2d2424;
  --text-muted: #786464;
  --color-pink: #f472b6;
  --color-pink-soft: #fbcfe8;
  --color-latte: #b45309;
  --color-latte-soft: #fef3c7;
  --color-matcha: #10b981;
  --color-matcha-soft: #d1fae5;
  --color-lavender: #a855f7;
  --color-lavender-soft: #f3e8ff;
  --color-border: #fed7aa;
  --border-focus: #fb923c;
  --shadow-cozy: 0 10px 30px rgba(180, 83, 9, 0.08);
  --shadow-pop: 0 12px 24px rgba(244, 114, 182, 0.2);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

.ambient-lights {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.orb-pink { width: 400px; height: 400px; background: #fbcfe8; top: -100px; right: -50px; }
.orb-latte { width: 450px; height: 450px; background: #fed7aa; bottom: -150px; left: -100px; }
.orb-lavender { width: 350px; height: 350px; background: #e9d5ff; top: 40%; right: 25%; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

header {
  padding: 24px 0;
  border-bottom: 2px dashed var(--color-border);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cup-icon {
  font-size: 34px;
  animation: floatCup 3s ease-in-out infinite;
}

@keyframes floatCup {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  color: #854d0e;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--color-pink-soft);
  color: #db2777;
  padding: 2px 8px;
  border-radius: 12px;
}

.header-badges {
  display: flex;
  gap: 10px;
}

.badge-pill {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
}

.badge-chain {
  background: var(--color-latte-soft);
  color: #92400e;
}

.badge-agent {
  background: var(--color-pink-soft);
  color: #9d174d;
}

/* Dynamic Live Phase Banner */
.phase-banner-card {
  margin: 28px 0;
  background: var(--bg-card);
  border: 2px solid var(--color-border);
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: var(--shadow-cozy);
}

.phase-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.phase-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.pulse-dot.amber {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
  animation: pulseDot 2s infinite;
}

.pulse-dot.emerald {
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

.phase-title-text {
  font-size: 18px;
  font-weight: 900;
  color: #854d0e;
}

.phase-sub-text {
  font-size: 13px;
  color: var(--text-muted);
}

.phase-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.phase-pill-item {
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-primary);
  border: 1px solid var(--color-border);
  color: var(--text-muted);
}

.phase-pill-item.active {
  background: var(--color-latte-soft);
  color: #92400e;
  border-color: #fcd34d;
}

.phase-pill-item.completed {
  background: var(--color-matcha-soft);
  color: #065f46;
  border-color: #6ee7b7;
}

/* Phase Progress Bar */
.phase-progress-area {
  margin-top: 10px;
}

.phase-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.phase-bar-track {
  width: 100%;
  height: 16px;
  background: #fed7aa;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.phase-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 40%, #f472b6 100%);
  border-radius: 12px;
  transition: width 0.6s ease;
}

.phase-milestones {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Specs Matrix */
.specs-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.spec-tile {
  background: var(--bg-card);
  border: 2px solid var(--color-border);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-cozy);
}

.spec-title {
  font-size: 12px;
  font-weight: 800;
  color: #9d174d;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.spec-number {
  font-size: 22px;
  font-weight: 900;
  color: #451a03;
}

.spec-number.cyan { color: #0284c7; }
.spec-number.pink { color: #db2777; }
.spec-number.gold { color: #b45309; }

/* Split Grid for AI Terminal & Machine Directives */
.split-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
}

.terminal-card {
  background: var(--bg-card);
  border: 2px solid var(--color-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-cozy);
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.terminal-title {
  font-size: 18px;
  font-weight: 800;
  color: #854d0e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: white;
  font-size: 18px;
  font-weight: 800;
  color: #854d0e;
  cursor: pointer;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: var(--color-latte-soft);
}

.qty-val {
  font-size: 22px;
  font-weight: 900;
  width: 32px;
  text-align: center;
}

.quote-banner {
  background: var(--bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.quote-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.quote-val {
  font-size: 16px;
  font-weight: 800;
  color: #b45309;
}

.code-terminal {
  background: #1e1b18;
  color: #fef08a;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  padding: 16px;
  border-radius: 16px;
  overflow-x: auto;
  line-height: 1.5;
  margin-bottom: 18px;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid #3d2c1d;
}

.btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #f472b6, #fb923c);
  color: white;
  border: none;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-pop);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(244, 114, 182, 0.35);
}

.btn-secondary {
  background: white;
  color: #854d0e;
  border: 2px solid var(--color-border);
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--color-latte-soft);
}

/* Prompt for AI Section */
.ai-prompt-box {
  background: var(--bg-card);
  border: 2px solid var(--color-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-cozy);
  display: flex;
  flex-direction: column;
}

.prompt-title {
  font-size: 18px;
  font-weight: 800;
  color: #854d0e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.prompt-textarea {
  background: var(--bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: #451a03;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 280px;
}

/* Collection Explorer Section */
.collection-section {
  padding: 40px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 32px;
  font-weight: 900;
  color: #451a03;
  margin-bottom: 8px;
}

.section-head h2 span {
  color: #db2777;
}

.section-head p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  background: white;
  border: 2px solid var(--color-border);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #854d0e;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, #fb923c, #f472b6);
  color: white;
  border-color: transparent;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.collection-card {
  background: var(--bg-card);
  border: 2px solid var(--color-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-cozy);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.collection-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(180, 83, 9, 0.14);
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-subtle);
  overflow: hidden;
  position: relative;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

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

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: #854d0e;
}

.card-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
}

.card-badge.free { background: #d1fae5; color: #047857; }
.card-badge.paid { background: #fef3c7; color: #b45309; }

.card-beverage {
  font-size: 13px;
  font-weight: 700;
  color: #451a03;
}

.card-traits-list {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-action-row {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-token-uri {
  font-size: 11px;
  font-family: 'Fira Code', monospace;
  color: #db2777;
  text-decoration: none;
  font-weight: 700;
}

.card-token-uri:hover {
  text-decoration: underline;
}

/* Roadmap Grid */
.roadmap-section {
  padding: 40px 0;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.roadmap-card {
  background: var(--bg-card);
  border: 2px solid var(--color-border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-cozy);
  display: flex;
  flex-direction: column;
  position: relative;
}

.roadmap-card.active {
  border-color: #f59e0b;
  background: #fffbeb;
}

.roadmap-card.completed {
  border-color: #10b981;
  background: #f0fdf4;
}

.roadmap-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.roadmap-badge.live { background: #fef3c7; color: #b45309; }
.roadmap-badge.done { background: #d1fae5; color: #047857; }
.roadmap-badge.upcoming { background: var(--color-latte-soft); color: #b45309; }
.roadmap-badge.future { background: var(--color-lavender-soft); color: #7e22ce; }

.roadmap-phase-title {
  font-size: 16px;
  font-weight: 800;
  color: #451a03;
  margin-bottom: 12px;
}

.roadmap-items {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roadmap-items li {
  position: relative;
  padding-left: 18px;
}

.roadmap-items li::before {
  content: "☕";
  position: absolute;
  left: 0;
  font-size: 11px;
}

/* Protocol Verification Table */
.protocol-card {
  margin: 40px 0 60px;
  background: var(--bg-card);
  border: 2px solid var(--color-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-cozy);
}

.protocol-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: #854d0e;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.protocol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.protocol-table th, .protocol-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.protocol-table th {
  color: var(--text-muted);
  width: 32%;
  font-weight: 700;
}

.protocol-table td code {
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
}

.protocol-table a {
  color: #b45309;
  text-decoration: none;
  font-weight: 700;
}

.protocol-table a:hover {
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e1b18;
  color: #fef08a;
  padding: 12px 24px;
  border-radius: 14px;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 999;
}

.toast.active {
  opacity: 1;
}

footer {
  padding: 30px 0;
  text-align: center;
  border-top: 2px dashed var(--color-border);
  font-size: 13px;
  color: var(--text-muted);
}
