.mg-shell { font-family: Georgia, "Iowan Old Style", serif; color: inherit; max-width: 1100px; }
.mg-shell h1, .mg-shell h2, .mg-shell h3 { font-weight: normal; letter-spacing: 0.02em; }
.mg-sub, .mg-desc, .mg-hint, .mg-note, .mg-card-meta small { display: block; opacity: 0.75; }
.mg-intro { max-width: 42rem; }
.mg-tools, .mg-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.8rem 0 1.2rem; }
.mg-btn, button.mg-card { font: inherit; }
.mg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.6rem; padding: 0.45rem 0.9rem; border: 1px solid currentColor;
  border-radius: 4px; text-decoration: none; background: transparent; color: inherit; cursor: pointer;
}
.mg-btn-ghost { opacity: 0.85; }
.mg-btn-danger { border-color: #8c2f2f; color: #8c2f2f; }
.mg-grid, .mg-galleries { display: grid; gap: 1rem; }
.mg-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mg-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mg-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mg-masonry { column-gap: 1rem; }
.mg-masonry.mg-cols-3 { column-count: 3; }
.mg-masonry.mg-cols-4 { column-count: 4; }
.mg-masonry.mg-cols-5 { column-count: 5; }
.mg-masonry .mg-card { break-inside: avoid; margin: 0 0 1rem; width: 100%; }
.mg-card, .mg-gallery-card {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 0; border: 0; background: transparent;
  color: inherit; text-align: left; cursor: pointer; text-decoration: none;
}
.mg-card img, .mg-gallery-card img, .mg-full { width: 100%; height: auto; display: block; }
.mg-ph { display: grid; place-items: center; min-height: 8rem; border: 1px dashed currentColor; opacity: 0.7; }
.mg-player { width: 100%; margin: 0.6rem 0 1rem; }
.mg-meta { display: grid; grid-template-columns: 10rem 1fr; gap: 0.35rem 1rem; }
.mg-meta dt { opacity: 0.7; }
.mg-form label { display: block; margin: 0.7rem 0; }
.mg-input, .mg-form textarea, .mg-form select { width: min(100%, 40rem); font: inherit; padding: 0.4rem 0.5rem; }
.mg-datefield { display: inline-flex; gap: 0.35rem; align-items: center; }
.mg-datefield .mg-input {
  width: auto;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(180, 160, 200, 0.35);
  padding: 0.35rem 0.55rem;
}
.mg-date-text { min-width: 9rem; }
.mg-date-text.mg-occurred { width: 15.5rem; min-width: 15.5rem; flex: 0 0 auto; }
.mg-date-pick {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(180, 160, 200, 0.35);
  padding: 0.3rem;
}
.mg-hint-line { display: block; margin-top: 0.25rem; }
.mg-msg, .mg-warn { display: block; margin: 0.6rem 0; }
.mg-table { width: 100%; border-collapse: collapse; }
.mg-table th, .mg-table td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid rgba(128,128,128,0.35); vertical-align: top; }
.mg-admin { list-style: none; padding: 0; }
.mg-admin li { margin: 0.35rem 0; }
.mg-light { position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 80; display: grid; place-items: center; padding: 1.5rem; }
.mg-light[hidden] { display: none; }
.mg-light-panel { background: #111; color: #f3f0ea; max-width: min(960px, 100%); width: 100%; padding: 1rem; position: relative; }
.mg-light-panel img, .mg-light-panel video, .mg-light-panel iframe { width: 100%; max-height: 70vh; background: #000; }
.mg-light-x { position: absolute; top: 0.4rem; right: 0.4rem; }
.mg-empty { opacity: 0.75; }
@media (max-width: 800px) {
  .mg-cols-3, .mg-cols-4, .mg-cols-5, .mg-galleries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-masonry.mg-cols-3, .mg-masonry.mg-cols-4, .mg-masonry.mg-cols-5 { column-count: 2; }
  .mg-meta { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .mg-cols-3, .mg-cols-4, .mg-cols-5, .mg-galleries { grid-template-columns: 1fr; }
  .mg-masonry.mg-cols-3, .mg-masonry.mg-cols-4, .mg-masonry.mg-cols-5 { column-count: 1; }
}
