#header #logo {
  display: inline-block;
  float: left;
  margin-right: 20px;
  width: 100px;
  height: 100px;
  border-radius: 5px;
  object-fit: contain;
}

@media screen and (max-width: 480px) {
  #header #nav li:not(:first-child) {
    padding-left: 120px;
  }
}

/* ---- Magazine flip-book ---- */
.flipbook {
  margin: 1.5rem auto;
  width: 100%;
  max-width: 1100px;
  min-height: 60vh;
  touch-action: pan-y;
}
.flipbook .page { background: #fff; }
.mag-title { margin-bottom: 0.2rem; }
.mag-meta { opacity: 0.7; font-size: 0.9rem; margin-bottom: 0.5rem; }
.mag-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin: 1rem 0; flex-wrap: wrap;
}
.mag-controls button {
  cursor: pointer; padding: 0.4rem 0.9rem; border: 1px solid currentColor;
  background: transparent; color: inherit; border-radius: 4px;
}
.mag-controls #mag-pageno { min-width: 5rem; text-align: center; }

.mag-grid {
  list-style: none; padding: 0; margin: 1.5rem 0;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.mag-card a { display: block; text-decoration: none; }
.mag-card img {
  width: 100%; height: auto; display: block;
  border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.mag-card-title { display: block; font-weight: 600; margin-top: 0.5rem; }
.mag-card-date { display: block; opacity: 0.7; font-size: 0.85rem; }

/* --- magazine: dedicated pdf2htmlEX page --- */
#mag-read .mag-read-frame {
  display: block;
  width: 100%;
  height: 85vh;
  margin-top: 0.75rem;
  border: 1px solid rgba(128,128,128,0.35);
  border-radius: 6px;
  background: #fff;
}
@media screen and (max-width: 800px) {
  #mag-read .mag-read-frame { height: 72vh; }
}
