/* Root palette */
:root {
  --bg: #f9fafa;            
  --card: #ffffff;          
  --card-bg: #ffffff;
  --card-border: #e4e7eb;   
  --card-hover: #f1f3f5;    
  
  --text: #222831;          
  --card-text: #222831;     
  --card-muted: #555;       
  
  --text-body: #444;        
  --text-strong: #000;      
  --text-light: #777;       
  
  --accent: #2563eb;        
  --accent-ink: #ffffff;
  --link: #2563eb;
  
  --chip-bg: #ffffff;      
  --border: #e4e7eb;
  
  --shadow: 0 0.125rem 0.75rem rgba(0,0,0,.08);
  --radius: 0.75rem;

  --scroll-thumb: #bbb;
  --scroll-thumb-border: #f1f1f1;
  --scroll-thumb-hover: #999;
}


@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --card: #1b1b1b;
    --card-border: #2a2a2a;
    --card-hover: #222222;

    --text: #e5e5e5;
    --text-body: #cccccc;
    --text-strong: #ffffff;
    --text-light: #888888;
    --muted: #a0a0a0;

    --accent: #3b82f6;     
    --accent-ink: #ffffff;
    --link: #ff7a1a;

    --chip-bg: #202020;
    --border: #2a2a2a;

    --shadow: 0 0.25rem 1rem rgba(0,0,0,.5);
    --radius: 0.75rem;

    --scroll-thumb: #444;
    --scroll-thumb-border: #1a1a1a;
    --scroll-thumb-hover: #666;
  }
}

* { box-sizing: border-box; }


body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

.container {
  max-width: 50rem;
  margin: 0 auto;
  padding: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(1.2) blur(0.375rem);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}
.nav a {
  text-decoration: none;
  color: var(--text);
  opacity: .85;
  margin-left: 1rem;
}
.nav a:hover { opacity: 1; }


.chat-nav a {
  text-decoration: none;
  font-size: 15px;
  color: var(--text);
  opacity: 0.85;
  margin-left: 18px;
  position: relative;
}

.chat-nav a:hover {
  opacity: 1;
}

.chat-nav .blog-link {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background .2s, border-color .2s;
}

.chat-nav .blog-link:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--chip-bg));
  border-color: var(--accent);
}


.chat-image {
  max-width: 220px;
  border-radius: 10px;
  margin: 8px 0;
  display: block;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6rem;
  font-weight: 600;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

.badge.beta {
  background: var(--accent);
  color: var(--accent-ink);
}


.chat-hero {
  background: color-mix(in srgb, var(--bg) 95%, var(--accent) 5%);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

@media (prefers-color-scheme: dark) {
  .chat-hero {
    background: #0f0f10;
  }
}

.chat-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.875rem;
}

.chat-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.chat-header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-brand {
  display: flex;
  flex-direction: column;
}

.chat-title {
    font-size: clamp(1.1rem, 2.5vw, 0.7rem);
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}
.chat-title:hover {
  opacity: 0.85;
}

.chat-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--text);
  opacity: 0.85;
  margin-left: 1.125rem;
}
.chat-nav a:hover { opacity: 1; }


#chat {
  min-height: 300px;
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain; 
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}


#chat::-webkit-scrollbar {
  width: 0.5rem;
}
#chat::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 0.375rem;
}

.message {
  max-width: 80%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.875rem;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-line;
  animation: fadeIn .2s ease;
  border: 1px solid var(--border);
  font-size: 0.9375rem;
}
.message.bot {
  align-self: flex-start;
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
  border-top-left-radius: 0.375rem;
}
.message.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
  border-top-right-radius: 0.375rem;
}

#tags-container {
  display: none;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0rem 0rem;
  justify-content: flex-start;
}

#tags-container button {
  border: 1px solid var(--border);
  background: var(--chip-bg);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  transition: background .3s, transform .2s;
  font-size: 0.9375rem;
  box-shadow: var(--shadow);
}
#tags-container button:hover {
  background: color-mix(in srgb, var(--accent) 20%, var(--chip-bg));
  transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
#tags-container button:hover {
  background: color-mix(in srgb, var(--accent) 100%, var(--chip-bg));
  transform: translateY(-1px);
}
}

.message.typing { display: inline-flex; align-items: center; gap: 0.3125rem; }
.typing-dot {
  width: 0.375rem; height: 0.375rem;
  border-radius: 50%;
  background: currentColor; opacity: .5;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2){ animation-delay:.15s }
.typing-dot:nth-child(3){ animation-delay:.3s }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity:.4 }
  40% { transform: translateY(-0.25rem); opacity:1 }
}
@keyframes fadeIn {
  from { opacity:0; transform: translateY(0.25rem) }
  to { opacity:1; transform: none }
}

#input-area {
  display: flex;
  gap: 0.375rem;
  margin-top: 1rem;
}
#message-input {
  flex: 1;
  padding: 0.75rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.btn {
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--border));
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(0.96); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
#send-btn {
  border-radius: 999px;
  padding: 0 0.875rem;
}

#send-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;               
  border-radius: 999px;
  padding: 0.625rem 0.875rem;
}

#send-btn .icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;        
  flex: 0 0 auto;
}

#send-btn .label {
  line-height: 1;
}


@media (max-width: 26rem) {
  #send-btn .label { display: none; }
  #send-btn { padding: 0.625rem; } 
}


.article {
  margin-top: 32px;
  line-height: 1.65;
  color: var(--text);
}

.article h1,
.article h2,
.article h3 {
  font-weight: 700;
  line-height: 1.3;
  margin: 1.6em 0 0.6em;
}

.article h1 {
  font-size: clamp(24px, 3vw, 32px);
}
.article h2 {
  font-size: clamp(20px, 2.5vw, 26px);
}
.article h3 {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--muted);
}

.article p {
  margin: 0 0 1em;
}

.article strong {
  font-weight: 700;
}

.article em {
  font-style: italic;
}


.article ul {
  margin: 0 0 1.2em 0;   
  padding: 0;
  list-style: none;       
}

.article li {
  margin: 0.6em 0;
  padding-left: 1.2em;
  position: relative;
}


.article li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}


.article figure {
  margin: 1.5em 0;
  text-align: center;
}
.article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.article figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}


.video-embed {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16/9;
  margin: 1.5em auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-embed iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  border: none;
  border-radius: 8px;
}


@media (max-width: 640px) {
  .article {
    font-size: 15px;
  }
  .article h1 {
    font-size: 22px;
  }
}


.site-footer { margin-top: 1.75rem; border-top: 1px solid var(--border); }
.footer-grid {
  font-size: 0.9rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding-block: 1.125rem;
}
.foot-nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--text);
  opacity: .8;
}
.foot-nav a:hover { opacity: 1; }
.credit a { color: var(--text); text-decoration: underline; }


@media (max-width: 40rem) {
  .footer-grid { grid-template-columns: 1fr; }
  .foot-nav a { margin: 0 0.75rem 0 0; display: inline-block; }
  #input-area { flex-direction: column; }
  .btn, .btn.ghost { width: 100%; }
}


.game-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  margin: 12px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--card-text);
  box-shadow: var(--shadow);
}

.game-info {
  flex: 1;
}

.game-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 8px;
}

.game-desc {
  margin: 0 0 8px;
}

.game-meta {
  font-size: 1em;
  color: var(--card-muted);
  margin: 2px 0;
}

.game-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
}
.game-link:hover {
  text-decoration: underline;
}

.game-media {
  flex-shrink: 0;
}
.game-cover {
  width: 140px;
  border-radius: 8px;
}

.game-video { margin-top: 0.5rem; }
.game-iframe {
  width: 100%;
  max-width: 30rem;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 0.5rem;
}



.skip-link {
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; width:auto; height:auto;
  background: var(--accent); color: var(--accent-ink);
  padding: .5rem .75rem; border-radius: .5rem; z-index: 9999;
}

.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}


.page-content {
}

.page-content h1,
.page-content h2,
.page-content h3 {
  margin: 1.5em 0 0.6em;
  font-weight: 700;
  line-height: 1.3;
}

.page-content h1 { font-size: clamp(24px, 3vw, 32px); }
.page-content h2 { font-size: clamp(20px, 2.5vw, 26px); }
.page-content h3 { font-size: clamp(18px, 2vw, 22px); color: var(--muted); }

.page-content p { margin: 0 0 1em; }
.page-content ul { list-style: disc inside; margin: 0 0 1.2em; padding: 0; }
.page-content li { margin: 0.5em 0; }

.page-content figure { margin: 1.5em 0; text-align: center; }
.page-content img { max-width: 100%; border-radius: 8px; box-shadow: var(--shadow); }




.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;              
  display: flex;
  flex-direction: column;
}

.blog-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.blog-body {
  padding: 1rem;                 
}

.blog-card h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.blog-card h2 a {
  text-decoration: none;
  color: var(--text);
}

.blog-card h2 a:hover {
  color: var(--accent);
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.blog-excerpt {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;    
  -webkit-box-orient: vertical;
  overflow: hidden;
}


@media (min-width: 48rem) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cookie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  max-width: 880px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: .75rem;

  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--card-text);
  box-shadow: var(--shadow);


  opacity: 1;
  transform: translateY(0);
  transition: opacity .35s ease, transform .35s ease;
}

.cookie-consent.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.cookie-consent p {
  margin: 0;
  line-height: 1.45;
  color: var(--text-body, var(--card-text));
}

.cookie-consent a {
  color: var(--link, var(--accent));
  text-underline-offset: 2px;
}
.cookie-consent a:hover { text-decoration: underline; }

#cookie-accept {
  margin-left: auto;
  flex: 0 0 auto;
  padding: .55rem .9rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}
#cookie-accept:hover { filter: brightness(1.05); }
#cookie-accept:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 25%, transparent);
}


@media (prefers-reduced-motion: reduce) {
  .cookie-consent { transition: none; }
}


.blog-hero {
  background: var(--card); 
  padding: 3rem 1rem;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.blog-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.blog-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0;
}
