:root{
  /* Vintage, low-sat */
  --bg: #0f0f10;         /* charcoal */
  --bg-elev: #151311;    /* deep brown-gray */
  --card: #1a1815;       /* card base */
  --text: #e8e3d9;       /* warm off-white */
  --muted: #b7b0a5;      /* dusty */
  --accent: #c49a6c;     /* brass */
  --accent-2:#7da095;    /* dusty teal */
  --border:#2a2621;
  --shadow:0 10px 28px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--text);
  font:17px/1.75 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans";
  text-rendering:optimizeLegibility;
}

/* ===== Topbar ===== */
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; gap:14px;
  padding:10px 14px; background:rgba(20,18,16,.9); backdrop-filter:blur(6px);
  border-bottom:1px solid var(--border);
}
#menuBtn{
  font-size:20px; color:var(--text); background:transparent; border:1px solid var(--border);
  padding:6px 10px; border-radius:10px; cursor:pointer;
}
.logo-wrap{ text-decoration:none; line-height:1; position:relative; z-index:2 }
.logo{
  display:inline-block; font-weight:800; letter-spacing:2px; font-size:18px;
  color:transparent;
  background:linear-gradient(90deg,#e6dccb 0%,#caa774 50%,#e6dccb 100%);
  background-size:200% 100%;
  -webkit-background-clip:text; background-clip:text;
  animation:logoSweep 20s ease-in-out infinite;
  text-shadow:0 0 6px rgba(202,167,116,.12);
}
@keyframes logoSweep{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

/* ===== Sidebar ===== */
.sidebar{
  position:fixed; left:0; top:48px; bottom:0; width:240px; transform:translateX(-100%);
  transition:transform .25s ease; background:var(--bg-elev);
  border-right:1px solid var(--border); overflow:auto; padding:12px; z-index:9;
}
.sidebar.open{ transform:translateX(0) }
.sidebar nav a{
  display:block; padding:10px 12px; color:var(--text); text-decoration:none; border-radius:10px;
}
.sidebar nav a:hover{ background:#1b1916; color:var(--accent-2) }

/* ===== Content ===== */
.content{ max-width:980px; margin:0 auto; padding:18px 16px 90px; position:relative; z-index:1 }
.route[hidden]{ display:none }

/* Cards / hero */
.hero-card{
  border:1px solid var(--border); border-radius:16px;
  background:linear-gradient(180deg,var(--card) 0%,#161410 100%);
  padding:18px; box-shadow:var(--shadow);
}

/* ===== Posts ===== */
.posts-header{ display:flex; align-items:end; justify-content:space-between; gap:12px; flex-wrap:wrap }
h2{ font-size:28px; margin:12px 0 10px; text-wrap:balance }

#search{
  border:1px solid var(--border); background:#12110f; color:var(--text);
  padding:10px 12px; border-radius:12px; outline:none; min-width:240px;
}
#search:focus{ border-color:#3a342e; box-shadow:0 0 0 3px rgba(196,154,108,.18) }

/* Tags */
.tags{ display:flex; gap:8px; flex-wrap:wrap }
.tag{
  border:1px solid var(--border); color:var(--muted); padding:4px 10px; border-radius:999px;
  cursor:pointer; user-select:none; font-size:13px; background:#161411;
}
.tag.active{ color:#0e1212; background:var(--accent-2); border-color:transparent }

/* Month tiles */
.months{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:10px; margin:10px 0 2px
}
.month-tile{
  border:1px solid var(--border);
  background:linear-gradient(180deg,#1b1916,#171512);
  border-radius:14px; padding:10px 12px; cursor:pointer; color:var(--text);
  transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease;
}
.month-tile:hover{ transform:translateY(-1px); border-color:#3a342e; box-shadow:0 10px 24px rgba(34,30,24,.4) }
.month-tile.active{ outline:2px solid rgba(125,160,149,.35) }
.month-tile .m{ font-weight:600 }
.month-tile .c{ color:var(--muted); font-size:12px }

/* Card list */
.post-list{ display:grid; gap:14px; margin-top:12px }
.post-card{
  background:linear-gradient(180deg,#1b1917 0%,#161411 100%);
  border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.post-card:hover{
  transform:translateY(-2px);
  border-color:#3a342e;
  box-shadow:0 14px 32px rgba(30,26,22,.55);
}
.card-link{ display:block; color:inherit; text-decoration:none; padding:16px }
.post-title{ margin:0 0 6px; font-size:21px; letter-spacing:.2px }
.meta{ color:var(--muted); font-size:13px; margin-bottom:10px }
.excerpt{ margin:0 }
.chip-row{ display:flex; gap:6px; margin-top:10px; flex-wrap:wrap }
.chip{
  background:#1c1916; border:1px solid #2a2621; color:#e8e3d9; font-size:12px;
  padding:2px 8px; border-radius:999px
}

/* ===== Image “liminal” treatment ===== */
.reader-body img, .content figure img{
  display:block; max-width:100%; height:auto;
  filter:grayscale(.6) blur(.4px) contrast(.98);
  opacity:.92; transition:filter .35s ease, opacity .35s ease, transform .35s ease;
}
.reader-body img:hover, .reader-body img:focus,
.content figure:hover img, .content figure:focus img{
  filter:none; opacity:1; transform:translateZ(0);
}
figure{ margin:16px 0 }
figcaption{ color:var(--muted); font-size:13px; margin-top:6px }

/* ===== Footer ===== */
.footer{ border-top:1px solid var(--border); padding:14px 0; color:var(--muted) }
.footer .container{
  max-width:980px; margin:0 auto; padding:0 16px; display:flex; gap:10px; flex-wrap:wrap; align-items:center
}
.footer .sep{ margin:0 8px; color:#6c655c }
.footer a{ color:var(--muted); text-decoration:none }
.whisper{ margin-left:auto; color:#a7a096; font-size:13px; opacity:.9 }

/* Selection + a11y */
::selection{ background:rgba(196,154,108,.28) }
a:focus-visible,button:focus-visible{ outline:2px solid var(--accent-2); outline-offset:2px }

/* Reading progress (post page) */
.progress{
  position:fixed; top:0; left:0; height:3px; width:0%;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  z-index:9999;
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  .logo{ animation:none !important }
  *{ transition:none !important }
}

/* ===== Ambient mini-bar ===== */
.ambient{
  position:fixed; right:12px; bottom:12px; z-index:20;
  background:#1a1816; border:1px solid #2a2621; border-radius:12px;
  padding:6px 10px; box-shadow:0 8px 20px rgba(0,0,0,.35)
}
.ambient .btn.ghost{ background:transparent; border:1px solid #3a342e; color:#e8e3d9 }
.yt-ghost{ width:1px; height:1px; overflow:hidden }

/* Recs list with thumbnails */
.rec-card{ display:flex }
.rec-card .card-link{ display:flex; gap:12px; align-items:flex-start; padding:12px }
.thumb{
  width:120px; height:80px; object-fit:cover; flex:0 0 120px;
  border-radius:10px; border:1px solid var(--border);
  filter:grayscale(.5) blur(.2px) contrast(.98); opacity:.92; transition:filter .3s ease,opacity .3s ease;
}
.rec-card:hover .thumb{ filter:none; opacity:1 }
.rec-body{ flex:1 }

/* stars */
.stars{ font-size:14px; letter-spacing:1px; color:#d9c39f }

/* Welcome panel: not a “post blob” */
.welcome-card{
  border:1px solid var(--border);
  border-left:4px solid var(--accent);
  border-radius:12px;
  background:#151311;               /* flatter, not gradient */
  padding:16px 18px;
  box-shadow:0 8px 22px rgba(0,0,0,.35);
}

/* Year row reuses month tiles style – no change needed, just spacing tweak */
#dailyYears{ margin-top:8px }



/* ==GACHIAKUTA== */
/* Container */
.gachi-container {
  background: linear-gradient(135deg, #1a1a1a, #2b0000);
  border: 2px solid #440000;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 25px rgba(150, 0, 0, 0.5);
  animation: gachi-flicker 4s infinite;
}

/* Poster */
.gachi-poster {
  width: 100%;
  max-width: 500px;
  border: 3px solid #600;
  filter: contrast(1.2) saturate(1.1) brightness(0.9);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
  transition: transform 0.3s ease, filter 0.3s ease;
}
.gachi-poster:hover {
  transform: scale(1.02) rotate(-1deg);
  filter: contrast(1.4) saturate(1.3);
}

/* Text */
.gachi-text {
  margin-top: 1rem;
  color: #eee;
  font-family: 'Courier New', monospace;
  line-height: 1.6;
  text-align: center;
}

.gachi-lead {
  font-size: 1.3rem;
  font-weight: bold;
  color: #ff3333;
  text-shadow: 0 0 6px #ff0000, 0 0 10px #660000;
}

/* Subtle flicker animation for the whole box */
@keyframes gachi-flicker {
  0%, 19%, 21%, 23%, 100% {
    opacity: 1;
  }
  20%, 22% {
    opacity: 0.95;
  }
}
/* ==GACHIAKUTA== */


.music-player {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #151515;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 14px;
}

.music-player .thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
}

.music-player button {
  background: none;
  border: none;
  color: #eee;
  font-size: 14px;
  cursor: pointer;
}

.music-player #trackTitle {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

#volumeSlider {
  width: 80px;
  accent-color: #c9a96b;
}

/* hide iframe */
#yt-ghost, #yt-ghost iframe {
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
}




.discord-card {
  margin-top: 20px;
  padding: 10px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.discord-card img.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.discord-card .info { line-height: 1.2; }
.discord-card .status { font-size: 12px; opacity: 0.8; }

/* Mood section header */
.moods {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #333;
}

.moods h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px;
  color: #b7b0a5;
}

/* Mood links styled like sidebar items */
.mood-links a {
  display: block;
  padding: 6px 10px;
  margin: 3px 0;
  border-radius: 6px;
  text-decoration: none;
  color: #ccc;
  font-size: 14px;
  transition: background .2s, color .2s;
}

.mood-links a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}


