/* Víðarr's Craigslist — deliberately old-web, pale parchment, Norse frost */
:root {
  --parchment: #eceae0;
  --parchment-2: #e3e0d3;
  --ink: #2a2620;
  --blue: #2020cc;
  --blue-visited: #551a8b;
  --gray: #6b6355;
  --frost: #3a5f7a;
  --border: #c3bfae;
  --gen-tint: #f3eede;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(58,95,122,0.08), transparent 60%),
    var(--parchment);
  color: var(--ink);
  font-family: "IM Fell English", "Times New Roman", Georgia, serif;
  font-size: 16px;
  min-height: 100vh;
}

.cl-root {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 10px 40px;
  animation: fadein 0.5s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---- Mood badge ---- */
.mood-badge {
  position: fixed;
  top: 8px; right: 8px;
  z-index: 40;
  background: var(--frost);
  color: #e9f1f6;
  font-family: "VT323", monospace;
  font-size: 17px;
  padding: 4px 10px;
  border: 1px solid #24404f;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}
.mood-badge b { letter-spacing: 0.5px; }
.mood-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #7fd3a8;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

/* ---- Header ---- */
.cl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 4px 10px;
  border-bottom: 2px solid var(--frost);
  margin-bottom: 2px;
}
.header-inner { display: flex; align-items: center; gap: 10px; }
.boot-icon { font-size: 34px; line-height: 1; filter: grayscale(0.3); }
.cl-title {
  font-size: 40px;
  font-weight: 400;
  font-style: italic;
  margin: 0;
  color: var(--frost);
  letter-spacing: -1px;
  line-height: 0.95;
}
.cl-tagline {
  font-size: 13px;
  color: var(--gray);
  font-style: italic;
}
.post-cta {
  font-family: "VT323", monospace;
  font-size: 20px;
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
}
.post-cta:hover { color: #cc2020; }

/* ---- Body layout ---- */
.cl-body { display: flex; gap: 18px; align-items: flex-start; }

/* ---- Sidebar ---- */
.cl-sidebar {
  flex: 0 0 190px;
  padding: 12px 8px;
  border-right: 1px solid var(--border);
}
.side-label {
  font-size: 12px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.cat-link {
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
  font-size: 17px;
  margin-top: 6px;
}
.cat-link:hover { color: #cc2020; }
.cat-link.active { color: #cc2020; font-weight: bold; }
.cat-blurb {
  font-size: 11.5px;
  color: var(--gray);
  font-style: italic;
  margin: 1px 0 4px 6px;
}
.rune-divider {
  margin: 16px 0 12px;
  color: var(--frost);
  letter-spacing: 4px;
  font-size: 15px;
  text-align: center;
  opacity: 0.7;
}
.community-toggle {
  display: block;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.3;
}

/* ---- Feed ---- */
.cl-feed { flex: 1 1 auto; padding: 12px 4px; min-width: 0; }
.feed-header {
  font-size: 15px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 6px;
}
.feed-count { text-transform: none; letter-spacing: 0; font-style: italic; }
.empty-feed { color: var(--gray); font-style: italic; padding: 20px 0; }

.feed-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 3px 4px;
  cursor: pointer;
  line-height: 1.35;
}
.feed-row:hover { background: rgba(58,95,122,0.09); }
.gen-row { background: var(--gen-tint); }
.gen-row:hover { background: #ebe2c9; }
.row-date {
  flex: 0 0 auto;
  font-size: 12.5px;
  color: var(--gray);
  min-width: 92px;
  font-family: "VT323", monospace;
}
.row-title {
  flex: 1 1 260px;
}
.row-price {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--gray);
}
.row-loc {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--gray);
  font-style: italic;
}
.blue-link { color: var(--blue); text-decoration: underline; cursor: pointer; }
.blue-link:hover { color: #cc2020; }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,26,32,0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 30px 12px;
  z-index: 60;
  overflow-y: auto;
}
.modal-post {
  background: var(--parchment);
  border: 1px solid var(--frost);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
  max-width: 620px;
  width: 100%;
  padding: 16px 20px 22px;
}
.post-topbar {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  border-bottom: 1px dotted var(--border);
  padding-bottom: 6px;
}
.flag-link { color: var(--gray); text-decoration: underline; cursor: pointer; font-size: 12px; }
.flag-link:hover { color: #cc2020; }
.post-title {
  font-size: 26px;
  font-weight: 400;
  margin: 4px 0 6px;
  line-height: 1.15;
  color: var(--ink);
}
.post-meta { font-size: 14px; color: var(--gray); margin-bottom: 12px; }
.post-price { color: #1a6b3c; font-weight: bold; font-size: 17px; }
.post-price.free { color: #cc2020; }
.post-body-wrap {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.post-image { flex: 0 0 auto; }
.relic-img {
  width: 128px; height: 128px;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  background: #d8d4c6;
}
.relic-fallback {
  width: 128px; height: 128px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border);
  color: var(--gray);
  font-size: 12px;
  background: #d8d4c6;
}
.post-body {
  flex: 1 1 240px;
  font-size: 16.5px;
  line-height: 1.5;
  margin: 0;
}
.post-contact {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dotted var(--border);
  font-size: 14px;
}
.post-tag-gen {
  margin-top: 10px;
  font-size: 12px;
  color: var(--frost);
  font-style: italic;
}

/* ---- Post form ---- */
.form-post { max-width: 520px; }
.form-help { font-size: 14px; color: var(--gray); margin: 4px 0 12px; }
.form-input {
  width: 100%;
  padding: 8px 10px;
  font-family: "IM Fell English", serif;
  font-size: 17px;
  border: 1px solid var(--frost);
  background: #fbfaf4;
  color: var(--ink);
}
.form-input:focus { outline: 2px solid var(--frost); }
.share-row { display: block; font-size: 14px; margin: 12px 0; cursor: pointer; }
.form-buttons { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.conjure-btn {
  font-family: "VT323", monospace;
  font-size: 20px;
  background: var(--frost);
  color: #eef4f8;
  border: 1px solid #24404f;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}
.conjure-btn:hover:not(:disabled) { background: #4a728f; }
.conjure-btn:disabled { opacity: 0.6; cursor: wait; }
.cancel { font-size: 14px; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #1c1a16;
  color: #e9e4d4;
  border: 1px solid var(--frost);
  padding: 12px 18px;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
  animation: toastin 0.3s ease;
}
.toast-rune { color: #7fd3a8; font-weight: bold; }
@keyframes toastin {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ---- Footer ---- */
.cl-footer {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 2px solid var(--frost);
  text-align: center;
  font-size: 13px;
  color: var(--gray);
}
.footer-links { margin-bottom: 6px; }
.footer-copy { font-style: italic; margin-bottom: 6px; }
.footer-remix a { color: var(--blue); text-decoration: underline; }
.footer-remix a:hover { color: #cc2020; }

/* ---- Mobile ---- */
@media (max-width: 680px) {
  .cl-body { flex-direction: column; }
  .cl-sidebar {
    flex: 1 1 auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
  }
  .side-label { width: 100%; }
  .cat-blurb { display: none; }
  .rune-divider { width: 100%; margin: 8px 0; }
  .community-toggle { width: 100%; }
  .cl-title { font-size: 32px; }
  .mood-badge { position: static; display: inline-block; margin: 8px 0 0; }
  .row-date { min-width: 70px; }
  .row-title { flex: 1 1 100%; }
}
</parameter>