/* =========================================================
   my.maiclouds v5.0 (Final Layout)
   - No counts
   - Fixed card size (Flexbox)
========================================================= */

:root {
  --accent: #F48FB1;
  --deep: rgba(225, 245, 254, 0.5);
  --highlight: #FFFFFF;
  --earth: #B39DDB;
  --glass: rgba(240, 248, 255, 0.45); 
  --surface: rgba(225, 235, 255, 0.35);
  --fg: #546E7A;
  --muted: #90A4AE;
  --border: rgba(255, 255, 255, 0.6);
  --border-soft: rgba(255, 255, 255, 0.3);
  --r-xl: 28px;
  --r-lg: 20px;
  --container: 1120px;
  
  /* カードサイズ設定 */
  --card-width: 300px;
  --card-gap: 20px;

  --ease: cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  color: var(--fg);
  background-color: #E1F5FE;
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Background */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -99;
  background: linear-gradient(180deg, #E1F5FE 0%, #E3F2FD 40%, #FCE4EC 100%);
}
#bg-clouds, #bg-particles { position: fixed; inset: -10vh -10vw; pointer-events: none; }
#bg-clouds { z-index: -3; opacity: 0.7; background: radial-gradient(closest-side at 25% 30%, rgba(255,255,255,0.5), transparent 80%); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--border-soft); background: var(--glass);
  backdrop-filter: blur(12px);
}
.site-title { margin: 0; font-family: "Noto Serif JP", serif; font-size: 24px; color: var(--fg); }
.site-sub { margin: 0; font-size: 11px; color: var(--muted); }
.controls { display: grid; gap: 6px; }
.control-label { font-size: 10px; color: var(--accent); letter-spacing: 0.05em; text-transform: uppercase; }
select { border: 1px solid var(--border-soft); background: rgba(255,255,255,0.4); padding: 6px 10px; border-radius: 8px; color: var(--fg); font-size: 14px; }

/* Hero */
.hero { padding: 20px 0 10px; }
.hero-inner {
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(225,245,254,0.3));
  padding: 30px 24px; text-align: center;
  box-shadow: 0 10px 30px rgba(179, 157, 219, 0.15);
}
.hero-title { margin: 0; font-family: "Noto Serif JP", serif; font-size: 32px; color: var(--fg); letter-spacing: 0.1em; }

/* Gallery Layout */
.gallery { display: flex; flex-direction: column; gap: 40px; padding: 20px 0 80px; }

/* Category Section */
.cat-section { margin-bottom: 10px; }
.cat-header {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 24px;
}
.cat-line { height: 1px; background: var(--border); flex: 1; max-width: 100px; }
.cat-title {
  margin: 0; font-family: "Noto Serif JP", serif; font-size: 20px; color: var(--accent);
  letter-spacing: 0.1em;
}

/* Grid (Flexbox) */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* 中央寄せ */
  gap: var(--card-gap);
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* Card */
.mcard {
  position: relative;
  width: var(--card-width);
  max-width: 100%;
  aspect-ratio: 4/3;
}

.mcard-btn {
  all: unset; display: block; width: 100%; height: 100%; cursor: pointer;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border-soft);
  box-shadow: 0 4px 12px rgba(179, 157, 219, 0.1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  background: white;
}
.mcard-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.mcard-btn:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(244, 143, 177, 0.25); border-color: var(--accent); }
.mcard-btn:hover img { transform: scale(1.05); }

/* Overlay */
.mcard-overlay {
  position: absolute; inset: 0; padding: 14px;
  background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 50%);
  display: flex; flex-direction: column; justify-content: flex-end;
  opacity: 0; transition: opacity 0.3s;
}
.mcard-btn:hover .mcard-overlay { opacity: 1; }

.ov-title { font-family: "Noto Serif JP", serif; font-size: 14px; color: var(--fg); font-weight: 600; }
.ov-abbr { color: var(--accent); font-size: 12px; margin-left: 6px; }
.ov-meta { font-size: 11px; color: var(--muted); margin-top: 4px; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 4px; }

/* Lightbox */
#lightbox { border: none; background: transparent; padding: 0; }
#lightbox::backdrop { background: rgba(255,255,255,0.8); backdrop-filter: blur(8px); }
.lightbox-inner {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(12px);
  padding: 20px; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  width: min(90vw, 1000px); margin: auto; border: 1px solid white;
}
.lightbox-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.lightbox-title { font-family: "Noto Serif JP", serif; font-size: 18px; margin: 0; }
#lightbox-img { width: 100%; max-height: 75vh; object-fit: contain; border-radius: 12px; background: rgba(0,0,0,0.03); }
.lightbox-meta { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.lb-k { color: var(--muted); }

/* Responsive */
@media (max-width: 700px) {
  :root { --card-width: 46%; --card-gap: 10px; }
  .hero-inner { padding: 20px 16px; }
  .hero-title { font-size: 24px; }
}