:root {
  --orange: #c96f4a;
  --orange-light: #d98a68;
  --orange-dark: #8f4a30;
  --cream: #fff8f3;
  --ink: #17100e;
  --ink-soft: #2a211d;
  --tear: #4ecdc4;
  --glow: rgba(201, 111, 74, 0.5);
  --glass: rgba(255, 248, 243, 0.065);
  --glass-strong: rgba(255, 248, 243, 0.1);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42), 0 4px 16px rgba(0,0,0,0.18);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font-serif: "DM Serif Display", Georgia, serif;
  --font-sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-sans); background: var(--ink); color: var(--cream); overflow-x: hidden; line-height: 1.7; font-feature-settings: "ss01", "kern"; padding-top: 68px; /* offset fixed header */ letter-spacing: -0.005em; }
body.preload { overflow: hidden; padding-top: 0; }
.intro { padding-top: 0; } /* intro gate is full-screen overlay */
main section[id] { scroll-margin-top: clamp(112px, 18vh, 180px); }

/* Accessibility: high-contrast text toggle (theme command) — no background/font changes */
body.high-contrast-text p,
body.high-contrast-text .section-sub,
body.high-contrast-text .stat-card-label,
body.high-contrast-text .nav a {
  color: rgba(255, 248, 243, 0.92);
}

/* Global text clarity */
h1, h2, h3 { font-feature-settings: "kern", "tnum"; }
p, .section-sub { color: rgba(255,248,243,0.72); }

/* Preloader */
.preloader {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--ink); gap: 20px; transition: opacity 0.3s ease, visibility 0.3s;
}
.preloader.done {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  animation: none !important;
}
.preloader-logo { width: 90px; height: 90px; border-radius: 50%; animation: float 2s ease-in-out infinite; }
.preloader p { font-size: 0.9rem; color: rgba(255,248,243,0.5); letter-spacing: 0.1em; text-transform: uppercase; }
.preloader-bar { width: 200px; height: 3px; background: var(--glass); border-radius: 99px; overflow: hidden; }
.preloader-fill { height: 100%; background: var(--orange); animation: loadBar 1.2s ease-in-out infinite; }
@keyframes loadBar { 0% { width: 0; } 50% { width: 80%; } 100% { width: 100%; } }

.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 111, 74, 0.1) 0%, rgba(201, 111, 74, 0.035) 40%, transparent 74%);
  pointer-events: none; transform: translate(-50%, -50%); z-index: 9997;
  filter: blur(10px);
  opacity: 0.48;
}
.container { width: min(1180px, 94vw); margin: 0 auto; padding-inline: 4px; }

/* Header - premium sticky */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  backdrop-filter: blur(24px); background: rgba(23, 16, 14, 0.82);
  border-bottom: 1px solid transparent; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.header.scrolled { background: rgba(23, 16, 14, 0.94); border-color: var(--border); box-shadow: 0 4px 18px rgba(0,0,0,0.22); }
.header-inner {
  width: min(1240px, 95vw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 68px;
  padding: 10px 0; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.03em; flex-shrink: 0; }
.brand-logo {
  width: 38px; height: 38px; display: block; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 50%; overflow: hidden; background: #c97958; border: 1px solid var(--border-strong);
  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
}
.nav {
  display: flex;
  gap: 26px;
  align-items: center;
  justify-self: center;
  min-height: 44px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  color: rgba(255,248,243,0.72);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  transition: color 0.2s ease;
  white-space: nowrap;
  position: relative;
}
.nav a:hover { color: var(--orange-light); }
/* Animated underline for text links site-wide */
a.text-link, .nav a:not(.term-launch):not(.chat-launch) {
  position: relative;
}
a.text-link::after, .nav a:not(.term-launch):not(.chat-launch)::after {
  content: ''; position: absolute; left: 0; bottom: -3px; width: 0; height: 2px;
  background: var(--orange-light); transition: width 0.2s ease;
}
a.text-link:hover::after, .nav a:not(.term-launch):not(.chat-launch):hover::after { width: 100%; }
.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
  min-height: 44px;
}

/* Language picker */
.lang-picker { position: relative; }

.term-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: #4ecdc4;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.term-launch:hover {
  background: rgba(78, 205, 196, 0.1);
  border-color: #4ecdc4;
  color: #7ef0c4;
}

.chat-launch {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: #4ecdc4;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.chat-launch:hover {
  background: rgba(78, 205, 196, 0.1);
  border-color: #4ecdc4;
  color: #7ef0c4;
}


.lang-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px;
  background: rgba(255,248,243,0.025); border: 1px solid rgba(255,255,255,0.08); border-radius: 999px;
  color: rgba(255,248,243,0.84); font-family: var(--font-sans); font-size: 0.74rem; font-weight: 500;
  cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s; white-space: nowrap;
}
.lang-btn:hover { border-color: rgba(255,255,255,0.16); background: rgba(255,248,243,0.04); color: #fff; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 188px; max-height: 320px; overflow-y: auto;
  background: rgba(18,14,11,0.96); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s; box-shadow: 0 12px 28px rgba(0,0,0,0.24);
}
.lang-picker.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px;
  background: none; border: none; border-radius: 8px; color: var(--cream);
  font-family: var(--font-sans); font-size: 0.78rem; cursor: pointer; text-align: left;
}
.lang-option:hover { background: rgba(255,248,243,0.04); }
.lang-option.active { background: rgba(255,248,243,0.06); color: #fff; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
  background: none; border: none; cursor: pointer;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); transition: transform 0.3s, opacity 0.3s; }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero - cinematic & crystal clear */
.hero {
  position: relative; min-height: calc(100dvh - 66px); display: grid; align-items: center;
  padding: 62px 5vw 92px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-banner { width: 100%; height: 100%; object-fit: cover; opacity: 0.28; filter: contrast(1.05) saturate(0.95); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(142deg, rgba(23,16,14,0.96) 0%, rgba(23,16,14,0.82) 38%, rgba(143,74,48,0.35) 58%, rgba(23,16,14,0.97) 100%); }
.hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-content { position: relative; z-index: 2; max-width: 680px; }
.hero-badge {
  display: inline-block; padding: 9px 18px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--border-strong);
  font-size: 0.73rem; font-weight: 700; letter-spacing: 0.095em; text-transform: uppercase; margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.hero-micro-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,248,243,0.025);
  color: rgba(255,248,243,0.72);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}
.hero-micro-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #dbffe8 0%, #4ee58e 38%, #11b55f 100%);
  box-shadow: 0 0 0 0 rgba(78, 229, 142, 0.42), 0 0 10px rgba(78, 229, 142, 0.4);
  animation: livePulse 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes livePulse {
  0% {
    opacity: 0.82;
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(78, 229, 142, 0.42), 0 0 8px rgba(78, 229, 142, 0.34);
  }
  50% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(78, 229, 142, 0), 0 0 16px rgba(78, 229, 142, 0.5);
  }
  100% {
    opacity: 0.88;
    transform: scale(0.94);
    box-shadow: 0 0 0 0 rgba(78, 229, 142, 0), 0 0 10px rgba(78, 229, 142, 0.3);
  }
}
.hero h1 {
  font-family: var(--font-serif); font-size: clamp(3.6rem, 8.8vw, 6.8rem); font-weight: 400; line-height: 0.92; margin-bottom: 20px;
  background: linear-gradient(175deg, #fff8f3 0%, #f2d9c9 38%, var(--orange-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-shadow: 0 10px 60px rgba(0,0,0,0.3);
}
.hero-tagline { font-size: 1.18rem; line-height: 1.45; color: rgba(255,248,243,0.82); margin-bottom: 28px; max-width: 560px; font-weight: 500; }
.hero-quote {
  padding: 20px 26px; border-left: 4px solid var(--orange);
  background: var(--glass); border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 32px;
  backdrop-filter: blur(14px);
}
.hero-quote blockquote { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; line-height: 1.48; margin-bottom: 8px; color: rgba(255,248,243,0.92); }
.hero-quote cite { font-size: 0.85rem; color: var(--orange-light); font-style: normal; letter-spacing: 0.02em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.hero-flower {
  position: absolute; right: 6.5vw; bottom: 11vh; z-index: 2;
  width: clamp(190px, 22vw, 340px); height: auto; display: block;
  object-fit: contain; aspect-ratio: auto; border-radius: 0; overflow: visible;
  background: transparent; border: none;
  animation: float 5.5s ease-in-out infinite;
  filter: drop-shadow(0 24px 58px rgba(0,0,0,0.36));
}
.tear-drop {
  position: absolute; right: 29%; top: 39%; width: 12px; height: 17px;
  background: var(--tear); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  box-shadow: 0 0 0 1px rgba(78,205,196,0.3);
  animation: tearFall 2.1s ease-in infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-18px) rotate(2.5deg); } }
@keyframes tearFall { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(42px) scale(0.45); } }

/* Premium Buttons — Apple-quality proportions */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border: none; border-radius: 999px;
  font-family: var(--font-sans); font-size: 0.92rem; font-weight: 700; letter-spacing: 0.008em;
  cursor: pointer; text-decoration: none;
  transition: transform 0.2s var(--transition-smooth), box-shadow 0.2s var(--transition-smooth), background 0.2s, border-color 0.2s;
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn:focus-visible { outline: 2px solid var(--orange-light); outline-offset: 3px; }
.btn-primary { background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%); color: var(--cream); box-shadow: 0 8px 28px rgba(201,111,74,0.38); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(201,111,74,0.28); }
.btn-secondary { background: var(--glass-strong); color: var(--cream); border: 1px solid var(--border-strong); backdrop-filter: blur(12px); }
.btn-secondary:hover { border-color: var(--orange); background: var(--glass); }
.btn-ghost { background: transparent; color: rgba(255,248,243,0.78); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--orange); color: var(--cream); background: var(--glass); }
.btn-copy { background: var(--orange); color: #fff; padding: 12px 22px; flex-shrink: 0; font-weight: 700; }
.btn-copy.copied { background: #2a7f57; }
.btn-lg { padding: 15px 36px; font-size: 1.04rem; }

/* Ticker - clean and prominent */
.ticker { display: none !important; }
.ticker-track { display: none !important; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Stats - sharp & clear dashboard */
.stats-section { padding: 82px 0; background: linear-gradient(180deg, transparent, rgba(143,74,48,0.065), transparent); }
.stats-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 14px; }
.stats-title { font-family: var(--font-serif); font-size: 1.72rem; display: flex; align-items: center; gap: 12px; letter-spacing: -0.01em; }
.live-dot { width: 10px; height: 10px; background: #2ecc71; border-radius: 50%; animation: pulse 1.6s ease infinite; box-shadow: 0 0 14px #2ecc71; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.38; } }
.stats-updated { font-size: 0.79rem; color: rgba(255,248,243,0.42); font-weight: 500; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(192px, 1fr)); gap: 16px; }
.stat-card {
  padding: 24px 22px; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(20px); transition: transform 0.22s var(--transition-smooth), border-color 0.2s, box-shadow 0.22s;
}
.stat-card:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.14); box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
.stat-card-label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,248,243,0.45); margin-bottom: 10px; font-weight: 600; }
.stat-card-value { display: block; font-size: 1.68rem; font-weight: 800; color: var(--cream); line-height: 1.1; letter-spacing: -0.02em; }
.stat-card-change { display: block; font-size: 0.82rem; margin-top: 8px; font-weight: 700; }
.stat-card-change.up { color: #2ecc71; }
.stat-card-change.down { color: #e74c3c; }



/* Sections common - crisp headings */
h2 { font-family: var(--font-serif); font-size: clamp(1.95rem, 4.1vw, 2.75rem); margin-bottom: 13px; letter-spacing: -0.015em; }
.section-sub { color: rgba(255,248,243,0.66); margin-bottom: 36px; max-width: 580px; font-size: 1.01rem; }

/* CA - very clear */
.ca-section { padding: 96px 0; text-align: center; }
.ca-sub { color: rgba(255,248,243,0.66); margin: 0 auto 36px; max-width: 520px; font-size: 1.01rem; }
.ca-box {
  display: flex; align-items: center; gap: 14px; max-width: 860px; margin: 0 auto 12px;
  padding: 18px 24px; background: var(--glass); border: 1px solid var(--border-strong);
  border-radius: var(--radius); backdrop-filter: blur(20px);
}
.ca-box code,
.ca-value {
  font-family: ui-monospace, "SF Mono", "Fira Code", monospace;
  font-size: clamp(0.72rem, 2.05vw, 0.98rem);
  word-break: break-all;
  text-align: left;
  flex: 1;
  color: var(--tear);
  font-weight: 600;
  min-width: 0;
}
.ca-toast { min-height: 24px; font-size: 0.9rem; color: var(--tear); font-weight: 700; }
.ca-links { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; margin-top: 32px; }
.link-card {
  display: flex; align-items: center; gap: 11px; padding: 15px 22px;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--cream); transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  font-weight: 600; min-height: 44px;
}
.link-card:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.16); background: rgba(255,248,243,0.07); }
.link-card:active { transform: scale(0.99); }
.link-icon { font-size: 1.35rem; }
.link-text { font-weight: 700; font-size: 0.91rem; }

/* How to buy - clean cards */
.howto-section { padding: 88px 0; }
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; margin-top: 40px; }
.howto-card {
  padding: 32px 28px; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); position: relative; overflow: hidden;
  transition: transform 0.22s var(--transition-smooth), border-color 0.2s, box-shadow 0.22s;
}
.howto-card:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.14); box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
.howto-num { font-family: var(--font-serif); font-size: 3rem; color: rgba(201,111,74,0.14); position: absolute; top: 14px; right: 20px; line-height: 1; }
.howto-card h3 { font-size: 1.15rem; margin-bottom: 10px; position: relative; font-weight: 700; }
.howto-card p { color: rgba(255,248,243,0.68); font-size: 0.94rem; position: relative; line-height: 1.6; }

/* Quiz - beautiful & readable */
.buttons-section { padding: 88px 0 104px; background: linear-gradient(180deg, transparent, rgba(143,74,48,0.09), transparent); }
.buttons-section .section-sub { margin-inline: auto; text-align: center; }
.mascot-stage { display: flex; flex-direction: column; align-items: center; margin-bottom: 48px; }
.speech-bubble {
  position: relative; max-width: 580px; padding: 22px 28px;
  background: var(--cream); color: var(--ink); border-radius: 20px;
  width: min(100%, 580px);
  margin-bottom: 20px; box-shadow: var(--shadow-soft); transition: transform 0.3s var(--transition-spring);
  overflow: hidden;
}
.speech-bubble.pop { animation: bubblePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bubblePop { 0% { transform: scale(0.92); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }
.speech-bubble::after { content: ""; position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%); border: 13px solid transparent; border-top-color: var(--cream); }
#speechText {
  font-size: 1.08rem;
  line-height: 1.58;
  font-weight: 600;
  transition: opacity 0.15s;
  color: #2c211c;
  white-space: pre-line;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.mascot-img { width: 118px; height: 118px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(23,16,14,0.6); box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
.mascot-img.bounce { animation: mascotBounce 0.52s ease; }
@keyframes mascotBounce { 0%, 100% { transform: scale(1); } 32% { transform: scale(1.13) rotate(-3.5deg); } 64% { transform: scale(0.965); } }

@keyframes cry-shake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-5deg) scale(1.05); }
  40% { transform: rotate(5deg) scale(1.05); }
  60% { transform: rotate(-3deg) scale(1.02); }
  80% { transform: rotate(3deg) scale(1.02); }
}

.crying {
  animation: cry-shake 0.6s ease-in-out;
  filter: drop-shadow(0 0 8px rgba(100, 160, 255, 0.6));
}

#heroFlowerTooltip {
  transition: opacity 0.2s ease;
}
.button-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 15px; }
.funny-btn {
  padding: 19px 18px; border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 0.91rem; font-weight: 700; cursor: pointer;
  color: #251c18; text-align: left; transition: transform 0.2s, box-shadow 0.2s, filter 0.2s; position: relative; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.funny-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.14); filter: saturate(1.01); }
.funny-btn:active { transform: scale(0.99); }
.funny-btn .emoji { display: block; font-size: 1.55rem; margin-bottom: 7px; }
.funny-btn:nth-child(6n+1) { background: #ffd6a5; }
.funny-btn:nth-child(6n+2) { background: #f9ffbe; }
.funny-btn:nth-child(6n+3) { background: #caffbf; }
.funny-btn:nth-child(6n+4) { background: #9bf6ff; }
.funny-btn:nth-child(6n+5) { background: #a0c4ff; }
.funny-btn:nth-child(6n+6) { background: #ffc6ff; }

/* Game - crisp and premium frame */
.game-section { padding: 64px 0 72px; }
.game-section .container { display: grid; gap: 18px; }
.game-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px 24px; margin-bottom: 8px; }
.game-header > div:first-child { max-width: 520px; }
.game-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.game-header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.stat { text-align: center; padding: 8px 12px; background: rgba(255,248,243,0.045); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; min-width: 68px; backdrop-filter: blur(6px); }
.stat-label { display: block; font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.11em; color: rgba(255,248,243,0.44); margin-bottom: 5px; font-weight: 600; }
.stat-value { font-size: 0.96rem; font-weight: 700; color: var(--orange-light); line-height: 1; }
.game-wrapper { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 18px 44px rgba(0,0,0,0.22); background: #221a16; }
#gameCanvas { display: block; width: 100%; height: auto; cursor: crosshair; image-rendering: auto; }
.game-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(23,16,14,0.88); backdrop-filter: blur(12px); z-index: 10; }
.game-overlay.hidden { display: none; }
.overlay-content { text-align: center; padding: 32px 28px; }
.overlay-logo { width: 76px; height: 76px; border-radius: 50%; margin-bottom: 18px; border: 2px solid rgba(255,248,243,0.15); }
.overlay-content h3 { font-family: var(--font-serif); font-size: 1.72rem; margin-bottom: 10px; }
.overlay-content p { color: rgba(255,248,243,0.68); margin: 0 auto 22px; font-size: 0.98rem; max-width: 34ch; line-height: 1.55; }
.game-controls-hint { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; font-size: 0.83rem; color: rgba(255,248,243,0.62); font-weight: 500; }
.game-controls-hint span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,248,243,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.game-controls-hint-inline {
  justify-content: center;
  margin-top: 0;
  margin-bottom: 2px;
}
.game-over-summary {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 16px 0;
  flex-wrap: wrap;
}
.game-over-stat {
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,248,243,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}
.game-over-stat .stat-label,
.game-over-stat .stat-value {
  display: block;
}
.game-over-stat .stat-value {
  font-size: 1.45rem;
  margin-top: 6px;
}
.game-mode-btn {
  min-height: 34px;
  min-width: 88px;
  padding: 7px 12px;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,248,243,0.7);
  background: rgba(255,248,243,0.025);
}
.game-mode-btn:hover {
  border-color: rgba(255,255,255,0.18);
  color: #fff;
  background: rgba(255,248,243,0.05);
}
.game-mode-btn.is-active {
  border-color: rgba(201,111,74,0.42);
  color: #fff3eb;
  background: rgba(201,111,74,0.14);
}

/* Tokenomics, Roadmap, FAQ, Lore - premium spacing & clarity */
.tokenomics-section, .roadmap-section, .faq-section { padding: 88px 0; }
.tokenomics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(208px, 1fr)); gap: 16px; margin-top: 36px; }
.token-card {
  padding: 28px 22px; text-align: center; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); transition: transform 0.22s var(--transition-smooth), border-color 0.2s, box-shadow 0.22s;
}
.token-card:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.14); box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
.token-card span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,248,243,0.48); margin-bottom: 10px; font-weight: 600; }
.token-card strong { font-size: 1.9rem; font-family: var(--font-serif); color: var(--orange-light); line-height: 1; }

.roadmap-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 18px; margin-top: 36px; }
.roadmap-item {
  padding: 28px 24px; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); border-top: 3px solid var(--orange);
  transition: transform 0.22s var(--transition-smooth), border-color 0.2s, box-shadow 0.22s;
}
.roadmap-item:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.14); box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
.roadmap-phase { font-size: 0.72rem; font-weight: 800; color: var(--orange); letter-spacing: 0.12em; }
.roadmap-item h3 { font-size: 1.08rem; margin: 8px 0 6px; font-weight: 700; }
.roadmap-item p { font-size: 0.91rem; color: rgba(255,248,243,0.64); line-height: 1.55; }

/* FAQ */
.faq-list { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  padding: 18px 22px; cursor: pointer; font-weight: 700; font-size: 0.96rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--orange); transition: transform 0.25s var(--transition-spring); font-weight: 400; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 18px; color: rgba(255,248,243,0.68); font-size: 0.93rem; line-height: 1.62; }

/* Lore */
.lore { padding: 64px 0 96px; }
.lore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(236px, 1fr)); gap: 16px; }
.lore-card {
  padding: 26px 24px; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); transition: transform 0.22s var(--transition-smooth), border-color 0.2s, box-shadow 0.22s;
}
.lore-card:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.14); box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
.lore-card h3 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 10px; }
.lore-card p { color: rgba(255,248,243,0.66); font-size: 0.92rem; line-height: 1.58; }

/* Footer */
.footer { text-align: center; padding: 52px 24px 68px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.32); }
.footer-logo { width: 52px; height: 52px; border-radius: 50%; margin-bottom: 18px; opacity: 0.75; }
.footer p { color: rgba(255,248,243,0.58); margin-bottom: 10px; font-size: 0.96rem; }
.footer-ca { font-size: 0.73rem; color: var(--tear); word-break: break-all; display: block; margin-bottom: 10px; font-family: ui-monospace, monospace; letter-spacing: 0.01em; }
.footer-rights { font-size: 0.72rem !important; color: rgba(255,248,243,0.3) !important; }

/* Back to top */
.back-top {
  position: fixed; bottom: 108px; right: 26px; width: 46px; height: 46px;
  border-radius: 50%; background: var(--orange); color: #fff; border: none;
  font-size: 1.25rem; cursor: pointer; opacity: 0; visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.2s; z-index: 150;
  box-shadow: 0 8px 26px rgba(201,111,74,0.45);
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { transform: translateY(-3px); }

/* Chatbot — Apple-quality minimalist polish */
.chat-fab {
  position: fixed; bottom: 28px; right: 28px; width: 60px; height: 60px;
  border-radius: 50%; border: 1.5px solid var(--orange); background: var(--ink);
  cursor: pointer; z-index: 300; padding: 0; overflow: visible;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.22s var(--transition-smooth), box-shadow 0.22s;
}
.chat-fab:hover { transform: scale(1.06); box-shadow: 0 12px 40px rgba(201,111,74,0.34), 0 4px 12px rgba(0,0,0,0.24); }
.chat-fab.active { transform: scale(0.95); }
.chat-fab img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,0.08); }
.chat-fab-pulse {
  position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--orange);
  animation: chatPulse 2.2s ease infinite; pointer-events: none;
}
@keyframes chatPulse { 0%, 100% { opacity: 0.5; transform: scale(1); } 55% { opacity: 0; transform: scale(1.28); } }

/* Chat panel — spacious, premium proportions */
.chat-panel {
  position: fixed; bottom: 104px; right: 28px;
  width: min(400px, calc(100vw - 32px)); height: 560px;
  background: rgba(20,13,11,0.97); border: 1px solid var(--border-strong); border-radius: 24px;
  display: flex; flex-direction: column; z-index: 299;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.97);
  transition: opacity 0.28s var(--transition-smooth), transform 0.28s var(--transition-smooth), visibility 0.28s;
  box-shadow: 0 32px 96px rgba(0,0,0,0.58), 0 8px 24px rgba(0,0,0,0.22);
  backdrop-filter: blur(32px) saturate(1.4); overflow: hidden;
}
.chat-panel.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* Chat header */
.chat-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  background: rgba(201,111,74,0.07);
}
.chat-header h3 { font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.chat-header p { font-size: 0.73rem; color: rgba(255,248,243,0.48); margin-top: 2px; }
.chat-close {
  background: rgba(255,248,243,0.07); border: 1px solid var(--border); color: var(--cream);
  font-size: 1.1rem; cursor: pointer; line-height: 1; padding: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.7; transition: opacity 0.15s, background 0.15s;
}
.chat-close:hover { opacity: 1; background: rgba(255,248,243,0.12); }

/* Messages */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px 16px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: rgba(255,248,243,0.1) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,248,243,0.1); border-radius: 99px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-end; }
.chat-msg--user { flex-direction: row-reverse; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 1px solid rgba(255,255,255,0.08); }

/* Message bubbles — Apple iMessage proportions */
.chat-bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 18px;
  font-size: 0.91rem; line-height: 1.52; word-break: break-word;
}
.chat-msg--bot .chat-bubble {
  background: rgba(255,248,243,0.07); border: 1px solid rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
}
.chat-msg--error .chat-bubble { border-color: rgba(231,76,60,0.4); color: #ffb4a8; font-size: 0.85rem; }
.chat-bubble--waiting { display: flex; flex-direction: column; gap: 8px; }
.chat-wait-text { font-size: 0.8rem; font-style: italic; color: rgba(255,248,243,0.45); }
.chat-msg--user .chat-bubble {
  background: linear-gradient(145deg, var(--orange) 0%, var(--orange-dark) 100%);
  border-bottom-right-radius: 4px; color: #fff;
}

/* Typing dots */
.chat-typing .dots { display: flex; gap: 4px; align-items: center; padding: 2px 0; }
.chat-typing .dots span { width: 5px; height: 5px; background: rgba(255,248,243,0.38); border-radius: 50%; animation: dotBounce 1.2s ease infinite; }
.chat-typing .dots span:nth-child(2) { animation-delay: 0.16s; }
.chat-typing .dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes dotBounce { 0%, 80%, 100% { transform: translateY(0); } 42% { transform: translateY(-5px); } }

/* Suggestion chips */
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.chat-suggestion {
  padding: 6px 13px; background: rgba(255,248,243,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; font-size: 0.72rem; color: rgba(255,248,243,0.72);
  cursor: pointer; font-family: var(--font-sans);
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.chat-suggestion:hover { border-color: var(--orange); background: rgba(201,111,74,0.12); color: var(--cream); }

/* Input row */
.chat-input-row {
  display: flex; gap: 8px; padding: 12px 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.18);
}
.chat-input-row input {
  flex: 1; padding: 10px 16px;
  background: rgba(255,248,243,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; color: var(--cream); font-family: var(--font-sans);
  font-size: 0.9rem; outline: none;
  transition: border-color 0.18s, background 0.18s;
}
.chat-input-row input:focus { border-color: var(--orange); background: rgba(255,248,243,0.08); }
.chat-input-row input::placeholder { color: rgba(255,248,243,0.3); }
.chat-input-row button {
  padding: 10px 18px; background: var(--orange); border: none; border-radius: 999px;
  color: #fff; font-family: var(--font-sans); font-weight: 700; font-size: 0.85rem;
  cursor: pointer; transition: background 0.18s, transform 0.15s;
  white-space: nowrap;
}
.chat-input-row button:hover { background: var(--orange-light); transform: scale(1.02); }
.chat-input-row button:active { transform: scale(0.97); }

.particle-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

/* Scroll reveal — fade in + slide up on viewport entry */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal.visible { opacity: 1; transform: translateY(0); }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9996;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,248,243,0.08), transparent 32%),
    linear-gradient(180deg, rgba(12, 8, 7, 0.16), rgba(12, 8, 7, 0.3));
  backdrop-filter: blur(0px);
  transition: opacity 0.34s ease, backdrop-filter 0.34s ease;
}

body.nav-transitioning::after {
  opacity: 1;
  backdrop-filter: blur(8px);
}

.nav-target-focus {
  animation: navTargetReveal 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes navTargetReveal {
  0% {
    opacity: 0.28;
    transform: translateY(22px) scale(0.985);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal.visible { opacity: 1; transform: none; }
  body::after { display: none; }
  .nav-target-focus { animation: none; }
  .hero-flower, .preloader-logo, .live-dot, .ticker-track, .intro-tear, .chat-fab-pulse { animation: none !important; }
  .btn, .link-card, .stat-card, .protocol-card, .howto-card, .token-card, .roadmap-item, .lore-card { transition: none !important; }
}

/* RTL support */
[dir="rtl"] .hero-quote { border-left: none; border-right: 4px solid var(--orange); border-radius: var(--radius) 0 0 var(--radius); }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .chat-panel { right: auto; left: 26px; }
[dir="rtl"] .chat-fab { right: auto; left: 26px; }
[dir="rtl"] .back-top { right: auto; left: 26px; }

/* Responsive - excellent mobile clarity */
@media (max-width: 920px) {
  .hero { padding-top: 88px; }
  .hero-flower { right: 50%; transform: translateX(50%); bottom: 3.5vh; opacity: 0.78; width: 170px; }
  .ca-box { flex-direction: column; }
  .game-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
  .header-inner { flex-wrap: wrap; }
  .hero { padding: 108px 5vw 78px; }
  .hero h1 { font-size: clamp(3.1rem, 11vw, 5.6rem); }
  .button-grid { grid-template-columns: 1fr; }
  .lang-btn { font-size: 0.73rem; padding: 8px 11px; }
  .stats-grid, .tokenomics-grid, .roadmap-timeline, .lore-grid { gap: 15px; }
  .stat-card, .token-card, .roadmap-item, .lore-card, .howto-card { padding: 24px 22px; }
}

/* ============================================
   PROTOCOLS — the 3 on main page (Game / Terminal / Chat)
   ============================================ */
.protocols-section {
  padding: 72px 0 80px;
  background: linear-gradient(180deg, rgba(143,74,48,0.03), transparent);
  border-block: 1px solid var(--border);
}
.protocols-header {
  text-align: center;
  margin-bottom: 32px;
}
.protocols-header h2 {
  font-size: clamp(1.85rem, 4.2vw, 2.45rem);
  margin-bottom: 8px;
}
.protocols-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.protocol-card {
  background: var(--glass);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  transition: transform .22s var(--transition-smooth), border-color .2s, box-shadow .22s;
}
.protocol-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
.protocol-card.game-proto:hover { border-color: var(--orange); }
.protocol-card.term-proto:hover { border-color: #4ecdc4; }
.protocol-card.chat-proto:hover { border-color: #4ecdc4; }
.protocol-card.scanner-proto:hover { border-color: #4ecdc4; }

.proto-icon {
  font-size: 1.85rem;
  line-height: 1;
  margin-bottom: 12px;
  opacity: .95;
}
.proto-head {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 7px;
}
.proto-desc {
  color: rgba(255,248,243,0.66);
  font-size: .91rem;
  line-height: 1.52;
  flex: 1;
  margin-bottom: 18px;
}
.protocol-card .btn-block {
  width: 100%;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: .88rem;
  letter-spacing: .04em;
}

@media (max-width: 1200px) {
  .protocols-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .protocols-grid { grid-template-columns: 1fr; }
  .protocols-section { padding: 56px 0 64px; }
}

/* ============================================
   TRENDING SECTION
   ============================================ */
.trending-section {
  padding: 72px 0;
  background: linear-gradient(180deg, rgba(78,205,196,0.03), transparent);
  border-block: 1px solid var(--border);
}
.trending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.trending-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--cream);
}
.trending-controls {
  display: flex;
  gap: 8px;
}
.trending-nav-btn {
  background: var(--glass);
  border: 1px solid var(--border-strong);
  color: var(--cream);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 1rem;
}
.trending-nav-btn:hover {
  background: rgba(255,248,243,0.08);
  border-color: rgba(255,255,255,0.2);
}
.trending-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
}
.trending-track::-webkit-scrollbar {
  height: 6px;
}
.trending-track::-webkit-scrollbar-track {
  background: rgba(255,248,243,0.05);
  border-radius: 3px;
}
.trending-track::-webkit-scrollbar-thumb {
  background: rgba(255,248,243,0.2);
  border-radius: 3px;
}
.trending-card {
  flex-shrink: 0;
  width: 240px;
  background: var(--glass);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s ease;
}
.trending-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  border-color: rgba(255,255,255,0.2);
}
.trending-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: rgba(255,248,243,0.05);
}
.trending-content {
  padding: 14px;
}
.trending-mcap {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--cream);
  margin-bottom: 6px;
}
.trending-name {
  font-size: 0.86rem;
  color: rgba(255,248,243,0.76);
  line-height: 1.4;
}

/* ============================================
   ENTRY INTRO GATE
   ============================================ */
.intro {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: #0f0a08;
  overflow: hidden;
}
.intro-bg {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(201,111,74,0.06) 0%, transparent 55%);
  pointer-events: none;
}
.intro-inner {
  position: relative; z-index: 1; text-align: center; padding: 34px 20px;
  max-width: 860px; width: min(92vw, 860px);
}
.intro-logo {
  position: relative; display: inline-block; margin-bottom: 14px;
}
.intro-logo img {
  width: 76px; height: 76px; display: block; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 50%; overflow: hidden; background: #c97958; border: 1px solid rgba(255,248,243,0.12);
  box-shadow: 0 10px 34px rgba(0,0,0,0.28);
}
.intro-tear {
  position: absolute; right: 24%; top: 34%; width: 9px; height: 13px;
  background: var(--tear); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  animation: tearFall 2.4s ease-in infinite;
}
.intro-title {
  font-family: var(--font-serif); font-size: clamp(3.4rem, 9vw, 6.2rem); line-height: .92;
  background: linear-gradient(175deg, #fff8f3 0%, #f2d9c9 42%, var(--orange-light) 100%);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 6px;
  letter-spacing: -.02em;
}
.intro-tag {
  font-size: 0.72rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(235, 162, 124, 0.9);
  font-weight: 700; margin-bottom: 8px;
}
.intro-sub {
  color: rgba(255,248,243,0.62); font-size: 0.88rem; margin: 0 auto 30px; max-width: 460px;
}

.intro-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.intro-choices-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.choice-card {
  background: var(--glass);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 18px 18px;
  text-align: left;
  color: var(--cream);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.4,0,0.2,1),
    border-color 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}

.intro-choices-2x2 .choice-card {
  padding: 14px 12px;
  border-radius: 14px;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.intro-choices-2x2 .choice-icon {
  font-size: 1rem;
  margin-bottom: 8px;
}

.intro-choices-2x2 .choice-head {
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.intro-choices-2x2 .choice-desc {
  font-size: 0.7rem;
  margin-bottom: 12px;
}

.intro-choices-2x2 .choice-action {
  font-size: 0.68rem;
}

.choice-card.terminal-card:hover { border-color: #4ecdc4; }
.choice-icon {
  font-size: 1.18rem; line-height: 1; margin-bottom: 10px; opacity: .95;
}
.choice-head {
  font-size: 0.84rem; font-weight: 700; letter-spacing: .08em; margin-bottom: 7px;
}
.choice-desc {
  color: rgba(255,248,243,0.56); font-size: .74rem; line-height: 1.5; flex: 1;
  margin-bottom: 14px;
}
.choice-action {
  font-size: .7rem; font-weight: 700; letter-spacing: .09em;
  color: var(--orange-light); display: inline-flex; align-items: center; gap: 6px;
}
.choice-card.terminal-card .choice-action { color: #4ecdc4; }

.intro-foot {
  font-size: .66rem; color: rgba(255,248,243,0.28); letter-spacing: .11em;
}

/* ============================================
   TERMINAL GAME VIEW (separate immersive mode)
   ============================================ */
.terminal-view {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(8, 6, 5, 0.94);
  display: flex; flex-direction: column;
  justify-content: center;
  font-family: ui-monospace, "SF Mono", "Fira Code", Menlo, monospace;
  color: #9cf0a8;
  padding: clamp(14px, 3vw, 28px);
  backdrop-filter: blur(18px);
}
.terminal-view.hidden { display: none; }

.terminal-bar {
  width: min(680px, 100%);
  margin: 0 auto;
  min-height: 42px;
  background: rgba(20, 15, 12, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 12px;
  flex-shrink: 0;
}
.terminal-bar-left { display: flex; align-items: center; gap: 10px; }
.term-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; opacity: 0.9; }
.term-dot.red { background: #ff5f56; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #27c93f; }
.terminal-title {
  color: rgba(255,248,243,0.52);
  font-size: .64rem;
  letter-spacing: .12em;
  margin-left: 6px;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.terminal-bar-actions { display: flex; gap: 8px; }
.terminal-input-row.hidden,
#terminalChips.hidden {
  display: none !important;
}

.terminal-bar button {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.64);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.terminal-bar button:hover {
  border-color: rgba(255,255,255,0.28);
  color: #fff;
}

.terminal-output {
  width: min(680px, 100%);
  margin: 0 auto;
  flex: 0 1 auto;
  min-height: 300px;
  max-height: min(62vh, 480px);
  overflow-y: auto;
  padding: 20px 18px;
  font-size: 13px;
  line-height: 1.6;
  background: linear-gradient(180deg, rgba(10,7,5,0.98), rgba(13,10,8,0.96));
  border-inline: 1px solid rgba(255,255,255,0.08);
  white-space: pre-wrap; word-break: break-word;
}
.terminal-output .line { margin-bottom: 2px; }
.terminal-output .sys { color: #7f6a58; }
.terminal-output .ok { color: #9cf0a8; }
.terminal-output .warn { color: #f5c16d; }
.terminal-output .err { color: #ff8a7a; }
.terminal-output .pump { color: #ffd27a; font-weight: 700; }
.terminal-output .human { color: #ff9a8a; }

.terminal-input-row {
  width: min(680px, 100%);
  margin: 0 auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(20, 15, 12, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: none;
  border-radius: 0 0 18px 18px;
  font-size: 13px;
}
.terminal-input-row .prompt { color: #4ecdc4; user-select: none; opacity: 0.92; }
.terminal-input-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #d8f0dc;
  font-family: inherit;
  font-size: 13px;
}
.terminal-input-row input::placeholder { color: #5c4c40; }
.terminal-hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: .68rem; color: #5c4c40; letter-spacing: .06em; pointer-events: none;
}
.terminal-hint span { color: #6b8f6f; }

/* Small polish for intro on tiny screens */
@media (max-width: 620px) {
  .intro-choices { grid-template-columns: 1fr; }
  .choice-card { padding: 22px 18px; }
}

/* 3-column support for gate */
.intro-choices.three {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 980px) {
  .intro-choices.three {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .intro-choices.three {
    grid-template-columns: 1fr;
  }
}
.choice-card.chat-card:hover {
  border-color: #4ecdc4;
}
.choice-card.chat-card .choice-action {
  color: #4ecdc4;
}

/* ============================================
   DEDICATED FULL CHAT VIEW (ChatGPT-like)
   ============================================ */
/* Full Chat View — Apple-quality spacious layout */
.chat-view {
  position: fixed; inset: 0; z-index: 99997;
  background: #0f0a08;
  display: flex; flex-direction: column;
  font-family: var(--font-sans);
}
.chat-view.hidden { display: none; }

.chat-view-bar {
  height: 64px;
  background: rgba(18,14,11,0.96);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; flex-shrink: 0;
  backdrop-filter: blur(16px);
}
.chat-view-left {
  display: flex; align-items: center; gap: 12px;
}
.chat-view-avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,248,243,0.12);
}
.chat-view-title {
  font-weight: 800; font-size: 1rem; color: var(--cream); letter-spacing: -.01em;
}
.chat-view-sub {
  font-size: .72rem; color: rgba(160,138,120,0.85); margin-top: 2px;
}
.chat-view-actions {
  display: flex; gap: 6px; align-items: center;
}

/* ── Apple-quality action buttons: NEW / TERMINAL / MAIN / CLOSE ── */
.chat-view-actions button {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  color: rgba(255, 248, 243, 0.72);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.15s ease;
  line-height: 1;
  min-height: 30px;
}
.chat-view-actions button:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--cream);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}
.chat-view-actions button:active {
  transform: translateY(0) scale(0.97);
  background: rgba(255, 255, 255, 0.07);
}
/* CLOSE gets a subtle danger tint on hover */
#chatExit:hover {
  border-color: rgba(255, 90, 90, 0.35);
  color: rgba(255, 180, 170, 0.9);
  background: rgba(255, 60, 60, 0.07);
}
/* NEW gets a tear-color accent on hover */
#fullChatNew:hover {
  border-color: rgba(78, 205, 196, 0.35);
  color: var(--tear);
  background: rgba(78, 205, 196, 0.06);
}

.chat-view-body {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  background: #0a0705;
}
.chat-view-suggestions {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 14px 22px 10px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chat-view-suggestions button {
  background: rgba(255,248,243,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,248,243,0.75); font-size: .77rem; padding: 6px 13px;
  border-radius: 999px; cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
.chat-view-suggestions button:hover {
  border-color: var(--orange); background: rgba(201,111,74,0.1); color: var(--cream);
}

/* Full chat messages — ChatGPT-style generous spacing */
.chat-view-messages {
  flex: 1; overflow-y: auto; padding: 32px 24px 24px;
  display: flex; flex-direction: column; gap: 18px;
  scrollbar-width: thin; scrollbar-color: rgba(255,248,243,0.08) transparent;
}
.chat-view-messages::-webkit-scrollbar { width: 4px; }
.chat-view-messages::-webkit-scrollbar-thumb { background: rgba(255,248,243,0.08); border-radius: 99px; }

.chat-view-msg {
  display: flex; gap: 12px; max-width: 78%;
}
.chat-view-msg.user {
  align-self: flex-end; flex-direction: row-reverse; max-width: 72%;
}
.chat-view-avatar-msg {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
  border: 1px solid rgba(255,248,243,0.1);
}

/* Full chat bubbles — iOS-like proportions */
.chat-view-bubble {
  padding: 12px 16px; border-radius: 20px; font-size: .95rem; line-height: 1.56;
  max-width: 100%; word-break: break-word;
}
.chat-view-msg.bot .chat-view-bubble {
  background: rgba(255,248,243,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px; color: var(--cream);
}
.chat-view-msg.user .chat-view-bubble {
  background: linear-gradient(145deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff; border-bottom-right-radius: 4px;
}

/* Typing indicator */
.chat-view-typing {
  display: flex; gap: 5px; align-items: center;
  padding: 12px 16px; background: rgba(255,248,243,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px; border-bottom-left-radius: 4px; width: fit-content;
}
.chat-view-typing span {
  width: 5px; height: 5px; background: rgba(160,138,120,0.7); border-radius: 50%;
  animation: dotBounce 1.15s infinite;
}
.chat-view-typing span:nth-child(2) { animation-delay: .16s; }
.chat-view-typing span:nth-child(3) { animation-delay: .32s; }

/* Full chat input — Apple Notes / Messages style */
.chat-view-input {
  flex-shrink: 0; display: flex; gap: 10px;
  padding: 14px 20px 18px; background: rgba(18,14,11,0.95);
  border-top: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
}
.chat-view-input input {
  flex: 1; background: rgba(255,248,243,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; padding: 13px 20px; color: var(--cream);
  font-size: 0.97rem; outline: none; font-family: var(--font-sans);
  transition: border-color .18s, background .18s;
}
.chat-view-input input::placeholder { color: rgba(255,248,243,0.28); }
.chat-view-input input:focus { border-color: var(--orange); background: rgba(255,248,243,0.08); }
.chat-view-input button {
  background: var(--orange); color: #fff; border: none; border-radius: 999px;
  padding: 0 24px; font-weight: 700; font-size: .94rem; cursor: pointer;
  transition: background .18s, transform .15s;
  white-space: nowrap; flex-shrink: 0;
}
.chat-view-input button:hover { background: var(--orange-light); transform: scale(1.02); }
.chat-view-input button:active { transform: scale(0.97); }

@media (max-width: 720px) {
  .chat-view-bar { padding: 0 14px; height: 58px; }
  .chat-view-messages { padding: 20px 14px 16px; }
  .chat-view-input { padding: 12px 14px 16px; }
  .chat-view-msg, .chat-view-msg.user { max-width: 88%; }
}









/* Terminal styles (Grok Builder version — exact spec) */
.gb-terminal-wrapper {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
}

.gb-terminal-header {
  background: #21262d;
  padding: 7px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #8b949e;
  font-family: 'Roboto Mono', monospace;
}

.gb-terminal-output {
  background: #000000;
  color: #39ff14;
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  padding: 13px;
  height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.42;
  border-bottom: 1px solid #1f242b;
}

.gb-terminal-output .line {
  margin-bottom: 2px;
  opacity: 0;
  animation: gbTermLine 0.16s forwards;
}

.gb-terminal-output .line.error { color: #f85149; }
.gb-terminal-output .line.success { color: #3fb950; }
.gb-terminal-output .line.warning { color: #d29922; }
.gb-terminal-output .line.info { color: #79b8ff; }

@keyframes gbTermLine { to { opacity: 1; } }

.gb-terminal-input-line {
  background: #000000;
  display: flex;
  align-items: center;
  padding: 9px 13px;
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  color: #39ff14;
}

.gb-terminal-input-line span {
  color: #58a6ff;
  margin-right: 6px;
  user-select: none;
}

.gb-terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #39ff14;
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
}

.gb-terminal-toolbar {
  padding: 7px 11px;
  background: #161b22;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border-top: 1px solid #30363d;
}

.gb-term-btn {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid #30363d;
  background: #21262d;
  color: #c9d1d9;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
}

.gb-term-btn:hover { background: #30363d; }

.gb-autocomplete-hint {
  font-size: 10px;
  color: #4a525e;
  padding: 0 13px 6px;
  font-family: 'Roboto Mono', monospace;
}

/* Data Explorer under terminal */
.gb-data-explorer {
  margin-top: 20px;
}

.gb-explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.gb-filter-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.gb-filter-row input,
.gb-filter-row select {
  background: #161b22;
  border: 1px solid #30363d;
  color: #c9d1d9;
  padding: 5px 9px;
  font-size: 11px;
  border-radius: 3px;
  font-family: 'Roboto Mono', monospace;
}

.gb-filter-row input { min-width: 200px; }

.gb-data-section { margin-bottom: 16px; }
.gb-data-section h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: #58a6ff;
  font-family: 'Roboto Mono', monospace;
}

/* Bridge Chat */
.gb-chat-wrapper {
  max-width: 780px;
  margin: 0 auto;
}

.gb-chat-box {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gb-chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gb-message {
  max-width: 76%;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  line-height: 1.4;
  animation: gbMsgPop 0.14s ease;
}

@keyframes gbMsgPop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.gb-message.user {
  align-self: flex-end;
  background: #1f6feb;
  color: #fff;
  border-bottom-right-radius: 2px;
}

.gb-message.system {
  align-self: flex-start;
  background: #21262d;
  color: #c9d1d9;
  border-bottom-left-radius: 2px;
}

.gb-chat-input-row {
  display: flex;
  border-top: 1px solid #30363d;
  background: #0d1117;
}

.gb-chat-input {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: #c9d1d9;
  font-size: 13.5px;
}

.gb-chat-send {
  background: #58a6ff;
  color: #0d1117;
  border: none;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.lang-menu.open,
.lang-picker.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.terminal-nav-btn {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.64);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.terminal-nav-btn:hover {
  border-color: rgba(255,255,255,0.28);
  color: #fff;
}

.terminal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.terminal-coming-soon {
  background: #000;
}

.terminal-coming-soon .terminal-output {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 18px;
}

.terminal-coming-soon-message {
  display: grid;
  gap: 0.7rem;
  width: min(100%, 360px);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
  color: rgba(255,248,243,0.78);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.04em;
}

.terminal-coming-soon-title {
  font-size: clamp(0.74rem, 1.4vw, 0.82rem);
  color: rgba(255,248,243,0.52);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.terminal-coming-soon-line {
  font-size: clamp(0.92rem, 1.9vw, 1.05rem);
  color: #d9e8da;
}

.terminal-coming-soon-meta {
  font-size: clamp(0.74rem, 1.3vw, 0.82rem);
  color: rgba(255,248,243,0.48);
}

.hero-title,
h1.main-title,
.intro-title {
  font-size: clamp(2rem, 4.8vw, 3.9rem) !important;
  letter-spacing: -0.03em;
  line-height: 0.98;
  font-weight: 600;
}

h2 {
  font-size: clamp(1.05rem, 2.2vw, 1.55rem) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3,
.choice-head,
.proto-head {
  font-size: clamp(0.88rem, 1.4vw, 1.05rem);
  font-weight: 600;
}

p,
li,
span {
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  line-height: 1.58;
}

nav a,
.nav-link {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

button,
.btn {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.tagline,
.subtitle,
.hero-tagline,
.intro-sub,
.ca-sub,
.section-sub {
  font-size: clamp(0.82rem, 1.1vw, 0.96rem);
  opacity: 0.68;
  font-weight: 400;
}

.card-title,
.choice-head,
.proto-head {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-description,
.choice-desc,
.proto-desc {
  font-size: 0.76rem;
  opacity: 0.58;
  line-height: 1.5;
}

section {
  padding: clamp(2.4rem, 5vw, 4.8rem) clamp(1.2rem, 4vw, 2.8rem);
}

.card,
.choice-card,
.protocol-card,
.howto-card,
.token-card,
.roadmap-item,
.lore-card,
.stat-card {
  padding: 1.15rem;
  gap: 0.55rem;
}

.container {
  width: min(1040px, 92vw);
}

.header-inner {
  width: min(1100px, 93vw);
  padding: 11px 0;
}

.brand {
  gap: 10px;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
}

.brand-logo {
  width: 32px;
  height: 32px;
}

.nav {
  gap: 18px;
}

.hero {
  min-height: calc(86dvh - 66px);
  padding: 42px 4vw 54px;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  padding: 7px 14px;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  margin-bottom: 18px;
}

.hero-quote {
  padding: 14px 18px;
  margin-bottom: 22px;
  border-left-width: 2px;
}

.hero-quote blockquote {
  font-size: 0.9rem;
  line-height: 1.42;
}

.hero-quote cite {
  font-size: 0.72rem;
}

.hero-actions {
  gap: 10px;
}

.btn {
  padding: 10px 16px;
  border-radius: 999px;
}

.btn-lg {
  padding: 12px 20px;
  font-size: 0.76rem;
}

.hero-flower {
  width: clamp(132px, 14vw, 190px);
  right: 7vw;
  bottom: 10vh;
  filter: drop-shadow(0 18px 36px rgba(0,0,0,0.34));
}

.stats-section {
  padding: 54px 0;
}

.stats-header {
  margin-bottom: 18px;
}

.stats-title {
  font-size: 1.1rem;
  gap: 9px;
}

.stat-card {
  padding: 16px 14px;
  border-radius: 14px;
}

.stat-card-label {
  font-size: 0.62rem;
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: 1.2rem;
}

.stat-card-change,
.stats-updated {
  font-size: 0.72rem;
}

.ca-box {
  max-width: 760px;
  padding: 14px 16px;
  gap: 10px;
}

.link-card {
  padding: 11px 14px;
  border-radius: 12px;
}

.link-icon {
  font-size: 1rem;
}

.speech-bubble {
  max-width: 480px;
  padding: 16px 18px;
  border-radius: 16px;
}

#speechText {
  font-size: 0.92rem;
  line-height: 1.48;
}

.mascot-img {
  width: 96px;
  height: 96px;
}

.button-grid {
  gap: 10px;
}

.funny-btn {
  padding: 14px 14px;
  font-size: 0.8rem;
  border-radius: 14px;
}

.funny-btn .emoji {
  font-size: 1.15rem;
  margin-bottom: 5px;
}

.game-header {
  margin-bottom: 18px;
}

.stat {
  padding: 9px 14px;
  min-width: 72px;
}

.stat-label {
  font-size: 0.62rem;
}

.stat-value {
  font-size: 1.08rem;
}

.game-header-tools {
  gap: 8px;
}

.overlay-content {
  padding: 24px 20px;
}

.overlay-content h3 {
  font-size: 1.24rem;
}

.overlay-content p,
.game-controls-hint {
  font-size: 0.76rem;
}

.howto-grid,
.tokenomics-grid,
.roadmap-timeline,
.lore-grid,
.protocols-grid {
  gap: 12px;
}

.footer {
  padding: 34px 18px 44px;
}

.footer-logo {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
}

.footer p {
  font-size: 0.84rem;
}

.back-top {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

button,
a,
.clickable {
  min-height: 44px;
  min-width: 44px;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
  .header-inner {
    display: flex;
  }
  .game-section {
    padding: 36px 0 46px;
  }

  .game-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .game-header > div:first-child,
  .game-stats,
  .game-header-tools {
    width: 100%;
  }

  .game-stats {
    justify-content: space-between;
  }

  .game-header-tools {
    margin-left: 0;
    justify-content: flex-end;
  }

  .game-controls-hint-inline {
    justify-content: flex-start;
  }

  .stat {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    overflow: hidden;
  }

  .stat-label {
    font-size: 0.52rem;
    letter-spacing: 0.05em;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .stat-value {
    font-size: 0.88rem;
  }

  .game-header-tools {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .game-controls-hint {
    gap: 8px;
    font-size: 0.72rem;
  }

  .game-controls-hint span {
    flex: 1 1 calc(50% - 8px);
    min-width: 128px;
    padding: 7px 10px;
  }

  .overlay-content {
    width: min(100%, 330px);
    padding: 24px 16px;
  }

  .overlay-content h3 {
    font-size: 1.36rem;
  }

  .overlay-content p {
    font-size: 0.84rem;
    margin-bottom: 18px;
  }

  .game-over-summary {
    gap: 8px;
  }

  .game-over-stat {
    flex: 1 1 120px;
    min-width: 0;
    padding: 10px 12px;
  }

  .game-over-stat .stat-value {
    font-size: 1.15rem;
  }

  .header-inner {
    padding: 0.75rem 0;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .nav a:not(.term-launch):not(.chat-launch) {
    display: none;
  }

  .hero-title,
  .intro-title {
    font-size: clamp(1.7rem, 8.2vw, 2.65rem) !important;
    text-align: center;
  }

  .hero-content {
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions button,
  .hero-actions a {
    width: 100%;
    justify-content: center;
    padding: 0.78rem 1rem;
    font-size: 0.76rem;
  }

  .hero-flower,
  #flower-avatar,
  .mascot-img {
    width: clamp(80px, 25vw, 140px);
    height: auto;
  }

  .protocols-grid,
  .intro-choices,
  .button-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ca-links {
    flex-direction: column;
    gap: 1rem;
  }

  .choice-card,
  .protocol-card,
  .link-card {
    width: 100%;
    max-width: 100%;
  }

  .chat-panel,
  .chat-view {
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }

  .chat-view-input,
  .chat-input-row {
    padding: 0.75rem;
    padding-bottom: max(env(safe-area-inset-bottom), 0.75rem);
  }

  .full-chat-suggestions,
  .chat-suggestions {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .full-chat-suggestions::-webkit-scrollbar,
  .chat-suggestions::-webkit-scrollbar {
    display: none;
  }

  .chat-bubble,
  .chat-view-bubble {
    max-width: 85%;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  .terminal-view,
  .terminal-output {
    font-size: 0.75rem;
    padding: 1rem;
  }

  .lang-btn,
  .lang-option {
    font-size: 0.68rem;
  }

  .intro-sub,
  .hero-tagline {
    text-align: center;
    padding: 0 1rem;
  }

  .hero-quote,
  blockquote {
    font-size: 0.78rem;
    margin: 0.75rem;
    padding: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero-title,
  .intro-title {
    font-size: clamp(1.5rem, 10vw, 2.2rem) !important;
  }

  .lang-btn,
  .lang-menu {
    max-width: 122px;
    font-size: 0.64rem;
  }

  .terminal-nav-btn {
    font-size: 10px;
    padding: 5px 10px;
  }

  .hero {
    padding: 32px 0 40px;
  }

  .hero-flower {
    width: 108px;
  }

  .game-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .stat {
    padding: 7px 5px;
    border-radius: 12px;
  }

  .stat-label {
    font-size: 0.47rem;
    letter-spacing: 0.04em;
  }

  .stat-value {
    font-size: 0.82rem;
  }

  .game-controls-hint {
    flex-direction: column;
    align-items: stretch;
  }

  .game-controls-hint span {
    min-width: 0;
    width: 100%;
    flex-basis: auto;
  }

  .overlay-content {
    width: min(100%, 300px);
    padding: 20px 14px;
  }

  .speech-bubble {
    padding: 13px 14px;
  }
}

.gb-chat-send:hover { background: #79b8ff; }

.gb-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 2px 2px;
  max-width: 780px;
  margin: 0 auto;
}

.gb-suggestion-chip {
  background: #21262d;
  border: 1px solid #30363d;
  color: #c9d1d9;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.1s;
}

.gb-suggestion-chip:hover {
  background: #484f58;
  border-color: #58a6ff;
}

/* Modal for details (shared) */
.gb-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.gb-modal.active { display: flex; }

.gb-modal-content {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  width: 92%;
  max-width: 440px;
  padding: 16px;
  color: #c9d1d9;
}

.gb-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.gb-modal-close {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.gb-status {
  font-size: 10px;
  color: #8b949e;
  font-family: 'Roboto Mono', monospace;
  margin-top: 6px;
}

/* Responsive tweaks for the builder */
@media (max-width: 640px) {
  .gb-game-screen { width: 100%; }
  .gb-data-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PUBLIC LAUNCH POLISH for MISANTHROPIC RUN
   ============================================ */
.game-wrapper {
  position: relative;
}
.game-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,248,243,0.06);
  pointer-events: none;
}

/* Canvas gets a premium "active" feel */
#gameCanvas {
  background: #1a120f;
  box-shadow: inset 0 60px 80px rgba(0,0,0,0.25);
}

/* ============================================
   X PROFILE PILL (replaces broken Share button)
   ============================================ */
.x-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #000000;
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  border: 1px solid rgba(255,255,255,0.12);
  min-height: 44px;
}
.x-profile-pill:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  color: #ffffff;
}
.x-profile-pill:active { transform: scale(0.98); }
.x-profile-icon { flex-shrink: 0; }

/* Mobile nav backdrop */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }

.nav-close {
  display: none;
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px;
  background: var(--glass-strong); border: 1px solid var(--border-strong);
  border-radius: 50%; color: var(--cream); font-size: 1.25rem;
  cursor: pointer; line-height: 1; transition: background 0.2s ease, transform 0.2s ease;
}
.nav-close:active { transform: scale(0.94); }

/* Hero scroll indicator — mobile only */
.hero-scroll-indicator {
  display: none;
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 3; color: rgba(255,248,243,0.65); text-decoration: none;
  padding: 12px; min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.hero-scroll-chevron {
  display: block; width: 14px; height: 14px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* Terminal mobile command chips */
.terminal-chips {
  display: none;
  flex-wrap: wrap; gap: 8px;
  padding: 10px 20px 16px;
  background: #120e0b; border-top: 1px solid #2a211d;
}
.term-chip {
  padding: 8px 14px; min-height: 44px;
  background: #1f1813; border: 1px solid #3a2f27;
  border-radius: 999px; color: #4ecdc4;
  font-family: ui-monospace, monospace; font-size: 14px;
  cursor: pointer; transition: background 0.2s ease, transform 0.2s ease;
}
.term-chip:active { transform: scale(0.96); background: #2a211d; }

/* Game mobile touch controls */
.game-mobile-controls {
  display: none;
  justify-content: center; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: rgba(23,16,14,0.92);
  border-top: 1px solid var(--border);
}
.game-touch-btn {
  min-width: 56px; min-height: 56px;
  border-radius: 14px;
  background: var(--glass-strong); border: 1px solid var(--border-strong);
  color: var(--cream); font-size: 1.4rem; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  transition: background 0.2s ease, transform 0.15s ease;
  user-select: none; -webkit-user-select: none;
}
.game-touch-btn:active { transform: scale(0.92); background: rgba(201,111,74,0.25); }
.game-touch-jump { min-width: 72px; background: rgba(78,205,196,0.15); border-color: #4ecdc4; color: #4ecdc4; }

/* ============================================
   MOBILE DEDICATED LAYOUT (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  body { font-size: 15px; line-height: 1.6; padding-top: 62px; }
  h2 { font-size: clamp(22px, 6vw, 28px); line-height: 1.35; }

  /* Full-screen slide-in hamburger menu */
  .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; padding: 10px;
  }
  .nav-close { display: flex; align-items: center; justify-content: center; }
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(320px, 88vw); max-width: 100%;
    flex-direction: column; align-items: stretch;
    background: rgba(15,10,8,0.98);
    padding: 72px 24px 32px; gap: 0;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    opacity: 1; pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 210; overflow-y: auto;
  }
  .nav.open { transform: translateX(0); pointer-events: auto; }
  .nav a, .nav .term-launch, .nav .chat-launch {
    display: flex; align-items: center;
    min-height: 48px; padding: 12px 8px;
    font-size: 1rem; border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .header-actions .lang-picker { display: none; }

  /* Hero — larger fluid type, no heavy canvas particles */
  .hero { min-height: 92dvh; padding: 88px 5vw 72px; }
  .hero h1, .intro-title {
    font-size: clamp(2.8rem, 14vw, 4.2rem) !important;
    line-height: 0.95;
  }
  .hero-tagline, .intro-sub { font-size: clamp(1rem, 4.2vw, 1.15rem); }
  .hero-particles, .particle-canvas { display: none !important; }
  .hero-scroll-indicator { display: flex; }

  /* Terminal lite on mobile */
  .terminal-chips { display: flex; }
  .terminal-output, .terminal-input-row, .terminal-input input {
    font-size: 14px !important;
  }
  .gb-terminal-input-row input,
  .gb-terminal-output {
    font-size: 14px !important;
  }

  /* Game touch controls visible */
  .game-mobile-controls { display: flex; }
  .game-wrapper { overflow: hidden; }
  #gameCanvas { max-width: 100%; touch-action: none; }

  /* Single-column grids + card padding */
  .stats-grid, .tokenomics-grid, .roadmap-timeline, .lore-grid,
  .howto-grid, .protocols-grid, .button-grid, .ca-links {
    grid-template-columns: 1fr !important;
  }
  .stat-card, .token-card, .roadmap-item, .lore-card, .howto-card,
  .protocol-card, .link-card { padding: 16px; min-width: 0; }

  .game-header { flex-direction: column; align-items: flex-start; }
  .game-stats { flex-wrap: wrap; width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .hero-actions .x-profile-pill { width: 100%; justify-content: center; }

  .chat-panel { bottom: 92px; right: 12px; left: 12px; width: auto; height: 460px; }
  .chat-fab { right: 12px; bottom: 12px; min-width: 56px; min-height: 56px; }
  .back-top { right: 12px; bottom: 88px; min-width: 44px; min-height: 44px; }

  /* Touch targets for all buttons */
  .btn, .funny-btn, .faq-item summary, .lang-btn {
    min-height: 44px;
  }

  .container { width: min(1180px, 92vw); padding-inline: 8px; }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    overflow-x: clip;
  }

  body {
    padding-top: calc(62px + env(safe-area-inset-top));
  }

  .container,
  .header-inner,
  .intro-inner,
  .hero-content {
    width: min(100%, 420px);
    max-width: 420px;
    margin-inline: auto;
  }

  .container {
    padding-inline: 0;
  }

  .header {
    padding-top: env(safe-area-inset-top);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 10px 16px;
    min-height: 62px;
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand span {
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav {
    width: min(300px, calc(100vw - 24px));
    padding: calc(68px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .nav a,
  .nav .term-launch {
    min-height: 50px;
    padding: 12px 6px;
    font-size: 0.98rem;
  }

  .intro {
    min-height: 100svh;
    min-height: 100dvh;
    height: 100svh;
    overflow-y: auto;
    align-items: flex-start;
    padding: calc(84px + env(safe-area-inset-top)) 0 calc(28px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .intro-inner {
    padding: 0 16px;
    text-align: center;
  }

  .intro-logo {
    margin-bottom: 12px;
  }

  .intro-logo img {
    width: 64px;
    height: 64px;
  }

  .intro-tag,
  .hero-badge,
  .hero-micro-live,
  .intro-foot {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .intro-tag,
  .hero-badge {
    letter-spacing: 0.12em;
  }

  .intro-title,
  .hero h1 {
    font-size: clamp(2.4rem, 12vw, 3.5rem) !important;
    line-height: 0.96;
    text-align: center;
  }

  .intro-sub,
  .hero-tagline,
  .section-sub,
  .ca-sub {
    max-width: 100%;
    padding: 0;
    font-size: 0.96rem;
    text-align: center;
  }

  .intro-choices,
  .protocols-grid,
  .button-grid,
  .stats-grid,
  .howto-grid,
  .tokenomics-grid,
  .roadmap-timeline,
  .lore-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .choice-card,
  .protocol-card,
  .stat-card,
  .howto-card,
  .token-card,
  .roadmap-item,
  .lore-card,
  .link-card,
  .funny-btn {
    width: 100%;
    min-width: 0;
    padding: 16px;
    border-radius: 16px;
  }

  .protocols-section,
  .stats-section,
  .ca-section,
  .buttons-section,
  .howto-section,
  .tokenomics-section,
  .roadmap-section,
  .faq-section,
  .lore,
  .game-section {
    padding-top: 40px;
    padding-bottom: 44px;
  }

  .hero {
    min-height: auto;
    padding: calc(28px + env(safe-area-inset-top)) 0 38px;
    overflow: clip;
  }

  .hero-content {
    padding: 0 16px;
    text-align: center;
  }

  .hero-quote {
    margin: 0 0 22px;
    padding: 14px 16px;
    text-align: left;
    border-left-width: 3px;
  }

  .hero-quote blockquote {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-actions .btn,
  .hero-actions .x-profile-pill {
    width: 100%;
    justify-content: center;
  }

  .hero-flower,
  #flower-avatar {
    position: relative;
    right: auto;
    bottom: auto;
    transform: none;
    width: min(46vw, 172px);
    margin: 18px auto 0;
    display: block;
    opacity: 0.95;
  }

  .hero-scroll-indicator {
    display: none;
  }

  .stats-header,
  .game-header {
    gap: 12px;
    text-align: left;
  }

  .stats-title {
    font-size: 1.08rem;
    gap: 8px;
  }

  .ca-box {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 16px;
    gap: 12px;
    text-align: left;
  }

  .ca-value {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,248,243,0.03);
    font-size: 0.8rem;
    line-height: 1.55;
  }

  .ca-box .btn-copy {
    width: 100%;
  }

  .ca-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .link-card {
    justify-content: flex-start;
    padding: 14px 16px;
  }

  .speech-bubble {
    max-width: 100%;
    padding: 16px;
    border-radius: 16px;
  }

  .mascot-stage {
    margin-bottom: 28px;
  }

  .game-controls-hint-inline,
  .game-controls-hint {
    justify-content: center;
  }

  .game-header > div:first-child,
  .game-stats,
  .game-header-tools {
    width: 100%;
  }

  .game-stats {
    justify-content: space-between;
    gap: 8px;
  }

  .stat {
    flex: 1 1 0;
    min-width: 0;
  }

  .chat-panel {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    height: min(68svh, 520px);
    border-radius: 22px;
  }

  .chat-fab {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .footer {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .container,
  .header-inner,
  .intro-inner,
  .hero-content {
    width: min(100%, 360px);
    max-width: 360px;
  }

  .header-inner,
  .intro-inner,
  .hero-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .intro-title,
  .hero h1 {
    font-size: clamp(2.15rem, 11vw, 3rem) !important;
  }

  .hero-badge,
  .hero-micro-live,
  .intro-tag {
    font-size: 0.62rem;
  }

  .ca-value {
    font-size: 0.74rem;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    .intro,
    .chat-view,
    .chat-panel {
      min-height: -webkit-fill-available;
    }
  }
}

@media (max-width: 768px) {
  body {
    padding-top: calc(102px + env(safe-area-inset-top));
  }

  .header {
    padding-top: env(safe-area-inset-top);
  }

  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    row-gap: 8px;
    column-gap: 10px;
    width: min(100%, 400px);
    padding: 10px 14px 10px;
    min-height: auto;
  }

  .brand {
    gap: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  .brand span {
    display: inline;
    color: rgba(255,248,243,0.88);
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .header-actions,
  .menu-toggle,
  .nav-close,
  .nav-backdrop {
    display: none !important;
  }

  .nav {
    position: static;
    inset: auto;
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 0;
    background: transparent;
    border: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    min-height: auto;
  }

  .nav a,
  .nav .term-launch {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 6px 6px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 999px;
    background: rgba(255,248,243,0.028);
    backdrop-filter: blur(10px);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    color: rgba(255,248,243,0.82);
    text-align: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .nav a::after,
  .nav .term-launch::after {
    display: none;
  }

  .nav .term-launch {
    grid-column: 1 / -1;
    min-height: 31px;
    padding: 6px 10px;
    color: #8fe7d9;
    background: rgba(78,205,196,0.055);
    border-color: rgba(78,205,196,0.14);
  }

  .nav a:hover,
  .nav .term-launch:hover,
  .nav a:active,
  .nav .term-launch:active {
    transform: none;
    background: rgba(255,248,243,0.042);
    border-color: rgba(255,255,255,0.1);
  }

  .terminal-view {
    justify-content: flex-start;
    padding: calc(10px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
    background: rgba(8, 6, 5, 0.97);
    backdrop-filter: blur(18px);
  }

  .terminal-bar,
  .terminal-output,
  .terminal-input-row {
    width: 100%;
    max-width: none;
  }

  .terminal-bar {
    min-height: 40px;
    padding: 0 10px;
    border-radius: 16px 16px 0 0;
    background: rgba(24, 18, 15, 0.98);
  }

  .terminal-title {
    flex: 1;
    min-width: 0;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .terminal-actions {
    gap: 6px;
  }

  .terminal-nav-btn,
  .terminal-bar button {
    font-size: 8.5px;
    padding: 5px 7px;
  }

  .terminal-output {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: calc(100dvh - 134px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 16px 14px;
    font-size: 13.5px;
    line-height: 1.78;
    color: rgba(232,244,235,0.92);
    background: linear-gradient(180deg, rgba(11,8,6,0.985), rgba(16,12,9,0.965));
  }

  .terminal-input-row {
    padding: 11px 14px;
    font-size: 13px;
    border-radius: 0 0 16px 16px;
    background: rgba(24, 18, 15, 0.98);
  }

  .terminal-input-row input {
    font-size: 13px;
  }

  .terminal-coming-soon .terminal-output {
    padding: 18px 14px;
  }

  .terminal-coming-soon-message {
    width: min(100%, 340px);
    max-width: 340px;
    padding: 16px 14px;
    gap: 0.6rem;
    border-radius: 14px;
    margin-inline: auto;
    background: rgba(255,255,255,0.03);
  }

  .terminal-coming-soon-title {
    font-size: 0.66rem;
  }

  .terminal-coming-soon-line {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .terminal-coming-soon-meta {
    font-size: 0.75rem;
    line-height: 1.45;
  }
}

@media (max-width: 420px) {
  body {
    padding-top: calc(98px + env(safe-area-inset-top));
  }

  .header-inner {
    width: min(100%, 360px);
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav {
    gap: 6px;
  }

  .nav a,
  .nav .term-launch {
    font-size: 0.58rem;
    letter-spacing: 0.05em;
    padding: 6px 4px;
  }

  .terminal-output {
    font-size: 13px;
    padding: 14px 12px;
  }

  .terminal-coming-soon-line {
    font-size: 0.9rem;
  }
}

@media (max-width: 390px) {
  .hero h1 { font-size: clamp(2.5rem, 13vw, 3.6rem) !important; }
  .ca-box { padding: 16px; }
  .ca-value { font-size: 0.68rem; word-break: break-all; }
}

/* ============================================================
   FULL CHAT — Quick Reply Suggestion Chips (Apple quality)
   ============================================================ */
.full-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 14px 22px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

.full-chat-suggestions button {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  color: rgba(255, 248, 243, 0.70);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 7px 15px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.15s ease;
  line-height: 1.3;
}

.full-chat-suggestions button:hover {
  background: rgba(201, 111, 74, 0.10);
  border-color: rgba(201, 111, 74, 0.35);
  color: var(--cream);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.full-chat-suggestions button:active {
  transform: translateY(0) scale(0.97);
  background: rgba(201, 111, 74, 0.06);
}

/* Mobile: wrap chips nicely */
@media (max-width: 768px) {
  .full-chat-suggestions {
    padding: 10px 14px 14px;
    gap: 6px;
  }
  .full-chat-suggestions button {
    font-size: 0.72rem;
    padding: 6px 12px;
  }
  .chat-view-actions button {
    font-size: 0.65rem;
    padding: 5px 9px;
    letter-spacing: 0.04em;
  }
}

/* ============================================
   CRYING EFFECT — flower avatar shakes & shifts hue on message send
   ============================================ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.crying {
  animation: shake 0.2s infinite;
  filter: hue-rotate(200deg) brightness(0.8);
}
