/* SpykeSpace Messages - visual foundation. */



.spyke-chat{--chat-bg:var(--spyke-bg);--chat-header:var(--spyke-header);--chat-bubble:var(--spyke-bubble);--chat-ink:var(--spyke-ink);--chat-muted:var(--spyke-muted);--chat-line:var(--spyke-line);--chat-accent:var(--spyke-accent);box-sizing:border-box;position:relative;width:100%;max-width:none;min-height:100dvh;margin:0;overflow:clip;color:var(--chat-ink);background:var(--chat-bg);font-size:16px;color-scheme:light}
html[data-scheme="dark"] .spyke-chat,body[data-scheme="dark"] .spyke-chat{--chat-bg:var(--spyke-bg);--chat-header:var(--spyke-header);--chat-bubble:var(--spyke-bubble);--chat-ink:var(--spyke-ink);--chat-muted:var(--spyke-muted);--chat-line:var(--spyke-line);--chat-accent:var(--spyke-accent);color-scheme:dark}
@media(prefers-color-scheme:dark){html:not([data-scheme]) .spyke-chat{--chat-bg:var(--spyke-bg);--chat-header:var(--spyke-header);--chat-bubble:var(--spyke-bubble);--chat-ink:var(--spyke-ink);--chat-muted:var(--spyke-muted);--chat-line:var(--spyke-line);--chat-accent:var(--spyke-accent);color-scheme:dark}}
.spyke-chat *,.spyke-chat *::before,.spyke-chat *::after{box-sizing:border-box}
.spyke-chat__return{color:var(--chat-ink);text-decoration:none;font-size:.9rem}
.spyke-chat__return:hover{text-decoration:underline}
.spyke-chat__thread{display:flex;flex-direction:column;gap:13px;width:100%;padding:clamp(16px,2.5vw,36px) clamp(12px,5vw,90px) 48px}.spyke-chat__date{align-self:center;padding:5px 13px;border-radius:999px;background:var(--chat-header);color:var(--chat-muted);font-size:.77rem}.spyke-chat__message{display:flex;justify-content:flex-end;width:100%;min-width:0;margin:0}.spyke-chat__bubble{width:fit-content;max-width:min(86%,760px);min-width:0;padding:11px 14px 8px;border-radius:18px 18px 5px 18px;border:1px solid var(--chat-line);background:var(--chat-bubble);overflow-wrap:anywhere}.spyke-chat__bubble--media{max-width:min(90%,980px)}.spyke-chat__content{color:var(--chat-ink);line-height:1.5;min-width:0}.spyke-chat__content>:first-child{margin-top:0}.spyke-chat__content>:last-child{margin-bottom:0}.spyke-chat__content p{margin:.4em 0}.spyke-chat__content img{display:block;max-width:100%;width:auto;max-height:min(74dvh,760px);height:auto;object-fit:contain;border-radius:10px}.spyke-chat__content video{display:block;width:100%;max-width:900px;max-height:74dvh;border-radius:10px;background:#101827}.spyke-chat__content audio{display:block;width:min(100%,420px);max-width:100%;height:48px}.spyke-chat__content p:has(img){margin:5px 0}.spyke-chat__content:has(p>img):has(p~p>img){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.spyke-chat__content:has(p>img):has(p~p>img) img{width:100%;height:clamp(120px,20vw,320px);object-fit:cover}.spyke-chat__content:has(p>img):has(p~p>img) p:has(img){margin:0}.spyke-chat__content:has(p>img):has(p~p>img) p:not(:has(img)){grid-column:1/-1}.spyke-chat__meta{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:6px;font-size:.7rem;color:var(--chat-muted)}.spyke-chat__meta a{color:var(--chat-accent);text-decoration:none}.spyke-chat__return{display:block;text-align:center;padding:12px 0 40px}.spyke-chat__empty{text-align:center;color:var(--chat-muted)}
@media(max-width:650px){.spyke-chat__thread{padding:15px 9px 28px;gap:10px}.spyke-chat__bubble{max-width:94%;padding:9px 10px 7px}.spyke-chat__bubble--media{max-width:97%}.spyke-chat__content img{width:100%;max-height:none;height:auto}.spyke-chat__content video{max-height:62dvh}}

@media(prefers-reduced-motion:reduce){.spyke-chat *{scroll-behavior:auto!important}}

/* SpykeSpace rich link cards */
.spyke-link {
  display: block;
  position: relative;
  width: min(100%, 540px);
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--chat-line);
  border-radius: 16px;
  background: var(--chat-header);
  color: var(--chat-ink);
  text-decoration: none;
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.spyke-link__image {
  display: block;
  width: 100%;
  height: clamp(150px, 25vw, 260px);
  object-fit: cover;
  border-radius: 0;
}

.spyke-link__details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 17px;
}

.spyke-link__domain {
  color: var(--chat-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spyke-link__title {
  color: var(--chat-ink);
  font-size: 1.1rem;
  line-height: 1.3;
}

.spyke-link__description {
  color: var(--chat-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.spyke-link:hover,
.spyke-link:focus-visible {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow:
    0 0 0 1px rgba(164,140,229,.65),
    0 0 0 3px rgba(131,214,201,.18),
    0 8px 24px rgba(86,143,215,.14);
}

@media (prefers-reduced-motion: reduce) {
  .spyke-link {
    transition: none;
  }

  .spyke-link:hover,
  .spyke-link:focus-visible {
    transform: none;
  }
}

/* Rich link card: iridescent edge */
.spyke-link {
  isolation: isolate;
  overflow: visible;
  border-color: transparent;
}

.spyke-link::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 18px;
  background: linear-gradient(
    115deg,
    #568fd7,
    #a48ce5,
    #e9a5cf,
    #83d6c9,
    #568fd7
  );
  background-size: 250% 250%;
  opacity: 0;
  transition: opacity 300ms ease, background-position 900ms ease;
}

.spyke-link:hover::before,
.spyke-link:focus-visible::before {
  opacity: 1;
  background-position: 100% 50%;
}

.spyke-link:hover,
.spyke-link:focus-visible {
  box-shadow: 0 8px 28px rgba(86,143,215,.18);
}

@media (prefers-reduced-motion: reduce) {
  .spyke-link::before {
    transition: none;
  }
}

@media (max-width:650px) {
  .spyke-chat__content:has(p>img):has(p~p>img) {
    display:block;
  }
  .spyke-chat__content:has(p>img):has(p~p>img) img {
    width:100%;
    height:auto;
    object-fit:contain;
  }
}

/* Give native audio controls a stable, responsive chat bubble. */
.spyke-chat__bubble:has(.spyke-chat__content audio) {
  width: min(360px, 100%);
}

/* Keep photograph sizing independent of caption text. */
.spyke-chat__bubble--media:has(.spyke-chat__content img) {
    width: max-content;
    max-width: min(90%, 980px);
}

@media (max-width: 650px) {
    .spyke-chat__bubble--media:has(.spyke-chat__content img) {
        max-width: 97%;
    }
}

/* Embedded YouTube players */
.spyke-chat__bubble:has(.spyke-youtube) {
    width: min(100%, 900px);
    max-width: 90%;
}

@media (max-width: 650px) {
    .spyke-chat__bubble:has(.spyke-youtube) {
        max-width: 97%;
    }
}
/* SpykeSpace YouTube media-first presentation */
.spyke-chat__bubble:has(.spyke-youtube) {
    width: min(100%, 900px);
    max-width: 96%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.spyke-chat__content:has(.spyke-youtube) {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spyke-chat__content .spyke-youtube {
    flex: none;
    border-radius: 12px;
}

.spyke-chat__content .spyke-youtube__source {
    display: none;
}

.spyke-chat__bubble:has(.spyke-youtube) .spyke-chat__content > p {
    margin: 0;
    padding: 0 4px;
}

.spyke-chat__bubble:has(.spyke-youtube) .spyke-chat__meta {
    padding-right: 4px;
}

@media (max-width: 650px) {
    .spyke-chat__bubble:has(.spyke-youtube) {
        max-width: 100%;
    }
}
/* Chat: centered editorial layout. */
.spyke-site--chat .spyke-chat {
    padding: clamp(48px, 8vw, 110px) 0 100px;
}

.spyke-site--chat .spyke-chat__intro,
.spyke-site--chat .spyke-chat__thread {
    width: min(100% - 40px, 760px);
    margin-inline: auto;
}

.spyke-site--chat .spyke-chat__intro {
    margin-bottom: 52px;
}

.spyke-site--chat .spyke-chat__intro h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.035em;
    font-weight: 600;
}

.spyke-site--chat .spyke-chat__thread {
    padding: 0;
}

@media (max-width: 600px) {
    .spyke-site--chat .spyke-chat {
        padding-top: 52px;
    }

    .spyke-site--chat .spyke-chat__intro,
    .spyke-site--chat .spyke-chat__thread {
        width: calc(100% - 36px);
    }
}
