:root {
  --paper: #fdfaf2;
  --ink: #1d1a16;
  --card-radius: 0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Rubik', system-ui, sans-serif;
  min-height: 100vh;
}

.site-header {
  text-align: center;
  padding: 48px 16px 28px;
}

.wordmark {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 0;
  color: var(--ink);
}

.tagline {
  margin-top: 4px;
  color: #57514a;
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 22px 30px;
}

@media (max-width: 580px) {
  .grid { grid-template-columns: 1fr; }
  .wordmark { font-size: 40px; }
}

.card {
  position: relative;
  display: block;
  aspect-ratio: 8 / 3;
  border-radius: var(--card-radius);
  border: 2px solid rgba(0,0,0,0.75);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 0 rgba(0,0,0,0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
  background: #fff;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 0 rgba(0,0,0,0.30);
}

.card .mini { position: absolute; inset: 0; }
.card .mini canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Fallback banner when a mini is missing/broken */
.card.fallback { background: #efe9db; }

/* Screenshot cards — window into the real site */
.card .shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 300ms ease;
}
.card:hover .shot { transform: scale(1.04); }

/* Live bot-post cards (foal) */
.post-card { background: #14100c; }
.post-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b7a98e;
  font-family: 'Space Mono', monospace;
  font-size: 18px;
}
.post-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.75) 100%);
}
.post-brand {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: 'Lilita One', sans-serif;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.post-body {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  color: #fff;
}
.post-meta {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #cdbfa6;
  margin-bottom: 2px;
}
.post-text {
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Title overlay */
.card .title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding: 10px 14px;
}
.card .title.pos-tl { align-items: flex-start; justify-content: flex-start; }
.card .title.pos-bl { align-items: flex-end; justify-content: flex-start; }

.t-lilita { font-family: 'Lilita One', sans-serif; }
.t-mono   { font-family: 'Space Mono', monospace; font-weight: 700; }
.t-rubik  { font-family: 'Rubik', sans-serif; font-weight: 700; font-style: italic; }
.t-pixel  { font-family: 'Press Start 2P', monospace; }

.card .title span { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.05; }
.card .title.t-pixel span { font-size: clamp(15px, 2.6vw, 24px); }
.card .title.pos-tl span, .card .title.pos-bl span { font-size: clamp(18px, 3vw, 26px); }

.outlined {
  text-shadow:
    -2px -2px 0 var(--stroke, #000), 2px -2px 0 var(--stroke, #000),
    -2px 2px 0 var(--stroke, #000), 2px 2px 0 var(--stroke, #000),
    0 -2px 0 var(--stroke, #000), 0 2px 0 var(--stroke, #000),
    -2px 0 0 var(--stroke, #000), 2px 0 0 var(--stroke, #000);
}

/* ---- AIM buddy list mini (DOM-based) ---- */
.aim-window {
  position: absolute;
  inset: 7% 20%;
  background: #ece9d8;
  border: 2px solid #0a246a;
  border-radius: 6px 6px 3px 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'Rubik', sans-serif;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
}
.card .mini:has(.aim-window) { background: #7a9e5f; }
.aim-titlebar {
  background: linear-gradient(180deg, #0a246a, #3a6ea5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: none;
}
.aim-titlebar .btns { letter-spacing: 2px; font-family: 'Space Mono', monospace; font-size: 10px; }
.aim-body { flex: 1; padding: 5px 10px; font-size: 12px; overflow: hidden; background: #fff; margin: 4px; border: 1px inset #999; }
.aim-body .group { color: #444; font-weight: 700; margin-bottom: 1px; }
.aim-body .group .aim-count { color: #2a7a2a; }
.aim-body .buddy { padding-left: 14px; color: #16367c; }
.aim-body .buddy.away { color: #999; font-style: italic; }

/* ---- randomsub slot-machine mini (DOM-based) ---- */
.rs-window {
  position: absolute;
  inset: 0;
  background: #0f172a;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  font-family: 'Rubik', sans-serif;
}
.rs-titlebar {
  background: #1e293b;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: none;
}
.rs-dice { color: #818cf8; letter-spacing: 2px; }
.rs-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 12px 6px;
  text-align: center;
}
.rs-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #94a3b8;
}
.rs-name {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(15px, 2.6vw, 22px);
  color: #a5b4fc;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rs-meta { font-size: 12px; color: #fcd34d; min-height: 1.2em; }
.rs-body.spinning .rs-name { filter: blur(1px); color: #818cf8; }

/* ---- workshop wide card (live vibecoding stats) ---- */
.card.wide {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  min-height: 116px;
  cursor: default;
  margin: 10px 0 26px;
}
.card.wide:hover { transform: none; box-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.workshop {
  position: absolute;
  inset: 0;
  background: #100e0a;
  color: #e8e0cf;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 22px;
  font-family: 'Space Mono', monospace;
}
.w-left { flex: 0 0 auto; }
.w-brand { font-size: 12px; color: #cec2a8; margin-bottom: 6px; }
.w-badge { font-size: 12px; }
.w-badge.live { color: #8fe09a; animation: w-pulse 2.2s ease-in-out infinite; }
.w-badge.idle { color: #a29a88; }
@keyframes w-pulse { 0%,100%{opacity:1} 50%{opacity:0.45} }
.w-mid { flex: 1 1 auto; min-width: 0; }
.w-count {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  color: #7fd18a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.w-sub { font-size: 11px; color: #cec2a8; margin-top: 2px; }
.w-right { flex: 0 0 auto; text-align: right; }
.w-bars { display: flex; align-items: flex-end; gap: 3px; height: 46px; justify-content: flex-end; }
.w-bars i { display: block; width: 9px; background: #55503f; min-height: 3px; }
.w-bars i.today { background: #8fe09a; }
.w-total { font-size: 11px; color: #cec2a8; margin-top: 5px; }
@media (max-width: 580px) {
  .workshop { gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
  .w-right { display: none; }
}

/* ---- more stuff ---- */
.more {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 22px 40px;
}
.more h2 {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: #4a443c;
}
.more ul {
  list-style: none;
  columns: 2;
  column-gap: 40px;
}
@media (max-width: 580px) { .more ul { columns: 1; } }
.more li {
  padding: 3px 0;
  font-size: 15px;
  break-inside: avoid;
}
.more li a {
  color: var(--ink);
  font-weight: 600;
  text-decoration-color: #c9bfae;
  text-underline-offset: 3px;
}
.more li a:hover { color: #e4572e; }
.more .desc { color: #8d8579; }

.site-footer {
  text-align: center;
  padding: 0 0 40px;
  color: #948c80;
  font-size: 14px;
}
.site-footer a { color: #6d665c; }
