/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════ */
:root {
  --bg:          #f4f4f4;
  --bg2:         #ffffff;
  --bg3:         #eeeeee;
  --bg4:         #f0f0f0;
  --text:        #1a1a1a;
  --text-muted:  #999999;
  --text-sub:    #555555;
  --text-inv:    #ffffff;
  --accent:      #405FFA;
  --link:        #405FFA;
  --link-visited: #FA7E40;
  --link-hover:  #FA405F;
  --border:      #100C08;
  --border-lt:   #eeeeee;
  --font-main:   'Newsreader', serif;
  --font-tech:   'Karla', sans-serif;
  --font-mono:   'Space Mono', monospace;
  --shadow:      4px 4px 0px var(--border);
  --shadow-lg:   8px 8px 0px var(--border);
  --radius:      7px;
  --radius-sm:   4px;
}

body.dark {
  --bg:         #000000;
  --bg2:        #121212;
  --bg3:        #1a1a1a;
  --bg4:        #080808;
  --text:       #fbfbfb;
  --text-muted: #888888;
  --text-sub:   #cccccc;
  --text-inv:   #ffffff;
  --accent:     #405FFA;
  --border:     #3a3a3a;
  --border-lt:  #222222;
  --shadow:     4px 4px 0px rgba(0,0,0,0.55);
  --shadow-lg:  8px 8px 0px rgba(0,0,0,0.55);
}

/* ═══════════════════════════════════════════════════
   LINKS
═══════════════════════════════════════════════════ */
a {
  color: var(--link);
  text-decoration: underline;
}
a:visited {
  color: var(--link-visited);
}
a:hover {
  color: var(--link-hover);
  opacity: 1; /* full color intensity on hover, no fade */
}

/* ═══════════════════════════════════════════════════
   PETAL FALLING ANIMATION
═══════════════════════════════════════════════════ */
#petal-field {
  position: fixed;
  inset: 0;
  pointer-events: none; /* never blocks clicks/links underneath */
  overflow: hidden;
  z-index: 60; /* raise/lower this if it ends up over/under modals & menus */
}
 
.petal-fall {
  position: absolute;
  top: 0;
  will-change: transform, opacity;
  animation-name: petal-fall;
  animation-timing-function: steps(14, end);
  animation-fill-mode: forwards;
}
 
.petal-fall span {
  display: inline-block;
  animation-name: petal-sway;
  animation-timing-function: steps(6, end);
  animation-iteration-count: infinite;
}
 
@keyframes petal-fall {
  from { transform: translateY(-10vh); opacity: 0; }
  5%   { opacity: var(--petal-opacity, 0.85); }
  95%  { opacity: var(--petal-opacity, 0.85); }
  to   { transform: translateY(110vh); opacity: 0; }
}
 
@keyframes petal-sway {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25%      { transform: translateX(15px) rotate(90deg); }
  50%      { transform: translateX(-12px) rotate(180deg); }
  75%      { transform: translateX(18px) rotate(270deg); }
}
 
@media (prefers-reduced-motion: reduce) {
  #petal-field { display: none; }
}

/* ── BASE RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; cursor: default; }

body {
  background-color: var(--bg);
  background-image: url("https://www.transparenttextures.com/patterns/p6.png");
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

body.dark { background-image: none; }

.page-wrapper {
  display: block;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-height: 60vh;
  overflow-x: hidden;
}

/* ── TOP NAV ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.65rem 1.5rem;
  background: var(--bg2);
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 3px 0 var(--border);
  transition: background-color 0.3s, border-color 0.3s;
}

.nav-left   { flex: 0 0 auto; }
.nav-center { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.nav-right  { flex: 0 0 auto; display: flex; align-items: center; gap: 0.35rem; position: relative; }

.logo {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}
.logo-slash { color: var(--accent); }

.marquee-container {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-sub);
  background: var(--bg4);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  padding: 5px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-content { display: inline-block; padding-left: 100%; animation: marquee 20s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.nav-links { display: flex; flex-direction: row; align-items: center; gap: 0.25rem; }

.nav-item {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-item > span { font-size: 0.58rem; color: var(--text-muted); }
.nav-item:hover { background: var(--bg4); color: var(--accent); border-color: var(--border-lt); }
.nav-item.active { background: var(--accent); color: var(--text-inv); border-color: var(--accent); }
.nav-item.active > span { color: var(--text-inv); }

.menu-trigger {
  display: none;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  text-transform: uppercase;
}

.dark-toggle {
  background: var(--bg2);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.dark-toggle:hover { background: var(--bg4); color: var(--accent); }

.nav-admin-trigger {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem 0.35rem;
  user-select: none;
  transition: color 0.2s;
}
.nav-admin-trigger:hover { color: var(--accent); }

/* ── STATUS FOOTER ── */
.status-footer {
  margin-top: auto;
  width: 100%;
  background: var(--bg2);
  border-top: 1.5px solid var(--border);
  padding: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-sub);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.footer-tag { color: var(--accent); }
.status-dot { color: var(--accent); font-size: 0.9rem; animation: blink 1.5s infinite; flex-shrink: 0; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* ── MAIN / SECTIONS ── */
main { width: 100%; min-width: 0; }
section        { display: none; width: 100%; }
section.active { display: block; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════════
   HOME PAGE — BENTO GRID
═══════════════════════════════════════════════════════ */
#home.active {
  display: block;
  padding-top: 0.5rem;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr minmax(220px, 280px);
  grid-template-rows: auto auto auto;
   grid-template-areas:
    "hello   heroblock imgright"
    "imgleft heroblock updates"
    "status  heroblock quote";
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  position: relative;
  z-index: 2;
}

.home-image-left  { grid-area: imgleft; }
.home-image-right { grid-area: imgright; }

.home-image-card {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
}
.home-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── HOME CARD BASE ── */
.home-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: visible; /* allow sticker overflow */
  display: flex;
  flex-direction: column;
  /* clip the card face but not children outside bounds */
  isolation: isolate;
}

.home-card-header {
  background: var(--bg3);
  border-bottom: 1.5px solid var(--border);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-sub);
  letter-spacing: 0.07em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.home-card-body {
  padding: 1rem 1.1rem;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text);
}

/* ── HERO CARD ── */
.home-hero-block {
  grid-area: heroblock;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  align-self: center;
  gap: 1.25rem;
}

.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 260px;
  padding: 2rem 2.5rem 2.5rem;
  gap: 0;
  position: relative;
  overflow: visible;
}

.hero-card .site-title {
  font-family: var(--font-tech);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  display: inline-block;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
}
.hero-card .hero-text {
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero-card .hero-text i { color: var(--accent); font-style: italic; }

/* ── HELLO CARD ── */
.hello-card { grid-area: hello; overflow: visible; align-self: start; }
.hello-card .home-card-body { flex: 0 0 auto; }
.hello-card .home-card-body p:not(:first-child) { margin-top: 0.8rem; }

/* ── UPDATES CARD ── */
.updates-card {
  grid-area: updates;
  align-self: start;
  max-height: 280px;
  overflow: hidden;
}
.updates-card .home-card-body {
  flex: 0 0 auto;
  overflow: hidden;
}

.home-update-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-lt);
  cursor: pointer;
  transition: opacity 0.15s;
}
.home-update-item:last-child { border-bottom: none; padding-bottom: 0; }
.home-update-item:hover { opacity: 0.7; }
.home-update-item:hover .home-update-title { color: var(--accent); }

.home-update-type {
  font-size: 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: bold;
}
.home-update-title {
  font-size: 0.78rem;
  color: var(--text);
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-update-meta {
  font-size: 8px;
  color: var(--text-muted);
}
.home-updates-empty {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── STATUS CARD ── */
.status-card { grid-area: status; overflow: visible; }

.status-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.85rem;
  gap: 3px;
}
.status-row:last-child { margin-bottom: 0; }
.status-row-label {
  font-size: 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: bold;
}
.status-row-val {
  font-size: 0.75rem;
  color: var(--text);
  line-height: 1.45;
}
/* live clock row inside status card */
.status-live-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-top: 2px;
}

/* ── QUOTE CARD ── */
.quote-card { grid-area: quote; overflow: visible; }

.quote-refresh {
  background: none;
  border: 1px solid var(--border-lt);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}
.quote-refresh:hover { color: var(--accent); border-color: var(--accent); }

.quote-terminal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}
.qt-line { color: var(--text-sub); }
.qt-word {
  color: var(--accent);
  font-size: 1rem;
  font-weight: bold;
  font-family: var(--font-tech);
  text-transform: uppercase;
  display: block;
  margin: 6px 0 2px;
}
.qt-pos { color: var(--text-muted); font-size: 0.65rem; display: block; margin-bottom: 6px; }
.qt-def { color: var(--text); font-style: italic; display: block; margin-bottom: 6px; line-height: 1.6; }
.qt-source { color: var(--text-muted); font-size: 0.6rem; display: block; }

/* ── HOME RESPONSIVE ── */
@media (max-width: 1000px) {
  .home-grid {
    grid-template-columns: minmax(200px, 1fr) 1.4fr minmax(200px, 1fr);
  }
}

@media (max-width: 800px) {
  .home-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "heroblock heroblock"
      "hello     imgright"
      "imgleft   updates"
      "status    quote";
  }
  .hero-card { min-height: 200px; padding: 1.5rem 1.5rem 2rem; }
  .hero-card .hero-text { font-size: clamp(1.2rem, 4vw, 1.8rem); }
  .hello-card, .updates-card { align-self: start; }
  .updates-card { max-height: 260px; }
}

@media (max-width: 580px) {
  .home-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heroblock"
      "hello"
      "imgleft"
      "imgright"
      "updates"
      "status"
      "quote";
  }
}

/* ── SECTION HEADER ── */
.section-header { margin-bottom: 2rem; text-align: center; }
.section-header h1 {
  font-family: var(--font-tech);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.section-header h1 span { color: var(--accent); }
.section-header p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── ART GRID ── */
.art-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* tight thumbnail columns */
  gap: 0.5rem; /* tighter gap keeps the retro grid feel */
}
.art-post {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 var(--border); /* scaled down shadow to match smaller cards */
  cursor: pointer;
  background: var(--bg3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.art-post:hover { transform: translateY(-2px); box-shadow: 3px 4px 0 var(--border); }
.art-post img { width:100%; height:100%; object-fit:cover; display:block; transition:transform 0.35s ease; pointer-events:none; -webkit-user-drag:none; }
.art-post:hover img { transform: scale(1.04); }

/* ── POST LABEL ── */
.post-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.art-post .post-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.88);
  border-top: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  font-size: 8px;                    /* slightly smaller for dense grid */
  align-items: center;
  color: #555;
  gap: 0.4rem;
  /* Prevent the label from ever growing taller than one line */
  flex-wrap: nowrap;
  overflow: hidden;
}
body.dark .art-post .post-label { background: rgba(20,20,20,0.88); color: #aaa; }

/* Title span — left side, gets priority, truncates if needed */
.art-post .post-label span:first-child {
  flex: 1 1 0;                       /* grows to fill available space */
  min-width: 0;                      /* critical: allows flex child to shrink below content width */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Meta span — right side, fixed width, always truncates */
.art-post .post-label span:last-child {
  flex: 0 0 auto;                    /* does not grow or shrink */
  max-width: 45%;                    /* never eats more than half the label */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  color: var(--text-muted);
  opacity: 0.75;                     /* de-emphasise meta vs title */
}

/* ── ADMIN DELETE / EDIT BUTTONS ── */
.admin-delete-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--accent);
  color: var(--text-inv);
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
  z-index: 5;
  display: none;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}
.admin-delete-btn:hover { opacity: 0.8; }
body.admin-mode .admin-delete-btn { display: block; }

.admin-edit-btn {
  background: var(--bg2);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
  text-transform: uppercase;
  display: none;
  transition: background 0.15s, color 0.15s;
  z-index: 5;
  border-radius: var(--radius-sm);
}
.admin-edit-btn:hover { background: var(--accent); color: var(--text-inv); }
body.admin-mode .admin-edit-btn { display: inline-block; }

.admin-log-actions {
  display: none;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.admin-log-actions .admin-delete-btn,
.admin-log-actions .admin-edit-btn { position: static; }
body.admin-mode .admin-log-actions { display: flex; }

/* ── CATEGORY NAVIGATION ── */
.category-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 0.5rem;
}
.category-tab {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  transition: all 0.15s;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}
.category-tab:hover { background: var(--bg4); }
.category-tab.active { background: var(--accent); color: var(--text-inv); border-color: var(--accent); }

/* ── LOGS / WRITING ── */
.blog-list-item {
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 0;
  background: var(--bg2);
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow);           /* flat — no elevation in this era */
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
}
.blog-list-item:hover {
  transform: translateY(-2px);             /* subtle lift on hover */
  border-color: var(--accent);
}
.blog-list-item:hover h2,
.blog-list-item:hover .log-card-title { color: var(--accent); }

/* title bar — pinstripe fill, tabs punched through */
.log-titlebar {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-bottom: 1.5px solid var(--border);
  overflow: hidden;
}
.log-titlebar::before {
  content: '';
  position: absolute;
  inset: 3px;
  background-image: repeating-linear-gradient(
    to bottom, var(--border) 0 1px, transparent 1px 3px
  );
}
.log-titlebar-close {
  position: relative;
  z-index: 2;
  width: 8px;
  height: 8px;
  border: 1.3px solid var(--border);
  background: var(--bg2);
  margin-right: 7px;
  flex-shrink: 0;
}
.log-titlebar-label {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  background: var(--bg2);
  padding: 0 9px;
  max-width: 75%;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* condensed body */
.log-card-body { padding: 0.5rem 0.75rem 0.65rem; }
.log-card-title {
  font-family: var(--font-tech);
  text-transform: uppercase;
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}

/* tags — accent pill chips */
.log-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 0.4rem; }
.log-tag {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  line-height: 1.4;
  padding: 1.5px 7px;
  border-radius: 999px;
}

.log-container {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius);
}

.log-body-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--text);
  /* Long entries scroll inside the log card instead of stretching the page.
     Title + tags + stickers stay anchored; only the prose scrolls. */
  max-height: 68vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.75rem;
  scrollbar-gutter: stable;
}
.log-body-text::-webkit-scrollbar { width: 8px; }
.log-body-text::-webkit-scrollbar-track { background: var(--bg3); border-radius: 4px; }
.log-body-text::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.log-body-text::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ═══════════════════════════════════════════════════════
   LOG PHOTO VIEWER — OS window aesthetic
═══════════════════════════════════════════════════════ */

/* Outer window shell */
.log-photoviewer {
  border: 1.5px solid var(--border);
  box-shadow: 3px 3px 0 var(--border);
  background: var(--bg2);
  margin: 1.5rem 0 1rem;
  overflow: hidden;
}

/* Titlebar — reuses the pinstripe pattern from .log-titlebar */
.log-pv-titlebar {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-bottom: 1.5px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
.log-pv-titlebar::before {
  content: '';
  position: absolute;
  inset: 3px;
  background-image: repeating-linear-gradient(
    to bottom, var(--border) 0 1px, transparent 1px 3px
  );
}
/* Window control dots — left side */
.log-pv-controls {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 4px;
  margin-right: 8px;
  flex-shrink: 0;
}
.log-pv-dot {
  width: 7px; height: 7px;
  border: 1.3px solid var(--border);
  background: var(--bg2);
}
/* Titlebar label — centered, white bg cutout */
.log-pv-titlebar-label {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  background: var(--bg2);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

/* Main image display area */
.log-pv-display {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.log-pv-display img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  transition: opacity 0.12s ease;
}
.log-pv-display img.pv-fade {
  opacity: 0;
}

/* Prev / Next nav buttons — sit inside the display area */
.log-pv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  width: 28px; height: 28px;
  cursor: pointer;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.log-pv-nav:hover   { background: var(--accent); color: #fff; border-color: var(--accent); }
.log-pv-nav:disabled { opacity: 0.25; pointer-events: none; }
.log-pv-nav.prev { left: 6px; }
.log-pv-nav.next { right: 6px; }

/* Status bar — bottom toolbar */
.log-pv-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-top: 1.5px solid var(--border);
  background: var(--bg2);
  gap: 8px;
}
.log-pv-counter {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
/* "OPEN" button — opens full lightbox */
.log-pv-open-btn {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 2px 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.log-pv-open-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── LOG TAG SIDEBAR ── */
.logs-body {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.logs-sidebar {
  flex: 0 0 190px;
  position: sticky;
  top: 2rem;
  font-family: var(--font-mono);
  font-size: 11px;
}
.tag-sidebar-title {
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.tag-sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 1px 8px;
  margin-bottom: 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  cursor: pointer;
  text-transform: uppercase;
  line-height: 1.2;
  transition: transform 0.15s, border-color 0.2s, background-color 0.2s, color 0.2s;
}
.tag-sidebar-item:hover { transform: translateX(2px); border-color: var(--accent); }
.tag-sidebar-item.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.tag-sidebar-count { font-size: 10px; opacity: 0.7; }

.blog-list { flex: 1 1 auto; min-width: 0; }

@media (max-width: 720px) {
  .logs-body { flex-direction: column; }
  .logs-sidebar {
    position: static;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .tag-sidebar-item {
     justify-content: center;
     gap: 5px;
     min-width: 0;
     margin-bottom: 0;
     padding: 2px 8px;
     font-size: 10px;
     border-radius: var(--radius);
  }
}

/* ═══════════════════════════════════════════════════════
   SHRINES — Y2K REDESIGN
═══════════════════════════════════════════════════════ */

/* ── GRID — tight, dense, more columns ── */
.shrines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

/* ── CARD — OS window chrome aesthetic ── */
.shrine-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: 3px 3px 0 var(--border);  /* hard pixel shadow */
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.shrine-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border);
}

/* Title bar — mimics a retro window header */
.shrine-card-titlebar {
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  padding: 3px 6px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* Thumbnail */
.shrine-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;               /* square thumbnails feel more retro */
  object-fit: cover;
  display: block;
  background: var(--bg3);
  flex-shrink: 0;
  border-bottom: 1.5px solid var(--border);
  filter: saturate(0.9);              /* slight desaturation = old web feel */
  transition: filter 0.2s;
}
.shrine-card:hover .shrine-card-img { filter: saturate(1.1); }

.shrine-card-img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text-muted);
  flex-shrink: 0;
  border-bottom: 1.5px solid var(--border);
}

/* Label area */
.shrine-card-label {
  padding: 0.45rem 0.5rem;
  border-top: none;                  /* titlebar handles top border */
}
.shrine-card-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shrine-card:hover .shrine-card-title { color: var(--accent); }

.shrine-card-desc {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── SHRINE READER CONTAINER ── */
.shrine-container {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: 5px 5px 0 var(--border);
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0;
}

/* Hero image — taller, feels like an old fanlisting banner */
.shrine-hero-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 1.5px solid var(--border);
  filter: saturate(0.85) contrast(1.05);
}

/* Shrine reader content area */
.shrine-content {
  padding: 1.5rem 1.75rem;
}
.shrine-content .log-body-text { white-space: normal; }

/* ── GALLERY — smaller, denser, harder borders ── */
.shrine-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.35rem;
  margin-top: 1rem;
}
.shrine-gallery-item { cursor: zoom-in; }
.shrine-gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1.5px solid var(--border);
  display: block;
  border-radius: 0;                  /* sharp corners throughout */
  transition: transform 0.15s, filter 0.15s;
  filter: saturate(0.88);
  cursor: pointer;
}
.shrine-gallery-img:hover {
  transform: scale(1.04);
  filter: saturate(1.1);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════
   LETTERS — SEALED BACK-OF-ENVELOPE REDESIGN
═══════════════════════════════════════════════════ */

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* flexible, dense */
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ── ENVELOPE SHELL ── */
.letter-envelope {
  position: relative;
  aspect-ratio: 16 / 11;
  /* no fixed min-width — would fight the grid's own sizing */
  background-color: var(--bg2);
  background-image: radial-gradient(
    color-mix(in srgb, var(--border) 14%, transparent) 1px,
    transparent 1px
  );
  background-size: 10px 10px;
  border: 1.5px solid var(--border);
  border-radius: 0;                   /* sharp y2k corners */
  box-shadow: 3px 3px 0 var(--border);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.letter-envelope:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border);
}

/* ── TOP TRIANGULAR FLAP ── */
.letter-envelope::before {
  content: '';
  position: absolute;
  inset: 0;
  height: 55%;
  clip-path: polygon(0 0, 100% 0, 50% 95%);
  background: color-mix(in srgb, var(--bg2) 92%, var(--border));
  pointer-events: none;
  z-index: 2;
}

/* ── X-FOLD LINES — back of sealed envelope ── */
.env-flap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(
      to bottom right,
      transparent calc(50% - 0.6px),
      color-mix(in srgb, var(--border) 45%, transparent) calc(50% - 0.6px),
      color-mix(in srgb, var(--border) 45%, transparent) calc(50% + 0.6px),
      transparent calc(50% + 0.6px)
    ),
    linear-gradient(
      to bottom left,
      transparent calc(50% - 0.6px),
      color-mix(in srgb, var(--border) 45%, transparent) calc(50% - 0.6px),
      color-mix(in srgb, var(--border) 45%, transparent) calc(50% + 0.6px),
      transparent calc(50% + 0.6px)
    );
}

/* ── WAX SEAL — visual anchor at the center of the X ── */
.env-seal {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  /* Double-ring gives it a real wax seal look */
  box-shadow: 0 0 0 3px var(--bg2), 0 0 0 5px var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--accent);
  z-index: 5;
  transition: transform 0.2s, color 0.15s;
}
.letter-envelope:hover .env-seal {
  transform: translate(-50%, -50%) scale(1.1);
}

/* ── STAMP — layered above the flap ── */
.letter-envelope .env-stamp {
  position: absolute;
  top: 8px; right: 10px;
  width: 50px; height: 58px;
  background: var(--bg2);
  border: 2px dashed color-mix(in srgb, var(--border) 40%, transparent);
  padding: 3px;
  z-index: 6;
  transform: rotate(-4deg);
  box-shadow: 2px 2px 0 var(--border);
  transition: transform 0.25s;
}
.letter-envelope:hover .env-stamp {
  transform: rotate(-2deg) scale(1.03);
}
.letter-envelope .env-stamp-inner {
  width: 100%; height: 100%;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg2));
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 3px 2px;
  border: 1px solid var(--border);
}
.letter-envelope .env-stamp-flower {
  font-size: 14px;
  color: var(--accent);
  line-height: 1;
  margin-top: 1px;
}
.letter-envelope .env-stamp-cost {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 8px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.letter-envelope .env-stamp-postage {
  font-family: var(--font-mono);
  font-size: 5.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1px;
}

/* ── POSTMARK CIRCLE ── */
.letter-envelope .env-postmark {
  position: absolute;
  top: 12px;
  right: 64px;
  font-family: var(--font-mono);
  font-size: 7px;
  color: color-mix(in srgb, var(--text-muted) 75%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-muted) 45%, transparent);
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  transform: rotate(-12deg);
  letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--bg2) 65%, transparent);
  z-index: 6;
  pointer-events: none;
  line-height: 1.2;
}

/* ── LETTER NUMBER — bottom-left corner ── */
.env-letter-num {
  position: absolute;
  bottom: 7px; left: 9px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  z-index: 6;
}

/* ── "CLICK TO OPEN" HINT — fades in on hover ── */
.env-open-hint {
  position: absolute;
  bottom: 7px; right: 9px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 6;
}
.letter-envelope:hover .env-open-hint { opacity: 1; }

/* ── ADMIN ACTIONS ── */
body.admin-mode .letter-envelope .admin-log-actions { display: flex; }
.letter-envelope .admin-log-actions .admin-edit-btn,
.letter-envelope .admin-log-actions .admin-delete-btn {
  position: static;
  font-size: 8px;
  padding: 2px 5px;
}

/* ── LETTERS — LEGACY CARD STYLE (kept in case it's still referenced) ── */

.letter-card {
  padding: 1.5rem 1.75rem;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
  border-radius: var(--radius);
  overflow: hidden;
}
.letter-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: var(--radius) 0 0 var(--radius);
}
.letter-card:hover { transform: translateY(-2px); }
.letter-card:hover .letter-subject { color: var(--accent); }

.letter-to {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.letter-subject {
  font-family: var(--font-tech);
  font-size: 1.3rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  transition: color 0.15s;
}
.letter-stamp {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--text-muted);
  border: 1px dashed var(--border-lt);
  padding: 4px 8px;
  text-align: center;
  transform: rotate(2deg);
  text-transform: uppercase;
  border-radius: 2px;
}

/* letter reader */
.letter-container {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
}
.letter-paper {
  padding: 3rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.75;
  border-top: 4px solid var(--accent);
}
.letter-paper-to {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 0.5rem;
}
.letter-paper-re {
  font-family: var(--font-tech);
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-lt);
}
.letter-body-text {
  white-space: pre-wrap;
  color: var(--text);
}
.letter-unsent-stamp {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-lt);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.letter-unsent-badge {
  background: var(--accent);
  color: var(--text-inv);
  padding: 2px 8px;
  font-size: 8px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── BULLETIN BOARD ── */
.board-home-row {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
  margin-top: 1.25rem;
}
.board-home-card { flex: 1 1 auto; min-width: 0; }

#board-section {
  width: 100%;
  height: 420px;          /* default fixed size — replaces the old drag-to-resize */
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-width: 800px) {
  #board-section { height: 340px; }
}

.visitor-count-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@media (max-width: 800px) {
  .board-home-row { flex-direction: column; }
  .board-sidebar {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    gap: 0.75rem;
  }
}

/* ── BULLETIN SIDEBAR — compact visitor count + image slot ── */
.board-sidebar {
  flex: 0 0 170px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.visitor-count-card { flex: 0 0 auto; }
.visitor-count-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 0.9rem 0.5rem;   /* tighter than the default home-card-body padding */
}
.visitor-count-number {
  font-family: var(--font-tech);
  font-size: 1.5rem;        /* scaled down to match the now-compact card */
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.visitor-count-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* fixed-shape, responsive-sized image slot — aspect-ratio holds the shape
   constant while the actual pixel size scales with the sidebar's width */
.board-image-card {
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
}
.board-image-card .board-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── BULLETIN — fixed scroll viewport + tall inner content layer ── */
.board-canvas {
  flex: 1;
  min-height: 0;             /* lets this flex child shrink to fit #board-section's fixed height, which is what makes overflow:auto actually trigger */
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}
.board-canvas-inner {
  position: relative;
  width: 100%;
  min-height: 800px;         /* deliberately taller than the visible viewport — this is the scrollable "world" the notes live in */
  background-image: radial-gradient(var(--border-lt) 1px, transparent 1px);
  background-size: 20px 20px;
}
.board-canvas::-webkit-scrollbar { width: 8px; }
.board-canvas::-webkit-scrollbar-track { background: var(--bg3); border-radius: 4px; }
.board-canvas::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.board-canvas::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── BULLETIN — controls, roomier spacing ── */
.board-controls {
  flex-shrink: 0;
  background: var(--bg2);
  padding: 1rem 1.1rem;
  border-top: 1.5px solid var(--border);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.board-input-row { display: flex; gap: 10px; align-items: flex-end; }
input.board-input, textarea.board-input {
  border: 1px solid var(--border-lt);
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
  outline: none;
  cursor: text;
  border-radius: var(--radius-sm);
}
textarea.board-message-input {
  resize: vertical;          /* the drag handle visitors asked for, native to the browser */
  min-height: 40px;
  max-height: 160px;
}
.board-submit {
  background: var(--accent);
  color: var(--text-inv);
  border: 1.5px solid var(--border);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ── BULLETIN — COMMENT POPUPS & META ── */
.comment-country { opacity: 0.8; margin-left: 3px; } /* country code tag in message header */

.char-counter { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); text-align: right; transition: color 0.2s; }
.char-counter.warn { color: var(--accent); }
.spam-warning { font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin-top: 4px; display: none; }
.comment-popup {
  position: absolute; width: 200px;
  background: var(--bg2); border: 1.5px solid var(--border);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.12); z-index: 10;
  border-radius: var(--radius);
  overflow: hidden;
}
.comment-header {
  background: var(--accent); color: var(--text-inv);
  border-bottom: 1px solid var(--border); padding: 6px 8px;
  font-family: var(--font-mono); font-size: 9px;
  display: flex; flex-direction: column; gap: 2px;
  cursor: move; user-select: none; -webkit-user-select: none;
}
.comment-body { padding: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--text); word-wrap: break-word; overflow-wrap: break-word; }

/* ── ADMIN DECOR FORM ── */
.home-decor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════
   ABOUT — LAYOUT
═══════════════════════════════════════════════════════ */
#about.active { display: block; }

.about-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;      /* equal height cards within each row */
  max-width: 100%;
}

/* display:contents lets all child widgets sit directly in the parent grid */
.about-widgets-panel { display: contents; }

/* ── PROFILE CARD — full width, row 1 ── */
.about-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  width: 100%; max-width: 800px; margin: 0 auto;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 2;
  border-radius: var(--radius); overflow: hidden;
  grid-column: 1 / -1;
  grid-row: 1;
}

/* ── BENTO WIDGET PLACEMENT — 3×2 grid below profile ── */
/*    Row 2: Bag | Games | Likes                         */
/*    Row 3: Hobbies | Music | Quiz                      */
.aw-bag      { grid-column: 1; grid-row: 2; }
.aw-games    { grid-column: 2; grid-row: 2; }
.aw-likes    { grid-column: 3; grid-row: 2; }
.aw-hobbies  { grid-column: 1; grid-row: 3; }
.aw-music    { grid-column: 2; grid-row: 3; }
.aw-quizzes  { grid-column: 3; grid-row: 3; }

/* Badges — full width below everything */
.about-badges-wrap { grid-column: 1 / -1; }

/* ═══════════════════════════════════════════════════════
   ABOUT — WIDGET SHELL
═══════════════════════════════════════════════════════ */
.about-widget {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.about-widget-header {
  background: var(--bg3);
  border-bottom: 1.5px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-sub);
  letter-spacing: 0.07em;
  font-weight: bold;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Shared body — capped height so no widget blows out the row */
.about-widget-body {
  padding: 0.75rem;
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  align-content: flex-start;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.about-widget-body::-webkit-scrollbar { width: 4px; }
.about-widget-body::-webkit-scrollbar-thumb { background: var(--border); }

.widget-hint {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-muted);
  font-style: italic;
  align-self: center;
  width: 100%;
  text-align: center;
  padding: 1rem 0;
}

/* ═══════════════════════════════════════════════════════
   ABOUT — PROFILE CARD INTERNALS
═══════════════════════════════════════════════════════ */
.about-header {
  background: var(--bg3);
  border-bottom: 1.5px solid var(--border);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
}
.about-body        { padding: 1.5rem 2rem; font-family: var(--font-mono); }
.profile-header    { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; align-items: center; }
.profile-img       { width: 80px; height: 80px; object-fit: cover; border: 1.5px solid var(--border); border-radius: 50%; flex-shrink: 0; }
.profile-meta h3   { font-family: var(--font-mono); text-transform: uppercase; font-size: 1.05rem; color: var(--text); letter-spacing: -0.01em; }
.profile-meta p    { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.about-bio         { font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.7; color: var(--text); margin-bottom: 1.25rem; }
.tag-list          { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; }
.tag               { background: #4055fa; color: #fff; padding: 3px 10px; font-size: 10px; font-family: var(--font-mono); border-radius: 4px; letter-spacing: 0.02em; font-weight: bold; }
.about-links       { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-lt); display: flex; gap: 1rem; }
.about-links a     { font-family: var(--font-mono); font-size: 11px; text-decoration: none; color: var(--accent); font-weight: bold; cursor: pointer; }

/* ═══════════════════════════════════════════════════════
   ABOUT — BAG WIDGET
═══════════════════════════════════════════════════════ */

/* 2-col inner grid — fits the narrower 1/3-width card */
.bag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 0.5rem;
  padding: 0.5rem;
  width: 100%;
}

.bag-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bag-item:hover { transform: translateY(-3px); }

.bag-item img {
  max-width: 80px;
  max-height: 80px;
  width: auto; height: auto;
  object-fit: contain;
  filter: drop-shadow(2px 4px 4px rgba(0,0,0,0.15));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.bag-item:hover img {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(4px 6px 8px rgba(0,0,0,0.15));
}

.bag-item-emoji {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(2px 4px 4px rgba(0,0,0,0.12));
  transition: transform 0.2s ease;
}
.bag-item:hover .bag-item-emoji { transform: scale(1.1) rotate(4deg); }

.bag-item-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
  font-weight: 700;
}
.bag-item-note {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════
   ABOUT — INTERESTS TEXT LISTS
═══════════════════════════════════════════════════════ */
.interests-body {
  padding: 0.65rem 0.75rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
/* Make interests sections side-by-side when the widget is wide enough */
.interests-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem 0.75rem;
  align-items: start;
}
.interests-section {
  gap: 2px;  /* slightly more breathing room than 1px */
}

.interests-body::-webkit-scrollbar { width: 4px; }
.interests-body::-webkit-scrollbar-thumb { background: var(--border); }

.interests-section { display: flex; flex-direction: column; gap: 1px; }

.interests-sublabel {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-style: italic;
  padding-bottom: 3px;
  margin-bottom: 3px;
  border-bottom: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
}

.interests-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  line-height: 1.25;
}

/* ═══════════════════════════════════════════════════════
   ABOUT — PERSONALITY QUIZZES WIDGET
═══════════════════════════════════════════════════════ */
.quiz-scroll-body {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.65rem 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.quiz-scroll-body::-webkit-scrollbar { width: 4px; }
.quiz-scroll-body::-webkit-scrollbar-thumb { background: var(--border); }

.quiz-result-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  transition: border-color 0.15s, transform 0.15s;
}
.quiz-result-card + .quiz-result-card {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-lt);
}
.quiz-result-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.4rem 0 0.3rem;
  flex-shrink: 0;
}
.quiz-result-title {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
}
.quiz-result-title:hover { text-decoration: underline; }
.quiz-result-host { font-family: var(--font-mono); font-size: 7.5px; color: var(--text-muted); }
.quiz-result-img-wrap {
  width: 100%;
  line-height: 0;
  flex-shrink: 0;
}
.quiz-result-img {
  width: 100%;
  display: block;
  object-fit: contain;
  max-height: 220px;
}
.quiz-result-caption {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-muted);
  padding: 0.3rem 0;
  font-style: italic;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   ABOUT — RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 1140px) {
  .about-layout { grid-template-columns: repeat(2, 1fr); }

  /* Row 2: Bag full-width */
  .aw-bag     { grid-column: 1 / -1; grid-row: 2; }
  /* Row 3: Games | Likes */
  .aw-games   { grid-column: 1;      grid-row: 3; }
  .aw-likes   { grid-column: 2;      grid-row: 3; }
  /* Row 4: Hobbies | Music */
  .aw-hobbies { grid-column: 1;      grid-row: 4; }
  .aw-music   { grid-column: 2;      grid-row: 4; }
  /* Row 5: Quiz full-width */
  .aw-quizzes { grid-column: 1 / -1; grid-row: 5; }

  /* Bag can show 3 columns when it's full-width again */
  .bag-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .about-layout { grid-template-columns: 1fr; }
  .aw-bag, .aw-games, .aw-likes,
  .aw-hobbies, .aw-music, .aw-quizzes,
  .about-card, .about-badges-wrap { grid-column: 1; grid-row: auto; }
  .bag-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── LIGHTBOX ── */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(20,20,20,0.88); backdrop-filter: blur(6px); z-index: 2000; padding: 1.5rem; justify-content: center; align-items: center; }
.lightbox.show { display: flex; }
.lightbox-content {
  background: var(--bg2); border: 1.5px solid var(--border);
  width: 95vw; max-width: 1400px; max-height: 92vh; overflow: hidden;
  position: relative; box-shadow: 12px 12px 0px var(--border);
  display: flex; flex-direction: column; border-radius: var(--radius);
}
.lb-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1.5px solid var(--border); background: var(--bg2); z-index: 10; flex-shrink: 0; }
.lb-toolbar-title { font-family: var(--font-tech); font-size: 0.85rem; text-transform: uppercase; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.lb-close-btn { font-family: var(--font-mono); font-size: 10px; padding: 5px 10px; background: var(--border); color: var(--bg2); border: none; cursor: pointer; flex-shrink: 0; transition: background 0.15s; border-radius: var(--radius-sm); }
.lb-close-btn:hover { background: var(--accent); color: var(--text-inv); }
.lb-body { display: flex; flex-direction: row; flex: 1; overflow: hidden; min-height: 0; }
.lb-image-side { flex: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.25rem; border-right: 1.5px solid var(--border-lt); overflow: hidden; min-height: 0; }
.lb-info-side  { flex: 4; padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; min-width: 200px; max-width: 400px; white-space: pre-wrap;}
.lb-image-wrap { position: relative; display: flex; align-items: center; justify-content: center; flex: 1; width: 100%; padding: 0 44px; min-height: 0; overflow: auto; }
#lb-image { width: auto; height: auto; max-width: none; max-height: none; object-fit: none; border: 1px solid var(--border-lt); display: block; transition: transform 0.2s ease; cursor: grab; touch-action: none; }
#lb-image.zoomed { cursor: move; }
.lb-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: var(--bg2); border: 1.5px solid var(--border); color: var(--text); font-family: var(--font-mono); font-size: 1.1rem; width: 42px; height: 42px; cursor: pointer; z-index: 12; transition: background 0.15s, color 0.15s; border-radius: var(--radius-sm); }
.lb-nav-btn:hover    { background: var(--bg4); }
.lb-nav-btn:disabled { opacity: 0.3; pointer-events: none; }
#lb-prev { left: 0; } #lb-next { right: 0; }
.lb-image-counter { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-align: center; flex-shrink: 0; display: none; }

/* ── ADMIN — paired image+caption rows for shrine form ── */
.shrine-pair-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.shrine-pair-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 6px;
  align-items: center;
}
.shrine-pair-row .admin-input {
  margin: 0;
  font-size: 0.78rem;
}
.shrine-pair-del {
  background: transparent;
  border: 1.5px solid var(--border-lt);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.shrine-pair-del:hover {
  background: var(--accent);
  color: var(--text-inv);
  border-color: var(--accent);
}
@media (max-width: 560px) {
  .shrine-pair-row { grid-template-columns: 1fr auto; }
  .shrine-pair-row .shrine-pair-caption { grid-column: 1 / -1; }
}

.lb-desc { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text); line-height: 1.6; }
.lb-meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }

/* ── Simple lightbox (shrines + trash): caption on top, no info side ── */
.lb-caption-top {
  display: none;
  padding: 0.65rem 1rem;
  background: var(--bg2);
  border-bottom: 1.5px solid var(--border-lt);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.lightbox.lb-simple .lb-info-side { display: none !important; }
.lightbox.lb-simple .lb-image-side { flex: 1; border-right: none; }
.lightbox.lb-simple .lb-image-counter { display: none; }
.lightbox.lb-simple .lb-caption-top:empty { display: none; }

.lb-toolbar-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.zoom-controls { display: flex; gap: 0.35rem; }
.zoom-btn { background: var(--bg2); border: 1.5px solid var(--border); color: var(--text); font-family: var(--font-mono); font-size: 16px; width: 36px; height: 36px; cursor: pointer; box-shadow: 2px 2px 0 rgba(0,0,0,0.1); transition: background 0.15s, color 0.15s; border-radius: var(--radius-sm); }
.zoom-btn:hover { background: var(--bg4); }
.zoom-btn:disabled { opacity: 0.3; pointer-events: none; }

/* ── MODAL OVERLAY (admin) ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,10,10,0.78); backdrop-filter: blur(4px); z-index: 3000; display: none; align-items: center; justify-content: center; padding: 1rem; }

/* ── ADMIN MODAL BOX ── */
.admin-box {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 95vw;
  max-width: 860px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
}

.admin-toolbar { background: var(--accent); color: var(--text-inv); padding: 0.6rem 1rem; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.admin-toolbar button { background: none; border: 1px solid rgba(255,255,255,0.5); color: var(--text-inv); font-family: var(--font-mono); font-size: 9px; padding: 3px 8px; cursor: pointer; transition: background 0.15s; border-radius: 3px; }
.admin-toolbar button:hover { background: rgba(255,255,255,0.15); }
.admin-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; }

.admin-tabs { display: flex; border-bottom: 1.5px solid var(--border); flex-shrink: 0; flex-wrap: wrap; gap: 0; }
.admin-tab { font-family: var(--font-mono); font-size: 10px; padding: 7px 14px; cursor: pointer; border: 1.5px solid transparent; border-bottom: none; color: var(--text-muted); background: transparent; transition: color 0.15s, border-color 0.15s; white-space: nowrap; }
.admin-tab.active { color: var(--text); border-color: var(--border); border-bottom-color: var(--bg2); background: var(--bg2); margin-bottom: -1.5px; }

.admin-form { display: flex; flex-direction: column; gap: 10px; }
.admin-label { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; color: var(--text-sub); letter-spacing: 0.05em; margin-top: 4px; }
input.admin-input, textarea.admin-input, select.admin-input { border: 1px solid var(--border-lt); background: var(--bg); color: var(--text); padding: 9px; font-family: var(--font-mono); font-size: 12px; outline: none; border-radius: var(--radius-sm); }
select.admin-input { cursor: pointer; }
input.admin-input:focus, textarea.admin-input:focus { border-color: var(--accent); }
textarea.admin-input { resize: vertical; min-height: 100px; }

/* bigger body textarea specifically */
textarea.admin-input.admin-body-field { min-height: 200px; }

.admin-success { font-family: var(--font-mono); font-size: 10px; color: #22c55e; display: none; }

/* ── LOG TAGS ── */
.log-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.75rem; }
.log-tag { font-family: var(--font-mono); font-size: 10px; cursor: default; letter-spacing: 0.02em; }
.log-container .log-tags { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-lt); }
.log-container .log-tag  { font-size: 12px; }

/* ── BACK TO LOGS BUTTON ── */
.back-to-logs-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  background: var(--accent);
  color: var(--text-inv);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.12s, box-shadow 0.15s;
  user-select: none;
}
.back-to-logs-btn:hover { background: var(--text); color: var(--bg); box-shadow: 4px 4px 0 var(--accent); transform: translate(-2px, -2px); }
.back-to-logs-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--accent); }

/* ── MOBILE (≤850px) ── */
@media (max-width: 850px) {
  .page-wrapper { padding: 1.5rem 1rem 3rem; }
  .top-nav { padding: 0.6rem 1rem; gap: 0.6rem; }
  /* Desktop icons collapse into hamburger dropdown on mobile */
  .nav-center {
    flex: 0 0 0;
    min-width: 0;
    overflow: visible;
  }
.desktop-icons-bar {
  display: flex;
  gap: 0.1rem;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem 1rem;          /* was 2px 0 */
  flex-wrap: nowrap;
  background: var(--bg2);        /* add card background */
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0.5rem auto;           /* center with breathing room */
  max-width: fit-content;
}
   
  .desktop-icons-bar.show { display: flex; }
  .menu-trigger { display: inline-block; }
  main { width: 100%; }
  .art-feed { grid-template-columns: 1fr; }
  .log-container { padding: 1.75rem 1.25rem; }
  .shrine-content { padding: 1.75rem 1.25rem; }
  .letter-paper { padding: 1.75rem 1.25rem; }
  .sticker { display: none; }
  .category-nav { gap: 0.3rem; }
  .category-tab { font-size: 10px; padding: 5px 10px; }
  .lb-body { flex-direction: column; overflow-y: auto; }
  .lb-image-side { flex: none; border-right: none; border-bottom: 1.5px solid var(--border-lt); min-height: 240px; }
  .lb-image-wrap { padding: 0 36px; flex: 1; min-height: 200px; }
  .lb-info-side  { flex: none; max-width: 100%; }
  #lb-image { max-height: 50vh; max-width: 100%; object-fit: contain; }
  .shrines-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .shrines-grid { grid-template-columns: 1fr; }
}

/* ── DESKTOP ICONS NAV ── */
.desktop-icons-bar {
  display: flex;
  gap: 0.1rem;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem 1rem;
  flex-wrap: nowrap;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* When the bar lives inside the top-nav, strip the card chrome */
.desktop-icons-bar.in-nav {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0.25rem 0;
  margin: 0;
}

.desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 5px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background 0.1s, border-color 0.1s;
  min-width: 44px;
  max-width: 60px;
  user-select: none;
}
.desk-icon:hover {
  background: rgba(64,95,250,0.1);
  border-color: rgba(64,95,250,0.35);
}
.desk-icon.active {
  background: rgba(64,95,250,0.15);
  border-color: var(--accent);
}
.desk-icon.active .desk-icon-label { color: var(--accent); }

/* External-link variant (e.g. Neocities). Uses <a> so it opens in a new tab. */
a.desk-icon, a.desk-icon-external {
  text-decoration: none;
  color: inherit;
}
.desk-icon-external .desk-icon-label::after {
  /* tiny arrow chip so external links read as "off-site" */
  content: ' ↗';
  color: var(--accent);
  font-weight: bold;
}

.desk-icon-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: 3px;
  overflow: visible;
}

.desk-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.desk-icon-label {
  font-family: var(--font-mono);
  font-size: 7px;
  text-transform: uppercase;
  color: var(--text-sub);
  text-align: center;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.1;
}

/* ── MARQUEE CARD (centered below hero) ── */
.marquee-card {
  overflow: hidden !important;
  min-height: auto !important;
}

.marquee-card .home-card-body { padding: 0 !important; }
.marquee-card .marquee-container {
  border: none;
  border-radius: 0;
  background: transparent;
  margin: 0;
}

/* ── RECYCLING BIN ── */
.recycling-bin-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 8px;
  width: fit-content;
  margin-left: auto;
  margin-top: 0.75rem;
  opacity: 1;
  transition: transform 0.15s;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
}
.recycling-bin-btn:hover {
  transform: translateY(-2px);
  background: transparent;
  border-color: transparent;
}
.recycling-bin-btn img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
  -webkit-user-drag: none;
  background: transparent;
}
.recycling-bin-btn span {
  font-family: var(--font-mono);
  font-size: 7px;
  text-align: center;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── TRASH PAGE ── */
.trash-date-group { margin-bottom: 2.5rem; }
.trash-date-header {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding: 0.5rem 0;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 1rem;
}
.trash-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.trash-item {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-radius: var(--radius);
  max-width: 280px;
  min-width: 160px;
  position: relative;
  flex: 0 1 auto;
}
.trash-item-doodle { max-width: 240px; }
.trash-item-type {
  font-size: 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  font-weight: bold;
}
.trash-item-content {
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.trash-doodle-img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-sm);
  display: block;
  margin-top: 4px;
  cursor: zoom-in;          /* viewers know they can click to enlarge */
  transition: transform 0.15s ease;
}
.trash-doodle-img:hover { transform: scale(1.02); }

/* ── SHRINE IMAGE CAPTION TOOLTIP ── */
.shrine-gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 1;
}
.shrine-gallery-item .shrine-gallery-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
}
.shrine-img-tooltip {
  position: fixed;
  display: none;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: 2px 2px 0 var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
  pointer-events: none;
  z-index: 1500;
  max-width: 220px;
  line-height: 1.5;
  border-radius: var(--radius-sm);
  color: var(--text);
}

/* ── CURSORS ── */
*, *::before, *::after {
  cursor: url('cursors/Miffy-Normal-64x64.png') 0 0, auto;
}
a, button, [role="button"],
input[type="submit"], input[type="button"],
input[type="reset"], label[for],
.clickable, [onclick] {
  cursor: url('cursors/Miffy_Link-64x64.png') 20 0, pointer;
}
input[type="text"], input[type="email"],
input[type="password"], input[type="search"],
input[type="url"], textarea, [contenteditable] {
  cursor: url('cursors/Miffy_Tex-64x64.png') 10 16, text;
}
input[type="text"], input[type="email"],
input[type="password"], input[type="search"],
input[type="url"], textarea, [contenteditable] {
  cursor: url('cursors/Miffy_Tex.cur') 5 8, text;
}
[aria-busy="true"], .loading, .busy {
  cursor: url('cursors/Miffy_Busy.ani') 15 14, wait;
}
.working {
  cursor: url('cursors/Miffy_Working.ani') 0 0, progress;
}
[title], abbr, .help {
  cursor: url('cursors/Miffy-Help.ani') 0 0, help;
}

/* ── STATUS.EXE LAST-UPDATED INDICATOR ── */
.status-last-updated {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-last-updated #statusLastUpdated {
  color: var(--accent);
  font-weight: bold;
  margin-left: 4px;
}

/* ── HOME BOTTOM ROW (info-left, trash-right) ── */
.home-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  margin-top: 0.75rem;
  position: relative;
  z-index: 2;
  gap: 1rem;
}
.home-bottom-row .recycling-bin-btn { margin: 0; }

/* ── INFO BUTTON (mirror of recycling-bin-btn, left side) ── */
.info-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 8px;
  width: fit-content;
  opacity: 1;
  transition: transform 0.15s;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
}
.info-btn:hover {
  transform: translateY(-2px);
  background: transparent;
  border-color: transparent;
}
.info-btn img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
  -webkit-user-drag: none;
  background: transparent;
}
.info-btn-emoji {
  font-size: 28px;
  line-height: 36px;
  color: var(--accent);
  display: inline-block;
  width: 36px;
  height: 36px;
  text-align: center;
}
.info-btn span {
  font-family: var(--font-mono);
  font-size: 7px;
  text-align: center;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── BADGES CARDS — full-width on home + about ── */
.home-grid .badges-card {
  grid-column: 1 / -1;
  grid-row: auto;
}
.badges-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 1rem;
  min-height: 56px;
  overflow: visible;       /* never clip a stamp */
}
.badge-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 2px;
  padding: 0;
  /* Reserve full stamp footprint so adjacent stamps can't crop into it */
  min-width: 100px;
  min-height: 40px;
  flex: 0 0 auto;
  transition: transform 0.15s;
}
.badge-cell:hover {
  transform: translate(-1px, -1px);
}
.badge-link { display: inline-flex; line-height: 0; }
.badge-stamp {
  /* Use max-width/height instead of fixed dims so non-100x40 stamps don't get cropped.
     contain (vs cover) guarantees the whole stamp is visible.
     !important is needed so the about-widget-body img rule doesn't override
     these dimensions and balloon the home/about stamps to inconsistent sizes. */
  max-width: 100px !important;
  max-height: 40px !important;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  image-rendering: pixelated;
  pointer-events: auto;
  -webkit-user-drag: none;
  filter: none !important; /* about-widget-body img adds a drop-shadow; not wanted on stamps */
}
.badge-del {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  width: 18px;
  height: 18px;
  padding: 0 !important;
  font-size: 11px !important;
  line-height: 16px !important;
  display: none !important;
  border-radius: 50% !important;
}
body.admin-mode .badge-del { display: inline-block !important; }

/* about-page badges row — placed as a full-width grid row beneath the bento */
.about-widgets-panel .about-badges-wrap {
  grid-column: 1 / -1;
  grid-row: auto;
  width: 100%;
  margin-top: 0.25rem;
  min-height: 0;
}
.about-widgets-panel .about-badges-wrap .badges-strip {
  min-height: 56px;
  padding: 0.85rem 1rem;
}
@media (max-width: 900px) {
  .about-widgets-panel .about-badges-wrap {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* ── BOARD NAME INPUT ── */
.board-name-row { margin-bottom: 6px; }
.board-name-input {
  width: 100%;
  font-size: 0.78rem;
}

/* ═══════════════════════════════════════════════════
   INFO / RESOURCES PAGE
═══════════════════════════════════════════════════ */
#info { padding-bottom: 4rem; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
}
.info-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.info-card-wide { grid-column: 1 / -1; }

.info-card-header {
  background: var(--bg3);
  border-bottom: 1.5px solid var(--border);
  padding: 0.55rem 1rem;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-sub);
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.info-card-header .admin-edit-btn {
  position: static !important;
  font-size: 11px !important;
  padding: 2px 8px !important;
}

.info-card-body {
  padding: 1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.info-empty {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-lt);
  position: relative;
}
.info-row:last-child { border-bottom: none; }
.info-row-label {
  font-weight: bold;
  color: var(--text);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.info-row-value {
  color: var(--text-sub);
  font-size: 0.82rem;
}
.info-row-link {
  /* Inherits color, text-decoration, and hover animations globally */
  font-size: 0.8rem;
  word-break: break-all;
}
.info-del {
  position: static !important;
  display: none !important;
  margin-left: auto !important;
  font-size: 12px !important;
  padding: 0 6px !important;
  border-radius: 50% !important;
}
body.admin-mode .info-del { display: inline-block !important; }

/* ── INFO CARD PAGINATION CONTROLS ── */
.info-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 0.6rem;
  margin-top: 0.4rem;
  border-top: 1px dashed var(--border-lt);
}
.info-pager-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  background: var(--bg3);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.05s;
  box-shadow: 2px 2px 0 var(--border);
}
.info-pager-btn:hover:not([disabled]) {
  background: var(--accent);
  color: var(--text-inv);
}
.info-pager-btn:active:not([disabled]) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--border);
}
.info-pager-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: 2px 2px 0 var(--border);
}
.info-pager-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── ADMIN RE-OPEN PILL — shown after the panel is closed ── */
.admin-reopen-pill {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--text-inv);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--border);
  transition: transform 0.05s;
}
.admin-reopen-pill:hover { filter: brightness(1.05); }
.admin-reopen-pill:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--border); }

/* Allow grouping multiple buttons in the admin toolbar */
.admin-toolbar-actions { display: flex; gap: 6px; align-items: center; }

/* Color swatches */
.info-color-row {
  gap: 12px;
}
.info-color-swatch {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 2px 2px 0 var(--border);
}
.info-row-hex {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--bg3);
  padding: 2px 6px;
  border: 1px solid var(--border-lt);
  border-radius: 2px;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .info-grid { grid-template-columns: 1fr; }
  .info-card-wide { grid-column: 1; }
  .home-bottom-row { flex-direction: row; }
}

/* ── HERO ILLUSTRATION — swaps per theme ── */
@keyframes snap-tilt {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-4deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

.hero-card .hero-image {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0.75rem auto 0;
  image-rendering: -webkit-optimize-contrast;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  animation: snap-tilt 1.2s step-end infinite;
}

/* Show the right one for the current mode, hide the other. */
.hero-card .hero-image-dark  { display: none; }
body.dark .hero-card .hero-image-light { display: none; }
body.dark .hero-card .hero-image-dark  { display: block; }

@media (max-width: 700px) {
  .hero-card .hero-image { max-width: 260px; }
}

/* ═══════════════════════════════════════════════════
   MOBILE — RESPONSIVE OVERRIDES
   Narrow-viewport fixes; breakpoints match or tighten the ones above.
═══════════════════════════════════════════════════ */

/* ── 1. PREVENT HORIZONTAL SCROLL (petals + floaters) ──
   #petal-field is already fixed+overflow:hidden, so the
   scroll comes from .page-wrapper or body having no
   overflow-x guard. Lock it down here.                  */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100vw; }

/* ── 2. TOP NAV — mobile tightening ── */
@media (max-width: 640px) {
  .top-nav {
    padding: 0.5rem 0.85rem;
    gap: 0.5rem;
  }

  /* Marquee strip disappears — wastes 100px on a 375px screen */
  .nav-center {
    display: none;
  }
  .nav-center:not(:has(.desktop-icons-bar)) {
    display: none;
  }
  .nav-center:has(.desktop-icons-bar) {
    display: flex !important;
  }

  .logo { font-size: 0.88rem; }

  .dark-toggle {
    font-size: 9px;
    padding: 0.3rem 0.45rem;
    letter-spacing: 0;
  }

  .nav-admin-trigger {
    font-size: 11px;
    padding: 0.25rem 0.3rem;
  }
}

/* ── 3. PAGE WRAPPER — tighter side padding on mobile ── */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 1rem 0.75rem 3rem;
  }
}

/* ── 4. HOME HERO — fix overflowing site-title + text ──
   Root cause: letter-spacing:0.4em on a long string pushes
   it ~40px past the right edge on a 375px card.          */
@media (max-width: 640px) {
  .hero-card {
    min-height: 180px;
    padding: 1.25rem 1rem 1.5rem;
  }

  .hero-card .site-title {
    font-size: 0.72rem;
    letter-spacing: 0.18em;   /* prevents the text from bleeding past the card edge */
    white-space: normal;
    text-align: center;
    max-width: 100%;
    word-break: break-word;
  }

  .hero-card .hero-text {
    font-size: clamp(0.95rem, 5.5vw, 1.4rem);
    letter-spacing: 0.12em;
    word-break: break-word;
  }

  /* Hero illustration: don't let it overflow the card */
  .hero-card .hero-image {
    max-width: 220px;
    margin-top: 0.5rem;
  }
}

/* ── 5. HOME GRID — single column stacking ──
   Existing @media 580px already sets areas correctly,
   but is missing gap + padding tightening.              */
@media (max-width: 580px) {
  .home-grid {
    gap: 0.75rem;
  }

  /* Image cards look better landscape than 1:1 square at full width */
  .home-image-card {
    aspect-ratio: 16 / 9;
  }

  /* updates list grows naturally instead of clipping content */
  .updates-card {
    max-height: none;
    overflow: visible;
  }
  .updates-card .home-card-body {
    overflow: visible;
  }

  /* Allow titles to wrap instead of ellipsis on narrow viewport */
  .home-update-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  /* long values can bleed past the card's right edge without this */
  .status-row-val {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* ── 6. HOME CARD BODIES — tighter internal padding ── */
@media (max-width: 580px) {
  .home-card-header {
    padding: 0.4rem 0.85rem;
    font-size: 8px;
  }

  .home-card-body {
    padding: 0.85rem 0.9rem;
    font-size: 0.76rem;
  }
}

/* ── 7. DESKTOP ICONS BAR — hamburger dropdown polish ──
   JS toggles .show to reveal this at ≤850px; these rules
   style the revealed dropdown.                           */
@media (max-width: 850px) {
  .desktop-icons-bar.show {
    /* parent rule already sets position:absolute; this adds
       scroll in case many icons wrap onto multiple rows    */
    max-height: 60vh;
    overflow-y: auto;
    /* Even wrap distribution */
    gap: 0.5rem 0.75rem;
    padding: 0.85rem 1rem;
  }

  /* Icons in the dropdown: slightly larger tap targets */
  .desk-icon {
    min-width: 48px;
    max-width: 64px;
    padding: 6px 6px 4px;
  }

  .desk-icon-img {
    width: 26px;
    height: 26px;
  }

  .desk-icon-label {
    font-size: 7px;
  }
}

/* ── 8. LOG TAG SIDEBAR — smaller pills below 480px ──
   (the 720px breakpoint above already wraps them into a row) */
@media (max-width: 480px) {
  .logs-sidebar {
    gap: 4px;
  }

  .tag-sidebar-item {
    padding: 2px 8px;
    font-size: 8px;
    border-radius: var(--radius);
  }
}

/* ── 9. LOG / LETTER / SHRINE READER — padding tightening ── */
@media (max-width: 480px) {
  .log-container {
    padding: 1.25rem 0.9rem;
  }

  .log-body-text {
    font-size: 0.8rem;
    max-height: none;       /* let content expand naturally on mobile */
    overflow-y: visible;
    padding-right: 0;
  }

  .letter-paper {
    padding: 1.25rem 0.9rem;
  }

  .letter-paper-re {
    font-size: 1.2rem;
  }

  .shrine-content {
    padding: 1.25rem 0.9rem;
  }
}

/* ── 10. ABOUT PAGE — profile card tightening ── */
@media (max-width: 480px) {
  .about-body {
    padding: 1rem 1rem;
  }

  .profile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .about-bio {
    font-size: 0.8rem;
  }

  .about-widget-body {
    max-height: none; /* let bag/likes breathe on single column */
  }
}

/* ── 11. BULLETIN BOARD — tighter controls below 480px ──
   (800px breakpoint above already stacks the layout)   */
@media (max-width: 480px) {
  .board-controls {
    padding: 0.75rem 0.85rem;
    gap: 8px;
  }

  .board-input-row {
    flex-direction: column;
    gap: 6px;
  }

  .board-submit {
    width: 100%;
    padding: 10px;
    text-align: center;
  }

  /* Board canvas: shorter fixed height on small phones */
  #board-section {
    height: 280px;
  }
}

/* ── 12. ART FEED — keep 2 columns on mobile ──
   the 850px rule above collapses to 1, which felt too sparse */
@media (max-width: 850px) and (min-width: 480px) {
  .art-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .art-feed {
    grid-template-columns: repeat(2, 1fr); /* keep 2-col even on phone */
    gap: 0.4rem;
  }
}

/* ── 13. INFO GRID — already 1-col at 700px. Fine. ── */

/* ── 14. SHRINES / LETTERS GRIDS on very small screens ── */
@media (max-width: 380px) {
  .shrines-grid {
    grid-template-columns: 1fr;
  }
  .letter-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 15. LIGHTBOX — full-screen on mobile ── */
@media (max-width: 640px) {
  .lightbox {
    padding: 0;
  }

  .lightbox-content {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  .lb-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}

/* ── 16. ADMIN REOPEN PILL — keep off bottom nav ── */
@media (max-width: 640px) {
  .admin-reopen-pill {
    right: 12px;
    bottom: 12px;
    font-size: 11px;
    padding: 7px 12px;
  }
}

/* ═══════════════════════════════════════════════════
   NAV — MOBILE OVERLAP FIX
   Collapses the top-nav into two in-flow rows so the icon
   bar sits below the logo row instead of floating over content.
═══════════════════════════════════════════════════ */

@media (max-width: 850px) {

  .top-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
  }

  /* Reordered via flex `order` — no extra wrapper markup needed */
  .nav-left  { order: 1; padding: 0.5rem 0.85rem 0.5rem; }
  .nav-center { order: 2; flex: 0 0 100%; }
  .nav-center:not(:has(.desktop-icons-bar)) { display: none; }
  .nav-right { order: 3; padding: 0.3rem 0.85rem 0.5rem; padding-left: 0; }

  /* Logo + controls share row 1 (row direction); icon bar below stays row 2 */
  .top-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 0 0 0;
    align-items: center;
  }

  /* nav-left + nav-right share the first row */
  .nav-left  { flex: 1 1 auto; padding: 0.5rem 0.85rem; }
  .nav-right { flex: 0 0 auto; padding: 0.5rem 0.85rem; }

  /* Icon bar: full-width SECOND row, in normal flow */
  .desktop-icons-bar {
    order: 99;              /* always last */
    position: static !important;  /* takes it out of the absolute positioning above */
    display: flex !important;     /* always visible — no hamburger toggle */
    flex: 0 0 100%;         /* full width of the nav */
    width: 100%;

    /* Horizontal scroll strip */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important; /* single row, scroll don't wrap */

    /* Visual separation from logo row */
    border-top: 1.5px solid var(--border);
    border-bottom: 1.5px solid var(--border);
    padding: 0.4rem 0.75rem;
    gap: 0.25rem;
    justify-content: flex-start; /* left-aligned so scroll works */
    background: var(--bg2);
    box-shadow: none;

    /* Reset the absolute-positioning values */
    top: auto; left: auto; right: auto;
    z-index: auto;
  }

  .desktop-icons-bar::-webkit-scrollbar { display: none; }

  /* Hide the hamburger — not needed anymore */
  .menu-trigger { display: none !important; }

  /* Icon sizing in the strip — slightly tighter */
  .desk-icon {
    min-width: 50px;
    max-width: 58px;
    padding: 4px 4px 3px;
    flex-shrink: 0; /* don't squish — rely on scroll */
  }

  .desk-icon-img {
    width: 26px;
    height: 26px;
  }

  .desk-icon-label {
    font-size: 6.5px;
    white-space: nowrap;
  }
}

/* ═══════════════════════════════════════════════════
   LOG PAGE — REFINEMENTS
   1. Blog list items — rounded corners to match site
   2. Tag filter pills — compact + consistent on mobile
   3. Photo viewer — visually separated from log text
═══════════════════════════════════════════════════ */

/* ── 1. BLOG LIST ITEMS — add radius to match site cards ── */
.blog-list-item {
  border-radius: var(--radius) !important;
  overflow: hidden; /* clips the pinstripe titlebar to the same rounded corners */
}

/* ── 2. TAG FILTER PILLS — smaller, pill-shaped on mobile ──
   Sidebar items stack fine at 190px on desktop; on mobile they
   flex-wrap into a cloud, so they read as compact chips here. */
@media (max-width: 720px) {
  .logs-sidebar {
    gap: 5px;
  }

  .tag-sidebar-title {
    width: 100%;           /* force the title onto its own line */
    flex: 0 0 100%;
    margin-bottom: 0.35rem;
    font-size: 10px;
  }

  .tag-sidebar-item {
    /* Compact pill — not a full-width rectangle */
    flex: 0 0 auto;
    width: auto;
    padding: 2px 8px;
    font-size: 8px;
    border-radius: var(--radius);   /* subtle rounding, not full pill */
    gap: 4px;
    margin-bottom: 0;
    justify-content: center;
    min-width: 0;
  }

  .tag-sidebar-item:hover {
    transform: none;
    border-color: var(--accent);
  }

  .tag-sidebar-count {
    font-size: 8px;
  }
}

/* ── 3. LOG PHOTO VIEWER — break out of text container ──
   Bleeds past .log-container's padding so it reads as its
   own OS window rather than content embedded in the prose. */
.log-photoviewer {
  /* Negative margins to bleed past the container's 3rem padding
     so the viewer sits edge-to-edge inside the card        */
  margin-left: -3rem;
  margin-right: -3rem;
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;

  /* Rounded corners only on the outside to match site cards */
  border-radius: 0;        /* flush to card edges, no inner radius */
  border-left: none;
  border-right: none;

  /* Stronger visual separation from surrounding text */
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  box-shadow: none;        /* remove the floating shadow — it's IN a card now */
}

/* Compensates for log-container's smaller padding on mobile (1.75rem / 1.25rem) */
@media (max-width: 850px) {
  .log-photoviewer {
    margin-left: -1.75rem;
    margin-right: -1.75rem;
  }
}

@media (max-width: 480px) {
  .log-photoviewer {
    margin-left: -0.9rem;
    margin-right: -0.9rem;
  }
}

/* Photo viewer titlebar: no radius (already flush) */
.log-pv-titlebar {
  border-radius: 0;
}

/* The log container itself: make sure overflow is visible
   so the negative-margin bleed works and isn't clipped    */
.log-container {
  overflow: visible;
}

/* ═══════════════════════════════════════════════════
   FINAL POLISH — nav centering, image sizing, photo viewer
═══════════════════════════════════════════════════ */

/* ── 1. NAV ICON STRIP — centered, evenly spaced ──
   On a ~375px strip, 7 icons get ~53px each — fits without
   scrolling and stays perfectly centered.                  */
@media (max-width: 850px) {
  .desktop-icons-bar {
    justify-content: center !important;  /* center the group */
    gap: 0 !important;                   /* no gap — use icon padding instead */
    padding: 0.35rem 0.5rem !important;  /* even horizontal breathing room */
    overflow-x: auto;                    /* fallback if icons don't fit */
  }

  /* Each icon: equal flex so they distribute evenly */
  .desk-icon {
    flex: 1 1 0 !important;   /* equal share of available width */
    min-width: 0 !important;  /* allow shrinking below 50px */
    max-width: 64px !important;
    padding: 5px 2px 4px !important;
    /* Center the icon+label stack */
    align-items: center;
    justify-content: center;
  }

  /* Wrap icon image in its wrap div — already centered by flex */
  .desk-icon-wrap {
    width: 28px;
    height: 28px;
  }

  .desk-icon-img {
    width: 24px !important;
    height: 24px !important;
  }

  .desk-icon-label {
    font-size: 6px !important;
    letter-spacing: 0.02em;
    text-align: center;
  }

  /* Active indicator: subtle underline instead of bg box on mobile */
  .desk-icon.active {
    background: transparent;
    border-color: transparent;
    position: relative;
  }
  .desk-icon.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
  }
  .desk-icon.active .desk-icon-label {
    color: var(--accent);
  }

  /* Logo row: tighter on the sides */
  .nav-left  { padding: 0.5rem 0.75rem !important; }
  .nav-right { padding: 0.5rem 0.75rem !important; }
}

/* ── 2. HOME IMAGE CARDS — constrain height on mobile ──
   A 1:1 card at full single-column width would be 375px tall
   on a 375px screen, so cap it and keep object-fit:cover.   */
@media (max-width: 580px) {
  .home-image-card {
    aspect-ratio: unset !important; /* override the 16/9 from previous fix */
    height: 200px;                  /* fixed, controlled height */
    max-height: 200px;
  }

  .home-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* bias toward top — usually the face/subject */
  }
}

/* ── 3. LOG PHOTO VIEWER — inset panel, not wall-to-wall ──
   Supersedes the negative-margin bleed above with a contained
   panel (own radius, margin, bg) that docks inside the log
   rather than bleeding through its edges.                   */
.log-photoviewer {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  border-left: 1.5px solid var(--border) !important;
  border-right: 1.5px solid var(--border) !important;
  border-top: 1.5px solid var(--border) !important;
  border-bottom: 1.5px solid var(--border) !important;
  border-radius: var(--radius) !important;  /* match site card radius */
  box-shadow: var(--shadow) !important;     /* same shadow as other cards */
  overflow: hidden !important;              /* clip titlebar to radius */
  background: var(--bg3) !important;        /* slightly different bg to pop */
}

/* Restore log container clipping */
.log-container {
  overflow: hidden !important;
}

/* Photo viewer titlebar gets radius on top via parent overflow:hidden */
.log-pv-titlebar {
  border-radius: 0; /* parent clips it */
}
