/* =============================================
   Jennie My Doe — Front Page
   White editorial base (GINZA) + BASE lilac/gold palette
   ============================================= */

#jmd-page {
  --pad: clamp(20px, 4vw, 56px);
  --maxw: 1320px;
  background: var(--jmd-paper);
  color: var(--jmd-ink);
  font-family: var(--jmd-sans);
  -webkit-font-smoothing: antialiased;
}
#jmd-page img { display: block; max-width: 100%; }
#jmd-page a { text-decoration: none; color: inherit; }
#jmd-page button { font-family: inherit; }

/* ---------- shared atoms ---------- */
.jmd-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jmd-accent-ink);
  margin-bottom: 8px;
}
.jmd-date {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--jmd-muted);
  margin-top: 10px;
}

.jmd-sec {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) var(--pad) 0;
}
/* anchor targets must clear the sticky header */
.jmd-sec, .jmd-shop { scroll-margin-top: 84px; }
.jmd-sec + .jmd-sec > .jmd-sechead { border-top: 1px solid var(--jmd-rule); padding-top: clamp(40px, 5vw, 64px); }

.jmd-sechead { margin-bottom: clamp(28px, 4vw, 48px); }
.jmd-sechead--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.jmd-sechead__en {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  color: var(--jmd-ink);
}
.jmd-sechead__ja {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--jmd-muted);
  margin: 12px 0 0;
}
.jmd-viewall {
  position: relative;
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jmd-ink);
  padding-bottom: 6px;
}
.jmd-viewall::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform 0.35s ease;
}
.jmd-viewall:hover::after { transform: scaleX(0.4); }

/* ---------- masthead (sticky, shrinks on scroll) ---------- */
.jmd-masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  transition: box-shadow 0.4s ease, background 0.4s ease;
}
.jmd-masthead.is-stuck {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 26px rgba(40, 50, 90, 0.07);
}
/* keep the WP admin bar clear of the sticky header */
body.admin-bar .jmd-masthead { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .jmd-masthead { top: 46px; }
}

.jmd-masthead__bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px var(--pad);
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  transition: padding 0.4s cubic-bezier(.2,.7,.2,1);
}
.jmd-masthead.is-stuck .jmd-masthead__bar { padding-top: 9px; padding-bottom: 9px; }

.jmd-badge {
  flex: none;
  width: 104px; height: 104px;
  transition: transform 0.4s ease, width 0.4s cubic-bezier(.2,.7,.2,1), height 0.4s cubic-bezier(.2,.7,.2,1);
}
.jmd-badge img { width: 100%; height: 100%; }
.jmd-badge:hover { transform: rotate(-4deg) scale(1.03); }
.jmd-badge--sm { width: 92px; height: 92px; }
.jmd-masthead.is-stuck .jmd-badge { width: 52px; height: 52px; }

.jmd-masthead__tagline {
  flex: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.7;
  color: var(--jmd-muted);
  margin: 0;
  max-width: 240px;
  overflow: hidden;
  padding-left: clamp(4px, 2vw, 20px);
  border-left: 1px solid var(--jmd-rule);
  /* nowrap is required: collapsing max-width to 0 would otherwise wrap the
     text one character per line and blow up the header's height */
  white-space: nowrap;
  transition: opacity 0.3s ease,
              max-width 0.4s cubic-bezier(.2,.7,.2,1),
              padding-left 0.4s cubic-bezier(.2,.7,.2,1),
              border-left-width 0.4s cubic-bezier(.2,.7,.2,1);
}
/* collapse the rule too, otherwise a stray 1px line stays behind */
.jmd-masthead.is-stuck .jmd-masthead__tagline {
  opacity: 0;
  max-width: 0;
  padding-left: 0;
  border-left-width: 0;
}
.jmd-masthead__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
  overflow-x: auto;
  scrollbar-width: none;
}
.jmd-masthead__nav::-webkit-scrollbar { display: none; }
.jmd-masthead__nav a {
  position: relative;
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 6px 0;
}
.jmd-masthead__nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--jmd-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.jmd-masthead__nav a:hover::after { transform: scaleX(1); }
.jmd-masthead__nav .is-accent { color: var(--jmd-accent-ink); }

/* ---------- hero ---------- */
.jmd-hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) var(--pad) 0;
}
.jmd-hero__band { overflow: hidden; }
.jmd-hero__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.jmd-hero__track::-webkit-scrollbar { display: none; }
.jmd-hero__panel {
  flex: 0 0 calc((100% - 20px) / 3);
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.jmd-hero__panel img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.jmd-hero__panel:hover img { transform: scale(1.05); }

.jmd-hero__caption {
  position: relative;
  z-index: 2;
  margin: -84px 0 0 0;
  max-width: 660px;
  background: var(--jmd-paper);
  padding: 30px 40px 24px 0;
}
.jmd-hero__title {
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
  margin: 0;
  transition: opacity 0.3s ease;
}
.jmd-hero__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.jmd-arrow {
  width: 40px; height: 40px;
  border: 1px solid var(--jmd-rule);
  border-radius: 50%;
  background: transparent;
  color: var(--jmd-ink);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.jmd-arrow:hover:not(:disabled) {
  background: var(--jmd-ink);
  border-color: var(--jmd-ink);
  color: #fff;
}
.jmd-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}
.jmd-dots { display: flex; gap: 7px; margin-left: 10px; }
.jmd-dot {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--jmd-rule);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.jmd-dot.is-on { background: var(--jmd-ink); transform: scale(1.5); }

/* ---------- cards ---------- */
.jmd-card { display: block; }
.jmd-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--jmd-lilac-1);
  margin-bottom: 14px;
}
.jmd-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.jmd-card:hover .jmd-card__media img { transform: scale(1.06); }
.jmd-card__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.62;
  margin: 0;
  transition: color 0.25s ease;
}
.jmd-card:hover .jmd-card__title { color: var(--jmd-accent-ink); }

.jmd-card--lg .jmd-card__media { aspect-ratio: 16 / 11; }
.jmd-card--lg .jmd-card__title { font-size: clamp(1.05rem, 1.7vw, 1.4rem); line-height: 1.5; }
.jmd-card--wide .jmd-card__media { aspect-ratio: 16 / 9; }
.jmd-card--wide .jmd-card__title { font-size: 16px; }
.jmd-card--sm .jmd-card__media { aspect-ratio: 1 / 1; }
.jmd-card--sm .jmd-card__title { font-size: 13px; }

/* row card: image left, text right */
.jmd-card--row {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 20px;
  align-items: start;
}
.jmd-card--row .jmd-card__media { aspect-ratio: 4 / 3; margin-bottom: 0; }
.jmd-card--row .jmd-card__title { font-size: 14.5px; }

/* ---------- latest: masonry-ish mixed grid ---------- */
.jmd-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 44px) clamp(16px, 2vw, 28px);
  align-items: start;
}
.jmd-masonry > .jmd-card--lg  { grid-column: span 2; grid-row: span 2; }
.jmd-masonry > .jmd-card--wide { grid-column: span 2; }
.jmd-masonry > .jmd-card:nth-child(2) .jmd-card__media { aspect-ratio: 3 / 4; }
.jmd-masonry > .jmd-card:nth-child(3) .jmd-card__media { aspect-ratio: 1 / 1; }

/* ---------- ranking ---------- */
.jmd-ranking__layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.jmd-rank1__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--jmd-lilac-1);
  margin-bottom: 16px;
}
.jmd-rank1__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.jmd-rank1:hover .jmd-rank1__media img { transform: scale(1.05); }
.jmd-rank1__num {
  position: absolute;
  left: 0; bottom: 0;
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  background: var(--jmd-ink);
  color: #fff;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}
.jmd-rank1__title {
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  transition: color 0.25s ease;
}
.jmd-rank1:hover .jmd-rank1__title { color: var(--jmd-accent-ink); }

.jmd-ranklist { list-style: none; margin: 0; padding: 0; }
.jmd-ranklist li + li { border-top: 1px solid var(--jmd-rule); }
.jmd-rankrow {
  display: grid;
  grid-template-columns: 32px 1fr 84px;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
}
.jmd-rankrow__num {
  font-size: 20px;
  font-weight: 200;
  color: var(--jmd-muted);
  line-height: 1;
}
.jmd-rankrow__title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
  transition: color 0.25s ease;
}
.jmd-rankrow:hover .jmd-rankrow__title { color: var(--jmd-accent-ink); }
.jmd-rankrow .jmd-label { margin-bottom: 5px; }
.jmd-rankrow__thumb {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--jmd-lilac-1);
}
.jmd-rankrow__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- category layouts ---------- */
.jmd-tri {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}
/* varied aspect ratios so the row is not a flat strip */
.jmd-tri > .jmd-card:nth-child(1) .jmd-card__media { aspect-ratio: 3 / 4; }
.jmd-tri > .jmd-card:nth-child(2) .jmd-card__media { aspect-ratio: 1 / 1; margin-top: 40px; }
.jmd-tri > .jmd-card:nth-child(3) .jmd-card__media { aspect-ratio: 4 / 5; margin-top: 16px; }

.jmd-split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.jmd-split__side { display: grid; gap: 26px; }
.jmd-split__side .jmd-card--row { grid-template-columns: 132px 1fr; }

.jmd-rows { display: grid; gap: 0; }
.jmd-rows > .jmd-card--row {
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--jmd-rule);
}
.jmd-rows > .jmd-card--row:last-child { border-bottom: 1px solid var(--jmd-rule); }
.jmd-rows > .jmd-card--row .jmd-card__media { aspect-ratio: 16 / 9; }
.jmd-rows > .jmd-card--row .jmd-card__title { font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.55; }

.jmd-duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 44px);
}
.jmd-duo > .jmd-card--wide .jmd-card__media { aspect-ratio: 3 / 2; }
.jmd-duo > .jmd-card--wide .jmd-card__title { font-size: clamp(1rem, 1.5vw, 1.2rem); }

/* ---------- carousel ---------- */
.jmd-carousel { position: relative; }
.jmd-carousel__track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.jmd-carousel__track::-webkit-scrollbar { display: none; }
.jmd-carousel__track > * {
  flex: 0 0 clamp(220px, 26%, 320px);
  scroll-snap-align: start;
}
.jmd-carousel__nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

/* ---------- shop ---------- */
.jmd-shop {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  padding: clamp(56px, 8vw, 96px) 0;
  /* Soft lilac field. Each bloom stays in its own corner and fades out well
     before meeting the next, so the hues never mix into a muddy grey. */
  background:
    radial-gradient(80% 62% at 6% -8%,
      rgba(150, 206, 236, 0.52) 0%,
      rgba(158, 200, 238, 0.26) 34%,
      rgba(166, 194, 240, 0) 68%),
    radial-gradient(62% 58% at 96% 96%,
      rgba(255, 231, 148, 0.62) 0%,
      rgba(252, 226, 168, 0.28) 36%,
      rgba(246, 224, 196, 0) 70%),
    radial-gradient(70% 55% at 44% 112%,
      rgba(176, 158, 236, 0.34) 0%,
      rgba(184, 168, 238, 0) 66%),
    linear-gradient(158deg, #F1E9FC 0%, #E6DAF8 46%, #DCCFF4 100%);
}
/* fine grain: kills the banding across such a wide, low-contrast wash
   and gives the surface the matte shimmer of the BASE artwork */
.jmd-shop::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
.jmd-shop__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.jmd-item { display: block; }
.jmd-item__media {
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
  margin-bottom: 14px;
  box-shadow: 0 2px 14px rgba(80, 90, 150, 0.08);
}
.jmd-item__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.jmd-item:hover .jmd-item__media img { transform: scale(1.06); }
.jmd-item__name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 6px;
  transition: color 0.25s ease;
}
.jmd-item:hover .jmd-item__name { color: var(--jmd-accent-ink); }
.jmd-item__price {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--jmd-ink);
  margin: 0;
}

/* ---------- footer ---------- */
.jmd-footer {
  border-top: 1px solid var(--jmd-rule);
  padding: clamp(48px, 6vw, 72px) var(--pad);
  background: var(--jmd-paper);
}
.jmd-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}
.jmd-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 26px;
}
.jmd-footer__nav a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jmd-muted);
  transition: color 0.25s ease;
}
.jmd-footer__nav a:hover { color: var(--jmd-accent-ink); }
.jmd-footer__copy {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--jmd-muted);
  margin: 0;
}

/* =============== RESPONSIVE =============== */
@media (max-width: 1024px) {
  .jmd-masonry { grid-template-columns: repeat(2, 1fr); }
  .jmd-masonry > .jmd-card--lg { grid-column: span 2; grid-row: auto; }
  .jmd-masonry > .jmd-card--wide { grid-column: span 2; }
  .jmd-ranking__layout { grid-template-columns: 1fr; }
  .jmd-split { grid-template-columns: 1fr; }
  .jmd-rows > .jmd-card--row { grid-template-columns: 200px 1fr; gap: 24px; }
  .jmd-hero__panel { flex-basis: calc((100% - 10px) / 2); }
}

@media (max-width: 760px) {
  .jmd-masthead__bar { flex-wrap: wrap; gap: 12px; padding-top: 14px; padding-bottom: 10px; }
  .jmd-badge { width: 78px; height: 78px; }
  .jmd-masthead__tagline { font-size: 9px; letter-spacing: 0.18em; }
  .jmd-masthead__nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  /* compact state has to be re-declared here: it must win over the
     mobile badge size above, which comes later in the cascade */
  .jmd-masthead.is-stuck .jmd-masthead__bar { padding-top: 8px; padding-bottom: 6px; gap: 8px; }
  .jmd-masthead.is-stuck .jmd-badge { width: 42px; height: 42px; }
  .jmd-sec, .jmd-shop { scroll-margin-top: 104px; }

  .jmd-hero__panel { flex-basis: 100%; aspect-ratio: 4 / 5; }
  .jmd-hero__caption { margin-top: 0; padding: 20px 0 0; max-width: none; }
  .jmd-hero__title { font-size: 1.15rem; }

  .jmd-masonry { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
  .jmd-masonry > .jmd-card--lg,
  .jmd-masonry > .jmd-card--wide { grid-column: span 2; }
  .jmd-masonry > .jmd-card:nth-child(2) .jmd-card__media,
  .jmd-masonry > .jmd-card:nth-child(3) .jmd-card__media { aspect-ratio: 1 / 1; }

  .jmd-rank1__num { width: 48px; height: 48px; font-size: 20px; }
  .jmd-rankrow { grid-template-columns: 24px 1fr 64px; gap: 12px; }

  .jmd-tri { grid-template-columns: 1fr 1fr; gap: 16px; }
  .jmd-tri > .jmd-card:nth-child(n) .jmd-card__media { margin-top: 0; aspect-ratio: 1 / 1; }
  .jmd-tri > .jmd-card:nth-child(3) { grid-column: span 2; }
  .jmd-tri > .jmd-card:nth-child(3) .jmd-card__media { aspect-ratio: 16 / 9; }

  .jmd-rows > .jmd-card--row { grid-template-columns: 128px 1fr; gap: 16px; padding: 20px 0; }
  .jmd-duo { grid-template-columns: 1fr; }
  .jmd-split__side .jmd-card--row { grid-template-columns: 112px 1fr; gap: 14px; }
  .jmd-carousel__track > * { flex-basis: 62%; }
  .jmd-card--row { grid-template-columns: 112px 1fr; gap: 14px; }
}
