/* My Japan Friend v52.7.1: one coherent Japan shopping directory. */
#marketplaces .mjf-official-group{margin-top:25px}
#marketplaces .mjf-official-links{grid-template-columns:repeat(4,minmax(0,1fr))}
#marketplaces .mjf-official-store{min-height:160px;cursor:default}
#marketplaces .mjf-official-store:hover{transform:none}
.mjf-official-symbol{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fafafb;border:1px solid #edf0f1;color:#bd463f}
.mjf-official-symbol .store-mark{font-size:24px;font-weight:800;line-height:1}
.mjf-official-symbol img.mjf-real-logo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fafafb;border-radius:inherit;padding:5px;opacity:1;display:block}
#marketplaces .mjf-official-symbol img.mjf-real-logo{top:0;left:0;width:100%;height:100%;padding:5px}
#marketplaces .mjf-official-actions{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding-top:10px;width:100%}
#marketplaces .mjf-official-actions a{font-size:10px;line-height:1.4;font-weight:700;color:#617789;text-decoration:none}
#marketplaces .mjf-official-actions a:last-child{color:#1262a2}
#marketplaces .mjf-official-actions a:hover{text-decoration:underline}
#marketplaces .mjf-official-note{margin-top:14px}
#marketplaces .mjf-official-more{margin:8px 0 0;text-align:right}
#marketplaces .mjf-official-more a{font-size:11px;color:#176aaf;font-weight:750;text-decoration:none}
/* The full official-store directory intentionally matches the main marketplace. */
.mjf-retail{margin:20px 0 26px;padding:clamp(12px,2.8vw,26px);background:#fff;border:0;border-radius:0;color:#263a4d}
.mjf-retail-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.mjf-retail-heading h2{font-size:clamp(1.3rem,2vw,1.8rem);margin:4px 0 8px;font-weight:800;line-height:1.35}
.mjf-retail-heading p{margin:0;max-width:780px;color:#526779;line-height:1.7;font-size:.86rem}
.mjf-retail-kicker{font-size:.7rem;font-weight:800;letter-spacing:.14em;color:#ab5845}
.mjf-retail-group-title{margin:26px 0 12px;font-size:1.08rem;font-weight:800}
.mjf-retail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.mjf-retail-card{min-width:0;background:#fff;border:1px solid #e0e5e8;border-radius:13px;padding:16px;display:flex;flex-direction:column;gap:8px;min-height:175px;box-shadow:none}
.mjf-retail-symbol{position:relative;width:58px;height:58px;border-radius:15px;flex:none}
.mjf-retail-card h3{font-size:1rem;margin:0;line-height:1.4;overflow-wrap:anywhere}
.mjf-retail-card p{color:#526779;font-size:.85rem;margin:0 0 10px;line-height:1.5}
.mjf-retail-links{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin-top:auto}
.mjf-retail-links a,.mjf-retail-more{font-size:.79rem;font-weight:700;text-decoration:none;color:#14618a;line-height:1.4}
.mjf-retail-links a:last-child{color:#af4e43}
.mjf-retail-note{color:#5b7182;font-size:.78rem;margin:18px 0 0;line-height:1.6}
.mjf-retail-topline{margin:22px 0}.mjf-retail-topline a{font-weight:700;color:#14618a}
.mjf-four-lang{flex-wrap:wrap}
@media(max-width:980px){.mjf-retail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){#marketplaces .mjf-official-links{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){#marketplaces .mjf-official-group{margin-top:18px}#marketplaces .mjf-official-store{min-height:155px}#marketplaces .mjf-official-actions{gap:6px}#marketplaces .mjf-official-actions a{font-size:9px}.mjf-retail{padding:12px 0;margin:12px 0}.mjf-retail-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.mjf-retail-card{padding:12px;min-height:165px}.mjf-retail-card h3{font-size:.9rem}.mjf-retail-card p{font-size:.77rem}.mjf-retail-links a{font-size:.73rem}}

/* v52.7.2: fix collapsed text caused by the inherited horizontal flex layout.
   New store cards use their own two-row grid; legacy marketplace cards remain unchanged. */
#marketplaces .mjf-official-links {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  align-items:stretch;
  width:100%;
}
#marketplaces .mjf-official-links > .mjf-official-store {
  box-sizing:border-box;
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  grid-template-rows:auto 1fr auto;
  column-gap:10px;
  row-gap:5px;
  align-items:start;
  justify-content:stretch;
  width:100%;
  min-width:0;
  min-height:125px;
  padding:13px !important;
  border:1px solid #dee6ec;
  border-radius:13px;
  background:#fff;
  text-align:left;
  cursor:default;
}
#marketplaces .mjf-official-store > .mjf-official-symbol {
  box-sizing:border-box;
  grid-column:1;
  grid-row:1;
  flex:none;
  width:46px;
  min-width:46px;
  height:46px;
  margin:0;
}
#marketplaces .mjf-official-store > .store-names {
  box-sizing:border-box;
  grid-column:2;
  grid-row:1;
  display:flex;
  flex-direction:column;
  gap:3px;
  flex:none;
  width:100%;
  min-width:0;
  margin:0;
  align-items:flex-start;
  overflow-wrap:break-word;
  word-break:normal;
  white-space:normal;
}
#marketplaces .mjf-official-store > .store-names b,
#marketplaces .mjf-official-store > .store-names small {
  display:block;
  width:100%;
  min-width:0;
  white-space:normal;
  overflow-wrap:break-word;
  word-break:normal;
  text-align:left;
  line-height:1.45;
}
#marketplaces .mjf-official-store > .store-names b {font-size:12px;font-weight:750}
#marketplaces .mjf-official-store > .store-names small {font-size:10px}
#marketplaces .mjf-official-store > .mjf-official-actions {
  box-sizing:border-box;
  grid-column:1 / -1;
  grid-row:3;
  align-self:end;
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  align-items:center;
  gap:7px 10px;
  width:100%;
  min-width:0;
  padding:8px 0 0;
  margin:0;
}
#marketplaces .mjf-official-store > .mjf-official-actions a {
  flex:none;
  white-space:normal;
  text-wrap:pretty;
  overflow-wrap:normal;
  font-size:10px;
  line-height:1.4;
}
@media (max-width:900px) {
  #marketplaces .mjf-official-links {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:540px) {
  #marketplaces .mjf-official-links > .mjf-official-store {
    grid-template-columns:36px minmax(0,1fr);
    column-gap:8px;
    min-height:128px;
    padding:10px !important;
  }
  #marketplaces .mjf-official-store > .mjf-official-symbol {
    width:36px;min-width:36px;height:36px;
  }
  #marketplaces .mjf-official-store > .store-names b {font-size:11px}
  #marketplaces .mjf-official-store > .store-names small {font-size:9px}
  #marketplaces .mjf-official-store > .mjf-official-actions a {font-size:9px}
}
@media (max-width:370px) {
  #marketplaces .mjf-official-links {grid-template-columns:1fr}
}


/* v52.7.3 — compact logo-led store directory cards (03 and 04 only). */
#marketplaces .mjf-official-links {
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
#marketplaces .mjf-official-links > .mjf-official-store {
  grid-template-columns:34px minmax(0,1fr);
  grid-template-rows:auto 1fr auto;
  column-gap:7px;
  row-gap:0;
  min-height:88px;
  padding:8px 9px !important;
  border-radius:10px;
}
#marketplaces .mjf-official-store > .mjf-official-symbol {
  width:34px;min-width:34px;height:34px;
  border-radius:9px;
}
#marketplaces .mjf-official-store > .store-names {gap:1px}
#marketplaces .mjf-official-store > .store-names b {
  font-size:11px;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#marketplaces .mjf-official-store > .store-names small {
  font-size:9px;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#marketplaces .mjf-official-store > .mjf-official-actions {
  grid-row:3;
  gap:4px 7px;
  padding:4px 0 0;
}
#marketplaces .mjf-official-store > .mjf-official-actions a {font-size:9px;line-height:1.25}
@media (max-width:1000px) {
  #marketplaces .mjf-official-links {grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:780px) {
  #marketplaces .mjf-official-links {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:540px) {
  #marketplaces .mjf-official-links {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  #marketplaces .mjf-official-links > .mjf-official-store {
    grid-template-columns:30px minmax(0,1fr);
    min-height:82px;
    padding:7px !important;
    column-gap:6px;
  }
  #marketplaces .mjf-official-store > .mjf-official-symbol {width:30px;min-width:30px;height:30px}
  #marketplaces .mjf-official-store > .store-names b {font-size:10px}
  #marketplaces .mjf-official-store > .store-names small {font-size:8.5px}
  #marketplaces .mjf-official-store > .mjf-official-actions a {font-size:8.5px}
}
@media (max-width:370px) {
  #marketplaces .mjf-official-links {grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* A modest consultation strip, rather than a fifth product card. */
.mjf-hard-find {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid #d5e6f1;
  border-radius:12px;
  background:#f4faff;
  padding:13px 15px;
  margin:15px 0 6px;
}
.mjf-hard-find-copy{min-width:0}
.mjf-hard-find strong{display:block;font-size:14px;line-height:1.4;color:#12476f}
.mjf-hard-find p{margin:4px 0 0;font-size:11px;line-height:1.5;color:#526b7f}
.mjf-hard-find a{
  flex:none;
  color:#1466ae;
  text-decoration:none;
  font-size:12px;
  font-weight:750;
  white-space:nowrap;
}
.mjf-hard-find a:hover{text-decoration:underline}
@media (max-width:640px) {
  .mjf-hard-find{align-items:flex-start;flex-direction:column;padding:12px;gap:8px}
  .mjf-hard-find strong{font-size:13px}
  .mjf-hard-find p{font-size:11px}
}
