/* Sugo - Moduspace builder (#688). Light UI in the Tone Pro chart style: white cards on cool grey. */
.sugo-msb { --msb-bg: #f3f5f8; --msb-card: #fff; --msb-line: #dfe3ea; --msb-ink: #1d2433; --msb-mute: var(--sugo-muted, #757575); --msb-acc: #2f6fec; max-width: 1200px; margin: 0 auto; color: var(--msb-ink); padding-bottom: 90px; }
.sugo-msb__head { margin: 0 0 12px; }
.sugo-msb__h { font-size: 1.9em; line-height: 1.15; margin: 0 0 6px; }
.sugo-msb__sub { color: var(--msb-mute); margin: 0; }
.sugo-msb__steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 12px 0; padding: 0; }
.sugo-msb__steps li { margin: 0; padding: 4px 12px; border-radius: 14px; background: var(--msb-bg); color: var(--msb-mute); font-size: .85em; font-weight: 600; }
.sugo-msb__steps li.is-on { background: var(--msb-ink); color: #fff; }
.sugo-msb__sec { background: var(--msb-bg); border-radius: 12px; padding: 12px; margin: 0 0 14px; scroll-margin-top: 90px; }
.sugo-msb__sec[hidden] { display: none; }
.sugo-msb__h2 { font-size: 1.2em; margin: 0 0 10px; }
.sugo-msb__ranges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.sugo-msb__ranges button { margin: 0; padding: 0 14px; min-height: 34px; line-height: 34px; border-radius: 17px; border: 1px solid var(--msb-line); background: #fff; color: var(--msb-ink); font-size: .85em; font-weight: 600; text-transform: none; letter-spacing: 0; }
.sugo-msb__ranges button.is-on { background: var(--msb-ink); border-color: var(--msb-ink); color: #fff; }

.sugo-msb__cases, .sugo-msb__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sugo-msb__case, .sugo-msb__part { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; background: var(--msb-card); border-radius: 10px; padding: 10px; box-shadow: 0 0 0 1px var(--msb-line); font-size: .9em; line-height: 1.3; }
.sugo-msb__case { cursor: pointer; }
.sugo-msb__case:focus-visible { outline: 3px solid var(--msb-acc); outline-offset: 2px; }
.sugo-msb__case.is-on, .sugo-msb__part.is-on { box-shadow: 0 0 0 3px var(--msb-acc); }
.sugo-msb__case.is-disabled, .sugo-msb__part.is-disabled { opacity: .55; }
.sugo-msb__case img, .sugo-msb__part img, .sugo-msb__noimg { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 6px; margin: 0 0 4px; }
.sugo-msb__noimg { background: var(--msb-bg); }
.sugo-msb__nm { font-weight: 700; }
.sugo-msb__nm em { display: block; font-style: normal; font-weight: 400; color: var(--msb-mute); }
.sugo-msb__code, .sugo-msb__size, .sugo-msb__hint { color: var(--msb-mute); font-size: .9em; }
.sugo-msb__hint { color: var(--msb-ink); font-weight: 600; }
.sugo-msb__price del { color: var(--msb-mute); font-weight: 400; }
.sugo-msb__stock { font-size: .85em; font-weight: 700; }
.sugo-msb__stock.is-in { color: var(--sugo-green-text, #2B8156); }
.sugo-msb__stock.is-pre { color: var(--msb-acc); }
.sugo-msb__stock.is-off { color: var(--sugo-red-text, #E0280F); }

.sugo-msb__group h3 { font-size: 1em; margin: 6px 0 8px; }
.sugo-msb__group + .sugo-msb__group { margin-top: 12px; }
.sugo-msb__step { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.sugo-msb__step button { margin: 0; width: 36px; height: 36px; min-height: 36px; padding: 0; line-height: 34px; border-radius: 18px; border: 1px solid var(--msb-line); background: #fff; color: var(--msb-ink); font-size: 1.1em; font-weight: 700; }
.sugo-msb__step button:disabled { opacity: .4; cursor: not-allowed; }
.sugo-msb__n { min-width: 1.5em; text-align: center; font-weight: 700; }

.sugo-msb__sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.sugo-msb__set { display: flex; flex-direction: column; gap: 6px; background: var(--msb-card); border-radius: 10px; padding: 12px; box-shadow: 0 0 0 1px var(--msb-line); }
.sugo-msb__set ul { margin: 0 0 0 1.1em; padding: 0; font-size: .88em; }
.sugo-msb__set li { margin: 0 0 2px; }
.sugo-msb__set li span { color: var(--msb-mute); }
.sugo-msb__set-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.sugo-msb__set-total { font-weight: 800; font-size: 1.1em; }
.sugo-msb__set-add { margin: 0 !important; }

.sugo-msb__bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 10px 14px; background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.12); }
.sugo-msb__bar[hidden] { display: none; }
.sugo-msb__withcase { margin: 0; font-size: .9em; display: flex; align-items: center; gap: 6px; }
.sugo-msb__withcase input { margin: 0; }
.sugo-msb__sum { font-weight: 700; }
.sugo-msb__add { margin: 0 !important; }
.sugo-msb.is-busy .sugo-msb__add, .sugo-msb.is-busy .sugo-msb__set-add { cursor: progress; }
.sugo-msb__msg { position: fixed; z-index: 91; left: 50%; bottom: 76px; transform: translateX(-50%); width: max-content; max-width: min(640px, 92vw); padding: 10px 14px; border-radius: 10px; background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.18); font-weight: 600; }
.sugo-msb__msg.is-err { color: var(--sugo-red-text, #E0280F); }
.sugo-msb__msg:empty { display: none; }

@media (max-width: 549px) {
	.sugo-msb__h { font-size: 1.45em; }
	.sugo-msb__cases, .sugo-msb__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.sugo-msb__sec { padding: 8px; }
	.sugo-msb__bar { gap: 8px; justify-content: space-between; }
}
