@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Syne:wght@700&family=Oswald:wght@500;600&family=Cormorant+Garamond:ital,wght@0,600;1,600&family=Libre+Baskerville:wght@400;700&family=Fraunces:opsz,wght@9..144,500&family=Outfit:wght@500;600&family=Nunito:wght@600;700&family=Playfair+Display:wght@600&family=Source+Serif+4:opsz,wght@8..60,600&display=swap");

body[data-mini-program="1"] {
  --ms-ink: currentColor;
  --ms-accent: color-mix(in srgb, currentColor 55%, #888);
}

body[data-mini-program="1"] .ms-note.is-empty { display: none; }
body[data-mini-program="1"] .ms-note-line {
  margin: 0 auto;
  max-width: 42rem;
  text-align: center;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
}
body[data-mini-program="1"] .ms-pick.is-empty { display: none; }
body[data-mini-program="1"]:not(.store-editor-on) .ms-pick.is-empty { display: none; }

/* Hero fallback compositions keyed by data-mini-hero */
body[data-mini-program="1"] .ms-hero-fallback,
body[data-mini-program="1"] .ms-story-fallback {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
body[data-mini-program="1"] .ms-hero-fallback__a,
body[data-mini-program="1"] .ms-hero-fallback__b,
body[data-mini-program="1"] .ms-hero-fallback__c {
  position: absolute;
  display: block;
  background: color-mix(in srgb, currentColor 14%, transparent);
}

body[data-mini-hero="poster"] .ms-hero-fallback__a { left: 8%; top: 12%; width: 38%; height: 76%; border: 10px solid color-mix(in srgb, currentColor 35%, transparent); }
body[data-mini-hero="poster"] .ms-hero-fallback__b { right: 10%; top: 18%; width: 36%; height: 18%; }
body[data-mini-hero="poster"] .ms-hero-fallback__c { right: 10%; top: 42%; width: 22%; height: 8%; }

body[data-mini-hero="split"] .ms-hero-fallback__a { left: 0; top: 0; width: 46%; height: 100%; }
body[data-mini-hero="split"] .ms-hero-fallback__b { right: 8%; top: 22%; width: 38%; height: 52%; border-radius: 2px; }
body[data-mini-hero="split"] .ms-hero-fallback__c { display: none; }

body[data-mini-hero="plinth"] .ms-hero-fallback__a {
  left: 50%; bottom: 18%; width: 42%; height: 12%; transform: translateX(-50%) perspective(240px) rotateX(58deg);
  border-radius: 2px;
  background: color-mix(in srgb, currentColor 22%, transparent);
}
body[data-mini-hero="plinth"] .ms-hero-fallback__b {
  left: 50%; top: 18%; width: 28%; height: 48%; transform: translateX(-50%);
  border-radius: 18px 18px 10px 10px;
  box-shadow: 0 0 48px color-mix(in srgb, currentColor 28%, transparent);
}
body[data-mini-hero="plinth"] .ms-hero-fallback__c {
  left: 50%; top: 24%; width: 20%; height: 36%; transform: translateX(-50%);
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, currentColor 40%, #fff) 0%, transparent 80%);
}

body[data-mini-skin="mini_pocket_signal"][data-mini-hero="plinth"] .ms-hero-fallback__b {
  width: 22%;
  height: 56%;
  top: 12%;
  border-radius: 22px;
  background: #11151c;
  box-shadow: 0 0 0 1px #8aa4c4, 0 0 40px #3b82f6;
}
body[data-mini-skin="mini_pocket_signal"][data-mini-hero="plinth"] .ms-hero-fallback__c {
  width: 16%;
  height: 44%;
  top: 18%;
  border-radius: 8px;
  background: linear-gradient(165deg, #60a5fa 0%, #1c1f24 55%, #3b82f6 100%);
}
body[data-mini-skin="mini_pocket_signal"][data-mini-hero="plinth"] .ms-hero-fallback__a {
  background: #2a2f38;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

body[data-mini-hero="collage"] .ms-hero-fallback__a { left: 10%; top: 16%; width: 40%; height: 54%; transform: rotate(-6deg); }
body[data-mini-hero="collage"] .ms-hero-fallback__b { right: 12%; top: 28%; width: 36%; height: 48%; transform: rotate(5deg); }
body[data-mini-hero="collage"] .ms-hero-fallback__c { left: 32%; bottom: 10%; width: 30%; height: 28%; }

body[data-mini-hero="lookbook"] .ms-hero-fallback__a { left: 6%; top: 10%; width: 42%; height: 80%; }
body[data-mini-hero="lookbook"] .ms-hero-fallback__b { right: 6%; top: 10%; width: 42%; height: 80%; opacity: 0.7; }
body[data-mini-hero="lookbook"] .ms-hero-fallback__c { left: 48%; top: 8%; width: 4px; height: 84%; background: color-mix(in srgb, currentColor 40%, transparent); }

body[data-mini-hero="cinematic"] .ms-hero-fallback__a { inset: 0; width: 100%; height: 100%; background: linear-gradient(90deg, currentColor 0%, transparent 55%); opacity: 0.12; }
body[data-mini-hero="cinematic"] .ms-hero-fallback__b { left: 10%; bottom: 18%; width: 46%; height: 6%; }
body[data-mini-hero="cinematic"] .ms-hero-fallback__c { display: none; }

body[data-mini-hero="type_stage"] .ms-hero-fallback__a { left: 6%; top: 22%; width: 88%; height: 22%; }
body[data-mini-hero="type_stage"] .ms-hero-fallback__b { left: 6%; top: 50%; width: 54%; height: 10%; }
body[data-mini-hero="type_stage"] .ms-hero-fallback__c { left: 6%; bottom: 16%; width: 28%; height: 10%; }

body[data-mini-hero="room"] .ms-hero-fallback__a { left: 12%; top: 14%; width: 76%; height: 62%; border: 14px solid color-mix(in srgb, currentColor 25%, transparent); background: transparent; }
body[data-mini-hero="room"] .ms-hero-fallback__b { left: 22%; bottom: 12%; width: 56%; height: 18%; }
body[data-mini-hero="room"] .ms-hero-fallback__c { right: 18%; top: 22%; width: 12%; height: 28%; }

body[data-mini-hero="dashboard"] .ms-hero-fallback__a { left: 10%; top: 18%; width: 22%; height: 22%; border-radius: 50%; }
body[data-mini-hero="dashboard"] .ms-hero-fallback__b { left: 38%; top: 18%; width: 22%; height: 22%; border-radius: 50%; }
body[data-mini-hero="dashboard"] .ms-hero-fallback__c { left: 66%; top: 18%; width: 22%; height: 22%; border-radius: 50%; }

body[data-mini-skin="mini_play_cabinet"][data-mini-hero="dashboard"] .ms-hero-fallback__a {
  left: 16%; top: 8%; width: 68%; height: 84%; border-radius: 10px 10px 4px 4px; background: color-mix(in srgb, #b4ff3c 18%, #161a1c);
}
body[data-mini-skin="mini_play_cabinet"][data-mini-hero="dashboard"] .ms-hero-fallback__b {
  left: 28%; top: 18%; width: 44%; height: 38%; border-radius: 4px; background: #0c0e10;
}
body[data-mini-skin="mini_play_cabinet"][data-mini-hero="dashboard"] .ms-hero-fallback__c {
  left: 32%; bottom: 16%; width: 36%; height: 10%; border-radius: 2px; background: #b4ff3c;
}

body[data-mini-skin="mini_spice_drawer"][data-mini-hero="dashboard"] .ms-hero-fallback__a {
  left: 12%; top: 22%; width: 22%; height: 48%; border-radius: 4px;
}
body[data-mini-skin="mini_spice_drawer"][data-mini-hero="dashboard"] .ms-hero-fallback__b {
  left: 40%; top: 22%; width: 22%; height: 48%; border-radius: 4px;
}
body[data-mini-skin="mini_spice_drawer"][data-mini-hero="dashboard"] .ms-hero-fallback__c {
  left: 68%; top: 22%; width: 22%; height: 48%; border-radius: 4px;
}

body[data-mini-skin="mini_dial_room"][data-mini-hero="plinth"] .ms-hero-fallback__b {
  width: 36%; height: 36%; top: 22%; border-radius: 50%; box-shadow: 0 0 0 8px color-mix(in srgb, #c9b18a 40%, transparent);
}
body[data-mini-skin="mini_lamp_study"][data-mini-hero="plinth"] .ms-hero-fallback__b {
  width: 18%; height: 42%; top: 12%; border-radius: 40% 40% 8px 8px; box-shadow: 0 0 60px #c4a15a;
}

body[data-mini-hero="architecture"] .ms-hero-fallback__a { left: 18%; top: 10%; width: 18%; height: 80%; }
body[data-mini-hero="architecture"] .ms-hero-fallback__b { left: 42%; top: 22%; width: 18%; height: 68%; }
body[data-mini-hero="architecture"] .ms-hero-fallback__c { left: 66%; top: 34%; width: 18%; height: 56%; }

body[data-mini-hero="menu"] .ms-hero-fallback__a { left: 18%; top: 12%; width: 64%; height: 76%; }
body[data-mini-hero="menu"] .ms-hero-fallback__b { left: 26%; top: 24%; width: 48%; height: 6%; }
body[data-mini-hero="menu"] .ms-hero-fallback__c { left: 26%; top: 38%; width: 40%; height: 6%; }

body[data-mini-hero="service"] .ms-hero-fallback__a { left: 0; top: 0; width: 100%; height: 28%; }
body[data-mini-hero="service"] .ms-hero-fallback__b { left: 10%; top: 42%; width: 80%; height: 10%; }
body[data-mini-hero="service"] .ms-hero-fallback__c { left: 10%; top: 60%; width: 80%; height: 10%; }

body[data-mini-program="1"] .ms-hero .ml-home-hero-media-img.is-empty { display: none; }

/* Product walls */
body[data-mini-products="lookbook_wall"] .sg-ms-wall--ms {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}
body[data-mini-products="lookbook_wall"] .sg-ms-wall--ms > *:first-child { grid-row: 1 / span 2; }

body[data-mini-products="feature_grid"] .sg-ms-wall--ms {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
}
body[data-mini-products="feature_grid"] .sg-ms-wall--ms > *:first-child { grid-row: 1 / span 2; }

body[data-mini-skin="mini_pocket_signal"] .sg-ms-wall--ms .sg-ms-card,
body[data-mini-card="device"] .sg-ms-wall--ms article {
  border: 1px solid color-mix(in srgb, #60a5fa 35%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, #2a2f38 92%, transparent);
}

body[data-mini-products="lifestyle"] .sg-ms-wall--ms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
body[data-mini-products="lead_gallery"] .sg-ms-wall--ms {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
}
body[data-mini-products="lead_gallery"] .sg-ms-wall--ms > *:first-child { grid-column: 1; grid-row: 1 / span 2; }
body[data-mini-products="equal_grid"] .sg-ms-wall--ms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
body[data-mini-products="shelf"] .sg-ms-wall--ms { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
body[data-mini-products="rail"] .sg-ms-wall--ms { display: flex; gap: 14px; overflow: auto; scroll-snap-type: x mandatory; }
body[data-mini-products="rail"] .sg-ms-wall--ms > * { min-width: 220px; scroll-snap-align: start; }
body[data-mini-products="masonry"] .sg-ms-wall--ms { columns: 3; column-gap: 12px; display: block; }
body[data-mini-products="masonry"] .sg-ms-wall--ms > * { break-inside: avoid; margin-bottom: 12px; display: block; }
body[data-mini-products="list"] .sg-ms-wall--ms { display: grid; grid-template-columns: 1fr; gap: 8px; }
body[data-mini-products="table"] .sg-ms-wall--ms { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
body[data-mini-products="table"] .sg-ms-wall--ms > * { border-bottom: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 0; }

@media (max-width: 800px) {
  body[data-mini-products="lookbook_wall"] .sg-ms-wall--ms,
  body[data-mini-products="feature_grid"] .sg-ms-wall--ms,
  body[data-mini-products="lead_gallery"] .sg-ms-wall--ms,
  body[data-mini-products="equal_grid"] .sg-ms-wall--ms,
  body[data-mini-products="shelf"] .sg-ms-wall--ms {
    grid-template-columns: 1fr 1fr;
  }
  body[data-mini-products="lookbook_wall"] .sg-ms-wall--ms > *:first-child,
  body[data-mini-products="feature_grid"] .sg-ms-wall--ms > *:first-child,
  body[data-mini-products="lead_gallery"] .sg-ms-wall--ms > *:first-child { grid-row: auto; grid-column: auto; }
  body[data-mini-products="masonry"] .sg-ms-wall--ms { columns: 2; }
}

/* Cards */
body[data-mini-card="ticket"] .sg-ms-wall--ms > * { border-radius: 2px; box-shadow: 4px 4px 0 currentColor; }
body[data-mini-card="panel"] .sg-ms-wall--ms > * { border-radius: 0; }
body[data-mini-card="plinth"] .sg-ms-wall--ms > * { background: transparent; box-shadow: none; }
body[data-mini-card="paper"] .sg-ms-wall--ms > * { border-radius: 10px; }
body[data-mini-card="wash"] .sg-ms-wall--ms > * { border-radius: 0; filter: contrast(1.04); }
body[data-mini-card="veil"] .sg-ms-wall--ms > * { border-radius: 999px 999px 12px 12px; }
body[data-mini-card="kit"] .sg-ms-wall--ms > * { border-radius: 0; }
body[data-mini-card="glass"] .sg-ms-wall--ms > * { border-radius: 18px; backdrop-filter: blur(8px); }
body[data-mini-card="chip"] .sg-ms-wall--ms > * { border-radius: 16px; }
body[data-mini-card="stone"] .sg-ms-wall--ms > * { border-radius: 4px; }
body[data-mini-card="fold"] .sg-ms-wall--ms > * { border-radius: 6px; }
body[data-mini-card="raw"] .sg-ms-wall--ms > * { border-radius: 12px 4px 12px 4px; }
body[data-mini-card="leaf"] .sg-ms-wall--ms > * { border-radius: 14px; }
body[data-mini-card="kraft"] .sg-ms-wall--ms > * { border-radius: 8px; }
body[data-mini-card="cup"] .sg-ms-wall--ms > * { border-radius: 20px; }
body[data-mini-card="drawer"] .sg-ms-wall--ms > * { border-radius: 4px; }
body[data-mini-card="cabinet"] .sg-ms-wall--ms > * { border-radius: 2px; outline: 1px solid currentColor; }
body[data-mini-card="desk"] .sg-ms-wall--ms > * { border-radius: 0; }
body[data-mini-card="pack"] .sg-ms-wall--ms > * { border-radius: 6px; }
body[data-mini-card="paw"] .sg-ms-wall--ms > * { border-radius: 18px; }
body[data-mini-card="lot"] .sg-ms-wall--ms > * { border-radius: 2px; }

/* Header chrome */
body[data-mini-header="ticket"] header,
body[data-mini-header="ticket"] .store-topbar { border-bottom: 3px dashed currentColor; }
body[data-mini-header="thin"] header,
body[data-mini-header="thin"] .store-topbar { border-bottom-width: 1px; }
body[data-mini-header="paper"] header { box-shadow: 0 8px 24px color-mix(in srgb, currentColor 8%, transparent); }
body[data-mini-header="signal"] header { border-bottom: 2px solid #3b82f6; }
body[data-mini-header="block"] header { border-bottom: 6px solid currentColor; }
body[data-mini-header="stencil"] header { letter-spacing: 0.08em; text-transform: uppercase; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  body[data-mini-motion="technical"].is-ready .ms-hero .ml-home-hero-copy { animation: ms-tech-in 0.7s ease both; }
  body[data-mini-motion="urban"].is-ready .ms-hero .ml-home-hero-copy { animation: ms-slide 0.55s cubic-bezier(.2,.8,.2,1) both; }
  body[data-mini-motion="editorial"].is-ready .ms-hero .ml-home-hero-copy { animation: ms-fade 0.9s ease both; }
  body[data-mini-motion="paper"].is-ready .ms-hero .ml-home-hero-copy { animation: ms-paper 0.8s ease both; }
  body[data-mini-motion="cinematic"].is-ready .ms-hero .ml-home-hero-copy { animation: ms-cine 1.1s ease both; }
  body[data-mini-motion="glass"].is-ready .ms-hero .ml-home-hero-copy { animation: ms-fade 0.8s ease both; }
  body[data-mini-motion="playful"].is-ready .ms-hero .ml-home-hero-copy { animation: ms-pop 0.6s cubic-bezier(.2,1.4,.3,1) both; }
  body[data-mini-motion="botanical"].is-ready .ms-hero .ml-home-hero-copy { animation: ms-fade 1s ease both; }
}
@keyframes ms-tech-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ms-slide { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes ms-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ms-paper { from { opacity: 0; transform: rotate(-0.6deg) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ms-cine { from { opacity: 0; letter-spacing: 0.08em; } to { opacity: 1; letter-spacing: normal; } }
@keyframes ms-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

body[data-mini-program="1"] .ms-rail-progress { height: 2px; background: color-mix(in srgb, currentColor 14%, transparent); margin: 8px 0 0; }
body[data-mini-program="1"] .ms-rail-progress span { display: block; height: 100%; width: 12%; background: currentColor; }
body[data-mini-program="1"] .ms-footer { padding: 2.4rem 0 3rem; }
body[data-mini-program="1"] .ms-pick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) {
  body[data-mini-program="1"] .ms-pick-row { grid-template-columns: 1fr; }
}
