:root {
  --bg: #0a0e14;
  --bg-soft: #0d121b;
  --surface: #11182400;
  --surface-1: #121a26;
  --surface-2: #16202e;
  --border: #1f2c3f;
  --border-soft: #18243580;
  --text: #c8d3e0;
  --text-dim: #8a98ad;
  --text-muted: #5d6b80;
  --accent: #64ffda;
  --accent-2: #2cb89a;
  --accent-glow: rgba(100, 255, 218, 0.16);
  --amber: #ffcb6b;
  --rose: #f07178;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Anonymous Pro", monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1080px;
  --header-h: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(100, 255, 218, 0.06), transparent 60%),
    radial-gradient(900px 600px at 0% 20%, rgba(120, 160, 255, 0.05), transparent 55%),
    linear-gradient(180deg, #090d13 0%, var(--bg) 40%, #070b10 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 80px;
  overflow-x: hidden;
}

#canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  opacity: 0.5;
  pointer-events: none;
}

#canvas_bottom {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 90px;
  z-index: -2;
  opacity: 0.35;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(to bottom,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 3px);
  mix-blend-mode: overlay;
  opacity: 0.6;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}

::selection {
  background: var(--accent-glow);
  color: #eafff8;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
  color: #eaf2fb;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: #aaffe6;
  text-shadow: 0 0 12px var(--accent-glow);
}

strong {
  color: var(--amber);
  font-weight: 700;
}

em {
  color: var(--text);
  font-style: italic;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #04121d;
  padding: 8px 14px;
  border-radius: 0 0 8px 0;
  font-weight: 700;
  z-index: 2000;
}

.skip-link:focus {
  left: 0;
}

#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.92) 0%, rgba(10, 14, 20, 0.7) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.bar {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.prompt {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  color: var(--text);
}

.prompt-user {
  color: var(--accent);
}

.prompt-at,
.prompt-colon {
  color: var(--text-muted);
}

.prompt-host {
  color: var(--amber);
}

.prompt-path {
  color: #7aa2f7;
}

.prompt-dollar {
  color: var(--text-muted);
  margin-left: 4px;
}

#nav {
  margin-left: auto;
}

#nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
}

#nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

#nav a::before {
  content: "~/";
  color: var(--text-muted);
  margin-right: 2px;
}

#nav a:hover,
#nav a.active {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: var(--border);
  text-shadow: 0 0 10px var(--accent-glow);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 20px 50px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  margin-bottom: 22px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(100, 255, 218, 0.04);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  line-height: 1.05;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #eaf2fb 0%, #8aa0b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  min-height: 1.6em;
}

.tagline::after {
  content: "_";
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}

.hero-sub {
  max-width: 620px;
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px;
}

.section {
  padding: 40px 0;
  border-top: 1px solid var(--border-soft);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-prompt {
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
}

.section-head h2 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin: 0;
  color: #eaf2fb;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card-about .lede {
  font-size: 17px;
  color: var(--text);
}

.card-about p {
  color: var(--text-dim);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(18, 26, 38, 0.7), rgba(13, 18, 27, 0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  opacity: 0.4;
}

.card:hover {
  border-color: var(--accent-2);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px -22px rgba(100, 255, 218, 0.5);
}

.card-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 14px;
  text-transform: lowercase;
}

.card-body {
  flex: 1;
}

.diary-media {
  margin: 0 -24px 16px -24px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: #05080c;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diary-media img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.diary-media img:hover {
  transform: scale(1.02);
}

.diary-media video {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #000;
}

.diary-media .media-link {
  width: 100%;
  min-height: 120px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface-1);
  transition: background 0.2s ease;
  text-decoration: none;
}

.diary-media .media-link:hover {
  background: var(--surface-2);
}

.diary-media .media-link .link-label {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  margin-bottom: 6px;
}

.diary-media .media-link .link-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.diary-media .text-body {
  width: 100%;
  min-height: 280px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
  cursor: zoom-in;
}

.diary-caption {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 14px;
  line-height: 1.5;
}

.diary-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  margin-top: auto;
}

.diary-meta .views {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.diary-meta .views svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.share-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 40, 34, 0.747);
  border: none;
  color: white;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--mono);
  transition: transform 0.2s;
  z-index: 10;
}

.share-icon:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.9);
}

.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.pagination-wrap.hidden {
  display: none;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 15px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox.hidden {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 18, 27, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: var(--accent);
  border-color: var(--accent-2);
  background: rgba(13, 18, 27, 0.95);
  outline: none;
}

#lightbox-img.hidden {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 16px;
  color: var(--text-dim);
  text-align: center;
  max-width: 640px;
  max-height: 15vh;
  overflow-y: auto;
  font-size: 15px;
}

.lightbox-text {
  max-width: min(720px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px 32px;
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--text);
  background: rgba(13, 18, 27, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: auto;
}

.lightbox-text.hidden {
  display: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.skill-card {
  padding: 18px 20px;
}

.skill-list {
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.contact-wrap {
  max-width: 620px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.contact-text {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.simplex-qr {
  margin-top: 22px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.4s ease-out forwards;
}

.simplex-qr.hidden {
  display: none;
}

.simplex-qr-frame {
  position: relative;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--border-soft), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.simplex-qr-frame img {
  display: block;
  border-radius: 4px;
}

.simplex-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent-glow);
  opacity: 0;
  pointer-events: none;
}

.simplex-qr:not(.hidden) .simplex-scanline {
  animation: simplex-scan 1.1s ease-in-out 0.15s 1;
}

.simplex-caption {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
}

.simplex-link {
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-2);
  transition: color 0.18s ease;
}

.simplex-link:hover {
  color: #aaffe6;
}

.chat {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1em;
}

.chat-reply {
  width: 100%;
  max-width: 620px;
  margin-top: 14px;
  padding: 12px 14px;
  background-color: #0a121d;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 14px;
  resize: vertical;
  min-height: 90px;
  display: block;
}

.chat-reply:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  text-decoration: none;
  background: transparent;
  color: var(--text-dim);
}

.btn span {
  color: var(--accent);
  font-weight: 800;
}

.btn-primary {
  background: var(--accent-glow);
  border-color: var(--accent-2);
  color: var(--accent);
}

.btn-primary:hover {
  background: rgba(100, 255, 218, 0.22);
  border-color: var(--accent);
  color: #aaffe6;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -10px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}

.btn-ghost span {
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--text);
  transform: translateY(-2px);
}

.styled-button {
  font-size: 15px;
  padding: 13px 26px;
}

.styled-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.player-container {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
}

.player-container video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  background-color: black;
}

.back-link {
  display: block;
  margin-top: 1.5rem;
  text-align: center;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--mono);
}

.back-link:hover {
  color: #aaffe6;
  text-shadow: 0 0 12px var(--accent-glow);
}

.share-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 10px;
  background-color: var(--surface-1);
  border: 1px solid var(--accent-2);
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--mono);
}

.share-btn:hover {
  background-color: var(--surface-2);
}

#footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(10, 14, 20, 0.8));
}

.footer-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.footer-prompt {
  color: var(--accent);
  font-weight: 700;
}

.footer-cmd {
  color: var(--text-dim);
}

.footer-cmd a {
  color: var(--accent);
  text-decoration: underline;
}

.footer-cmd .email-at {
  color: var(--text-dim);
}

.footer-impressum {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 18px;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-impressum a {
  color: var(--accent);
  text-decoration: underline;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

#toast {
  font-family: var(--mono);
  visibility: hidden;
  min-width: 250px;
  background: rgba(0, 40, 34, 0.747);
  color: #cccccc;
  text-align: center;
  border-radius: 6px;
  padding: 16px;
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 0.8rem;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes simplex-scan {
  0% {
    opacity: 0;
    top: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    top: 100%;
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@media (max-width: 720px) {
  .menu-toggle {
    display: flex;
  }

  #nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(10, 14, 20, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: none;
  }

  #nav.open {
    display: block;
  }

  #nav ul {
    flex-direction: column;
    gap: 4px;
  }

  #nav a {
    display: block;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 40px 20px 30px;
  }

  .section {
    padding: 32px 0;
  }

  .contact-wrap {
    justify-content: flex-start;
  }
}

.entry-detail-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--header-h) + 24px) 20px 40px;
  min-height: calc(100vh - var(--header-h) - 100px);
}

.entry-detail-main .back-link {
  display: inline-block;
  margin-bottom: 24px;
}

.entry-detail {
  max-width: 760px;
  margin: 0 auto;
}

.entry-detail .diary-media img,
.entry-detail .diary-media video {
  max-height: 70vh;
  object-fit: contain;
}

.entry-detail .share-icon {
  cursor: pointer;
}

.entry-detail .media-link {
  padding: 20px;
}

/* Feed-Aktionen und Zufallseintrag */
.feed-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.type-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.type-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  min-height: 36px;
}

.type-btn:hover,
.type-btn:focus-visible,
.type-btn.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

#search-input {
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius-sm);
  min-width: 160px;
  outline: none;
}

#search-input:focus {
  border-color: var(--accent);
}

.search-clear {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear:hover,
.search-clear:focus-visible {
  color: var(--rose);
  outline: none;
}

.search-result-count {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

#entry-feed.hidden,
#random-entry.hidden {
  display: none;
}

.random-entry {
  margin-bottom: 28px;
  animation: fadeIn 0.4s ease;
}

.random-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.random-label {
  color: var(--amber);
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.random-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.random-close:hover,
.random-close:focus-visible {
  color: var(--rose);
  border-color: var(--rose);
  outline: none;
}

/* Archiv-Navigation */
.archive-bar {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  overflow: hidden;
}

.archive-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  min-height: 44px;
}

.archive-toggle:hover,
.archive-toggle:focus-visible {
  color: var(--accent);
  outline: none;
}

.archive-toggle-label::before {
  content: '&gt; ';
  color: var(--accent);
}

.archive-toggle[aria-expanded="true"] .archive-toggle-label::before {
  content: 'v ';
}

.archive-active {
  color: var(--amber);
  font-size: 13px;
  background: var(--bg-soft);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.archive-panel {
  border-top: 1px solid var(--border);
  padding: 16px;
}

.archive-panel.hidden {
  display: none;
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.archive-year {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-year-label {
  color: var(--accent);
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  padding: 0 8px;
}

.archive-year-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-year-list li {
  margin: 0;
}

.archive-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  min-height: 36px;
  white-space: nowrap;
}

.archive-btn:hover,
.archive-btn:focus-visible,
.archive-btn.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.archive-count {
  color: inherit;
  opacity: 0.8;
}

.archive-empty {
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .archive-list {
    flex-direction: column;
    gap: 16px;
  }

  .archive-year-list {
    gap: 6px;
  }

  .archive-toggle {
    padding: 14px 16px;
    min-height: 48px;
  }

  .entry-detail-main {
    padding-top: calc(var(--header-h) + 16px);
  }

  .entry-detail {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .section {
    opacity: 1;
    transform: none;
  }

  #canvas,
  #canvas_bottom {
    display: none;
  }
}
