:root {
  color-scheme: dark;
  --bg: #140c12;
  --surface: #1d1219;
  --surface-hover: #271720;
  --line: #432635;
  --text: #fff7fb;
  --muted: #b99aab;
  --soft: #806171;
  --green: #72e0ad;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.background-carousel {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: var(--bg);
}

.background-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 1.2s ease, transform 7s ease;
}

.background-slide-backdrop,
.background-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-position: center;
}

.background-slide-backdrop {
  object-fit: cover;
  opacity: 0;
  filter: blur(30px) saturate(.8);
  transform: scale(1.1);
}

.background-slide-image {
  object-fit: cover;
}

.background-slide.is-portrait {
  transform: scale(1);
}

.background-slide.is-portrait .background-slide-backdrop {
  opacity: .78;
}

.background-slide.is-portrait .background-slide-image {
  object-fit: contain;
}

.background-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.background-tint {
  position: absolute;
  inset: 0;
  background: rgba(25, 8, 18, .64);
  backdrop-filter: saturate(.72);
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,155,202,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,155,202,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 72%);
}

.sakura-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  pointer-events: none;
}

.sakura-petal {
  position: absolute;
  top: -28px;
  left: var(--left);
  width: var(--size);
  height: calc(var(--size) * 1.35);
  border: 1px solid rgba(255, 232, 241, .72);
  border-radius: 85% 0 85% 0;
  background: rgba(255, 167, 203, .78);
  filter: drop-shadow(0 2px 4px rgba(89, 24, 53, .22));
  opacity: 0;
  animation: sakura-fall var(--duration) linear var(--delay) infinite;
}

@keyframes sakura-fall {
  0% { opacity: 0; transform: translate3d(0, -10vh, 0) rotate(0deg); }
  8% { opacity: .82; }
  48% { transform: translate3d(var(--mid-drift), 52vh, 0) rotate(190deg); }
  88% { opacity: .7; }
  100% { opacity: 0; transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin)); }
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-inline: 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 16px 44px rgba(0,0,0,.16);
  text-shadow: 0 1px 4px rgba(12, 3, 8, .82);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(110deg, #835816, #ffd66b, #fff2b1, #a76d18, #ffd66b, #835816);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gold-border-flow 4.8s linear infinite;
  pointer-events: none;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: 6px;
  background: rgba(255, 190, 218, .2);
  pointer-events: none;
}

.site-header > * {
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 650;
}

.brand strong { color: #ff87bd; }

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #713552;
  border-radius: 8px;
  background: #2b1421;
}

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

.header-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.header-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(99,230,165,.7);
}

.intro {
  min-height: 220px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding: 64px 0 46px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #ff87bd;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .16em;
}

h1 {
  margin: 0;
  font-size: 54px;
  line-height: 1.05;
  font-weight: 680;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 360px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 18px;
}

.directory {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.bot-card {
  --accent: #ff87bd;
  --accent-soft: #321522;
  grid-column: span 4;
  min-width: 0;
  min-height: 292px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 16px 44px rgba(0,0,0,.16);
  backdrop-filter: none;
  text-shadow: 0 1px 4px rgba(12, 3, 8, .82);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.bot-card:nth-child(n+4) { grid-column: span 6; }

.bot-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(110deg, #835816, #ffd66b, #fff2b1, #a76d18, #ffd66b, #835816);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gold-border-flow 4.8s linear infinite;
  pointer-events: none;
}

.bot-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: 6px;
  background: rgba(255, 190, 218, .2);
  transition: background .22s ease;
  pointer-events: none;
}

.bot-card > * {
  position: relative;
  z-index: 2;
}

@keyframes gold-border-flow {
  to { background-position: 300% 0; }
}

.bot-card:hover,
.bot-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 20px 54px rgba(33, 6, 20, .28), 0 0 18px rgba(242, 195, 86, .13);
  outline: none;
}

.bot-card:hover::after,
.bot-card:focus-visible::after { background: rgba(255, 190, 218, .2); }

.bot-card.is-available {
  --accent: var(--green);
  --accent-soft: #17271f;
}

.bot-card.is-unavailable {
  cursor: not-allowed;
}

.bot-card.is-unavailable:hover,
.bot-card.is-unavailable:focus-visible {
  transform: none;
  box-shadow: 0 16px 44px rgba(0,0,0,.16);
}

.bot-card.is-unavailable:hover::after,
.bot-card.is-unavailable:focus-visible::after { background: rgba(255, 190, 218, .2); }

.bot-card.is-unavailable .avatar-wrap img {
  filter: grayscale(1);
}

.bot-card.is-unavailable .avatar-status,
.bot-card.is-unavailable .account-type i {
  background: #765666;
  box-shadow: none;
}

.bot-card.is-unavailable .card-action span:last-child {
  color: var(--soft);
}

.bot-card:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }

.card-coral { --accent: #ff719f; --accent-soft: #351522; }
.card-yellow { --accent: #f3a9c8; --accent-soft: #321a27; }
.card-green { --accent: #ffad9e; --accent-soft: #351b20; }
.card-violet { --accent: #c69cff; --accent-soft: #281932; }

.card-head,
.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-index {
  color: var(--soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.account-type {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.account-type i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.profile {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 0 24px;
}

.avatar-wrap {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  position: relative;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 50%;
  background: var(--accent-soft);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: #2d1d26;
}

.avatar-status {
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
}

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

.identity h2 {
  margin: 0 0 11px;
  overflow-wrap: anywhere;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
}

.qid-row {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 1px solid #4a2a3a;
  border-radius: 6px;
  background: #170f15;
}

.qid-row span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.qid-row code {
  overflow: hidden;
  color: #e5cbd8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
}

.card-description {
  max-width: 38ch;
  margin: 13px 0 0;
  color: #f2cadc;
  font-size: 12px;
  line-height: 1.65;
}

.card-action {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.card-action span:last-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #4d2c3d;
  border-radius: 6px;
  color: var(--accent);
  background: #170f15;
  font-size: 15px;
  transition: transform .2s ease, border-color .2s ease;
}

.bot-card:hover .card-action span:last-child { transform: translate(2px, -2px); border-color: var(--accent); }

.service-strip {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 16px 44px rgba(0,0,0,.16);
  text-shadow: 0 1px 4px rgba(12, 3, 8, .82);
}

.service-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(110deg, #835816, #ffd66b, #fff2b1, #a76d18, #ffd66b, #835816);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gold-border-flow 4.8s linear infinite;
  pointer-events: none;
}

.service-strip::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: 6px;
  background: rgba(255, 190, 218, .2);
  pointer-events: none;
}

.service-strip > * {
  position: relative;
  z-index: 2;
}

.service-strip div {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-right: 1px solid var(--line);
}

.service-strip div:last-child { border-right: 0; }
.service-strip span { color: var(--soft); font-size: 11px; }
.service-strip strong { color: #dbc1cf; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; font-weight: 550; }

footer {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--soft);
  font-size: 11px;
}

.carousel-controls {
  position: fixed;
  z-index: 12;
  right: 22px;
  bottom: 22px;
  display: flex;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 135, 189, .26);
  border-radius: 999px;
  background: rgba(20, 12, 18, .44);
  backdrop-filter: blur(12px);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 247, 251, .34);
  cursor: pointer;
  transition: width .2s ease, border-radius .2s ease, background .2s ease;
}

.carousel-dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: #ff87bd;
}

.carousel-dot:focus-visible {
  outline: 2px solid #fff7fb;
  outline-offset: 3px;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 28px;
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid #583044;
  border-radius: 8px;
  color: #e8ebf1;
  background: #24151d;
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .2s ease, transform .2s ease;
  font-size: 12px;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.toast-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #09140f;
  background: var(--green);
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 960px) {
  .bot-card,
  .bot-card:nth-child(n+4) { grid-column: span 6; }
  .bot-card:last-child { grid-column: 4 / span 6; }
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer { width: min(100% - 28px, 1180px); }

  .site-header { height: 70px; }
  .header-state { font-size: 11px; }
  .brand-mark { width: 34px; height: 34px; }

  .intro {
    min-height: 190px;
    display: block;
    padding: 54px 0 36px;
  }

  h1 { font-size: 39px; }
  .intro-copy { margin-top: 14px; font-size: 16px; }

  .directory { gap: 10px; }
  .bot-card,
  .bot-card:nth-child(n+4),
  .bot-card:last-child { grid-column: 1 / -1; }
  .bot-card { min-height: 250px; padding: 18px; }
  .profile { padding: 24px 0 20px; }
  .avatar-wrap { width: 78px; height: 78px; flex-basis: 78px; }
  .identity h2 { font-size: 18px; }

  .service-strip { grid-template-columns: 1fr; }
  .service-strip div { min-height: 54px; border-right: 0; border-bottom: 1px solid var(--line); }
  .service-strip div:last-child { border-bottom: 0; }

  footer { min-height: 96px; }
  .toast { width: calc(100% - 28px); bottom: 14px; }
  .carousel-controls { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .sakura-layer { display: none; }
  .site-header::before,
  .service-strip::before,
  .bot-card::before { animation: none; background: #e4b84f; }
}


/* INTRO-RGB-FLOW: highlighted animated gradient for the right-side intro copy only. */
.intro-copy {
  color: #ffe8f4;
  font-weight: 650;
  text-shadow: 0 0 8px rgba(255, 126, 197, .62), 0 1px 4px rgba(18, 3, 12, .95);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .intro-copy {
    background-image: linear-gradient(90deg, #ff4fc3 0%, #fff176 20%, #5af4ff 40%, #8b7cff 60%, #ff6aa9 80%, #ff4fc3 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 5px rgba(255, 102, 190, .62)) drop-shadow(0 1px 2px rgba(18, 3, 12, .9));
    animation: intro-rgb-flow 6.6s linear infinite;
  }
}

@keyframes intro-rgb-flow {
  from { background-position: 0% 50%; }
  to { background-position: 300% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-copy {
    animation: none;
    background-position: 50% 50%;
  }
}
