/* microbooks.de — no external deps */

:root{
  --bg: #0f1115;
  --surface: #161a22;
  --surface-2: #1c2230;
  --text: #eef0f6;
  --muted: #b8bfd3;
  --line: rgba(255,255,255,.10);
  --shadow: 0 10px 26px rgba(0,0,0,.35);
  --radius: 18px;
  --accent: #e2c290;     /* subtle wood-ish accent */
  --accent-2: #a57b46;   /* deeper wood */
  --focus: #86b7ff;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% -10%, rgba(226,194,144,.15), transparent 55%),
              radial-gradient(900px 700px at 100% 20%, rgba(165,123,70,.12), transparent 60%),
              linear-gradient(180deg, #0e1014, #0b0c10 60%, #08090c);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 10px;
}

.container{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

header.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,12,16,.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand .title{
  font-size: 20px;
  letter-spacing: .2px;
  font-weight: 700;
}
.brand .tagline{
  font-size: 13px;
  color: var(--muted);
}

/* Logo: Standard (alle Seiten) */
.brand{
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.brand .brand-text{
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand .logo{
  height: 84px;
  width: auto;
  max-width: 480px;
  object-fit: contain;
  border: 0;
  background: transparent;
  border-radius: 0;
  display: none; /* bleibt wegen onload */
}

@media (max-width: 640px){
  .brand .logo{
    height: 32px;
    max-width: 420px;
  }
}

nav.main-nav{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link{
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
}
.nav-link:hover{
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,.03);
}

.lang-switch{
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
}
.lang-switch:hover{
  background: rgba(255,255,255,.06);
}

main{
  padding: 22px 0 42px;
}

.shelf-divider{
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226,194,144,.55), rgba(165,123,70,.35), rgba(226,194,144,.55));
  box-shadow: 0 10px 20px rgba(0,0,0,.35);
  margin: 18px 0 18px;
  opacity: .85;
}

.page-title{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

h1{
  margin: 6px 0 0;
  font-size: 28px;
}
.subtitle{
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 14px;
}

.grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
  .brand .tagline{ display: none; }
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 100%;
}

.card-inner{
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book{
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.book:hover{
  transform: translateY(-2px);
  border-color: rgba(226,194,144,.35);
  background: rgba(255,255,255,.03);
}

.book-media{
  position: relative;
  padding-top: 56%;
  background: linear-gradient(180deg, rgba(226,194,144,.18), rgba(0,0,0,0));
  border-bottom: 1px solid var(--line);
}
.book-media img{
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  border-radius: 14px;
  background: rgba(0,0,0,.25);
}

.badge{
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(226,194,144,.18);
  border: 1px solid rgba(226,194,144,.35);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  backdrop-filter: blur(6px);
}

.book-body{
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}

.book-title{
  font-weight: 800;
  font-size: 16px;
  line-height: 1.15;
  margin: 0;
}
.book-author{
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.book-isbn{
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.book-desc{
  color: var(--text);
  opacity: .95;
  font-size: 13.5px;
  line-height: 1.35;
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.35em * 3); /* stabilize height */
}

.actions{
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.btn{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(226,194,144,.35);
}
.btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.home-sections{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
@media (max-width: 900px){
  .home-sections{ grid-template-columns: 1fr; }
}

.category-card{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.category-card:hover{
  transform: translateY(-2px);
  border-color: rgba(226,194,144,.35);
  background: rgba(255,255,255,.03);
}
.category-head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.category-title{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}
.category-sub{
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.latest{
  padding: 12px 14px 14px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}
.latest .thumb{
  width: 72px;
  height: 72px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  overflow: hidden;
}
.latest img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.latest .meta{
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.latest .meta .t{
  font-weight: 800;
  margin: 0;
  line-height: 1.15;
}
.latest .meta .a{
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}
.latest .meta .hint{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

footer.site-footer{
  border-top: 1px solid var(--line);
  background: rgba(11,12,16,.55);
  backdrop-filter: blur(10px);
  padding: 18px 0;
}

.footer-inner{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-links{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}
.footer-links a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.footer-links a:hover{
  border-color: var(--line);
  color: var(--text);
  background: rgba(255,255,255,.03);
}

.icon{
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

.copy{
  color: var(--muted);
  font-size: 13px;
}

.to-top{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
}
.to-top:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(226,194,144,.35);
}
.to-top svg{ width: 20px; height: 20px; }

.legal{
  line-height: 1.6;
  color: var(--text);
  max-width: 72ch;
}
.legal h2{ margin-top: 22px; }
.legal p, .legal li{ color: rgba(238,240,246,.92); }
.legal .hint{
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}
