
.mgew{
  --ocean: #0a7aff;
  --deep: #0b3a66;
  --sand: #f5e3c0;
  --ink: #0c1220;
  --card: #ffffff;
  --line: rgba(0,0,0,.10);
  --shadow: 0 14px 32px rgba(0,0,0,.10);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--ink);
}

.mgew *{ box-sizing:border-box; }

.mgew-hero{
  border-radius: 22px;
  padding: 22px 18px;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(10,122,255,.22), rgba(0,0,0,0) 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(245,227,192,.35), rgba(0,0,0,0) 60%),
    linear-gradient(135deg, rgba(11,58,102,.14), rgba(10,122,255,.10));
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.mgew-badge{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:800;
  letter-spacing:.2px;
  opacity:.95;
}

.mgew-badge-img{
  width:46px;
  height:46px;
  border-radius:12px;
  background:#fff;
  border:1px solid var(--line);
  padding:6px;
}

.mgew h2{
  margin: 14px 0 6px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.1;
}

.mgew p{
  margin:0;
  opacity:.86;
}

.mgew-controls{
  display:flex;
  gap:12px;
  margin-top: 14px;
  flex-wrap:wrap;
}

.mgew-control label{
  display:block;
  font-size:12px;
  font-weight:800;
  opacity:.85;
  margin-bottom: 6px;
}

.mgew-control select,
.mgew-control input{
  width:100%;
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  outline:none;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
}

.mgew-results{ min-height: 80px; }

.mgew-empty{
  padding: 18px;
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 18px;
  background: rgba(255,255,255,.6);
  text-align:center;
  font-weight:700;
  opacity:.85;
}

.mgew-grid{
  display:grid;
  grid-template-columns: repeat( auto-fit, minmax(240px, 1fr) );
  gap: 14px;
}

.mgew-card{
  border:1px solid var(--line);
  border-radius: 18px;
  overflow:hidden;
  background: var(--card);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  transition: transform .18s ease, box-shadow .18s ease;
}

.mgew-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
}

.mgew-card-link{ display:block; color:inherit; text-decoration:none; }

.mgew-cover{
  width:100%;
  height: 160px;
  overflow:hidden;
  background: #e9f2ff;
}
.mgew-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.mgew-card-body{
  padding: 12px 12px 10px;
}

.mgew-card-top{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  justify-content: space-between;
}

.mgew-card-title{
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
}

.mgew-like{
  border:1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.9);
  border-radius: 999px;
  padding: 6px 10px;
  cursor:pointer;
  font-size: 16px;
  line-height: 1;
  transition: transform .15s ease, background .15s ease;
}

.mgew-like:hover{ transform: scale(1.04); }
.mgew-like.mgew-liked{ background: rgba(245,227,192,.65); }

.mgew-card-meta{
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  opacity:.78;
}

.mgew-card-desc{
  margin-top: 8px;
  font-size: 13px;
  opacity:.86;
  line-height: 1.35;
}

.mgew-card-footer{
  margin-top: 10px;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:10px;
  font-size: 13px;
  font-weight: 800;
  opacity:.88;
}

.mgew-back{
  display:inline-block;
  margin-top: 12px;
  text-decoration:none;
  font-weight:800;
  color: var(--deep);
  background: rgba(255,255,255,.8);
  border:1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
}

.mgew-meta-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top: 6px;
  font-weight: 800;
  opacity:.85;
}

.mgew-gallery-grid{
  display:grid;
  grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) );
  gap: 14px;
}

.mgew-img-btn:focus{ outline: 2px solid rgba(10,122,255,.4); outline-offset: 3px; border-radius:16px; }

/* Lightbox */
.mgew-lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.84);
  z-index: 99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}

body.mgew-noscroll{ overflow:hidden; }

.mgew-lb-img{
  max-width: min(100%, 1100px);
  max-height: 80vh;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.6);
  user-select:none;
  -webkit-user-drag: none;
}

.mgew-lb-cap{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  max-width: min(900px, 92vw);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  font-weight: 800;
  text-align:center;
  backdrop-filter: blur(10px);
}

.mgew-lb-close{
  position: fixed;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor:pointer;
  font-size: 20px;
}

.mgew-lb-nav{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  cursor:pointer;
  font-size: 34px;
  line-height: 52px;
  text-align:center;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.mgew-lb-prev{ left: 14px; }
.mgew-lb-next{ right: 14px; }

.mgew-lb-nav:disabled{
  opacity: .35;
  cursor: default;
}

@media (max-width: 600px){
  .mgew-lb-nav{ width: 48px; height: 48px; font-size: 30px; line-height: 44px; }
}

.mgew-lb-wm{
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 62px;
  height: auto;
  opacity: .55;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.7));
  pointer-events:none;
}
