:root {
  --ink: #05070d;
  --ink-2: #0b1020;
  --hoodie: #12182c;
  --flame: #0052ff;
  --flame-deep: #003de0;
  --ember: #6b9fff;
  --paper: #e8eef8;
  --paper-dim: rgba(232, 238, 248, 0.72);
  --rust: #3d6bff;
  --steel: #7a88a6;
  --line: rgba(232, 238, 248, 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Dela Gothic One", Impact, "Arial Black", sans-serif;
  --font-body: Outfit, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --fs-hero: clamp(64px, 14vw, 196px);
  --fs-display: clamp(44px, 9vw, 120px);
  --fs-title: clamp(32px, 5.6vw, 72px);
  --fs-body: 1.125rem;
  --fs-caption: 1.125rem;
  --fs-lockup: clamp(1.55rem, 3.8vw, 2.85rem);
  --fs-kicker: 0.625rem;
  --fs-ui: 0.72rem;
  --lh-display: 0.88;
  --lh-title: 1.04;
  --lh-lockup: 0.98;
  --lh-body: 1.55;
  --track-ui: 0.16em;
  --track-kicker: 0.22em;
  --track-lockup: -0.035em;
  --pad: clamp(20px, 6vw, 88px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html {
  scroll-behavior: auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--flame);
  color: #fff;
}

.skip:focus {
  top: 16px;
}

/* Preloader */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.load-mark {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
}

.load-mark img {
  position: absolute;
  inset: 8px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.loader-ring {
  position: absolute;
  inset: 0;
  width: 88px;
  height: 88px;
  transform-origin: center;
  animation: spin 0.9s linear infinite;
}

.loader-ring circle {
  fill: none;
  stroke: var(--flame);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 72 180;
}

.load-caption {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
  color: var(--ember);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Nav */

.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 22px;
  height: 48px;
  padding: 0 16px 0 10px;
  background: rgba(5, 7, 13, 0.48);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  border-radius: 999px;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.nav.is-away {
  transform: translateX(-50%) translateY(-80px);
  opacity: 0;
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.nav-mark img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-body);
  font-size: var(--fs-ui);
  font-weight: 500;
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
  color: var(--paper-dim);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--paper);
}

.nav-links .nav-app {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--flame);
  color: var(--ink);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.nav-links .nav-app:hover {
  background: var(--ember);
  color: var(--ink);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--fs-ui);
  font-weight: 600;
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-flame {
  background: var(--flame);
  color: #fff;
}

.btn-flame:hover {
  background: var(--flame-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ember);
  color: var(--ember);
}

/* Hero */

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero-bg {
  inset: -12% 0;
  background-image: url("../img/bars.webp?v=20260911c");
}

.hero-fog {
  background:
    linear-gradient(180deg, rgba(5, 7, 13, 0.28) 0%, transparent 28%, rgba(5, 7, 13, 0.2) 62%, var(--ink) 100%),
    radial-gradient(ellipse at 50% 78%, rgba(0, 82, 255, 0.22), transparent 55%);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  top: 10vh;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 var(--pad);
  pointer-events: none;
}

.hero-copy .kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-kicker);
  font-weight: 500;
  letter-spacing: var(--track-kicker);
  text-transform: uppercase;
  color: var(--ember);
  text-shadow: 0 4px 16px rgba(5, 7, 13, 0.8);
}

.hero-title {
  position: static;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-hero);
  line-height: var(--lh-display);
  letter-spacing: -0.04em;
  color: var(--paper);
  pointer-events: none;
  text-shadow: 0 10px 40px rgba(5, 7, 13, 0.55);
}

.hero-title span {
  display: block;
  margin-top: 0.02em;
  font-size: 0.42em;
  letter-spacing: 0.08em;
  color: var(--flame);
}

.hero-lead {
  position: static;
  width: min(28em, 100%);
  margin: 0;
  text-align: center;
  font-size: var(--fs-caption);
  font-weight: 500;
  line-height: 1.4;
  color: var(--paper);
  text-wrap: pretty;
  text-shadow: 0 6px 24px rgba(5, 7, 13, 0.8);
}

.hero-cta {
  position: static;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: auto;
}

.home-coin {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  transform: translateX(-50%);
  width: min(36rem, calc(100vw - 40px));
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.82);
  text-align: center;
  pointer-events: auto;
}

.home-coin .kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-kicker);
  font-weight: 500;
  letter-spacing: var(--track-kicker);
  text-transform: uppercase;
  color: var(--ember);
}

.home-ticker {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.home-ca {
  margin: 8px 0 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--paper-dim);
  word-break: break-all;
}

.home-coin-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.home-coin-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 500;
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
}

.home-coin-links a:hover,
.home-coin-links a:focus-visible {
  border-color: var(--ember);
  color: var(--ember);
}

.home-coin-links a.is-main {
  background: var(--flame);
  border-color: var(--flame);
  color: var(--ink);
}

.home-coin-links a.is-main:hover,
.home-coin-links a.is-main:focus-visible {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--ink);
}

/* Shared pin panels */

.panel {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.panel-bg {
  position: absolute;
  inset: -16% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.panel-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.14) 0%, transparent 42%, rgba(5, 7, 13, 0.2) 100%);
}

.caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 72px var(--pad) calc(28px + env(safe-area-inset-bottom));
  padding-right: max(var(--pad), 152px);
  background: linear-gradient(180deg, transparent 0%, rgba(5, 7, 13, 0.55) 38%, rgba(5, 7, 13, 0.94) 100%);
  pointer-events: none;
}

.panel .caption {
  padding-left: var(--pad);
  padding-right: max(var(--pad), 152px);
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
}

.caption .kicker {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-kicker);
  font-weight: 500;
  letter-spacing: var(--track-kicker);
  text-transform: uppercase;
  color: var(--ember);
}

.caption p:not(.kicker),
.panel .caption p:not(.kicker) {
  margin: 0;
  max-width: 11.5em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-lockup);
  line-height: var(--lh-lockup);
  letter-spacing: var(--track-lockup);
  color: var(--paper);
  text-wrap: balance;
}

.panel-mist {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0, 82, 255, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(5, 7, 13, 0.3), transparent 40%, rgba(5, 7, 13, 0.55));
  pointer-events: none;
}

.panel-copy {
  position: relative;
  z-index: 2;
  max-width: min(640px, calc(100vw - 48px));
  padding: 0 var(--pad);
}

.panel h2,
.display {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.04em;
}

.panel h2 .w {
  display: inline-block;
}

.panel p {
  margin: 0;
  max-width: 34em;
  color: var(--paper-dim);
}

.sink {
  place-items: end start;
}

.sink-bg {
  background-image: url("../img/sink.webp?v=20260911c");
}

.rain-bg {
  background-image: url("../img/rain.webp?v=20260911c");
}

.rain .panel-veil {
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.14) 0%, transparent 42%, rgba(5, 7, 13, 0.2) 100%);
}

.close {
  display: flex;
  flex-direction: column;
  background: #05070d;
}

.close-shot {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.aisle-photo,
.wall-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.aisle-photo {
  object-position: center 52%;
}

.wall-photo {
  object-position: 22% center;
}

.aisle-shade,
.wall-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.aisle-shade {
  background: linear-gradient(180deg, transparent 55%, rgba(5, 7, 13, 0.35) 100%);
}

.wall-shade {
  background: linear-gradient(180deg, transparent 42%, rgba(5, 7, 13, 0.55) 100%);
}

.close-shot .caption {
  position: relative;
  margin-top: auto;
  padding-bottom: 24px;
}

.caption-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  pointer-events: none;
}

.caption-cta .caption-text {
  flex: none;
  max-width: 16em;
}

.caption-cta .caption-text p:not(.kicker) {
  max-width: 9em;
  font-size: clamp(1.8rem, 4.4vw, 3.35rem);
}

.caption-cta .wall-cta {
  pointer-events: auto;
  padding: 0;
  margin: 0;
  justify-content: flex-start;
}

.close-shot .panel-copy {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) 8vh;
}

.wall-cta {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.foot-on-photo {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 16px var(--pad) calc(18px + env(safe-area-inset-bottom));
  background: transparent;
  border-top: 1px solid rgba(237, 224, 200, 0.16);
}

#lore,
#end {
  scroll-margin-top: 72px;
}

.wall .wall-cta {
  justify-content: flex-start;
}

/* Featured original-ratio shots */

.feature {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(26, 39, 64, 0.9), var(--ink) 70%);
  display: grid;
  place-items: center;
  padding: 12vh var(--pad) 8vh;
}

.feature-frame {
  position: relative;
  z-index: 2;
  margin: 0;
  overflow: hidden;
}

.feature-frame img {
  width: auto;
  height: min(78vh, 880px);
  max-width: min(92vw, 980px);
  object-fit: contain;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.55));
}

.feature.is-portrait img {
  height: min(78vh, 900px);
  max-width: min(70vw, 560px);
}

/* Horizontal nights */

.journey {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 40% 50%, rgba(26, 39, 64, 0.85), var(--ink) 68%);
}

.journey-track {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100vh;
  padding: 0 16vw;
  width: max-content;
}

.journey-track figure {
  position: relative;
  margin: 0;
  flex: none;
  overflow: hidden;
  transform-origin: center center;
  will-change: transform, opacity;
}

.journey-track img {
  width: auto;
  height: 70vh;
  max-width: none;
}

.journey-track .caption {
  padding: 56px 22px 18px;
  padding-right: 22px;
}

.journey-track .caption p:not(.kicker) {
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  max-width: 10.5em;
}

/* Rooms */

.rooms {
  position: relative;
  overflow: hidden;
  padding: 12vh var(--pad) 12vh;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(26, 39, 64, 0.8), var(--ink) 70%);
}

.rooms .display {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
}

.rooms-lead {
  position: relative;
  z-index: 2;
  max-width: 28em;
  margin: 0 0 8vh;
  color: var(--paper-dim);
}

.rooms-pair {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: end;
}

.rooms-pair figure {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.rooms-pair img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.4));
}

.rooms-pair .caption {
  padding: 56px 22px 18px;
  padding-right: 22px;
}

.rooms-pair .caption p:not(.kicker) {
  font-size: clamp(1.2rem, 2.2vw, 1.85rem);
  max-width: 10.5em;
}

/* Footer */

.foot {
  padding: 16px var(--pad) calc(18px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 500;
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
  color: rgba(237, 224, 200, 0.5);
}

.foot p {
  margin: 0;
}

/* 404 */

.lost {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}

.lost img {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
}

.lost h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.lost p {
  color: var(--paper-dim);
  margin: 0;
}

.lost-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .nav {
    gap: 10px;
    padding: 0 8px 0 8px;
  }

  .nav-mark {
    font-size: 0.82rem;
  }

  .nav-links a:not(.nav-app) {
    display: none;
  }

  .nav-name {
    display: none;
  }

  .hero-copy {
    top: 12vh;
    gap: 12px;
  }

  .hero-lead {
    font-size: 0.95rem;
  }

  .hero-cta {
    width: 100%;
  }

  .home-coin {
    bottom: 16px;
    width: calc(100vw - 32px);
    padding: 12px 12px 10px;
  }

  .home-ticker {
    font-size: 1.45rem;
  }

  .home-ca {
    font-size: 0.62rem;
  }

  .home-coin-links a {
    min-height: 32px;
    padding: 0 10px;
  }

  .caption,
  .panel .caption {
    padding-left: 20px;
    padding-right: 128px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .caption p:not(.kicker),
  .panel .caption p:not(.kicker) {
    font-size: clamp(1.35rem, 6.4vw, 1.85rem);
    max-width: 8.2em;
  }

  .caption-cta .caption-text p:not(.kicker) {
    font-size: clamp(1.55rem, 7.2vw, 2.1rem);
  }

  .caption-cta .wall-cta {
    width: 100%;
  }

  .wall .wall-cta {
    justify-content: flex-start;
  }

  .feature-frame img,
  .feature.is-portrait img {
    height: auto;
    width: min(88vw, 520px);
    max-width: 88vw;
  }

  .rooms-pair {
    grid-template-columns: 1fr;
  }

  .journey {
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .journey-track {
    overflow: visible;
    height: auto;
    min-height: 68vh;
    padding: 16vh 20px 8vh;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .journey-track figure {
    scroll-snap-align: center;
    opacity: 1;
    transform: none;
  }

  .journey-track img {
    height: 48vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-ring,
  .chat-msg.is-wait i,
  .chat-fab.is-call,
  .chat-nudge.is-typing::after {
    animation: none;
  }

  .preloader {
    display: none;
  }

  .nav {
    transition: none;
  }

  .layer,
  .panel-bg,
  .hero-bg,
  .aisle-photo {
    will-change: auto;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-root {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 50;
  font-family: "IBM Plex Sans", Outfit, system-ui, sans-serif;
  transition: bottom 0.25s var(--ease);
}

.chat-root.is-lift {
  bottom: max(76px, calc(64px + env(safe-area-inset-bottom)));
}

.chat-root.is-docked {
  position: relative;
  inset: auto;
  right: auto;
  bottom: auto;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-root.is-docked .chat-fab,
.chat-root.is-docked .chat-nudge,
.chat-root.is-docked .chat-x {
  display: none;
}

.chat-root.is-docked .chat-panel {
  position: relative;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.chat-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 4px 16px 4px 4px;
  border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--paper);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.chat-fab img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.chat-fab span {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
}

.chat-fab:hover {
  border-color: var(--ember);
}

.chat-fab.is-call {
  animation: chat-call 0.9s ease-out 3;
}

.chat-nudge {
  position: absolute;
  right: 0;
  bottom: 70px;
  max-width: 260px;
  padding: 12px 14px;
  border-radius: 12px 12px 4px 12px;
  background: #1a2740;
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.chat-nudge[hidden] {
  display: none;
}

.chat-nudge.is-typing::after {
  content: "▍";
  margin-left: 1px;
  animation: caret 0.8s step-end infinite;
}

@keyframes chat-call {
  50% {
    box-shadow: 0 0 0 8px rgba(0, 82, 255, 0.3);
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-fab.is-call,
  .chat-nudge.is-typing::after {
    animation: none;
  }
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(440px, calc(100vw - 20px));
  height: min(640px, calc(100dvh - 110px));
  max-height: calc(100dvh - 110px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #141821;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.chat-panel[hidden] {
  display: none;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.chat-who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-who img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
}

.chat-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.chat-sub {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.chat-x {
  min-height: 32px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.chat-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  max-width: 100%;
  font-family: "IBM Plex Sans", Outfit, system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
}

.chat-bot {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  align-self: stretch;
  padding: 0;
  background: none;
  color: var(--paper);
}

.chat-face {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  margin-top: 2px;
}

.chat-col {
  min-width: 0;
}

.chat-name {
  display: block;
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember);
}

.chat-bubble {
  padding: 0;
  background: none;
  border-radius: 0;
  color: var(--paper);
}

.chat-bubble a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  margin: 2px 4px 2px 0;
  border: 1px solid var(--line);
  color: var(--ember);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

.chat-bubble a:hover,
.chat-bubble a:focus-visible {
  border-color: var(--ember);
  color: var(--flame);
}

.chat-user {
  align-self: flex-end;
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: rgba(237, 224, 200, 0.1);
  white-space: pre-wrap;
  font-size: 0.88rem;
  line-height: 1.45;
}

.chat-msg.is-wait .chat-bubble {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  min-width: 48px;
}

.chat-msg.is-wait i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  animation: wait-dot 1s ease-in-out infinite;
}

.chat-msg.is-wait i:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-msg.is-wait i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes wait-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}



.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  flex: none;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #05070d;
  color: var(--paper);
  font-family: "IBM Plex Sans", Outfit, system-ui, sans-serif;
  font-size: 0.92rem;
}

.chat-form input::placeholder {
  color: rgba(237, 224, 200, 0.4);
}

.chat-form button {
  flex: none;
  min-width: 72px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--flame);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chat-form button:disabled,
.chat-form input:disabled {
  opacity: 0.45;
}

.chat-hints {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 4px 48px;
  padding: 0;
}

.chat-hints[hidden] {
  display: none;
}

.chat-hints button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(237, 224, 200, 0.04);
  font-family: "IBM Plex Sans", Outfit, system-ui, sans-serif;
  font-size: 0.84rem;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: var(--paper);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.chat-hints button:hover,
.chat-hints button:focus-visible {
  border-color: var(--ember);
  color: var(--ember);
  background: rgba(0, 82, 255, 0.08);
}

.chat-bubble.is-md {
  font-size: 0.86rem;
  line-height: 1.55;
}

.chat-md-block,
.chat-bubble p,
.chat-bubble ul,
.chat-bubble ol,
.chat-bubble .chat-table {
  margin: 0 0 0.7em;
}

.chat-bubble p:last-child,
.chat-bubble ul:last-child,
.chat-bubble ol:last-child,
.chat-bubble .chat-table:last-child,
.chat-bubble h1:last-child,
.chat-bubble h2:last-child,
.chat-bubble h3:last-child {
  margin-bottom: 0;
}

.chat-bubble h1,
.chat-bubble h2,
.chat-bubble h3 {
  margin: 1.1em 0 0.45em;
  font-family: "IBM Plex Sans", Outfit, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--paper);
  line-height: 1.25;
}

.chat-bubble h1:first-child,
.chat-bubble h2:first-child,
.chat-bubble h3:first-child {
  margin-top: 0;
}

.chat-bubble h1 {
  font-size: 1.05rem;
}

.chat-bubble h2 {
  font-size: 0.92rem;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.chat-bubble h3 {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember);
}

.chat-bubble ul,
.chat-bubble ol {
  padding-left: 1.15em;
}

.chat-bubble li + li {
  margin-top: 0.28em;
}

.chat-bubble strong {
  font-weight: 600;
  color: var(--paper);
}

.chat-bubble hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.9em 0;
}

.chat-bubble code,
.chat-addr {
  font-family: var(--font-mono);
  font-size: 0.74em;
  word-break: break-all;
  color: var(--ember);
}

.chat-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.chat-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.35;
}

.chat-table th,
.chat-table td {
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  word-break: break-word;
}

.chat-table th {
  color: var(--paper-dim);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(237, 224, 200, 0.04);
}

.chat-table tr:last-child td {
  border-bottom: 0;
}


